1 line
3.9 MiB
1 line
3.9 MiB
{"version":3,"sources":["src/util.js","src/AssertionError.js","../src/events/Event.js","src/ObjectEventType.js","src/Disposable.js","src/array.js","src/functions.js","src/obj.js","../src/events/Target.js","../src/events/EventType.js","src/events.js","src/Observable.js","src/Object.js","src/CollectionEventType.js","src/Collection.js","src/asserts.js","src/Feature.js","../src/geom/GeometryLayout.js","../src/geom/GeometryType.js","../src/proj/Units.js","src/transform.js","../src/extent/Corner.js","../src/extent/Relationship.js","src/extent.js","../src/proj/Projection.js","src/math.js","../src/proj/epsg3857.js","../src/proj/epsg4326.js","../src/proj/projections.js","../src/proj/transforms.js","src/sphere.js","src/string.js","src/coordinate.js","src/proj.js","../../src/geom/flat/transform.js","../src/geom/Geometry.js","../src/geom/SimpleGeometry.js","../../src/geom/flat/closest.js","../../src/geom/flat/deflate.js","../../src/geom/flat/simplify.js","../../src/geom/flat/inflate.js","../../src/geom/flat/area.js","../src/geom/LinearRing.js","../src/geom/Point.js","../../src/geom/flat/contains.js","../../src/geom/flat/interiorpoint.js","../../src/geom/flat/segments.js","../../src/geom/flat/intersectsextent.js","../../src/geom/flat/reverse.js","../../src/geom/flat/orient.js","../src/geom/Polygon.js","src/Geolocation.js","../src/render/EventType.js","../src/style/Fill.js","../../src/geom/flat/interpolate.js","../../src/geom/flat/length.js","../src/geom/LineString.js","../src/style/Stroke.js","src/ImageState.js","src/size.js","../src/style/Image.js","src/color.js","src/colorlike.js","src/has.js","src/dom.js","src/css.js","../src/render/canvas.js","../src/style/RegularShape.js","../src/style/Circle.js","../src/style/Style.js","../src/style/TextPlacement.js","../src/style/Text.js","../src/layer/Property.js","../src/layer/Base.js","../src/source/State.js","../src/layer/Layer.js","node_modules/rbush/rbush.min.js","../src/layer/BaseVector.js","../../src/render/canvas/Instruction.js","../src/render/VectorContext.js","../../src/render/canvas/Builder.js","../../src/render/canvas/ImageBuilder.js","../../src/render/canvas/LineStringBuilder.js","../../src/render/canvas/PolygonBuilder.js","../../src/geom/flat/straightchunk.js","../../src/render/canvas/TextBuilder.js","../../src/render/canvas/BuilderGroup.js","../src/renderer/Layer.js","../src/render/Event.js","../../src/renderer/canvas/Layer.js","../../src/render/canvas/BuilderType.js","../../src/geom/flat/textpath.js","../../src/render/canvas/Executor.js","../../src/render/canvas/ExecutorGroup.js","src/ViewHint.js","../../src/render/canvas/Immediate.js","../src/style/IconAnchorUnits.js","../src/style/IconOrigin.js","../src/style/IconImageCache.js","src/ImageBase.js","src/Image.js","../src/style/IconImage.js","../src/style/Icon.js","src/style.js","../../src/render/canvas/hitdetect.js","../src/renderer/vector.js","../../src/renderer/canvas/VectorLayer.js","../src/layer/Vector.js","../src/structs/RBush.js","../src/source/Source.js","../src/source/VectorEventType.js","src/loadingstrategy.js","../src/format/FormatType.js","src/featureloader.js","../src/source/Vector.js","src/render.js","../../src/geom/flat/geodesic.js","../src/layer/Graticule.js","src/ImageCanvas.js","src/TileState.js","src/easing.js","src/Tile.js","src/ImageTile.js","src/Kinetic.js","../src/renderer/Map.js","../src/renderer/Composite.js","../src/layer/Group.js","src/MapEvent.js","src/MapBrowserEvent.js","src/MapBrowserEventType.js","../src/pointer/EventType.js","src/MapBrowserEventHandler.js","src/MapEventType.js","src/MapProperty.js","../src/structs/PriorityQueue.js","src/TileQueue.js","src/ViewProperty.js","../src/tilegrid/common.js","src/centerconstraint.js","src/resolutionconstraint.js","src/rotationconstraint.js","src/View.js","src/PluggableMap.js","../src/control/Control.js","../src/control/Attribution.js","../src/control/Rotate.js","../src/control/Zoom.js","../src/control/FullScreen.js","../src/control/MousePosition.js","src/OverlayPositioning.js","src/Overlay.js","../src/control/OverviewMap.js","../src/control/ScaleLine.js","../src/control/ZoomSlider.js","../src/control/ZoomToExtent.js","src/control.js","../src/interaction/Property.js","../src/interaction/Interaction.js","../src/interaction/DoubleClickZoom.js","../src/interaction/Pointer.js","../src/events/condition.js","../src/interaction/DragPan.js","../src/interaction/DragRotate.js","../src/render/Box.js","../src/interaction/DragBox.js","../src/interaction/DragZoom.js","../src/events/KeyCode.js","../src/interaction/KeyboardPan.js","../src/interaction/KeyboardZoom.js","../src/interaction/MouseWheelZoom.js","../src/interaction/PinchRotate.js","../src/interaction/PinchZoom.js","../src/interaction/DragAndDrop.js","../src/interaction/DragRotateAndZoom.js","../src/geom/Circle.js","../src/geom/MultiLineString.js","../src/geom/MultiPoint.js","../../src/geom/flat/center.js","../src/geom/MultiPolygon.js","../src/interaction/Draw.js","../src/interaction/Extent.js","../src/interaction/Modify.js","../src/interaction/Select.js","../src/interaction/Snap.js","../src/interaction/Translate.js","src/interaction.js","src/Map.js","../src/structs/LRUCache.js","src/tilecoord.js","src/TileCache.js","src/TileRange.js","src/VectorRenderTile.js","src/VectorTile.js","src/index.js","node_modules/ol-layerswitcher/dist/ol-layerswitcher.js","../src/geom/GeometryCollection.js","../src/format/Feature.js","../src/format/JSONFeature.js","../src/format/GeoJSON.js","../src/reproj/common.js","../src/reproj/Triangulation.js","../src/source/common.js","src/reproj.js","../src/reproj/Tile.js","../src/source/TileEventType.js","../src/tilegrid/TileGrid.js","src/tilegrid.js","../src/source/Tile.js","src/tileurlfunction.js","../src/source/UrlTile.js","../src/source/TileImage.js","src/net.js","../src/source/BingMaps.js","../src/source/XYZ.js","../src/source/CartoDB.js","../src/source/Cluster.js","../src/source/Zoomify.js","../src/format/IIIFInfo.js","../src/source/IIIF.js","../src/reproj/Image.js","../src/source/Image.js","src/uri.js","../src/source/ImageArcGISRest.js","../src/source/ImageCanvas.js","../src/source/ImageMapGuide.js","../src/source/ImageStatic.js","../src/source/WMSServerType.js","../src/source/ImageWMS.js","../src/source/OSM.js","../src/layer/BaseImage.js","../../src/renderer/canvas/ImageLayer.js","../src/layer/Image.js","../src/layer/TileProperty.js","../src/layer/BaseTile.js","../../src/renderer/canvas/TileLayer.js","../src/layer/Tile.js","../src/source/Raster.js","../src/source/Stamen.js","../src/source/TileArcGISRest.js","../src/source/TileDebug.js","../src/source/TileJSON.js","../src/source/TileWMS.js","../src/source/UTFGrid.js","../src/source/VectorTile.js","../src/source/WMTSRequestEncoding.js","../src/tilegrid/WMTS.js","../src/source/WMTS.js","src/source.js","src/webgl.js","../src/webgl/Buffer.js","../src/webgl/ContextEventType.js","../src/webgl/PostProcessingPass.js","../src/vec/mat4.js","../src/webgl/Helper.js","../../src/renderer/webgl/Layer.js","../src/webgl/RenderTarget.js","../src/worker/webgl.js","../../src/renderer/webgl/PointsLayer.js","../src/layer/Heatmap.js","node_modules/ieee754/index.js","node_modules/pbf/index.js","../src/render/Feature.js","../src/format/MVT.js","../src/layer/VectorTileRenderType.js","../../src/renderer/canvas/VectorTileLayer.js","../src/layer/VectorTile.js","node_modules/mapbox-to-css-font/index.js","node_modules/base64-js/index.js","node_modules/isarray/index.js","node_modules/buffer/index.js","../style-spec.js","../../../node_modules/json-stringify-pretty-compact/index.js","../format.js","../../../node_modules/url/node_modules/punycode/punycode.js","../../../node_modules/url/util.js","../../../node_modules/querystring/decode.js","../../../node_modules/querystring/encode.js","../../../node_modules/querystring/index.js","../../../node_modules/url/url.js","../visit.js","../migrate/v8.js","../util/extend.js","../expression/parsing_error.js","../expression/scope.js","../expression/types.js","../../../node_modules/csscolorparser/csscolorparser.js","../util/color.js","../expression/types/collator.js","../expression/types/formatted.js","../expression/types/resolved_image.js","../expression/values.js","../expression/definitions/literal.js","../expression/runtime_error.js","../expression/definitions/assertion.js","../expression/definitions/format.js","../expression/definitions/image.js","../expression/definitions/coercion.js","../expression/evaluation_context.js","../expression/compound_expression.js","../expression/definitions/collator.js","../expression/definitions/within.js","../expression/is_constant.js","../expression/definitions/var.js","../expression/parsing_context.js","../expression/stops.js","../expression/definitions/step.js","../../../node_modules/@mapbox/unitbezier/index.js","../util/interpolate.js","../util/color_spaces.js","../expression/definitions/interpolate.js","../expression/definitions/coalesce.js","../expression/definitions/let.js","../expression/definitions/at.js","../expression/definitions/in.js","../expression/definitions/index_of.js","../expression/definitions/match.js","../expression/definitions/case.js","../expression/definitions/slice.js","../expression/definitions/comparison.js","../expression/definitions/number_format.js","../expression/definitions/length.js","../expression/definitions/index.js","../util/result.js","../util/properties.js","../util/get_type.js","../function/index.js","../expression/index.js","../function/convert.js","../feature_filter/index.js","../feature_filter/convert.js","../migrate/expressions.js","../migrate.js","../composite.js","../util/ref_properties.js","../deref.js","../util/deep_equal.js","../diff.js","../error/validation_error.js","../error/parsing_error.js","../validate/validate_constants.js","../util/unbundle_jsonlint.js","../validate/validate_object.js","../validate/validate_array.js","../validate/validate_number.js","../validate/validate_function.js","../validate/validate_expression.js","../validate/validate_boolean.js","../validate/validate_color.js","../validate/validate_enum.js","../validate/validate_filter.js","../validate/validate_property.js","../validate/validate_paint_property.js","../validate/validate_layout_property.js","../validate/validate_layer.js","../validate/validate_string.js","../validate/validate_source.js","../validate/validate_light.js","../validate/validate_terrain.js","../validate/validate_formatted.js","../validate/validate_image.js","../validate/validate.js","../validate/validate_glyphs_url.js","../validate_style.min.js","../../../node_modules/@mapbox/jsonlint-lines-primitives/lib/jsonlint.js","../read_style.js","../validate_style.js","../validate_mapbox_api_supported.js","../src/util.js","../src/stylefunction.js","node_modules/webfont-matcher/lib/fonts/google.js","../src/index.js","../src/layer/MapboxVector.js","../../src/renderer/canvas/VectorImageLayer.js","../src/layer/VectorImage.js","../src/style/expressions.js","../src/webgl/ShaderBuilder.js","../src/layer/WebGLPoints.js","src/layer.js","node_modules/regenerator-runtime/runtime.js","node_modules/axios/lib/helpers/bind.js","node_modules/axios/lib/utils.js","node_modules/axios/lib/helpers/buildURL.js","node_modules/axios/lib/core/InterceptorManager.js","node_modules/axios/lib/core/transformData.js","node_modules/axios/lib/cancel/isCancel.js","node_modules/axios/lib/helpers/normalizeHeaderName.js","node_modules/axios/lib/core/enhanceError.js","node_modules/axios/lib/core/createError.js","node_modules/axios/lib/core/settle.js","node_modules/axios/lib/helpers/cookies.js","node_modules/axios/lib/helpers/isAbsoluteURL.js","node_modules/axios/lib/helpers/combineURLs.js","node_modules/axios/lib/core/buildFullPath.js","node_modules/axios/lib/helpers/parseHeaders.js","node_modules/axios/lib/helpers/isURLSameOrigin.js","node_modules/axios/lib/adapters/xhr.js","node_modules/process/browser.js","node_modules/axios/lib/defaults.js","node_modules/axios/lib/core/dispatchRequest.js","node_modules/axios/lib/core/mergeConfig.js","node_modules/axios/lib/core/Axios.js","node_modules/axios/lib/cancel/Cancel.js","node_modules/axios/lib/cancel/CancelToken.js","node_modules/axios/lib/helpers/spread.js","node_modules/axios/lib/helpers/isAxiosError.js","node_modules/axios/lib/axios.js","node_modules/axios/index.js","../src/index.ts","../src/utils.ts","node_modules/qs/lib/utils.js","node_modules/qs/lib/formats.js","node_modules/qs/lib/stringify.js","node_modules/qs/lib/parse.js","node_modules/qs/lib/index.js","node_modules/contentful-sdk-core/dist/index.es-modules.js","node_modules/contentful/dist/es-modules/entities/space.js","node_modules/json-stringify-safe/stringify.js","node_modules/contentful/dist/es-modules/mixins/stringify-safe.js","node_modules/contentful-resolve-response/dist/esm/index.js","node_modules/contentful/dist/es-modules/entities/entry.js","node_modules/contentful/dist/es-modules/entities/asset.js","node_modules/contentful/dist/es-modules/entities/content-type.js","node_modules/contentful/dist/es-modules/entities/locale.js","node_modules/contentful/dist/es-modules/entities/index.js","node_modules/contentful/dist/es-modules/paged-sync.js","node_modules/contentful/dist/es-modules/utils/normalize-select.js","node_modules/contentful/dist/es-modules/create-contentful-api.js","node_modules/contentful/dist/es-modules/create-global-options.js","node_modules/contentful/dist/es-modules/contentful.js","../../../node_modules/escape-html/index.js","../../../node_modules/core-js/internals/global.js","../../../node_modules/core-js/internals/fails.js","../../../node_modules/core-js/internals/descriptors.js","../../../node_modules/core-js/internals/object-property-is-enumerable.js","../../../node_modules/core-js/internals/create-property-descriptor.js","../../../node_modules/core-js/internals/classof-raw.js","../../../node_modules/core-js/internals/indexed-object.js","../../../node_modules/core-js/internals/to-indexed-object.js","../../../node_modules/core-js/internals/require-object-coercible.js","../../../node_modules/core-js/internals/is-object.js","../../../node_modules/core-js/internals/to-primitive.js","../../../node_modules/core-js/internals/has.js","../../../node_modules/core-js/internals/document-create-element.js","../../../node_modules/core-js/internals/ie8-dom-define.js","../../../node_modules/core-js/internals/object-get-own-property-descriptor.js","../../../node_modules/core-js/internals/an-object.js","../../../node_modules/core-js/internals/object-define-property.js","../../../node_modules/core-js/internals/create-non-enumerable-property.js","../../../node_modules/core-js/internals/set-global.js","../../../node_modules/core-js/internals/shared-store.js","../../../node_modules/core-js/internals/inspect-source.js","../../../node_modules/core-js/internals/internal-state.js","../../../node_modules/core-js/internals/native-weak-map.js","../../../node_modules/core-js/internals/shared.js","../../../node_modules/core-js/internals/uid.js","../../../node_modules/core-js/internals/shared-key.js","../../../node_modules/core-js/internals/hidden-keys.js","../../../node_modules/core-js/internals/redefine.js","../../../node_modules/core-js/internals/path.js","../../../node_modules/core-js/internals/get-built-in.js","../../../node_modules/core-js/internals/to-integer.js","../../../node_modules/core-js/internals/to-length.js","../../../node_modules/core-js/internals/to-absolute-index.js","../../../node_modules/core-js/internals/array-includes.js","../../../node_modules/core-js/internals/object-keys-internal.js","../../../node_modules/core-js/internals/enum-bug-keys.js","../../../node_modules/core-js/internals/object-get-own-property-names.js","../../../node_modules/core-js/internals/object-get-own-property-symbols.js","../../../node_modules/core-js/internals/own-keys.js","../../../node_modules/core-js/internals/copy-constructor-properties.js","../../../node_modules/core-js/internals/is-forced.js","../../../node_modules/core-js/internals/export.js","../../../node_modules/core-js/internals/object-keys.js","../../../node_modules/core-js/internals/object-to-array.js","../../../node_modules/core-js/modules/es.object.values.js","../../../node_modules/core-js/es/object/values.js","../../../node_modules/core-js/internals/object-create.js","../../../node_modules/core-js/internals/native-symbol.js","../../../node_modules/core-js/internals/use-symbol-as-uid.js","../../../node_modules/core-js/internals/well-known-symbol.js","../../../node_modules/core-js/internals/object-define-properties.js","../../../node_modules/core-js/internals/html.js","../../../node_modules/core-js/internals/add-to-unscopables.js","../../../node_modules/core-js/internals/array-method-uses-to-length.js","../../../node_modules/core-js/modules/es.array.includes.js","../../../node_modules/core-js/internals/a-function.js","../../../node_modules/core-js/internals/entry-unbind.js","../../rich-text-types/src/blocks.ts","../../../node_modules/core-js/internals/function-bind-context.js","../../../node_modules/core-js/es/array/includes.js","../../rich-text-types/src/inlines.ts","../../rich-text-types/src/schemaConstraints.ts","../../rich-text-types/src/emptyDocument.ts","../../rich-text-types/src/helpers.ts","../../rich-text-types/src/marks.ts","assets/cms/fallback-data.json","index.js"],"names":["validate","sortKeysBy","obj","reference","result","key","undefined","format","style","space","stringifyPretty","$root","layers","map","layer","indent","global","this","require$$0","require$$1","getPropertyReference","propertyName","i","Reference","layout","length","paint","eachSource","callback","k","sources","eachLayer","eachProperty","options","inner","propertyType","properties","Object","keys","forEach","path","id","value","set","x","eachLayout","indexOf","eachPaint","resolveConstant","constants","isFunction","Array","isArray","stops","renameProperty","from","to","version","source","type","url","coordinates","coord","reverse","property","stop","glyphs","migrateFontstackURL","input","inputParsed","URL","parse","inputPathnameParts","pathname","split","protocol","hostname","migrateFontStack","font","splitAndTrim","string","s","trim","Error","firstSymbolLayer","symbolLayers","splice","concat","output","inputs","ParsingError","constructor","message","Scope","parent","bindings","name","expression","get","has","NullType","kind","NumberType","StringType","BooleanType","ColorType","ObjectType","ValueType","ErrorType","CollatorType","FormattedType","ResolvedImageType","array","itemType","N","toString","valueMemberTypes","checkSubtype","expected","t","memberType","isValidType","provided","allowedTypes","some","isValidNativeType","Color","r","g","b","a","rgba","parseCSSColor","toArray","Math","round","black","white","transparent","red","blue","Collator","caseSensitive","diacriticSensitive","locale","sensitivity","collator","Intl","usage","compare","lhs","rhs","resolvedLocale","resolvedOptions","FormattedSection","text","image","scale","fontStack","textColor","Formatted","sections","fromString","unformatted","isEmpty","section","factory","join","serialize","serialized","push","ResolvedImage","available","validateRGBA","isValue","mixed","item","typeOf","String","JSON","stringify","Literal","args","context","error","expectedType","evaluate","eachChild","outputDefined","RuntimeError","toJSON","types","number","boolean","object","Assertion","floor","parsed","ctx","fn","every","arg","FormatExpression","firstArg","nextTokenMayBeObject","lastExpression","content","evaluatedContent","ImageExpression","evaluatedImageName","availableImages","Coercion","Boolean","c","parseColor","num","Number","isNaN","valueToString","child","geometryTypes","EvaluationContext","globals","feature","featureState","formattedSection","_parseColorCache","canonical","geometryType","geometry","canonicalID","cached","CompoundExpression","_evaluate","op","definition","definitions","availableOverloads","overloads","filter","signature","signatureContext","params","ParsingContext","registry","scope","parsedArgs","argParseFailed","errors","signatures","stringifySignature","actualTypes","register","CollatorExpression","EXTENT","updateBBox","bbox","min","max","mercatorXfromLng","lng","mercatorYfromLat","lat","PI","log","tan","boxWithinBox","bbox1","bbox2","getTileCoordinates","p","y","tilesAtZoom","pow","z","onBoundary","p1","p2","x1","y1","x2","y2","rayIntersect","pointWithinPolygon","point","rings","inside","len","ring","j","len2","pointWithinPolygons","polygons","perp","v1","v2","twoSided","q1","q2","x3","y3","det1","det2","lineIntersectLine","d","vectorP","lineIntersectPolygon","polygon","lineStringWithinPolygon","line","lineStringWithinPolygons","getTilePolygon","getTilePolygons","updatePoint","polyBBox","worldSize","halfWorldSize","shift","resetBBox","Infinity","getTilePoints","pointBBox","shifts","tilePoints","points","getTileLines","lineBBox","tileLines","tileLine","pointsWithinPolygons","polygonGeometry","tilePolygon","tilePolygons","linesWithinPolygons","Within","geojson","geometries","features","isFeatureConstant","e","test","isStateConstant","isGlobalPropertyConstant","Var","boundExpression","part","expr","index","_parse","annotate","typeAnnotation","Expr","actual","isConstant","ec","isTypeAnnotation","childrenConstant","findStopLessThanOrEqualTo","lastIndex","lowerIndex","currentValue","nextValue","upperIndex","currentIndex","Step","labels","outputs","label","outputType","labelKey","valueKey","stopCount","out","color","Xn","Yn","Zn","t0","t1","t2","t3","deg2rad","rad2deg","xyz2lab","lab2xyz","xyz2rgb","rgb2xyz","rgbToLab","rgbColor","l","alpha","labToRgb","labColor","interpolateLab","interpolateNumber","rgbToHcl","h","atan2","sqrt","hclToRgb","hclColor","cos","sin","interpolateHue","interpolateHcl","lab","forward","interpolate","hcl","Interpolate","operator","interpolation","interpolationFactor","lower","upper","exponentialInterpolation","base","controlPoints","UnitBezier","solve","slice","rest","outputLower","outputUpper","toLowerCase","lowerValue","upperValue","difference","progress","Coalesce","needsAnnotation","requestedImageName","argCount","Let","binding","At","In","needle","haystack","IndexOf","fromIndex","Match","inputType","cases","otherwise","labelContext","abs","MAX_SAFE_INTEGER","sortedLabels","sort","groupedByOutput","outputLookup","outputIndex","coerceLabel","Case","branches","_","Slice","beginIndex","endIndex","isComparableType","eq","neq","lt","gt","lteq","gteq","eqCollate","neqCollate","ltCollate","gtCollate","lteqCollate","gteqCollate","makeComparison","compareBasic","compareWithCollator","isOrderComparison","Comparison","hasUntypedArgument","rt","Equals","NotEquals","LessThan","GreaterThan","LessThanOrEqual","GreaterThanOrEqual","NumberFormat","currency","minFractionDigits","maxFractionDigits","minimumFractionDigits","maximumFractionDigits","Length","expressions","v","binarySearch","m","varargs","success","supportsPropertyExpression","spec","supportsZoomExpression","parameters","supportsInterpolation","interpolated","getType","val","identityFunction","createFunction","propertySpec","isColor","zoomAndFeatureDependent","featureDependent","zoomDependent","extend","default","colorSpace","colorSpaces","innerFun","hashedStops","categoricalKeyType","evaluateExponentialFunction","evaluateIntervalFunction","evaluateCategoricalFunction","create","evaluateIdentityFunction","featureFunctions","zoomStops","zoom","featureFunctionStops","interpolationType","bind","coalesce","keyType","n","interp","colorspace","evaluatedLower","apply","evaluatedUpper","values","typeToString","heatmapDensity","lineProgress","skyRadialProgress","accumulated","LN2","E","LN10","asin","acos","atan","ceil","isSupportedScript","toUpperCase","StyleExpression","_warningHistory","_evaluator","_defaultValue","getDefaultValue","_enumValues","evaluateWithoutErrorHandling","console","warn","isExpression","createExpression","parser","getExpectedType","ZoomConstantExpression","_styleExpression","isStateDependent","ZoomDependentExpression","createPropertyExpression","isZoomConstant","zoomCurve","findZoomCurve","StylePropertyFunction","specification","_parameters","_specification","deserialize","normalizePropertyExpression","err","constant","childResult","enum","formatted","resolvedImage","convertLiteral","convertFunction","convertIdentityFunction","tokens","convertTokenString","convertZoomAndPropertyFunction","convertZoomFunction","convertPropertyFunction","getInterpolateOperator","featureFunctionParameters","functionType","getFunctionType","appendStopPair","fixupDegenerateStepCurve","getFallback","defaultValue","isStep","curve","re","pos","match","exec","literal","isExpressionFilter","f","filterSpec","createFilter","needGeometry","convertFilter","compiled","globalProperties","geometryNeeded","convertComparisonOp","convertNegation","convertDisjunctionOp","convertInOp","convertHasOp","filters","_convertFilter","expectedTypes","converted","children","typechecks","runtimeTypeChecks","conditions","negate","uniformTypes","uniqueValues","migrated","migrateToV8","migrateToExpressions","styleIDs","sourceIDs","compositedSourceLayers","compositeID","deref","refProperties","derefLayers","ref","deepEqual","operations","setStyle","addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setGeoJSONSourceData","setLayerZoomRange","setLayerProperty","setCenter","setZoom","setBearing","setPitch","setSprite","setGlyphs","setTransition","setLight","setTerrain","sourceId","after","commands","command","sourcesRemoved","updateSource","canUpdateGeoJSON","before","prop","hasOwnProperty","isEqual","diffSources","data","diffLayerPropertyChanges","layerId","klass","pluckId","indexById","group","diffLayers","beforeOrder","afterOrder","beforeIndex","reduce","afterIndex","tracker","clean","beforeLayer","afterLayer","insertBeforeLayerId","lastIndexOf","minzoom","maxzoom","diffStyles","center","bearing","pitch","sprite","transition","light","removeOrAddSourceCommands","beforeLayers","beforeTerrain","terrain","ValidationError","identifier","__line__","parseInt","validateConstants","unbundle","valueOf","deepUnbundle","unbundledValue","validateObject","elementSpecs","valueSpec","elementValidators","objectElementValidators","styleSpec","objectKey","elementSpecKey","elementSpec","validateElement","validateSpec","required","validateArray","arraySpec","validateArrayElement","arrayElementValidator","arrayElementSpec","$version","function","arrayIndex","validateNumber","minimum","maximum","validateFunction","functionValueSpec","stopKeyType","previousStopDomainValue","previousStopDomainZoom","stopDomainValues","isZoomFunction","isPropertyFunction","isZoomAndPropertyFunction","validateFunctionStops","validateFunctionStop","validateFunctionDefault","validateStopDomainValue","reportValue","isFinite","validateExpression","expressionContext","expressionObj","propertyKey","validateBoolean","validateColor","validateEnum","validateFilter","validateNonExpressionFilter","filter_operator","geometry_type","validateProperty","layerSpec","layerType","transitionMatch","tokenMatch","validatePaintProperty","validateLayoutProperty","validateLayer","otherLayer","sourceType","lineMetrics","validateString","promoteId","validatePromoteId","validateSource","replace","source_geojson","cluster","clusterProperties","mapExpr","reduceExpr","source_video","source_image","validateLight","lightSpec","rootType","validateTerrain","terrainSpec","validateFormatted","validateImage","VALIDATORS","valid","validateStyleMin","latestStyleSpec","sortErrors","validateGlyphsURL","wrapCleanErrors","paintProperty","layoutProperty","require","readStyle","Buffer","jsonlint","validateStyle","v8","SUPPORTED_SPEC_VERSION","MAX_SOURCES_IN_STYLE","isValid","regex","getSourceCount","getAllowedKeyErrors","allowed","Set","getSourceErrors","getSourcesErrors","count","sourceErrors","getRootErrors","specKeys","allowedKeyErrors","visibility","validateMapboxApiSupported","styleFunction","visit","latest","cachedSetTimeout","cachedClearTimeout","process","module","exports","defaultSetTimout","defaultClearTimeout","runTimeout","fun","setTimeout","call","runClearTimeout","marker","clearTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","run","Item","noop","nextTick","arguments","prototype","title","env","argv","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","cwd","chdir","dir","umask","hexTable","compactQueue","pop","compacted","arrayToObject","plainObjects","merge","target","allowPrototypes","mergeTarget","targetItem","acc","assign","decode","str","decoder","charset","strWithoutPlus","unescape","decodeURIComponent","encode","defaultEncoder","Symbol","escape","$0","charCodeAt","charAt","compact","o","refs","isRegExp","isBuffer","combine","maybeMap","mapped","percentTwenties","util","Format","RFC1738","RFC3986","formatters","utils","formats","arrayPrefixGenerators","brackets","prefix","comma","indices","repeat","pushToArray","arr","valueOrArray","toISO","Date","toISOString","defaultFormat","defaults","addQueryPrefix","allowDots","charsetSentinel","delimiter","encoder","encodeValuesOnly","formatter","serializeDate","date","skipNulls","strictNullHandling","isNonNullishPrimitive","generateArrayPrefix","objKeys","keyPrefix","normalizeStringifyOptions","opts","TypeError","arrayFormat","joined","arrayLimit","depth","ignoreQueryPrefix","interpretNumericEntities","parameterLimit","parseArrays","numberStr","fromCharCode","parseArrayValue","isoSentinel","parseValues","cleanStr","limit","parts","skipIndex","bracketEqualsPos","encodedVal","parseObject","chain","valuesParsed","leaf","root","cleanRoot","parseKeys","givenKey","segment","normalizeParseOptions","tempObj","newObj","_typeof","iterator","_defineProperty","defineProperty","enumerable","configurable","writable","ownKeys","enumerableOnly","getOwnPropertySymbols","symbols","sym","getOwnPropertyDescriptor","_objectSpread2","getOwnPropertyDescriptors","defineProperties","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","_arr","_n","_d","_e","_s","_i","next","done","minLen","_arrayLikeToArray","arr2","_createForOfIteratorHelper","allowArrayLike","it","F","normalCompletion","didErr","step","return","attempts","networkErrorAttempts","delay","ms","Promise","resolve","rateLimit","instance","maxRetry","_instance$defaults","_instance$defaults$re","responseLogger","_instance$defaults$re2","requestLogger","interceptors","request","use","config","reject","response","retryOnError","retryErrorType","wait","SQRT2","status","headers","requestId","random","logHandler","httpAgent","httpsAgent","then","asyncToken","getToken","accessToken","Authorization","isNode","isReactNative","window","navigator","product","getNodeVersion","node","getWindow","HOST_REGEX","createHttpClient","axios","defaultConfig","insecure","level","proxy","basePath","adapter","maxContentLength","missingAccessTokenError","defaultHostname","port","host","_parsed","baseURL","axiosOptions","paramsSerializer","qs","httpClientParams","cloneWithNewParams","newParams","onBeforeRequest","retryLimit","onError","createRequestConfig","_ref","query","resolveLinks","enforceObjPath","deepFreeze","propNames","_step","_iterator","getOwnPropertyNames","freeze","freezeSys","sys","getBrowserOS","win","userAgent","platform","os","getNodeOS","osMap","android","aix","darwin","freebsd","linux","openbsd","sunos","win32","getUserAgentHeader","sdk","application","integration","headerParts","toPlainObject","wrapSpace","mixinStringifySafe","serializer","linkType","circular","resolveResponse","_toConsumableArray","UNRESOLVED_LINK","isLink","makeLookupKey","getLink","entityMap","link","_link$sys","lookupKey","cleanUpLinks","walkMutate","predicate","mutator","removeUnresolved","normalizeLink","resolvedLink","makeEntryObject","itemEntryPoints","ownKey","entryObj","entryPoint","items","responseClone","allIncludes","includes","all","allEntries","Map","entity","entryObject","wrapEntry","wrapEntryCollection","wrappedData","wrapAsset","wrapAssetCollection","wrapContentType","wrapContentTypeCollection","wrapLocale","wrapLocaleCollection","entry","asset","contentType","_objectSpread","asyncGeneratorStep","gen","_next","_throw","info","_asyncToGenerator","self","pagedSync","_x","_x2","_pagedSync","regeneratorRuntime","mark","_callee","http","_defaultOptions$optio","paginate","syncOptions","mappedResponseItems","_args","wrap","_context","prev","initial","nextSyncToken","nextPageToken","content_type","getSyncPage","sent","mapResponseItems","abrupt","reducer","entries","assets","deletedEntries","deletedAssets","_x3","_x4","_x5","_x6","_getSyncPage","_callee2","_context2","sync_token","nextPageUrl","nextSyncUrl","urlParts","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","iter","normalizeSelect","select","allSelects","selectedSet","add","createContentfulApi","getGlobalOptions","entities","_entities$contentType","_entities$entry","_entities$asset","notFoundError","details","environment","errorHandler","_getSpace","switchToSpace","_getContentType","switchToEnvironment","_getContentTypes","_callee3","_args3","_context3","_getEntry","_callee4","_args4","_context4","getEntries","_getEntries","_callee5","_getGlobalOptions2","_args5","_context5","_getAsset","_callee6","_args6","_context6","_getAssets","_callee7","_args7","_context7","_getLocales","_callee8","_args8","_context8","_sync","_callee9","_getGlobalOptions3","_args9","_context9","environmentBaseUrl","spaceBaseUrl","getSpace","getContentType","getContentTypes","getEntry","getAsset","getAssets","getLocales","parseEntries","_getGlobalOptions","sync","createGlobalOptions","globalSettings","createClient","userAgentHeader","obscureAuthTokenInResponse","token","substr","_headers","authorization","_header","classof","IndexedObject","document","DESCRIPTORS","createElement","IE8_DOM_DEFINE","propertyIsEnumerableModule","definePropertyModule","store","WeakMap","NATIVE_WEAK_MAP","objectHas","InternalStateModule","hiddenKeys","internalObjectKeys","getOwnPropertyNamesModule","getOwnPropertySymbolsModule","getOwnPropertyDescriptorModule","isForced","createMethod","$","NATIVE_SYMBOL","USE_SYMBOL_AS_UID","aFunction","BLOCKS","INLINES","MARKS","helpers","total","skip","metadata","tags","revision","createdAt","updatedAt","fields","shortName","sponsors","fullName","closed","shortDescription","marks","nodeType","imageUrl","websiteUrl","showAtZoomLevel","ticketed","nodeId","category","sponsorAcknowledgment","labelOverride","wheelchairAccessible","sensoryFriendly","labelAlignment","mapId","Entry","logo","Asset","file","size","width","height","fileName","description","queryString","URLSearchParams","location","search","hasDebugParam","tfmDebug","CMSData","FallbackData","tfmZooms","far","medium","close","tfmColors","tfmStrokes","narrow","thick","LayerFiles","ground","areas","amenities","flows","pictograms","outline","main","LayerSources","layerName","VectorSource","GeoJSON","LayerStyles","WarningLayer","Style","fill","Fill","Text","overflow","ZoomedOutFootprint","stroke","Stroke","offsetY","showAtFarZoom","important","tfmView","getZoom","Icon","src","tfmIcons","getResolution","opacity","getId","coords","getGeometry","getCoordinates","deskew","angle","directions","north","east","south","west","Point","RegularShape","radius","textAlign","offsetX","tfmPictograms","endPoint","startPoint","secondToLastPoint","rotationAngle","lineJoin","Circle","labelData","fontSize","labelWidth","labelHeight","backgroundFill","padding","Footprint","LayerSettings","tfmClickable","tfmLayerType","minZoom","updateWhileInteracting","updateWhileAnimating","Floors","LayerGroup","VectorLayer","atm","picnic_area","elevator","first_aid","guest_services","restaurant","restroom","restroom_female","restroom_male","stairs_down","stairs_up","stairs_up_down","stroller","wheelchair","bird","maximo","lion","totems","elephant","mask","pawnee_lodge","bushman","sarcophagus","sue","trike","stone_lion","maori_house","startingCenter","startingZoom","innerWidth","lastZoomedFeature","View","maxZoom","constrainRotation","rotation","enableRotation","tfmMap","TileLayer","OSM","attributions","interactions","altShiftDragRotate","pinchRotate","doubleClickZoom","keyboardEventTarget","view","layerSwitcher","LayerSwitcher","startActive","activationMode","groupSelectStyle","zoomToFeature","currentLevel","resetHighlight","myPadding","myZoom","innerHeight","getFeatureById","fit","duration","createSidebar","openSidebar","poi","imageURL","shrinkImage","sidebarText","linkURL","searchParams","href","getElementById","dataset","featureId","borderColor","innerHTML","scrollTop","addEventListener","closeSidebar","className","hash","setHash","switchFloors","setVisible","renderPanel","fitFloor","getExtent","zoomToHash","matches","substring","preloadImage","Image","newURL","addControl","showPanel","event","renderSync","counter","forEachFeatureAtPixel","pixel","getVisible","layerFilter","onkeydown","evt","animate","contentfulData"],"mappings":"AiGQe,AsBDA,atBCA,AsBDA,OtBCA,AsBDA,etBCA,AsBDA,QtBCA,AsBDA,atBCA,AsBDA,CtBCA,AsBDA,OtBCA,AsBDA,ItBCA,AsBDA,QtBCA,AsBDA,atBCA,AsBDA,EtBCA,AsBDA,ItBCA,AsBDA,EtBCA,AsBDA,CtBMb,AsBLA,KAAM,EACN,KtBIa,GsBJJ,EACT,OAAQ,EtBQR,AsBHA,MAAO,EACP,KtBEc,CsBFP,GATM,QAAA,GtBgBb,KsBhBa,ItBgBH,WAKV,UAAW,aApBE,QAAA,QAAA;AjG6BR,aA9BD,SAAU,IACd,OAA0B,WAClB,MAAA,IAAI,MAAM,kCADlB,GA6BK,OAAA,eAAA,QAAA,aAAA,CAAA,OAAA,IAAA,QAAA,SAAA,EAAA,QAAA,OAAA,EAAA,QAAA,aAAA,EAnBP,IAAI,EAAc,EAWZ,SAAU,EAAO,GACd,OAAA,EAAI,SAAW,EAAI,OAAS,SAAS,IAOvC,IAAM,EAAU,QAAhB,QAAA,QAAA;;ACQQ,aAAA,OAAA,eAAA,QAAA,aAAA,CAAA,OAAA,IAAA,QAAA,aAAA,EA1Cf,IAAA,EAAA,QAAA,aA0Ce,EAAA,WAAA,IAAA,EAAA,SAAA,EAAA,GAAA,OAAA,EAAA,OAAA,gBAAA,CAAA,UAAA,cAAA,OAAA,SAAA,EAAA,GAAA,EAAA,UAAA,IAAA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,SAASyP,UAAY,SAAUC,GAGnBA,QAFRA,EAAMA,GAAOze,OAAOie,OAERrgD,KACH,IAAA,SACA,IAAA,MACDo/C,IACA,MAEC,IAAA,IACDA,IACAI,EAAa,UACbG,EAAS,UACT,MAEC,IAAA,IACDP,IACAI,EAAa,QACbG,EAAS,QAET,MAEC,IAAA,IACDP,IACAI,EAAa,SACbG,EAAS,SAET,MAIC,IAAA,IACDjI,EAAQoJ,QAAQ,CAACngC,KAAM+2B,EAAQC,UAAY,EAAGwG,SAAU,MACxD,MAEC,IAAA,IACDiB,MASRhd,OAAOkT,WACPlT,OAAOwa,OAASA,EAChBxa,OAAOsV,QAAUA,EACjBtV,OAAO2e,eAAiBxL","file":"openlayers_indoor_map.c67e9f72.js","sourceRoot":"..","sourcesContent":["import {listen} from 'ol/events';\nimport EventType from 'ol/events/EventType';\nimport {labelCache} from 'ol/render/canvas';\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 const assign =\n 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\n const output = Object(target);\n for (let i = 1, ii = arguments.length; i < ii; ++i) {\n const source = arguments[i];\n if (source !== undefined && source !== null) {\n for (const key in source) {\n if (source.hasOwnProperty(key)) {\n output[key] = source[key];\n }\n }\n }\n }\n return output;\n };\n\nexport function deg2rad(degrees) {\n return degrees * Math.PI / 180;\n}\n\nexport const defaultResolutions = (function() {\n const resolutions = [];\n for (let res = 78271.51696402048; resolutions.length <= 24; res /= 2) {\n resolutions.push(res);\n }\n return resolutions;\n})();\n\n/**\n * @param {number} width Width of the canvas.\n * @param {number} height Height of the canvas.\n * @return {HTMLCanvasElement} Canvas.\n */\nexport function createCanvas(width, height) {\n if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && typeof OffscreenCanvas !== 'undefined') { // eslint-disable-line\n return /** @type {?} */ (new OffscreenCanvas(width, height));\n } else {\n const canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n return canvas;\n }\n}\n\nexport function getZoomForResolution(resolution, resolutions) {\n let i = 0;\n const ii = resolutions.length;\n for (; i < ii; ++i) {\n const candidate = resolutions[i];\n if (candidate < resolution && i + 1 < ii) {\n const zoomFactor = resolutions[i] / resolutions[i + 1];\n return i + Math.log(resolutions[i] / resolution) / Math.log(zoomFactor);\n }\n }\n return ii - 1;\n}\n\nconst hairSpacePool = Array(256).join('\\u200A');\nexport function applyLetterSpacing(text, letterSpacing) {\n if (letterSpacing >= 0.05) {\n let textWithLetterSpacing = '';\n const lines = text.split('\\n');\n const joinSpaceString = hairSpacePool.slice(0, Math.round(letterSpacing / 0.1));\n for (let l = 0, ll = lines.length; l < ll; ++l) {\n if (l > 0) {\n textWithLetterSpacing += '\\n';\n }\n textWithLetterSpacing += lines[l].split('').join(joinSpaceString);\n }\n return textWithLetterSpacing;\n }\n return text;\n}\n\nlet measureContext;\nfunction getMeasureContext() {\n if (!measureContext) {\n measureContext = createCanvas(1, 1).getContext('2d');\n }\n return measureContext;\n}\n\nfunction measureText(text, letterSpacing) {\n return getMeasureContext().measureText(text).width + (text.length - 1) * letterSpacing;\n}\n\nlet measureCache = {};\nif (labelCache) {\n // Only available when using ES modules\n listen(labelCache, EventType.CLEAR, function() {\n measureCache = {};\n });\n}\nexport function wrapText(text, font, em, letterSpacing) {\n if (text.indexOf('\\n') !== -1) {\n const hardLines = text.split('\\n');\n const lines = [];\n for (let i = 0, ii = hardLines.length; i < ii; ++i) {\n lines.push(wrapText(hardLines[i], font, em, letterSpacing));\n }\n return lines.join('\\n');\n }\n const key = em + ',' + font + ',' + text + ',' + letterSpacing;\n let wrappedText = measureCache[key];\n if (!wrappedText) {\n const words = text.split(' ');\n if (words.length > 1) {\n const ctx = getMeasureContext();\n ctx.font = font;\n const oneEm = ctx.measureText('M').width;\n const maxWidth = oneEm * em;\n let line = '';\n const lines = [];\n // Pass 1 - wrap lines to not exceed maxWidth\n for (let i = 0, ii = words.length; i < ii; ++i) {\n const word = words[i];\n const testLine = line + (line ? ' ' : '') + word;\n if (measureText(testLine, letterSpacing) <= maxWidth) {\n line = testLine;\n } else {\n if (line) {\n lines.push(line);\n }\n line = word;\n }\n }\n if (line) {\n lines.push(line);\n }\n // Pass 2 - add lines with a width of less than 30% of maxWidth to the previous or next line\n for (let i = 0, ii = lines.length; i < ii && ii > 1; ++i) {\n const line = lines[i];\n if (measureText(line, letterSpacing) < maxWidth * 0.35) {\n const prevWidth = i > 0 ? measureText(lines[i - 1], letterSpacing) : Infinity;\n const nextWidth = i < ii - 1 ? measureText(lines[i + 1], letterSpacing) : Infinity;\n lines.splice(i, 1);\n ii -= 1;\n if (prevWidth < nextWidth) {\n lines[i - 1] += ' ' + line;\n i -= 1;\n } else {\n lines[i] = line + ' ' + lines[i];\n }\n }\n }\n // Pass 3 - try to fill 80% of maxWidth for each line\n for (let i = 0, ii = lines.length - 1; i < ii; ++i) {\n const line = lines[i];\n const next = lines[i + 1];\n if (measureText(line, letterSpacing) > maxWidth * 0.7 &&\n measureText(next, letterSpacing) < maxWidth * 0.6) {\n const lineWords = line.split(' ');\n const lastWord = lineWords.pop();\n if (measureText(lastWord, letterSpacing) < maxWidth * 0.2) {\n lines[i] = lineWords.join(' ');\n lines[i + 1] = lastWord + ' ' + next;\n }\n ii -= 1;\n }\n }\n wrappedText = lines.join('\\n');\n } else {\n wrappedText = text;\n }\n wrappedText = applyLetterSpacing(wrappedText, letterSpacing);\n measureCache[key] = wrappedText;\n }\n return wrappedText;\n}\n","/**\n * @module ol/AssertionError\n */\nimport {VERSION} from './util.js';\n\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 */\nclass AssertionError extends Error {\n /**\n * @param {number} code Error code.\n */\n constructor(code) {\n const path = VERSION === 'latest' ? VERSION : 'v' + VERSION.split('-')[0];\n const message =\n 'Assertion failed. See https://openlayers.org/en/' +\n path +\n '/doc/errors/#' +\n code +\n ' for details.';\n\n super(message);\n\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 /**\n * @type {string}\n */\n this.name = 'AssertionError';\n\n // Re-assign message, see https://github.com/Rich-Harris/buble/issues/40\n this.message = message;\n }\n}\n\nexport default AssertionError;\n","/**\n * @module ol/events/Event\n */\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 */\nclass BaseEvent {\n /**\n * @param {string} type Type.\n */\n constructor(type) {\n /**\n * @type {boolean}\n */\n this.propagationStopped;\n\n /**\n * The event type.\n * @type {string}\n * @api\n */\n this.type = type;\n\n /**\n * The event target.\n * @type {Object}\n * @api\n */\n this.target = null;\n }\n\n /**\n * Stop event propagation.\n * @api\n */\n preventDefault() {\n this.propagationStopped = true;\n }\n\n /**\n * Stop event propagation.\n * @api\n */\n stopPropagation() {\n this.propagationStopped = true;\n }\n}\n\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function stopPropagation(evt) {\n evt.stopPropagation();\n}\n\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function preventDefault(evt) {\n evt.preventDefault();\n}\n\nexport default BaseEvent;\n","/**\n * @module ol/ObjectEventType\n */\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 * @module ol/Disposable\n */\n\n/**\n * @classdesc\n * Objects that need to clean up after themselves.\n */\nclass Disposable {\n constructor() {\n /**\n * The object has already been disposed.\n * @type {boolean}\n * @protected\n */\n this.disposed = false;\n }\n\n /**\n * Clean up.\n */\n dispose() {\n if (!this.disposed) {\n this.disposed = true;\n this.disposeInternal();\n }\n }\n\n /**\n * Extension point for disposable objects.\n * @protected\n */\n disposeInternal() {}\n}\n\nexport default Disposable;\n","/**\n * @module ol/array\n */\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 let mid, cmp;\n const comparator = opt_comparator || numberSafeCompareFunction;\n let low = 0;\n let high = haystack.length;\n let found = false;\n\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\n if (cmp < 0.0) {\n /* Too low. */\n low = mid + 1;\n } else {\n /* Key found or too high */\n high = mid;\n found = !cmp;\n }\n }\n\n /* Key not found. */\n return found ? low : ~low;\n}\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/**\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/**\n * @param {Array<number>} arr Array.\n * @param {number} target Target.\n * @param {number} direction 0 means return the nearest, > 0\n * means return the largest nearest, < 0 means return the\n * smallest nearest.\n * @return {number} Index.\n */\nexport function linearFindNearest(arr, target, direction) {\n const n = arr.length;\n if (arr[0] <= target) {\n return 0;\n } else if (target <= arr[n - 1]) {\n return n - 1;\n } else {\n let i;\n if (direction > 0) {\n for (i = 1; i < n; ++i) {\n if (arr[i] < target) {\n return i - 1;\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 } else {\n for (i = 1; i < n; ++i) {\n if (arr[i] == target) {\n return i;\n } else if (arr[i] < target) {\n if (arr[i - 1] - target < target - arr[i]) {\n return i - 1;\n } else {\n return i;\n }\n }\n }\n }\n return n - 1;\n }\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 const tmp = arr[begin];\n arr[begin] = arr[end];\n arr[end] = tmp;\n ++begin;\n --end;\n }\n}\n\n/**\n * @param {Array<VALUE>} arr The array to modify.\n * @param {!Array<VALUE>|VALUE} data The elements or arrays of elements to add to arr.\n * @template VALUE\n */\nexport function extend(arr, data) {\n const extension = Array.isArray(data) ? data : [data];\n const length = extension.length;\n for (let i = 0; i < length; i++) {\n arr[arr.length] = extension[i];\n }\n}\n\n/**\n * @param {Array<VALUE>} arr The array to modify.\n * @param {VALUE} obj The element to remove.\n * @template VALUE\n * @return {boolean} If the element was removed.\n */\nexport function remove(arr, obj) {\n const i = arr.indexOf(obj);\n const found = i > -1;\n if (found) {\n arr.splice(i, 1);\n }\n return found;\n}\n\n/**\n * @param {Array<VALUE>} arr The array to search in.\n * @param {function(VALUE, number, ?) : boolean} func The function to compare.\n * @template VALUE\n * @return {VALUE|null} The element found or null.\n */\nexport function find(arr, func) {\n const length = arr.length >>> 0;\n let value;\n\n for (let 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/**\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 const len1 = arr1.length;\n if (len1 !== arr2.length) {\n return false;\n }\n for (let i = 0; i < len1; i++) {\n if (arr1[i] !== arr2[i]) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Sort the passed array such that the relative order of equal elements is preverved.\n * See https://en.wikipedia.org/wiki/Sorting_algorithm#Stability for details.\n * @param {Array<*>} arr The array to sort (modifies original).\n * @param {!function(*, *): number} compareFnc Comparison function.\n * @api\n */\nexport function stableSort(arr, compareFnc) {\n const length = arr.length;\n const tmp = Array(arr.length);\n let 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/**\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 let index;\n const found = !arr.every(function (el, idx) {\n index = idx;\n return !func(el, idx, arr);\n });\n return found ? index : -1;\n}\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 const compare = opt_func || numberSafeCompareFunction;\n return arr.every(function (currentVal, index) {\n if (index === 0) {\n return true;\n }\n const res = compare(arr[index - 1], currentVal);\n return !(res > 0 || (opt_strict && res === 0));\n });\n}\n","/**\n * @module ol/functions\n */\n\nimport {equals as arrayEquals} from './array.js';\n\n/**\n * Always returns true.\n * @returns {boolean} true.\n */\nexport function TRUE() {\n return true;\n}\n\n/**\n * Always returns false.\n * @returns {boolean} false.\n */\nexport function FALSE() {\n return false;\n}\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/**\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 let called = false;\n\n /** @type {ReturnType} */\n let lastResult;\n\n /** @type {Array<any>} */\n let lastArgs;\n\n let lastThis;\n\n return function () {\n const 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 * @module ol/obj\n */\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 const assign =\n 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\n const output = Object(target);\n for (let i = 1, ii = arguments.length; i < ii; ++i) {\n const source = arguments[i];\n if (source !== undefined && source !== null) {\n for (const key in source) {\n if (source.hasOwnProperty(key)) {\n output[key] = source[key];\n }\n }\n }\n }\n return output;\n };\n\n/**\n * Removes all properties from an object.\n * @param {Object} object The object to clear.\n */\nexport function clear(object) {\n for (const property in object) {\n delete object[property];\n }\n}\n\n/**\n * Polyfill for Object.values(). Get an array of property values from an object.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values\n *\n * @param {!Object<K,V>} object The object from which to get the values.\n * @return {!Array<V>} The property values.\n * @template K,V\n */\nexport const getValues =\n typeof Object.values === 'function'\n ? Object.values\n : function (object) {\n const values = [];\n for (const property in object) {\n values.push(object[property]);\n }\n return values;\n };\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 let property;\n for (property in object) {\n return false;\n }\n return !property;\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/**\n * @typedef {EventTarget|Target} EventTargetLike\n */\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 */\nclass Target extends Disposable {\n /**\n * @param {*=} opt_target Default event target for dispatched events.\n */\n constructor(opt_target) {\n super();\n\n /**\n * @private\n * @type {*}\n */\n this.eventTarget_ = opt_target;\n\n /**\n * @private\n * @type {Object<string, number>}\n */\n this.pendingRemovals_ = null;\n\n /**\n * @private\n * @type {Object<string, number>}\n */\n this.dispatching_ = null;\n\n /**\n * @private\n * @type {Object<string, Array<import(\"../events.js\").Listener>>}\n */\n this.listeners_ = null;\n }\n\n /**\n * @param {string} type Type.\n * @param {import(\"../events.js\").Listener} listener Listener.\n */\n addEventListener(type, listener) {\n if (!type || !listener) {\n return;\n }\n const listeners = this.listeners_ || (this.listeners_ = {});\n const listenersForType = listeners[type] || (listeners[type] = []);\n if (listenersForType.indexOf(listener) === -1) {\n listenersForType.push(listener);\n }\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 dispatchEvent(event) {\n /** @type {import(\"./Event.js\").default|Event} */\n const evt = typeof event === 'string' ? new Event(event) : event;\n const type = evt.type;\n if (!evt.target) {\n evt.target = this.eventTarget_ || this;\n }\n const listeners = this.listeners_ && this.listeners_[type];\n let propagate;\n if (listeners) {\n const dispatching = this.dispatching_ || (this.dispatching_ = {});\n const pendingRemovals =\n this.pendingRemovals_ || (this.pendingRemovals_ = {});\n if (!(type in dispatching)) {\n dispatching[type] = 0;\n pendingRemovals[type] = 0;\n }\n ++dispatching[type];\n for (let i = 0, ii = listeners.length; i < ii; ++i) {\n if ('handleEvent' in listeners[i]) {\n propagate = /** @type {import(\"../events.js\").ListenerObject} */ (listeners[\n i\n ]).handleEvent(evt);\n } else {\n propagate = /** @type {import(\"../events.js\").ListenerFunction} */ (listeners[\n i\n ]).call(this, evt);\n }\n if (propagate === false || evt.propagationStopped) {\n propagate = false;\n break;\n }\n }\n --dispatching[type];\n if (dispatching[type] === 0) {\n let pr = pendingRemovals[type];\n delete pendingRemovals[type];\n while (pr--) {\n this.removeEventListener(type, VOID);\n }\n delete dispatching[type];\n }\n return propagate;\n }\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n this.listeners_ && clear(this.listeners_);\n }\n\n /**\n * Get the listeners for a specified event type. Listeners are returned in the\n * order that they will be called in.\n *\n * @param {string} type Type.\n * @return {Array<import(\"../events.js\").Listener>|undefined} Listeners.\n */\n getListeners(type) {\n return (this.listeners_ && this.listeners_[type]) || undefined;\n }\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 hasListener(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 /**\n * @param {string} type Type.\n * @param {import(\"../events.js\").Listener} listener Listener.\n */\n removeEventListener(type, listener) {\n const listeners = this.listeners_ && this.listeners_[type];\n if (listeners) {\n const 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 } else {\n listeners.splice(index, 1);\n if (listeners.length === 0) {\n delete this.listeners_[type];\n }\n }\n }\n }\n }\n}\n\nexport default Target;\n","/**\n * @module ol/events/EventType\n */\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 /**\n * Generic error event. Triggered when an error occurs.\n * @event module:ol/events/Event~BaseEvent#error\n * @api\n */\n ERROR: 'error',\n\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","/**\n * @module ol/events\n */\nimport {clear} from './obj.js';\n\n/**\n * Key to use with {@link module:ol/Observable~Observable#unByKey}.\n * @typedef {Object} EventsKey\n * @property {ListenerFunction} listener\n * @property {import(\"./events/Target.js\").EventTargetLike} target\n * @property {string} type\n * @api\n */\n\n/**\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/**\n * @typedef {Object} ListenerObject\n * @property {ListenerFunction} handleEvent\n */\n\n/**\n * @typedef {ListenerFunction|ListenerObject} Listener\n */\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 const originalListener = listener;\n listener = function () {\n target.removeEventListener(type, listener);\n originalListener.apply(this, arguments);\n };\n }\n const eventsKey = {\n target: target,\n type: type,\n listener: listener,\n };\n target.addEventListener(type, listener);\n return eventsKey;\n}\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/**\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","/**\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/**\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 */\nclass Observable extends EventTarget {\n constructor() {\n super();\n\n /**\n * @private\n * @type {number}\n */\n this.revision_ = 0;\n }\n\n /**\n * Increases the revision counter and dispatches a 'change' event.\n * @api\n */\n changed() {\n ++this.revision_;\n this.dispatchEvent(EventType.CHANGE);\n }\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 getRevision() {\n return this.revision_;\n }\n\n /**\n * Listen for a certain type of event.\n * @param {string|Array<string>} type The event type or array of event types.\n * @param {function(?): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Unique key for the listener. If\n * called with an array of event types as the first argument, the return\n * will be an array of keys.\n * @api\n */\n on(type, listener) {\n if (Array.isArray(type)) {\n const len = type.length;\n const keys = new Array(len);\n for (let i = 0; i < len; ++i) {\n keys[i] = listen(this, type[i], listener);\n }\n return keys;\n } else {\n return listen(this, /** @type {string} */ (type), listener);\n }\n }\n\n /**\n * Listen once for a certain type of event.\n * @param {string|Array<string>} type The event type or array of event types.\n * @param {function(?): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Unique key for the listener. If\n * called with an array of event types as the first argument, the return\n * will be an array of keys.\n * @api\n */\n once(type, listener) {\n let key;\n if (Array.isArray(type)) {\n const len = type.length;\n key = new Array(len);\n for (let i = 0; i < len; ++i) {\n key[i] = listenOnce(this, type[i], listener);\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 /**\n * Unlisten for a certain type of event.\n * @param {string|Array<string>} type The event type or array of event types.\n * @param {function(?): ?} listener The listener function.\n * @api\n */\n un(type, listener) {\n const key = /** @type {Object} */ (listener).ol_key;\n if (key) {\n unByKey(key);\n } else if (Array.isArray(type)) {\n for (let i = 0, ii = type.length; i < ii; ++i) {\n this.removeEventListener(type[i], listener);\n }\n } else {\n this.removeEventListener(type, listener);\n }\n }\n}\n\n/**\n * Removes an event listener using the key returned by `on()` or `once()`.\n * @param {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} key The key returned by `on()`\n * or `once()` (or an array of keys).\n * @api\n */\nexport function unByKey(key) {\n if (Array.isArray(key)) {\n for (let i = 0, ii = key.length; i < ii; ++i) {\n unlistenByKey(key[i]);\n }\n } else {\n unlistenByKey(/** @type {import(\"./events.js\").EventsKey} */ (key));\n }\n}\n\nexport default Observable;\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/**\n * @classdesc\n * Events emitted by {@link module:ol/Object~BaseObject} instances are instances of this type.\n */\nexport class ObjectEvent extends Event {\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 constructor(type, key, oldValue) {\n super(type);\n\n /**\n * The name of the property whose value is changing.\n * @type {string}\n * @api\n */\n this.key = key;\n\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 }\n}\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} 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 */\nclass BaseObject extends Observable {\n /**\n * @param {Object<string, *>=} opt_values An object with key-value pairs.\n */\n constructor(opt_values) {\n super();\n\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 /**\n * @private\n * @type {Object<string, *>}\n */\n this.values_ = null;\n\n if (opt_values !== undefined) {\n this.setProperties(opt_values);\n }\n }\n\n /**\n * Gets a value.\n * @param {string} key Key name.\n * @return {*} Value.\n * @api\n */\n get(key) {\n let value;\n if (this.values_ && this.values_.hasOwnProperty(key)) {\n value = this.values_[key];\n }\n return value;\n }\n\n /**\n * Get a list of object property names.\n * @return {Array<string>} List of property names.\n * @api\n */\n getKeys() {\n return (this.values_ && Object.keys(this.values_)) || [];\n }\n\n /**\n * Get an object of all property names and values.\n * @return {Object<string, *>} Object.\n * @api\n */\n getProperties() {\n return (this.values_ && assign({}, this.values_)) || {};\n }\n\n /**\n * @return {boolean} The object has properties.\n */\n hasProperties() {\n return !!this.values_;\n }\n\n /**\n * @param {string} key Key name.\n * @param {*} oldValue Old value.\n */\n notify(key, oldValue) {\n let eventType;\n eventType = getChangeEventType(key);\n this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n eventType = ObjectEventType.PROPERTYCHANGE;\n this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n }\n\n /**\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 set(key, value, opt_silent) {\n const values = this.values_ || (this.values_ = {});\n if (opt_silent) {\n values[key] = value;\n } else {\n const oldValue = values[key];\n values[key] = value;\n if (oldValue !== value) {\n this.notify(key, oldValue);\n }\n }\n }\n\n /**\n * Sets a collection of key-value pairs. Note that this changes any existing\n * properties and adds new ones (it does not remove any existing properties).\n * @param {Object<string, *>} values Values.\n * @param {boolean=} opt_silent Update without triggering an event.\n * @api\n */\n setProperties(values, opt_silent) {\n for (const key in values) {\n this.set(key, values[key], opt_silent);\n }\n }\n\n /**\n * Apply any properties from another object without triggering events.\n * @param {BaseObject} source The source object.\n * @protected\n */\n applyProperties(source) {\n if (!source.values_) {\n return;\n }\n assign(this.values_ || (this.values_ = {}), source.values_);\n }\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 unset(key, opt_silent) {\n if (this.values_ && key in this.values_) {\n const 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}\n\n/**\n * @type {Object<string, string>}\n */\nconst changeEventTypeCache = {};\n\n/**\n * @param {string} key Key name.\n * @return {string} Change name.\n */\nexport function getChangeEventType(key) {\n return changeEventTypeCache.hasOwnProperty(key)\n ? changeEventTypeCache[key]\n : (changeEventTypeCache[key] = 'change:' + key);\n}\n\nexport default BaseObject;\n","/**\n * @module ol/CollectionEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n /**\n * Triggered when an item is added to the collection.\n * @event module:ol/Collection.CollectionEvent#add\n * @api\n */\n ADD: 'add',\n /**\n * Triggered when an item is removed from the collection.\n * @event module:ol/Collection.CollectionEvent#remove\n * @api\n */\n REMOVE: 'remove',\n};\n","/**\n * @module ol/Collection\n */\nimport AssertionError from './AssertionError.js';\nimport BaseObject from './Object.js';\nimport CollectionEventType from './CollectionEventType.js';\nimport Event from './events/Event.js';\n\n/**\n * @enum {string}\n * @private\n */\nconst Property = {\n LENGTH: 'length',\n};\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Collection~Collection} instances are instances of this\n * type.\n */\nexport class CollectionEvent extends Event {\n /**\n * @param {import(\"./CollectionEventType.js\").default} type Type.\n * @param {*=} opt_element Element.\n * @param {number=} opt_index The index of the added or removed element.\n */\n constructor(type, opt_element, opt_index) {\n super(type);\n\n /**\n * The element that is added to or removed from the collection.\n * @type {*}\n * @api\n */\n this.element = opt_element;\n\n /**\n * The index of the added or removed element.\n * @type {number}\n * @api\n */\n this.index = opt_index;\n }\n}\n\n/**\n * @typedef {Object} Options\n * @property {boolean} [unique=false] Disallow the same item from being added to\n * the collection twice.\n */\n\n/**\n * @classdesc\n * An expanded version of standard JS Array, adding convenience methods for\n * manipulation. Add and remove changes to the Collection trigger a Collection\n * event. Note that this does not cover changes to the objects _within_ the\n * Collection; they trigger events on the appropriate object, not on the\n * Collection as a whole.\n *\n * @fires CollectionEvent\n *\n * @template T\n * @api\n */\nclass Collection extends BaseObject {\n /**\n * @param {Array<T>=} opt_array Array.\n * @param {Options=} opt_options Collection options.\n */\n constructor(opt_array, opt_options) {\n super();\n\n const options = opt_options || {};\n\n /**\n * @private\n * @type {boolean}\n */\n this.unique_ = !!options.unique;\n\n /**\n * @private\n * @type {!Array<T>}\n */\n this.array_ = opt_array ? opt_array : [];\n\n if (this.unique_) {\n for (let i = 0, ii = this.array_.length; i < ii; ++i) {\n this.assertUnique_(this.array_[i], i);\n }\n }\n\n this.updateLength_();\n }\n\n /**\n * Remove all elements from the collection.\n * @api\n */\n clear() {\n while (this.getLength() > 0) {\n this.pop();\n }\n }\n\n /**\n * Add elements to the collection. This pushes each item in the provided array\n * to the end of the collection.\n * @param {!Array<T>} arr Array.\n * @return {Collection<T>} This collection.\n * @api\n */\n extend(arr) {\n for (let i = 0, ii = arr.length; i < ii; ++i) {\n this.push(arr[i]);\n }\n return this;\n }\n\n /**\n * Iterate over each element, calling the provided callback.\n * @param {function(T, number, Array<T>): *} f The function to call\n * for every element. This function takes 3 arguments (the element, the\n * index and the array). The return value is ignored.\n * @api\n */\n forEach(f) {\n const array = this.array_;\n for (let i = 0, ii = array.length; i < ii; ++i) {\n f(array[i], i, array);\n }\n }\n\n /**\n * Get a reference to the underlying Array object. Warning: if the array\n * is mutated, no events will be dispatched by the collection, and the\n * collection's \"length\" property won't be in sync with the actual length\n * of the array.\n * @return {!Array<T>} Array.\n * @api\n */\n getArray() {\n return this.array_;\n }\n\n /**\n * Get the element at the provided index.\n * @param {number} index Index.\n * @return {T} Element.\n * @api\n */\n item(index) {\n return this.array_[index];\n }\n\n /**\n * Get the length of this collection.\n * @return {number} The length of the array.\n * @observable\n * @api\n */\n getLength() {\n return this.get(Property.LENGTH);\n }\n\n /**\n * Insert an element at the provided index.\n * @param {number} index Index.\n * @param {T} elem Element.\n * @api\n */\n insertAt(index, elem) {\n if (this.unique_) {\n this.assertUnique_(elem);\n }\n this.array_.splice(index, 0, elem);\n this.updateLength_();\n this.dispatchEvent(\n new CollectionEvent(CollectionEventType.ADD, elem, index)\n );\n }\n\n /**\n * Remove the last element of the collection and return it.\n * Return `undefined` if the collection is empty.\n * @return {T|undefined} Element.\n * @api\n */\n pop() {\n return this.removeAt(this.getLength() - 1);\n }\n\n /**\n * Insert the provided element at the end of the collection.\n * @param {T} elem Element.\n * @return {number} New length of the collection.\n * @api\n */\n push(elem) {\n if (this.unique_) {\n this.assertUnique_(elem);\n }\n const n = this.getLength();\n this.insertAt(n, elem);\n return this.getLength();\n }\n\n /**\n * Remove the first occurrence of an element from the collection.\n * @param {T} elem Element.\n * @return {T|undefined} The removed element or undefined if none found.\n * @api\n */\n remove(elem) {\n const arr = this.array_;\n for (let i = 0, ii = arr.length; i < ii; ++i) {\n if (arr[i] === elem) {\n return this.removeAt(i);\n }\n }\n return undefined;\n }\n\n /**\n * Remove the element at the provided index and return it.\n * Return `undefined` if the collection does not contain this index.\n * @param {number} index Index.\n * @return {T|undefined} Value.\n * @api\n */\n removeAt(index) {\n const prev = this.array_[index];\n this.array_.splice(index, 1);\n this.updateLength_();\n this.dispatchEvent(\n new CollectionEvent(CollectionEventType.REMOVE, prev, index)\n );\n return prev;\n }\n\n /**\n * Set the element at the provided index.\n * @param {number} index Index.\n * @param {T} elem Element.\n * @api\n */\n setAt(index, elem) {\n const n = this.getLength();\n if (index < n) {\n if (this.unique_) {\n this.assertUnique_(elem, index);\n }\n const prev = this.array_[index];\n this.array_[index] = elem;\n this.dispatchEvent(\n new CollectionEvent(CollectionEventType.REMOVE, prev, index)\n );\n this.dispatchEvent(\n new CollectionEvent(CollectionEventType.ADD, elem, index)\n );\n } else {\n for (let j = n; j < index; ++j) {\n this.insertAt(j, undefined);\n }\n this.insertAt(index, elem);\n }\n }\n\n /**\n * @private\n */\n updateLength_() {\n this.set(Property.LENGTH, this.array_.length);\n }\n\n /**\n * @private\n * @param {T} elem Element.\n * @param {number=} opt_except Optional index to ignore.\n */\n assertUnique_(elem, opt_except) {\n for (let i = 0, ii = this.array_.length; i < ii; ++i) {\n if (this.array_[i] === elem && i !== opt_except) {\n throw new AssertionError(58);\n }\n }\n }\n}\n\nexport default Collection;\n","/**\n * @module ol/asserts\n */\nimport AssertionError from './AssertionError.js';\n\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","/**\n * @module ol/Feature\n */\nimport BaseObject, {getChangeEventType} from './Object.js';\nimport EventType from './events/EventType.js';\nimport {assert} from './asserts.js';\nimport {listen, unlistenByKey} from './events.js';\n\n/**\n * @typedef {typeof Feature|typeof import(\"./render/Feature.js\").default} FeatureClass\n */\n\n/**\n * @typedef {Feature|import(\"./render/Feature.js\").default} FeatureLike\n */\n\n/**\n * @classdesc\n * A vector object for geographic features with a geometry and other\n * attribute properties, similar to the features in vector file formats like\n * GeoJSON.\n *\n * Features can be styled individually with `setStyle`; otherwise they use the\n * style of their vector layer.\n *\n * Note that attribute properties are set as {@link module:ol/Object} properties on\n * the feature object, so they are observable, and have get/set accessors.\n *\n * Typically, a feature has a single geometry property. You can set the\n * geometry using the `setGeometry` method and get it with `getGeometry`.\n * It is possible to store more than one geometry on a feature using attribute\n * properties. By default, the geometry used for rendering is identified by\n * the property name `geometry`. If you want to use another geometry property\n * for rendering, use the `setGeometryName` method to change the attribute\n * property associated with the geometry for the feature. For example:\n *\n * ```js\n *\n * import Feature from 'ol/Feature';\n * import Polygon from 'ol/geom/Polygon';\n * import Point from 'ol/geom/Point';\n *\n * var feature = new Feature({\n * geometry: new Polygon(polyCoords),\n * labelPoint: new Point(labelCoords),\n * name: 'My Polygon'\n * });\n *\n * // get the polygon geometry\n * var poly = feature.getGeometry();\n *\n * // Render the feature as a point using the coordinates from labelPoint\n * feature.setGeometryName('labelPoint');\n *\n * // get the point geometry\n * var point = feature.getGeometry();\n * ```\n *\n * @api\n * @template {import(\"./geom/Geometry.js\").default} Geometry\n */\nclass Feature extends BaseObject {\n /**\n * @param {Geometry|Object<string, *>=} opt_geometryOrProperties\n * You may pass a Geometry object directly, or an object literal containing\n * properties. If you pass an object literal, you may include a Geometry\n * associated with a `geometry` key.\n */\n constructor(opt_geometryOrProperties) {\n super();\n\n /**\n * @private\n * @type {number|string|undefined}\n */\n this.id_ = undefined;\n\n /**\n * @type {string}\n * @private\n */\n this.geometryName_ = 'geometry';\n\n /**\n * User provided style.\n * @private\n * @type {import(\"./style/Style.js\").StyleLike}\n */\n this.style_ = null;\n\n /**\n * @private\n * @type {import(\"./style/Style.js\").StyleFunction|undefined}\n */\n this.styleFunction_ = undefined;\n\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.geometryChangeKey_ = null;\n\n this.addEventListener(\n getChangeEventType(this.geometryName_),\n this.handleGeometryChanged_\n );\n\n if (opt_geometryOrProperties) {\n if (\n typeof (\n /** @type {?} */ (opt_geometryOrProperties).getSimplifiedGeometry\n ) === 'function'\n ) {\n const geometry = /** @type {Geometry} */ (opt_geometryOrProperties);\n this.setGeometry(geometry);\n } else {\n /** @type {Object<string, *>} */\n const properties = opt_geometryOrProperties;\n this.setProperties(properties);\n }\n }\n }\n\n /**\n * Clone this feature. If the original feature has a geometry it\n * is also cloned. The feature id is not set in the clone.\n * @return {Feature} The clone.\n * @api\n */\n clone() {\n const clone = new Feature(\n this.hasProperties() ? this.getProperties() : null\n );\n clone.setGeometryName(this.getGeometryName());\n const geometry = this.getGeometry();\n if (geometry) {\n clone.setGeometry(geometry.clone());\n }\n const style = this.getStyle();\n if (style) {\n clone.setStyle(style);\n }\n return clone;\n }\n\n /**\n * Get the feature's default geometry. A feature may have any number of named\n * geometries. The \"default\" geometry (the one that is rendered by default) is\n * set when calling {@link module:ol/Feature~Feature#setGeometry}.\n * @return {Geometry|undefined} The default geometry for the feature.\n * @api\n * @observable\n */\n getGeometry() {\n return /** @type {Geometry|undefined} */ (this.get(this.geometryName_));\n }\n\n /**\n * Get the feature identifier. This is a stable identifier for the feature and\n * is either set when reading data from a remote source or set explicitly by\n * calling {@link module:ol/Feature~Feature#setId}.\n * @return {number|string|undefined} Id.\n * @api\n */\n getId() {\n return this.id_;\n }\n\n /**\n * Get the name of the feature's default geometry. By default, the default\n * geometry is named `geometry`.\n * @return {string} Get the property name associated with the default geometry\n * for this feature.\n * @api\n */\n getGeometryName() {\n return this.geometryName_;\n }\n\n /**\n * Get the feature's style. Will return what was provided to the\n * {@link module:ol/Feature~Feature#setStyle} method.\n * @return {import(\"./style/Style.js\").StyleLike|undefined} The feature style.\n * @api\n */\n getStyle() {\n return this.style_;\n }\n\n /**\n * Get the feature's style function.\n * @return {import(\"./style/Style.js\").StyleFunction|undefined} Return a function\n * representing the current style of this feature.\n * @api\n */\n getStyleFunction() {\n return this.styleFunction_;\n }\n\n /**\n * @private\n */\n handleGeometryChange_() {\n this.changed();\n }\n\n /**\n * @private\n */\n handleGeometryChanged_() {\n if (this.geometryChangeKey_) {\n unlistenByKey(this.geometryChangeKey_);\n this.geometryChangeKey_ = null;\n }\n const geometry = this.getGeometry();\n if (geometry) {\n this.geometryChangeKey_ = listen(\n geometry,\n EventType.CHANGE,\n this.handleGeometryChange_,\n this\n );\n }\n this.changed();\n }\n\n /**\n * Set the default geometry for the feature. This will update the property\n * with the name returned by {@link module:ol/Feature~Feature#getGeometryName}.\n * @param {Geometry|undefined} geometry The new geometry.\n * @api\n * @observable\n */\n setGeometry(geometry) {\n this.set(this.geometryName_, geometry);\n }\n\n /**\n * Set the style for the feature to override the layer style. This can be a\n * single style object, an array of styles, or a function that takes a\n * resolution and returns an array of styles. To unset the feature style, call\n * `setStyle()` without arguments or a falsey value.\n * @param {import(\"./style/Style.js\").StyleLike=} opt_style Style for this feature.\n * @api\n * @fires module:ol/events/Event~BaseEvent#event:change\n */\n setStyle(opt_style) {\n this.style_ = opt_style;\n this.styleFunction_ = !opt_style\n ? undefined\n : createStyleFunction(opt_style);\n this.changed();\n }\n\n /**\n * Set the feature id. The feature id is considered stable and may be used when\n * requesting features or comparing identifiers returned from a remote source.\n * The feature id can be used with the\n * {@link module:ol/source/Vector~VectorSource#getFeatureById} method.\n * @param {number|string|undefined} id The feature id.\n * @api\n * @fires module:ol/events/Event~BaseEvent#event:change\n */\n setId(id) {\n this.id_ = id;\n this.changed();\n }\n\n /**\n * Set the property name to be used when getting the feature's default geometry.\n * When calling {@link module:ol/Feature~Feature#getGeometry}, the value of the property with\n * this name will be returned.\n * @param {string} name The property name of the default geometry.\n * @api\n */\n setGeometryName(name) {\n this.removeEventListener(\n getChangeEventType(this.geometryName_),\n this.handleGeometryChanged_\n );\n this.geometryName_ = name;\n this.addEventListener(\n getChangeEventType(this.geometryName_),\n this.handleGeometryChanged_\n );\n this.handleGeometryChanged_();\n }\n}\n\n/**\n * Convert the provided object into a feature style function. Functions passed\n * through unchanged. Arrays of Style or single style objects wrapped\n * in a new feature style function.\n * @param {!import(\"./style/Style.js\").StyleFunction|!Array<import(\"./style/Style.js\").default>|!import(\"./style/Style.js\").default} obj\n * A feature style function, a single style, or an array of styles.\n * @return {import(\"./style/Style.js\").StyleFunction} A style function.\n */\nexport function createStyleFunction(obj) {\n if (typeof obj === 'function') {\n return obj;\n } else {\n /**\n * @type {Array<import(\"./style/Style.js\").default>}\n */\n let styles;\n if (Array.isArray(obj)) {\n styles = obj;\n } else {\n assert(typeof (/** @type {?} */ (obj).getZIndex) === 'function', 41); // Expected an `import(\"./style/Style.js\").Style` or an array of `import(\"./style/Style.js\").Style`\n const style = /** @type {import(\"./style/Style.js\").default} */ (obj);\n styles = [style];\n }\n return function () {\n return styles;\n };\n }\n}\nexport default Feature;\n","/**\n * @module ol/geom/GeometryLayout\n */\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","/**\n * @module ol/geom/GeometryType\n */\n\n/**\n * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,\n * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,\n * `'GeometryCollection'`, `'Circle'`.\n * @enum {string}\n */\nexport default {\n POINT: 'Point',\n LINE_STRING: 'LineString',\n LINEAR_RING: 'LinearRing',\n POLYGON: 'Polygon',\n MULTI_POINT: 'MultiPoint',\n MULTI_LINE_STRING: 'MultiLineString',\n MULTI_POLYGON: 'MultiPolygon',\n GEOMETRY_COLLECTION: 'GeometryCollection',\n CIRCLE: 'Circle',\n};\n","/**\n * @module ol/proj/Units\n */\n\n/**\n * Projection units: `'degrees'`, `'ft'`, `'m'`, `'pixels'`, `'tile-pixels'` or\n * `'us-ft'`.\n * @enum {string}\n */\nconst Units = {\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/**\n * Meters per unit lookup table.\n * @const\n * @type {Object<Units, number>}\n * @api\n */\nexport const METERS_PER_UNIT = {};\n// use the radius of the Normal sphere\nMETERS_PER_UNIT[Units.DEGREES] = (2 * Math.PI * 6370997) / 360;\nMETERS_PER_UNIT[Units.FEET] = 0.3048;\nMETERS_PER_UNIT[Units.METERS] = 1;\nMETERS_PER_UNIT[Units.USFEET] = 1200 / 3937;\n\nexport default Units;\n","/**\n * @module ol/transform\n */\nimport {assert} from './asserts.js';\n\n/**\n * An array representing an affine 2d transformation for use with\n * {@link module:ol/transform} functions. The array has 6 elements.\n * @typedef {!Array<number>} Transform\n * @api\n */\n\n/**\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/**\n * @private\n * @type {Transform}\n */\nconst tmp_ = new Array(6);\n\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/**\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/**\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 const a1 = transform1[0];\n const b1 = transform1[1];\n const c1 = transform1[2];\n const d1 = transform1[3];\n const e1 = transform1[4];\n const f1 = transform1[5];\n const a2 = transform2[0];\n const b2 = transform2[1];\n const c2 = transform2[2];\n const d2 = transform2[3];\n const e2 = transform2[4];\n const f2 = transform2[5];\n\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\n return transform1;\n}\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/**\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/**\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 const x = coordinate[0];\n const 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/**\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 const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n return multiply(transform, set(tmp_, cos, sin, -sin, cos, 0, 0));\n}\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/**\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/**\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/**\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 const sin = Math.sin(angle);\n const 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/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative). The resulting transform\n * string can be applied as `transform` porperty of an HTMLElement's style.\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 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/**\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/**\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 const det = determinant(source);\n assert(det !== 0, 32); // Transformation matrix cannot be inverted\n\n const a = source[0];\n const b = source[1];\n const c = source[2];\n const d = source[3];\n const e = source[4];\n const f = source[5];\n\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\n return target;\n}\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/**\n * A string version of the transform. This can be used\n * for CSS transforms.\n * @param {!Transform} mat Matrix.\n * @return {string} The transform as a string.\n */\nexport function toString(mat) {\n return 'matrix(' + mat.join(', ') + ')';\n}\n","/**\n * @module ol/extent/Corner\n */\n\n/**\n * Extent corner.\n * @enum {string}\n */\nexport default {\n BOTTOM_LEFT: 'bottom-left',\n BOTTOM_RIGHT: 'bottom-right',\n TOP_LEFT: 'top-left',\n TOP_RIGHT: 'top-right',\n};\n","/**\n * @module ol/extent/Relationship\n */\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","/**\n * @module ol/extent\n */\nimport Corner from './extent/Corner.js';\nimport Relationship from './extent/Relationship.js';\nimport {assert} from './asserts.js';\n\n/**\n * An array of numbers representing an extent: `[minx, miny, maxx, maxy]`.\n * @typedef {Array<number>} Extent\n * @api\n */\n\n/**\n * Build an extent that includes all given coordinates.\n *\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @return {Extent} Bounding extent.\n * @api\n */\nexport function boundingExtent(coordinates) {\n const extent = createEmpty();\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n extendCoordinate(extent, coordinates[i]);\n }\n return extent;\n}\n\n/**\n * @param {Array<number>} xs Xs.\n * @param {Array<number>} ys Ys.\n * @param {Extent=} opt_extent Destination extent.\n * @private\n * @return {Extent} Extent.\n */\nfunction _boundingExtentXYs(xs, ys, opt_extent) {\n const minX = Math.min.apply(null, xs);\n const minY = Math.min.apply(null, ys);\n const maxX = Math.max.apply(null, xs);\n const maxY = Math.max.apply(null, ys);\n return createOrUpdate(minX, minY, maxX, maxY, opt_extent);\n}\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 } else {\n return [\n extent[0] - value,\n extent[1] - value,\n extent[2] + value,\n extent[3] + value,\n ];\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 } else {\n return extent.slice();\n }\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 let dx, dy;\n if (x < extent[0]) {\n dx = extent[0] - x;\n } else if (extent[2] < x) {\n dx = x - extent[2];\n } else {\n dx = 0;\n }\n if (y < extent[1]) {\n dy = extent[1] - y;\n } else if (extent[3] < y) {\n dy = y - extent[3];\n } else {\n dy = 0;\n }\n return dx * dx + dy * dy;\n}\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/**\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 (\n extent1[0] <= extent2[0] &&\n extent2[2] <= extent1[2] &&\n extent1[1] <= extent2[1] &&\n extent2[3] <= extent1[3]\n );\n}\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/**\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 const minX = extent[0];\n const minY = extent[1];\n const maxX = extent[2];\n const maxY = extent[3];\n const x = coordinate[0];\n const y = coordinate[1];\n let relationship = Relationship.UNKNOWN;\n if (x < minX) {\n relationship = relationship | Relationship.LEFT;\n } else if (x > maxX) {\n relationship = relationship | Relationship.RIGHT;\n }\n if (y < minY) {\n relationship = relationship | Relationship.BELOW;\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/**\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/**\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 } else {\n return [minX, minY, maxX, maxY];\n }\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/**\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 const x = coordinate[0];\n const y = coordinate[1];\n return createOrUpdate(x, y, x, y, opt_extent);\n}\n\n/**\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromCoordinates(coordinates, opt_extent) {\n const extent = createOrUpdateEmpty(opt_extent);\n return extendCoordinates(extent, coordinates);\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromFlatCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n opt_extent\n) {\n const extent = createOrUpdateEmpty(opt_extent);\n return extendFlatCoordinates(extent, flatCoordinates, offset, end, stride);\n}\n\n/**\n * @param {Array<Array<import(\"./coordinate.js\").Coordinate>>} rings Rings.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromRings(rings, opt_extent) {\n const extent = createOrUpdateEmpty(opt_extent);\n return extendRings(extent, rings);\n}\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 (\n extent1[0] == extent2[0] &&\n extent1[2] == extent2[2] &&\n extent1[1] == extent2[1] &&\n extent1[3] == extent2[3]\n );\n}\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 (\n 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\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/**\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/**\n * @param {Extent} extent Extent.\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @return {Extent} Extent.\n */\nexport function extendCoordinates(extent, coordinates) {\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n extendCoordinate(extent, coordinates[i]);\n }\n return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Extent} Extent.\n */\nexport function extendFlatCoordinates(\n extent,\n flatCoordinates,\n offset,\n end,\n stride\n) {\n for (; offset < end; offset += stride) {\n extendXY(extent, flatCoordinates[offset], flatCoordinates[offset + 1]);\n }\n return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array<Array<import(\"./coordinate.js\").Coordinate>>} rings Rings.\n * @return {Extent} Extent.\n */\nexport function extendRings(extent, rings) {\n for (let i = 0, ii = rings.length; i < ii; ++i) {\n extendCoordinates(extent, rings[i]);\n }\n return extent;\n}\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/**\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 let 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/**\n * Get the size of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Area.\n * @api\n */\nexport function getArea(extent) {\n let area = 0;\n if (!isEmpty(extent)) {\n area = getWidth(extent) * getHeight(extent);\n }\n return area;\n}\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/**\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/**\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/**\n * Get a corner coordinate of an extent.\n * @param {Extent} extent Extent.\n * @param {import(\"./extent/Corner.js\").default} corner Corner.\n * @return {import(\"./coordinate.js\").Coordinate} Corner coordinate.\n */\nexport function getCorner(extent, corner) {\n let coordinate;\n if (corner === Corner.BOTTOM_LEFT) {\n coordinate = getBottomLeft(extent);\n } else if (corner === Corner.BOTTOM_RIGHT) {\n coordinate = getBottomRight(extent);\n } else if (corner === Corner.TOP_LEFT) {\n coordinate = getTopLeft(extent);\n } else if (corner === Corner.TOP_RIGHT) {\n coordinate = getTopRight(extent);\n } else {\n assert(false, 13); // Invalid corner\n }\n return coordinate;\n}\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 const minX = Math.min(extent1[0], extent2[0]);\n const minY = Math.min(extent1[1], extent2[1]);\n const maxX = Math.max(extent1[2], extent2[2]);\n const maxY = Math.max(extent1[3], extent2[3]);\n return (maxX - minX) * (maxY - minY);\n}\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(\n center,\n resolution,\n rotation,\n size,\n opt_extent\n) {\n const dx = (resolution * size[0]) / 2;\n const dy = (resolution * size[1]) / 2;\n const cosRotation = Math.cos(rotation);\n const sinRotation = Math.sin(rotation);\n const xCos = dx * cosRotation;\n const xSin = dx * sinRotation;\n const yCos = dy * cosRotation;\n const ySin = dy * sinRotation;\n const x = center[0];\n const y = center[1];\n const x0 = x - xCos + ySin;\n const x1 = x - xCos - ySin;\n const x2 = x + xCos - ySin;\n const x3 = x + xCos + ySin;\n const y0 = y - xSin - yCos;\n const y1 = y - xSin + yCos;\n const y2 = y + xSin + yCos;\n const y3 = y + xSin - yCos;\n return createOrUpdate(\n Math.min(x0, x1, x2, x3),\n Math.min(y0, y1, y2, y3),\n Math.max(x0, x1, x2, x3),\n Math.max(y0, y1, y2, y3),\n opt_extent\n );\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/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Intersection area.\n */\nexport function getIntersectionArea(extent1, extent2) {\n const intersection = getIntersection(extent1, extent2);\n return getArea(intersection);\n}\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 const intersection = opt_extent ? opt_extent : createEmpty();\n if (intersects(extent1, extent2)) {\n if (extent1[0] > extent2[0]) {\n intersection[0] = extent1[0];\n } else {\n intersection[0] = extent2[0];\n }\n if (extent1[1] > extent2[1]) {\n intersection[1] = extent1[1];\n } else {\n intersection[1] = extent2[1];\n }\n if (extent1[2] < extent2[2]) {\n intersection[2] = extent1[2];\n } else {\n intersection[2] = extent2[2];\n }\n if (extent1[3] < extent2[3]) {\n intersection[3] = extent1[3];\n } else {\n intersection[3] = extent2[3];\n }\n } else {\n createOrUpdateEmpty(intersection);\n }\n return intersection;\n}\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/**\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/**\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/**\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/**\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/**\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 (\n extent1[0] <= extent2[2] &&\n extent1[2] >= extent2[0] &&\n extent1[1] <= extent2[3] &&\n extent1[3] >= extent2[1]\n );\n}\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/**\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 } else {\n return extent;\n }\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {number} value Value.\n */\nexport function scaleFromCenter(extent, value) {\n const deltaX = ((extent[2] - extent[0]) / 2) * (value - 1);\n const 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/**\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 let intersects = false;\n const startRel = coordinateRelationship(extent, start);\n const endRel = coordinateRelationship(extent, end);\n if (\n startRel === Relationship.INTERSECTING ||\n endRel === Relationship.INTERSECTING\n ) {\n intersects = true;\n } else {\n const minX = extent[0];\n const minY = extent[1];\n const maxX = extent[2];\n const maxY = extent[3];\n const startX = start[0];\n const startY = start[1];\n const endX = end[0];\n const endY = end[1];\n const slope = (endY - startY) / (endX - startX);\n let x, y;\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 (\n !intersects &&\n !!(endRel & Relationship.RIGHT) &&\n !(startRel & Relationship.RIGHT)\n ) {\n // potentially intersects right\n y = endY - (endX - maxX) * slope;\n intersects = y >= minY && y <= maxY;\n }\n if (\n !intersects &&\n !!(endRel & Relationship.BELOW) &&\n !(startRel & Relationship.BELOW)\n ) {\n // potentially intersects bottom\n x = endX - (endY - minY) / slope;\n intersects = x >= minX && x <= maxX;\n }\n if (\n !intersects &&\n !!(endRel & Relationship.LEFT) &&\n !(startRel & Relationship.LEFT)\n ) {\n // potentially intersects left\n y = endY - (endX - minX) * slope;\n intersects = y >= minY && y <= maxY;\n }\n }\n return intersects;\n}\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 let coordinates = [];\n if (opt_stops > 1) {\n const width = extent[2] - extent[0];\n const height = extent[3] - extent[1];\n for (let i = 0; i < opt_stops; ++i) {\n coordinates.push(\n extent[0] + (width * i) / opt_stops,\n extent[1],\n extent[2],\n extent[1] + (height * i) / opt_stops,\n extent[2] - (width * i) / opt_stops,\n extent[3],\n extent[0],\n 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 const xs = [];\n const ys = [];\n for (let 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/**\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 const projectionExtent = projection.getExtent();\n const center = getCenter(extent);\n if (\n projection.canWrapX() &&\n (center[0] < projectionExtent[0] || center[0] >= projectionExtent[2])\n ) {\n const worldWidth = getWidth(projectionExtent);\n const worldsAway = Math.floor(\n (center[0] - projectionExtent[0]) / worldWidth\n );\n const offset = worldsAway * worldWidth;\n extent[0] -= offset;\n extent[2] -= offset;\n }\n return extent;\n}\n","/**\n * @module ol/proj/Projection\n */\nimport {METERS_PER_UNIT} from './Units.js';\n\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 an `{import(\"../coordinate.js\").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} function will be used.\n */\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 */\nclass Projection {\n /**\n * @param {Options} options Projection options.\n */\n constructor(options) {\n /**\n * @private\n * @type {string}\n */\n this.code_ = options.code;\n\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 /**\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 /**\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 /**\n * @private\n * @type {string}\n */\n this.axisOrientation_ =\n options.axisOrientation !== undefined ? options.axisOrientation : 'enu';\n\n /**\n * @private\n * @type {boolean}\n */\n this.global_ = options.global !== undefined ? options.global : false;\n\n /**\n * @private\n * @type {boolean}\n */\n this.canWrapX_ = !!(this.global_ && this.extent_);\n\n /**\n * @private\n * @type {function(number, import(\"../coordinate.js\").Coordinate):number|undefined}\n */\n this.getPointResolutionFunc_ = options.getPointResolution;\n\n /**\n * @private\n * @type {import(\"../tilegrid/TileGrid.js\").default}\n */\n this.defaultTileGrid_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.metersPerUnit_ = options.metersPerUnit;\n }\n\n /**\n * @return {boolean} The projection is suitable for wrapping the x-axis\n */\n canWrapX() {\n return this.canWrapX_;\n }\n\n /**\n * Get the code for this projection, e.g. 'EPSG:4326'.\n * @return {string} Code.\n * @api\n */\n getCode() {\n return this.code_;\n }\n\n /**\n * Get the validity extent for this projection.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\n getExtent() {\n return this.extent_;\n }\n\n /**\n * Get the units of this projection.\n * @return {import(\"./Units.js\").default} Units.\n * @api\n */\n getUnits() {\n return this.units_;\n }\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 getMetersPerUnit() {\n return this.metersPerUnit_ || METERS_PER_UNIT[this.units_];\n }\n\n /**\n * Get the world extent for this projection.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\n getWorldExtent() {\n return this.worldExtent_;\n }\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 getAxisOrientation() {\n return this.axisOrientation_;\n }\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 isGlobal() {\n return this.global_;\n }\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 setGlobal(global) {\n this.global_ = global;\n this.canWrapX_ = !!(global && this.extent_);\n }\n\n /**\n * @return {import(\"../tilegrid/TileGrid.js\").default} The default tile grid.\n */\n getDefaultTileGrid() {\n return this.defaultTileGrid_;\n }\n\n /**\n * @param {import(\"../tilegrid/TileGrid.js\").default} tileGrid The default tile grid.\n */\n setDefaultTileGrid(tileGrid) {\n this.defaultTileGrid_ = tileGrid;\n }\n\n /**\n * Set the validity extent for this projection.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @api\n */\n setExtent(extent) {\n this.extent_ = extent;\n this.canWrapX_ = !!(this.global_ && extent);\n }\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 setWorldExtent(worldExtent) {\n this.worldExtent_ = worldExtent;\n }\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 setGetPointResolution(func) {\n this.getPointResolutionFunc_ = func;\n }\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 getPointResolutionFunc() {\n return this.getPointResolutionFunc_;\n }\n}\n\nexport default Projection;\n","/**\n * @module ol/math\n */\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/**\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 const cosh = (function () {\n // Wrapped in a iife, to save the overhead of checking for the native\n // implementation on every invocation.\n let cosh;\n if ('cosh' in Math) {\n // The environment supports the native Math.cosh function, use it…\n cosh = Math.cosh;\n } else {\n // … else, use the reference implementation of MDN:\n cosh = function (x) {\n const y = /** @type {Math} */ (Math).exp(x);\n return (y + 1 / y) / 2;\n };\n }\n return cosh;\n})();\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 const log2 = (function () {\n // Wrapped in a iife, to save the overhead of checking for the native\n // implementation on every invocation.\n let log2;\n if ('log2' in Math) {\n // The environment supports the native Math.log2 function, use it…\n log2 = Math.log2;\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/**\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 const dx = x2 - x1;\n const dy = y2 - y1;\n if (dx !== 0 || dy !== 0) {\n const t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n if (t > 1) {\n x1 = x2;\n y1 = y2;\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/**\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 const dx = x2 - x1;\n const dy = y2 - y1;\n return dx * dx + dy * dy;\n}\n\n/**\n * Solves system of linear equations using Gaussian elimination method.\n *\n * @param {Array<Array<number>>} mat Augmented matrix (n x n + 1 column)\n * in row-major order.\n * @return {Array<number>} The resulting vector.\n */\nexport function solveLinearSystem(mat) {\n const n = mat.length;\n\n for (let i = 0; i < n; i++) {\n // Find max in the i-th column (ignoring i - 1 first rows)\n let maxRow = i;\n let maxEl = Math.abs(mat[i][i]);\n for (let r = i + 1; r < n; r++) {\n const absValue = Math.abs(mat[r][i]);\n if (absValue > maxEl) {\n maxEl = absValue;\n maxRow = r;\n }\n }\n\n if (maxEl === 0) {\n return null; // matrix is singular\n }\n\n // Swap max row with i-th (current) row\n const tmp = mat[maxRow];\n mat[maxRow] = mat[i];\n mat[i] = tmp;\n\n // Subtract the i-th row to make all the remaining rows 0 in the i-th column\n for (let j = i + 1; j < n; j++) {\n const coef = -mat[j][i] / mat[i][i];\n for (let k = i; k < n + 1; k++) {\n if (i == k) {\n mat[j][k] = 0;\n } else {\n mat[j][k] += coef * mat[i][k];\n }\n }\n }\n }\n\n // Solve Ax=b for upper triangular matrix A (mat)\n const x = new Array(n);\n for (let l = n - 1; l >= 0; l--) {\n x[l] = mat[l][n] / mat[l][l];\n for (let m = l - 1; m >= 0; m--) {\n mat[m][n] -= mat[m][l] * x[l];\n }\n }\n return x;\n}\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/**\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/**\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 const r = a % b;\n return r * b < 0 ? r + b : r;\n}\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 * @module ol/proj/epsg3857\n */\nimport Projection from './Projection.js';\nimport Units from './Units.js';\nimport {cosh} from '../math.js';\n\n/**\n * Radius of WGS84 sphere\n *\n * @const\n * @type {number}\n */\nexport const RADIUS = 6378137;\n\n/**\n * @const\n * @type {number}\n */\nexport const HALF_SIZE = Math.PI * RADIUS;\n\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport const EXTENT = [-HALF_SIZE, -HALF_SIZE, HALF_SIZE, HALF_SIZE];\n\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport const WORLD_EXTENT = [-180, -85, 180, 85];\n\n/**\n * Maximum safe value in y direction\n * @const\n * @type {number}\n */\nexport const MAX_SAFE_Y = RADIUS * Math.log(Math.tan(Math.PI / 2));\n\n/**\n * @classdesc\n * Projection object for web/spherical Mercator (EPSG:3857).\n */\nclass EPSG3857Projection extends Projection {\n /**\n * @param {string} code Code.\n */\n constructor(code) {\n super({\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 });\n }\n}\n\n/**\n * Projections equal to EPSG:3857.\n *\n * @const\n * @type {Array<import(\"./Projection.js\").default>}\n */\nexport const 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/gml/srs/epsg.xml#3857'),\n];\n\n/**\n * Transformation from EPSG:4326 to EPSG:3857.\n *\n * @param {Array<number>} input Input array of coordinate values.\n * @param {Array<number>=} opt_output Output array of coordinate values.\n * @param {number=} opt_dimension Dimension (default is `2`).\n * @return {Array<number>} Output array of coordinate values.\n */\nexport function fromEPSG4326(input, opt_output, opt_dimension) {\n const length = input.length;\n const dimension = opt_dimension > 1 ? opt_dimension : 2;\n let output = opt_output;\n if (output === undefined) {\n if (dimension > 2) {\n // preserve values beyond second dimension\n output = input.slice();\n } else {\n output = new Array(length);\n }\n }\n for (let i = 0; i < length; i += dimension) {\n output[i] = (HALF_SIZE * input[i]) / 180;\n let 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 } else if (y < -MAX_SAFE_Y) {\n y = -MAX_SAFE_Y;\n }\n output[i + 1] = y;\n }\n return output;\n}\n\n/**\n * Transformation from EPSG:3857 to EPSG:4326.\n *\n * @param {Array<number>} input Input array of coordinate values.\n * @param {Array<number>=} opt_output Output array of coordinate values.\n * @param {number=} opt_dimension Dimension (default is `2`).\n * @return {Array<number>} Output array of coordinate values.\n */\nexport function toEPSG4326(input, opt_output, opt_dimension) {\n const length = input.length;\n const dimension = opt_dimension > 1 ? opt_dimension : 2;\n let output = opt_output;\n if (output === undefined) {\n if (dimension > 2) {\n // preserve values beyond second dimension\n output = input.slice();\n } else {\n output = new Array(length);\n }\n }\n for (let 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","/**\n * @module ol/proj/epsg4326\n */\nimport Projection from './Projection.js';\nimport Units from './Units.js';\n\n/**\n * Semi-major radius of the WGS84 ellipsoid.\n *\n * @const\n * @type {number}\n */\nexport const RADIUS = 6378137;\n\n/**\n * Extent of the EPSG:4326 projection which is the whole world.\n *\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport const EXTENT = [-180, -90, 180, 90];\n\n/**\n * @const\n * @type {number}\n */\nexport const METERS_PER_UNIT = (Math.PI * RADIUS) / 180;\n\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 */\nclass EPSG4326Projection extends Projection {\n /**\n * @param {string} code Code.\n * @param {string=} opt_axisOrientation Axis orientation.\n */\n constructor(code, opt_axisOrientation) {\n super({\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 });\n }\n}\n\n/**\n * Projections equal to EPSG:4326.\n *\n * @const\n * @type {Array<import(\"./Projection.js\").default>}\n */\nexport const 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/gml/srs/epsg.xml#4326', 'neu'),\n];\n","/**\n * @module ol/proj/projections\n */\n\n/**\n * @type {Object<string, import(\"./Projection.js\").default>}\n */\nlet cache = {};\n\n/**\n * Clear the projections cache.\n */\nexport function clear() {\n cache = {};\n}\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 (\n cache[code] ||\n cache[code.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\\w+)$/, 'EPSG:$3')] ||\n null\n );\n}\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","/**\n * @module ol/proj/transforms\n */\nimport {isEmpty} from '../obj.js';\n\n/**\n * @private\n * @type {!Object<string, Object<string, import(\"../proj.js\").TransformFunction>>}\n */\nlet transforms = {};\n\n/**\n * Clear the transform cache.\n */\nexport function clear() {\n transforms = {};\n}\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 const sourceCode = source.getCode();\n const destinationCode = destination.getCode();\n if (!(sourceCode in transforms)) {\n transforms[sourceCode] = {};\n }\n transforms[sourceCode][destinationCode] = transformFn;\n}\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 const sourceCode = source.getCode();\n const destinationCode = destination.getCode();\n const 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/**\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 let transform;\n if (sourceCode in transforms && destinationCode in transforms[sourceCode]) {\n transform = transforms[sourceCode][destinationCode];\n }\n return transform;\n}\n","/**\n * @module ol/sphere\n */\nimport GeometryType from './geom/GeometryType.js';\nimport {toDegrees, toRadians} from './math.js';\n\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/**\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 const DEFAULT_RADIUS = 6371008.8;\n\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 const radius = opt_radius || DEFAULT_RADIUS;\n const lat1 = toRadians(c1[1]);\n const lat2 = toRadians(c2[1]);\n const deltaLatBy2 = (lat2 - lat1) / 2;\n const deltaLonBy2 = toRadians(c2[0] - c1[0]) / 2;\n const a =\n 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/**\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 let length = 0;\n for (let 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/**\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 const options = opt_options || {};\n const radius = options.radius || DEFAULT_RADIUS;\n const projection = options.projection || 'EPSG:3857';\n const type = geometry.getType();\n if (type !== GeometryType.GEOMETRY_COLLECTION) {\n geometry = geometry.clone().transform(projection, 'EPSG:4326');\n }\n let length = 0;\n let coordinates, coords, i, ii, j, jj;\n switch (type) {\n case GeometryType.POINT:\n case GeometryType.MULTI_POINT: {\n break;\n }\n case GeometryType.LINE_STRING:\n case GeometryType.LINEAR_RING: {\n coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n length = getLengthInternal(coordinates, radius);\n break;\n }\n case GeometryType.MULTI_LINE_STRING:\n case GeometryType.POLYGON: {\n coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n for (i = 0, ii = coordinates.length; i < ii; ++i) {\n length += getLengthInternal(coordinates[i], radius);\n }\n break;\n }\n case GeometryType.MULTI_POLYGON: {\n coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n for (i = 0, ii = coordinates.length; i < ii; ++i) {\n coords = coordinates[i];\n for (j = 0, jj = coords.length; j < jj; ++j) {\n length += getLengthInternal(coords[j], radius);\n }\n }\n break;\n }\n case GeometryType.GEOMETRY_COLLECTION: {\n const geometries = /** @type {import(\"./geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n for (i = 0, ii = geometries.length; i < ii; ++i) {\n length += getLength(geometries[i], opt_options);\n }\n break;\n }\n default: {\n throw new Error('Unsupported geometry type: ' + type);\n }\n }\n return length;\n}\n\n/**\n * Returns the spherical area for a list of coordinates.\n *\n * [Reference](https://trs-new.jpl.nasa.gov/handle/2014/40409)\n * Robert. G. Chamberlain and William H. Duquette, \"Some Algorithms for\n * Polygons on a Sphere\", JPL Publication 07-03, Jet Propulsion\n * Laboratory, Pasadena, CA, June 2007\n *\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates List of coordinates of a linear\n * ring. If the ring is oriented clockwise, the area will be positive,\n * otherwise it will be negative.\n * @param {number} radius The sphere radius.\n * @return {number} Area (in square meters).\n */\nfunction getAreaInternal(coordinates, radius) {\n let area = 0;\n const len = coordinates.length;\n let x1 = coordinates[len - 1][0];\n let y1 = coordinates[len - 1][1];\n for (let i = 0; i < len; i++) {\n const x2 = coordinates[i][0];\n const 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/**\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 const options = opt_options || {};\n const radius = options.radius || DEFAULT_RADIUS;\n const projection = options.projection || 'EPSG:3857';\n const type = geometry.getType();\n if (type !== GeometryType.GEOMETRY_COLLECTION) {\n geometry = geometry.clone().transform(projection, 'EPSG:4326');\n }\n let area = 0;\n let coordinates, coords, i, ii, j, jj;\n switch (type) {\n case GeometryType.POINT:\n case GeometryType.MULTI_POINT:\n case GeometryType.LINE_STRING:\n case GeometryType.MULTI_LINE_STRING:\n case GeometryType.LINEAR_RING: {\n break;\n }\n case GeometryType.POLYGON: {\n coordinates = /** @type {import(\"./geom/Polygon.js\").default} */ (geometry).getCoordinates();\n area = Math.abs(getAreaInternal(coordinates[0], radius));\n for (i = 1, ii = coordinates.length; i < ii; ++i) {\n area -= Math.abs(getAreaInternal(coordinates[i], radius));\n }\n break;\n }\n case GeometryType.MULTI_POLYGON: {\n coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n for (i = 0, ii = coordinates.length; i < ii; ++i) {\n coords = coordinates[i];\n area += Math.abs(getAreaInternal(coords[0], radius));\n for (j = 1, jj = coords.length; j < jj; ++j) {\n area -= Math.abs(getAreaInternal(coords[j], radius));\n }\n }\n break;\n }\n case GeometryType.GEOMETRY_COLLECTION: {\n const geometries = /** @type {import(\"./geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n for (i = 0, ii = geometries.length; i < ii; ++i) {\n area += getArea(geometries[i], opt_options);\n }\n break;\n }\n default: {\n throw new Error('Unsupported geometry type: ' + type);\n }\n }\n return area;\n}\n\n/**\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 const radius = opt_radius || DEFAULT_RADIUS;\n const lat1 = toRadians(c1[1]);\n const lon1 = toRadians(c1[0]);\n const dByR = distance / radius;\n const lat = Math.asin(\n Math.sin(lat1) * Math.cos(dByR) +\n Math.cos(lat1) * Math.sin(dByR) * Math.cos(bearing)\n );\n const lon =\n lon1 +\n Math.atan2(\n Math.sin(bearing) * Math.sin(dByR) * Math.cos(lat1),\n Math.cos(dByR) - Math.sin(lat1) * Math.sin(lat)\n );\n return [toDegrees(lon), toDegrees(lat)];\n}\n","/**\n * @module ol/string\n */\n\n/**\n * @param {number} number Number to be formatted\n * @param {number} width The desired width\n * @param {number=} opt_precision Precision of the output string (i.e. number of decimal places)\n * @returns {string} Formatted string\n */\nexport function padNumber(number, width, opt_precision) {\n const numberString =\n opt_precision !== undefined ? number.toFixed(opt_precision) : '' + number;\n let decimal = numberString.indexOf('.');\n decimal = decimal === -1 ? numberString.length : decimal;\n return decimal > width\n ? numberString\n : new Array(1 + width - decimal).join('0') + numberString;\n}\n\n/**\n * Adapted from https://github.com/omichelsen/compare-versions/blob/master/index.js\n * @param {string|number} v1 First version\n * @param {string|number} v2 Second version\n * @returns {number} Value\n */\nexport function compareVersions(v1, v2) {\n const s1 = ('' + v1).split('.');\n const s2 = ('' + v2).split('.');\n\n for (let i = 0; i < Math.max(s1.length, s2.length); i++) {\n const n1 = parseInt(s1[i] || '0', 10);\n const n2 = parseInt(s2[i] || '0', 10);\n\n if (n1 > n2) {\n return 1;\n }\n if (n2 > n1) {\n return -1;\n }\n }\n\n return 0;\n}\n","/**\n * @module ol/coordinate\n */\nimport {getWidth} from './extent.js';\nimport {modulo} from './math.js';\nimport {padNumber} from './string.js';\n\n/**\n * An array of numbers representing an xy coordinate. Example: `[16, 48]`.\n * @typedef {Array<number>} Coordinate\n * @api\n */\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/**\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/**\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 const r = circle.getRadius();\n const center = circle.getCenter();\n const x0 = center[0];\n const y0 = center[1];\n const x1 = coordinate[0];\n const y1 = coordinate[1];\n\n let dx = x1 - x0;\n const dy = y1 - y0;\n if (dx === 0 && dy === 0) {\n dx = 1;\n }\n const d = Math.sqrt(dx * dx + dy * dy);\n\n const x = x0 + (r * dx) / d;\n const y = y0 + (r * dy) / d;\n\n return [x, y];\n}\n\n/**\n * Calculates the point closest to the passed coordinate on the passed segment.\n * This is the foot of the perpendicular of the coordinate to the segment when\n * the foot is on the segment, or the closest segment coordinate when the foot\n * is outside the segment.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {Array<Coordinate>} segment The two coordinates\n * of the segment.\n * @return {Coordinate} The foot of the perpendicular of\n * the coordinate to the segment.\n */\nexport function closestOnSegment(coordinate, segment) {\n const x0 = coordinate[0];\n const y0 = coordinate[1];\n const start = segment[0];\n const end = segment[1];\n const x1 = start[0];\n const y1 = start[1];\n const x2 = end[0];\n const y2 = end[1];\n const dx = x2 - x1;\n const dy = y2 - y1;\n const along =\n dx === 0 && dy === 0\n ? 0\n : (dx * (x0 - x1) + dy * (y0 - y1)) / (dx * dx + dy * dy || 0);\n let x, y;\n if (along <= 0) {\n x = x1;\n y = y1;\n } else if (along >= 1) {\n x = x2;\n y = y2;\n } else {\n x = x1 + along * dx;\n y = y1 + along * dy;\n }\n return [x, y];\n}\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\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 const normalizedDegrees = modulo(degrees + 180, 360) - 180;\n const x = Math.abs(3600 * normalizedDegrees);\n const dflPrecision = opt_fractionDigits || 0;\n const precision = Math.pow(10, dflPrecision);\n\n let deg = Math.floor(x / 3600);\n let min = Math.floor((x - deg * 3600) / 60);\n let sec = x - deg * 3600 - min * 60;\n sec = Math.ceil(sec * precision) / precision;\n\n if (sec >= 60) {\n sec = 0;\n min += 1;\n }\n\n if (min >= 60) {\n min = 0;\n deg += 1;\n }\n\n return (\n 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\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 } else {\n return '';\n }\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 let equals = true;\n for (let 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/**\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 const cosAngle = Math.cos(angle);\n const sinAngle = Math.sin(angle);\n const x = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n const y = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n coordinate[0] = x;\n coordinate[1] = y;\n return coordinate;\n}\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/**\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 const dx = coord1[0] - coord2[0];\n const dy = coord1[1] - coord2[1];\n return dx * dx + dy * dy;\n}\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/**\n * Calculate the squared distance from a coordinate to a line segment.\n *\n * @param {Coordinate} coordinate Coordinate of the point.\n * @param {Array<Coordinate>} segment Line segment (2\n * coordinates).\n * @return {number} Squared distance from the point to the line segment.\n */\nexport function squaredDistanceToSegment(coordinate, segment) {\n return squaredDistance(coordinate, closestOnSegment(coordinate, segment));\n}\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 (\n degreesToStringHDMS('NS', coordinate[1], opt_fractionDigits) +\n ' ' +\n degreesToStringHDMS('EW', coordinate[0], opt_fractionDigits)\n );\n } else {\n return '';\n }\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/**\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 const worldWidth = getWidth(projection.getExtent());\n const 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 const projectionExtent = projection.getExtent();\n let worldsAway = 0;\n if (\n projection.canWrapX() &&\n (coordinate[0] < projectionExtent[0] || coordinate[0] > projectionExtent[2])\n ) {\n const sourceExtentWidth =\n opt_sourceExtentWidth || getWidth(projectionExtent);\n worldsAway = Math.floor(\n (coordinate[0] - projectionExtent[0]) / sourceExtentWidth\n );\n }\n return worldsAway;\n}\n","/**\n * @module ol/proj\n */\n\n/**\n * The ol/proj module stores:\n * * a list of {@link module:ol/proj/Projection}\n * objects, one for each projection supported by the application\n * * a list of transform functions needed to convert coordinates in one projection\n * into another.\n *\n * The static functions are the methods used to maintain these.\n * Each transform function can handle not only simple coordinate pairs, but also\n * large arrays of coordinates such as vector geometries.\n *\n * When loaded, the library adds projection objects for EPSG:4326 (WGS84\n * geographic coordinates) and EPSG:3857 (Web or Spherical Mercator, as used\n * for example by Bing Maps or OpenStreetMap), together with the relevant\n * transform functions.\n *\n * Additional transforms may be added by using the http://proj4js.org/\n * library (version 2.2 or later). You can use the full build supplied by\n * Proj4js, or create a custom build to support those projections you need; see\n * the Proj4js website for how to do this. You also need the Proj4js definitions\n * for the required projections. These definitions can be obtained from\n * https://epsg.io/, and are a JS function, so can be loaded in a script\n * tag (as in the examples) or pasted into your application.\n *\n * After all required projection definitions are added to proj4's registry (by\n * using `proj4.defs()`), simply call `register(proj4)` from the `ol/proj/proj4`\n * package. Existing transforms are not changed by this function. See\n * examples/wms-image-custom-proj for an example of this.\n *\n * Additional projection definitions can be registered with `proj4.defs()` any\n * time. Just make sure to call `register(proj4)` again; for example, with user-supplied data where you don't\n * know in advance what projections are needed, you can initially load minimal\n * support and then load whichever are requested.\n *\n * Note that Proj4js does not support projection extents. If you want to add\n * one for creating default tile grids, you can add it after the Projection\n * object has been created with `setExtent`, for example,\n * `get('EPSG:1234').setExtent(extent)`.\n *\n * In addition to Proj4js support, any transform functions can be added with\n * {@link module:ol/proj~addCoordinateTransforms}. To use this, you must first create\n * a {@link module:ol/proj/Projection} object for the new projection and add it with\n * {@link module:ol/proj~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} 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 {\n PROJECTIONS as EPSG3857_PROJECTIONS,\n fromEPSG4326,\n toEPSG4326,\n} from './proj/epsg3857.js';\nimport {PROJECTIONS as EPSG4326_PROJECTIONS} from './proj/epsg4326.js';\nimport {\n add as addProj,\n clear as clearProj,\n get as getProj,\n} from './proj/projections.js';\nimport {\n add as addTransformFunc,\n clear as clearTransformFuncs,\n get as getTransformFunc,\n} from './proj/transforms.js';\nimport {applyTransform, getWidth} from './extent.js';\nimport {clamp, modulo} from './math.js';\nimport {getDistance} from './sphere.js';\nimport {getWorldsAway} from './coordinate.js';\n\n/**\n * A projection as {@link module:ol/proj/Projection}, SRS identifier\n * string or undefined.\n * @typedef {Projection|string|undefined} ProjectionLike\n * @api\n */\n\n/**\n * A transform function accepts an array of input coordinate values, an optional\n * output array, and an optional dimension (default should be 2). The function\n * transforms the input coordinate values, populates the output array, and\n * returns the output array.\n *\n * @typedef {function(Array<number>, Array<number>=, number=): Array<number>} TransformFunction\n * @api\n */\n\nexport {METERS_PER_UNIT};\n\nexport {Projection};\n\n/**\n * @param {Array<number>} input Input coordinate array.\n * @param {Array<number>=} opt_output Output array of coordinate values.\n * @param {number=} opt_dimension Dimension.\n * @return {Array<number>} Output coordinate array (new array, same coordinate\n * values).\n */\nexport function cloneTransform(input, opt_output, opt_dimension) {\n let output;\n if (opt_output !== undefined) {\n for (let i = 0, ii = input.length; i < ii; ++i) {\n opt_output[i] = input[i];\n }\n output = opt_output;\n } else {\n output = input.slice();\n }\n return output;\n}\n\n/**\n * @param {Array<number>} input Input coordinate array.\n * @param {Array<number>=} opt_output Output array of coordinate values.\n * @param {number=} opt_dimension Dimension.\n * @return {Array<number>} Input coordinate array (same array as input).\n */\nexport function identityTransform(input, opt_output, opt_dimension) {\n if (opt_output !== undefined && input !== opt_output) {\n for (let 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/**\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/**\n * @param {Array<Projection>} projections Projections.\n */\nexport function addProjections(projections) {\n projections.forEach(addProjection);\n}\n\n/**\n * Fetches a Projection object for the code specified.\n *\n * @param {ProjectionLike} projectionLike Either a code string which is\n * a combination of authority and identifier such as \"EPSG:4326\", or an\n * existing projection object, or undefined.\n * @return {Projection} Projection object, or null if not in list.\n * @api\n */\nexport function get(projectionLike) {\n return typeof projectionLike === 'string'\n ? getProj(/** @type {string} */ (projectionLike))\n : /** @type {Projection} */ (projectionLike) || null;\n}\n\n/**\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 let pointResolution;\n const getter = projection.getPointResolutionFunc();\n if (getter) {\n pointResolution = getter(resolution, point);\n if (opt_units && opt_units !== projection.getUnits()) {\n const metersPerUnit = projection.getMetersPerUnit();\n if (metersPerUnit) {\n pointResolution =\n (pointResolution * metersPerUnit) / METERS_PER_UNIT[opt_units];\n }\n }\n } else {\n const units = projection.getUnits();\n if ((units == Units.DEGREES && !opt_units) || opt_units == Units.DEGREES) {\n pointResolution = resolution;\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 const toEPSG4326 = getTransformFromProjections(\n projection,\n get('EPSG:4326')\n );\n if (toEPSG4326 === identityTransform && units !== Units.DEGREES) {\n // no transform is available\n pointResolution = resolution * projection.getMetersPerUnit();\n } else {\n let 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(vertices, vertices, 2);\n const width = getDistance(vertices.slice(0, 2), vertices.slice(2, 4));\n const height = getDistance(vertices.slice(4, 6), vertices.slice(6, 8));\n pointResolution = (width + height) / 2;\n }\n const 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/**\n * Registers transformation functions that don't alter coordinates. Those allow\n * to transform between projections with equal meaning.\n *\n * @param {Array<Projection>} projections Projections.\n * @api\n */\nexport function addEquivalentProjections(projections) {\n addProjections(projections);\n projections.forEach(function (source) {\n projections.forEach(function (destination) {\n if (source !== destination) {\n addTransformFunc(source, destination, cloneTransform);\n }\n });\n });\n}\n\n/**\n * Registers transformation functions to convert coordinates in any projection\n * in projection1 to any projection in projection2.\n *\n * @param {Array<Projection>} projections1 Projections with equal\n * meaning.\n * @param {Array<Projection>} projections2 Projections with 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(\n projections1,\n projections2,\n forwardTransform,\n inverseTransform\n) {\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/**\n * Clear all cached projections and transforms.\n */\nexport function clearAllProjections() {\n clearProj();\n clearTransformFuncs();\n}\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 } else if (typeof projection === 'string') {\n return get(projection);\n } else {\n return /** @type {Projection} */ (projection);\n }\n}\n\n/**\n * Creates a {@link module:ol/proj~TransformFunction} from a simple 2D coordinate transform\n * function.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} coordTransform Coordinate\n * transform.\n * @return {TransformFunction} Transform function.\n */\nexport function createTransformFromCoordinateTransform(coordTransform) {\n return (\n /**\n * @param {Array<number>} input Input.\n * @param {Array<number>=} opt_output Output.\n * @param {number=} opt_dimension Dimension.\n * @return {Array<number>} Output.\n */\n function (input, opt_output, opt_dimension) {\n const length = input.length;\n const dimension = opt_dimension !== undefined ? opt_dimension : 2;\n const output = opt_output !== undefined ? opt_output : new Array(length);\n for (let i = 0; i < length; i += dimension) {\n const point = coordTransform([input[i], input[i + 1]]);\n output[i] = point[0];\n output[i + 1] = point[1];\n for (let j = dimension - 1; j >= 2; --j) {\n output[i + j] = input[i + j];\n }\n }\n return output;\n }\n );\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}.\n * @api\n */\nexport function addCoordinateTransforms(source, destination, forward, inverse) {\n const sourceProj = get(source);\n const destProj = get(destination);\n addTransformFunc(\n sourceProj,\n destProj,\n createTransformFromCoordinateTransform(forward)\n );\n addTransformFunc(\n destProj,\n sourceProj,\n createTransformFromCoordinateTransform(inverse)\n );\n}\n\n/**\n * Transforms a coordinate from longitude/latitude to a different projection.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate as longitude and latitude, i.e.\n * an array with longitude as 1st and latitude as 2nd element.\n * @param {ProjectionLike=} opt_projection Target projection. The\n * default is Web Mercator, i.e. 'EPSG:3857'.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate projected to the target projection.\n * @api\n */\nexport function fromLonLat(coordinate, opt_projection) {\n return transform(\n coordinate,\n 'EPSG:4326',\n opt_projection !== undefined ? opt_projection : 'EPSG:3857'\n );\n}\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 const lonLat = transform(\n coordinate,\n opt_projection !== undefined ? opt_projection : 'EPSG:3857',\n 'EPSG:4326'\n );\n const lon = lonLat[0];\n if (lon < -180 || lon > 180) {\n lonLat[0] = modulo(lon + 180, 360) - 180;\n }\n return lonLat;\n}\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 const equalUnits = projection1.getUnits() === projection2.getUnits();\n if (projection1.getCode() === projection2.getCode()) {\n return equalUnits;\n } else {\n const transformFunc = getTransformFromProjections(projection1, projection2);\n return transformFunc === cloneTransform && equalUnits;\n }\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(\n sourceProjection,\n destinationProjection\n) {\n const sourceCode = sourceProjection.getCode();\n const destinationCode = destinationProjection.getCode();\n let transformFunc = getTransformFunc(sourceCode, destinationCode);\n if (!transformFunc) {\n transformFunc = identityTransform;\n }\n return transformFunc;\n}\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 const sourceProjection = get(source);\n const destinationProjection = get(destination);\n return getTransformFromProjections(sourceProjection, destinationProjection);\n}\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 const transformFunc = getTransform(source, destination);\n return transformFunc(coordinate, undefined, coordinate.length);\n}\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 const transformFunc = getTransform(source, destination);\n return applyTransform(extent, transformFunc, undefined, opt_stops);\n}\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(\n point,\n sourceProjection,\n destinationProjection\n) {\n const transformFunc = getTransformFromProjections(\n sourceProjection,\n destinationProjection\n );\n return transformFunc(point);\n}\n\n/**\n * @type {?Projection}\n */\nlet userProjection = null;\n\n/**\n * Set the projection for coordinates supplied from and returned by API methods.\n * Note that this method is not yet a part of the stable API. Support for user\n * projections is not yet complete and should be considered experimental.\n * @param {ProjectionLike} projection The user projection.\n */\nexport function setUserProjection(projection) {\n userProjection = get(projection);\n}\n\n/**\n * Clear the user projection if set. Note that this method is not yet a part of\n * the stable API. Support for user projections is not yet complete and should\n * be considered experimental.\n */\nexport function clearUserProjection() {\n userProjection = null;\n}\n\n/**\n * Get the projection for coordinates supplied from and returned by API methods.\n * Note that this method is not yet a part of the stable API. Support for user\n * projections is not yet complete and should be considered experimental.\n * @returns {?Projection} The user projection (or null if not set).\n */\nexport function getUserProjection() {\n return userProjection;\n}\n\n/**\n * Use geographic coordinates (WGS-84 datum) in API methods. Note that this\n * method is not yet a part of the stable API. Support for user projections is\n * not yet complete and should be considered experimental.\n */\nexport function useGeographic() {\n setUserProjection('EPSG:4326');\n}\n\n/**\n * Return a coordinate transformed into the user projection. If no user projection\n * is set, the original coordinate is returned.\n * @param {Array<number>} coordinate Input coordinate.\n * @param {ProjectionLike} sourceProjection The input coordinate projection.\n * @returns {Array<number>} The input coordinate in the user projection.\n */\nexport function toUserCoordinate(coordinate, sourceProjection) {\n if (!userProjection) {\n return coordinate;\n }\n return transform(coordinate, sourceProjection, userProjection);\n}\n\n/**\n * Return a coordinate transformed from the user projection. If no user projection\n * is set, the original coordinate is returned.\n * @param {Array<number>} coordinate Input coordinate.\n * @param {ProjectionLike} destProjection The destination projection.\n * @returns {Array<number>} The input coordinate transformed.\n */\nexport function fromUserCoordinate(coordinate, destProjection) {\n if (!userProjection) {\n return coordinate;\n }\n return transform(coordinate, userProjection, destProjection);\n}\n\n/**\n * Return an extent transformed into the user projection. If no user projection\n * is set, the original extent is returned.\n * @param {import(\"./extent.js\").Extent} extent Input extent.\n * @param {ProjectionLike} sourceProjection The input extent projection.\n * @returns {import(\"./extent.js\").Extent} The input extent in the user projection.\n */\nexport function toUserExtent(extent, sourceProjection) {\n if (!userProjection) {\n return extent;\n }\n return transformExtent(extent, sourceProjection, userProjection);\n}\n\n/**\n * Return an extent transformed from the user projection. If no user projection\n * is set, the original extent is returned.\n * @param {import(\"./extent.js\").Extent} extent Input extent.\n * @param {ProjectionLike} destProjection The destination projection.\n * @returns {import(\"./extent.js\").Extent} The input extent transformed.\n */\nexport function fromUserExtent(extent, destProjection) {\n if (!userProjection) {\n return extent;\n }\n return transformExtent(extent, userProjection, destProjection);\n}\n\n/**\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 let sourceX = coord[0];\n let sourceY = coord[1];\n let transformed, worldsAway;\n if (sourceProj.canWrapX()) {\n const sourceExtent = sourceProj.getExtent();\n const sourceExtentWidth = getWidth(sourceExtent);\n worldsAway = getWorldsAway(coord, sourceProj, sourceExtentWidth);\n if (worldsAway) {\n // Move x to the real world\n sourceX = sourceX - worldsAway * sourceExtentWidth;\n }\n sourceX = clamp(sourceX, sourceExtent[0], sourceExtent[2]);\n sourceY = clamp(sourceY, sourceExtent[1], sourceExtent[3]);\n transformed = transform([sourceX, sourceY]);\n } 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/**\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(\n EPSG4326_PROJECTIONS,\n EPSG3857_PROJECTIONS,\n fromEPSG4326,\n toEPSG4326\n );\n}\n\naddCommon();\n","/**\n * @module ol/geom/flat/transform\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function transform2D(\n flatCoordinates,\n offset,\n end,\n stride,\n transform,\n opt_dest\n) {\n const dest = opt_dest ? opt_dest : [];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n const x = flatCoordinates[j];\n const 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/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} angle Angle.\n * @param {Array<number>} anchor Rotation anchor point.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function rotate(\n flatCoordinates,\n offset,\n end,\n stride,\n angle,\n anchor,\n opt_dest\n) {\n const dest = opt_dest ? opt_dest : [];\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n const anchorX = anchor[0];\n const anchorY = anchor[1];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n const deltaX = flatCoordinates[j] - anchorX;\n const deltaY = flatCoordinates[j + 1] - anchorY;\n dest[i++] = anchorX + deltaX * cos - deltaY * sin;\n dest[i++] = anchorY + deltaX * sin + deltaY * cos;\n for (let 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/**\n * Scale the coordinates.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} sx Scale factor in the x-direction.\n * @param {number} sy Scale factor in the y-direction.\n * @param {Array<number>} anchor Scale anchor point.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function scale(\n flatCoordinates,\n offset,\n end,\n stride,\n sx,\n sy,\n anchor,\n opt_dest\n) {\n const dest = opt_dest ? opt_dest : [];\n const anchorX = anchor[0];\n const anchorY = anchor[1];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n const deltaX = flatCoordinates[j] - anchorX;\n const deltaY = flatCoordinates[j + 1] - anchorY;\n dest[i++] = anchorX + sx * deltaX;\n dest[i++] = anchorY + sy * deltaY;\n for (let 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/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function translate(\n flatCoordinates,\n offset,\n end,\n stride,\n deltaX,\n deltaY,\n opt_dest\n) {\n const dest = opt_dest ? opt_dest : [];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n dest[i++] = flatCoordinates[j] + deltaX;\n dest[i++] = flatCoordinates[j + 1] + deltaY;\n for (let 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 * @module ol/geom/Geometry\n */\nimport BaseObject from '../Object.js';\nimport Units from '../proj/Units.js';\nimport {abstract} from '../util.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n} from '../transform.js';\nimport {\n createEmpty,\n createOrUpdateEmpty,\n getHeight,\n returnOrUpdate,\n} from '../extent.js';\nimport {get as getProjection, getTransform} from '../proj.js';\nimport {memoizeOne} from '../functions.js';\nimport {transform2D} from './flat/transform.js';\n\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nconst tmpTransform = createTransform();\n\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 */\nclass Geometry extends BaseObject {\n constructor() {\n super();\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.extent_ = createEmpty();\n\n /**\n * @private\n * @type {number}\n */\n this.extentRevision_ = -1;\n\n /**\n * @protected\n * @type {number}\n */\n this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n\n /**\n * @protected\n * @type {number}\n */\n this.simplifiedGeometryRevision = 0;\n\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 (\n revision,\n squaredTolerance,\n opt_transform\n ) {\n if (!opt_transform) {\n return this.getSimplifiedGeometry(squaredTolerance);\n }\n const clone = this.clone();\n clone.applyTransform(opt_transform);\n return clone.getSimplifiedGeometry(squaredTolerance);\n });\n }\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 simplifyTransformed(squaredTolerance, opt_transform) {\n return this.simplifyTransformedInternal(\n this.getRevision(),\n squaredTolerance,\n opt_transform\n );\n }\n\n /**\n * Make a complete copy of the geometry.\n * @abstract\n * @return {!Geometry} Clone.\n */\n clone() {\n return abstract();\n }\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 closestPointXY(x, y, closestPoint, minSquaredDistance) {\n return abstract();\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\n containsXY(x, y) {\n const coord = this.getClosestPoint([x, y]);\n return coord[0] === x && coord[1] === y;\n }\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 getClosestPoint(point, opt_closestPoint) {\n const closestPoint = opt_closestPoint ? opt_closestPoint : [NaN, NaN];\n this.closestPointXY(point[0], point[1], closestPoint, Infinity);\n return closestPoint;\n }\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 intersectsCoordinate(coordinate) {\n return this.containsXY(coordinate[0], coordinate[1]);\n }\n\n /**\n * @abstract\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n */\n computeExtent(extent) {\n return abstract();\n }\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 getExtent(opt_extent) {\n if (this.extentRevision_ != this.getRevision()) {\n const 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 /**\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 rotate(angle, anchor) {\n abstract();\n }\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 scale(sx, opt_sy, opt_anchor) {\n abstract();\n }\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 simplify(tolerance) {\n return this.getSimplifiedGeometry(tolerance * tolerance);\n }\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 getSimplifiedGeometry(squaredTolerance) {\n return abstract();\n }\n\n /**\n * Get the type of this geometry.\n * @abstract\n * @return {import(\"./GeometryType.js\").default} Geometry type.\n */\n getType() {\n return abstract();\n }\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 applyTransform(transformFn) {\n abstract();\n }\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 intersectsExtent(extent) {\n return abstract();\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 * @abstract\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @api\n */\n translate(deltaX, deltaY) {\n abstract();\n }\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 transform(source, destination) {\n /** @type {import(\"../proj/Projection.js\").default} */\n const sourceProj = getProjection(source);\n const transformFn =\n sourceProj.getUnits() == Units.TILE_PIXELS\n ? function (inCoordinates, outCoordinates, stride) {\n const pixelExtent = sourceProj.getExtent();\n const projectedExtent = sourceProj.getWorldExtent();\n const scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n composeTransform(\n tmpTransform,\n projectedExtent[0],\n projectedExtent[3],\n scale,\n -scale,\n 0,\n 0,\n 0\n );\n transform2D(\n inCoordinates,\n 0,\n inCoordinates.length,\n stride,\n tmpTransform,\n outCoordinates\n );\n return getTransform(sourceProj, destination)(\n inCoordinates,\n outCoordinates,\n stride\n );\n }\n : getTransform(sourceProj, destination);\n this.applyTransform(transformFn);\n return this;\n }\n}\n\nexport default Geometry;\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/**\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 */\nclass SimpleGeometry extends Geometry {\n constructor() {\n super();\n\n /**\n * @protected\n * @type {import(\"./GeometryLayout.js\").default}\n */\n this.layout = GeometryLayout.XY;\n\n /**\n * @protected\n * @type {number}\n */\n this.stride = 2;\n\n /**\n * @protected\n * @type {Array<number>}\n */\n this.flatCoordinates = null;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n */\n computeExtent(extent) {\n return createOrUpdateFromFlatCoordinates(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n extent\n );\n }\n\n /**\n * @abstract\n * @return {Array<*>} Coordinates.\n */\n getCoordinates() {\n return abstract();\n }\n\n /**\n * Return the first coordinate of the geometry.\n * @return {import(\"../coordinate.js\").Coordinate} First coordinate.\n * @api\n */\n getFirstCoordinate() {\n return this.flatCoordinates.slice(0, this.stride);\n }\n\n /**\n * @return {Array<number>} Flat coordinates.\n */\n getFlatCoordinates() {\n return this.flatCoordinates;\n }\n\n /**\n * Return the last coordinate of the geometry.\n * @return {import(\"../coordinate.js\").Coordinate} Last point.\n * @api\n */\n getLastCoordinate() {\n return this.flatCoordinates.slice(\n this.flatCoordinates.length - this.stride\n );\n }\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 getLayout() {\n return this.layout;\n }\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 getSimplifiedGeometry(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 (\n squaredTolerance < 0 ||\n (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n squaredTolerance <= this.simplifiedGeometryMaxMinSquaredTolerance)\n ) {\n return this;\n }\n\n const simplifiedGeometry = this.getSimplifiedGeometryInternal(\n squaredTolerance\n );\n const simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates();\n if (simplifiedFlatCoordinates.length < this.flatCoordinates.length) {\n return simplifiedGeometry;\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 /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {SimpleGeometry} Simplified geometry.\n * @protected\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n return this;\n }\n\n /**\n * @return {number} Stride.\n */\n getStride() {\n return this.stride;\n }\n\n /**\n * @param {import(\"./GeometryLayout.js\").default} layout Layout.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n */\n setFlatCoordinates(layout, flatCoordinates) {\n this.stride = getStrideForLayout(layout);\n this.layout = layout;\n this.flatCoordinates = flatCoordinates;\n }\n\n /**\n * @abstract\n * @param {!Array<*>} coordinates Coordinates.\n * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n */\n setCoordinates(coordinates, opt_layout) {\n abstract();\n }\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 setLayout(layout, coordinates, nesting) {\n /** @type {number} */\n let stride;\n if (layout) {\n stride = getStrideForLayout(layout);\n } else {\n for (let i = 0; i < nesting; ++i) {\n if (coordinates.length === 0) {\n this.layout = GeometryLayout.XY;\n this.stride = 2;\n return;\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 /**\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 applyTransform(transformFn) {\n if (this.flatCoordinates) {\n transformFn(this.flatCoordinates, this.flatCoordinates, this.stride);\n this.changed();\n }\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 rotate(angle, anchor) {\n const flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n const stride = this.getStride();\n rotate(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n angle,\n anchor,\n flatCoordinates\n );\n this.changed();\n }\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 scale(sx, opt_sy, opt_anchor) {\n let sy = opt_sy;\n if (sy === undefined) {\n sy = sx;\n }\n let anchor = opt_anchor;\n if (!anchor) {\n anchor = getCenter(this.getExtent());\n }\n const flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n const stride = this.getStride();\n scale(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n sx,\n sy,\n anchor,\n flatCoordinates\n );\n this.changed();\n }\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 translate(deltaX, deltaY) {\n const flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n const stride = this.getStride();\n translate(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n deltaX,\n deltaY,\n flatCoordinates\n );\n this.changed();\n }\n }\n}\n\n/**\n * @param {number} stride Stride.\n * @return {import(\"./GeometryLayout.js\").default} layout Layout.\n */\nfunction getLayoutForStride(stride) {\n let layout;\n if (stride == 2) {\n layout = GeometryLayout.XY;\n } else if (stride == 3) {\n layout = GeometryLayout.XYZ;\n } else if (stride == 4) {\n layout = GeometryLayout.XYZM;\n }\n return /** @type {import(\"./GeometryLayout.js\").default} */ (layout);\n}\n\n/**\n * @param {import(\"./GeometryLayout.js\").default} layout Layout.\n * @return {number} Stride.\n */\nexport function getStrideForLayout(layout) {\n let stride;\n if (layout == GeometryLayout.XY) {\n stride = 2;\n } else if (layout == GeometryLayout.XYZ || layout == GeometryLayout.XYM) {\n stride = 3;\n } else if (layout == GeometryLayout.XYZM) {\n stride = 4;\n }\n return /** @type {number} */ (stride);\n}\n\n/**\n * @param {SimpleGeometry} simpleGeometry Simple geometry.\n * @param {import(\"../transform.js\").Transform} transform Transform.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed flat coordinates.\n */\nexport function transformGeom2D(simpleGeometry, transform, opt_dest) {\n const flatCoordinates = simpleGeometry.getFlatCoordinates();\n if (!flatCoordinates) {\n return null;\n } else {\n const stride = simpleGeometry.getStride();\n return transform2D(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n transform,\n opt_dest\n );\n }\n}\n\nexport default SimpleGeometry;\n","/**\n * @module ol/geom/flat/closest\n */\nimport {lerp, squaredDistance as squaredDx} from '../../math.js';\n\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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset1 Offset 1.\n * @param {number} offset2 Offset 2.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n */\nfunction assignClosest(\n flatCoordinates,\n offset1,\n offset2,\n stride,\n x,\n y,\n closestPoint\n) {\n const x1 = flatCoordinates[offset1];\n const y1 = flatCoordinates[offset1 + 1];\n const dx = flatCoordinates[offset2] - x1;\n const dy = flatCoordinates[offset2 + 1] - y1;\n let offset;\n if (dx === 0 && dy === 0) {\n offset = offset1;\n } else {\n const t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n if (t > 1) {\n offset = offset2;\n } else if (t > 0) {\n for (let i = 0; i < stride; ++i) {\n closestPoint[i] = lerp(\n flatCoordinates[offset1 + i],\n flatCoordinates[offset2 + i],\n t\n );\n }\n closestPoint.length = stride;\n return;\n } else {\n offset = offset1;\n }\n }\n for (let i = 0; i < stride; ++i) {\n closestPoint[i] = flatCoordinates[offset + i];\n }\n closestPoint.length = stride;\n}\n\n/**\n * Return the squared of the largest distance between any pair of consecutive\n * coordinates.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function maxSquaredDelta(flatCoordinates, offset, end, stride, max) {\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n for (offset += stride; offset < end; offset += stride) {\n const x2 = flatCoordinates[offset];\n const y2 = flatCoordinates[offset + 1];\n const 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/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function arrayMaxSquaredDelta(\n flatCoordinates,\n offset,\n ends,\n stride,\n max\n) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n max = maxSquaredDelta(flatCoordinates, offset, end, stride, max);\n offset = end;\n }\n return max;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function multiArrayMaxSquaredDelta(\n flatCoordinates,\n offset,\n endss,\n stride,\n max\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n max = arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max);\n offset = ends[ends.length - 1];\n }\n return max;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>=} opt_tmpPoint Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestPoint(\n flatCoordinates,\n offset,\n end,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n opt_tmpPoint\n) {\n if (offset == end) {\n return minSquaredDistance;\n }\n let i, squaredDistance;\n if (maxDelta === 0) {\n // All points are identical, so just test the first point.\n squaredDistance = squaredDx(\n x,\n y,\n flatCoordinates[offset],\n flatCoordinates[offset + 1]\n );\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 } else {\n return minSquaredDistance;\n }\n }\n const tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n let index = offset + stride;\n while (index < end) {\n assignClosest(\n flatCoordinates,\n index - stride,\n index,\n stride,\n x,\n y,\n tmpPoint\n );\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 } 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(\n ((Math.sqrt(squaredDistance) - Math.sqrt(minSquaredDistance)) /\n maxDelta) |\n 0,\n 1\n );\n }\n }\n if (isRing) {\n // Check the closing segment.\n assignClosest(\n flatCoordinates,\n end - stride,\n offset,\n stride,\n x,\n y,\n tmpPoint\n );\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/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>=} opt_tmpPoint Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestArrayPoint(\n flatCoordinates,\n offset,\n ends,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n opt_tmpPoint\n) {\n const tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n minSquaredDistance = assignClosestPoint(\n flatCoordinates,\n offset,\n end,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint\n );\n offset = end;\n }\n return minSquaredDistance;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>=} opt_tmpPoint Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestMultiArrayPoint(\n flatCoordinates,\n offset,\n endss,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n opt_tmpPoint\n) {\n const tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n minSquaredDistance = assignClosestArrayPoint(\n flatCoordinates,\n offset,\n ends,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint\n );\n offset = ends[ends.length - 1];\n }\n return minSquaredDistance;\n}\n","/**\n * @module ol/geom/flat/deflate\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinate(flatCoordinates, offset, coordinate, stride) {\n for (let i = 0, ii = coordinate.length; i < ii; ++i) {\n flatCoordinates[offset++] = coordinate[i];\n }\n return offset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<import(\"../../coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinates(\n flatCoordinates,\n offset,\n coordinates,\n stride\n) {\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n const coordinate = coordinates[i];\n for (let j = 0; j < stride; ++j) {\n flatCoordinates[offset++] = coordinate[j];\n }\n }\n return offset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<import(\"../../coordinate.js\").Coordinate>>} coordinatess Coordinatess.\n * @param {number} stride Stride.\n * @param {Array<number>=} opt_ends Ends.\n * @return {Array<number>} Ends.\n */\nexport function deflateCoordinatesArray(\n flatCoordinates,\n offset,\n coordinatess,\n stride,\n opt_ends\n) {\n const ends = opt_ends ? opt_ends : [];\n let i = 0;\n for (let j = 0, jj = coordinatess.length; j < jj; ++j) {\n const end = deflateCoordinates(\n flatCoordinates,\n offset,\n coordinatess[j],\n stride\n );\n ends[i++] = end;\n offset = end;\n }\n ends.length = i;\n return ends;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>} coordinatesss Coordinatesss.\n * @param {number} stride Stride.\n * @param {Array<Array<number>>=} opt_endss Endss.\n * @return {Array<Array<number>>} Endss.\n */\nexport function deflateMultiCoordinatesArray(\n flatCoordinates,\n offset,\n coordinatesss,\n stride,\n opt_endss\n) {\n const endss = opt_endss ? opt_endss : [];\n let i = 0;\n for (let j = 0, jj = coordinatesss.length; j < jj; ++j) {\n const ends = deflateCoordinatesArray(\n flatCoordinates,\n offset,\n coordinatesss[j],\n stride,\n endss[i]\n );\n endss[i++] = ends;\n offset = ends[ends.length - 1];\n }\n endss.length = i;\n return endss;\n}\n","/**\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.\n\nimport {squaredDistance, squaredSegmentDistance} from '../../math.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {boolean} highQuality Highest quality.\n * @param {Array<number>=} opt_simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @return {Array<number>} Simplified line string.\n */\nexport function simplifyLineString(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n highQuality,\n opt_simplifiedFlatCoordinates\n) {\n const simplifiedFlatCoordinates =\n opt_simplifiedFlatCoordinates !== undefined\n ? opt_simplifiedFlatCoordinates\n : [];\n if (!highQuality) {\n end = radialDistance(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0\n );\n flatCoordinates = simplifiedFlatCoordinates;\n offset = 0;\n stride = 2;\n }\n simplifiedFlatCoordinates.length = douglasPeucker(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0\n );\n return simplifiedFlatCoordinates;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function douglasPeucker(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset\n) {\n const n = (end - offset) / stride;\n if (n < 3) {\n for (; offset < end; offset += stride) {\n simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + 1];\n }\n return simplifiedOffset;\n }\n /** @type {Array<number>} */\n const markers = new Array(n);\n markers[0] = 1;\n markers[n - 1] = 1;\n /** @type {Array<number>} */\n const stack = [offset, end - stride];\n let index = 0;\n while (stack.length > 0) {\n const last = stack.pop();\n const first = stack.pop();\n let maxSquaredDistance = 0;\n const x1 = flatCoordinates[first];\n const y1 = flatCoordinates[first + 1];\n const x2 = flatCoordinates[last];\n const y2 = flatCoordinates[last + 1];\n for (let i = first + stride; i < last; i += stride) {\n const x = flatCoordinates[i];\n const y = flatCoordinates[i + 1];\n const squaredDistance = squaredSegmentDistance(x, y, x1, y1, x2, y2);\n if (squaredDistance > maxSquaredDistance) {\n index = i;\n maxSquaredDistance = squaredDistance;\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 (let 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/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<number>} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEnds\n) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n simplifiedOffset = douglasPeucker(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset\n );\n simplifiedEnds.push(simplifiedOffset);\n offset = end;\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<Array<number>>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerMultiArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEndss\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n const simplifiedEnds = [];\n simplifiedOffset = douglasPeuckerArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEnds\n );\n simplifiedEndss.push(simplifiedEnds);\n offset = ends[ends.length - 1];\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function radialDistance(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset\n) {\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 let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n // copy first point\n simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n let x2 = x1;\n let 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/**\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/**\n * Simplifies a line string using an algorithm designed by Tim Schaub.\n * Coordinates are snapped to the nearest value in a virtual grid and\n * consecutive duplicate coordinates are discarded. This effectively preserves\n * topology as the simplification of any subsection of a line string is\n * independent of the rest of the line string. This means that, for examples,\n * the common edge between two polygons will be simplified to the same line\n * string independently in both polygons. This implementation uses a single\n * pass over the coordinates and eliminates intermediate collinear points.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function quantize(\n flatCoordinates,\n offset,\n end,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset\n) {\n // do nothing if the line is empty\n if (offset == end) {\n return simplifiedOffset;\n }\n // snap the first coordinate (P1)\n let x1 = snap(flatCoordinates[offset], tolerance);\n let 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 let 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 const x3 = snap(flatCoordinates[offset], tolerance);\n const 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 const dx1 = x2 - x1;\n const dy1 = y2 - y1;\n // calculate the delta between P3 and P1\n const dx2 = x3 - x1;\n const 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 (\n 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 ) {\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/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<number>} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function quantizeArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEnds\n) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n simplifiedOffset = quantize(\n flatCoordinates,\n offset,\n end,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset\n );\n simplifiedEnds.push(simplifiedOffset);\n offset = end;\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<Array<number>>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function quantizeMultiArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEndss\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n const simplifiedEnds = [];\n simplifiedOffset = quantizeArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEnds\n );\n simplifiedEndss.push(simplifiedEnds);\n offset = ends[ends.length - 1];\n }\n return simplifiedOffset;\n}\n","/**\n * @module ol/geom/flat/inflate\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Array<import(\"../../coordinate.js\").Coordinate>=} opt_coordinates Coordinates.\n * @return {Array<import(\"../../coordinate.js\").Coordinate>} Coordinates.\n */\nexport function inflateCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n opt_coordinates\n) {\n const coordinates = opt_coordinates !== undefined ? opt_coordinates : [];\n let i = 0;\n for (let 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/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Array<Array<import(\"../../coordinate.js\").Coordinate>>=} opt_coordinatess Coordinatess.\n * @return {Array<Array<import(\"../../coordinate.js\").Coordinate>>} Coordinatess.\n */\nexport function inflateCoordinatesArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n opt_coordinatess\n) {\n const coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : [];\n let i = 0;\n for (let j = 0, jj = ends.length; j < jj; ++j) {\n const end = ends[j];\n coordinatess[i++] = inflateCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n coordinatess[i]\n );\n offset = end;\n }\n coordinatess.length = i;\n return coordinatess;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>=} opt_coordinatesss\n * Coordinatesss.\n * @return {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>} Coordinatesss.\n */\nexport function inflateMultiCoordinatesArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n opt_coordinatesss\n) {\n const coordinatesss =\n opt_coordinatesss !== undefined ? opt_coordinatesss : [];\n let i = 0;\n for (let j = 0, jj = endss.length; j < jj; ++j) {\n const ends = endss[j];\n coordinatesss[i++] = inflateCoordinatesArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n coordinatesss[i]\n );\n offset = ends[ends.length - 1];\n }\n coordinatesss.length = i;\n return coordinatesss;\n}\n","/**\n * @module ol/geom/flat/area\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRing(flatCoordinates, offset, end, stride) {\n let twiceArea = 0;\n let x1 = flatCoordinates[end - stride];\n let y1 = flatCoordinates[end - stride + 1];\n for (; offset < end; offset += stride) {\n const x2 = flatCoordinates[offset];\n const y2 = flatCoordinates[offset + 1];\n twiceArea += y1 * x2 - x1 * y2;\n x1 = x2;\n y1 = y2;\n }\n return twiceArea / 2;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRings(flatCoordinates, offset, ends, stride) {\n let area = 0;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n area += linearRing(flatCoordinates, offset, end, stride);\n offset = end;\n }\n return area;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n let area = 0;\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n area += linearRings(flatCoordinates, offset, ends, stride);\n offset = ends[ends.length - 1];\n }\n return area;\n}\n","/**\n * @module ol/geom/LinearRing\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {assignClosestPoint, maxSquaredDelta} from './flat/closest.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport {deflateCoordinates} from './flat/deflate.js';\nimport {douglasPeucker} from './flat/simplify.js';\nimport {inflateCoordinates} from './flat/inflate.js';\nimport {linearRing as linearRingArea} from './flat/area.js';\n\n/**\n * @classdesc\n * Linear ring geometry. Only used as part of polygon; cannot be rendered\n * on its own.\n *\n * @api\n */\nclass LinearRing extends SimpleGeometry {\n /**\n * @param {Array<import(\"../coordinate.js\").Coordinate>|Array<number>} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `opt_layout` are also accepted.\n * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n */\n constructor(coordinates, opt_layout) {\n super();\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n if (opt_layout !== undefined && !Array.isArray(coordinates[0])) {\n this.setFlatCoordinates(\n opt_layout,\n /** @type {Array<number>} */ (coordinates)\n );\n } else {\n this.setCoordinates(\n /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates),\n opt_layout\n );\n }\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!LinearRing} Clone.\n * @api\n */\n clone() {\n return new LinearRing(this.flatCoordinates.slice(), this.layout);\n }\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 closestPointXY(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(\n maxSquaredDelta(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n 0\n )\n );\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestPoint(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n this.maxDelta_,\n true,\n x,\n y,\n closestPoint,\n minSquaredDistance\n );\n }\n\n /**\n * Return the area of the linear ring on projected plane.\n * @return {number} Area (on projected plane).\n * @api\n */\n getArea() {\n return linearRingArea(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride\n );\n }\n\n /**\n * Return the coordinates of the linear ring.\n * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n * @api\n */\n getCoordinates() {\n return inflateCoordinates(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride\n );\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {LinearRing} Simplified LinearRing.\n * @protected\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n const simplifiedFlatCoordinates = [];\n simplifiedFlatCoordinates.length = douglasPeucker(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0\n );\n return new LinearRing(simplifiedFlatCoordinates, GeometryLayout.XY);\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./GeometryType.js\").default} Geometry type.\n * @api\n */\n getType() {\n return GeometryType.LINEAR_RING;\n }\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 intersectsExtent(extent) {\n return false;\n }\n\n /**\n * Set the coordinates of the linear ring.\n * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n * @api\n */\n setCoordinates(coordinates, opt_layout) {\n this.setLayout(opt_layout, coordinates, 1);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = deflateCoordinates(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride\n );\n this.changed();\n }\n}\n\nexport default LinearRing;\n","/**\n * @module ol/geom/Point\n */\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {containsXY, createOrUpdateFromCoordinate} from '../extent.js';\nimport {deflateCoordinate} from './flat/deflate.js';\nimport {squaredDistance as squaredDx} from '../math.js';\n\n/**\n * @classdesc\n * Point geometry.\n *\n * @api\n */\nclass Point extends SimpleGeometry {\n /**\n * @param {import(\"../coordinate.js\").Coordinate} coordinates Coordinates.\n * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n */\n constructor(coordinates, opt_layout) {\n super();\n this.setCoordinates(coordinates, opt_layout);\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!Point} Clone.\n * @api\n */\n clone() {\n const point = new Point(this.flatCoordinates.slice(), this.layout);\n point.applyProperties(this);\n return point;\n }\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 closestPointXY(x, y, closestPoint, minSquaredDistance) {\n const flatCoordinates = this.flatCoordinates;\n const squaredDistance = squaredDx(\n x,\n y,\n flatCoordinates[0],\n flatCoordinates[1]\n );\n if (squaredDistance < minSquaredDistance) {\n const stride = this.stride;\n for (let i = 0; i < stride; ++i) {\n closestPoint[i] = flatCoordinates[i];\n }\n closestPoint.length = stride;\n return squaredDistance;\n } else {\n return minSquaredDistance;\n }\n }\n\n /**\n * Return the coordinate of the point.\n * @return {import(\"../coordinate.js\").Coordinate} Coordinates.\n * @api\n */\n getCoordinates() {\n return !this.flatCoordinates ? [] : this.flatCoordinates.slice();\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n */\n computeExtent(extent) {\n return createOrUpdateFromCoordinate(this.flatCoordinates, extent);\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./GeometryType.js\").default} Geometry type.\n * @api\n */\n getType() {\n return GeometryType.POINT;\n }\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 intersectsExtent(extent) {\n return containsXY(extent, this.flatCoordinates[0], this.flatCoordinates[1]);\n }\n\n /**\n * @param {!Array<*>} coordinates Coordinates.\n * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n * @api\n */\n setCoordinates(coordinates, opt_layout) {\n this.setLayout(opt_layout, coordinates, 0);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = deflateCoordinate(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride\n );\n this.changed();\n }\n}\n\nexport default Point;\n","/**\n * @module ol/geom/flat/contains\n */\nimport {forEachCorner} from '../../extent.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} Contains extent.\n */\nexport function linearRingContainsExtent(\n flatCoordinates,\n offset,\n end,\n stride,\n extent\n) {\n const outside = forEachCorner(\n extent,\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} Contains (x, y).\n */\n function (coordinate) {\n return !linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n coordinate[0],\n coordinate[1]\n );\n }\n );\n return !outside;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n x,\n y\n) {\n // http://geomalgorithms.com/a03-_inclusion.html\n // Copyright 2000 softSurfer, 2012 Dan Sunday\n // This code may be freely used and modified for any purpose\n // providing that this copyright notice is included with it.\n // SoftSurfer makes no warranty for this code, and cannot be held\n // liable for any real or imagined damage resulting from its use.\n // Users of this code must verify correctness for their application.\n let wn = 0;\n let x1 = flatCoordinates[end - stride];\n let y1 = flatCoordinates[end - stride + 1];\n for (; offset < end; offset += stride) {\n const x2 = flatCoordinates[offset];\n const 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 } 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/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingsContainsXY(\n flatCoordinates,\n offset,\n ends,\n stride,\n x,\n y\n) {\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 (let i = 1, ii = ends.length; i < ii; ++i) {\n if (\n linearRingContainsXY(flatCoordinates, ends[i - 1], ends[i], stride, x, y)\n ) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingssContainsXY(\n flatCoordinates,\n offset,\n endss,\n stride,\n x,\n y\n) {\n if (endss.length === 0) {\n return false;\n }\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const 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","/**\n * @module ol/geom/flat/interiorpoint\n */\nimport {linearRingsContainsXY} from './contains.js';\nimport {numberSafeCompareFunction} from '../../array.js';\n\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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Array<number>} flatCenters Flat centers.\n * @param {number} flatCentersOffset Flat center offset.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Destination point as XYM coordinate, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointOfArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n flatCenters,\n flatCentersOffset,\n opt_dest\n) {\n let i, ii, x, x1, x2, y1, y2;\n const y = flatCenters[flatCentersOffset + 1];\n /** @type {Array<number>} */\n const intersections = [];\n // Calculate intersections with the horizontal line\n for (let r = 0, rr = ends.length; r < rr; ++r) {\n const 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 let pointX = NaN;\n let 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 const 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 } else {\n return [pointX, y, maxSegmentLength];\n }\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array<number>} flatCenters Flat centers.\n * @return {Array<number>} Interior points as XYM coordinates, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointsOfMultiArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n flatCenters\n) {\n let interiorPoints = [];\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n interiorPoints = getInteriorPointOfArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n flatCenters,\n 2 * i,\n interiorPoints\n );\n offset = ends[ends.length - 1];\n }\n return interiorPoints;\n}\n","/**\n * @module ol/geom/flat/segments\n */\n\n/**\n * This function calls `callback` for each segment of the flat coordinates\n * array. If the callback returns a truthy value the function returns that\n * value immediately. Otherwise the function returns `false`.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {function(import(\"../../coordinate.js\").Coordinate, import(\"../../coordinate.js\").Coordinate): T} callback Function\n * called for each segment.\n * @return {T|boolean} Value.\n * @template T\n */\nexport function forEach(flatCoordinates, offset, end, stride, callback) {\n const point1 = [flatCoordinates[offset], flatCoordinates[offset + 1]];\n const point2 = [];\n let ret;\n for (; offset + stride < end; offset += stride) {\n point2[0] = flatCoordinates[offset + stride];\n point2[1] = flatCoordinates[offset + stride + 1];\n ret = callback(point1, point2);\n if (ret) {\n return ret;\n }\n point1[0] = point2[0];\n point1[1] = point2[1];\n }\n return false;\n}\n","/**\n * @module ol/geom/flat/intersectsextent\n */\nimport {\n containsExtent,\n createEmpty,\n extendFlatCoordinates,\n intersects,\n intersectsSegment,\n} from '../../extent.js';\nimport {forEach as forEachSegment} from './segments.js';\nimport {linearRingContainsExtent, linearRingContainsXY} from './contains.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineString(\n flatCoordinates,\n offset,\n end,\n stride,\n extent\n) {\n const coordinatesExtent = extendFlatCoordinates(\n createEmpty(),\n flatCoordinates,\n offset,\n end,\n stride\n );\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(\n flatCoordinates,\n offset,\n end,\n 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\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineStringArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n extent\n) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n if (\n intersectsLineString(flatCoordinates, offset, ends[i], stride, extent)\n ) {\n return true;\n }\n offset = ends[i];\n }\n return false;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRing(\n flatCoordinates,\n offset,\n end,\n stride,\n extent\n) {\n if (intersectsLineString(flatCoordinates, offset, end, stride, extent)) {\n return true;\n }\n if (\n linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n extent[0],\n extent[1]\n )\n ) {\n return true;\n }\n if (\n linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n extent[0],\n extent[3]\n )\n ) {\n return true;\n }\n if (\n linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n extent[2],\n extent[1]\n )\n ) {\n return true;\n }\n if (\n linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n extent[2],\n extent[3]\n )\n ) {\n return true;\n }\n return false;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRingArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n extent\n) {\n if (!intersectsLinearRing(flatCoordinates, offset, ends[0], stride, extent)) {\n return false;\n }\n if (ends.length === 1) {\n return true;\n }\n for (let i = 1, ii = ends.length; i < ii; ++i) {\n if (\n linearRingContainsExtent(\n flatCoordinates,\n ends[i - 1],\n ends[i],\n stride,\n extent\n )\n ) {\n if (\n !intersectsLineString(\n flatCoordinates,\n ends[i - 1],\n ends[i],\n stride,\n extent\n )\n ) {\n return false;\n }\n }\n }\n return true;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRingMultiArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n extent\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n if (\n intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent)\n ) {\n return true;\n }\n offset = ends[ends.length - 1];\n }\n return false;\n}\n","/**\n * @module ol/geom/flat/reverse\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n */\nexport function coordinates(flatCoordinates, offset, end, stride) {\n while (offset < end - stride) {\n for (let i = 0; i < stride; ++i) {\n const 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","/**\n * @module ol/geom/flat/orient\n */\nimport {coordinates as reverseCoordinates} from './reverse.js';\n\n/**\n * Is the linear ring oriented clockwise in a coordinate system with a bottom-left\n * coordinate origin? For a coordinate system with a top-left coordinate origin,\n * the ring's orientation is clockwise when this function returns false.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {boolean} Is clockwise.\n */\nexport function linearRingIsClockwise(flatCoordinates, offset, end, stride) {\n // http://tinyurl.com/clockwise-method\n // https://github.com/OSGeo/gdal/blob/trunk/gdal/ogr/ogrlinearring.cpp\n let edge = 0;\n let x1 = flatCoordinates[end - stride];\n let y1 = flatCoordinates[end - stride + 1];\n for (; offset < end; offset += stride) {\n const x2 = flatCoordinates[offset];\n const 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/**\n * Determines if linear rings are oriented. By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Test for right-hand orientation\n * (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nexport function linearRingsAreOriented(\n flatCoordinates,\n offset,\n ends,\n stride,\n opt_right\n) {\n const right = opt_right !== undefined ? opt_right : false;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const isClockwise = linearRingIsClockwise(\n flatCoordinates,\n offset,\n end,\n stride\n );\n if (i === 0) {\n if ((right && isClockwise) || (!right && !isClockwise)) {\n return false;\n }\n } else {\n if ((right && !isClockwise) || (!right && isClockwise)) {\n return false;\n }\n }\n offset = end;\n }\n return true;\n}\n\n/**\n * Determines if linear rings are oriented. By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Test for right-hand orientation\n * (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nexport function linearRingssAreOriented(\n flatCoordinates,\n offset,\n endss,\n stride,\n opt_right\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n if (\n !linearRingsAreOriented(flatCoordinates, offset, ends, stride, opt_right)\n ) {\n return false;\n }\n if (ends.length) {\n offset = ends[ends.length - 1];\n }\n }\n return true;\n}\n\n/**\n * Orient coordinates in a flat array of linear rings. By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings). To orient according to the\n * right-hand rule, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRings(\n flatCoordinates,\n offset,\n ends,\n stride,\n opt_right\n) {\n const right = opt_right !== undefined ? opt_right : false;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const isClockwise = linearRingIsClockwise(\n flatCoordinates,\n offset,\n end,\n stride\n );\n const reverse =\n 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/**\n * Orient coordinates in a flat array of linear rings. By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings). To orient according to the\n * right-hand rule, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRingsArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n opt_right\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n offset = orientLinearRings(\n flatCoordinates,\n offset,\n endss[i],\n stride,\n opt_right\n );\n }\n return offset;\n}\n","/**\n * @module ol/geom/Polygon\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.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/**\n * @classdesc\n * Polygon geometry.\n *\n * @api\n */\nclass Polygon extends SimpleGeometry {\n /**\n * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>|!Array<number>} coordinates\n * Array of linear rings that define the polygon. The first linear ring of the\n * array defines the outer-boundary or surface of the polygon. Each subsequent\n * linear ring defines a hole in the surface of the polygon. A linear ring is\n * an array of vertices' coordinates where the first coordinate and the last are\n * equivalent. (For internal use, flat coordinates in combination with\n * `opt_layout` and `opt_ends` are also accepted.)\n * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n * @param {Array<number>=} opt_ends Ends (for internal use with flat coordinates).\n */\n constructor(coordinates, opt_layout, opt_ends) {\n super();\n\n /**\n * @type {Array<number>}\n * @private\n */\n this.ends_ = [];\n\n /**\n * @private\n * @type {number}\n */\n this.flatInteriorPointRevision_ = -1;\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n this.flatInteriorPoint_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.orientedRevision_ = -1;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.orientedFlatCoordinates_ = null;\n\n if (opt_layout !== undefined && opt_ends) {\n this.setFlatCoordinates(\n opt_layout,\n /** @type {Array<number>} */ (coordinates)\n );\n this.ends_ = opt_ends;\n } else {\n this.setCoordinates(\n /** @type {Array<Array<import(\"../coordinate.js\").Coordinate>>} */ (coordinates),\n opt_layout\n );\n }\n }\n\n /**\n * Append the passed linear ring to this polygon.\n * @param {LinearRing} linearRing Linear ring.\n * @api\n */\n appendLinearRing(linearRing) {\n if (!this.flatCoordinates) {\n this.flatCoordinates = linearRing.getFlatCoordinates().slice();\n } else {\n extend(this.flatCoordinates, linearRing.getFlatCoordinates());\n }\n this.ends_.push(this.flatCoordinates.length);\n this.changed();\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!Polygon} Clone.\n * @api\n */\n clone() {\n const polygon = new Polygon(\n this.flatCoordinates.slice(),\n this.layout,\n this.ends_.slice()\n );\n polygon.applyProperties(this);\n return polygon;\n }\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 closestPointXY(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(\n arrayMaxSquaredDelta(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n 0\n )\n );\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestArrayPoint(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n this.maxDelta_,\n true,\n x,\n y,\n closestPoint,\n minSquaredDistance\n );\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\n containsXY(x, y) {\n return linearRingsContainsXY(\n this.getOrientedFlatCoordinates(),\n 0,\n this.ends_,\n this.stride,\n x,\n y\n );\n }\n\n /**\n * Return the area of the polygon on projected plane.\n * @return {number} Area (on projected plane).\n * @api\n */\n getArea() {\n return linearRingsArea(\n this.getOrientedFlatCoordinates(),\n 0,\n this.ends_,\n this.stride\n );\n }\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<Array<import(\"../coordinate.js\").Coordinate>>} Coordinates.\n * @api\n */\n getCoordinates(opt_right) {\n let flatCoordinates;\n if (opt_right !== undefined) {\n flatCoordinates = this.getOrientedFlatCoordinates().slice();\n orientLinearRings(flatCoordinates, 0, this.ends_, this.stride, opt_right);\n } else {\n flatCoordinates = this.flatCoordinates;\n }\n\n return inflateCoordinatesArray(flatCoordinates, 0, this.ends_, this.stride);\n }\n\n /**\n * @return {Array<number>} Ends.\n */\n getEnds() {\n return this.ends_;\n }\n\n /**\n * @return {Array<number>} Interior point.\n */\n getFlatInteriorPoint() {\n if (this.flatInteriorPointRevision_ != this.getRevision()) {\n const flatCenter = getCenter(this.getExtent());\n this.flatInteriorPoint_ = getInteriorPointOfArray(\n this.getOrientedFlatCoordinates(),\n 0,\n this.ends_,\n this.stride,\n flatCenter,\n 0\n );\n this.flatInteriorPointRevision_ = this.getRevision();\n }\n return this.flatInteriorPoint_;\n }\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 getInteriorPoint() {\n return new Point(this.getFlatInteriorPoint(), GeometryLayout.XYM);\n }\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 getLinearRingCount() {\n return this.ends_.length;\n }\n\n /**\n * Return the Nth linear ring of the polygon geometry. Return `null` if the\n * given index is out of range.\n * The exterior linear ring is available at index `0` and the interior rings\n * at index `1` and beyond.\n *\n * @param {number} index Index.\n * @return {LinearRing} Linear ring.\n * @api\n */\n getLinearRing(index) {\n if (index < 0 || this.ends_.length <= index) {\n return null;\n }\n return new LinearRing(\n this.flatCoordinates.slice(\n index === 0 ? 0 : this.ends_[index - 1],\n this.ends_[index]\n ),\n this.layout\n );\n }\n\n /**\n * Return the linear rings of the polygon.\n * @return {Array<LinearRing>} Linear rings.\n * @api\n */\n getLinearRings() {\n const layout = this.layout;\n const flatCoordinates = this.flatCoordinates;\n const ends = this.ends_;\n const linearRings = [];\n let offset = 0;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const linearRing = new LinearRing(\n flatCoordinates.slice(offset, end),\n layout\n );\n linearRings.push(linearRing);\n offset = end;\n }\n return linearRings;\n }\n\n /**\n * @return {Array<number>} Oriented flat coordinates.\n */\n getOrientedFlatCoordinates() {\n if (this.orientedRevision_ != this.getRevision()) {\n const flatCoordinates = this.flatCoordinates;\n if (linearRingsAreOriented(flatCoordinates, 0, this.ends_, this.stride)) {\n this.orientedFlatCoordinates_ = flatCoordinates;\n } else {\n this.orientedFlatCoordinates_ = flatCoordinates.slice();\n this.orientedFlatCoordinates_.length = orientLinearRings(\n this.orientedFlatCoordinates_,\n 0,\n this.ends_,\n this.stride\n );\n }\n this.orientedRevision_ = this.getRevision();\n }\n return this.orientedFlatCoordinates_;\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Polygon} Simplified Polygon.\n * @protected\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n const simplifiedFlatCoordinates = [];\n const simplifiedEnds = [];\n simplifiedFlatCoordinates.length = quantizeArray(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n Math.sqrt(squaredTolerance),\n simplifiedFlatCoordinates,\n 0,\n simplifiedEnds\n );\n return new Polygon(\n simplifiedFlatCoordinates,\n GeometryLayout.XY,\n simplifiedEnds\n );\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./GeometryType.js\").default} Geometry type.\n * @api\n */\n getType() {\n return GeometryType.POLYGON;\n }\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 intersectsExtent(extent) {\n return intersectsLinearRingArray(\n this.getOrientedFlatCoordinates(),\n 0,\n this.ends_,\n this.stride,\n extent\n );\n }\n\n /**\n * Set the coordinates of the polygon.\n * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>} coordinates Coordinates.\n * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n * @api\n */\n setCoordinates(coordinates, opt_layout) {\n this.setLayout(opt_layout, coordinates, 2);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n const ends = deflateCoordinatesArray(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride,\n this.ends_\n );\n this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n this.changed();\n }\n}\n\nexport default Polygon;\n\n/**\n * Create an approximation of a circle on the surface of a sphere.\n * @param {import(\"../coordinate.js\").Coordinate} center Center (`[lon, lat]` in degrees).\n * @param {number} radius The great-circle distance from the center to\n * the polygon vertices.\n * @param {number=} opt_n Optional number of vertices for the resulting\n * polygon. Default is `32`.\n * @param {number=} opt_sphereRadius Optional radius for the sphere (defaults to\n * the Earth's mean radius using the WGS84 ellipsoid).\n * @return {Polygon} The \"circular\" polygon.\n * @api\n */\nexport function circular(center, radius, opt_n, opt_sphereRadius) {\n const n = opt_n ? opt_n : 32;\n /** @type {Array<number>} */\n const flatCoordinates = [];\n for (let i = 0; i < n; ++i) {\n extend(\n flatCoordinates,\n sphereOffset(center, radius, (2 * Math.PI * i) / n, opt_sphereRadius)\n );\n }\n flatCoordinates.push(flatCoordinates[0], flatCoordinates[1]);\n return new Polygon(flatCoordinates, GeometryLayout.XY, [\n flatCoordinates.length,\n ]);\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 const minX = extent[0];\n const minY = extent[1];\n const maxX = extent[2];\n const maxY = extent[3];\n const 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/**\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 const sides = opt_sides ? opt_sides : 32;\n const stride = circle.getStride();\n const layout = circle.getLayout();\n const center = circle.getCenter();\n const arrayLength = stride * (sides + 1);\n const flatCoordinates = new Array(arrayLength);\n for (let i = 0; i < arrayLength; i += stride) {\n flatCoordinates[i] = 0;\n flatCoordinates[i + 1] = 0;\n for (let j = 2; j < stride; j++) {\n flatCoordinates[i + j] = center[j];\n }\n }\n const ends = [flatCoordinates.length];\n const polygon = new Polygon(flatCoordinates, layout, ends);\n makeRegular(polygon, center, circle.getRadius(), opt_angle);\n return polygon;\n}\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 const flatCoordinates = polygon.getFlatCoordinates();\n const stride = polygon.getStride();\n const sides = flatCoordinates.length / stride - 1;\n const startAngle = opt_angle ? opt_angle : 0;\n for (let i = 0; i <= sides; ++i) {\n const offset = i * stride;\n const 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","/**\n * @module ol/Geolocation\n */\nimport BaseEvent from './events/Event.js';\nimport BaseObject, {getChangeEventType} from './Object.js';\nimport EventType from './events/EventType.js';\nimport {circular as circularPolygon} from './geom/Polygon.js';\nimport {\n get as getProjection,\n getTransformFromProjections,\n identityTransform,\n} from './proj.js';\nimport {toRadians} from './math.js';\n\n/**\n * @enum {string}\n */\nconst Property = {\n ACCURACY: 'accuracy',\n ACCURACY_GEOMETRY: 'accuracyGeometry',\n ALTITUDE: 'altitude',\n ALTITUDE_ACCURACY: 'altitudeAccuracy',\n HEADING: 'heading',\n POSITION: 'position',\n PROJECTION: 'projection',\n SPEED: 'speed',\n TRACKING: 'tracking',\n TRACKING_OPTIONS: 'trackingOptions',\n};\n\n/**\n * @classdesc\n * Events emitted on Geolocation error.\n */\nclass GeolocationError extends BaseEvent {\n /**\n * @param {GeolocationPositionError} error error object.\n */\n constructor(error) {\n super(EventType.ERROR);\n\n /**\n * @type {number}\n */\n this.code = error.code;\n\n /**\n * @type {string}\n */\n this.message = error.message;\n }\n}\n\n/**\n * @typedef {Object} Options\n * @property {boolean} [tracking=false] Start Tracking right after\n * instantiation.\n * @property {PositionOptions} [trackingOptions] Tracking options.\n * See http://www.w3.org/TR/geolocation-API/#position_options_interface.\n * @property {import(\"./proj.js\").ProjectionLike} [projection] The projection the position\n * is reported in.\n */\n\n/**\n * @classdesc\n * Helper class for providing HTML5 Geolocation capabilities.\n * The [Geolocation API](http://www.w3.org/TR/geolocation-API/)\n * is used to locate a user's position.\n *\n * To get notified of position changes, register a listener for the generic\n * `change` event on your instance of {@link module:ol/Geolocation~Geolocation}.\n *\n * Example:\n *\n * var geolocation = new Geolocation({\n * // take the projection to use from the map's view\n * projection: view.getProjection()\n * });\n * // listen to changes in position\n * geolocation.on('change', function(evt) {\n * window.console.log(geolocation.getPosition());\n * });\n *\n * @fires module:ol/events/Event~BaseEvent#event:error\n * @api\n */\nclass Geolocation extends BaseObject {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n super();\n\n const options = opt_options || {};\n\n /**\n * The unprojected (EPSG:4326) device position.\n * @private\n * @type {?import(\"./coordinate.js\").Coordinate}\n */\n this.position_ = null;\n\n /**\n * @private\n * @type {import(\"./proj.js\").TransformFunction}\n */\n this.transform_ = identityTransform;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.watchId_ = undefined;\n\n this.addEventListener(\n getChangeEventType(Property.PROJECTION),\n this.handleProjectionChanged_\n );\n this.addEventListener(\n getChangeEventType(Property.TRACKING),\n this.handleTrackingChanged_\n );\n\n if (options.projection !== undefined) {\n this.setProjection(options.projection);\n }\n if (options.trackingOptions !== undefined) {\n this.setTrackingOptions(options.trackingOptions);\n }\n\n this.setTracking(options.tracking !== undefined ? options.tracking : false);\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n this.setTracking(false);\n super.disposeInternal();\n }\n\n /**\n * @private\n */\n handleProjectionChanged_() {\n const projection = this.getProjection();\n if (projection) {\n this.transform_ = getTransformFromProjections(\n getProjection('EPSG:4326'),\n projection\n );\n if (this.position_) {\n this.set(Property.POSITION, this.transform_(this.position_));\n }\n }\n }\n\n /**\n * @private\n */\n handleTrackingChanged_() {\n if ('geolocation' in navigator) {\n const tracking = this.getTracking();\n if (tracking && this.watchId_ === undefined) {\n this.watchId_ = navigator.geolocation.watchPosition(\n this.positionChange_.bind(this),\n this.positionError_.bind(this),\n this.getTrackingOptions()\n );\n } else if (!tracking && this.watchId_ !== undefined) {\n navigator.geolocation.clearWatch(this.watchId_);\n this.watchId_ = undefined;\n }\n }\n }\n\n /**\n * @private\n * @param {GeolocationPosition} position position event.\n */\n positionChange_(position) {\n const coords = position.coords;\n this.set(Property.ACCURACY, coords.accuracy);\n this.set(\n Property.ALTITUDE,\n coords.altitude === null ? undefined : coords.altitude\n );\n this.set(\n Property.ALTITUDE_ACCURACY,\n coords.altitudeAccuracy === null ? undefined : coords.altitudeAccuracy\n );\n this.set(\n Property.HEADING,\n coords.heading === null ? undefined : toRadians(coords.heading)\n );\n if (!this.position_) {\n this.position_ = [coords.longitude, coords.latitude];\n } else {\n this.position_[0] = coords.longitude;\n this.position_[1] = coords.latitude;\n }\n const projectedPosition = this.transform_(this.position_);\n this.set(Property.POSITION, projectedPosition);\n this.set(Property.SPEED, coords.speed === null ? undefined : coords.speed);\n const geometry = circularPolygon(this.position_, coords.accuracy);\n geometry.applyTransform(this.transform_);\n this.set(Property.ACCURACY_GEOMETRY, geometry);\n this.changed();\n }\n\n /**\n * @private\n * @param {GeolocationPositionError} error error object.\n */\n positionError_(error) {\n this.dispatchEvent(new GeolocationError(error));\n }\n\n /**\n * Get the accuracy of the position in meters.\n * @return {number|undefined} The accuracy of the position measurement in\n * meters.\n * @observable\n * @api\n */\n getAccuracy() {\n return /** @type {number|undefined} */ (this.get(Property.ACCURACY));\n }\n\n /**\n * Get a geometry of the position accuracy.\n * @return {?import(\"./geom/Polygon.js\").default} A geometry of the position accuracy.\n * @observable\n * @api\n */\n getAccuracyGeometry() {\n return /** @type {?import(\"./geom/Polygon.js\").default} */ (this.get(\n Property.ACCURACY_GEOMETRY\n ) || null);\n }\n\n /**\n * Get the altitude associated with the position.\n * @return {number|undefined} The altitude of the position in meters above mean\n * sea level.\n * @observable\n * @api\n */\n getAltitude() {\n return /** @type {number|undefined} */ (this.get(Property.ALTITUDE));\n }\n\n /**\n * Get the altitude accuracy of the position.\n * @return {number|undefined} The accuracy of the altitude measurement in\n * meters.\n * @observable\n * @api\n */\n getAltitudeAccuracy() {\n return /** @type {number|undefined} */ (this.get(\n Property.ALTITUDE_ACCURACY\n ));\n }\n\n /**\n * Get the heading as radians clockwise from North.\n * Note: depending on the browser, the heading is only defined if the `enableHighAccuracy`\n * is set to `true` in the tracking options.\n * @return {number|undefined} The heading of the device in radians from north.\n * @observable\n * @api\n */\n getHeading() {\n return /** @type {number|undefined} */ (this.get(Property.HEADING));\n }\n\n /**\n * Get the position of the device.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The current position of the device reported\n * in the current projection.\n * @observable\n * @api\n */\n getPosition() {\n return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (this.get(\n Property.POSITION\n ));\n }\n\n /**\n * Get the projection associated with the position.\n * @return {import(\"./proj/Projection.js\").default|undefined} The projection the position is\n * reported in.\n * @observable\n * @api\n */\n getProjection() {\n return /** @type {import(\"./proj/Projection.js\").default|undefined} */ (this.get(\n Property.PROJECTION\n ));\n }\n\n /**\n * Get the speed in meters per second.\n * @return {number|undefined} The instantaneous speed of the device in meters\n * per second.\n * @observable\n * @api\n */\n getSpeed() {\n return /** @type {number|undefined} */ (this.get(Property.SPEED));\n }\n\n /**\n * Determine if the device location is being tracked.\n * @return {boolean} The device location is being tracked.\n * @observable\n * @api\n */\n getTracking() {\n return /** @type {boolean} */ (this.get(Property.TRACKING));\n }\n\n /**\n * Get the tracking options.\n * See http://www.w3.org/TR/geolocation-API/#position-options.\n * @return {PositionOptions|undefined} PositionOptions as defined by\n * the [HTML5 Geolocation spec\n * ](http://www.w3.org/TR/geolocation-API/#position_options_interface).\n * @observable\n * @api\n */\n getTrackingOptions() {\n return /** @type {PositionOptions|undefined} */ (this.get(\n Property.TRACKING_OPTIONS\n ));\n }\n\n /**\n * Set the projection to use for transforming the coordinates.\n * @param {import(\"./proj.js\").ProjectionLike} projection The projection the position is\n * reported in.\n * @observable\n * @api\n */\n setProjection(projection) {\n this.set(Property.PROJECTION, getProjection(projection));\n }\n\n /**\n * Enable or disable tracking.\n * @param {boolean} tracking Enable tracking.\n * @observable\n * @api\n */\n setTracking(tracking) {\n this.set(Property.TRACKING, tracking);\n }\n\n /**\n * Set the tracking options.\n * See http://www.w3.org/TR/geolocation-API/#position-options.\n * @param {PositionOptions} options PositionOptions as defined by the\n * [HTML5 Geolocation spec\n * ](http://www.w3.org/TR/geolocation-API/#position_options_interface).\n * @observable\n * @api\n */\n setTrackingOptions(options) {\n this.set(Property.TRACKING_OPTIONS, options);\n }\n}\n\nexport default Geolocation;\n","/**\n * @module ol/render/EventType\n */\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 /**\n * Triggered after a layer is rendered.\n * @event module:ol/render/Event~RenderEvent#postrender\n * @api\n */\n POSTRENDER: 'postrender',\n\n /**\n * Triggered before layers are rendered.\n * The event object will not have a `context` set.\n * @event module:ol/render/Event~RenderEvent#precompose\n * @api\n */\n PRECOMPOSE: 'precompose',\n\n /**\n * Triggered after all layers are rendered.\n * The event object will not have a `context` set.\n * @event module:ol/render/Event~RenderEvent#postcompose\n * @api\n */\n POSTCOMPOSE: 'postcompose',\n\n /**\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 * @module ol/style/Fill\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [color=null] A color, gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.\n * Default null; if null, the Canvas/renderer default black will be used.\n */\n\n/**\n * @classdesc\n * Set fill style for vector features.\n * @api\n */\nclass Fill {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options || {};\n\n /**\n * @private\n * @type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike}\n */\n this.color_ = options.color !== undefined ? options.color : null;\n }\n\n /**\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 clone() {\n const color = this.getColor();\n return new Fill({\n color: Array.isArray(color) ? color.slice() : color || undefined,\n });\n }\n\n /**\n * Get the fill color.\n * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} Color.\n * @api\n */\n getColor() {\n return this.color_;\n }\n\n /**\n * Set the color.\n *\n * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} color Color.\n * @api\n */\n setColor(color) {\n this.color_ = color;\n }\n}\n\nexport default Fill;\n","/**\n * @module ol/geom/flat/interpolate\n */\nimport {binarySearch} from '../../array.js';\nimport {lerp} from '../../math.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} fraction Fraction.\n * @param {Array<number>=} opt_dest Destination.\n * @param {number=} opt_dimension Destination dimension (default is `2`)\n * @return {Array<number>} Destination.\n */\nexport function interpolatePoint(\n flatCoordinates,\n offset,\n end,\n stride,\n fraction,\n opt_dest,\n opt_dimension\n) {\n let o, t;\n const n = (end - offset) / stride;\n if (n === 1) {\n o = offset;\n } else if (n === 2) {\n o = offset;\n t = fraction;\n } else if (n !== 0) {\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n let length = 0;\n const cumulativeLengths = [0];\n for (let i = offset + stride; i < end; i += stride) {\n const x2 = flatCoordinates[i];\n const y2 = flatCoordinates[i + 1];\n length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n cumulativeLengths.push(length);\n x1 = x2;\n y1 = y2;\n }\n const target = fraction * length;\n const 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 } else {\n o = offset + index * stride;\n }\n }\n const dimension = opt_dimension > 1 ? opt_dimension : 2;\n const dest = opt_dest ? opt_dest : new Array(dimension);\n for (let 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/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n */\nexport function lineStringCoordinateAtM(\n flatCoordinates,\n offset,\n end,\n stride,\n m,\n extrapolate\n) {\n if (end == offset) {\n return null;\n }\n let 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 } else {\n return null;\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 } 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 let lo = offset / stride;\n let hi = end / stride;\n while (lo < hi) {\n const mid = (lo + hi) >> 1;\n if (m < flatCoordinates[(mid + 1) * stride - 1]) {\n hi = mid;\n } else {\n lo = mid + 1;\n }\n }\n const m0 = flatCoordinates[lo * stride - 1];\n if (m == m0) {\n return flatCoordinates.slice((lo - 1) * stride, (lo - 1) * stride + stride);\n }\n const m1 = flatCoordinates[(lo + 1) * stride - 1];\n const t = (m - m0) / (m1 - m0);\n coordinate = [];\n for (let i = 0; i < stride - 1; ++i) {\n coordinate.push(\n lerp(\n flatCoordinates[(lo - 1) * stride + i],\n flatCoordinates[lo * stride + i],\n t\n )\n );\n }\n coordinate.push(m);\n return coordinate;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @param {boolean} interpolate Interpolate.\n * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n */\nexport function lineStringsCoordinateAtM(\n flatCoordinates,\n offset,\n ends,\n stride,\n m,\n extrapolate,\n interpolate\n) {\n if (interpolate) {\n return lineStringCoordinateAtM(\n flatCoordinates,\n offset,\n ends[ends.length - 1],\n stride,\n m,\n extrapolate\n );\n }\n let 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 } 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 } else {\n return null;\n }\n }\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n if (offset == end) {\n continue;\n }\n if (m < flatCoordinates[offset + stride - 1]) {\n return null;\n } else if (m <= flatCoordinates[end - 1]) {\n return lineStringCoordinateAtM(\n flatCoordinates,\n offset,\n end,\n stride,\n m,\n false\n );\n }\n offset = end;\n }\n return null;\n}\n","/**\n * @module ol/geom/flat/length\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Length.\n */\nexport function lineStringLength(flatCoordinates, offset, end, stride) {\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n let length = 0;\n for (let i = offset + stride; i < end; i += stride) {\n const x2 = flatCoordinates[i];\n const 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/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Perimeter.\n */\nexport function linearRingLength(flatCoordinates, offset, end, stride) {\n let perimeter = lineStringLength(flatCoordinates, offset, end, stride);\n const dx = flatCoordinates[end - stride] - flatCoordinates[offset];\n const dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];\n perimeter += Math.sqrt(dx * dx + dy * dy);\n return perimeter;\n}\n","/**\n * @module ol/geom/LineString\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {assignClosestPoint, maxSquaredDelta} from './flat/closest.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport {deflateCoordinates} from './flat/deflate.js';\nimport {douglasPeucker} from './flat/simplify.js';\nimport {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/**\n * @classdesc\n * Linestring geometry.\n *\n * @api\n */\nclass LineString extends SimpleGeometry {\n /**\n * @param {Array<import(\"../coordinate.js\").Coordinate>|Array<number>} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `opt_layout` are also accepted.\n * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n */\n constructor(coordinates, opt_layout) {\n super();\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n this.flatMidpoint_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.flatMidpointRevision_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n if (opt_layout !== undefined && !Array.isArray(coordinates[0])) {\n this.setFlatCoordinates(\n opt_layout,\n /** @type {Array<number>} */ (coordinates)\n );\n } else {\n this.setCoordinates(\n /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates),\n opt_layout\n );\n }\n }\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 appendCoordinate(coordinate) {\n if (!this.flatCoordinates) {\n this.flatCoordinates = coordinate.slice();\n } else {\n extend(this.flatCoordinates, coordinate);\n }\n this.changed();\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!LineString} Clone.\n * @api\n */\n clone() {\n const lineString = new LineString(\n this.flatCoordinates.slice(),\n this.layout\n );\n lineString.applyProperties(this);\n return lineString;\n }\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 closestPointXY(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(\n maxSquaredDelta(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n 0\n )\n );\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestPoint(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n this.maxDelta_,\n false,\n x,\n y,\n closestPoint,\n minSquaredDistance\n );\n }\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 forEachSegment(callback) {\n return forEachSegment(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n callback\n );\n }\n\n /**\n * Returns the coordinate at `m` using linear interpolation, or `null` if no\n * such coordinate exists.\n *\n * `opt_extrapolate` controls extrapolation beyond the range of Ms in the\n * MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first\n * M will return the first coordinate and Ms greater than the last M will\n * return the last coordinate.\n *\n * @param {number} m M.\n * @param {boolean=} opt_extrapolate Extrapolate. Default is `false`.\n * @return {import(\"../coordinate.js\").Coordinate} Coordinate.\n * @api\n */\n getCoordinateAtM(m, opt_extrapolate) {\n if (\n this.layout != GeometryLayout.XYM &&\n this.layout != GeometryLayout.XYZM\n ) {\n return null;\n }\n const extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;\n return lineStringCoordinateAtM(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n m,\n extrapolate\n );\n }\n\n /**\n * Return the coordinates of the linestring.\n * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n * @api\n */\n getCoordinates() {\n return inflateCoordinates(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride\n );\n }\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 getCoordinateAt(fraction, opt_dest) {\n return interpolatePoint(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n fraction,\n opt_dest,\n this.stride\n );\n }\n\n /**\n * Return the length of the linestring on projected plane.\n * @return {number} Length (on projected plane).\n * @api\n */\n getLength() {\n return lineStringLength(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride\n );\n }\n\n /**\n * @return {Array<number>} Flat midpoint.\n */\n getFlatMidpoint() {\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 /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {LineString} Simplified LineString.\n * @protected\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n const simplifiedFlatCoordinates = [];\n simplifiedFlatCoordinates.length = douglasPeucker(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0\n );\n return new LineString(simplifiedFlatCoordinates, GeometryLayout.XY);\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./GeometryType.js\").default} Geometry type.\n * @api\n */\n getType() {\n return GeometryType.LINE_STRING;\n }\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 intersectsExtent(extent) {\n return intersectsLineString(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n extent\n );\n }\n\n /**\n * Set the coordinates of the linestring.\n * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n * @api\n */\n setCoordinates(coordinates, opt_layout) {\n this.setLayout(opt_layout, coordinates, 1);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = deflateCoordinates(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride\n );\n this.changed();\n }\n}\n\nexport default LineString;\n","/**\n * @module ol/style/Stroke\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [color] A color, gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.\n * Default null; if null, the Canvas/renderer default black will be used.\n * @property {CanvasLineCap} [lineCap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {CanvasLineJoin} [lineJoin='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {Array<number>} [lineDash] Line dash pattern. Default is `null` (no dash).\n * Please note that Internet Explorer 10 and lower do not support the `setLineDash` method on\n * the `CanvasRenderingContext2D` and therefore this option will have no 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/**\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 */\nclass Stroke {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options || {};\n\n /**\n * @private\n * @type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike}\n */\n this.color_ = options.color !== undefined ? options.color : null;\n\n /**\n * @private\n * @type {CanvasLineCap|undefined}\n */\n this.lineCap_ = options.lineCap;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.lineDash_ = options.lineDash !== undefined ? options.lineDash : null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lineDashOffset_ = options.lineDashOffset;\n\n /**\n * @private\n * @type {CanvasLineJoin|undefined}\n */\n this.lineJoin_ = options.lineJoin;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.miterLimit_ = options.miterLimit;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.width_ = options.width;\n }\n\n /**\n * Clones the style.\n * @return {Stroke} The cloned style.\n * @api\n */\n clone() {\n const 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 /**\n * Get the stroke color.\n * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} Color.\n * @api\n */\n getColor() {\n return this.color_;\n }\n\n /**\n * Get the line cap type for the stroke.\n * @return {CanvasLineCap|undefined} Line cap.\n * @api\n */\n getLineCap() {\n return this.lineCap_;\n }\n\n /**\n * Get the line dash style for the stroke.\n * @return {Array<number>} Line dash.\n * @api\n */\n getLineDash() {\n return this.lineDash_;\n }\n\n /**\n * Get the line dash offset for the stroke.\n * @return {number|undefined} Line dash offset.\n * @api\n */\n getLineDashOffset() {\n return this.lineDashOffset_;\n }\n\n /**\n * Get the line join type for the stroke.\n * @return {CanvasLineJoin|undefined} Line join.\n * @api\n */\n getLineJoin() {\n return this.lineJoin_;\n }\n\n /**\n * Get the miter limit for the stroke.\n * @return {number|undefined} Miter limit.\n * @api\n */\n getMiterLimit() {\n return this.miterLimit_;\n }\n\n /**\n * Get the stroke width.\n * @return {number|undefined} Width.\n * @api\n */\n getWidth() {\n return this.width_;\n }\n\n /**\n * Set the color.\n *\n * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} color Color.\n * @api\n */\n setColor(color) {\n this.color_ = color;\n }\n\n /**\n * Set the line cap.\n *\n * @param {CanvasLineCap|undefined} lineCap Line cap.\n * @api\n */\n setLineCap(lineCap) {\n this.lineCap_ = lineCap;\n }\n\n /**\n * Set the line dash.\n *\n * Please note that Internet Explorer 10 and lower [do not support][mdn] the\n * `setLineDash` method on the `CanvasRenderingContext2D` and therefore this\n * property will have no visual effect in these browsers.\n *\n * [mdn]: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility\n *\n * @param {Array<number>} lineDash Line dash.\n * @api\n */\n setLineDash(lineDash) {\n this.lineDash_ = lineDash;\n }\n\n /**\n * Set the line dash offset.\n *\n * @param {number|undefined} lineDashOffset Line dash offset.\n * @api\n */\n setLineDashOffset(lineDashOffset) {\n this.lineDashOffset_ = lineDashOffset;\n }\n\n /**\n * Set the line join.\n *\n * @param {CanvasLineJoin|undefined} lineJoin Line join.\n * @api\n */\n setLineJoin(lineJoin) {\n this.lineJoin_ = lineJoin;\n }\n\n /**\n * Set the miter limit.\n *\n * @param {number|undefined} miterLimit Miter limit.\n * @api\n */\n setMiterLimit(miterLimit) {\n this.miterLimit_ = miterLimit;\n }\n\n /**\n * Set the width.\n *\n * @param {number|undefined} width Width.\n * @api\n */\n setWidth(width) {\n this.width_ = width;\n }\n}\n\nexport default Stroke;\n","/**\n * @module ol/ImageState\n */\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","/**\n * @module ol/size\n */\n\n/**\n * An array of numbers representing a size: `[width, height]`.\n * @typedef {Array<number>} Size\n * @api\n */\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/**\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/**\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/**\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 } else {\n if (opt_size === undefined) {\n opt_size = [size, size];\n } else {\n opt_size[0] = size;\n opt_size[1] = size;\n }\n return opt_size;\n }\n}\n","/**\n * @module ol/style/Image\n */\nimport {abstract} from '../util.js';\nimport {toSize} from '../size.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} opacity\n * @property {boolean} rotateWithView\n * @property {number} rotation\n * @property {number|import(\"../size.js\").Size} scale\n * @property {Array<number>} displacement\n */\n\n/**\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 */\nclass ImageStyle {\n /**\n * @param {Options} options Options.\n */\n constructor(options) {\n /**\n * @private\n * @type {number}\n */\n this.opacity_ = options.opacity;\n\n /**\n * @private\n * @type {boolean}\n */\n this.rotateWithView_ = options.rotateWithView;\n\n /**\n * @private\n * @type {number}\n */\n this.rotation_ = options.rotation;\n\n /**\n * @private\n * @type {number|import(\"../size.js\").Size}\n */\n this.scale_ = options.scale;\n\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.scaleArray_ = toSize(options.scale);\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.displacement_ = options.displacement;\n }\n\n /**\n * Clones the style.\n * @return {ImageStyle} The cloned style.\n * @api\n */\n clone() {\n const scale = this.getScale();\n return new ImageStyle({\n opacity: this.getOpacity(),\n scale: Array.isArray(scale) ? scale.slice() : scale,\n rotation: this.getRotation(),\n rotateWithView: this.getRotateWithView(),\n displacement: this.getDisplacement().slice(),\n });\n }\n\n /**\n * Get the symbolizer opacity.\n * @return {number} Opacity.\n * @api\n */\n getOpacity() {\n return this.opacity_;\n }\n\n /**\n * Determine whether the symbolizer rotates with the map.\n * @return {boolean} Rotate with map.\n * @api\n */\n getRotateWithView() {\n return this.rotateWithView_;\n }\n\n /**\n * Get the symoblizer rotation.\n * @return {number} Rotation.\n * @api\n */\n getRotation() {\n return this.rotation_;\n }\n\n /**\n * Get the symbolizer scale.\n * @return {number|import(\"../size.js\").Size} Scale.\n * @api\n */\n getScale() {\n return this.scale_;\n }\n\n /**\n * Get the symbolizer scale array.\n * @return {import(\"../size.js\").Size} Scale array.\n */\n getScaleArray() {\n return this.scaleArray_;\n }\n\n /**\n * Get the displacement of the shape\n * @return {Array<number>} Shape's center displacement\n * @api\n */\n getDisplacement() {\n return this.displacement_;\n }\n\n /**\n * Get the anchor point in pixels. The anchor determines the center point for the\n * symbolizer.\n * @abstract\n * @return {Array<number>} Anchor.\n */\n getAnchor() {\n return abstract();\n }\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 getImage(pixelRatio) {\n return abstract();\n }\n\n /**\n * @abstract\n * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Image element.\n */\n getHitDetectionImage() {\n return abstract();\n }\n\n /*\n * Get the image pixel ratio.\n * @param {number} pixelRatio Pixel ratio.\n * */\n getPixelRatio(pixelRatio) {\n return 1;\n }\n\n /**\n * @abstract\n * @return {import(\"../ImageState.js\").default} Image state.\n */\n getImageState() {\n return abstract();\n }\n\n /**\n * @abstract\n * @return {import(\"../size.js\").Size} Image size.\n */\n getImageSize() {\n return abstract();\n }\n\n /**\n * @abstract\n * @return {import(\"../size.js\").Size} Size of the hit-detection image.\n */\n getHitDetectionImageSize() {\n return abstract();\n }\n\n /**\n * Get the origin of the symbolizer.\n * @abstract\n * @return {Array<number>} Origin.\n */\n getOrigin() {\n return abstract();\n }\n\n /**\n * Get the size of the symbolizer (in pixels).\n * @abstract\n * @return {import(\"../size.js\").Size} Size.\n */\n getSize() {\n return abstract();\n }\n\n /**\n * Set the opacity.\n *\n * @param {number} opacity Opacity.\n * @api\n */\n setOpacity(opacity) {\n this.opacity_ = opacity;\n }\n\n /**\n * Set whether to rotate the style with the view.\n *\n * @param {boolean} rotateWithView Rotate with map.\n * @api\n */\n setRotateWithView(rotateWithView) {\n this.rotateWithView_ = rotateWithView;\n }\n\n /**\n * Set the rotation.\n *\n * @param {number} rotation Rotation.\n * @api\n */\n setRotation(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 setScale(scale) {\n this.scale_ = scale;\n this.scaleArray_ = toSize(scale);\n }\n\n /**\n * @abstract\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n */\n listenImageChange(listener) {\n abstract();\n }\n\n /**\n * Load not yet loaded URI.\n * @abstract\n */\n load() {\n abstract();\n }\n\n /**\n * @abstract\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n */\n unlistenImageChange(listener) {\n abstract();\n }\n}\n\nexport default ImageStyle;\n","/**\n * @module ol/color\n */\nimport {assert} from './asserts.js';\nimport {clamp} from './math.js';\n\n/**\n * A color represented as a short array [red, green, blue, alpha].\n * red, green, and blue should be integers in the range 0..255 inclusive.\n * alpha should be a float in the range 0..1 inclusive. If no alpha value is\n * given then `1` will be used.\n * @typedef {Array<number>} Color\n * @api\n */\n\n/**\n * This RegExp matches # followed by 3, 4, 6, or 8 hex digits.\n * @const\n * @type {RegExp}\n * @private\n */\nconst HEX_COLOR_RE_ = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i;\n\n/**\n * Regular expression for matching potential named color style strings.\n * @const\n * @type {RegExp}\n * @private\n */\nconst NAMED_COLOR_RE_ = /^([a-z]*)$|^hsla?\\(.*\\)$/i;\n\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 } else {\n return toString(color);\n }\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 const el = document.createElement('div');\n el.style.color = color;\n if (el.style.color !== '') {\n document.body.appendChild(el);\n const rgb = getComputedStyle(el).color;\n document.body.removeChild(el);\n return rgb;\n } else {\n return '';\n }\n}\n\n/**\n * @param {string} s String.\n * @return {Color} Color.\n */\nexport const 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 /**\n * @const\n * @type {number}\n */\n const MAX_CACHE_SIZE = 1024;\n\n /**\n * @type {Object<string, Color>}\n */\n const cache = {};\n\n /**\n * @type {number}\n */\n let cacheSize = 0;\n\n return (\n /**\n * @param {string} s String.\n * @return {Color} Color.\n */\n function (s) {\n let color;\n if (cache.hasOwnProperty(s)) {\n color = cache[s];\n } else {\n if (cacheSize >= MAX_CACHE_SIZE) {\n let i = 0;\n for (const 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\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 } else {\n return fromString(color);\n }\n}\n\n/**\n * @param {string} s String.\n * @private\n * @return {Color} Color.\n */\nfunction fromStringInternal_(s) {\n let r, g, b, a, color;\n\n if (NAMED_COLOR_RE_.exec(s)) {\n s = fromNamed(s);\n }\n\n if (HEX_COLOR_RE_.exec(s)) {\n // hex\n const n = s.length - 1; // number of hex digits\n let d; // number of digits per channel\n if (n <= 4) {\n d = 1;\n } else {\n d = 2;\n }\n const 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 } 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 } else if (s.indexOf('rgba(') == 0) {\n // rgba()\n color = s.slice(5, -1).split(',').map(Number);\n normalize(color);\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 } else {\n assert(false, 14); // Invalid color\n }\n return color;\n}\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/**\n * @param {Color} color Color.\n * @return {string} String.\n */\nexport function toString(color) {\n let r = color[0];\n if (r != (r | 0)) {\n r = (r + 0.5) | 0;\n }\n let g = color[1];\n if (g != (g | 0)) {\n g = (g + 0.5) | 0;\n }\n let b = color[2];\n if (b != (b | 0)) {\n b = (b + 0.5) | 0;\n }\n const a = color[3] === undefined ? 1 : color[3];\n return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n}\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 (\n HEX_COLOR_RE_.test(s) || s.indexOf('rgba(') === 0 || s.indexOf('rgb(') === 0\n );\n}\n","/**\n * @module ol/colorlike\n */\nimport {toString} from './color.js';\n\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/**\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 } else {\n return color;\n }\n}\n","/**\n * @module ol/has\n */\n\nconst ua =\n typeof navigator !== 'undefined' && typeof navigator.userAgent !== 'undefined'\n ? navigator.userAgent.toLowerCase()\n : '';\n\n/**\n * User agent string says we are dealing with Firefox as browser.\n * @type {boolean}\n */\nexport const FIREFOX = ua.indexOf('firefox') !== -1;\n\n/**\n * User agent string says we are dealing with Safari as browser.\n * @type {boolean}\n */\nexport const SAFARI = ua.indexOf('safari') !== -1 && ua.indexOf('chrom') == -1;\n\n/**\n * User agent string says we are dealing with a WebKit engine.\n * @type {boolean}\n */\nexport const WEBKIT = ua.indexOf('webkit') !== -1 && ua.indexOf('edge') == -1;\n\n/**\n * User agent string says we are dealing with a Mac as platform.\n * @type {boolean}\n */\nexport const MAC = ua.indexOf('macintosh') !== -1;\n\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 const DEVICE_PIXEL_RATIO =\n typeof devicePixelRatio !== 'undefined' ? devicePixelRatio : 1;\n\n/**\n * The execution context is a worker with OffscreenCanvas available.\n * @const\n * @type {boolean}\n */\nexport const WORKER_OFFSCREEN_CANVAS =\n typeof WorkerGlobalScope !== 'undefined' &&\n typeof OffscreenCanvas !== 'undefined' &&\n self instanceof WorkerGlobalScope; //eslint-disable-line\n\n/**\n * Image.prototype.decode() is supported.\n * @type {boolean}\n */\nexport const IMAGE_DECODE =\n typeof Image !== 'undefined' && Image.prototype.decode;\n\n/**\n * @type {boolean}\n */\nexport const PASSIVE_EVENT_LISTENERS = (function () {\n let passive = false;\n try {\n const options = Object.defineProperty({}, 'passive', {\n get: function () {\n passive = true;\n },\n });\n\n window.addEventListener('_', null, options);\n window.removeEventListener('_', null, options);\n } catch (error) {\n // passive not supported\n }\n return passive;\n})();\n","import {WORKER_OFFSCREEN_CANVAS} from './has.js';\n\n/**\n * @module ol/dom\n */\n\n//FIXME Move this function to the canvas module\n/**\n * Create an html canvas element and returns its 2d context.\n * @param {number=} opt_width Canvas width.\n * @param {number=} opt_height Canvas height.\n * @param {Array<HTMLCanvasElement>=} opt_canvasPool Canvas pool to take existing canvas from.\n * @return {CanvasRenderingContext2D} The context.\n */\nexport function createCanvasContext2D(opt_width, opt_height, opt_canvasPool) {\n const canvas =\n opt_canvasPool && opt_canvasPool.length\n ? opt_canvasPool.shift()\n : WORKER_OFFSCREEN_CANVAS\n ? new OffscreenCanvas(opt_width || 300, opt_height || 300)\n : document.createElement('canvas');\n if (opt_width) {\n canvas.width = opt_width;\n }\n if (opt_height) {\n canvas.height = opt_height;\n }\n //FIXME Allow OffscreenCanvasRenderingContext2D as return type\n return /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d'));\n}\n\n/**\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 let width = element.offsetWidth;\n const style = getComputedStyle(element);\n width += parseInt(style.marginLeft, 10) + parseInt(style.marginRight, 10);\n\n return width;\n}\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 let height = element.offsetHeight;\n const style = getComputedStyle(element);\n height += parseInt(style.marginTop, 10) + parseInt(style.marginBottom, 10);\n\n return height;\n}\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 const parent = oldNode.parentNode;\n if (parent) {\n parent.replaceChild(newNode, oldNode);\n }\n}\n\n/**\n * @param {Node} node The node to remove.\n * @returns {Node} The node that was removed or null.\n */\nexport function removeNode(node) {\n return node && node.parentNode ? node.parentNode.removeChild(node) : null;\n}\n\n/**\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/**\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<Node>} children The desired children.\n */\nexport function replaceChildren(node, children) {\n const oldChildren = node.childNodes;\n\n for (let i = 0; true; ++i) {\n const oldChild = oldChildren[i];\n const newChild = children[i];\n\n // check if our work is done\n if (!oldChild && !newChild) {\n break;\n }\n\n // check if children match\n if (oldChild === newChild) {\n continue;\n }\n\n // check if a new child needs to be added\n if (!oldChild) {\n node.appendChild(newChild);\n continue;\n }\n\n // check if an old child needs to be removed\n if (!newChild) {\n node.removeChild(oldChild);\n --i;\n continue;\n }\n\n // reorder\n node.insertBefore(newChild, oldChild);\n }\n}\n","/**\n * @module ol/css\n */\n\n/**\n * @typedef {Object} FontParameters\n * @property {string} style\n * @property {string} variant\n * @property {string} weight\n * @property {string} size\n * @property {string} lineHeight\n * @property {string} family\n * @property {Array<string>} families\n */\n\n/**\n * The CSS class for hidden feature.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_HIDDEN = 'ol-hidden';\n\n/**\n * The CSS class that we'll give the DOM elements to have them selectable.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_SELECTABLE = 'ol-selectable';\n\n/**\n * The CSS class that we'll give the DOM elements to have them unselectable.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_UNSELECTABLE = 'ol-unselectable';\n\n/**\n * The CSS class for unsupported feature.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_UNSUPPORTED = 'ol-unsupported';\n\n/**\n * The CSS class for controls.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_CONTROL = 'ol-control';\n\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 const CLASS_COLLAPSED = 'ol-collapsed';\n\n/**\n * From http://stackoverflow.com/questions/10135697/regex-to-parse-any-css-font\n * @type {RegExp}\n */\nconst fontRegEx = new RegExp(\n [\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(''),\n 'i'\n);\nconst fontRegExMatchIndex = [\n 'style',\n 'variant',\n 'weight',\n 'size',\n 'lineHeight',\n 'family',\n];\n\n/**\n * Get the list of font families from a font spec. Note that this doesn't work\n * for font families that have commas in them.\n * @param {string} fontSpec The CSS font property.\n * @return {FontParameters} The font parameters (or null if the input spec is invalid).\n */\nexport const getFontParameters = function (fontSpec) {\n const match = fontSpec.match(fontRegEx);\n if (!match) {\n return null;\n }\n const style = /** @type {FontParameters} */ ({\n lineHeight: 'normal',\n size: '1.2em',\n style: 'normal',\n weight: 'normal',\n variant: 'normal',\n });\n for (let i = 0, ii = fontRegExMatchIndex.length; i < ii; ++i) {\n const 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","/**\n * @module ol/render/canvas\n */\nimport BaseObject from '../Object.js';\nimport EventTarget from '../events/Target.js';\nimport {WORKER_OFFSCREEN_CANVAS} from '../has.js';\nimport {clear} from '../obj.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {getFontParameters} from '../css.js';\nimport {toString} from '../transform.js';\n\n/**\n * @typedef {Object} FillState\n * @property {import(\"../colorlike.js\").ColorLike} fillStyle\n */\n\n/**\n * @typedef Label\n * @property {number} width\n * @property {number} height\n * @property {Array<string|number>} contextInstructions\n */\n\n/**\n * @typedef {Object} FillStrokeState\n * @property {import(\"../colorlike.js\").ColorLike} [currentFillStyle]\n * @property {import(\"../colorlike.js\").ColorLike} [currentStrokeStyle]\n * @property {CanvasLineCap} [currentLineCap]\n * @property {Array<number>} currentLineDash\n * @property {number} [currentLineDashOffset]\n * @property {CanvasLineJoin} [currentLineJoin]\n * @property {number} [currentLineWidth]\n * @property {number} [currentMiterLimit]\n * @property {number} [lastStroke]\n * @property {import(\"../colorlike.js\").ColorLike} [fillStyle]\n * @property {import(\"../colorlike.js\").ColorLike} [strokeStyle]\n * @property {CanvasLineCap} [lineCap]\n * @property {Array<number>} lineDash\n * @property {number} [lineDashOffset]\n * @property {CanvasLineJoin} [lineJoin]\n * @property {number} [lineWidth]\n * @property {number} [miterLimit]\n */\n\n/**\n * @typedef {Object} StrokeState\n * @property {CanvasLineCap} lineCap\n * @property {Array<number>} lineDash\n * @property {number} lineDashOffset\n * @property {CanvasLineJoin} lineJoin\n * @property {number} lineWidth\n * @property {number} miterLimit\n * @property {import(\"../colorlike.js\").ColorLike} strokeStyle\n */\n\n/**\n * @typedef {Object} TextState\n * @property {string} font\n * @property {string} [textAlign]\n * @property {string} textBaseline\n * @property {string} [placement]\n * @property {number} [maxAngle]\n * @property {boolean} [overflow]\n * @property {import(\"../style/Fill.js\").default} [backgroundFill]\n * @property {import(\"../style/Stroke.js\").default} [backgroundStroke]\n * @property {import(\"../size.js\").Size} [scale]\n * @property {Array<number>} [padding]\n */\n\n/**\n * @typedef {Object} SerializableInstructions\n * @property {Array<*>} instructions The rendering instructions.\n * @property {Array<*>} hitDetectionInstructions The rendering hit detection instructions.\n * @property {Array<number>} coordinates The array of all coordinates.\n * @property {!Object<string, TextState>} [textStates] The text states (decluttering).\n * @property {!Object<string, FillState>} [fillStates] The fill states (decluttering).\n * @property {!Object<string, StrokeState>} [strokeStates] The stroke states (decluttering).\n */\n\n/**\n * @typedef {Object<number, import(\"./canvas/Executor.js\").ReplayImageOrLabelArgs>} DeclutterImageWithText\n */\n\n/**\n * @const\n * @type {string}\n */\nexport const defaultFont = '10px sans-serif';\n\n/**\n * @const\n * @type {import(\"../colorlike.js\").ColorLike}\n */\nexport const defaultFillStyle = '#000';\n\n/**\n * @const\n * @type {CanvasLineCap}\n */\nexport const defaultLineCap = 'round';\n\n/**\n * @const\n * @type {Array<number>}\n */\nexport const defaultLineDash = [];\n\n/**\n * @const\n * @type {number}\n */\nexport const defaultLineDashOffset = 0;\n\n/**\n * @const\n * @type {CanvasLineJoin}\n */\nexport const defaultLineJoin = 'round';\n\n/**\n * @const\n * @type {number}\n */\nexport const defaultMiterLimit = 10;\n\n/**\n * @const\n * @type {import(\"../colorlike.js\").ColorLike}\n */\nexport const defaultStrokeStyle = '#000';\n\n/**\n * @const\n * @type {string}\n */\nexport const defaultTextAlign = 'center';\n\n/**\n * @const\n * @type {string}\n */\nexport const defaultTextBaseline = 'middle';\n\n/**\n * @const\n * @type {Array<number>}\n */\nexport const defaultPadding = [0, 0, 0, 0];\n\n/**\n * @const\n * @type {number}\n */\nexport const defaultLineWidth = 1;\n\n/**\n * @type {BaseObject}\n */\nexport const checkedFonts = new BaseObject();\n\n/**\n * The label cache for text rendering. To change the default cache size of 2048\n * entries, use {@link module:ol/structs/LRUCache#setSize}.\n * Deprecated - there is no label cache any more.\n * @type {?}\n * @api\n * @deprecated\n */\nexport const labelCache = new EventTarget();\nlabelCache.setSize = function () {\n console.warn('labelCache is deprecated.'); //eslint-disable-line\n};\n\n/**\n * @type {CanvasRenderingContext2D}\n */\nlet measureContext = null;\n\n/**\n * @type {string}\n */\nlet measureFont;\n\n/**\n * @type {!Object<string, number>}\n */\nexport const textHeights = {};\n\n/**\n * Clears the label cache when a font becomes available.\n * @param {string} fontSpec CSS font spec.\n */\nexport const registerFont = (function () {\n const retries = 100;\n const size = '32px ';\n const referenceFonts = ['monospace', 'serif'];\n const len = referenceFonts.length;\n const text = 'wmytzilWMYTZIL@#/&?$%10\\uF013';\n let interval, referenceWidth;\n\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 let available = true;\n for (let i = 0; i < len; ++i) {\n const referenceFont = referenceFonts[i];\n referenceWidth = measureTextWidth(\n fontStyle + ' ' + fontWeight + ' ' + size + referenceFont,\n text\n );\n if (fontFamily != referenceFont) {\n const width = measureTextWidth(\n fontStyle +\n ' ' +\n fontWeight +\n ' ' +\n size +\n fontFamily +\n ',' +\n referenceFont,\n text\n );\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\n function check() {\n let done = true;\n const fonts = checkedFonts.getKeys();\n for (let i = 0, ii = fonts.length; i < ii; ++i) {\n const 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 } 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\n return function (fontSpec) {\n const font = getFontParameters(fontSpec);\n if (!font) {\n return;\n }\n const families = font.families;\n for (let i = 0, ii = families.length; i < ii; ++i) {\n const family = families[i];\n const 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/**\n * @param {string} font Font to use for measuring.\n * @return {import(\"../size.js\").Size} Measurement.\n */\nexport const measureTextHeight = (function () {\n /**\n * @type {HTMLDivElement}\n */\n let div;\n return function (fontSpec) {\n let height = textHeights[fontSpec];\n if (height == undefined) {\n if (WORKER_OFFSCREEN_CANVAS) {\n const font = getFontParameters(fontSpec);\n const metrics = measureText(fontSpec, 'Žg');\n const lineHeight = isNaN(Number(font.lineHeight))\n ? 1.2\n : Number(font.lineHeight);\n height =\n lineHeight *\n (metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent);\n } else {\n if (!div) {\n div = document.createElement('div');\n div.innerHTML = 'M';\n div.style.margin = '0 !important';\n div.style.padding = '0 !important';\n div.style.position = 'absolute !important';\n div.style.left = '-99999px !important';\n }\n div.style.font = fontSpec;\n document.body.appendChild(div);\n height = div.offsetHeight;\n document.body.removeChild(div);\n }\n textHeights[fontSpec] = height;\n }\n return height;\n };\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/**\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/**\n * Measure text width using a cache.\n * @param {string} font The font.\n * @param {string} text The text to measure.\n * @param {Object<string, number>} cache A lookup of cached widths by text.\n * @returns {number} The text width.\n */\nexport function measureAndCacheTextWidth(font, text, cache) {\n if (text in cache) {\n return cache[text];\n }\n const width = measureTextWidth(font, text);\n cache[text] = width;\n return width;\n}\n\n/**\n * @param {string} font Font to use for measuring.\n * @param {Array<string>} lines Lines to measure.\n * @param {Array<number>} widths Array will be populated with the widths of\n * each line.\n * @return {number} Width of the whole text.\n */\nexport function measureTextWidths(font, lines, widths) {\n const numLines = lines.length;\n let width = 0;\n for (let i = 0; i < numLines; ++i) {\n const currentWidth = measureTextWidth(font, lines[i]);\n width = Math.max(width, currentWidth);\n widths.push(currentWidth);\n }\n return width;\n}\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/**\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(\n context,\n transform,\n opacity,\n labelOrImage,\n originX,\n originY,\n w,\n h,\n x,\n y,\n scale\n) {\n context.save();\n\n if (opacity !== 1) {\n context.globalAlpha *= opacity;\n }\n if (transform) {\n context.setTransform.apply(context, transform);\n }\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 } 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),\n originX,\n originY,\n w,\n h,\n 0,\n 0,\n w,\n h\n );\n } else {\n // if image not flipped translate and scale can be avoided\n context.drawImage(\n /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ (labelOrImage),\n originX,\n originY,\n w,\n h,\n x,\n y,\n w * scale[0],\n h * scale[1]\n );\n }\n\n context.restore();\n}\n\n/**\n * @param {Label} label Label.\n * @param {CanvasRenderingContext2D} context Context.\n */\nfunction executeLabelInstructions(label, context) {\n const contextInstructions = label.contextInstructions;\n for (let i = 0, ii = contextInstructions.length; i < ii; i += 2) {\n if (Array.isArray(contextInstructions[i + 1])) {\n context[contextInstructions[i]].apply(\n context,\n contextInstructions[i + 1]\n );\n } else {\n context[contextInstructions[i]] = contextInstructions[i + 1];\n }\n }\n}\n\n/**\n * @type {HTMLCanvasElement}\n * @private\n */\nlet createTransformStringCanvas = null;\n\n/**\n * @param {import(\"../transform.js\").Transform} transform Transform.\n * @return {string} CSS transform.\n */\nexport function createTransformString(transform) {\n if (WORKER_OFFSCREEN_CANVAS) {\n return toString(transform);\n } else {\n if (!createTransformStringCanvas) {\n createTransformStringCanvas = createCanvasContext2D(1, 1).canvas;\n }\n createTransformStringCanvas.style.transform = toString(transform);\n return createTransformStringCanvas.style.transform;\n }\n}\n","/**\n * @module ol/style/RegularShape\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 {\n defaultFillStyle,\n defaultLineCap,\n defaultLineJoin,\n defaultLineWidth,\n defaultMiterLimit,\n defaultStrokeStyle,\n} from '../render/canvas.js';\n\n/**\n * Specify radius for regular polygons, or radius1 and radius2 for stars.\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} points Number of points for stars and regular polygons. In case of a polygon, the number of points\n * is the number of sides.\n * @property {number} [radius] Radius of a regular polygon.\n * @property {number} [radius1] Outer radius of a star.\n * @property {number} [radius2] Inner radius of a star.\n * @property {number} [angle=0] Shape's angle in radians. A value of 0 will have one of the shape's point facing up.\n * @property {Array<number>} [displacement=[0,0]] Displacement of the shape\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view.\n * @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 */\n\n/**\n * @typedef {Object} RenderOptions\n * @property {import(\"../colorlike.js\").ColorLike} [strokeStyle]\n * @property {number} strokeWidth\n * @property {number} size\n * @property {CanvasLineCap} lineCap\n * @property {Array<number>} lineDash\n * @property {number} lineDashOffset\n * @property {CanvasLineJoin} lineJoin\n * @property {number} miterLimit\n */\n\n/**\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 */\nclass RegularShape extends ImageStyle {\n /**\n * @param {Options} options Options.\n */\n constructor(options) {\n /**\n * @type {boolean}\n */\n const rotateWithView =\n options.rotateWithView !== undefined ? options.rotateWithView : false;\n\n super({\n opacity: 1,\n rotateWithView: rotateWithView,\n rotation: options.rotation !== undefined ? options.rotation : 0,\n scale: options.scale !== undefined ? options.scale : 1,\n displacement:\n options.displacement !== undefined ? options.displacement : [0, 0],\n });\n\n /**\n * @private\n * @type {Object<number, HTMLCanvasElement>}\n */\n this.canvas_ = {};\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.hitDetectionCanvas_ = null;\n\n /**\n * @private\n * @type {import(\"./Fill.js\").default}\n */\n this.fill_ = options.fill !== undefined ? options.fill : null;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.origin_ = [0, 0];\n\n /**\n * @private\n * @type {number}\n */\n this.points_ = options.points;\n\n /**\n * @protected\n * @type {number}\n */\n this.radius_ =\n options.radius !== undefined ? options.radius : options.radius1;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.radius2_ = options.radius2;\n\n /**\n * @private\n * @type {number}\n */\n this.angle_ = options.angle !== undefined ? options.angle : 0;\n\n /**\n * @private\n * @type {import(\"./Stroke.js\").default}\n */\n this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.anchor_ = null;\n\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.size_ = null;\n\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.imageSize_ = null;\n\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.hitDetectionImageSize_ = null;\n\n this.render();\n }\n\n /**\n * Clones the style.\n * @return {RegularShape} The cloned style.\n * @api\n */\n clone() {\n const scale = this.getScale();\n const 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 });\n style.setOpacity(this.getOpacity());\n return style;\n }\n\n /**\n * Get the anchor point in pixels. The anchor determines the center point for the\n * symbolizer.\n * @return {Array<number>} Anchor.\n * @api\n */\n getAnchor() {\n return this.anchor_;\n }\n\n /**\n * Get the angle used in generating the shape.\n * @return {number} Shape's rotation in radians.\n * @api\n */\n getAngle() {\n return this.angle_;\n }\n\n /**\n * Get the fill style for the shape.\n * @return {import(\"./Fill.js\").default} Fill style.\n * @api\n */\n getFill() {\n return this.fill_;\n }\n\n /**\n * @return {HTMLCanvasElement} Image element.\n */\n getHitDetectionImage() {\n if (!this.hitDetectionCanvas_) {\n const renderOptions = this.createRenderOptions();\n\n this.createHitDetectionCanvas_(renderOptions);\n }\n return this.hitDetectionCanvas_;\n }\n\n /**\n * Get the image icon.\n * @param {number} pixelRatio Pixel ratio.\n * @return {HTMLCanvasElement} Image or Canvas element.\n * @api\n */\n getImage(pixelRatio) {\n if (!this.canvas_[pixelRatio || 1]) {\n const renderOptions = this.createRenderOptions();\n\n const context = createCanvasContext2D(\n renderOptions.size * pixelRatio || 1,\n renderOptions.size * pixelRatio || 1\n );\n\n this.draw_(renderOptions, context, 0, 0, pixelRatio || 1);\n\n this.canvas_[pixelRatio || 1] = context.canvas;\n }\n return this.canvas_[pixelRatio || 1];\n }\n\n /*\n * Get the image pixel ratio.\n * @param {number} pixelRatio Pixel ratio.\n * */\n getPixelRatio(pixelRatio) {\n return pixelRatio;\n }\n\n /**\n * @return {import(\"../size.js\").Size} Image size.\n */\n getImageSize() {\n return this.imageSize_;\n }\n\n /**\n * @return {import(\"../size.js\").Size} Size of the hit-detection image.\n */\n getHitDetectionImageSize() {\n return this.hitDetectionImageSize_;\n }\n\n /**\n * @return {import(\"../ImageState.js\").default} Image state.\n */\n getImageState() {\n return ImageState.LOADED;\n }\n\n /**\n * Get the origin of the symbolizer.\n * @return {Array<number>} Origin.\n * @api\n */\n getOrigin() {\n return this.origin_;\n }\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 getPoints() {\n return this.points_;\n }\n\n /**\n * Get the (primary) radius for the shape.\n * @return {number} Radius.\n * @api\n */\n getRadius() {\n return this.radius_;\n }\n\n /**\n * Get the secondary radius for the shape.\n * @return {number|undefined} Radius2.\n * @api\n */\n getRadius2() {\n return this.radius2_;\n }\n\n /**\n * Get the size of the symbolizer (in pixels).\n * @return {import(\"../size.js\").Size} Size.\n * @api\n */\n getSize() {\n return this.size_;\n }\n\n /**\n * Get the stroke style for the shape.\n * @return {import(\"./Stroke.js\").default} Stroke style.\n * @api\n */\n getStroke() {\n return this.stroke_;\n }\n\n /**\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n */\n listenImageChange(listener) {}\n\n /**\n * Load not yet loaded URI.\n */\n load() {}\n\n /**\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n */\n unlistenImageChange(listener) {}\n\n /**\n * @returns {RenderOptions} The render options\n * @protected\n */\n createRenderOptions() {\n let lineCap = defaultLineCap;\n let lineJoin = defaultLineJoin;\n let miterLimit = 0;\n let lineDash = null;\n let lineDashOffset = 0;\n let strokeStyle;\n let strokeWidth = 0;\n\n if (this.stroke_) {\n strokeStyle = this.stroke_.getColor();\n if (strokeStyle === null) {\n strokeStyle = defaultStrokeStyle;\n }\n strokeStyle = asColorLike(strokeStyle);\n strokeWidth = this.stroke_.getWidth();\n if (strokeWidth === undefined) {\n strokeWidth = defaultLineWidth;\n }\n lineDash = this.stroke_.getLineDash();\n lineDashOffset = this.stroke_.getLineDashOffset();\n lineJoin = this.stroke_.getLineJoin();\n if (lineJoin === undefined) {\n lineJoin = defaultLineJoin;\n }\n lineCap = this.stroke_.getLineCap();\n if (lineCap === undefined) {\n lineCap = defaultLineCap;\n }\n miterLimit = this.stroke_.getMiterLimit();\n if (miterLimit === undefined) {\n miterLimit = defaultMiterLimit;\n }\n }\n\n const size = 2 * (this.radius_ + strokeWidth) + 1;\n\n return {\n strokeStyle: strokeStyle,\n strokeWidth: strokeWidth,\n size: size,\n lineCap: lineCap,\n lineDash: lineDash,\n lineDashOffset: lineDashOffset,\n lineJoin: lineJoin,\n miterLimit: miterLimit,\n };\n }\n\n /**\n * @protected\n */\n render() {\n const renderOptions = this.createRenderOptions();\n\n const context = createCanvasContext2D(\n renderOptions.size,\n renderOptions.size\n );\n\n this.draw_(renderOptions, context, 0, 0, 1);\n\n this.canvas_ = {};\n this.canvas_[1] = context.canvas;\n\n // canvas.width and height are rounded to the closest integer\n const size = context.canvas.width;\n const imageSize = size;\n const displacement = this.getDisplacement();\n\n this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];\n this.createHitDetectionCanvas_(renderOptions);\n\n this.anchor_ = [size / 2 - displacement[0], size / 2 + displacement[1]];\n this.size_ = [size, size];\n this.imageSize_ = [imageSize, imageSize];\n }\n\n /**\n * @private\n * @param {RenderOptions} renderOptions Render options.\n * @param {CanvasRenderingContext2D} context The rendering context.\n * @param {number} x The origin for the symbol (x).\n * @param {number} y The origin for the symbol (y).\n * @param {number} pixelRatio The pixel ratio.\n */\n draw_(renderOptions, context, x, y, pixelRatio) {\n let i, angle0, radiusC;\n\n // reset transform\n context.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n\n // then move to (x, y)\n context.translate(x, y);\n\n context.beginPath();\n\n let points = this.points_;\n if (points === Infinity) {\n context.arc(\n renderOptions.size / 2,\n renderOptions.size / 2,\n this.radius_,\n 0,\n 2 * Math.PI,\n true\n );\n } else {\n const radius2 =\n this.radius2_ !== undefined ? this.radius2_ : this.radius_;\n if (radius2 !== this.radius_) {\n points = 2 * points;\n }\n for (i = 0; i <= points; i++) {\n angle0 = (i * 2 * Math.PI) / points - Math.PI / 2 + this.angle_;\n radiusC = i % 2 === 0 ? this.radius_ : radius2;\n context.lineTo(\n renderOptions.size / 2 + radiusC * Math.cos(angle0),\n renderOptions.size / 2 + radiusC * Math.sin(angle0)\n );\n }\n }\n\n if (this.fill_) {\n let color = this.fill_.getColor();\n if (color === null) {\n color = defaultFillStyle;\n }\n context.fillStyle = asColorLike(color);\n context.fill();\n }\n if (this.stroke_) {\n context.strokeStyle = renderOptions.strokeStyle;\n context.lineWidth = renderOptions.strokeWidth;\n if (context.setLineDash && renderOptions.lineDash) {\n context.setLineDash(renderOptions.lineDash);\n context.lineDashOffset = renderOptions.lineDashOffset;\n }\n context.lineCap = renderOptions.lineCap;\n context.lineJoin = renderOptions.lineJoin;\n context.miterLimit = renderOptions.miterLimit;\n context.stroke();\n }\n context.closePath();\n }\n\n /**\n * @private\n * @param {RenderOptions} renderOptions Render options.\n */\n createHitDetectionCanvas_(renderOptions) {\n this.hitDetectionCanvas_ = this.getImage(1);\n if (this.fill_) {\n let color = this.fill_.getColor();\n\n // determine if fill is transparent (or pattern or gradient)\n let opacity = 0;\n if (typeof color === 'string') {\n color = asArray(color);\n }\n if (color === null) {\n opacity = 1;\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 const context = createCanvasContext2D(\n renderOptions.size,\n renderOptions.size\n );\n this.hitDetectionCanvas_ = context.canvas;\n\n this.drawHitDetectionCanvas_(renderOptions, context, 0, 0);\n }\n }\n }\n\n /**\n * @private\n * @param {RenderOptions} renderOptions Render options.\n * @param {CanvasRenderingContext2D} context The context.\n * @param {number} x The origin for the symbol (x).\n * @param {number} y The origin for the symbol (y).\n */\n drawHitDetectionCanvas_(renderOptions, context, x, y) {\n // move to (x, y)\n context.translate(x, y);\n\n context.beginPath();\n\n let points = this.points_;\n if (points === Infinity) {\n context.arc(\n renderOptions.size / 2,\n renderOptions.size / 2,\n this.radius_,\n 0,\n 2 * Math.PI,\n true\n );\n } else {\n const radius2 =\n this.radius2_ !== undefined ? this.radius2_ : this.radius_;\n if (radius2 !== this.radius_) {\n points = 2 * points;\n }\n let i, radiusC, angle0;\n for (i = 0; i <= points; i++) {\n angle0 = (i * 2 * Math.PI) / points - Math.PI / 2 + this.angle_;\n radiusC = i % 2 === 0 ? this.radius_ : radius2;\n context.lineTo(\n renderOptions.size / 2 + radiusC * Math.cos(angle0),\n renderOptions.size / 2 + radiusC * Math.sin(angle0)\n );\n }\n }\n\n context.fillStyle = defaultFillStyle;\n context.fill();\n if (this.stroke_) {\n context.strokeStyle = renderOptions.strokeStyle;\n context.lineWidth = renderOptions.strokeWidth;\n if (renderOptions.lineDash) {\n context.setLineDash(renderOptions.lineDash);\n context.lineDashOffset = renderOptions.lineDashOffset;\n }\n context.stroke();\n }\n context.closePath();\n }\n}\n\nexport default RegularShape;\n","/**\n * @module ol/style/Circle\n */\n\nimport RegularShape from './RegularShape.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} radius Circle radius.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {Array<number>} [displacement=[0,0]] displacement\n * @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 */\n\n/**\n * @classdesc\n * Set circle style for vector features.\n * @api\n */\nclass CircleStyle extends RegularShape {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n super({\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:\n options.rotateWithView !== undefined ? options.rotateWithView : false,\n displacement:\n options.displacement !== undefined ? options.displacement : [0, 0],\n });\n }\n\n /**\n * Clones the style.\n * @return {CircleStyle} The cloned style.\n * @api\n */\n clone() {\n const scale = this.getScale();\n const 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 });\n style.setOpacity(this.getOpacity());\n return style;\n }\n\n /**\n * Set the circle radius.\n *\n * @param {number} radius Circle radius.\n * @api\n */\n setRadius(radius) {\n this.radius_ = radius;\n this.render();\n }\n}\n\nexport default CircleStyle;\n","/**\n * @module ol/style/Style\n */\n\nimport CircleStyle from './Circle.js';\nimport Fill from './Fill.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport Stroke from './Stroke.js';\nimport {assert} from '../asserts.js';\n\n/**\n * A function that takes an {@link module:ol/Feature} and a `{number}`\n * representing the view's resolution. The function should return a\n * {@link module:ol/style/Style} or an array of them. This way e.g. a\n * vector layer can be styled. If the function returns `undefined`, the\n * feature will not be rendered.\n *\n * @typedef {function(import(\"../Feature.js\").FeatureLike, number):(Style|Array<Style>|void)} StyleFunction\n */\n\n/**\n * A {@link Style}, an array of {@link Style}, or a {@link StyleFunction}.\n * @typedef {Style|Array<Style>|StyleFunction} StyleLike\n */\n\n/**\n * A function that takes an {@link module:ol/Feature} as argument and returns an\n * {@link module:ol/geom/Geometry} that will be rendered and styled for the feature.\n *\n * @typedef {function(import(\"../Feature.js\").FeatureLike):\n * (import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default|undefined)} GeometryFunction\n */\n\n/**\n * Custom renderer function. Takes two arguments:\n *\n * 1. The pixel coordinates of the geometry in GeoJSON notation.\n * 2. The {@link module:ol/render~State} of the layer renderer.\n *\n * @typedef {function((import(\"../coordinate.js\").Coordinate|Array<import(\"../coordinate.js\").Coordinate>|Array<Array<import(\"../coordinate.js\").Coordinate>>),import(\"../render.js\").State): void}\n * RenderFunction\n */\n\n/**\n * @typedef {Object} Options\n * @property {string|import(\"../geom/Geometry.js\").default|GeometryFunction} [geometry] Feature property or geometry\n * or function returning a geometry to render for this style.\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {import(\"./Image.js\").default} [image] Image style.\n * @property {RenderFunction} [renderer] Custom renderer. When configured, `fill`, `stroke` and `image` will be\n * ignored, and the provided function will be called with each render frame for each geometry.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {import(\"./Text.js\").default} [text] Text style.\n * @property {number} [zIndex] Z index.\n */\n\n/**\n * @classdesc\n * Container for vector feature rendering styles. Any changes made to the style\n * or its children through `set*()` methods will not take effect until the\n * feature or layer that uses the style is re-rendered.\n *\n * ## Feature styles\n *\n * If no style is defined, the following default style is used:\n * ```js\n * import {Fill, Stroke, Circle, Style} from 'ol/style';\n *\n * var fill = new Fill({\n * color: 'rgba(255,255,255,0.4)'\n * });\n * var stroke = new Stroke({\n * color: '#3399CC',\n * width: 1.25\n * });\n * var styles = [\n * new Style({\n * image: new Circle({\n * fill: fill,\n * stroke: stroke,\n * radius: 5\n * }),\n * fill: fill,\n * stroke: stroke\n * })\n * ];\n * ```\n *\n * A separate editing style has the following defaults:\n * ```js\n * import {Fill, Stroke, Circle, Style} from 'ol/style';\n * import GeometryType from 'ol/geom/GeometryType';\n *\n * var white = [255, 255, 255, 1];\n * var blue = [0, 153, 255, 1];\n * var width = 3;\n * styles[GeometryType.POLYGON] = [\n * new Style({\n * fill: new Fill({\n * color: [255, 255, 255, 0.5]\n * })\n * })\n * ];\n * styles[GeometryType.MULTI_POLYGON] =\n * styles[GeometryType.POLYGON];\n * styles[GeometryType.LINE_STRING] = [\n * new Style({\n * stroke: new Stroke({\n * color: white,\n * width: width + 2\n * })\n * }),\n * new Style({\n * stroke: new Stroke({\n * color: blue,\n * width: width\n * })\n * })\n * ];\n * styles[GeometryType.MULTI_LINE_STRING] =\n * styles[GeometryType.LINE_STRING];\n * styles[GeometryType.POINT] = [\n * new Style({\n * image: new Circle({\n * radius: width * 2,\n * fill: new Fill({\n * color: blue\n * }),\n * stroke: new Stroke({\n * color: white,\n * width: width / 2\n * })\n * }),\n * zIndex: Infinity\n * })\n * ];\n * styles[GeometryType.MULTI_POINT] =\n * styles[GeometryType.POINT];\n * styles[GeometryType.GEOMETRY_COLLECTION] =\n * styles[GeometryType.POLYGON].concat(\n * styles[GeometryType.LINE_STRING],\n * styles[GeometryType.POINT]\n * );\n * ```\n *\n * @api\n */\nclass Style {\n /**\n * @param {Options=} opt_options Style options.\n */\n constructor(opt_options) {\n const options = opt_options || {};\n\n /**\n * @private\n * @type {string|import(\"../geom/Geometry.js\").default|GeometryFunction}\n */\n this.geometry_ = null;\n\n /**\n * @private\n * @type {!GeometryFunction}\n */\n this.geometryFunction_ = defaultGeometryFunction;\n\n if (options.geometry !== undefined) {\n this.setGeometry(options.geometry);\n }\n\n /**\n * @private\n * @type {import(\"./Fill.js\").default}\n */\n this.fill_ = options.fill !== undefined ? options.fill : null;\n\n /**\n * @private\n * @type {import(\"./Image.js\").default}\n */\n this.image_ = options.image !== undefined ? options.image : null;\n\n /**\n * @private\n * @type {RenderFunction|null}\n */\n this.renderer_ = options.renderer !== undefined ? options.renderer : null;\n\n /**\n * @private\n * @type {import(\"./Stroke.js\").default}\n */\n this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n\n /**\n * @private\n * @type {import(\"./Text.js\").default}\n */\n this.text_ = options.text !== undefined ? options.text : null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.zIndex_ = options.zIndex;\n }\n\n /**\n * Clones the style.\n * @return {Style} The cloned style.\n * @api\n */\n clone() {\n let geometry = this.getGeometry();\n if (geometry && typeof geometry === 'object') {\n geometry = /** @type {import(\"../geom/Geometry.js\").default} */ (geometry).clone();\n }\n return new Style({\n geometry: geometry,\n fill: this.getFill() ? this.getFill().clone() : undefined,\n image: this.getImage() ? this.getImage().clone() : undefined,\n stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n text: this.getText() ? this.getText().clone() : undefined,\n zIndex: this.getZIndex(),\n });\n }\n\n /**\n * Get the custom renderer function that was configured with\n * {@link #setRenderer} or the `renderer` constructor option.\n * @return {RenderFunction|null} Custom renderer function.\n * @api\n */\n getRenderer() {\n return this.renderer_;\n }\n\n /**\n * Sets a custom renderer function for this style. When set, `fill`, `stroke`\n * and `image` options of the style will be ignored.\n * @param {RenderFunction|null} renderer Custom renderer function.\n * @api\n */\n setRenderer(renderer) {\n this.renderer_ = renderer;\n }\n\n /**\n * Get the geometry to be rendered.\n * @return {string|import(\"../geom/Geometry.js\").default|GeometryFunction}\n * Feature property or geometry or function that returns the geometry that will\n * be rendered with this style.\n * @api\n */\n getGeometry() {\n return this.geometry_;\n }\n\n /**\n * Get the function used to generate a geometry for rendering.\n * @return {!GeometryFunction} Function that is called with a feature\n * and returns the geometry to render instead of the feature's geometry.\n * @api\n */\n getGeometryFunction() {\n return this.geometryFunction_;\n }\n\n /**\n * Get the fill style.\n * @return {import(\"./Fill.js\").default} Fill style.\n * @api\n */\n getFill() {\n return this.fill_;\n }\n\n /**\n * Set the fill style.\n * @param {import(\"./Fill.js\").default} fill Fill style.\n * @api\n */\n setFill(fill) {\n this.fill_ = fill;\n }\n\n /**\n * Get the image style.\n * @return {import(\"./Image.js\").default} Image style.\n * @api\n */\n getImage() {\n return this.image_;\n }\n\n /**\n * Set the image style.\n * @param {import(\"./Image.js\").default} image Image style.\n * @api\n */\n setImage(image) {\n this.image_ = image;\n }\n\n /**\n * Get the stroke style.\n * @return {import(\"./Stroke.js\").default} Stroke style.\n * @api\n */\n getStroke() {\n return this.stroke_;\n }\n\n /**\n * Set the stroke style.\n * @param {import(\"./Stroke.js\").default} stroke Stroke style.\n * @api\n */\n setStroke(stroke) {\n this.stroke_ = stroke;\n }\n\n /**\n * Get the text style.\n * @return {import(\"./Text.js\").default} Text style.\n * @api\n */\n getText() {\n return this.text_;\n }\n\n /**\n * Set the text style.\n * @param {import(\"./Text.js\").default} text Text style.\n * @api\n */\n setText(text) {\n this.text_ = text;\n }\n\n /**\n * Get the z-index for the style.\n * @return {number|undefined} ZIndex.\n * @api\n */\n getZIndex() {\n return this.zIndex_;\n }\n\n /**\n * Set a geometry that is rendered instead of the feature's geometry.\n *\n * @param {string|import(\"../geom/Geometry.js\").default|GeometryFunction} geometry\n * Feature property or geometry or function returning a geometry to render\n * for this style.\n * @api\n */\n setGeometry(geometry) {\n if (typeof geometry === 'function') {\n this.geometryFunction_ = geometry;\n } else if (typeof geometry === 'string') {\n this.geometryFunction_ = function (feature) {\n return /** @type {import(\"../geom/Geometry.js\").default} */ (feature.get(\n geometry\n ));\n };\n } else if (!geometry) {\n this.geometryFunction_ = defaultGeometryFunction;\n } else if (geometry !== undefined) {\n this.geometryFunction_ = function () {\n return /** @type {import(\"../geom/Geometry.js\").default} */ (geometry);\n };\n }\n this.geometry_ = geometry;\n }\n\n /**\n * Set the z-index.\n *\n * @param {number|undefined} zIndex ZIndex.\n * @api\n */\n setZIndex(zIndex) {\n this.zIndex_ = zIndex;\n }\n}\n\n/**\n * Convert the provided object into a style function. Functions passed through\n * unchanged. Arrays of Style or single style objects wrapped in a\n * new style function.\n * @param {StyleFunction|Array<Style>|Style} obj\n * A style function, a single style, or an array of styles.\n * @return {StyleFunction} A style function.\n */\nexport function toFunction(obj) {\n let styleFunction;\n\n if (typeof obj === 'function') {\n styleFunction = obj;\n } else {\n /**\n * @type {Array<Style>}\n */\n let styles;\n if (Array.isArray(obj)) {\n styles = obj;\n } else {\n assert(typeof (/** @type {?} */ (obj).getZIndex) === 'function', 41); // Expected an `Style` or an array of `Style`\n const style = /** @type {Style} */ (obj);\n styles = [style];\n }\n styleFunction = function () {\n return styles;\n };\n }\n return styleFunction;\n}\n\n/**\n * @type {Array<Style>}\n */\nlet defaultStyles = null;\n\n/**\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} resolution Resolution.\n * @return {Array<Style>} Style.\n */\nexport function createDefaultStyle(feature, resolution) {\n // We don't use an immediately-invoked function\n // and a closure so we don't get an error at script evaluation time in\n // browsers that do not support Canvas. (import(\"./Circle.js\").CircleStyle does\n // canvas.getContext('2d') at construction time, which will cause an.error\n // in such browsers.)\n if (!defaultStyles) {\n const fill = new Fill({\n color: 'rgba(255,255,255,0.4)',\n });\n const stroke = new Stroke({\n color: '#3399CC',\n width: 1.25,\n });\n defaultStyles = [\n new Style({\n image: new CircleStyle({\n fill: fill,\n stroke: stroke,\n radius: 5,\n }),\n fill: fill,\n stroke: stroke,\n }),\n ];\n }\n return defaultStyles;\n}\n\n/**\n * Default styles for editing features.\n * @return {Object<import(\"../geom/GeometryType.js\").default, Array<Style>>} Styles\n */\nexport function createEditingStyle() {\n /** @type {Object<import(\"../geom/GeometryType.js\").default, Array<Style>>} */\n const styles = {};\n const white = [255, 255, 255, 1];\n const blue = [0, 153, 255, 1];\n const width = 3;\n styles[GeometryType.POLYGON] = [\n new Style({\n fill: new Fill({\n color: [255, 255, 255, 0.5],\n }),\n }),\n ];\n styles[GeometryType.MULTI_POLYGON] = styles[GeometryType.POLYGON];\n\n styles[GeometryType.LINE_STRING] = [\n new Style({\n stroke: new Stroke({\n color: white,\n width: width + 2,\n }),\n }),\n new Style({\n stroke: new Stroke({\n color: blue,\n width: width,\n }),\n }),\n ];\n styles[GeometryType.MULTI_LINE_STRING] = styles[GeometryType.LINE_STRING];\n\n styles[GeometryType.CIRCLE] = styles[GeometryType.POLYGON].concat(\n styles[GeometryType.LINE_STRING]\n );\n\n styles[GeometryType.POINT] = [\n new Style({\n image: new CircleStyle({\n radius: width * 2,\n fill: new Fill({\n color: blue,\n }),\n stroke: new Stroke({\n color: white,\n width: width / 2,\n }),\n }),\n zIndex: Infinity,\n }),\n ];\n styles[GeometryType.MULTI_POINT] = styles[GeometryType.POINT];\n\n styles[GeometryType.GEOMETRY_COLLECTION] = styles[\n GeometryType.POLYGON\n ].concat(styles[GeometryType.LINE_STRING], styles[GeometryType.POINT]);\n\n return styles;\n}\n\n/**\n * Function that is called with a feature and returns its default geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature to get the geometry for.\n * @return {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default|undefined} Geometry to render.\n */\nfunction defaultGeometryFunction(feature) {\n return feature.getGeometry();\n}\n\nexport default Style;\n","/**\n * @module ol/style/TextPlacement\n */\n\n/**\n * Text placement. One of `'point'`, `'line'`. Default is `'point'`. Note that\n * `'line'` requires the underlying geometry to be a {@link module:ol/geom/LineString~LineString},\n * {@link module:ol/geom/Polygon~Polygon}, {@link module:ol/geom/MultiLineString~MultiLineString} or\n * {@link module:ol/geom/MultiPolygon~MultiPolygon}.\n * @enum {string}\n */\nexport default {\n POINT: 'point',\n LINE: 'line',\n};\n","/**\n * @module ol/style/Text\n */\nimport Fill from './Fill.js';\nimport TextPlacement from './TextPlacement.js';\nimport {toSize} from '../size.js';\n\n/**\n * The default fill color to use if no fill was set at construction time; a\n * blackish `#333`.\n *\n * @const {string}\n */\nconst DEFAULT_FILL_COLOR = '#333';\n\n/**\n * @typedef {Object} Options\n * @property {string} [font] Font style as CSS 'font' value, see:\n * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/font. Default is '10px sans-serif'\n * @property {number} [maxAngle=Math.PI/4] When `placement` is set to `'line'`, allow a maximum angle between adjacent characters.\n * The expected value is in radians, and the default is 45° (`Math.PI / 4`).\n * @property {number} [offsetX=0] Horizontal text offset in pixels. A positive will shift the text right.\n * @property {number} [offsetY=0] Vertical text offset in pixels. A positive will shift the text down.\n * @property {boolean} [overflow=false] For polygon labels or when `placement` is set to `'line'`, allow text to exceed\n * the width of the polygon at the label position or the length of the path that it follows.\n * @property {import(\"./TextPlacement.js\").default|string} [placement='point'] Text placement.\n * @property {number|import(\"../size.js\").Size} [scale] Scale.\n * @property {boolean} [rotateWithView=false] Whether to rotate the text with the view.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {string} [text] Text content.\n * @property {string} [textAlign] Text alignment. Possible values: 'left', 'right', 'center', 'end' or 'start'.\n * Default is 'center' for `placement: 'point'`. For `placement: 'line'`, the default is to let the renderer choose a\n * placement where `maxAngle` is not exceeded.\n * @property {string} [textBaseline='middle'] Text base line. Possible values: 'bottom', 'top', 'middle', 'alphabetic',\n * 'hanging', 'ideographic'.\n * @property {import(\"./Fill.js\").default} [fill] Fill style. If none is provided, we'll use a dark fill-style (#333).\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {import(\"./Fill.js\").default} [backgroundFill] Fill style for the text background when `placement` is\n * `'point'`. Default is no fill.\n * @property {import(\"./Stroke.js\").default} [backgroundStroke] Stroke style for the text background when `placement`\n * is `'point'`. Default is no stroke.\n * @property {Array<number>} [padding=[0, 0, 0, 0]] Padding in pixels around the text for decluttering and background. The order of\n * values in the array is `[top, right, bottom, left]`.\n */\n\n/**\n * @classdesc\n * Set text style for vector features.\n * @api\n */\nclass Text {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options || {};\n\n /**\n * @private\n * @type {string|undefined}\n */\n this.font_ = options.font;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.rotation_ = options.rotation;\n\n /**\n * @private\n * @type {boolean|undefined}\n */\n this.rotateWithView_ = options.rotateWithView;\n\n /**\n * @private\n * @type {number|import(\"../size.js\").Size|undefined}\n */\n this.scale_ = options.scale;\n\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.scaleArray_ = toSize(options.scale !== undefined ? options.scale : 1);\n\n /**\n * @private\n * @type {string|undefined}\n */\n this.text_ = options.text;\n\n /**\n * @private\n * @type {string|undefined}\n */\n this.textAlign_ = options.textAlign;\n\n /**\n * @private\n * @type {string|undefined}\n */\n this.textBaseline_ = options.textBaseline;\n\n /**\n * @private\n * @type {import(\"./Fill.js\").default}\n */\n this.fill_ =\n options.fill !== undefined\n ? options.fill\n : new Fill({color: DEFAULT_FILL_COLOR});\n\n /**\n * @private\n * @type {number}\n */\n this.maxAngle_ =\n options.maxAngle !== undefined ? options.maxAngle : Math.PI / 4;\n\n /**\n * @private\n * @type {import(\"./TextPlacement.js\").default|string}\n */\n this.placement_ =\n options.placement !== undefined ? options.placement : TextPlacement.POINT;\n\n /**\n * @private\n * @type {boolean}\n */\n this.overflow_ = !!options.overflow;\n\n /**\n * @private\n * @type {import(\"./Stroke.js\").default}\n */\n this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n\n /**\n * @private\n * @type {number}\n */\n this.offsetX_ = options.offsetX !== undefined ? options.offsetX : 0;\n\n /**\n * @private\n * @type {number}\n */\n this.offsetY_ = options.offsetY !== undefined ? options.offsetY : 0;\n\n /**\n * @private\n * @type {import(\"./Fill.js\").default}\n */\n this.backgroundFill_ = options.backgroundFill\n ? options.backgroundFill\n : null;\n\n /**\n * @private\n * @type {import(\"./Stroke.js\").default}\n */\n this.backgroundStroke_ = options.backgroundStroke\n ? options.backgroundStroke\n : null;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.padding_ = options.padding === undefined ? null : options.padding;\n }\n\n /**\n * Clones the style.\n * @return {Text} The cloned style.\n * @api\n */\n clone() {\n const scale = this.getScale();\n return new Text({\n font: this.getFont(),\n placement: this.getPlacement(),\n maxAngle: this.getMaxAngle(),\n overflow: this.getOverflow(),\n rotation: this.getRotation(),\n rotateWithView: this.getRotateWithView(),\n scale: Array.isArray(scale) ? scale.slice() : scale,\n text: this.getText(),\n textAlign: this.getTextAlign(),\n textBaseline: this.getTextBaseline(),\n fill: this.getFill() ? this.getFill().clone() : undefined,\n stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n offsetX: this.getOffsetX(),\n offsetY: this.getOffsetY(),\n backgroundFill: this.getBackgroundFill()\n ? this.getBackgroundFill().clone()\n : undefined,\n backgroundStroke: this.getBackgroundStroke()\n ? this.getBackgroundStroke().clone()\n : undefined,\n padding: this.getPadding(),\n });\n }\n\n /**\n * Get the `overflow` configuration.\n * @return {boolean} Let text overflow the length of the path they follow.\n * @api\n */\n getOverflow() {\n return this.overflow_;\n }\n\n /**\n * Get the font name.\n * @return {string|undefined} Font.\n * @api\n */\n getFont() {\n return this.font_;\n }\n\n /**\n * Get the maximum angle between adjacent characters.\n * @return {number} Angle in radians.\n * @api\n */\n getMaxAngle() {\n return this.maxAngle_;\n }\n\n /**\n * Get the label placement.\n * @return {import(\"./TextPlacement.js\").default|string} Text placement.\n * @api\n */\n getPlacement() {\n return this.placement_;\n }\n\n /**\n * Get the x-offset for the text.\n * @return {number} Horizontal text offset.\n * @api\n */\n getOffsetX() {\n return this.offsetX_;\n }\n\n /**\n * Get the y-offset for the text.\n * @return {number} Vertical text offset.\n * @api\n */\n getOffsetY() {\n return this.offsetY_;\n }\n\n /**\n * Get the fill style for the text.\n * @return {import(\"./Fill.js\").default} Fill style.\n * @api\n */\n getFill() {\n return this.fill_;\n }\n\n /**\n * Determine whether the text rotates with the map.\n * @return {boolean|undefined} Rotate with map.\n * @api\n */\n getRotateWithView() {\n return this.rotateWithView_;\n }\n\n /**\n * Get the text rotation.\n * @return {number|undefined} Rotation.\n * @api\n */\n getRotation() {\n return this.rotation_;\n }\n\n /**\n * Get the text scale.\n * @return {number|import(\"../size.js\").Size|undefined} Scale.\n * @api\n */\n getScale() {\n return this.scale_;\n }\n\n /**\n * Get the symbolizer scale array.\n * @return {import(\"../size.js\").Size} Scale array.\n */\n getScaleArray() {\n return this.scaleArray_;\n }\n\n /**\n * Get the stroke style for the text.\n * @return {import(\"./Stroke.js\").default} Stroke style.\n * @api\n */\n getStroke() {\n return this.stroke_;\n }\n\n /**\n * Get the text to be rendered.\n * @return {string|undefined} Text.\n * @api\n */\n getText() {\n return this.text_;\n }\n\n /**\n * Get the text alignment.\n * @return {string|undefined} Text align.\n * @api\n */\n getTextAlign() {\n return this.textAlign_;\n }\n\n /**\n * Get the text baseline.\n * @return {string|undefined} Text baseline.\n * @api\n */\n getTextBaseline() {\n return this.textBaseline_;\n }\n\n /**\n * Get the background fill style for the text.\n * @return {import(\"./Fill.js\").default} Fill style.\n * @api\n */\n getBackgroundFill() {\n return this.backgroundFill_;\n }\n\n /**\n * Get the background stroke style for the text.\n * @return {import(\"./Stroke.js\").default} Stroke style.\n * @api\n */\n getBackgroundStroke() {\n return this.backgroundStroke_;\n }\n\n /**\n * Get the padding for the text.\n * @return {Array<number>} Padding.\n * @api\n */\n getPadding() {\n return this.padding_;\n }\n\n /**\n * Set the `overflow` property.\n *\n * @param {boolean} overflow Let text overflow the path that it follows.\n * @api\n */\n setOverflow(overflow) {\n this.overflow_ = overflow;\n }\n\n /**\n * Set the font.\n *\n * @param {string|undefined} font Font.\n * @api\n */\n setFont(font) {\n this.font_ = font;\n }\n\n /**\n * Set the maximum angle between adjacent characters.\n *\n * @param {number} maxAngle Angle in radians.\n * @api\n */\n setMaxAngle(maxAngle) {\n this.maxAngle_ = maxAngle;\n }\n\n /**\n * Set the x offset.\n *\n * @param {number} offsetX Horizontal text offset.\n * @api\n */\n setOffsetX(offsetX) {\n this.offsetX_ = offsetX;\n }\n\n /**\n * Set the y offset.\n *\n * @param {number} offsetY Vertical text offset.\n * @api\n */\n setOffsetY(offsetY) {\n this.offsetY_ = offsetY;\n }\n\n /**\n * Set the text placement.\n *\n * @param {import(\"./TextPlacement.js\").default|string} placement Placement.\n * @api\n */\n setPlacement(placement) {\n this.placement_ = placement;\n }\n\n /**\n * Set whether to rotate the text with the view.\n *\n * @param {boolean} rotateWithView Rotate with map.\n * @api\n */\n setRotateWithView(rotateWithView) {\n this.rotateWithView_ = rotateWithView;\n }\n\n /**\n * Set the fill.\n *\n * @param {import(\"./Fill.js\").default} fill Fill style.\n * @api\n */\n setFill(fill) {\n this.fill_ = fill;\n }\n\n /**\n * Set the rotation.\n *\n * @param {number|undefined} rotation Rotation.\n * @api\n */\n setRotation(rotation) {\n this.rotation_ = rotation;\n }\n\n /**\n * Set the scale.\n *\n * @param {number|import(\"../size.js\").Size|undefined} scale Scale.\n * @api\n */\n setScale(scale) {\n this.scale_ = scale;\n this.scaleArray_ = toSize(scale !== undefined ? scale : 1);\n }\n\n /**\n * Set the stroke.\n *\n * @param {import(\"./Stroke.js\").default} stroke Stroke style.\n * @api\n */\n setStroke(stroke) {\n this.stroke_ = stroke;\n }\n\n /**\n * Set the text.\n *\n * @param {string|undefined} text Text.\n * @api\n */\n setText(text) {\n this.text_ = text;\n }\n\n /**\n * Set the text alignment.\n *\n * @param {string|undefined} textAlign Text align.\n * @api\n */\n setTextAlign(textAlign) {\n this.textAlign_ = textAlign;\n }\n\n /**\n * Set the text baseline.\n *\n * @param {string|undefined} textBaseline Text baseline.\n * @api\n */\n setTextBaseline(textBaseline) {\n this.textBaseline_ = textBaseline;\n }\n\n /**\n * Set the background fill.\n *\n * @param {import(\"./Fill.js\").default} fill Fill style.\n * @api\n */\n setBackgroundFill(fill) {\n this.backgroundFill_ = fill;\n }\n\n /**\n * Set the background stroke.\n *\n * @param {import(\"./Stroke.js\").default} stroke Stroke style.\n * @api\n */\n setBackgroundStroke(stroke) {\n this.backgroundStroke_ = stroke;\n }\n\n /**\n * Set the padding (`[top, right, bottom, left]`).\n *\n * @param {!Array<number>} padding Padding.\n * @api\n */\n setPadding(padding) {\n this.padding_ = padding;\n }\n}\n\nexport default Text;\n","/**\n * @module ol/layer/Property\n */\n\n/**\n * @enum {string}\n */\nexport default {\n OPACITY: 'opacity',\n VISIBLE: 'visible',\n EXTENT: 'extent',\n Z_INDEX: 'zIndex',\n MAX_RESOLUTION: 'maxResolution',\n MIN_RESOLUTION: 'minResolution',\n MAX_ZOOM: 'maxZoom',\n MIN_ZOOM: 'minZoom',\n SOURCE: 'source',\n};\n","/**\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/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Note that with {@link module:ol/layer/Base} and all its subclasses, any property set in\n * the options is set as a {@link module:ol/Object} property on the layer object, so\n * is observable, and has get/set accessors.\n *\n * @api\n */\nclass BaseLayer extends BaseObject {\n /**\n * @param {Options} options Layer options.\n */\n constructor(options) {\n super();\n\n /**\n * @type {Object<string, *>}\n */\n const properties = assign({}, options);\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\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 /**\n * @type {string}\n * @private\n */\n this.className_ =\n properties.className !== undefined ? options.className : 'ol-layer';\n delete properties.className;\n\n this.setProperties(properties);\n\n /**\n * @type {import(\"./Layer.js\").State}\n * @private\n */\n this.state_ = null;\n }\n\n /**\n * @return {string} CSS class name.\n */\n getClassName() {\n return this.className_;\n }\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 getLayerState(opt_managed) {\n /** @type {import(\"./Layer.js\").State} */\n const state =\n this.state_ ||\n /** @type {?} */ ({\n layer: this,\n managed: opt_managed === undefined ? true : opt_managed,\n });\n const zIndex = this.getZIndex();\n state.opacity = clamp(Math.round(this.getOpacity() * 100) / 100, 0, 1);\n state.sourceState = this.getSourceState();\n state.visible = this.getVisible();\n state.extent = this.getExtent();\n state.zIndex =\n zIndex !== undefined ? zIndex : state.managed === false ? Infinity : 0;\n state.maxResolution = this.getMaxResolution();\n state.minResolution = Math.max(this.getMinResolution(), 0);\n state.minZoom = this.getMinZoom();\n state.maxZoom = this.getMaxZoom();\n this.state_ = state;\n\n return state;\n }\n\n /**\n * @abstract\n * @param {Array<import(\"./Layer.js\").default>=} opt_array Array of layers (to be\n * modified in place).\n * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n */\n getLayersArray(opt_array) {\n return abstract();\n }\n\n /**\n * @abstract\n * @param {Array<import(\"./Layer.js\").State>=} opt_states Optional list of layer\n * states (to be modified in place).\n * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n */\n getLayerStatesArray(opt_states) {\n return abstract();\n }\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 getExtent() {\n return /** @type {import(\"../extent.js\").Extent|undefined} */ (this.get(\n LayerProperty.EXTENT\n ));\n }\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 getMaxResolution() {\n return /** @type {number} */ (this.get(LayerProperty.MAX_RESOLUTION));\n }\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 getMinResolution() {\n return /** @type {number} */ (this.get(LayerProperty.MIN_RESOLUTION));\n }\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 getMinZoom() {\n return /** @type {number} */ (this.get(LayerProperty.MIN_ZOOM));\n }\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 getMaxZoom() {\n return /** @type {number} */ (this.get(LayerProperty.MAX_ZOOM));\n }\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 getOpacity() {\n return /** @type {number} */ (this.get(LayerProperty.OPACITY));\n }\n\n /**\n * @abstract\n * @return {import(\"../source/State.js\").default} Source state.\n */\n getSourceState() {\n return abstract();\n }\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 getVisible() {\n return /** @type {boolean} */ (this.get(LayerProperty.VISIBLE));\n }\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 getZIndex() {\n return /** @type {number} */ (this.get(LayerProperty.Z_INDEX));\n }\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 setExtent(extent) {\n this.set(LayerProperty.EXTENT, extent);\n }\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 setMaxResolution(maxResolution) {\n this.set(LayerProperty.MAX_RESOLUTION, maxResolution);\n }\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 setMinResolution(minResolution) {\n this.set(LayerProperty.MIN_RESOLUTION, minResolution);\n }\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 setMaxZoom(maxZoom) {\n this.set(LayerProperty.MAX_ZOOM, maxZoom);\n }\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 setMinZoom(minZoom) {\n this.set(LayerProperty.MIN_ZOOM, minZoom);\n }\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 setOpacity(opacity) {\n assert(typeof opacity === 'number', 64); // Layer opacity must be a number\n this.set(LayerProperty.OPACITY, opacity);\n }\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 setVisible(visible) {\n this.set(LayerProperty.VISIBLE, visible);\n }\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 setZIndex(zindex) {\n this.set(LayerProperty.Z_INDEX, zindex);\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n if (this.state_) {\n this.state_.layer = null;\n this.state_ = null;\n }\n super.disposeInternal();\n }\n}\n\nexport default BaseLayer;\n","/**\n * @module ol/source/State\n */\n\n/**\n * @enum {string}\n * State of the source, one of 'undefined', 'loading', 'ready' or 'error'.\n */\nexport default {\n UNDEFINED: 'undefined',\n LOADING: 'loading',\n READY: 'ready',\n ERROR: 'error',\n};\n","/**\n * @module ol/layer/Layer\n */\nimport BaseLayer from './Base.js';\nimport EventType from '../events/EventType.js';\nimport LayerProperty from './Property.js';\nimport RenderEventType from '../render/EventType.js';\nimport SourceState from '../source/State.js';\nimport {assert} from '../asserts.js';\nimport {assign} from '../obj.js';\nimport {getChangeEventType} from '../Object.js';\nimport {listen, unlistenByKey} from '../events.js';\n\n/**\n * @typedef {function(import(\"../PluggableMap.js\").FrameState):HTMLElement} RenderFunction\n */\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 {import(\"../source/Source.js\").default} [source] Source for this layer. If not provided to the constructor,\n * the source can be set by calling {@link module:ol/layer/Layer#setSource layer.setSource(source)} after\n * construction.\n * @property {import(\"../PluggableMap.js\").default} [map] Map.\n * @property {RenderFunction} [render] Render function. Takes the frame state as input and is expected to return an\n * HTML element. Will overwrite the default rendering for the layer.\n */\n\n/**\n * @typedef {Object} State\n * @property {import(\"./Layer.js\").default} layer\n * @property {number} opacity Opacity, the value is rounded to two digits to appear after the decimal point.\n * @property {import(\"../source/State.js\").default} sourceState\n * @property {boolean} visible\n * @property {boolean} managed\n * @property {import(\"../extent.js\").Extent} [extent]\n * @property {number} zIndex\n * @property {number} maxResolution\n * @property {number} minResolution\n * @property {number} minZoom\n * @property {number} maxZoom\n */\n\n/**\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 be added to the map with a custom `render` function.\n * Such a function can be specified in the `options` object, and is expected to return an HTML element.\n *\n * A visual representation of raster or vector map data.\n * Layers group together those properties that pertain to how the data is to be\n * displayed, irrespective of the source of that data.\n *\n * Layers are usually added to a map with {@link module:ol/Map#addLayer}. Components\n * like {@link module:ol/interaction/Select~Select} use unmanaged layers\n * internally. These unmanaged layers are associated with the map using\n * {@link module:ol/layer/Layer~Layer#setMap} instead.\n *\n * A generic `change` event is fired when the state of the source changes.\n *\n * Please note that for performance reasons several layers might get rendered to\n * the same HTML element, which will cause {@link module:ol/Map~Map#forEachLayerAtPixel} to\n * give false positives. To avoid this, apply different `className` properties to the\n * layers at creation time.\n *\n * @fires import(\"../render/Event.js\").RenderEvent#prerender\n * @fires import(\"../render/Event.js\").RenderEvent#postrender\n *\n * @template {import(\"../source/Source.js\").default} SourceType\n * @api\n */\nclass Layer extends BaseLayer {\n /**\n * @param {Options} options Layer options.\n */\n constructor(options) {\n const baseOptions = assign({}, options);\n delete baseOptions.source;\n\n super(baseOptions);\n\n /**\n * @private\n * @type {?import(\"../events.js\").EventsKey}\n */\n this.mapPrecomposeKey_ = null;\n\n /**\n * @private\n * @type {?import(\"../events.js\").EventsKey}\n */\n this.mapRenderKey_ = null;\n\n /**\n * @private\n * @type {?import(\"../events.js\").EventsKey}\n */\n this.sourceChangeKey_ = null;\n\n /**\n * @private\n * @type {import(\"../renderer/Layer.js\").default}\n */\n this.renderer_ = null;\n\n // Overwrite default render method with a custom one\n if (options.render) {\n this.render = options.render;\n }\n\n if (options.map) {\n this.setMap(options.map);\n }\n\n this.addEventListener(\n getChangeEventType(LayerProperty.SOURCE),\n this.handleSourcePropertyChange_\n );\n\n const source = options.source\n ? /** @type {SourceType} */ (options.source)\n : null;\n this.setSource(source);\n }\n\n /**\n * @param {Array<import(\"./Layer.js\").default>=} opt_array Array of layers (to be modified in place).\n * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n */\n getLayersArray(opt_array) {\n const array = opt_array ? opt_array : [];\n array.push(this);\n return array;\n }\n\n /**\n * @param {Array<import(\"./Layer.js\").State>=} opt_states Optional list of layer states (to be modified in place).\n * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n */\n getLayerStatesArray(opt_states) {\n const states = opt_states ? opt_states : [];\n states.push(this.getLayerState());\n return states;\n }\n\n /**\n * Get the layer source.\n * @return {SourceType} The layer source (or `null` if not yet set).\n * @observable\n * @api\n */\n getSource() {\n return /** @type {SourceType} */ (this.get(LayerProperty.SOURCE)) || null;\n }\n\n /**\n * @return {import(\"../source/State.js\").default} Source state.\n */\n getSourceState() {\n const source = this.getSource();\n return !source ? SourceState.UNDEFINED : source.getState();\n }\n\n /**\n * @private\n */\n handleSourceChange_() {\n this.changed();\n }\n\n /**\n * @private\n */\n handleSourcePropertyChange_() {\n if (this.sourceChangeKey_) {\n unlistenByKey(this.sourceChangeKey_);\n this.sourceChangeKey_ = null;\n }\n const source = this.getSource();\n if (source) {\n this.sourceChangeKey_ = listen(\n source,\n EventType.CHANGE,\n this.handleSourceChange_,\n this\n );\n }\n this.changed();\n }\n\n /**\n * @param {import(\"../pixel\").Pixel} pixel Pixel.\n * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with\n * an array of features.\n */\n getFeatures(pixel) {\n return this.renderer_.getFeatures(pixel);\n }\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 render(frameState, target) {\n const layerRenderer = this.getRenderer();\n\n if (layerRenderer.prepareFrame(frameState)) {\n return layerRenderer.renderFrame(frameState, target);\n }\n }\n\n /**\n * Sets the layer to be rendered on top of other layers on a map. The map will\n * not manage this layer in its layers collection, and the callback in\n * {@link module:ol/Map#forEachLayerAtPixel} will receive `null` as layer. This\n * is useful for temporary layers. To remove an unmanaged layer from the map,\n * use `#setMap(null)`.\n *\n * To add the layer to a map and have it managed by the map, use\n * {@link module:ol/Map#addLayer} instead.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @api\n */\n setMap(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(\n map,\n RenderEventType.PRECOMPOSE,\n function (evt) {\n const renderEvent = /** @type {import(\"../render/Event.js\").default} */ (evt);\n const layerStatesArray = renderEvent.frameState.layerStatesArray;\n const 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(\n !layerStatesArray.some(function (arrayLayerState) {\n return arrayLayerState.layer === layerState.layer;\n }),\n 67\n );\n layerStatesArray.push(layerState);\n },\n this\n );\n this.mapRenderKey_ = listen(this, EventType.CHANGE, map.render, map);\n this.changed();\n }\n }\n\n /**\n * Set the layer source.\n * @param {SourceType} source The layer source.\n * @observable\n * @api\n */\n setSource(source) {\n this.set(LayerProperty.SOURCE, source);\n }\n\n /**\n * Get the renderer for this layer.\n * @return {import(\"../renderer/Layer.js\").default} The layer renderer.\n */\n getRenderer() {\n if (!this.renderer_) {\n this.renderer_ = this.createRenderer();\n }\n return this.renderer_;\n }\n\n /**\n * @return {boolean} The layer has a renderer.\n */\n hasRenderer() {\n return !!this.renderer_;\n }\n\n /**\n * Create a renderer for this layer.\n * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n * @protected\n */\n createRenderer() {\n return null;\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n this.setSource(null);\n super.disposeInternal();\n }\n}\n\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 const resolution = viewState.resolution;\n if (\n resolution < layerState.minResolution ||\n resolution >= layerState.maxResolution\n ) {\n return false;\n }\n const zoom = viewState.zoom;\n return zoom > layerState.minZoom && zoom <= layerState.maxZoom;\n}\n\nexport default Layer;\n","!function(t,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(t=t||self).RBush=i()}(this,function(){\"use strict\";function t(t,r,e,a,h){!function t(n,r,e,a,h){for(;a>e;){if(a-e>600){var o=a-e+1,s=r-e+1,l=Math.log(o),f=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*f*(o-f)/o)*(s-o/2<0?-1:1),m=Math.max(e,Math.floor(r-s*f/o+u)),c=Math.min(a,Math.floor(r+(o-s)*f/o+u));t(n,r,m,c,h)}var p=n[r],d=e,x=a;for(i(n,e,r),h(n[a],p)>0&&i(n,e,a);d<x;){for(i(n,d,x),d++,x--;h(n[d],p)<0;)d++;for(;h(n[x],p)>0;)x--}0===h(n[e],p)?i(n,e,x):i(n,++x,a),x<=r&&(e=x+1),r<=x&&(a=x-1)}}(t,r,e||0,a||t.length-1,h||n)}function i(t,i,n){var r=t[i];t[i]=t[n],t[n]=r}function n(t,i){return t<i?-1:t>i?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function e(t,i,n){if(!n)return i.indexOf(t);for(var r=0;r<i.length;r++)if(n(t,i[r]))return r;return-1}function a(t,i){h(t,0,t.children.length,i,t)}function h(t,i,n,r,e){e||(e=p(null)),e.minX=1/0,e.minY=1/0,e.maxX=-1/0,e.maxY=-1/0;for(var a=i;a<n;a++){var h=t.children[a];o(e,t.leaf?r(h):h)}return e}function o(t,i){return t.minX=Math.min(t.minX,i.minX),t.minY=Math.min(t.minY,i.minY),t.maxX=Math.max(t.maxX,i.maxX),t.maxY=Math.max(t.maxY,i.maxY),t}function s(t,i){return t.minX-i.minX}function l(t,i){return t.minY-i.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,i){return t.minX<=i.minX&&t.minY<=i.minY&&i.maxX<=t.maxX&&i.maxY<=t.maxY}function c(t,i){return i.minX<=t.maxX&&i.minY<=t.maxY&&i.maxX>=t.minX&&i.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(i,n,r,e,a){for(var h=[n,r];h.length;)if(!((r=h.pop())-(n=h.pop())<=e)){var o=n+Math.ceil((r-n)/e/2)*e;t(i,o,n,r,a),h.push(n,o,o,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var i=this.data,n=[];if(!c(t,i))return n;for(var r=this.toBBox,e=[];i;){for(var a=0;a<i.children.length;a++){var h=i.children[a],o=i.leaf?r(h):h;c(t,o)&&(i.leaf?n.push(h):m(t,o)?this._all(h,n):e.push(h))}i=e.pop()}return n},r.prototype.collides=function(t){var i=this.data;if(!c(t,i))return!1;for(var n=[];i;){for(var r=0;r<i.children.length;r++){var e=i.children[r],a=i.leaf?this.toBBox(e):e;if(c(t,a)){if(i.leaf||m(t,a))return!0;n.push(e)}}i=n.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var i=0;i<t.length;i++)this.insert(t[i]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=p([]),this},r.prototype.remove=function(t,i){if(!t)return this;for(var n,r,a,h=this.data,o=this.toBBox(t),s=[],l=[];h||s.length;){if(h||(h=s.pop(),r=s[s.length-1],n=l.pop(),a=!0),h.leaf){var f=e(t,h.children,i);if(-1!==f)return h.children.splice(f,1),s.push(h),this._condense(s),this}a||h.leaf||!m(h,o)?r?(n++,h=r.children[n],a=!1):h=null:(s.push(h),l.push(n),n=0,r=h,h=h.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,i){return t.minX-i.minX},r.prototype.compareMinY=function(t,i){return t.minY-i.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,i){for(var n=[];t;)t.leaf?i.push.apply(i,t.children):n.push.apply(n,t.children),t=n.pop();return i},r.prototype._build=function(t,i,n,r){var e,h=n-i+1,o=this._maxEntries;if(h<=o)return a(e=p(t.slice(i,n+1)),this.toBBox),e;r||(r=Math.ceil(Math.log(h)/Math.log(o)),o=Math.ceil(h/Math.pow(o,r-1))),(e=p([])).leaf=!1,e.height=r;var s=Math.ceil(h/o),l=s*Math.ceil(Math.sqrt(o));d(t,i,n,l,this.compareMinX);for(var f=i;f<=n;f+=l){var u=Math.min(f+l-1,n);d(t,f,u,s,this.compareMinY);for(var m=f;m<=u;m+=s){var c=Math.min(m+s-1,u);e.children.push(this._build(t,m,c,r-1))}}return a(e,this.toBBox),e},r.prototype._chooseSubtree=function(t,i,n,r){for(;r.push(i),!i.leaf&&r.length-1!==n;){for(var e=1/0,a=1/0,h=void 0,o=0;o<i.children.length;o++){var s=i.children[o],l=f(s),u=(m=t,c=s,(Math.max(c.maxX,m.maxX)-Math.min(c.minX,m.minX))*(Math.max(c.maxY,m.maxY)-Math.min(c.minY,m.minY))-l);u<a?(a=u,e=l<e?l:e,h=s):u===a&&l<e&&(e=l,h=s)}i=h||i.children[0]}var m,c;return i},r.prototype._insert=function(t,i,n){var r=n?t:this.toBBox(t),e=[],a=this._chooseSubtree(r,this.data,i,e);for(a.children.push(t),o(a,r);i>=0&&e[i].children.length>this._maxEntries;)this._split(e,i),i--;this._adjustParentBBoxes(r,e,i)},r.prototype._split=function(t,i){var n=t[i],r=n.children.length,e=this._minEntries;this._chooseSplitAxis(n,e,r);var h=this._chooseSplitIndex(n,e,r),o=p(n.children.splice(h,n.children.length-h));o.height=n.height,o.leaf=n.leaf,a(n,this.toBBox),a(o,this.toBBox),i?t[i-1].children.push(o):this._splitRoot(n,o)},r.prototype._splitRoot=function(t,i){this.data=p([t,i]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,i,n){for(var r,e,a,o,s,l,u,m=1/0,c=1/0,p=i;p<=n-i;p++){var d=h(t,0,p,this.toBBox),x=h(t,p,n,this.toBBox),v=(e=d,a=x,o=void 0,s=void 0,l=void 0,u=void 0,o=Math.max(e.minX,a.minX),s=Math.max(e.minY,a.minY),l=Math.min(e.maxX,a.maxX),u=Math.min(e.maxY,a.maxY),Math.max(0,l-o)*Math.max(0,u-s)),M=f(d)+f(x);v<m?(m=v,r=p,c=M<c?M:c):v===m&&M<c&&(c=M,r=p)}return r||n-i},r.prototype._chooseSplitAxis=function(t,i,n){var r=t.leaf?this.compareMinX:s,e=t.leaf?this.compareMinY:l;this._allDistMargin(t,i,n,r)<this._allDistMargin(t,i,n,e)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,i,n,r){t.children.sort(r);for(var e=this.toBBox,a=h(t,0,i,e),s=h(t,n-i,n,e),l=u(a)+u(s),f=i;f<n-i;f++){var m=t.children[f];o(a,t.leaf?e(m):m),l+=u(a)}for(var c=n-i-1;c>=i;c--){var p=t.children[c];o(s,t.leaf?e(p):p),l+=u(s)}return l},r.prototype._adjustParentBBoxes=function(t,i,n){for(var r=n;r>=0;r--)o(i[r],t)},r.prototype._condense=function(t){for(var i=t.length-1,n=void 0;i>=0;i--)0===t[i].children.length?i>0?(n=t[i-1].children).splice(n.indexOf(t[i]),1):this.clear():a(t[i],this.toBBox)},r});\n","/**\n * @module ol/layer/BaseVector\n */\nimport Layer from './Layer.js';\nimport RBush from 'rbush';\nimport {assign} from '../obj.js';\nimport {\n createDefaultStyle,\n toFunction as toStyleFunction,\n} from '../style/Style.js';\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 {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the\n * renderer when getting features from the vector source for the rendering or hit-detection.\n * Recommended value: the size of the largest symbol, line width or label.\n * @property {import(\"../source/Vector.js\").default} [source] Source.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {boolean} [declutter=false] Declutter images and text. Decluttering is applied to all\n * image and text styles of all Vector and VectorTile layers that have set this to `true`. The priority\n * is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.\n * Higher z-index means higher priority. Within the same z-index, a feature rendered before another has\n * higher priority.\n * @property {import(\"../style/Style.js\").StyleLike|null} [style] Layer style. When set to `null`, only\n * features that have their own style will be rendered. See {@link module:ol/style} for default style\n * which will be used if this is not set.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will\n * be recreated during animations. This means that no vectors will be shown clipped, but the\n * setting will have a performance impact for large amounts of vector data. When set to `false`,\n * batches will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will\n * be recreated during interactions. See also `updateWhileAnimating`.\n */\n\n/**\n * @enum {string}\n * @private\n */\nconst Property = {\n RENDER_ORDER: 'renderOrder',\n};\n\n/**\n * @classdesc\n * Vector data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Vector.js\").default|import(\"../source/VectorTile.js\").default} VectorSourceType\n * @extends {Layer<VectorSourceType>}\n * @api\n */\nclass BaseVectorLayer extends Layer {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n const baseOptions = assign({}, options);\n\n delete baseOptions.style;\n delete baseOptions.renderBuffer;\n delete baseOptions.updateWhileAnimating;\n delete baseOptions.updateWhileInteracting;\n super(baseOptions);\n\n /**\n * @private\n * @type {boolean}\n */\n this.declutter_ =\n options.declutter !== undefined ? options.declutter : false;\n\n /**\n * @type {number}\n * @private\n */\n this.renderBuffer_ =\n options.renderBuffer !== undefined ? options.renderBuffer : 100;\n\n /**\n * User provided style.\n * @type {import(\"../style/Style.js\").StyleLike}\n * @private\n */\n this.style_ = null;\n\n /**\n * Style function for use within the library.\n * @type {import(\"../style/Style.js\").StyleFunction|undefined}\n * @private\n */\n this.styleFunction_ = undefined;\n\n this.setStyle(options.style);\n\n /**\n * @type {boolean}\n * @private\n */\n this.updateWhileAnimating_ =\n options.updateWhileAnimating !== undefined\n ? options.updateWhileAnimating\n : false;\n\n /**\n * @type {boolean}\n * @private\n */\n this.updateWhileInteracting_ =\n options.updateWhileInteracting !== undefined\n ? options.updateWhileInteracting\n : false;\n }\n\n /**\n * @return {boolean} Declutter.\n */\n getDeclutter() {\n return this.declutter_;\n }\n\n /**\n * Get the topmost feature that intersects the given pixel on the viewport. Returns a promise\n * that resolves with an array of features. The array will either contain the topmost feature\n * when a hit was detected, or it will be empty.\n *\n * The hit detection algorithm used for this method is optimized for performance, but is less\n * accurate than the one used in {@link import(\"../PluggableMap.js\").default#getFeaturesAtPixel}: Text\n * is not considered, and icons are only represented by their bounding box instead of the exact\n * image.\n *\n * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with an array of features.\n * @api\n */\n getFeatures(pixel) {\n return super.getFeatures(pixel);\n }\n\n /**\n * @return {number|undefined} Render buffer.\n */\n getRenderBuffer() {\n return this.renderBuffer_;\n }\n\n /**\n * @return {function(import(\"../Feature.js\").default, import(\"../Feature.js\").default): number|null|undefined} Render\n * order.\n */\n getRenderOrder() {\n return /** @type {import(\"../render.js\").OrderFunction|null|undefined} */ (this.get(\n Property.RENDER_ORDER\n ));\n }\n\n /**\n * Get the style for features. This returns whatever was passed to the `style`\n * option at construction or to the `setStyle` method.\n * @return {import(\"../style/Style.js\").StyleLike|null|undefined} Layer style.\n * @api\n */\n getStyle() {\n return this.style_;\n }\n\n /**\n * Get the style function.\n * @return {import(\"../style/Style.js\").StyleFunction|undefined} Layer style function.\n * @api\n */\n getStyleFunction() {\n return this.styleFunction_;\n }\n\n /**\n * @return {boolean} Whether the rendered layer should be updated while\n * animating.\n */\n getUpdateWhileAnimating() {\n return this.updateWhileAnimating_;\n }\n\n /**\n * @return {boolean} Whether the rendered layer should be updated while\n * interacting.\n */\n getUpdateWhileInteracting() {\n return this.updateWhileInteracting_;\n }\n\n /**\n * Render declutter items for this layer\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n */\n renderDeclutter(frameState) {\n if (!frameState.declutterTree) {\n frameState.declutterTree = new RBush(9);\n }\n /** @type {*} */ (this.getRenderer()).renderDeclutter(frameState);\n }\n\n /**\n * @param {import(\"../render.js\").OrderFunction|null|undefined} renderOrder\n * Render order.\n */\n setRenderOrder(renderOrder) {\n this.set(Property.RENDER_ORDER, renderOrder);\n }\n\n /**\n * Set the style for features. This can be a single style object, an array\n * of styles, or a function that takes a feature and resolution and returns\n * an array of styles. If set to `null`, the layer has no style (a `null` style),\n * so only features that have their own styles will be rendered in the layer. Call\n * `setStyle()` without arguments to reset to the default style. See\n * {@link module:ol/style} for information on the default style.\n * @param {(import(\"../style/Style.js\").StyleLike|null)=} opt_style Layer style.\n * @api\n */\n setStyle(opt_style) {\n this.style_ = opt_style !== undefined ? opt_style : createDefaultStyle;\n this.styleFunction_ =\n opt_style === null ? undefined : toStyleFunction(this.style_);\n this.changed();\n }\n}\n\nexport default BaseVectorLayer;\n","/**\n * @module ol/render/canvas/Instruction\n */\n\n/**\n * @enum {number}\n */\nconst Instruction = {\n BEGIN_GEOMETRY: 0,\n BEGIN_PATH: 1,\n CIRCLE: 2,\n CLOSE_PATH: 3,\n CUSTOM: 4,\n DRAW_CHARS: 5,\n DRAW_IMAGE: 6,\n END_GEOMETRY: 7,\n FILL: 8,\n MOVE_TO_LINE_TO: 9,\n SET_FILL_STYLE: 10,\n SET_STROKE_STYLE: 11,\n STROKE: 12,\n};\n\n/**\n * @type {Array<Instruction>}\n */\nexport const fillInstruction = [Instruction.FILL];\n\n/**\n * @type {Array<Instruction>}\n */\nexport const strokeInstruction = [Instruction.STROKE];\n\n/**\n * @type {Array<Instruction>}\n */\nexport const beginPathInstruction = [Instruction.BEGIN_PATH];\n\n/**\n * @type {Array<Instruction>}\n */\nexport const closePathInstruction = [Instruction.CLOSE_PATH];\n\nexport default Instruction;\n","/**\n * @module ol/render/VectorContext\n */\n\n/**\n * @classdesc\n * Context for drawing geometries. A vector context is available on render\n * events and does not need to be constructed directly.\n * @api\n */\nclass VectorContext {\n /**\n * Render a geometry with a custom renderer.\n *\n * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {Function} renderer Renderer.\n */\n drawCustom(geometry, feature, renderer) {}\n\n /**\n * Render a geometry.\n *\n * @param {import(\"../geom/Geometry.js\").default} geometry The geometry to render.\n */\n drawGeometry(geometry) {}\n\n /**\n * Set the rendering style.\n *\n * @param {import(\"../style/Style.js\").default} style The rendering style.\n */\n setStyle(style) {}\n\n /**\n * @param {import(\"../geom/Circle.js\").default} circleGeometry Circle geometry.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\n drawCircle(circleGeometry, feature) {}\n\n /**\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n */\n drawFeature(feature, style) {}\n\n /**\n * @param {import(\"../geom/GeometryCollection.js\").default} geometryCollectionGeometry Geometry collection.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\n drawGeometryCollection(geometryCollectionGeometry, feature) {}\n\n /**\n * @param {import(\"../geom/LineString.js\").default|import(\"./Feature.js\").default} lineStringGeometry Line string geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\n drawLineString(lineStringGeometry, feature) {}\n\n /**\n * @param {import(\"../geom/MultiLineString.js\").default|import(\"./Feature.js\").default} multiLineStringGeometry MultiLineString geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\n drawMultiLineString(multiLineStringGeometry, feature) {}\n\n /**\n * @param {import(\"../geom/MultiPoint.js\").default|import(\"./Feature.js\").default} multiPointGeometry MultiPoint geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\n drawMultiPoint(multiPointGeometry, feature) {}\n\n /**\n * @param {import(\"../geom/MultiPolygon.js\").default} multiPolygonGeometry MultiPolygon geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\n drawMultiPolygon(multiPolygonGeometry, feature) {}\n\n /**\n * @param {import(\"../geom/Point.js\").default|import(\"./Feature.js\").default} pointGeometry Point geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\n drawPoint(pointGeometry, feature) {}\n\n /**\n * @param {import(\"../geom/Polygon.js\").default|import(\"./Feature.js\").default} polygonGeometry Polygon geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\n drawPolygon(polygonGeometry, feature) {}\n\n /**\n * @param {import(\"../geom/SimpleGeometry.js\").default|import(\"./Feature.js\").default} geometry Geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\n drawText(geometry, feature) {}\n\n /**\n * @param {import(\"../style/Fill.js\").default} fillStyle Fill style.\n * @param {import(\"../style/Stroke.js\").default} strokeStyle Stroke style.\n */\n setFillStrokeStyle(fillStyle, strokeStyle) {}\n\n /**\n * @param {import(\"../style/Image.js\").default} imageStyle Image style.\n * @param {import(\"../render/canvas.js\").DeclutterImageWithText=} opt_declutterImageWithText Shared data for combined decluttering with a text style.\n */\n setImageStyle(imageStyle, opt_declutterImageWithText) {}\n\n /**\n * @param {import(\"../style/Text.js\").default} textStyle Text style.\n * @param {import(\"../render/canvas.js\").DeclutterImageWithText=} opt_declutterImageWithText Shared data for combined decluttering with an image style.\n */\n setTextStyle(textStyle, opt_declutterImageWithText) {}\n}\n\nexport default VectorContext;\n","/**\n * @module ol/render/canvas/Builder\n */\nimport CanvasInstruction from './Instruction.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport Relationship from '../../extent/Relationship.js';\nimport VectorContext from '../VectorContext.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {\n buffer,\n clone,\n containsCoordinate,\n coordinateRelationship,\n} from '../../extent.js';\nimport {\n defaultFillStyle,\n defaultLineCap,\n defaultLineDash,\n defaultLineDashOffset,\n defaultLineJoin,\n defaultLineWidth,\n defaultMiterLimit,\n defaultStrokeStyle,\n} from '../canvas.js';\nimport {equals, reverseSubArray} from '../../array.js';\nimport {\n inflateCoordinates,\n inflateCoordinatesArray,\n inflateMultiCoordinatesArray,\n} from '../../geom/flat/inflate.js';\n\nclass CanvasBuilder extends VectorContext {\n /**\n * @param {number} tolerance Tolerance.\n * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n */\n constructor(tolerance, maxExtent, resolution, pixelRatio) {\n super();\n\n /**\n * @protected\n * @type {number}\n */\n this.tolerance = tolerance;\n\n /**\n * @protected\n * @const\n * @type {import(\"../../extent.js\").Extent}\n */\n this.maxExtent = maxExtent;\n\n /**\n * @protected\n * @type {number}\n */\n this.pixelRatio = pixelRatio;\n\n /**\n * @protected\n * @type {number}\n */\n this.maxLineWidth = 0;\n\n /**\n * @protected\n * @const\n * @type {number}\n */\n this.resolution = resolution;\n\n /**\n * @private\n * @type {Array<*>}\n */\n this.beginGeometryInstruction1_ = null;\n\n /**\n * @private\n * @type {Array<*>}\n */\n this.beginGeometryInstruction2_ = null;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.bufferedMaxExtent_ = null;\n\n /**\n * @protected\n * @type {Array<*>}\n */\n this.instructions = [];\n\n /**\n * @protected\n * @type {Array<number>}\n */\n this.coordinates = [];\n\n /**\n * @private\n * @type {import(\"../../coordinate.js\").Coordinate}\n */\n this.tmpCoordinate_ = [];\n\n /**\n * @protected\n * @type {Array<*>}\n */\n this.hitDetectionInstructions = [];\n\n /**\n * @protected\n * @type {import(\"../canvas.js\").FillStrokeState}\n */\n this.state = /** @type {import(\"../canvas.js\").FillStrokeState} */ ({});\n }\n\n /**\n * @protected\n * @param {Array<number>} dashArray Dash array.\n * @return {Array<number>} Dash array with pixel ratio applied\n */\n applyPixelRatio(dashArray) {\n const pixelRatio = this.pixelRatio;\n return pixelRatio == 1\n ? dashArray\n : dashArray.map(function (dash) {\n return dash * pixelRatio;\n });\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} stride Stride.\n * @protected\n * @return {number} My end\n */\n appendFlatPointCoordinates(flatCoordinates, stride) {\n const extent = this.getBufferedMaxExtent();\n const tmpCoord = this.tmpCoordinate_;\n const coordinates = this.coordinates;\n let myEnd = coordinates.length;\n for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n tmpCoord[0] = flatCoordinates[i];\n tmpCoord[1] = flatCoordinates[i + 1];\n if (containsCoordinate(extent, tmpCoord)) {\n coordinates[myEnd++] = tmpCoord[0];\n coordinates[myEnd++] = tmpCoord[1];\n }\n }\n return myEnd;\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {boolean} closed Last input coordinate equals first.\n * @param {boolean} skipFirst Skip first coordinate.\n * @protected\n * @return {number} My end.\n */\n appendFlatLineCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n closed,\n skipFirst\n ) {\n const coordinates = this.coordinates;\n let myEnd = coordinates.length;\n const extent = this.getBufferedMaxExtent();\n if (skipFirst) {\n offset += stride;\n }\n let lastXCoord = flatCoordinates[offset];\n let lastYCoord = flatCoordinates[offset + 1];\n const nextCoord = this.tmpCoordinate_;\n let skipped = true;\n\n let i, lastRel, nextRel;\n for (i = offset + stride; i < end; i += stride) {\n nextCoord[0] = flatCoordinates[i];\n nextCoord[1] = flatCoordinates[i + 1];\n nextRel = coordinateRelationship(extent, nextCoord);\n if (nextRel !== lastRel) {\n if (skipped) {\n coordinates[myEnd++] = lastXCoord;\n coordinates[myEnd++] = lastYCoord;\n skipped = false;\n }\n coordinates[myEnd++] = nextCoord[0];\n coordinates[myEnd++] = nextCoord[1];\n } else if (nextRel === Relationship.INTERSECTING) {\n coordinates[myEnd++] = nextCoord[0];\n coordinates[myEnd++] = nextCoord[1];\n skipped = false;\n } else {\n skipped = true;\n }\n lastXCoord = nextCoord[0];\n lastYCoord = nextCoord[1];\n lastRel = nextRel;\n }\n\n // Last coordinate equals first or only one point to append:\n if ((closed && skipped) || i === offset + stride) {\n coordinates[myEnd++] = lastXCoord;\n coordinates[myEnd++] = lastYCoord;\n }\n return myEnd;\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Array<number>} builderEnds Builder ends.\n * @return {number} Offset.\n */\n drawCustomCoordinates_(flatCoordinates, offset, ends, stride, builderEnds) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const builderEnd = this.appendFlatLineCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n false,\n false\n );\n builderEnds.push(builderEnd);\n offset = end;\n }\n return offset;\n }\n\n /**\n * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {Function} renderer Renderer.\n */\n drawCustom(geometry, feature, renderer) {\n this.beginGeometry(geometry, feature);\n const type = geometry.getType();\n const stride = geometry.getStride();\n const builderBegin = this.coordinates.length;\n let flatCoordinates, builderEnd, builderEnds, builderEndss;\n let offset;\n if (type == GeometryType.MULTI_POLYGON) {\n flatCoordinates = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getOrientedFlatCoordinates();\n builderEndss = [];\n const endss = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getEndss();\n offset = 0;\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const myEnds = [];\n offset = this.drawCustomCoordinates_(\n flatCoordinates,\n offset,\n endss[i],\n stride,\n myEnds\n );\n builderEndss.push(myEnds);\n }\n this.instructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEndss,\n geometry,\n renderer,\n inflateMultiCoordinatesArray,\n ]);\n } else if (\n type == GeometryType.POLYGON ||\n type == GeometryType.MULTI_LINE_STRING\n ) {\n builderEnds = [];\n flatCoordinates =\n type == GeometryType.POLYGON\n ? /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry).getOrientedFlatCoordinates()\n : geometry.getFlatCoordinates();\n offset = this.drawCustomCoordinates_(\n flatCoordinates,\n 0,\n /** @type {import(\"../../geom/Polygon.js\").default|import(\"../../geom/MultiLineString.js\").default} */ (geometry).getEnds(),\n stride,\n builderEnds\n );\n this.instructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEnds,\n geometry,\n renderer,\n inflateCoordinatesArray,\n ]);\n } else if (\n type == GeometryType.LINE_STRING ||\n type == GeometryType.CIRCLE\n ) {\n flatCoordinates = geometry.getFlatCoordinates();\n builderEnd = this.appendFlatLineCoordinates(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n false,\n false\n );\n this.instructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEnd,\n geometry,\n renderer,\n inflateCoordinates,\n ]);\n } else if (type == GeometryType.MULTI_POINT) {\n flatCoordinates = geometry.getFlatCoordinates();\n builderEnd = this.appendFlatPointCoordinates(flatCoordinates, stride);\n if (builderEnd > builderBegin) {\n this.instructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEnd,\n geometry,\n renderer,\n inflateCoordinates,\n ]);\n }\n } else if (type == GeometryType.POINT) {\n flatCoordinates = geometry.getFlatCoordinates();\n this.coordinates.push(flatCoordinates[0], flatCoordinates[1]);\n builderEnd = this.coordinates.length;\n this.instructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEnd,\n geometry,\n renderer,\n ]);\n }\n this.endGeometry(feature);\n }\n\n /**\n * @protected\n * @param {import(\"../../geom/Geometry\").default|import(\"../Feature.js\").default} geometry The geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n */\n beginGeometry(geometry, feature) {\n this.beginGeometryInstruction1_ = [\n CanvasInstruction.BEGIN_GEOMETRY,\n feature,\n 0,\n geometry,\n ];\n this.instructions.push(this.beginGeometryInstruction1_);\n this.beginGeometryInstruction2_ = [\n CanvasInstruction.BEGIN_GEOMETRY,\n feature,\n 0,\n geometry,\n ];\n this.hitDetectionInstructions.push(this.beginGeometryInstruction2_);\n }\n\n /**\n * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n */\n finish() {\n return {\n instructions: this.instructions,\n hitDetectionInstructions: this.hitDetectionInstructions,\n coordinates: this.coordinates,\n };\n }\n\n /**\n * Reverse the hit detection instructions.\n */\n reverseHitDetectionInstructions() {\n const hitDetectionInstructions = this.hitDetectionInstructions;\n // step 1 - reverse array\n hitDetectionInstructions.reverse();\n // step 2 - reverse instructions within geometry blocks\n let i;\n const n = hitDetectionInstructions.length;\n let instruction;\n let type;\n let begin = -1;\n for (i = 0; i < n; ++i) {\n instruction = hitDetectionInstructions[i];\n type = /** @type {import(\"./Instruction.js\").default} */ (instruction[0]);\n if (type == CanvasInstruction.END_GEOMETRY) {\n begin = i;\n } else if (type == CanvasInstruction.BEGIN_GEOMETRY) {\n instruction[2] = i;\n reverseSubArray(this.hitDetectionInstructions, begin, i);\n begin = -1;\n }\n }\n }\n\n /**\n * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n */\n setFillStrokeStyle(fillStyle, strokeStyle) {\n const state = this.state;\n if (fillStyle) {\n const fillStyleColor = fillStyle.getColor();\n state.fillStyle = asColorLike(\n fillStyleColor ? fillStyleColor : defaultFillStyle\n );\n } else {\n state.fillStyle = undefined;\n }\n if (strokeStyle) {\n const strokeStyleColor = strokeStyle.getColor();\n state.strokeStyle = asColorLike(\n strokeStyleColor ? strokeStyleColor : defaultStrokeStyle\n );\n const strokeStyleLineCap = strokeStyle.getLineCap();\n state.lineCap =\n strokeStyleLineCap !== undefined ? strokeStyleLineCap : defaultLineCap;\n const strokeStyleLineDash = strokeStyle.getLineDash();\n state.lineDash = strokeStyleLineDash\n ? strokeStyleLineDash.slice()\n : defaultLineDash;\n const strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n state.lineDashOffset = strokeStyleLineDashOffset\n ? strokeStyleLineDashOffset\n : defaultLineDashOffset;\n const strokeStyleLineJoin = strokeStyle.getLineJoin();\n state.lineJoin =\n strokeStyleLineJoin !== undefined\n ? strokeStyleLineJoin\n : defaultLineJoin;\n const strokeStyleWidth = strokeStyle.getWidth();\n state.lineWidth =\n strokeStyleWidth !== undefined ? strokeStyleWidth : defaultLineWidth;\n const strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n state.miterLimit =\n strokeStyleMiterLimit !== undefined\n ? strokeStyleMiterLimit\n : defaultMiterLimit;\n\n if (state.lineWidth > this.maxLineWidth) {\n this.maxLineWidth = state.lineWidth;\n // invalidate the buffered max extent cache\n this.bufferedMaxExtent_ = null;\n }\n } else {\n state.strokeStyle = undefined;\n state.lineCap = undefined;\n state.lineDash = null;\n state.lineDashOffset = undefined;\n state.lineJoin = undefined;\n state.lineWidth = undefined;\n state.miterLimit = undefined;\n }\n }\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @return {Array<*>} Fill instruction.\n */\n createFill(state) {\n const fillStyle = state.fillStyle;\n /** @type {Array<*>} */\n const fillInstruction = [CanvasInstruction.SET_FILL_STYLE, fillStyle];\n if (typeof fillStyle !== 'string') {\n // Fill is a pattern or gradient - align it!\n fillInstruction.push(true);\n }\n return fillInstruction;\n }\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n */\n applyStroke(state) {\n this.instructions.push(this.createStroke(state));\n }\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @return {Array<*>} Stroke instruction.\n */\n createStroke(state) {\n return [\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth * this.pixelRatio,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n this.applyPixelRatio(state.lineDash),\n state.lineDashOffset * this.pixelRatio,\n ];\n }\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @param {function(this:CanvasBuilder, import(\"../canvas.js\").FillStrokeState):Array<*>} createFill Create fill.\n */\n updateFillStyle(state, createFill) {\n const fillStyle = state.fillStyle;\n if (typeof fillStyle !== 'string' || state.currentFillStyle != fillStyle) {\n if (fillStyle !== undefined) {\n this.instructions.push(createFill.call(this, state));\n }\n state.currentFillStyle = fillStyle;\n }\n }\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @param {function(this:CanvasBuilder, import(\"../canvas.js\").FillStrokeState): void} applyStroke Apply stroke.\n */\n updateStrokeStyle(state, applyStroke) {\n const strokeStyle = state.strokeStyle;\n const lineCap = state.lineCap;\n const lineDash = state.lineDash;\n const lineDashOffset = state.lineDashOffset;\n const lineJoin = state.lineJoin;\n const lineWidth = state.lineWidth;\n const miterLimit = state.miterLimit;\n if (\n state.currentStrokeStyle != strokeStyle ||\n state.currentLineCap != lineCap ||\n (lineDash != state.currentLineDash &&\n !equals(state.currentLineDash, lineDash)) ||\n state.currentLineDashOffset != lineDashOffset ||\n state.currentLineJoin != lineJoin ||\n state.currentLineWidth != lineWidth ||\n state.currentMiterLimit != miterLimit\n ) {\n if (strokeStyle !== undefined) {\n applyStroke.call(this, state);\n }\n state.currentStrokeStyle = strokeStyle;\n state.currentLineCap = lineCap;\n state.currentLineDash = lineDash;\n state.currentLineDashOffset = lineDashOffset;\n state.currentLineJoin = lineJoin;\n state.currentLineWidth = lineWidth;\n state.currentMiterLimit = miterLimit;\n }\n }\n\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n */\n endGeometry(feature) {\n this.beginGeometryInstruction1_[2] = this.instructions.length;\n this.beginGeometryInstruction1_ = null;\n this.beginGeometryInstruction2_[2] = this.hitDetectionInstructions.length;\n this.beginGeometryInstruction2_ = null;\n const endGeometryInstruction = [CanvasInstruction.END_GEOMETRY, feature];\n this.instructions.push(endGeometryInstruction);\n this.hitDetectionInstructions.push(endGeometryInstruction);\n }\n\n /**\n * Get the buffered rendering extent. Rendering will be clipped to the extent\n * provided to the constructor. To account for symbolizers that may intersect\n * this extent, we calculate a buffered extent (e.g. based on stroke width).\n * @return {import(\"../../extent.js\").Extent} The buffered rendering extent.\n * @protected\n */\n getBufferedMaxExtent() {\n if (!this.bufferedMaxExtent_) {\n this.bufferedMaxExtent_ = clone(this.maxExtent);\n if (this.maxLineWidth > 0) {\n const width = (this.resolution * (this.maxLineWidth + 1)) / 2;\n buffer(this.bufferedMaxExtent_, width, this.bufferedMaxExtent_);\n }\n }\n return this.bufferedMaxExtent_;\n }\n}\n\nexport default CanvasBuilder;\n","/**\n * @module ol/render/canvas/ImageBuilder\n */\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction from './Instruction.js';\n\nclass CanvasImageBuilder extends CanvasBuilder {\n /**\n * @param {number} tolerance Tolerance.\n * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n */\n constructor(tolerance, maxExtent, resolution, pixelRatio) {\n super(tolerance, maxExtent, resolution, pixelRatio);\n\n /**\n * @private\n * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}\n */\n this.hitDetectionImage_ = null;\n\n /**\n * @private\n * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}\n */\n this.image_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.imagePixelRatio_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.anchorX_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.anchorY_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.height_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.opacity_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.originX_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.originY_ = undefined;\n\n /**\n * @private\n * @type {boolean|undefined}\n */\n this.rotateWithView_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.rotation_ = undefined;\n\n /**\n * @private\n * @type {import(\"../../size.js\").Size|undefined}\n */\n this.scale_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.width_ = undefined;\n\n /**\n * Data shared with a text builder for combined decluttering.\n * @private\n * @type {import(\"../canvas.js\").DeclutterImageWithText}\n */\n this.declutterImageWithText_ = undefined;\n }\n\n /**\n * @param {import(\"../../geom/Point.js\").default|import(\"../Feature.js\").default} pointGeometry Point geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n */\n drawPoint(pointGeometry, feature) {\n if (!this.image_) {\n return;\n }\n this.beginGeometry(pointGeometry, feature);\n const flatCoordinates = pointGeometry.getFlatCoordinates();\n const stride = pointGeometry.getStride();\n const myBegin = this.coordinates.length;\n const myEnd = this.appendFlatPointCoordinates(flatCoordinates, stride);\n this.instructions.push([\n CanvasInstruction.DRAW_IMAGE,\n myBegin,\n myEnd,\n this.image_,\n // Remaining arguments to DRAW_IMAGE are in alphabetical order\n this.anchorX_ * this.imagePixelRatio_,\n this.anchorY_ * this.imagePixelRatio_,\n Math.ceil(this.height_ * this.imagePixelRatio_),\n this.opacity_,\n this.originX_,\n this.originY_,\n this.rotateWithView_,\n this.rotation_,\n [\n (this.scale_[0] * this.pixelRatio) / this.imagePixelRatio_,\n (this.scale_[1] * this.pixelRatio) / this.imagePixelRatio_,\n ],\n Math.ceil(this.width_ * this.imagePixelRatio_),\n this.declutterImageWithText_,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.DRAW_IMAGE,\n myBegin,\n myEnd,\n this.hitDetectionImage_,\n // Remaining arguments to DRAW_IMAGE are in alphabetical order\n this.anchorX_,\n this.anchorY_,\n this.height_,\n this.opacity_,\n this.originX_,\n this.originY_,\n this.rotateWithView_,\n this.rotation_,\n this.scale_,\n this.width_,\n this.declutterImageWithText_,\n ]);\n this.endGeometry(feature);\n }\n\n /**\n * @param {import(\"../../geom/MultiPoint.js\").default|import(\"../Feature.js\").default} multiPointGeometry MultiPoint geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n */\n drawMultiPoint(multiPointGeometry, feature) {\n if (!this.image_) {\n return;\n }\n this.beginGeometry(multiPointGeometry, feature);\n const flatCoordinates = multiPointGeometry.getFlatCoordinates();\n const stride = multiPointGeometry.getStride();\n const myBegin = this.coordinates.length;\n const myEnd = this.appendFlatPointCoordinates(flatCoordinates, stride);\n this.instructions.push([\n CanvasInstruction.DRAW_IMAGE,\n myBegin,\n myEnd,\n this.image_,\n // Remaining arguments to DRAW_IMAGE are in alphabetical order\n this.anchorX_ * this.imagePixelRatio_,\n this.anchorY_ * this.imagePixelRatio_,\n Math.ceil(this.height_ * this.imagePixelRatio_),\n this.opacity_,\n this.originX_,\n this.originY_,\n this.rotateWithView_,\n this.rotation_,\n [\n (this.scale_[0] * this.pixelRatio) / this.imagePixelRatio_,\n (this.scale_[1] * this.pixelRatio) / this.imagePixelRatio_,\n ],\n Math.ceil(this.width_ * this.imagePixelRatio_),\n this.declutterImageWithText_,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.DRAW_IMAGE,\n myBegin,\n myEnd,\n this.hitDetectionImage_,\n // Remaining arguments to DRAW_IMAGE are in alphabetical order\n this.anchorX_,\n this.anchorY_,\n this.height_,\n this.opacity_,\n this.originX_,\n this.originY_,\n this.rotateWithView_,\n this.rotation_,\n this.scale_,\n this.width_,\n this.declutterImageWithText_,\n ]);\n this.endGeometry(feature);\n }\n\n /**\n * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n */\n finish() {\n this.reverseHitDetectionInstructions();\n // FIXME this doesn't really protect us against further calls to draw*Geometry\n this.anchorX_ = undefined;\n this.anchorY_ = undefined;\n this.hitDetectionImage_ = null;\n this.image_ = null;\n this.imagePixelRatio_ = undefined;\n this.height_ = undefined;\n this.scale_ = undefined;\n this.opacity_ = undefined;\n this.originX_ = undefined;\n this.originY_ = undefined;\n this.rotateWithView_ = undefined;\n this.rotation_ = undefined;\n this.width_ = undefined;\n return super.finish();\n }\n\n /**\n * @param {import(\"../../style/Image.js\").default} imageStyle Image style.\n * @param {Object=} opt_sharedData Shared data.\n */\n setImageStyle(imageStyle, opt_sharedData) {\n const anchor = imageStyle.getAnchor();\n const size = imageStyle.getSize();\n const hitDetectionImage = imageStyle.getHitDetectionImage();\n const image = imageStyle.getImage(this.pixelRatio);\n const origin = imageStyle.getOrigin();\n this.imagePixelRatio_ = imageStyle.getPixelRatio(this.pixelRatio);\n this.anchorX_ = anchor[0];\n this.anchorY_ = anchor[1];\n this.hitDetectionImage_ = hitDetectionImage;\n this.image_ = image;\n this.height_ = size[1];\n this.opacity_ = imageStyle.getOpacity();\n this.originX_ = origin[0];\n this.originY_ = origin[1];\n this.rotateWithView_ = imageStyle.getRotateWithView();\n this.rotation_ = imageStyle.getRotation();\n this.scale_ = imageStyle.getScaleArray();\n this.width_ = size[0];\n this.declutterImageWithText_ = opt_sharedData;\n }\n}\n\nexport default CanvasImageBuilder;\n","/**\n * @module ol/render/canvas/LineStringBuilder\n */\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction, {\n beginPathInstruction,\n strokeInstruction,\n} from './Instruction.js';\n\nclass CanvasLineStringBuilder extends CanvasBuilder {\n /**\n * @param {number} tolerance Tolerance.\n * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n */\n constructor(tolerance, maxExtent, resolution, pixelRatio) {\n super(tolerance, maxExtent, resolution, pixelRatio);\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @private\n * @return {number} end.\n */\n drawFlatCoordinates_(flatCoordinates, offset, end, stride) {\n const myBegin = this.coordinates.length;\n const myEnd = this.appendFlatLineCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n false,\n false\n );\n const moveToLineToInstruction = [\n CanvasInstruction.MOVE_TO_LINE_TO,\n myBegin,\n myEnd,\n ];\n this.instructions.push(moveToLineToInstruction);\n this.hitDetectionInstructions.push(moveToLineToInstruction);\n return end;\n }\n\n /**\n * @param {import(\"../../geom/LineString.js\").default|import(\"../Feature.js\").default} lineStringGeometry Line string geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n */\n drawLineString(lineStringGeometry, feature) {\n const state = this.state;\n const strokeStyle = state.strokeStyle;\n const lineWidth = state.lineWidth;\n if (strokeStyle === undefined || lineWidth === undefined) {\n return;\n }\n this.updateStrokeStyle(state, this.applyStroke);\n this.beginGeometry(lineStringGeometry, feature);\n this.hitDetectionInstructions.push(\n [\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n state.lineDash,\n state.lineDashOffset,\n ],\n beginPathInstruction\n );\n const flatCoordinates = lineStringGeometry.getFlatCoordinates();\n const stride = lineStringGeometry.getStride();\n this.drawFlatCoordinates_(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride\n );\n this.hitDetectionInstructions.push(strokeInstruction);\n this.endGeometry(feature);\n }\n\n /**\n * @param {import(\"../../geom/MultiLineString.js\").default|import(\"../Feature.js\").default} multiLineStringGeometry MultiLineString geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n */\n drawMultiLineString(multiLineStringGeometry, feature) {\n const state = this.state;\n const strokeStyle = state.strokeStyle;\n const lineWidth = state.lineWidth;\n if (strokeStyle === undefined || lineWidth === undefined) {\n return;\n }\n this.updateStrokeStyle(state, this.applyStroke);\n this.beginGeometry(multiLineStringGeometry, feature);\n this.hitDetectionInstructions.push(\n [\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n state.lineDash,\n state.lineDashOffset,\n ],\n beginPathInstruction\n );\n const ends = multiLineStringGeometry.getEnds();\n const flatCoordinates = multiLineStringGeometry.getFlatCoordinates();\n const stride = multiLineStringGeometry.getStride();\n let offset = 0;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n offset = this.drawFlatCoordinates_(\n flatCoordinates,\n offset,\n /** @type {number} */ (ends[i]),\n stride\n );\n }\n this.hitDetectionInstructions.push(strokeInstruction);\n this.endGeometry(feature);\n }\n\n /**\n * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n */\n finish() {\n const state = this.state;\n if (\n state.lastStroke != undefined &&\n state.lastStroke != this.coordinates.length\n ) {\n this.instructions.push(strokeInstruction);\n }\n this.reverseHitDetectionInstructions();\n this.state = null;\n return super.finish();\n }\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n */\n applyStroke(state) {\n if (\n state.lastStroke != undefined &&\n state.lastStroke != this.coordinates.length\n ) {\n this.instructions.push(strokeInstruction);\n state.lastStroke = this.coordinates.length;\n }\n state.lastStroke = 0;\n super.applyStroke(state);\n this.instructions.push(beginPathInstruction);\n }\n}\n\nexport default CanvasLineStringBuilder;\n","/**\n * @module ol/render/canvas/PolygonBuilder\n */\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction, {\n beginPathInstruction,\n closePathInstruction,\n fillInstruction,\n strokeInstruction,\n} from './Instruction.js';\nimport {defaultFillStyle} from '../canvas.js';\nimport {snap} from '../../geom/flat/simplify.js';\n\nclass CanvasPolygonBuilder extends CanvasBuilder {\n /**\n * @param {number} tolerance Tolerance.\n * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n */\n constructor(tolerance, maxExtent, resolution, pixelRatio) {\n super(tolerance, maxExtent, resolution, pixelRatio);\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @private\n * @return {number} End.\n */\n drawFlatCoordinatess_(flatCoordinates, offset, ends, stride) {\n const state = this.state;\n const fill = state.fillStyle !== undefined;\n const stroke = state.strokeStyle !== undefined;\n const numEnds = ends.length;\n this.instructions.push(beginPathInstruction);\n this.hitDetectionInstructions.push(beginPathInstruction);\n for (let i = 0; i < numEnds; ++i) {\n const end = ends[i];\n const myBegin = this.coordinates.length;\n const myEnd = this.appendFlatLineCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n true,\n !stroke\n );\n const moveToLineToInstruction = [\n CanvasInstruction.MOVE_TO_LINE_TO,\n myBegin,\n myEnd,\n ];\n this.instructions.push(moveToLineToInstruction);\n this.hitDetectionInstructions.push(moveToLineToInstruction);\n if (stroke) {\n // Performance optimization: only call closePath() when we have a stroke.\n // Otherwise the ring is closed already (see appendFlatLineCoordinates above).\n this.instructions.push(closePathInstruction);\n this.hitDetectionInstructions.push(closePathInstruction);\n }\n offset = end;\n }\n if (fill) {\n this.instructions.push(fillInstruction);\n this.hitDetectionInstructions.push(fillInstruction);\n }\n if (stroke) {\n this.instructions.push(strokeInstruction);\n this.hitDetectionInstructions.push(strokeInstruction);\n }\n return offset;\n }\n\n /**\n * @param {import(\"../../geom/Circle.js\").default} circleGeometry Circle geometry.\n * @param {import(\"../../Feature.js\").default} feature Feature.\n */\n drawCircle(circleGeometry, feature) {\n const state = this.state;\n const fillStyle = state.fillStyle;\n const strokeStyle = state.strokeStyle;\n if (fillStyle === undefined && strokeStyle === undefined) {\n return;\n }\n this.setFillStrokeStyles_();\n this.beginGeometry(circleGeometry, feature);\n if (state.fillStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_FILL_STYLE,\n defaultFillStyle,\n ]);\n }\n if (state.strokeStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n state.lineDash,\n state.lineDashOffset,\n ]);\n }\n const flatCoordinates = circleGeometry.getFlatCoordinates();\n const stride = circleGeometry.getStride();\n const myBegin = this.coordinates.length;\n this.appendFlatLineCoordinates(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n false,\n false\n );\n const circleInstruction = [CanvasInstruction.CIRCLE, myBegin];\n this.instructions.push(beginPathInstruction, circleInstruction);\n this.hitDetectionInstructions.push(beginPathInstruction, circleInstruction);\n if (state.fillStyle !== undefined) {\n this.instructions.push(fillInstruction);\n this.hitDetectionInstructions.push(fillInstruction);\n }\n if (state.strokeStyle !== undefined) {\n this.instructions.push(strokeInstruction);\n this.hitDetectionInstructions.push(strokeInstruction);\n }\n this.endGeometry(feature);\n }\n\n /**\n * @param {import(\"../../geom/Polygon.js\").default|import(\"../Feature.js\").default} polygonGeometry Polygon geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n */\n drawPolygon(polygonGeometry, feature) {\n const state = this.state;\n const fillStyle = state.fillStyle;\n const strokeStyle = state.strokeStyle;\n if (fillStyle === undefined && strokeStyle === undefined) {\n return;\n }\n this.setFillStrokeStyles_();\n this.beginGeometry(polygonGeometry, feature);\n if (state.fillStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_FILL_STYLE,\n defaultFillStyle,\n ]);\n }\n if (state.strokeStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n state.lineDash,\n state.lineDashOffset,\n ]);\n }\n const ends = polygonGeometry.getEnds();\n const flatCoordinates = polygonGeometry.getOrientedFlatCoordinates();\n const stride = polygonGeometry.getStride();\n this.drawFlatCoordinatess_(\n flatCoordinates,\n 0,\n /** @type {Array<number>} */ (ends),\n stride\n );\n this.endGeometry(feature);\n }\n\n /**\n * @param {import(\"../../geom/MultiPolygon.js\").default} multiPolygonGeometry MultiPolygon geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n */\n drawMultiPolygon(multiPolygonGeometry, feature) {\n const state = this.state;\n const fillStyle = state.fillStyle;\n const strokeStyle = state.strokeStyle;\n if (fillStyle === undefined && strokeStyle === undefined) {\n return;\n }\n this.setFillStrokeStyles_();\n this.beginGeometry(multiPolygonGeometry, feature);\n if (state.fillStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_FILL_STYLE,\n defaultFillStyle,\n ]);\n }\n if (state.strokeStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n state.lineDash,\n state.lineDashOffset,\n ]);\n }\n const endss = multiPolygonGeometry.getEndss();\n const flatCoordinates = multiPolygonGeometry.getOrientedFlatCoordinates();\n const stride = multiPolygonGeometry.getStride();\n let offset = 0;\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n offset = this.drawFlatCoordinatess_(\n flatCoordinates,\n offset,\n endss[i],\n stride\n );\n }\n this.endGeometry(feature);\n }\n\n /**\n * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n */\n finish() {\n this.reverseHitDetectionInstructions();\n this.state = null;\n // We want to preserve topology when drawing polygons. Polygons are\n // simplified using quantization and point elimination. However, we might\n // have received a mix of quantized and non-quantized geometries, so ensure\n // that all are quantized by quantizing all coordinates in the batch.\n const tolerance = this.tolerance;\n if (tolerance !== 0) {\n const coordinates = this.coordinates;\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n coordinates[i] = snap(coordinates[i], tolerance);\n }\n }\n return super.finish();\n }\n\n /**\n * @private\n */\n setFillStrokeStyles_() {\n const state = this.state;\n const fillStyle = state.fillStyle;\n if (fillStyle !== undefined) {\n this.updateFillStyle(state, this.createFill);\n }\n if (state.strokeStyle !== undefined) {\n this.updateStrokeStyle(state, this.applyStroke);\n }\n }\n}\n\nexport default CanvasPolygonBuilder;\n","/**\n * @module ol/geom/flat/straightchunk\n */\n\n/**\n * @param {number} maxAngle Maximum acceptable angle delta between segments.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Array<number>} Start and end of the first suitable chunk of the\n * given `flatCoordinates`.\n */\nexport function matchingChunk(maxAngle, flatCoordinates, offset, end, stride) {\n let chunkStart = offset;\n let chunkEnd = offset;\n let chunkM = 0;\n let m = 0;\n let start = offset;\n let acos, i, m12, m23, x1, y1, x12, y12, x23, y23;\n for (i = offset; i < end; i += stride) {\n const x2 = flatCoordinates[i];\n const y2 = flatCoordinates[i + 1];\n if (x1 !== undefined) {\n x23 = x2 - x1;\n y23 = y2 - y1;\n m23 = Math.sqrt(x23 * x23 + y23 * y23);\n if (x12 !== undefined) {\n m += m12;\n acos = Math.acos((x12 * x23 + y12 * y23) / (m12 * m23));\n if (acos > maxAngle) {\n if (m > chunkM) {\n chunkM = m;\n chunkStart = start;\n chunkEnd = i;\n }\n m = 0;\n start = i - stride;\n }\n }\n m12 = m23;\n x12 = x23;\n y12 = y23;\n }\n x1 = x2;\n y1 = y2;\n }\n m += m23;\n return m > chunkM ? [start, i] : [chunkStart, chunkEnd];\n}\n","/**\n * @module ol/render/canvas/TextBuilder\n */\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction from './Instruction.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport TextPlacement from '../../style/TextPlacement.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {\n defaultFillStyle,\n defaultFont,\n defaultLineCap,\n defaultLineDash,\n defaultLineDashOffset,\n defaultLineJoin,\n defaultLineWidth,\n defaultMiterLimit,\n defaultPadding,\n defaultStrokeStyle,\n defaultTextAlign,\n defaultTextBaseline,\n registerFont,\n} from '../canvas.js';\nimport {getUid} from '../../util.js';\nimport {intersects} from '../../extent.js';\nimport {matchingChunk} from '../../geom/flat/straightchunk.js';\n/**\n * @const\n * @enum {number}\n */\nexport const TEXT_ALIGN = {\n 'left': 0,\n 'end': 0,\n 'center': 0.5,\n 'right': 1,\n 'start': 1,\n 'top': 0,\n 'middle': 0.5,\n 'hanging': 0.2,\n 'alphabetic': 0.8,\n 'ideographic': 0.8,\n 'bottom': 1,\n};\n\nclass CanvasTextBuilder extends CanvasBuilder {\n /**\n * @param {number} tolerance Tolerance.\n * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n */\n constructor(tolerance, maxExtent, resolution, pixelRatio) {\n super(tolerance, maxExtent, resolution, pixelRatio);\n\n /**\n * @private\n * @type {Array<HTMLCanvasElement>}\n */\n this.labels_ = null;\n\n /**\n * @private\n * @type {string}\n */\n this.text_ = '';\n\n /**\n * @private\n * @type {number}\n */\n this.textOffsetX_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.textOffsetY_ = 0;\n\n /**\n * @private\n * @type {boolean|undefined}\n */\n this.textRotateWithView_ = undefined;\n\n /**\n * @private\n * @type {number}\n */\n this.textRotation_ = 0;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").FillState}\n */\n this.textFillState_ = null;\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").FillState>}\n */\n this.fillStates = {};\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").StrokeState}\n */\n this.textStrokeState_ = null;\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").StrokeState>}\n */\n this.strokeStates = {};\n\n /**\n * @private\n * @type {import(\"../canvas.js\").TextState}\n */\n this.textState_ = /** @type {import(\"../canvas.js\").TextState} */ ({});\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").TextState>}\n */\n this.textStates = {};\n\n /**\n * @private\n * @type {string}\n */\n this.textKey_ = '';\n\n /**\n * @private\n * @type {string}\n */\n this.fillKey_ = '';\n\n /**\n * @private\n * @type {string}\n */\n this.strokeKey_ = '';\n\n /**\n * Data shared with an image builder for combined decluttering.\n * @private\n * @type {import(\"../canvas.js\").DeclutterImageWithText}\n */\n this.declutterImageWithText_ = undefined;\n }\n\n /**\n * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n */\n finish() {\n const instructions = super.finish();\n instructions.textStates = this.textStates;\n instructions.fillStates = this.fillStates;\n instructions.strokeStates = this.strokeStates;\n return instructions;\n }\n\n /**\n * @param {import(\"../../geom/SimpleGeometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n */\n drawText(geometry, feature) {\n const fillState = this.textFillState_;\n const strokeState = this.textStrokeState_;\n const textState = this.textState_;\n if (this.text_ === '' || !textState || (!fillState && !strokeState)) {\n return;\n }\n\n const coordinates = this.coordinates;\n let begin = coordinates.length;\n\n const geometryType = geometry.getType();\n let flatCoordinates = null;\n let stride = geometry.getStride();\n\n if (\n textState.placement === TextPlacement.LINE &&\n (geometryType == GeometryType.LINE_STRING ||\n geometryType == GeometryType.MULTI_LINE_STRING ||\n geometryType == GeometryType.POLYGON ||\n geometryType == GeometryType.MULTI_POLYGON)\n ) {\n if (!intersects(this.getBufferedMaxExtent(), geometry.getExtent())) {\n return;\n }\n let ends;\n flatCoordinates = geometry.getFlatCoordinates();\n if (geometryType == GeometryType.LINE_STRING) {\n ends = [flatCoordinates.length];\n } else if (geometryType == GeometryType.MULTI_LINE_STRING) {\n ends = /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry).getEnds();\n } else if (geometryType == GeometryType.POLYGON) {\n ends = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry)\n .getEnds()\n .slice(0, 1);\n } else if (geometryType == GeometryType.MULTI_POLYGON) {\n const endss = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getEndss();\n ends = [];\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n ends.push(endss[i][0]);\n }\n }\n this.beginGeometry(geometry, feature);\n const textAlign = textState.textAlign;\n let flatOffset = 0;\n let flatEnd;\n for (let o = 0, oo = ends.length; o < oo; ++o) {\n if (textAlign == undefined) {\n const range = matchingChunk(\n textState.maxAngle,\n flatCoordinates,\n flatOffset,\n ends[o],\n stride\n );\n flatOffset = range[0];\n flatEnd = range[1];\n } else {\n flatEnd = ends[o];\n }\n for (let i = flatOffset; i < flatEnd; i += stride) {\n coordinates.push(flatCoordinates[i], flatCoordinates[i + 1]);\n }\n const end = coordinates.length;\n flatOffset = ends[o];\n this.drawChars_(begin, end);\n begin = end;\n }\n this.endGeometry(feature);\n } else {\n const geometryWidths = textState.overflow ? null : [];\n switch (geometryType) {\n case GeometryType.POINT:\n case GeometryType.MULTI_POINT:\n flatCoordinates = /** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry).getFlatCoordinates();\n break;\n case GeometryType.LINE_STRING:\n flatCoordinates = /** @type {import(\"../../geom/LineString.js\").default} */ (geometry).getFlatMidpoint();\n break;\n case GeometryType.CIRCLE:\n flatCoordinates = /** @type {import(\"../../geom/Circle.js\").default} */ (geometry).getCenter();\n break;\n case GeometryType.MULTI_LINE_STRING:\n flatCoordinates = /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry).getFlatMidpoints();\n stride = 2;\n break;\n case GeometryType.POLYGON:\n flatCoordinates = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry).getFlatInteriorPoint();\n if (!textState.overflow) {\n geometryWidths.push(flatCoordinates[2] / this.resolution);\n }\n stride = 3;\n break;\n case GeometryType.MULTI_POLYGON:\n const interiorPoints = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getFlatInteriorPoints();\n flatCoordinates = [];\n for (let i = 0, ii = interiorPoints.length; i < ii; i += 3) {\n if (!textState.overflow) {\n geometryWidths.push(interiorPoints[i + 2] / this.resolution);\n }\n flatCoordinates.push(interiorPoints[i], interiorPoints[i + 1]);\n }\n if (flatCoordinates.length === 0) {\n return;\n }\n stride = 2;\n break;\n default:\n }\n const end = this.appendFlatPointCoordinates(flatCoordinates, stride);\n if (end === begin) {\n return;\n }\n\n this.saveTextStates_();\n\n if (textState.backgroundFill || textState.backgroundStroke) {\n this.setFillStrokeStyle(\n textState.backgroundFill,\n textState.backgroundStroke\n );\n if (textState.backgroundFill) {\n this.updateFillStyle(this.state, this.createFill);\n this.hitDetectionInstructions.push(this.createFill(this.state));\n }\n if (textState.backgroundStroke) {\n this.updateStrokeStyle(this.state, this.applyStroke);\n this.hitDetectionInstructions.push(this.createStroke(this.state));\n }\n }\n\n this.beginGeometry(geometry, feature);\n\n // adjust padding for negative scale\n let padding = textState.padding;\n if (\n padding != defaultPadding &&\n (textState.scale[0] < 0 || textState.scale[1] < 0)\n ) {\n let p0 = textState.padding[0];\n let p1 = textState.padding[1];\n let p2 = textState.padding[2];\n let p3 = textState.padding[3];\n if (textState.scale[0] < 0) {\n p1 = -p1;\n p3 = -p3;\n }\n if (textState.scale[1] < 0) {\n p0 = -p0;\n p2 = -p2;\n }\n padding = [p0, p1, p2, p3];\n }\n\n // The image is unknown at this stage so we pass null; it will be computed at render time.\n // For clarity, we pass NaN for offsetX, offsetY, width and height, which will be computed at\n // render time.\n const pixelRatio = this.pixelRatio;\n this.instructions.push([\n CanvasInstruction.DRAW_IMAGE,\n begin,\n end,\n null,\n NaN,\n NaN,\n NaN,\n 1,\n 0,\n 0,\n this.textRotateWithView_,\n this.textRotation_,\n [1, 1],\n NaN,\n this.declutterImageWithText_,\n padding == defaultPadding\n ? defaultPadding\n : padding.map(function (p) {\n return p * pixelRatio;\n }),\n !!textState.backgroundFill,\n !!textState.backgroundStroke,\n this.text_,\n this.textKey_,\n this.strokeKey_,\n this.fillKey_,\n this.textOffsetX_,\n this.textOffsetY_,\n geometryWidths,\n ]);\n const scale = 1 / pixelRatio;\n this.hitDetectionInstructions.push([\n CanvasInstruction.DRAW_IMAGE,\n begin,\n end,\n null,\n NaN,\n NaN,\n NaN,\n 1,\n 0,\n 0,\n this.textRotateWithView_,\n this.textRotation_,\n [scale, scale],\n NaN,\n this.declutterImageWithText_,\n padding,\n !!textState.backgroundFill,\n !!textState.backgroundStroke,\n this.text_,\n this.textKey_,\n this.strokeKey_,\n this.fillKey_,\n this.textOffsetX_,\n this.textOffsetY_,\n geometryWidths,\n ]);\n\n this.endGeometry(feature);\n }\n }\n\n /**\n * @private\n */\n saveTextStates_() {\n const strokeState = this.textStrokeState_;\n const textState = this.textState_;\n const fillState = this.textFillState_;\n\n const strokeKey = this.strokeKey_;\n if (strokeState) {\n if (!(strokeKey in this.strokeStates)) {\n this.strokeStates[strokeKey] = {\n strokeStyle: strokeState.strokeStyle,\n lineCap: strokeState.lineCap,\n lineDashOffset: strokeState.lineDashOffset,\n lineWidth: strokeState.lineWidth,\n lineJoin: strokeState.lineJoin,\n miterLimit: strokeState.miterLimit,\n lineDash: strokeState.lineDash,\n };\n }\n }\n const textKey = this.textKey_;\n if (!(textKey in this.textStates)) {\n this.textStates[textKey] = {\n font: textState.font,\n textAlign: textState.textAlign || defaultTextAlign,\n textBaseline: textState.textBaseline || defaultTextBaseline,\n scale: textState.scale,\n };\n }\n const fillKey = this.fillKey_;\n if (fillState) {\n if (!(fillKey in this.fillStates)) {\n this.fillStates[fillKey] = {\n fillStyle: fillState.fillStyle,\n };\n }\n }\n }\n\n /**\n * @private\n * @param {number} begin Begin.\n * @param {number} end End.\n */\n drawChars_(begin, end) {\n const strokeState = this.textStrokeState_;\n const textState = this.textState_;\n\n const strokeKey = this.strokeKey_;\n const textKey = this.textKey_;\n const fillKey = this.fillKey_;\n this.saveTextStates_();\n\n const pixelRatio = this.pixelRatio;\n const baseline = TEXT_ALIGN[textState.textBaseline];\n\n const offsetY = this.textOffsetY_ * pixelRatio;\n const text = this.text_;\n const strokeWidth = strokeState\n ? (strokeState.lineWidth * Math.abs(textState.scale[0])) / 2\n : 0;\n\n this.instructions.push([\n CanvasInstruction.DRAW_CHARS,\n begin,\n end,\n baseline,\n textState.overflow,\n fillKey,\n textState.maxAngle,\n pixelRatio,\n offsetY,\n strokeKey,\n strokeWidth * pixelRatio,\n text,\n textKey,\n 1,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.DRAW_CHARS,\n begin,\n end,\n baseline,\n textState.overflow,\n fillKey,\n textState.maxAngle,\n 1,\n offsetY,\n strokeKey,\n strokeWidth,\n text,\n textKey,\n 1 / pixelRatio,\n ]);\n }\n\n /**\n * @param {import(\"../../style/Text.js\").default} textStyle Text style.\n * @param {Object=} opt_sharedData Shared data.\n */\n setTextStyle(textStyle, opt_sharedData) {\n let textState, fillState, strokeState;\n if (!textStyle) {\n this.text_ = '';\n } else {\n const textFillStyle = textStyle.getFill();\n if (!textFillStyle) {\n fillState = null;\n this.textFillState_ = fillState;\n } else {\n fillState = this.textFillState_;\n if (!fillState) {\n fillState = /** @type {import(\"../canvas.js\").FillState} */ ({});\n this.textFillState_ = fillState;\n }\n fillState.fillStyle = asColorLike(\n textFillStyle.getColor() || defaultFillStyle\n );\n }\n\n const textStrokeStyle = textStyle.getStroke();\n if (!textStrokeStyle) {\n strokeState = null;\n this.textStrokeState_ = strokeState;\n } else {\n strokeState = this.textStrokeState_;\n if (!strokeState) {\n strokeState = /** @type {import(\"../canvas.js\").StrokeState} */ ({});\n this.textStrokeState_ = strokeState;\n }\n const lineDash = textStrokeStyle.getLineDash();\n const lineDashOffset = textStrokeStyle.getLineDashOffset();\n const lineWidth = textStrokeStyle.getWidth();\n const miterLimit = textStrokeStyle.getMiterLimit();\n strokeState.lineCap = textStrokeStyle.getLineCap() || defaultLineCap;\n strokeState.lineDash = lineDash ? lineDash.slice() : defaultLineDash;\n strokeState.lineDashOffset =\n lineDashOffset === undefined ? defaultLineDashOffset : lineDashOffset;\n strokeState.lineJoin = textStrokeStyle.getLineJoin() || defaultLineJoin;\n strokeState.lineWidth =\n lineWidth === undefined ? defaultLineWidth : lineWidth;\n strokeState.miterLimit =\n miterLimit === undefined ? defaultMiterLimit : miterLimit;\n strokeState.strokeStyle = asColorLike(\n textStrokeStyle.getColor() || defaultStrokeStyle\n );\n }\n\n textState = this.textState_;\n const font = textStyle.getFont() || defaultFont;\n registerFont(font);\n const textScale = textStyle.getScaleArray();\n textState.overflow = textStyle.getOverflow();\n textState.font = font;\n textState.maxAngle = textStyle.getMaxAngle();\n textState.placement = textStyle.getPlacement();\n textState.textAlign = textStyle.getTextAlign();\n textState.textBaseline =\n textStyle.getTextBaseline() || defaultTextBaseline;\n textState.backgroundFill = textStyle.getBackgroundFill();\n textState.backgroundStroke = textStyle.getBackgroundStroke();\n textState.padding = textStyle.getPadding() || defaultPadding;\n textState.scale = textScale === undefined ? [1, 1] : textScale;\n\n const textOffsetX = textStyle.getOffsetX();\n const textOffsetY = textStyle.getOffsetY();\n const textRotateWithView = textStyle.getRotateWithView();\n const textRotation = textStyle.getRotation();\n this.text_ = textStyle.getText() || '';\n this.textOffsetX_ = textOffsetX === undefined ? 0 : textOffsetX;\n this.textOffsetY_ = textOffsetY === undefined ? 0 : textOffsetY;\n this.textRotateWithView_ =\n textRotateWithView === undefined ? false : textRotateWithView;\n this.textRotation_ = textRotation === undefined ? 0 : textRotation;\n\n this.strokeKey_ = strokeState\n ? (typeof strokeState.strokeStyle == 'string'\n ? strokeState.strokeStyle\n : getUid(strokeState.strokeStyle)) +\n strokeState.lineCap +\n strokeState.lineDashOffset +\n '|' +\n strokeState.lineWidth +\n strokeState.lineJoin +\n strokeState.miterLimit +\n '[' +\n strokeState.lineDash.join() +\n ']'\n : '';\n this.textKey_ =\n textState.font +\n textState.scale +\n (textState.textAlign || '?') +\n (textState.textBaseline || '?');\n this.fillKey_ = fillState\n ? typeof fillState.fillStyle == 'string'\n ? fillState.fillStyle\n : '|' + getUid(fillState.fillStyle)\n : '';\n }\n this.declutterImageWithText_ = opt_sharedData;\n }\n}\n\nexport default CanvasTextBuilder;\n","/**\n * @module ol/render/canvas/BuilderGroup\n */\n\nimport Builder from './Builder.js';\nimport ImageBuilder from './ImageBuilder.js';\nimport LineStringBuilder from './LineStringBuilder.js';\nimport PolygonBuilder from './PolygonBuilder.js';\nimport TextBuilder from './TextBuilder.js';\n\n/**\n * @type {Object<import(\"./BuilderType\").default, typeof Builder>}\n */\nconst BATCH_CONSTRUCTORS = {\n 'Circle': PolygonBuilder,\n 'Default': Builder,\n 'Image': ImageBuilder,\n 'LineString': LineStringBuilder,\n 'Polygon': PolygonBuilder,\n 'Text': TextBuilder,\n};\n\nclass BuilderGroup {\n /**\n * @param {number} tolerance Tolerance.\n * @param {import(\"../../extent.js\").Extent} maxExtent Max extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n */\n constructor(tolerance, maxExtent, resolution, pixelRatio) {\n /**\n * @private\n * @type {number}\n */\n this.tolerance_ = tolerance;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.maxExtent_ = maxExtent;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @private\n * @type {number}\n */\n this.resolution_ = resolution;\n\n /**\n * @private\n * @type {!Object<string, !Object<import(\"./BuilderType\").default, Builder>>}\n */\n this.buildersByZIndex_ = {};\n }\n\n /**\n * @return {!Object<string, !Object<import(\"./BuilderType\").default, import(\"./Builder.js\").SerializableInstructions>>} The serializable instructions\n */\n finish() {\n const builderInstructions = {};\n for (const zKey in this.buildersByZIndex_) {\n builderInstructions[zKey] = builderInstructions[zKey] || {};\n const builders = this.buildersByZIndex_[zKey];\n for (const builderKey in builders) {\n const builderInstruction = builders[builderKey].finish();\n builderInstructions[zKey][builderKey] = builderInstruction;\n }\n }\n return builderInstructions;\n }\n\n /**\n * @param {number|undefined} zIndex Z index.\n * @param {import(\"./BuilderType.js\").default} builderType Replay type.\n * @return {import(\"../VectorContext.js\").default} Replay.\n */\n getBuilder(zIndex, builderType) {\n const zIndexKey = zIndex !== undefined ? zIndex.toString() : '0';\n let replays = this.buildersByZIndex_[zIndexKey];\n if (replays === undefined) {\n replays = {};\n this.buildersByZIndex_[zIndexKey] = replays;\n }\n let replay = replays[builderType];\n if (replay === undefined) {\n const Constructor = BATCH_CONSTRUCTORS[builderType];\n replay = new Constructor(\n this.tolerance_,\n this.maxExtent_,\n this.resolution_,\n this.pixelRatio_\n );\n replays[builderType] = replay;\n }\n return replay;\n }\n}\n\nexport default BuilderGroup;\n","/**\n * @module ol/renderer/Layer\n */\nimport EventType from '../events/EventType.js';\nimport ImageState from '../ImageState.js';\nimport Observable from '../Observable.js';\nimport SourceState from '../source/State.js';\nimport {abstract} from '../util.js';\n\n/**\n * @template {import(\"../layer/Layer.js\").default} LayerType\n */\nclass LayerRenderer extends Observable {\n /**\n * @param {LayerType} layer Layer.\n */\n constructor(layer) {\n super();\n\n /** @private */\n this.boundHandleImageChange_ = this.handleImageChange_.bind(this);\n\n /**\n * @protected\n * @type {LayerType}\n */\n this.layer_ = layer;\n\n /**\n * @type {import(\"../render/canvas/ExecutorGroup\").default}\n */\n this.declutterExecutorGroup = null;\n }\n\n /**\n * Asynchronous layer level hit detection.\n * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with\n * an array of features.\n */\n getFeatures(pixel) {\n return abstract();\n }\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 prepareFrame(frameState) {\n return abstract();\n }\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 renderFrame(frameState, target) {\n return abstract();\n }\n\n /**\n * @param {Object<number, Object<string, import(\"../Tile.js\").default>>} tiles Lookup of loaded tiles by zoom level.\n * @param {number} zoom Zoom level.\n * @param {import(\"../Tile.js\").default} tile Tile.\n * @return {boolean|void} If `false`, the tile will not be considered loaded.\n */\n loadedTileCallback(tiles, zoom, tile) {\n if (!tiles[zoom]) {\n tiles[zoom] = {};\n }\n tiles[zoom][tile.tileCoord.toString()] = tile;\n return undefined;\n }\n\n /**\n * Create a function that adds loaded tiles to the tile lookup.\n * @param {import(\"../source/Tile.js\").default} source Tile source.\n * @param {import(\"../proj/Projection.js\").default} projection Projection of the tiles.\n * @param {Object<number, Object<string, import(\"../Tile.js\").default>>} tiles Lookup of loaded tiles by zoom level.\n * @return {function(number, import(\"../TileRange.js\").default):boolean} A function that can be\n * called with a zoom level and a tile range to add loaded tiles to the lookup.\n * @protected\n */\n createLoadedTileFinder(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 const callback = this.loadedTileCallback.bind(this, tiles, zoom);\n return source.forEachLoadedTile(projection, zoom, tileRange, callback);\n }.bind(this)\n );\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<T>} callback Feature callback.\n * @param {Array<import(\"./Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n * @return {T|undefined} Callback result.\n * @template T\n */\n forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n callback,\n matches\n ) {\n return undefined;\n }\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 getDataAtPixel(pixel, frameState, hitTolerance) {\n return abstract();\n }\n\n /**\n * @return {LayerType} Layer.\n */\n getLayer() {\n return this.layer_;\n }\n\n /**\n * Perform action necessary to get the layer rendered after new fonts have loaded\n * @abstract\n */\n handleFontsChanged() {}\n\n /**\n * Handle changes in image state.\n * @param {import(\"../events/Event.js\").default} event Image change event.\n * @private\n */\n handleImageChange_(event) {\n const image = /** @type {import(\"../Image.js\").default} */ (event.target);\n if (image.getState() === ImageState.LOADED) {\n this.renderIfReadyAndVisible();\n }\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 loadImage(image) {\n let 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 /**\n * @protected\n */\n renderIfReadyAndVisible() {\n const layer = this.getLayer();\n if (layer.getVisible() && layer.getSourceState() == SourceState.READY) {\n layer.changed();\n }\n }\n}\n\nexport default LayerRenderer;\n","/**\n * @module ol/render/Event\n */\n\nimport Event from '../events/Event.js';\n\nclass RenderEvent extends Event {\n /**\n * @param {import(\"./EventType.js\").default} type Type.\n * @param {import(\"../transform.js\").Transform=} opt_inversePixelTransform Transform for\n * CSS pixels to rendered pixels.\n * @param {import(\"../PluggableMap.js\").FrameState=} opt_frameState Frame state.\n * @param {?CanvasRenderingContext2D=} opt_context Context.\n */\n constructor(type, opt_inversePixelTransform, opt_frameState, opt_context) {\n super(type);\n\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 /**\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 /**\n * Canvas context. Not available when the event is dispatched by the map. Only available\n * when a Canvas renderer is used, null otherwise.\n * @type {CanvasRenderingContext2D|null|undefined}\n * @api\n */\n this.context = opt_context;\n }\n}\n\nexport default RenderEvent;\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 {\n apply as applyTransform,\n compose as composeTransform,\n create as createTransform,\n} from '../../transform.js';\nimport {\n containsCoordinate,\n getBottomLeft,\n getBottomRight,\n getTopLeft,\n getTopRight,\n} from '../../extent.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {rotateAtOffset} from '../../render/canvas.js';\n\n/**\n * @abstract\n * @template {import(\"../../layer/Layer.js\").default} LayerType\n */\nclass CanvasLayerRenderer extends LayerRenderer {\n /**\n * @param {LayerType} layer Layer.\n */\n constructor(layer) {\n super(layer);\n\n /**\n * @protected\n * @type {HTMLElement}\n */\n this.container = null;\n\n /**\n * @protected\n * @type {number}\n */\n this.renderedResolution;\n\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 /**\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 /**\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 /**\n * @type {CanvasRenderingContext2D}\n */\n this.context = null;\n\n /**\n * @type {boolean}\n */\n this.containerReused = false;\n }\n\n /**\n * Get a rendering container from an existing target, if compatible.\n * @param {HTMLElement} target Potential render target.\n * @param {string} transform CSS Transform.\n * @param {number} opacity Opacity.\n */\n useContainer(target, transform, opacity) {\n const layerClassName = this.getLayer().getClassName();\n let container, context;\n if (\n target &&\n target.style.opacity === '' &&\n target.className === layerClassName\n ) {\n const canvas = target.firstElementChild;\n if (canvas instanceof HTMLCanvasElement) {\n context = canvas.getContext('2d');\n }\n }\n if (\n context &&\n (context.canvas.width === 0 ||\n context.canvas.style.transform === transform)\n ) {\n // Container of the previous layer renderer can be used.\n this.container = target;\n this.context = context;\n this.containerReused = true;\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 let style = container.style;\n style.position = 'absolute';\n style.width = '100%';\n style.height = '100%';\n context = createCanvasContext2D();\n const canvas = context.canvas;\n container.appendChild(canvas);\n style = canvas.style;\n style.position = 'absolute';\n style.left = '0';\n style.transformOrigin = 'top left';\n this.container = container;\n this.context = context;\n }\n }\n\n /**\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 clip(context, frameState, extent) {\n const pixelRatio = frameState.pixelRatio;\n const halfWidth = (frameState.size[0] * pixelRatio) / 2;\n const halfHeight = (frameState.size[1] * pixelRatio) / 2;\n const rotation = frameState.viewState.rotation;\n const topLeft = getTopLeft(extent);\n const topRight = getTopRight(extent);\n const bottomRight = getBottomRight(extent);\n const bottomLeft = getBottomLeft(extent);\n\n applyTransform(frameState.coordinateToPixelTransform, topLeft);\n applyTransform(frameState.coordinateToPixelTransform, topRight);\n applyTransform(frameState.coordinateToPixelTransform, bottomRight);\n applyTransform(frameState.coordinateToPixelTransform, bottomLeft);\n\n context.save();\n rotateAtOffset(context, -rotation, halfWidth, halfHeight);\n context.beginPath();\n context.moveTo(topLeft[0] * pixelRatio, topLeft[1] * pixelRatio);\n context.lineTo(topRight[0] * pixelRatio, topRight[1] * pixelRatio);\n context.lineTo(bottomRight[0] * pixelRatio, bottomRight[1] * pixelRatio);\n context.lineTo(bottomLeft[0] * pixelRatio, bottomLeft[1] * pixelRatio);\n context.clip();\n rotateAtOffset(context, rotation, halfWidth, halfHeight);\n }\n\n /**\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 clipUnrotated(context, frameState, extent) {\n const topLeft = getTopLeft(extent);\n const topRight = getTopRight(extent);\n const bottomRight = getBottomRight(extent);\n const bottomLeft = getBottomLeft(extent);\n\n applyTransform(frameState.coordinateToPixelTransform, topLeft);\n applyTransform(frameState.coordinateToPixelTransform, topRight);\n applyTransform(frameState.coordinateToPixelTransform, bottomRight);\n applyTransform(frameState.coordinateToPixelTransform, bottomLeft);\n\n const inverted = this.inversePixelTransform;\n applyTransform(inverted, topLeft);\n applyTransform(inverted, topRight);\n applyTransform(inverted, bottomRight);\n applyTransform(inverted, bottomLeft);\n\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 /**\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 dispatchRenderEvent_(type, context, frameState) {\n const layer = this.getLayer();\n if (layer.hasListener(type)) {\n const event = new RenderEvent(\n type,\n this.inversePixelTransform,\n frameState,\n context\n );\n layer.dispatchEvent(event);\n }\n }\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @protected\n */\n preRender(context, frameState) {\n this.dispatchRenderEvent_(RenderEventType.PRERENDER, context, frameState);\n }\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @protected\n */\n postRender(context, frameState) {\n this.dispatchRenderEvent_(RenderEventType.POSTRENDER, context, frameState);\n }\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 getRenderTransform(\n center,\n resolution,\n rotation,\n pixelRatio,\n width,\n height,\n offsetX\n ) {\n const dx1 = width / 2;\n const dy1 = height / 2;\n const sx = pixelRatio / resolution;\n const sy = -sx;\n const dx2 = -center[0] + offsetX;\n const dy2 = -center[1];\n return composeTransform(\n this.tempTransform,\n dx1,\n dy1,\n sx,\n sy,\n -rotation,\n dx2,\n dy2\n );\n }\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 getDataAtPixel(pixel, frameState, hitTolerance) {\n const renderPixel = applyTransform(\n this.inversePixelTransform,\n pixel.slice()\n );\n const context = this.context;\n\n const layer = this.getLayer();\n const layerExtent = layer.getExtent();\n if (layerExtent) {\n const renderCoordinate = applyTransform(\n frameState.pixelToCoordinateTransform,\n pixel.slice()\n );\n\n /** get only data inside of the layer extent */\n if (!containsCoordinate(layerExtent, renderCoordinate)) {\n return null;\n }\n }\n\n let data;\n try {\n const x = Math.round(renderPixel[0]);\n const y = Math.round(renderPixel[1]);\n const newCanvas = document.createElement('canvas');\n const newContext = newCanvas.getContext('2d');\n newCanvas.width = 1;\n newCanvas.height = 1;\n newContext.clearRect(0, 0, 1, 1);\n newContext.drawImage(context.canvas, x, y, 1, 1, 0, 0, 1, 1);\n data = newContext.getImageData(0, 0, 1, 1).data;\n } catch (err) {\n if (err.name === 'SecurityError') {\n // tainted canvas, we assume there is data at the given pixel (although there might not be)\n return new Uint8Array();\n }\n return data;\n }\n\n if (data[3] === 0) {\n return null;\n }\n return data;\n }\n}\n\nexport default CanvasLayerRenderer;\n","/**\n * @module ol/render/canvas/BuilderType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n CIRCLE: 'Circle',\n DEFAULT: 'Default',\n IMAGE: 'Image',\n LINE_STRING: 'LineString',\n POLYGON: 'Polygon',\n TEXT: 'Text',\n};\n","/**\n * @module ol/geom/flat/textpath\n */\nimport {lerp} from '../../math.js';\nimport {rotate} from './transform.js';\n\n/**\n * @param {Array<number>} flatCoordinates Path to put text on.\n * @param {number} offset Start offset of the `flatCoordinates`.\n * @param {number} end End offset of the `flatCoordinates`.\n * @param {number} stride Stride.\n * @param {string} text Text to place on the path.\n * @param {number} startM m along the path where the text starts.\n * @param {number} maxAngle Max angle between adjacent chars in radians.\n * @param {number} scale The product of the text scale and the device pixel ratio.\n * @param {function(string, string, Object<string, number>):number} measureAndCacheTextWidth Measure and cache text width.\n * @param {string} font The font.\n * @param {Object<string, number>} cache A cache of measured widths.\n * @param {number} rotation Rotation to apply to the flatCoordinates to determine whether text needs to be reversed.\n * @return {Array<Array<*>>} The result array (or null if `maxAngle` was\n * exceeded). Entries of the array are x, y, anchorX, angle, chunk.\n */\nexport function drawTextOnPath(\n flatCoordinates,\n offset,\n end,\n stride,\n text,\n startM,\n maxAngle,\n scale,\n measureAndCacheTextWidth,\n font,\n cache,\n rotation\n) {\n let x2 = flatCoordinates[offset];\n let y2 = flatCoordinates[offset + 1];\n let x1 = 0;\n let y1 = 0;\n let segmentLength = 0;\n let segmentM = 0;\n\n function advance() {\n x1 = x2;\n y1 = y2;\n offset += stride;\n x2 = flatCoordinates[offset];\n y2 = flatCoordinates[offset + 1];\n segmentM += segmentLength;\n segmentLength = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n }\n do {\n advance();\n } while (offset < end - stride && segmentM + segmentLength < startM);\n\n let interpolate = (startM - segmentM) / segmentLength;\n const beginX = lerp(x1, x2, interpolate);\n const beginY = lerp(y1, y2, interpolate);\n\n const startOffset = offset - stride;\n const startLength = segmentM;\n const endM = startM + scale * measureAndCacheTextWidth(font, text, cache);\n while (offset < end - stride && segmentM + segmentLength < endM) {\n advance();\n }\n interpolate = (endM - segmentM) / segmentLength;\n const endX = lerp(x1, x2, interpolate);\n const endY = lerp(y1, y2, interpolate);\n\n // Keep text upright\n let reverse;\n if (rotation) {\n const flat = [beginX, beginY, endX, endY];\n rotate(flat, 0, 4, 2, rotation, flat, flat);\n reverse = flat[0] > flat[2];\n } else {\n reverse = beginX > endX;\n }\n\n const PI = Math.PI;\n const result = [];\n const singleSegment = startOffset + stride === offset;\n\n offset = startOffset;\n segmentLength = 0;\n segmentM = startLength;\n x2 = flatCoordinates[offset];\n y2 = flatCoordinates[offset + 1];\n\n // All on the same segment\n if (singleSegment) {\n advance();\n\n let previousAngle = Math.atan2(y2 - y1, x2 - x1);\n if (reverse) {\n previousAngle += previousAngle > 0 ? -PI : PI;\n }\n const x = (endX + beginX) / 2;\n const y = (endY + beginY) / 2;\n result[0] = [x, y, (endM - startM) / 2, previousAngle, text];\n return result;\n }\n\n let previousAngle;\n for (let i = 0, ii = text.length; i < ii; ) {\n advance();\n let angle = Math.atan2(y2 - y1, x2 - x1);\n if (reverse) {\n angle += angle > 0 ? -PI : PI;\n }\n if (previousAngle !== undefined) {\n let delta = angle - previousAngle;\n delta += delta > PI ? -2 * PI : delta < -PI ? 2 * PI : 0;\n if (Math.abs(delta) > maxAngle) {\n return null;\n }\n }\n previousAngle = angle;\n\n const iStart = i;\n let charLength = 0;\n for (; i < ii; ++i) {\n const index = reverse ? ii - i - 1 : i;\n const len = scale * measureAndCacheTextWidth(font, text[index], cache);\n if (\n offset + stride < end &&\n segmentM + segmentLength < startM + charLength + len / 2\n ) {\n break;\n }\n charLength += len;\n }\n if (i === iStart) {\n continue;\n }\n const chars = reverse\n ? text.substring(ii - iStart, ii - i)\n : text.substring(iStart, i);\n interpolate = (startM + charLength / 2 - segmentM) / segmentLength;\n const x = lerp(x1, x2, interpolate);\n const y = lerp(y1, y2, interpolate);\n result.push([x, y, charLength / 2, angle, chars]);\n startM += charLength;\n }\n return result;\n}\n","/**\n * @module ol/render/canvas/Executor\n */\nimport CanvasInstruction from './Instruction.js';\nimport {TEXT_ALIGN} from './TextBuilder.js';\nimport {WORKER_OFFSCREEN_CANVAS} from '../../has.js';\nimport {\n apply as applyTransform,\n compose as composeTransform,\n create as createTransform,\n setFromArray as transformSetFromArray,\n} from '../../transform.js';\nimport {createEmpty, createOrUpdate, intersects} from '../../extent.js';\nimport {\n defaultPadding,\n defaultTextBaseline,\n drawImageOrLabel,\n} from '../canvas.js';\nimport {\n defaultTextAlign,\n measureAndCacheTextWidth,\n measureTextHeight,\n measureTextWidths,\n} from '../canvas.js';\nimport {drawTextOnPath} from '../../geom/flat/textpath.js';\nimport {equals} from '../../array.js';\nimport {lineStringLength} from '../../geom/flat/length.js';\nimport {transform2D} from '../../geom/flat/transform.js';\n\n/**\n * @typedef {Object} BBox\n * @property {number} minX\n * @property {number} minY\n * @property {number} maxX\n * @property {number} maxY\n * @property {*} value\n */\n\n/**\n * @typedef {Object} ImageOrLabelDimensions\n * @property {number} drawImageX\n * @property {number} drawImageY\n * @property {number} drawImageW\n * @property {number} drawImageH\n * @property {number} originX\n * @property {number} originY\n * @property {Array<number>} scale\n * @property {BBox} declutterBox\n * @property {import(\"../../transform.js\").Transform} canvasTransform\n */\n\n/**\n * @typedef {{0: CanvasRenderingContext2D, 1: number, 2: import(\"../canvas.js\").Label|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement, 3: ImageOrLabelDimensions, 4: number, 5: Array<*>, 6: Array<*>}} ReplayImageOrLabelArgs\n */\n\n/**\n * @template T\n * @typedef {function(import(\"../../Feature.js\").FeatureLike, import(\"../../geom/SimpleGeometry.js\").default): T} FeatureCallback\n */\n\n/**\n * @type {import(\"../../extent.js\").Extent}\n */\nconst tmpExtent = createEmpty();\n\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nconst p1 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nconst p2 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nconst p3 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nconst p4 = [];\n\n/**\n * @param {ReplayImageOrLabelArgs} replayImageOrLabelArgs Arguments to replayImageOrLabel\n * @return {BBox} Declutter bbox.\n */\nfunction getDeclutterBox(replayImageOrLabelArgs) {\n return replayImageOrLabelArgs[3].declutterBox;\n}\n\nconst rtlRegEx = new RegExp(\n /* eslint-disable prettier/prettier */\n '[' +\n String.fromCharCode(0x00591) + '-' + String.fromCharCode(0x008ff) +\n String.fromCharCode(0x0fb1d) + '-' + String.fromCharCode(0x0fdff) +\n String.fromCharCode(0x0fe70) + '-' + String.fromCharCode(0x0fefc) +\n String.fromCharCode(0x10800) + '-' + String.fromCharCode(0x10fff) +\n String.fromCharCode(0x1e800) + '-' + String.fromCharCode(0x1efff) +\n ']'\n /* eslint-enable prettier/prettier */\n);\n\n/**\n * @param {string} text Text.\n * @param {string} align Alignment.\n * @return {number} Text alignment.\n */\nfunction horizontalTextAlign(text, align) {\n if ((align === 'start' || align === 'end') && !rtlRegEx.test(text)) {\n align = align === 'start' ? 'left' : 'right';\n }\n return TEXT_ALIGN[align];\n}\n\nclass Executor {\n /**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {boolean} overlaps The replay can have overlapping geometries.\n * @param {import(\"../canvas.js\").SerializableInstructions} instructions The serializable instructions\n * @param {import(\"../../size.js\").Size} renderBuffer Render buffer (width/height) in pixels.\n */\n constructor(resolution, pixelRatio, overlaps, instructions, renderBuffer) {\n /**\n * @protected\n * @type {boolean}\n */\n this.overlaps = overlaps;\n\n /**\n * @protected\n * @type {number}\n */\n this.pixelRatio = pixelRatio;\n\n /**\n * @protected\n * @const\n * @type {number}\n */\n this.resolution = resolution;\n\n /**\n * @private\n * @type {boolean}\n */\n this.alignFill_;\n\n /**\n * @protected\n * @type {Array<*>}\n */\n this.instructions = instructions.instructions;\n\n /**\n * @protected\n * @type {Array<number>}\n */\n this.coordinates = instructions.coordinates;\n\n /**\n * @private\n * @type {!Object<number,import(\"../../coordinate.js\").Coordinate|Array<import(\"../../coordinate.js\").Coordinate>|Array<Array<import(\"../../coordinate.js\").Coordinate>>>}\n */\n this.coordinateCache_ = {};\n\n /**\n * @private\n * @type {import(\"../../size.js\").Size}\n */\n this.renderBuffer_ = renderBuffer;\n\n /**\n * @private\n * @type {!import(\"../../transform.js\").Transform}\n */\n this.renderedTransform_ = createTransform();\n\n /**\n * @protected\n * @type {Array<*>}\n */\n this.hitDetectionInstructions = instructions.hitDetectionInstructions;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.pixelCoordinates_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.viewRotation_ = 0;\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").FillState>}\n */\n this.fillStates = instructions.fillStates || {};\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").StrokeState>}\n */\n this.strokeStates = instructions.strokeStates || {};\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").TextState>}\n */\n this.textStates = instructions.textStates || {};\n\n /**\n * @private\n * @type {Object<string, Object<string, number>>}\n */\n this.widths_ = {};\n\n /**\n * @private\n * @type {Object<string, import(\"../canvas.js\").Label>}\n */\n this.labels_ = {};\n }\n\n /**\n * @param {string} text Text.\n * @param {string} textKey Text style key.\n * @param {string} fillKey Fill style key.\n * @param {string} strokeKey Stroke style key.\n * @return {import(\"../canvas.js\").Label} Label.\n */\n createLabel(text, textKey, fillKey, strokeKey) {\n const key = text + textKey + fillKey + strokeKey;\n if (this.labels_[key]) {\n return this.labels_[key];\n }\n const strokeState = strokeKey ? this.strokeStates[strokeKey] : null;\n const fillState = fillKey ? this.fillStates[fillKey] : null;\n const textState = this.textStates[textKey];\n const pixelRatio = this.pixelRatio;\n const scale = [\n textState.scale[0] * pixelRatio,\n textState.scale[1] * pixelRatio,\n ];\n const align = horizontalTextAlign(\n text,\n textState.textAlign || defaultTextAlign\n );\n const strokeWidth =\n strokeKey && strokeState.lineWidth ? strokeState.lineWidth : 0;\n\n const lines = text.split('\\n');\n const numLines = lines.length;\n const widths = [];\n const width = measureTextWidths(textState.font, lines, widths);\n const lineHeight = measureTextHeight(textState.font);\n const height = lineHeight * numLines;\n const renderWidth = width + strokeWidth;\n const contextInstructions = [];\n // make canvas 2 pixels wider to account for italic text width measurement errors\n const w = (renderWidth + 2) * scale[0];\n const h = (height + strokeWidth) * scale[1];\n /** @type {import(\"../canvas.js\").Label} */\n const label = {\n width: w < 0 ? Math.floor(w) : Math.ceil(w),\n height: h < 0 ? Math.floor(h) : Math.ceil(h),\n contextInstructions: contextInstructions,\n };\n if (scale[0] != 1 || scale[1] != 1) {\n contextInstructions.push('scale', scale);\n }\n contextInstructions.push('font', textState.font);\n if (strokeKey) {\n contextInstructions.push('strokeStyle', strokeState.strokeStyle);\n contextInstructions.push('lineWidth', strokeWidth);\n contextInstructions.push('lineCap', strokeState.lineCap);\n contextInstructions.push('lineJoin', strokeState.lineJoin);\n contextInstructions.push('miterLimit', strokeState.miterLimit);\n // eslint-disable-next-line\n const Context = WORKER_OFFSCREEN_CANVAS ? OffscreenCanvasRenderingContext2D : CanvasRenderingContext2D;\n if (Context.prototype.setLineDash) {\n contextInstructions.push('setLineDash', [strokeState.lineDash]);\n contextInstructions.push('lineDashOffset', strokeState.lineDashOffset);\n }\n }\n if (fillKey) {\n contextInstructions.push('fillStyle', fillState.fillStyle);\n }\n contextInstructions.push('textBaseline', 'middle');\n contextInstructions.push('textAlign', 'center');\n const leftRight = 0.5 - align;\n const x = align * renderWidth + leftRight * strokeWidth;\n let i;\n if (strokeKey) {\n for (i = 0; i < numLines; ++i) {\n contextInstructions.push('strokeText', [\n lines[i],\n x + leftRight * widths[i],\n 0.5 * (strokeWidth + lineHeight) + i * lineHeight,\n ]);\n }\n }\n if (fillKey) {\n for (i = 0; i < numLines; ++i) {\n contextInstructions.push('fillText', [\n lines[i],\n x + leftRight * widths[i],\n 0.5 * (strokeWidth + lineHeight) + i * lineHeight,\n ]);\n }\n }\n this.labels_[key] = label;\n return label;\n }\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../coordinate.js\").Coordinate} p1 1st point of the background box.\n * @param {import(\"../../coordinate.js\").Coordinate} p2 2nd point of the background box.\n * @param {import(\"../../coordinate.js\").Coordinate} p3 3rd point of the background box.\n * @param {import(\"../../coordinate.js\").Coordinate} p4 4th point of the background box.\n * @param {Array<*>} fillInstruction Fill instruction.\n * @param {Array<*>} strokeInstruction Stroke instruction.\n */\n replayTextBackground_(\n context,\n p1,\n p2,\n p3,\n p4,\n fillInstruction,\n strokeInstruction\n ) {\n context.beginPath();\n context.moveTo.apply(context, p1);\n context.lineTo.apply(context, p2);\n context.lineTo.apply(context, p3);\n context.lineTo.apply(context, p4);\n context.lineTo.apply(context, p1);\n if (fillInstruction) {\n this.alignFill_ = /** @type {boolean} */ (fillInstruction[2]);\n this.fill_(context);\n }\n if (strokeInstruction) {\n this.setStrokeStyle_(\n context,\n /** @type {Array<*>} */ (strokeInstruction)\n );\n context.stroke();\n }\n }\n\n /**\n * @private\n * @param {number} sheetWidth Width of the sprite sheet.\n * @param {number} sheetHeight Height of the sprite sheet.\n * @param {number} centerX X.\n * @param {number} centerY Y.\n * @param {number} width Width.\n * @param {number} height Height.\n * @param {number} anchorX Anchor X.\n * @param {number} anchorY Anchor Y.\n * @param {number} originX Origin X.\n * @param {number} originY Origin Y.\n * @param {number} rotation Rotation.\n * @param {import(\"../../size.js\").Size} scale Scale.\n * @param {boolean} snapToPixel Snap to pixel.\n * @param {Array<number>} padding Padding.\n * @param {boolean} fillStroke Background fill or stroke.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @return {ImageOrLabelDimensions} Dimensions for positioning and decluttering the image or label.\n */\n calculateImageOrLabelDimensions_(\n sheetWidth,\n sheetHeight,\n centerX,\n centerY,\n width,\n height,\n anchorX,\n anchorY,\n originX,\n originY,\n rotation,\n scale,\n snapToPixel,\n padding,\n fillStroke,\n feature\n ) {\n anchorX *= scale[0];\n anchorY *= scale[1];\n let x = centerX - anchorX;\n let y = centerY - anchorY;\n\n const w = width + originX > sheetWidth ? sheetWidth - originX : width;\n const h = height + originY > sheetHeight ? sheetHeight - originY : height;\n const boxW = padding[3] + w * scale[0] + padding[1];\n const boxH = padding[0] + h * scale[1] + padding[2];\n const boxX = x - padding[3];\n const boxY = y - padding[0];\n\n if (fillStroke || rotation !== 0) {\n p1[0] = boxX;\n p4[0] = boxX;\n p1[1] = boxY;\n p2[1] = boxY;\n p2[0] = boxX + boxW;\n p3[0] = p2[0];\n p3[1] = boxY + boxH;\n p4[1] = p3[1];\n }\n\n let transform;\n if (rotation !== 0) {\n transform = composeTransform(\n createTransform(),\n centerX,\n centerY,\n 1,\n 1,\n rotation,\n -centerX,\n -centerY\n );\n\n applyTransform(transform, p1);\n applyTransform(transform, p2);\n applyTransform(transform, p3);\n applyTransform(transform, p4);\n createOrUpdate(\n Math.min(p1[0], p2[0], p3[0], p4[0]),\n Math.min(p1[1], p2[1], p3[1], p4[1]),\n Math.max(p1[0], p2[0], p3[0], p4[0]),\n Math.max(p1[1], p2[1], p3[1], p4[1]),\n tmpExtent\n );\n } else {\n createOrUpdate(\n Math.min(boxX, boxX + boxW),\n Math.min(boxY, boxY + boxH),\n Math.max(boxX, boxX + boxW),\n Math.max(boxY, boxY + boxH),\n tmpExtent\n );\n }\n if (snapToPixel) {\n x = Math.round(x);\n y = Math.round(y);\n }\n return {\n drawImageX: x,\n drawImageY: y,\n drawImageW: w,\n drawImageH: h,\n originX: originX,\n originY: originY,\n declutterBox: {\n minX: tmpExtent[0],\n minY: tmpExtent[1],\n maxX: tmpExtent[2],\n maxY: tmpExtent[3],\n value: feature,\n },\n canvasTransform: transform,\n scale: scale,\n };\n }\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} contextScale Scale of the context.\n * @param {import(\"../canvas.js\").Label|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} imageOrLabel Image.\n * @param {ImageOrLabelDimensions} dimensions Dimensions.\n * @param {number} opacity Opacity.\n * @param {Array<*>} fillInstruction Fill instruction.\n * @param {Array<*>} strokeInstruction Stroke instruction.\n * @return {boolean} The image or label was rendered.\n */\n replayImageOrLabel_(\n context,\n contextScale,\n imageOrLabel,\n dimensions,\n opacity,\n fillInstruction,\n strokeInstruction\n ) {\n const fillStroke = !!(fillInstruction || strokeInstruction);\n\n const box = dimensions.declutterBox;\n const canvas = context.canvas;\n const strokePadding = strokeInstruction\n ? (strokeInstruction[2] * dimensions.scale[0]) / 2\n : 0;\n const intersects =\n box.minX - strokePadding <= canvas.width / contextScale &&\n box.maxX + strokePadding >= 0 &&\n box.minY - strokePadding <= canvas.height / contextScale &&\n box.maxY + strokePadding >= 0;\n\n if (intersects) {\n if (fillStroke) {\n this.replayTextBackground_(\n context,\n p1,\n p2,\n p3,\n p4,\n /** @type {Array<*>} */ (fillInstruction),\n /** @type {Array<*>} */ (strokeInstruction)\n );\n }\n drawImageOrLabel(\n context,\n dimensions.canvasTransform,\n opacity,\n imageOrLabel,\n dimensions.originX,\n dimensions.originY,\n dimensions.drawImageW,\n dimensions.drawImageH,\n dimensions.drawImageX,\n dimensions.drawImageY,\n dimensions.scale\n );\n }\n return true;\n }\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} context Context.\n */\n fill_(context) {\n if (this.alignFill_) {\n const origin = applyTransform(this.renderedTransform_, [0, 0]);\n const repeatSize = 512 * this.pixelRatio;\n context.save();\n context.translate(origin[0] % repeatSize, origin[1] % repeatSize);\n context.rotate(this.viewRotation_);\n }\n context.fill();\n if (this.alignFill_) {\n context.restore();\n }\n }\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} context Context.\n * @param {Array<*>} instruction Instruction.\n */\n setStrokeStyle_(context, instruction) {\n context[\n 'strokeStyle'\n ] = /** @type {import(\"../../colorlike.js\").ColorLike} */ (instruction[1]);\n context.lineWidth = /** @type {number} */ (instruction[2]);\n context.lineCap = /** @type {CanvasLineCap} */ (instruction[3]);\n context.lineJoin = /** @type {CanvasLineJoin} */ (instruction[4]);\n context.miterLimit = /** @type {number} */ (instruction[5]);\n if (context.setLineDash) {\n context.lineDashOffset = /** @type {number} */ (instruction[7]);\n context.setLineDash(/** @type {Array<number>} */ (instruction[6]));\n }\n }\n\n /**\n * @private\n * @param {string} text The text to draw.\n * @param {string} textKey The key of the text state.\n * @param {string} strokeKey The key for the stroke state.\n * @param {string} fillKey The key for the fill state.\n * @return {{label: import(\"../canvas.js\").Label, anchorX: number, anchorY: number}} The text image and its anchor.\n */\n drawLabelWithPointPlacement_(text, textKey, strokeKey, fillKey) {\n const textState = this.textStates[textKey];\n\n const label = this.createLabel(text, textKey, fillKey, strokeKey);\n\n const strokeState = this.strokeStates[strokeKey];\n const pixelRatio = this.pixelRatio;\n const align = horizontalTextAlign(\n text,\n textState.textAlign || defaultTextAlign\n );\n const baseline = TEXT_ALIGN[textState.textBaseline || defaultTextBaseline];\n const strokeWidth =\n strokeState && strokeState.lineWidth ? strokeState.lineWidth : 0;\n\n // Remove the 2 pixels we added in createLabel() for the anchor\n const width = label.width / pixelRatio - 2 * textState.scale[0];\n const anchorX = align * width + 2 * (0.5 - align) * strokeWidth;\n const anchorY =\n (baseline * label.height) / pixelRatio +\n 2 * (0.5 - baseline) * strokeWidth;\n\n return {\n label: label,\n anchorX: anchorX,\n anchorY: anchorY,\n };\n }\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} contextScale Scale of the context.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {Array<*>} instructions Instructions array.\n * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n * @param {FeatureCallback<T>=} opt_featureCallback Feature callback.\n * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Only check\n * features that intersect this extent.\n * @param {import(\"rbush\").default=} opt_declutterTree Declutter tree.\n * @return {T|undefined} Callback result.\n * @template T\n */\n execute_(\n context,\n contextScale,\n transform,\n instructions,\n snapToPixel,\n opt_featureCallback,\n opt_hitExtent,\n opt_declutterTree\n ) {\n /** @type {Array<number>} */\n let pixelCoordinates;\n if (this.pixelCoordinates_ && equals(transform, this.renderedTransform_)) {\n pixelCoordinates = this.pixelCoordinates_;\n } else {\n if (!this.pixelCoordinates_) {\n this.pixelCoordinates_ = [];\n }\n pixelCoordinates = transform2D(\n this.coordinates,\n 0,\n this.coordinates.length,\n 2,\n transform,\n this.pixelCoordinates_\n );\n transformSetFromArray(this.renderedTransform_, transform);\n }\n let i = 0; // instruction index\n const ii = instructions.length; // end of instructions\n let d = 0; // data index\n let dd; // end of per-instruction data\n let anchorX,\n anchorY,\n prevX,\n prevY,\n roundX,\n roundY,\n image,\n text,\n textKey,\n strokeKey,\n fillKey;\n let pendingFill = 0;\n let pendingStroke = 0;\n let lastFillInstruction = null;\n let lastStrokeInstruction = null;\n const coordinateCache = this.coordinateCache_;\n const viewRotation = this.viewRotation_;\n const viewRotationFromTransform =\n Math.round(Math.atan2(-transform[1], transform[0]) * 1e12) / 1e12;\n\n const state = /** @type {import(\"../../render.js\").State} */ ({\n context: context,\n pixelRatio: this.pixelRatio,\n resolution: this.resolution,\n rotation: viewRotation,\n });\n\n // When the batch size gets too big, performance decreases. 200 is a good\n // balance between batch size and number of fill/stroke instructions.\n const batchSize =\n this.instructions != instructions || this.overlaps ? 0 : 200;\n let /** @type {import(\"../../Feature.js\").FeatureLike} */ feature;\n let x, y, currentGeometry;\n while (i < ii) {\n const instruction = instructions[i];\n const type = /** @type {import(\"./Instruction.js\").default} */ (instruction[0]);\n switch (type) {\n case CanvasInstruction.BEGIN_GEOMETRY:\n feature = /** @type {import(\"../../Feature.js\").FeatureLike} */ (instruction[1]);\n currentGeometry = instruction[3];\n if (!feature.getGeometry()) {\n i = /** @type {number} */ (instruction[2]);\n } else if (\n opt_hitExtent !== undefined &&\n !intersects(opt_hitExtent, currentGeometry.getExtent())\n ) {\n i = /** @type {number} */ (instruction[2]) + 1;\n } else {\n ++i;\n }\n break;\n case CanvasInstruction.BEGIN_PATH:\n if (pendingFill > batchSize) {\n this.fill_(context);\n pendingFill = 0;\n }\n if (pendingStroke > batchSize) {\n context.stroke();\n pendingStroke = 0;\n }\n if (!pendingFill && !pendingStroke) {\n context.beginPath();\n prevX = NaN;\n prevY = NaN;\n }\n ++i;\n break;\n case CanvasInstruction.CIRCLE:\n d = /** @type {number} */ (instruction[1]);\n const x1 = pixelCoordinates[d];\n const y1 = pixelCoordinates[d + 1];\n const x2 = pixelCoordinates[d + 2];\n const y2 = pixelCoordinates[d + 3];\n const dx = x2 - x1;\n const dy = y2 - y1;\n const r = Math.sqrt(dx * dx + dy * dy);\n context.moveTo(x1 + r, y1);\n context.arc(x1, y1, r, 0, 2 * Math.PI, true);\n ++i;\n break;\n case CanvasInstruction.CLOSE_PATH:\n context.closePath();\n ++i;\n break;\n case CanvasInstruction.CUSTOM:\n d = /** @type {number} */ (instruction[1]);\n dd = instruction[2];\n const geometry = /** @type {import(\"../../geom/SimpleGeometry.js\").default} */ (instruction[3]);\n const renderer = instruction[4];\n const fn = instruction.length == 6 ? instruction[5] : undefined;\n state.geometry = geometry;\n state.feature = feature;\n if (!(i in coordinateCache)) {\n coordinateCache[i] = [];\n }\n const coords = coordinateCache[i];\n if (fn) {\n fn(pixelCoordinates, d, dd, 2, coords);\n } else {\n coords[0] = pixelCoordinates[d];\n coords[1] = pixelCoordinates[d + 1];\n coords.length = 2;\n }\n renderer(coords, state);\n ++i;\n break;\n case CanvasInstruction.DRAW_IMAGE:\n d = /** @type {number} */ (instruction[1]);\n dd = /** @type {number} */ (instruction[2]);\n image = /** @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} */ (instruction[3]);\n\n // Remaining arguments in DRAW_IMAGE are in alphabetical order\n anchorX = /** @type {number} */ (instruction[4]);\n anchorY = /** @type {number} */ (instruction[5]);\n let height = /** @type {number} */ (instruction[6]);\n const opacity = /** @type {number} */ (instruction[7]);\n const originX = /** @type {number} */ (instruction[8]);\n const originY = /** @type {number} */ (instruction[9]);\n const rotateWithView = /** @type {boolean} */ (instruction[10]);\n let rotation = /** @type {number} */ (instruction[11]);\n const scale = /** @type {import(\"../../size.js\").Size} */ (instruction[12]);\n let width = /** @type {number} */ (instruction[13]);\n const declutterImageWithText = /** @type {import(\"../canvas.js\").DeclutterImageWithText} */ (instruction[14]);\n\n if (!image && instruction.length >= 19) {\n // create label images\n text = /** @type {string} */ (instruction[18]);\n textKey = /** @type {string} */ (instruction[19]);\n strokeKey = /** @type {string} */ (instruction[20]);\n fillKey = /** @type {string} */ (instruction[21]);\n const labelWithAnchor = this.drawLabelWithPointPlacement_(\n text,\n textKey,\n strokeKey,\n fillKey\n );\n image = labelWithAnchor.label;\n instruction[3] = image;\n const textOffsetX = /** @type {number} */ (instruction[22]);\n anchorX = (labelWithAnchor.anchorX - textOffsetX) * this.pixelRatio;\n instruction[4] = anchorX;\n const textOffsetY = /** @type {number} */ (instruction[23]);\n anchorY = (labelWithAnchor.anchorY - textOffsetY) * this.pixelRatio;\n instruction[5] = anchorY;\n height = image.height;\n instruction[6] = height;\n width = image.width;\n instruction[13] = width;\n }\n\n let geometryWidths;\n if (instruction.length > 24) {\n geometryWidths = /** @type {number} */ (instruction[24]);\n }\n\n let padding, backgroundFill, backgroundStroke;\n if (instruction.length > 16) {\n padding = /** @type {Array<number>} */ (instruction[15]);\n backgroundFill = /** @type {boolean} */ (instruction[16]);\n backgroundStroke = /** @type {boolean} */ (instruction[17]);\n } else {\n padding = defaultPadding;\n backgroundFill = false;\n backgroundStroke = false;\n }\n\n if (rotateWithView && viewRotationFromTransform) {\n // Canvas is expected to be rotated to reverse view rotation.\n rotation += viewRotation;\n } else if (!rotateWithView && !viewRotationFromTransform) {\n // Canvas is not rotated, images need to be rotated back to be north-up.\n rotation -= viewRotation;\n }\n let widthIndex = 0;\n for (; d < dd; d += 2) {\n if (\n geometryWidths &&\n geometryWidths[widthIndex++] < width / this.pixelRatio\n ) {\n continue;\n }\n const dimensions = this.calculateImageOrLabelDimensions_(\n image.width,\n image.height,\n pixelCoordinates[d],\n pixelCoordinates[d + 1],\n width,\n height,\n anchorX,\n anchorY,\n originX,\n originY,\n rotation,\n scale,\n snapToPixel,\n padding,\n backgroundFill || backgroundStroke,\n feature\n );\n /** @type {ReplayImageOrLabelArgs} */\n const args = [\n context,\n contextScale,\n image,\n dimensions,\n opacity,\n backgroundFill\n ? /** @type {Array<*>} */ (lastFillInstruction)\n : null,\n backgroundStroke\n ? /** @type {Array<*>} */ (lastStrokeInstruction)\n : null,\n ];\n let imageArgs;\n let imageDeclutterBox;\n if (opt_declutterTree && declutterImageWithText) {\n if (!declutterImageWithText[d]) {\n // We now have the image for an image+text combination.\n declutterImageWithText[d] = args;\n // Don't render anything for now, wait for the text.\n continue;\n }\n imageArgs = declutterImageWithText[d];\n delete declutterImageWithText[d];\n imageDeclutterBox = getDeclutterBox(imageArgs);\n if (opt_declutterTree.collides(imageDeclutterBox)) {\n continue;\n }\n }\n if (\n opt_declutterTree &&\n opt_declutterTree.collides(dimensions.declutterBox)\n ) {\n continue;\n }\n if (imageArgs) {\n // We now have image and text for an image+text combination.\n if (opt_declutterTree) {\n opt_declutterTree.insert(imageDeclutterBox);\n }\n // Render the image before we render the text.\n this.replayImageOrLabel_.apply(this, imageArgs);\n }\n if (opt_declutterTree) {\n opt_declutterTree.insert(dimensions.declutterBox);\n }\n this.replayImageOrLabel_.apply(this, args);\n }\n ++i;\n break;\n case CanvasInstruction.DRAW_CHARS:\n const begin = /** @type {number} */ (instruction[1]);\n const end = /** @type {number} */ (instruction[2]);\n const baseline = /** @type {number} */ (instruction[3]);\n const overflow = /** @type {number} */ (instruction[4]);\n fillKey = /** @type {string} */ (instruction[5]);\n const maxAngle = /** @type {number} */ (instruction[6]);\n const measurePixelRatio = /** @type {number} */ (instruction[7]);\n const offsetY = /** @type {number} */ (instruction[8]);\n strokeKey = /** @type {string} */ (instruction[9]);\n const strokeWidth = /** @type {number} */ (instruction[10]);\n text = /** @type {string} */ (instruction[11]);\n textKey = /** @type {string} */ (instruction[12]);\n const pixelRatioScale = [\n /** @type {number} */ (instruction[13]),\n /** @type {number} */ (instruction[13]),\n ];\n\n const textState = this.textStates[textKey];\n const font = textState.font;\n const textScale = [\n textState.scale[0] * measurePixelRatio,\n textState.scale[1] * measurePixelRatio,\n ];\n\n let cachedWidths;\n if (font in this.widths_) {\n cachedWidths = this.widths_[font];\n } else {\n cachedWidths = {};\n this.widths_[font] = cachedWidths;\n }\n\n const pathLength = lineStringLength(pixelCoordinates, begin, end, 2);\n const textLength =\n Math.abs(textScale[0]) *\n measureAndCacheTextWidth(font, text, cachedWidths);\n if (overflow || textLength <= pathLength) {\n const textAlign = this.textStates[textKey].textAlign;\n const startM = (pathLength - textLength) * TEXT_ALIGN[textAlign];\n const parts = drawTextOnPath(\n pixelCoordinates,\n begin,\n end,\n 2,\n text,\n startM,\n maxAngle,\n Math.abs(textScale[0]),\n measureAndCacheTextWidth,\n font,\n cachedWidths,\n viewRotationFromTransform ? 0 : this.viewRotation_\n );\n drawChars: if (parts) {\n /** @type {Array<ReplayImageOrLabelArgs>} */\n const replayImageOrLabelArgs = [];\n let c, cc, chars, label, part;\n if (strokeKey) {\n for (c = 0, cc = parts.length; c < cc; ++c) {\n part = parts[c]; // x, y, anchorX, rotation, chunk\n chars = /** @type {string} */ (part[4]);\n label = this.createLabel(chars, textKey, '', strokeKey);\n anchorX =\n /** @type {number} */ (part[2]) +\n (textScale[0] < 0 ? -strokeWidth : strokeWidth);\n anchorY =\n baseline * label.height +\n ((0.5 - baseline) * 2 * strokeWidth * textScale[1]) /\n textScale[0] -\n offsetY;\n const dimensions = this.calculateImageOrLabelDimensions_(\n label.width,\n label.height,\n part[0],\n part[1],\n label.width,\n label.height,\n anchorX,\n anchorY,\n 0,\n 0,\n part[3],\n pixelRatioScale,\n false,\n defaultPadding,\n false,\n feature\n );\n if (\n opt_declutterTree &&\n opt_declutterTree.collides(dimensions.declutterBox)\n ) {\n break drawChars;\n }\n replayImageOrLabelArgs.push([\n context,\n contextScale,\n label,\n dimensions,\n 1,\n null,\n null,\n ]);\n }\n }\n if (fillKey) {\n for (c = 0, cc = parts.length; c < cc; ++c) {\n part = parts[c]; // x, y, anchorX, rotation, chunk\n chars = /** @type {string} */ (part[4]);\n label = this.createLabel(chars, textKey, fillKey, '');\n anchorX = /** @type {number} */ (part[2]);\n anchorY = baseline * label.height - offsetY;\n const dimensions = this.calculateImageOrLabelDimensions_(\n label.width,\n label.height,\n part[0],\n part[1],\n label.width,\n label.height,\n anchorX,\n anchorY,\n 0,\n 0,\n part[3],\n pixelRatioScale,\n false,\n defaultPadding,\n false,\n feature\n );\n if (\n opt_declutterTree &&\n opt_declutterTree.collides(dimensions.declutterBox)\n ) {\n break drawChars;\n }\n replayImageOrLabelArgs.push([\n context,\n contextScale,\n label,\n dimensions,\n 1,\n null,\n null,\n ]);\n }\n }\n if (opt_declutterTree) {\n opt_declutterTree.load(\n replayImageOrLabelArgs.map(getDeclutterBox)\n );\n }\n for (let i = 0, ii = replayImageOrLabelArgs.length; i < ii; ++i) {\n this.replayImageOrLabel_.apply(this, replayImageOrLabelArgs[i]);\n }\n }\n }\n ++i;\n break;\n case CanvasInstruction.END_GEOMETRY:\n if (opt_featureCallback !== undefined) {\n feature = /** @type {import(\"../../Feature.js\").FeatureLike} */ (instruction[1]);\n const result = opt_featureCallback(feature, currentGeometry);\n if (result) {\n return result;\n }\n }\n ++i;\n break;\n case CanvasInstruction.FILL:\n if (batchSize) {\n pendingFill++;\n } else {\n this.fill_(context);\n }\n ++i;\n break;\n case CanvasInstruction.MOVE_TO_LINE_TO:\n d = /** @type {number} */ (instruction[1]);\n dd = /** @type {number} */ (instruction[2]);\n x = pixelCoordinates[d];\n y = pixelCoordinates[d + 1];\n roundX = (x + 0.5) | 0;\n roundY = (y + 0.5) | 0;\n if (roundX !== prevX || roundY !== prevY) {\n context.moveTo(x, y);\n prevX = roundX;\n prevY = roundY;\n }\n for (d += 2; d < dd; d += 2) {\n x = pixelCoordinates[d];\n y = pixelCoordinates[d + 1];\n roundX = (x + 0.5) | 0;\n roundY = (y + 0.5) | 0;\n if (d == dd - 2 || roundX !== prevX || roundY !== prevY) {\n context.lineTo(x, y);\n prevX = roundX;\n prevY = roundY;\n }\n }\n ++i;\n break;\n case CanvasInstruction.SET_FILL_STYLE:\n lastFillInstruction = instruction;\n this.alignFill_ = instruction[2];\n\n if (pendingFill) {\n this.fill_(context);\n pendingFill = 0;\n if (pendingStroke) {\n context.stroke();\n pendingStroke = 0;\n }\n }\n\n context.fillStyle = /** @type {import(\"../../colorlike.js\").ColorLike} */ (instruction[1]);\n ++i;\n break;\n case CanvasInstruction.SET_STROKE_STYLE:\n lastStrokeInstruction = instruction;\n if (pendingStroke) {\n context.stroke();\n pendingStroke = 0;\n }\n this.setStrokeStyle_(context, /** @type {Array<*>} */ (instruction));\n ++i;\n break;\n case CanvasInstruction.STROKE:\n if (batchSize) {\n pendingStroke++;\n } else {\n context.stroke();\n }\n ++i;\n break;\n default:\n ++i; // consume the instruction anyway, to avoid an infinite loop\n break;\n }\n }\n if (pendingFill) {\n this.fill_(context);\n }\n if (pendingStroke) {\n context.stroke();\n }\n return undefined;\n }\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} contextScale Scale of the context.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {number} viewRotation View rotation.\n * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n * @param {import(\"rbush\").default=} opt_declutterTree Declutter tree.\n */\n execute(\n context,\n contextScale,\n transform,\n viewRotation,\n snapToPixel,\n opt_declutterTree\n ) {\n this.viewRotation_ = viewRotation;\n this.execute_(\n context,\n contextScale,\n transform,\n this.instructions,\n snapToPixel,\n undefined,\n undefined,\n opt_declutterTree\n );\n }\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {number} viewRotation View rotation.\n * @param {FeatureCallback<T>=} opt_featureCallback Feature callback.\n * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Only check\n * features that intersect this extent.\n * @return {T|undefined} Callback result.\n * @template T\n */\n executeHitDetection(\n context,\n transform,\n viewRotation,\n opt_featureCallback,\n opt_hitExtent\n ) {\n this.viewRotation_ = viewRotation;\n return this.execute_(\n context,\n 1,\n transform,\n this.hitDetectionInstructions,\n true,\n opt_featureCallback,\n opt_hitExtent\n );\n }\n}\n\nexport default Executor;\n","/**\n * @module ol/render/canvas/ExecutorGroup\n */\n\nimport BuilderType from './BuilderType.js';\nimport Executor from './Executor.js';\nimport {buffer, createEmpty, extendCoordinate} from '../../extent.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n} from '../../transform.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {isEmpty} from '../../obj.js';\nimport {numberSafeCompareFunction} from '../../array.js';\nimport {transform2D} from '../../geom/flat/transform.js';\n\n/**\n * @const\n * @type {Array<import(\"./BuilderType.js\").default>}\n */\nconst ORDER = [\n BuilderType.POLYGON,\n BuilderType.CIRCLE,\n BuilderType.LINE_STRING,\n BuilderType.IMAGE,\n BuilderType.TEXT,\n BuilderType.DEFAULT,\n];\n\nclass ExecutorGroup {\n /**\n * @param {import(\"../../extent.js\").Extent} maxExtent Max extent for clipping. When a\n * `maxExtent` was set on the Buillder for this executor group, the same `maxExtent`\n * should be set here, unless the target context does not exceet that extent (which\n * can be the case when rendering to tiles).\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {boolean} overlaps The executor group can have overlapping geometries.\n * @param {!Object<string, !Object<import(\"./BuilderType.js\").default, import(\"../canvas.js\").SerializableInstructions>>} allInstructions\n * The serializable instructions.\n * @param {number=} opt_renderBuffer Optional rendering buffer.\n */\n constructor(\n maxExtent,\n resolution,\n pixelRatio,\n overlaps,\n allInstructions,\n opt_renderBuffer\n ) {\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.maxExtent_ = maxExtent;\n\n /**\n * @private\n * @type {boolean}\n */\n this.overlaps_ = overlaps;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @private\n * @type {number}\n */\n this.resolution_ = resolution;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.renderBuffer_ = opt_renderBuffer;\n\n /**\n * @private\n * @type {!Object<string, !Object<import(\"./BuilderType.js\").default, import(\"./Executor\").default>>}\n */\n this.executorsByZIndex_ = {};\n\n /**\n * @private\n * @type {CanvasRenderingContext2D}\n */\n this.hitDetectionContext_ = null;\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.hitDetectionTransform_ = createTransform();\n\n this.createExecutors_(allInstructions);\n }\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n */\n clip(context, transform) {\n const flatClipCoords = this.getClipCoords(transform);\n context.beginPath();\n context.moveTo(flatClipCoords[0], flatClipCoords[1]);\n context.lineTo(flatClipCoords[2], flatClipCoords[3]);\n context.lineTo(flatClipCoords[4], flatClipCoords[5]);\n context.lineTo(flatClipCoords[6], flatClipCoords[7]);\n context.clip();\n }\n\n /**\n * Create executors and populate them using the provided instructions.\n * @private\n * @param {!Object<string, !Object<import(\"./BuilderType.js\").default, import(\"../canvas.js\").SerializableInstructions>>} allInstructions The serializable instructions\n */\n createExecutors_(allInstructions) {\n for (const zIndex in allInstructions) {\n let executors = this.executorsByZIndex_[zIndex];\n if (executors === undefined) {\n executors = {};\n this.executorsByZIndex_[zIndex] = executors;\n }\n const instructionByZindex = allInstructions[zIndex];\n const renderBuffer = [this.renderBuffer_ || 0, this.renderBuffer_ || 0];\n for (const builderType in instructionByZindex) {\n const instructions = instructionByZindex[builderType];\n executors[builderType] = new Executor(\n this.resolution_,\n this.pixelRatio_,\n this.overlaps_,\n instructions,\n renderBuffer\n );\n }\n }\n }\n\n /**\n * @param {Array<import(\"./BuilderType.js\").default>} executors Executors.\n * @return {boolean} Has executors of the provided types.\n */\n hasExecutors(executors) {\n for (const zIndex in this.executorsByZIndex_) {\n const candidates = this.executorsByZIndex_[zIndex];\n for (let i = 0, ii = executors.length; i < ii; ++i) {\n if (executors[i] in candidates) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {function(import(\"../../Feature.js\").FeatureLike, import(\"../../geom/SimpleGeometry.js\").default, number): T} callback Feature callback.\n * @param {Array<import(\"../../Feature.js\").FeatureLike>} declutteredFeatures Decluttered features.\n * @return {T|undefined} Callback result.\n * @template T\n */\n forEachFeatureAtCoordinate(\n coordinate,\n resolution,\n rotation,\n hitTolerance,\n callback,\n declutteredFeatures\n ) {\n hitTolerance = Math.round(hitTolerance);\n const contextSize = hitTolerance * 2 + 1;\n const transform = composeTransform(\n this.hitDetectionTransform_,\n hitTolerance + 0.5,\n hitTolerance + 0.5,\n 1 / resolution,\n -1 / resolution,\n -rotation,\n -coordinate[0],\n -coordinate[1]\n );\n\n const newContext = !this.hitDetectionContext_;\n if (newContext) {\n this.hitDetectionContext_ = createCanvasContext2D(\n contextSize,\n contextSize\n );\n }\n const context = this.hitDetectionContext_;\n\n if (\n context.canvas.width !== contextSize ||\n context.canvas.height !== contextSize\n ) {\n context.canvas.width = contextSize;\n context.canvas.height = contextSize;\n } else if (!newContext) {\n context.clearRect(0, 0, contextSize, contextSize);\n }\n\n /**\n * @type {import(\"../../extent.js\").Extent}\n */\n let hitExtent;\n if (this.renderBuffer_ !== undefined) {\n hitExtent = createEmpty();\n extendCoordinate(hitExtent, coordinate);\n buffer(\n hitExtent,\n resolution * (this.renderBuffer_ + hitTolerance),\n hitExtent\n );\n }\n\n const indexes = getPixelIndexArray(hitTolerance);\n\n let builderType;\n\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @return {T|undefined} Callback result.\n */\n function featureCallback(feature, geometry) {\n const imageData = context.getImageData(0, 0, contextSize, contextSize)\n .data;\n for (let i = 0, ii = indexes.length; i < ii; i++) {\n if (imageData[indexes[i]] > 0) {\n if (\n !declutteredFeatures ||\n (builderType !== BuilderType.IMAGE &&\n builderType !== BuilderType.TEXT) ||\n declutteredFeatures.indexOf(feature) !== -1\n ) {\n const idx = (indexes[i] - 3) / 4;\n const x = hitTolerance - (idx % contextSize);\n const y = hitTolerance - ((idx / contextSize) | 0);\n const result = callback(feature, geometry, x * x + y * y);\n if (result) {\n return result;\n }\n }\n context.clearRect(0, 0, contextSize, contextSize);\n break;\n }\n }\n return undefined;\n }\n\n /** @type {Array<number>} */\n const zs = Object.keys(this.executorsByZIndex_).map(Number);\n zs.sort(numberSafeCompareFunction);\n\n let i, j, executors, executor, result;\n for (i = zs.length - 1; i >= 0; --i) {\n const zIndexKey = zs[i].toString();\n executors = this.executorsByZIndex_[zIndexKey];\n for (j = ORDER.length - 1; j >= 0; --j) {\n builderType = ORDER[j];\n executor = executors[builderType];\n if (executor !== undefined) {\n result = executor.executeHitDetection(\n context,\n transform,\n rotation,\n featureCallback,\n hitExtent\n );\n if (result) {\n return result;\n }\n }\n }\n }\n return undefined;\n }\n\n /**\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @return {Array<number>} Clip coordinates.\n */\n getClipCoords(transform) {\n const maxExtent = this.maxExtent_;\n if (!maxExtent) {\n return null;\n }\n const minX = maxExtent[0];\n const minY = maxExtent[1];\n const maxX = maxExtent[2];\n const maxY = maxExtent[3];\n const flatClipCoords = [minX, minY, minX, maxY, maxX, maxY, maxX, minY];\n transform2D(flatClipCoords, 0, 8, 2, transform, flatClipCoords);\n return flatClipCoords;\n }\n\n /**\n * @return {boolean} Is empty.\n */\n isEmpty() {\n return isEmpty(this.executorsByZIndex_);\n }\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} contextScale Scale of the context.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {number} viewRotation View rotation.\n * @param {boolean} snapToPixel Snap point symbols and test to integer pixel.\n * @param {Array<import(\"./BuilderType.js\").default>=} opt_builderTypes Ordered replay types to replay.\n * Default is {@link module:ol/render/replay~ORDER}\n * @param {import(\"rbush\").default=} opt_declutterTree Declutter tree.\n */\n execute(\n context,\n contextScale,\n transform,\n viewRotation,\n snapToPixel,\n opt_builderTypes,\n opt_declutterTree\n ) {\n /** @type {Array<number>} */\n const zs = Object.keys(this.executorsByZIndex_).map(Number);\n zs.sort(numberSafeCompareFunction);\n\n // setup clipping so that the parts of over-simplified geometries are not\n // visible outside the current extent when panning\n if (this.maxExtent_) {\n context.save();\n this.clip(context, transform);\n }\n\n const builderTypes = opt_builderTypes ? opt_builderTypes : ORDER;\n let i, ii, j, jj, replays, replay;\n if (opt_declutterTree) {\n zs.reverse();\n }\n for (i = 0, ii = zs.length; i < ii; ++i) {\n const zIndexKey = zs[i].toString();\n replays = this.executorsByZIndex_[zIndexKey];\n for (j = 0, jj = builderTypes.length; j < jj; ++j) {\n const builderType = builderTypes[j];\n replay = replays[builderType];\n if (replay !== undefined) {\n replay.execute(\n context,\n contextScale,\n transform,\n viewRotation,\n snapToPixel,\n opt_declutterTree\n );\n }\n }\n }\n\n if (this.maxExtent_) {\n context.restore();\n }\n }\n}\n\n/**\n * This cache is used to store arrays of indexes for calculated pixel circles\n * to increase performance.\n * It is a static property to allow each Replaygroup to access it.\n * @type {Object<number, Array<number>>}\n */\nconst circlePixelIndexArrayCache = {};\n\n/**\n * This methods creates an array with indexes of all pixels within a circle,\n * ordered by how close they are to the center.\n * A cache is used to increase performance.\n * @param {number} radius Radius.\n * @returns {Array<number>} An array with indexes within a circle.\n */\nexport function getPixelIndexArray(radius) {\n if (circlePixelIndexArrayCache[radius] !== undefined) {\n return circlePixelIndexArrayCache[radius];\n }\n\n const size = radius * 2 + 1;\n const maxDistanceSq = radius * radius;\n const distances = new Array(maxDistanceSq + 1);\n for (let i = 0; i <= radius; ++i) {\n for (let j = 0; j <= radius; ++j) {\n const distanceSq = i * i + j * j;\n if (distanceSq > maxDistanceSq) {\n break;\n }\n let distance = distances[distanceSq];\n if (!distance) {\n distance = [];\n distances[distanceSq] = distance;\n }\n distance.push(((radius + i) * size + (radius + j)) * 4 + 3);\n if (i > 0) {\n distance.push(((radius - i) * size + (radius + j)) * 4 + 3);\n }\n if (j > 0) {\n distance.push(((radius + i) * size + (radius - j)) * 4 + 3);\n if (i > 0) {\n distance.push(((radius - i) * size + (radius - j)) * 4 + 3);\n }\n }\n }\n }\n\n const pixelIndex = [];\n for (let i = 0, ii = distances.length; i < ii; ++i) {\n if (distances[i]) {\n pixelIndex.push(...distances[i]);\n }\n }\n\n circlePixelIndexArrayCache[radius] = pixelIndex;\n return pixelIndex;\n}\n\nexport default ExecutorGroup;\n","/**\n * @module ol/ViewHint\n */\n\n/**\n * @enum {number}\n */\nexport default {\n ANIMATING: 0,\n INTERACTING: 1,\n};\n","/**\n * @module ol/render/canvas/Immediate\n */\n// FIXME test, especially polygons with holes and multipolygons\n// FIXME need to handle large thick features (where pixel size matters)\n// FIXME add offset and end to ol/geom/flat/transform~transform2D?\n\nimport GeometryType from '../../geom/GeometryType.js';\nimport VectorContext from '../VectorContext.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n} from '../../transform.js';\nimport {\n defaultFillStyle,\n defaultFont,\n defaultLineCap,\n defaultLineDash,\n defaultLineDashOffset,\n defaultLineJoin,\n defaultLineWidth,\n defaultMiterLimit,\n defaultStrokeStyle,\n defaultTextAlign,\n defaultTextBaseline,\n} from '../canvas.js';\nimport {equals} from '../../array.js';\nimport {intersects} from '../../extent.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {transformGeom2D} from '../../geom/SimpleGeometry.js';\n\n/**\n * @classdesc\n * A concrete subclass of {@link module:ol/render/VectorContext} that implements\n * direct rendering of features and geometries to an HTML5 Canvas context.\n * Instances of this class are created internally by the library and\n * provided to application code as vectorContext member of the\n * {@link module:ol/render/Event~RenderEvent} object associated with postcompose, precompose and\n * render events emitted by layers and maps.\n */\nclass CanvasImmediateRenderer extends VectorContext {\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {number} viewRotation View rotation.\n * @param {number=} opt_squaredTolerance Optional squared tolerance for simplification.\n * @param {import(\"../../proj.js\").TransformFunction=} opt_userTransform Transform from user to view projection.\n */\n constructor(\n context,\n pixelRatio,\n extent,\n transform,\n viewRotation,\n opt_squaredTolerance,\n opt_userTransform\n ) {\n super();\n\n /**\n * @private\n * @type {CanvasRenderingContext2D}\n */\n this.context_ = context;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.extent_ = extent;\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.transform_ = transform;\n\n /**\n * @private\n * @type {number}\n */\n this.viewRotation_ = viewRotation;\n\n /**\n * @private\n * @type {number}\n */\n this.squaredTolerance_ = opt_squaredTolerance;\n\n /**\n * @private\n * @type {import(\"../../proj.js\").TransformFunction}\n */\n this.userTransform_ = opt_userTransform;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").FillState}\n */\n this.contextFillState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").StrokeState}\n */\n this.contextStrokeState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").TextState}\n */\n this.contextTextState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").FillState}\n */\n this.fillState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").StrokeState}\n */\n this.strokeState_ = null;\n\n /**\n * @private\n * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}\n */\n this.image_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.imageAnchorX_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageAnchorY_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageHeight_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageOpacity_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageOriginX_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageOriginY_ = 0;\n\n /**\n * @private\n * @type {boolean}\n */\n this.imageRotateWithView_ = false;\n\n /**\n * @private\n * @type {number}\n */\n this.imageRotation_ = 0;\n\n /**\n * @private\n * @type {import(\"../../size.js\").Size}\n */\n this.imageScale_ = [0, 0];\n\n /**\n * @private\n * @type {number}\n */\n this.imageWidth_ = 0;\n\n /**\n * @private\n * @type {string}\n */\n this.text_ = '';\n\n /**\n * @private\n * @type {number}\n */\n this.textOffsetX_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.textOffsetY_ = 0;\n\n /**\n * @private\n * @type {boolean}\n */\n this.textRotateWithView_ = false;\n\n /**\n * @private\n * @type {number}\n */\n this.textRotation_ = 0;\n\n /**\n * @private\n * @type {import(\"../../size.js\").Size}\n */\n this.textScale_ = [0, 0];\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").FillState}\n */\n this.textFillState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").StrokeState}\n */\n this.textStrokeState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").TextState}\n */\n this.textState_ = null;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.pixelCoordinates_ = [];\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.tmpLocalTransform_ = createTransform();\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @private\n */\n drawImages_(flatCoordinates, offset, end, stride) {\n if (!this.image_) {\n return;\n }\n const pixelCoordinates = transform2D(\n flatCoordinates,\n offset,\n end,\n 2,\n this.transform_,\n this.pixelCoordinates_\n );\n const context = this.context_;\n const localTransform = this.tmpLocalTransform_;\n const alpha = context.globalAlpha;\n if (this.imageOpacity_ != 1) {\n context.globalAlpha = alpha * this.imageOpacity_;\n }\n let rotation = this.imageRotation_;\n if (this.imageRotateWithView_) {\n rotation += this.viewRotation_;\n }\n for (let i = 0, ii = pixelCoordinates.length; i < ii; i += 2) {\n const x = pixelCoordinates[i] - this.imageAnchorX_;\n const y = pixelCoordinates[i + 1] - this.imageAnchorY_;\n if (\n rotation !== 0 ||\n this.imageScale_[0] != 1 ||\n this.imageScale_[1] != 1\n ) {\n const centerX = x + this.imageAnchorX_;\n const centerY = y + this.imageAnchorY_;\n composeTransform(\n localTransform,\n centerX,\n centerY,\n 1,\n 1,\n rotation,\n -centerX,\n -centerY\n );\n context.setTransform.apply(context, localTransform);\n context.translate(centerX, centerY);\n context.scale(this.imageScale_[0], this.imageScale_[1]);\n context.drawImage(\n this.image_,\n this.imageOriginX_,\n this.imageOriginY_,\n this.imageWidth_,\n this.imageHeight_,\n -this.imageAnchorX_,\n -this.imageAnchorY_,\n this.imageWidth_,\n this.imageHeight_\n );\n context.setTransform(1, 0, 0, 1, 0, 0);\n } else {\n context.drawImage(\n this.image_,\n this.imageOriginX_,\n this.imageOriginY_,\n this.imageWidth_,\n this.imageHeight_,\n x,\n y,\n this.imageWidth_,\n this.imageHeight_\n );\n }\n }\n if (this.imageOpacity_ != 1) {\n context.globalAlpha = alpha;\n }\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @private\n */\n drawText_(flatCoordinates, offset, end, stride) {\n if (!this.textState_ || this.text_ === '') {\n return;\n }\n if (this.textFillState_) {\n this.setContextFillState_(this.textFillState_);\n }\n if (this.textStrokeState_) {\n this.setContextStrokeState_(this.textStrokeState_);\n }\n this.setContextTextState_(this.textState_);\n const pixelCoordinates = transform2D(\n flatCoordinates,\n offset,\n end,\n stride,\n this.transform_,\n this.pixelCoordinates_\n );\n const context = this.context_;\n let rotation = this.textRotation_;\n if (this.textRotateWithView_) {\n rotation += this.viewRotation_;\n }\n for (; offset < end; offset += stride) {\n const x = pixelCoordinates[offset] + this.textOffsetX_;\n const y = pixelCoordinates[offset + 1] + this.textOffsetY_;\n if (\n rotation !== 0 ||\n this.textScale_[0] != 1 ||\n this.textScale_[1] != 1\n ) {\n const localTransform = composeTransform(\n this.tmpLocalTransform_,\n x,\n y,\n 1,\n 1,\n rotation,\n -x,\n -y\n );\n context.setTransform.apply(context, localTransform);\n context.translate(x, y);\n context.scale(this.textScale_[0], this.textScale_[1]);\n if (this.textStrokeState_) {\n context.strokeText(this.text_, 0, 0);\n }\n if (this.textFillState_) {\n context.fillText(this.text_, 0, 0);\n }\n context.setTransform(1, 0, 0, 1, 0, 0);\n } else {\n if (this.textStrokeState_) {\n context.strokeText(this.text_, x, y);\n }\n if (this.textFillState_) {\n context.fillText(this.text_, x, y);\n }\n }\n }\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {boolean} close Close.\n * @private\n * @return {number} end End.\n */\n moveToLineTo_(flatCoordinates, offset, end, stride, close) {\n const context = this.context_;\n const pixelCoordinates = transform2D(\n flatCoordinates,\n offset,\n end,\n stride,\n this.transform_,\n this.pixelCoordinates_\n );\n context.moveTo(pixelCoordinates[0], pixelCoordinates[1]);\n let length = pixelCoordinates.length;\n if (close) {\n length -= 2;\n }\n for (let i = 2; i < length; i += 2) {\n context.lineTo(pixelCoordinates[i], pixelCoordinates[i + 1]);\n }\n if (close) {\n context.closePath();\n }\n return end;\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @private\n * @return {number} End.\n */\n drawRings_(flatCoordinates, offset, ends, stride) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n offset = this.moveToLineTo_(\n flatCoordinates,\n offset,\n ends[i],\n stride,\n true\n );\n }\n return offset;\n }\n\n /**\n * Render a circle geometry into the canvas. Rendering is immediate and uses\n * the current fill and stroke styles.\n *\n * @param {import(\"../../geom/Circle.js\").default} geometry Circle geometry.\n * @api\n */\n drawCircle(geometry) {\n if (!intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n if (this.fillState_ || this.strokeState_) {\n if (this.fillState_) {\n this.setContextFillState_(this.fillState_);\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n }\n const pixelCoordinates = transformGeom2D(\n geometry,\n this.transform_,\n this.pixelCoordinates_\n );\n const dx = pixelCoordinates[2] - pixelCoordinates[0];\n const dy = pixelCoordinates[3] - pixelCoordinates[1];\n const radius = Math.sqrt(dx * dx + dy * dy);\n const context = this.context_;\n context.beginPath();\n context.arc(\n pixelCoordinates[0],\n pixelCoordinates[1],\n radius,\n 0,\n 2 * Math.PI\n );\n if (this.fillState_) {\n context.fill();\n }\n if (this.strokeState_) {\n context.stroke();\n }\n }\n if (this.text_ !== '') {\n this.drawText_(geometry.getCenter(), 0, 2, 2);\n }\n }\n\n /**\n * Set the rendering style. Note that since this is an immediate rendering API,\n * any `zIndex` on the provided style will be ignored.\n *\n * @param {import(\"../../style/Style.js\").default} style The rendering style.\n * @api\n */\n setStyle(style) {\n this.setFillStrokeStyle(style.getFill(), style.getStroke());\n this.setImageStyle(style.getImage());\n this.setTextStyle(style.getText());\n }\n\n /**\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n */\n setTransform(transform) {\n this.transform_ = transform;\n }\n\n /**\n * Render a geometry into the canvas. Call\n * {@link module:ol/render/canvas/Immediate#setStyle} first to set the rendering style.\n *\n * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry The geometry to render.\n * @api\n */\n drawGeometry(geometry) {\n const type = geometry.getType();\n switch (type) {\n case GeometryType.POINT:\n this.drawPoint(\n /** @type {import(\"../../geom/Point.js\").default} */ (geometry)\n );\n break;\n case GeometryType.LINE_STRING:\n this.drawLineString(\n /** @type {import(\"../../geom/LineString.js\").default} */ (geometry)\n );\n break;\n case GeometryType.POLYGON:\n this.drawPolygon(\n /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry)\n );\n break;\n case GeometryType.MULTI_POINT:\n this.drawMultiPoint(\n /** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry)\n );\n break;\n case GeometryType.MULTI_LINE_STRING:\n this.drawMultiLineString(\n /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry)\n );\n break;\n case GeometryType.MULTI_POLYGON:\n this.drawMultiPolygon(\n /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry)\n );\n break;\n case GeometryType.GEOMETRY_COLLECTION:\n this.drawGeometryCollection(\n /** @type {import(\"../../geom/GeometryCollection.js\").default} */ (geometry)\n );\n break;\n case GeometryType.CIRCLE:\n this.drawCircle(\n /** @type {import(\"../../geom/Circle.js\").default} */ (geometry)\n );\n break;\n default:\n }\n }\n\n /**\n * Render a feature into the canvas. Note that any `zIndex` on the provided\n * style will be ignored - features are rendered immediately in the order that\n * this method is called. If you need `zIndex` support, you should be using an\n * {@link module:ol/layer/Vector~VectorLayer} instead.\n *\n * @param {import(\"../../Feature.js\").default} feature Feature.\n * @param {import(\"../../style/Style.js\").default} style Style.\n * @api\n */\n drawFeature(feature, style) {\n const geometry = style.getGeometryFunction()(feature);\n if (!geometry || !intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n this.setStyle(style);\n this.drawGeometry(geometry);\n }\n\n /**\n * Render a GeometryCollection to the canvas. Rendering is immediate and\n * uses the current styles appropriate for each geometry in the collection.\n *\n * @param {import(\"../../geom/GeometryCollection.js\").default} geometry Geometry collection.\n */\n drawGeometryCollection(geometry) {\n const geometries = geometry.getGeometriesArray();\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n this.drawGeometry(geometries[i]);\n }\n }\n\n /**\n * Render a Point geometry into the canvas. Rendering is immediate and uses\n * the current style.\n *\n * @param {import(\"../../geom/Point.js\").default|import(\"../Feature.js\").default} geometry Point geometry.\n */\n drawPoint(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/Point.js\").default} */ (geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_\n ));\n }\n const flatCoordinates = geometry.getFlatCoordinates();\n const stride = geometry.getStride();\n if (this.image_) {\n this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n }\n if (this.text_ !== '') {\n this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n }\n }\n\n /**\n * Render a MultiPoint geometry into the canvas. Rendering is immediate and\n * uses the current style.\n *\n * @param {import(\"../../geom/MultiPoint.js\").default|import(\"../Feature.js\").default} geometry MultiPoint geometry.\n */\n drawMultiPoint(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_\n ));\n }\n const flatCoordinates = geometry.getFlatCoordinates();\n const stride = geometry.getStride();\n if (this.image_) {\n this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n }\n if (this.text_ !== '') {\n this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n }\n }\n\n /**\n * Render a LineString into the canvas. Rendering is immediate and uses\n * the current style.\n *\n * @param {import(\"../../geom/LineString.js\").default|import(\"../Feature.js\").default} geometry LineString geometry.\n */\n drawLineString(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/LineString.js\").default} */ (geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_\n ));\n }\n if (!intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n const context = this.context_;\n const flatCoordinates = geometry.getFlatCoordinates();\n context.beginPath();\n this.moveToLineTo_(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n geometry.getStride(),\n false\n );\n context.stroke();\n }\n if (this.text_ !== '') {\n const flatMidpoint = geometry.getFlatMidpoint();\n this.drawText_(flatMidpoint, 0, 2, 2);\n }\n }\n\n /**\n * Render a MultiLineString geometry into the canvas. Rendering is immediate\n * and uses the current style.\n *\n * @param {import(\"../../geom/MultiLineString.js\").default|import(\"../Feature.js\").default} geometry MultiLineString geometry.\n */\n drawMultiLineString(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_\n ));\n }\n const geometryExtent = geometry.getExtent();\n if (!intersects(this.extent_, geometryExtent)) {\n return;\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n const context = this.context_;\n const flatCoordinates = geometry.getFlatCoordinates();\n let offset = 0;\n const ends = /** @type {Array<number>} */ (geometry.getEnds());\n const stride = geometry.getStride();\n context.beginPath();\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n offset = this.moveToLineTo_(\n flatCoordinates,\n offset,\n ends[i],\n stride,\n false\n );\n }\n context.stroke();\n }\n if (this.text_ !== '') {\n const flatMidpoints = geometry.getFlatMidpoints();\n this.drawText_(flatMidpoints, 0, flatMidpoints.length, 2);\n }\n }\n\n /**\n * Render a Polygon geometry into the canvas. Rendering is immediate and uses\n * the current style.\n *\n * @param {import(\"../../geom/Polygon.js\").default|import(\"../Feature.js\").default} geometry Polygon geometry.\n */\n drawPolygon(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_\n ));\n }\n if (!intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n if (this.strokeState_ || this.fillState_) {\n if (this.fillState_) {\n this.setContextFillState_(this.fillState_);\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n }\n const context = this.context_;\n context.beginPath();\n this.drawRings_(\n geometry.getOrientedFlatCoordinates(),\n 0,\n /** @type {Array<number>} */ (geometry.getEnds()),\n geometry.getStride()\n );\n if (this.fillState_) {\n context.fill();\n }\n if (this.strokeState_) {\n context.stroke();\n }\n }\n if (this.text_ !== '') {\n const flatInteriorPoint = geometry.getFlatInteriorPoint();\n this.drawText_(flatInteriorPoint, 0, 2, 2);\n }\n }\n\n /**\n * Render MultiPolygon geometry into the canvas. Rendering is immediate and\n * uses the current style.\n * @param {import(\"../../geom/MultiPolygon.js\").default} geometry MultiPolygon geometry.\n */\n drawMultiPolygon(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_\n ));\n }\n if (!intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n if (this.strokeState_ || this.fillState_) {\n if (this.fillState_) {\n this.setContextFillState_(this.fillState_);\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n }\n const context = this.context_;\n const flatCoordinates = geometry.getOrientedFlatCoordinates();\n let offset = 0;\n const endss = geometry.getEndss();\n const stride = geometry.getStride();\n context.beginPath();\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n offset = this.drawRings_(flatCoordinates, offset, ends, stride);\n }\n if (this.fillState_) {\n context.fill();\n }\n if (this.strokeState_) {\n context.stroke();\n }\n }\n if (this.text_ !== '') {\n const flatInteriorPoints = geometry.getFlatInteriorPoints();\n this.drawText_(flatInteriorPoints, 0, flatInteriorPoints.length, 2);\n }\n }\n\n /**\n * @param {import(\"../canvas.js\").FillState} fillState Fill state.\n * @private\n */\n setContextFillState_(fillState) {\n const context = this.context_;\n const contextFillState = this.contextFillState_;\n if (!contextFillState) {\n context.fillStyle = fillState.fillStyle;\n this.contextFillState_ = {\n fillStyle: fillState.fillStyle,\n };\n } else {\n if (contextFillState.fillStyle != fillState.fillStyle) {\n contextFillState.fillStyle = fillState.fillStyle;\n context.fillStyle = fillState.fillStyle;\n }\n }\n }\n\n /**\n * @param {import(\"../canvas.js\").StrokeState} strokeState Stroke state.\n * @private\n */\n setContextStrokeState_(strokeState) {\n const context = this.context_;\n const contextStrokeState = this.contextStrokeState_;\n if (!contextStrokeState) {\n context.lineCap = strokeState.lineCap;\n if (context.setLineDash) {\n context.setLineDash(strokeState.lineDash);\n context.lineDashOffset = strokeState.lineDashOffset;\n }\n context.lineJoin = strokeState.lineJoin;\n context.lineWidth = strokeState.lineWidth;\n context.miterLimit = strokeState.miterLimit;\n context.strokeStyle = strokeState.strokeStyle;\n this.contextStrokeState_ = {\n lineCap: strokeState.lineCap,\n lineDash: strokeState.lineDash,\n lineDashOffset: strokeState.lineDashOffset,\n lineJoin: strokeState.lineJoin,\n lineWidth: strokeState.lineWidth,\n miterLimit: strokeState.miterLimit,\n strokeStyle: strokeState.strokeStyle,\n };\n } else {\n if (contextStrokeState.lineCap != strokeState.lineCap) {\n contextStrokeState.lineCap = strokeState.lineCap;\n context.lineCap = strokeState.lineCap;\n }\n if (context.setLineDash) {\n if (!equals(contextStrokeState.lineDash, strokeState.lineDash)) {\n context.setLineDash(\n (contextStrokeState.lineDash = strokeState.lineDash)\n );\n }\n if (contextStrokeState.lineDashOffset != strokeState.lineDashOffset) {\n contextStrokeState.lineDashOffset = strokeState.lineDashOffset;\n context.lineDashOffset = strokeState.lineDashOffset;\n }\n }\n if (contextStrokeState.lineJoin != strokeState.lineJoin) {\n contextStrokeState.lineJoin = strokeState.lineJoin;\n context.lineJoin = strokeState.lineJoin;\n }\n if (contextStrokeState.lineWidth != strokeState.lineWidth) {\n contextStrokeState.lineWidth = strokeState.lineWidth;\n context.lineWidth = strokeState.lineWidth;\n }\n if (contextStrokeState.miterLimit != strokeState.miterLimit) {\n contextStrokeState.miterLimit = strokeState.miterLimit;\n context.miterLimit = strokeState.miterLimit;\n }\n if (contextStrokeState.strokeStyle != strokeState.strokeStyle) {\n contextStrokeState.strokeStyle = strokeState.strokeStyle;\n context.strokeStyle = strokeState.strokeStyle;\n }\n }\n }\n\n /**\n * @param {import(\"../canvas.js\").TextState} textState Text state.\n * @private\n */\n setContextTextState_(textState) {\n const context = this.context_;\n const contextTextState = this.contextTextState_;\n const textAlign = textState.textAlign\n ? textState.textAlign\n : defaultTextAlign;\n if (!contextTextState) {\n context.font = textState.font;\n context.textAlign = /** @type {CanvasTextAlign} */ (textAlign);\n context.textBaseline = /** @type {CanvasTextBaseline} */ (textState.textBaseline);\n this.contextTextState_ = {\n font: textState.font,\n textAlign: textAlign,\n textBaseline: textState.textBaseline,\n };\n } else {\n if (contextTextState.font != textState.font) {\n contextTextState.font = textState.font;\n context.font = textState.font;\n }\n if (contextTextState.textAlign != textAlign) {\n contextTextState.textAlign = /** @type {CanvasTextAlign} */ (textAlign);\n context.textAlign = /** @type {CanvasTextAlign} */ (textAlign);\n }\n if (contextTextState.textBaseline != textState.textBaseline) {\n contextTextState.textBaseline = /** @type {CanvasTextBaseline} */ (textState.textBaseline);\n context.textBaseline = /** @type {CanvasTextBaseline} */ (textState.textBaseline);\n }\n }\n }\n\n /**\n * Set the fill and stroke style for subsequent draw operations. To clear\n * either fill or stroke styles, pass null for the appropriate parameter.\n *\n * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n */\n setFillStrokeStyle(fillStyle, strokeStyle) {\n if (!fillStyle) {\n this.fillState_ = null;\n } else {\n const fillStyleColor = fillStyle.getColor();\n this.fillState_ = {\n fillStyle: asColorLike(\n fillStyleColor ? fillStyleColor : defaultFillStyle\n ),\n };\n }\n if (!strokeStyle) {\n this.strokeState_ = null;\n } else {\n const strokeStyleColor = strokeStyle.getColor();\n const strokeStyleLineCap = strokeStyle.getLineCap();\n const strokeStyleLineDash = strokeStyle.getLineDash();\n const strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n const strokeStyleLineJoin = strokeStyle.getLineJoin();\n const strokeStyleWidth = strokeStyle.getWidth();\n const strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n this.strokeState_ = {\n lineCap:\n strokeStyleLineCap !== undefined\n ? strokeStyleLineCap\n : defaultLineCap,\n lineDash: strokeStyleLineDash ? strokeStyleLineDash : defaultLineDash,\n lineDashOffset: strokeStyleLineDashOffset\n ? strokeStyleLineDashOffset\n : defaultLineDashOffset,\n lineJoin:\n strokeStyleLineJoin !== undefined\n ? strokeStyleLineJoin\n : defaultLineJoin,\n lineWidth:\n this.pixelRatio_ *\n (strokeStyleWidth !== undefined\n ? strokeStyleWidth\n : defaultLineWidth),\n miterLimit:\n strokeStyleMiterLimit !== undefined\n ? strokeStyleMiterLimit\n : defaultMiterLimit,\n strokeStyle: asColorLike(\n strokeStyleColor ? strokeStyleColor : defaultStrokeStyle\n ),\n };\n }\n }\n\n /**\n * Set the image style for subsequent draw operations. Pass null to remove\n * the image style.\n *\n * @param {import(\"../../style/Image.js\").default} imageStyle Image style.\n */\n setImageStyle(imageStyle) {\n if (!imageStyle) {\n this.image_ = null;\n } else {\n const imageSize = imageStyle.getSize();\n if (!imageSize) {\n this.image_ = null;\n } else {\n const imageAnchor = imageStyle.getAnchor();\n // FIXME pixel ratio\n const imageImage = imageStyle.getImage(1);\n const imageOrigin = imageStyle.getOrigin();\n const imageScale = imageStyle.getScaleArray();\n this.imageAnchorX_ = imageAnchor[0];\n this.imageAnchorY_ = imageAnchor[1];\n this.imageHeight_ = imageSize[1];\n this.image_ = imageImage;\n this.imageOpacity_ = imageStyle.getOpacity();\n this.imageOriginX_ = imageOrigin[0];\n this.imageOriginY_ = imageOrigin[1];\n this.imageRotateWithView_ = imageStyle.getRotateWithView();\n this.imageRotation_ = imageStyle.getRotation();\n this.imageScale_ = [\n this.pixelRatio_ * imageScale[0],\n this.pixelRatio_ * imageScale[1],\n ];\n this.imageWidth_ = imageSize[0];\n }\n }\n }\n\n /**\n * Set the text style for subsequent draw operations. Pass null to\n * remove the text style.\n *\n * @param {import(\"../../style/Text.js\").default} textStyle Text style.\n */\n setTextStyle(textStyle) {\n if (!textStyle) {\n this.text_ = '';\n } else {\n const textFillStyle = textStyle.getFill();\n if (!textFillStyle) {\n this.textFillState_ = null;\n } else {\n const textFillStyleColor = textFillStyle.getColor();\n this.textFillState_ = {\n fillStyle: asColorLike(\n textFillStyleColor ? textFillStyleColor : defaultFillStyle\n ),\n };\n }\n const textStrokeStyle = textStyle.getStroke();\n if (!textStrokeStyle) {\n this.textStrokeState_ = null;\n } else {\n const textStrokeStyleColor = textStrokeStyle.getColor();\n const textStrokeStyleLineCap = textStrokeStyle.getLineCap();\n const textStrokeStyleLineDash = textStrokeStyle.getLineDash();\n const textStrokeStyleLineDashOffset = textStrokeStyle.getLineDashOffset();\n const textStrokeStyleLineJoin = textStrokeStyle.getLineJoin();\n const textStrokeStyleWidth = textStrokeStyle.getWidth();\n const textStrokeStyleMiterLimit = textStrokeStyle.getMiterLimit();\n this.textStrokeState_ = {\n lineCap:\n textStrokeStyleLineCap !== undefined\n ? textStrokeStyleLineCap\n : defaultLineCap,\n lineDash: textStrokeStyleLineDash\n ? textStrokeStyleLineDash\n : defaultLineDash,\n lineDashOffset: textStrokeStyleLineDashOffset\n ? textStrokeStyleLineDashOffset\n : defaultLineDashOffset,\n lineJoin:\n textStrokeStyleLineJoin !== undefined\n ? textStrokeStyleLineJoin\n : defaultLineJoin,\n lineWidth:\n textStrokeStyleWidth !== undefined\n ? textStrokeStyleWidth\n : defaultLineWidth,\n miterLimit:\n textStrokeStyleMiterLimit !== undefined\n ? textStrokeStyleMiterLimit\n : defaultMiterLimit,\n strokeStyle: asColorLike(\n textStrokeStyleColor ? textStrokeStyleColor : defaultStrokeStyle\n ),\n };\n }\n const textFont = textStyle.getFont();\n const textOffsetX = textStyle.getOffsetX();\n const textOffsetY = textStyle.getOffsetY();\n const textRotateWithView = textStyle.getRotateWithView();\n const textRotation = textStyle.getRotation();\n const textScale = textStyle.getScaleArray();\n const textText = textStyle.getText();\n const textTextAlign = textStyle.getTextAlign();\n const textTextBaseline = textStyle.getTextBaseline();\n this.textState_ = {\n font: textFont !== undefined ? textFont : defaultFont,\n textAlign:\n textTextAlign !== undefined ? textTextAlign : defaultTextAlign,\n textBaseline:\n textTextBaseline !== undefined\n ? textTextBaseline\n : defaultTextBaseline,\n };\n this.text_ = textText !== undefined ? textText : '';\n this.textOffsetX_ =\n textOffsetX !== undefined ? this.pixelRatio_ * textOffsetX : 0;\n this.textOffsetY_ =\n textOffsetY !== undefined ? this.pixelRatio_ * textOffsetY : 0;\n this.textRotateWithView_ =\n textRotateWithView !== undefined ? textRotateWithView : false;\n this.textRotation_ = textRotation !== undefined ? textRotation : 0;\n this.textScale_ = [\n this.pixelRatio_ * textScale[0],\n this.pixelRatio_ * textScale[1],\n ];\n }\n }\n}\n\nexport default CanvasImmediateRenderer;\n","/**\n * @module ol/style/IconAnchorUnits\n */\n\n/**\n * Icon anchor units. One of 'fraction', 'pixels'.\n * @enum {string}\n */\nexport default {\n /**\n * Anchor is a fraction\n * @api\n */\n FRACTION: 'fraction',\n /**\n * Anchor is in pixels\n * @api\n */\n PIXELS: 'pixels',\n};\n","/**\n * @module ol/style/IconOrigin\n */\n\n/**\n * Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'.\n * @enum {string}\n */\nexport default {\n /**\n * Origin is at bottom left\n * @api\n */\n BOTTOM_LEFT: 'bottom-left',\n /**\n * Origin is at bottom right\n * @api\n */\n BOTTOM_RIGHT: 'bottom-right',\n /**\n * Origin is at top left\n * @api\n */\n TOP_LEFT: 'top-left',\n /**\n * Origin is at top right\n * @api\n */\n TOP_RIGHT: 'top-right',\n};\n","/**\n * @module ol/style/IconImageCache\n */\nimport {asString} from '../color.js';\n\n/**\n * @classdesc\n * Singleton class. Available through {@link module:ol/style/IconImageCache~shared}.\n */\nclass IconImageCache {\n constructor() {\n /**\n * @type {!Object<string, import(\"./IconImage.js\").default>}\n * @private\n */\n this.cache_ = {};\n\n /**\n * @type {number}\n * @private\n */\n this.cacheSize_ = 0;\n\n /**\n * @type {number}\n * @private\n */\n this.maxCacheSize_ = 32;\n }\n\n /**\n * FIXME empty description for jsdoc\n */\n clear() {\n this.cache_ = {};\n this.cacheSize_ = 0;\n }\n\n /**\n * @return {boolean} Can expire cache.\n */\n canExpireCache() {\n return this.cacheSize_ > this.maxCacheSize_;\n }\n\n /**\n * FIXME empty description for jsdoc\n */\n expire() {\n if (this.canExpireCache()) {\n let i = 0;\n for (const key in this.cache_) {\n const iconImage = this.cache_[key];\n if ((i++ & 3) === 0 && !iconImage.hasListener()) {\n delete this.cache_[key];\n --this.cacheSize_;\n }\n }\n }\n }\n\n /**\n * @param {string} src Src.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../color.js\").Color} color Color.\n * @return {import(\"./IconImage.js\").default} Icon image.\n */\n get(src, crossOrigin, color) {\n const key = getKey(src, crossOrigin, color);\n return key in this.cache_ ? this.cache_[key] : null;\n }\n\n /**\n * @param {string} src Src.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../color.js\").Color} color Color.\n * @param {import(\"./IconImage.js\").default} iconImage Icon image.\n */\n set(src, crossOrigin, color, iconImage) {\n const key = getKey(src, crossOrigin, color);\n this.cache_[key] = iconImage;\n ++this.cacheSize_;\n }\n\n /**\n * Set the cache size of the icon cache. Default is `32`. Change this value when\n * your map uses more than 32 different icon images and you are not caching icon\n * styles on the application level.\n * @param {number} maxCacheSize Cache max size.\n * @api\n */\n setSize(maxCacheSize) {\n this.maxCacheSize_ = maxCacheSize;\n this.expire();\n }\n}\n\n/**\n * @param {string} src Src.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../color.js\").Color} color Color.\n * @return {string} Cache key.\n */\nfunction getKey(src, crossOrigin, color) {\n const colorString = color ? asString(color) : 'null';\n return crossOrigin + ':' + src + ':' + colorString;\n}\n\nexport default IconImageCache;\n\n/**\n * The {@link module:ol/style/IconImageCache~IconImageCache} for\n * {@link module:ol/style/Icon~Icon} images.\n * @api\n */\nexport const shared = new IconImageCache();\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/**\n * @abstract\n */\nclass ImageBase extends EventTarget {\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 constructor(extent, resolution, pixelRatio, state) {\n super();\n\n /**\n * @protected\n * @type {import(\"./extent.js\").Extent}\n */\n this.extent = extent;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @protected\n * @type {number|undefined}\n */\n this.resolution = resolution;\n\n /**\n * @protected\n * @type {import(\"./ImageState.js\").default}\n */\n this.state = state;\n }\n\n /**\n * @protected\n */\n changed() {\n this.dispatchEvent(EventType.CHANGE);\n }\n\n /**\n * @return {import(\"./extent.js\").Extent} Extent.\n */\n getExtent() {\n return this.extent;\n }\n\n /**\n * @abstract\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n */\n getImage() {\n return abstract();\n }\n\n /**\n * @return {number} PixelRatio.\n */\n getPixelRatio() {\n return this.pixelRatio_;\n }\n\n /**\n * @return {number} Resolution.\n */\n getResolution() {\n return /** @type {number} */ (this.resolution);\n }\n\n /**\n * @return {import(\"./ImageState.js\").default} State.\n */\n getState() {\n return this.state;\n }\n\n /**\n * Load not yet loaded URI.\n * @abstract\n */\n load() {\n abstract();\n }\n}\n\nexport default ImageBase;\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/**\n * A function that takes an {@link module:ol/Image~Image} for the image and a\n * `{string}` for the src as arguments. It is supposed to make it so the\n * underlying image {@link module:ol/Image~Image#getImage} is assigned the\n * content specified by the src. If not specified, the default is\n *\n * function(image, src) {\n * image.getImage().src = src;\n * }\n *\n * Providing a custom `imageLoadFunction` can be useful to load images with\n * post requests or - in general - through XHR requests, where the src of the\n * image element would be set to a data URI when the content is loaded.\n *\n * @typedef {function(ImageWrapper, string): void} LoadFunction\n * @api\n */\n\nclass ImageWrapper extends ImageBase {\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 constructor(\n extent,\n resolution,\n pixelRatio,\n src,\n crossOrigin,\n imageLoadFunction\n ) {\n super(extent, resolution, pixelRatio, ImageState.IDLE);\n\n /**\n * @private\n * @type {string}\n */\n this.src_ = src;\n\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 /**\n * @private\n * @type {?function():void}\n */\n this.unlisten_ = null;\n\n /**\n * @protected\n * @type {import(\"./ImageState.js\").default}\n */\n this.state = ImageState.IDLE;\n\n /**\n * @private\n * @type {LoadFunction}\n */\n this.imageLoadFunction_ = imageLoadFunction;\n }\n\n /**\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n * @api\n */\n getImage() {\n return this.image_;\n }\n\n /**\n * Tracks loading or read errors.\n *\n * @private\n */\n handleImageError_() {\n this.state = ImageState.ERROR;\n this.unlistenImage_();\n this.changed();\n }\n\n /**\n * Tracks successful image load.\n *\n * @private\n */\n handleImageLoad_() {\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 /**\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 load() {\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(\n this.image_,\n this.handleImageLoad_.bind(this),\n this.handleImageError_.bind(this)\n );\n }\n }\n\n /**\n * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image.\n */\n setImage(image) {\n this.image_ = image;\n }\n\n /**\n * Discards event handlers which listen for load completion or errors.\n *\n * @private\n */\n unlistenImage_() {\n if (this.unlisten_) {\n this.unlisten_();\n this.unlisten_ = null;\n }\n }\n}\n\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 const img = /** @type {HTMLImageElement} */ (image);\n\n if (img.src && IMAGE_DECODE) {\n const promise = img.decode();\n let listening = true;\n const unlisten = function () {\n listening = false;\n };\n promise\n .then(function () {\n if (listening) {\n loadHandler();\n }\n })\n .catch(function (error) {\n if (listening) {\n // FIXME: Unconditionally call errorHandler() when this bug is fixed upstream:\n // https://bugs.webkit.org/show_bug.cgi?id=198527\n if (\n error.name === 'EncodingError' &&\n error.message === 'Invalid image type.'\n ) {\n loadHandler();\n } else {\n errorHandler();\n }\n }\n });\n return unlisten;\n }\n\n const listenerKeys = [\n listenOnce(img, EventType.LOAD, loadHandler),\n listenOnce(img, EventType.ERROR, errorHandler),\n ];\n return function unlisten() {\n listenerKeys.forEach(unlistenByKey);\n };\n}\n\nexport default ImageWrapper;\n","/**\n * @module ol/style/IconImage\n */\n\nimport EventTarget from '../events/Target.js';\nimport EventType from '../events/EventType.js';\nimport ImageState from '../ImageState.js';\nimport {asString} from '../color.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {shared as iconImageCache} from './IconImageCache.js';\nimport {listenImage} from '../Image.js';\n\n/**\n * @type {CanvasRenderingContext2D}\n */\nlet taintedTestContext = null;\n\nclass IconImage extends EventTarget {\n /**\n * @param {HTMLImageElement|HTMLCanvasElement} image Image.\n * @param {string|undefined} src Src.\n * @param {import(\"../size.js\").Size} size Size.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../ImageState.js\").default} imageState Image state.\n * @param {import(\"../color.js\").Color} color Color.\n */\n constructor(image, src, size, crossOrigin, imageState, color) {\n super();\n\n /**\n * @private\n * @type {HTMLImageElement|HTMLCanvasElement}\n */\n this.hitDetectionImage_ = null;\n\n /**\n * @private\n * @type {HTMLImageElement|HTMLCanvasElement}\n */\n this.image_ = !image ? new Image() : image;\n\n if (crossOrigin !== null) {\n /** @type {HTMLImageElement} */ (this.image_).crossOrigin = crossOrigin;\n }\n\n /**\n * @private\n * @type {Object<number, HTMLCanvasElement>}\n */\n this.canvas_ = {};\n\n /**\n * @private\n * @type {import(\"../color.js\").Color}\n */\n this.color_ = color;\n\n /**\n * @private\n * @type {?function():void}\n */\n this.unlisten_ = null;\n\n /**\n * @private\n * @type {import(\"../ImageState.js\").default}\n */\n this.imageState_ = imageState;\n\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.size_ = size;\n\n /**\n * @private\n * @type {string|undefined}\n */\n this.src_ = src;\n\n /**\n * @private\n */\n this.tainted_;\n }\n\n /**\n * @private\n * @return {boolean} The image canvas is tainted.\n */\n isTainted_() {\n if (this.tainted_ === undefined && this.imageState_ === ImageState.LOADED) {\n if (!taintedTestContext) {\n taintedTestContext = createCanvasContext2D(1, 1);\n }\n taintedTestContext.drawImage(this.image_, 0, 0);\n try {\n taintedTestContext.getImageData(0, 0, 1, 1);\n this.tainted_ = false;\n } catch (e) {\n taintedTestContext = null;\n this.tainted_ = true;\n }\n }\n return this.tainted_ === true;\n }\n\n /**\n * @private\n */\n dispatchChangeEvent_() {\n this.dispatchEvent(EventType.CHANGE);\n }\n\n /**\n * @private\n */\n handleImageError_() {\n this.imageState_ = ImageState.ERROR;\n this.unlistenImage_();\n this.dispatchChangeEvent_();\n }\n\n /**\n * @private\n */\n handleImageLoad_() {\n this.imageState_ = ImageState.LOADED;\n if (this.size_) {\n this.image_.width = this.size_[0];\n this.image_.height = this.size_[1];\n } else {\n this.size_ = [this.image_.width, this.image_.height];\n }\n this.unlistenImage_();\n this.dispatchChangeEvent_();\n }\n\n /**\n * @param {number} pixelRatio Pixel ratio.\n * @return {HTMLImageElement|HTMLCanvasElement} Image or Canvas element.\n */\n getImage(pixelRatio) {\n this.replaceColor_(pixelRatio);\n return this.canvas_[pixelRatio] ? this.canvas_[pixelRatio] : this.image_;\n }\n\n /**\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Image or Canvas element.\n */\n getPixelRatio(pixelRatio) {\n this.replaceColor_(pixelRatio);\n return this.canvas_[pixelRatio] ? pixelRatio : 1;\n }\n\n /**\n * @return {import(\"../ImageState.js\").default} Image state.\n */\n getImageState() {\n return this.imageState_;\n }\n\n /**\n * @return {HTMLImageElement|HTMLCanvasElement} Image element.\n */\n getHitDetectionImage() {\n if (!this.hitDetectionImage_) {\n if (this.isTainted_()) {\n const width = this.size_[0];\n const height = this.size_[1];\n const context = createCanvasContext2D(width, height);\n context.fillRect(0, 0, width, height);\n this.hitDetectionImage_ = context.canvas;\n } else {\n this.hitDetectionImage_ = this.image_;\n }\n }\n return this.hitDetectionImage_;\n }\n\n /**\n * Get the size of the icon (in pixels).\n * @return {import(\"../size.js\").Size} Image size.\n */\n getSize() {\n return this.size_;\n }\n\n /**\n * @return {string|undefined} Image src.\n */\n getSrc() {\n return this.src_;\n }\n\n /**\n * Load not yet loaded URI.\n */\n load() {\n if (this.imageState_ == ImageState.IDLE) {\n this.imageState_ = ImageState.LOADING;\n try {\n /** @type {HTMLImageElement} */ (this.image_).src = this.src_;\n } catch (e) {\n this.handleImageError_();\n }\n this.unlisten_ = listenImage(\n this.image_,\n this.handleImageLoad_.bind(this),\n this.handleImageError_.bind(this)\n );\n }\n }\n\n /**\n * @param {number} pixelRatio Pixel ratio.\n * @private\n */\n replaceColor_(pixelRatio) {\n if (!this.color_ || this.canvas_[pixelRatio]) {\n return;\n }\n\n const canvas = document.createElement('canvas');\n this.canvas_[pixelRatio] = canvas;\n\n canvas.width = Math.ceil(this.image_.width * pixelRatio);\n canvas.height = Math.ceil(this.image_.height * pixelRatio);\n\n const ctx = canvas.getContext('2d');\n ctx.scale(pixelRatio, pixelRatio);\n ctx.drawImage(this.image_, 0, 0);\n\n ctx.globalCompositeOperation = 'multiply';\n // Internet Explorer 11 does not support the multiply operation.\n // If the canvas is tainted in Internet Explorer this still produces\n // a solid color image with the shape of the icon.\n if (ctx.globalCompositeOperation === 'multiply' || this.isTainted_()) {\n ctx.fillStyle = asString(this.color_);\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n ctx.globalCompositeOperation = 'destination-in';\n ctx.drawImage(this.image_, 0, 0);\n } else {\n const imgData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n const data = imgData.data;\n const r = this.color_[0] / 255.0;\n const g = this.color_[1] / 255.0;\n const b = this.color_[2] / 255.0;\n const a = this.color_[3];\n\n for (let i = 0, ii = data.length; i < ii; i += 4) {\n data[i] *= r;\n data[i + 1] *= g;\n data[i + 2] *= b;\n data[i + 3] *= a;\n }\n ctx.putImageData(imgData, 0, 0);\n }\n }\n\n /**\n * Discards event handlers which listen for load completion or errors.\n *\n * @private\n */\n unlistenImage_() {\n if (this.unlisten_) {\n this.unlisten_();\n this.unlisten_ = null;\n }\n }\n}\n\n/**\n * @param {HTMLImageElement|HTMLCanvasElement} image Image.\n * @param {string} src Src.\n * @param {import(\"../size.js\").Size} size Size.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../ImageState.js\").default} imageState Image state.\n * @param {import(\"../color.js\").Color} color Color.\n * @return {IconImage} Icon image.\n */\nexport function get(image, src, size, crossOrigin, imageState, color) {\n let iconImage = iconImageCache.get(src, crossOrigin, color);\n if (!iconImage) {\n iconImage = new IconImage(image, src, size, crossOrigin, imageState, color);\n iconImageCache.set(src, crossOrigin, color, iconImage);\n }\n return iconImage;\n}\n\nexport default IconImage;\n","/**\n * @module ol/style/Icon\n */\nimport EventType from '../events/EventType.js';\nimport IconAnchorUnits from './IconAnchorUnits.js';\nimport IconOrigin from './IconOrigin.js';\nimport ImageState from '../ImageState.js';\nimport ImageStyle from './Image.js';\nimport {asArray} from '../color.js';\nimport {assert} from '../asserts.js';\nimport {get as getIconImage} from './IconImage.js';\nimport {getUid} from '../util.js';\n\n/**\n * @typedef {Object} Options\n * @property {Array<number>} [anchor=[0.5, 0.5]] Anchor. Default value is the icon center.\n * @property {import(\"./IconOrigin.js\").default} [anchorOrigin='top-left'] Origin of the anchor: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {import(\"./IconAnchorUnits.js\").default} [anchorXUnits='fraction'] Units in which the anchor x value is\n * specified. A value of `'fraction'` indicates the x value is a fraction of the icon. A value of `'pixels'` indicates\n * the x value in pixels.\n * @property {import(\"./IconAnchorUnits.js\").default} [anchorYUnits='fraction'] Units in which the anchor y value is\n * specified. A value of `'fraction'` indicates the y value is a fraction of the icon. A value of `'pixels'` indicates\n * the y value in pixels.\n * @property {import(\"../color.js\").Color|string} [color] Color to tint the icon. If not specified,\n * the icon will be left as is.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that you must provide a\n * `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {HTMLImageElement|HTMLCanvasElement} [img] Image object for the icon. If the `src` option is not provided then the\n * provided image must already be loaded. And in that case, it is required\n * to provide the size of the image, with the `imgSize` option.\n * @property {Array<number>} [offset=[0, 0]] Offset, which, together with the size and the offset origin, define the\n * sub-rectangle to use from the original icon image.\n * @property {Array<number>} [displacement=[0,0]] Displacement the icon\n * @property {import(\"./IconOrigin.js\").default} [offsetOrigin='top-left'] Origin of the offset: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {number} [opacity=1] Opacity of the icon.\n * @property {number|import(\"../size.js\").Size} [scale=1] Scale.\n * @property {boolean} [rotateWithView=false] Whether to rotate the icon with the view.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {import(\"../size.js\").Size} [size] Icon size in pixel. Can be used together with `offset` to define the\n * sub-rectangle to use from the origin (sprite) icon image.\n * @property {import(\"../size.js\").Size} [imgSize] Image size in pixels. Only required if `img` is set and `src` is not, and\n * for SVG images in Internet Explorer 11. The provided `imgSize` needs to match the actual size of the image.\n * @property {string} [src] Image source URI.\n */\n\n/**\n * @classdesc\n * Set icon style for vector features.\n * @api\n */\nclass Icon extends ImageStyle {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options || {};\n\n /**\n * @type {number}\n */\n const opacity = options.opacity !== undefined ? options.opacity : 1;\n\n /**\n * @type {number}\n */\n const rotation = options.rotation !== undefined ? options.rotation : 0;\n\n /**\n * @type {number|import(\"../size.js\").Size}\n */\n const scale = options.scale !== undefined ? options.scale : 1;\n\n /**\n * @type {boolean}\n */\n const rotateWithView =\n options.rotateWithView !== undefined ? options.rotateWithView : false;\n\n super({\n opacity: opacity,\n rotation: rotation,\n scale: scale,\n displacement:\n options.displacement !== undefined ? options.displacement : [0, 0],\n rotateWithView: rotateWithView,\n });\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.anchor_ = options.anchor !== undefined ? options.anchor : [0.5, 0.5];\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.normalizedAnchor_ = null;\n\n /**\n * @private\n * @type {import(\"./IconOrigin.js\").default}\n */\n this.anchorOrigin_ =\n options.anchorOrigin !== undefined\n ? options.anchorOrigin\n : IconOrigin.TOP_LEFT;\n\n /**\n * @private\n * @type {import(\"./IconAnchorUnits.js\").default}\n */\n this.anchorXUnits_ =\n options.anchorXUnits !== undefined\n ? options.anchorXUnits\n : IconAnchorUnits.FRACTION;\n\n /**\n * @private\n * @type {import(\"./IconAnchorUnits.js\").default}\n */\n this.anchorYUnits_ =\n options.anchorYUnits !== undefined\n ? options.anchorYUnits\n : IconAnchorUnits.FRACTION;\n\n /**\n * @private\n * @type {?string}\n */\n this.crossOrigin_ =\n options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n /**\n * @type {HTMLImageElement|HTMLCanvasElement}\n */\n const image = options.img !== undefined ? options.img : null;\n\n /**\n * @type {import(\"../size.js\").Size}\n */\n const imgSize = options.imgSize !== undefined ? options.imgSize : null;\n\n /**\n * @type {string|undefined}\n */\n let src = options.src;\n\n assert(!(src !== undefined && image), 4); // `image` and `src` cannot be provided at the same time\n assert(!image || (image && imgSize), 5); // `imgSize` must be set when `image` is provided\n\n if ((src === undefined || src.length === 0) && image) {\n src = /** @type {HTMLImageElement} */ (image).src || getUid(image);\n }\n assert(src !== undefined && src.length > 0, 6); // A defined and non-empty `src` or `image` must be provided\n\n /**\n * @type {import(\"../ImageState.js\").default}\n */\n const imageState =\n options.src !== undefined ? ImageState.IDLE : ImageState.LOADED;\n\n /**\n * @private\n * @type {import(\"../color.js\").Color}\n */\n this.color_ = options.color !== undefined ? asArray(options.color) : null;\n\n /**\n * @private\n * @type {import(\"./IconImage.js\").default}\n */\n this.iconImage_ = getIconImage(\n image,\n /** @type {string} */ (src),\n imgSize,\n this.crossOrigin_,\n imageState,\n this.color_\n );\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.offset_ = options.offset !== undefined ? options.offset : [0, 0];\n /**\n * @private\n * @type {import(\"./IconOrigin.js\").default}\n */\n this.offsetOrigin_ =\n options.offsetOrigin !== undefined\n ? options.offsetOrigin\n : IconOrigin.TOP_LEFT;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.origin_ = null;\n\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.size_ = options.size !== undefined ? options.size : null;\n }\n\n /**\n * Clones the style. The underlying Image/HTMLCanvasElement is not cloned.\n * @return {Icon} The cloned style.\n * @api\n */\n clone() {\n const scale = this.getScale();\n return new Icon({\n anchor: this.anchor_.slice(),\n anchorOrigin: this.anchorOrigin_,\n anchorXUnits: this.anchorXUnits_,\n anchorYUnits: this.anchorYUnits_,\n crossOrigin: this.crossOrigin_,\n color:\n this.color_ && this.color_.slice\n ? this.color_.slice()\n : this.color_ || undefined,\n src: this.getSrc(),\n offset: this.offset_.slice(),\n offsetOrigin: this.offsetOrigin_,\n size: this.size_ !== null ? this.size_.slice() : undefined,\n opacity: this.getOpacity(),\n scale: Array.isArray(scale) ? scale.slice() : scale,\n rotation: this.getRotation(),\n rotateWithView: this.getRotateWithView(),\n });\n }\n\n /**\n * Get the anchor point in pixels. The anchor determines the center point for the\n * symbolizer.\n * @return {Array<number>} Anchor.\n * @api\n */\n getAnchor() {\n if (this.normalizedAnchor_) {\n return this.normalizedAnchor_;\n }\n let anchor = this.anchor_;\n const size = this.getSize();\n if (\n this.anchorXUnits_ == IconAnchorUnits.FRACTION ||\n this.anchorYUnits_ == IconAnchorUnits.FRACTION\n ) {\n if (!size) {\n return null;\n }\n anchor = this.anchor_.slice();\n if (this.anchorXUnits_ == IconAnchorUnits.FRACTION) {\n anchor[0] *= size[0];\n }\n if (this.anchorYUnits_ == IconAnchorUnits.FRACTION) {\n anchor[1] *= size[1];\n }\n }\n\n if (this.anchorOrigin_ != IconOrigin.TOP_LEFT) {\n if (!size) {\n return null;\n }\n if (anchor === this.anchor_) {\n anchor = this.anchor_.slice();\n }\n if (\n this.anchorOrigin_ == IconOrigin.TOP_RIGHT ||\n this.anchorOrigin_ == IconOrigin.BOTTOM_RIGHT\n ) {\n anchor[0] = -anchor[0] + size[0];\n }\n if (\n this.anchorOrigin_ == IconOrigin.BOTTOM_LEFT ||\n this.anchorOrigin_ == IconOrigin.BOTTOM_RIGHT\n ) {\n anchor[1] = -anchor[1] + size[1];\n }\n }\n this.normalizedAnchor_ = anchor;\n return this.normalizedAnchor_;\n }\n\n /**\n * Set the anchor point. The anchor determines the center point for the\n * symbolizer.\n *\n * @param {Array<number>} anchor Anchor.\n * @api\n */\n setAnchor(anchor) {\n this.anchor_ = anchor;\n this.normalizedAnchor_ = null;\n }\n\n /**\n * Get the icon color.\n * @return {import(\"../color.js\").Color} Color.\n * @api\n */\n getColor() {\n return this.color_;\n }\n\n /**\n * Get the image icon.\n * @param {number} pixelRatio Pixel ratio.\n * @return {HTMLImageElement|HTMLCanvasElement} Image or Canvas element.\n * @api\n */\n getImage(pixelRatio) {\n return this.iconImage_.getImage(pixelRatio);\n }\n\n /**\n * Get the pixel ratio.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} The pixel ration of the image.\n * @api\n */\n getPixelRatio(pixelRatio) {\n return this.iconImage_.getPixelRatio(pixelRatio);\n }\n\n /**\n * @return {import(\"../size.js\").Size} Image size.\n */\n getImageSize() {\n return this.iconImage_.getSize();\n }\n\n /**\n * @return {import(\"../size.js\").Size} Size of the hit-detection image.\n */\n getHitDetectionImageSize() {\n return this.getImageSize();\n }\n\n /**\n * @return {import(\"../ImageState.js\").default} Image state.\n */\n getImageState() {\n return this.iconImage_.getImageState();\n }\n\n /**\n * @return {HTMLImageElement|HTMLCanvasElement} Image element.\n */\n getHitDetectionImage() {\n return this.iconImage_.getHitDetectionImage();\n }\n\n /**\n * Get the origin of the symbolizer.\n * @return {Array<number>} Origin.\n * @api\n */\n getOrigin() {\n if (this.origin_) {\n return this.origin_;\n }\n let offset = this.offset_;\n const displacement = this.getDisplacement();\n\n if (this.offsetOrigin_ != IconOrigin.TOP_LEFT) {\n const size = this.getSize();\n const iconImageSize = this.iconImage_.getSize();\n if (!size || !iconImageSize) {\n return null;\n }\n offset = offset.slice();\n if (\n this.offsetOrigin_ == IconOrigin.TOP_RIGHT ||\n this.offsetOrigin_ == IconOrigin.BOTTOM_RIGHT\n ) {\n offset[0] = iconImageSize[0] - size[0] - offset[0];\n }\n if (\n this.offsetOrigin_ == IconOrigin.BOTTOM_LEFT ||\n this.offsetOrigin_ == IconOrigin.BOTTOM_RIGHT\n ) {\n offset[1] = iconImageSize[1] - size[1] - offset[1];\n }\n }\n offset[0] += displacement[0];\n offset[1] += displacement[1];\n this.origin_ = offset;\n return this.origin_;\n }\n\n /**\n * Get the image URL.\n * @return {string|undefined} Image src.\n * @api\n */\n getSrc() {\n return this.iconImage_.getSrc();\n }\n\n /**\n * Get the size of the icon (in pixels).\n * @return {import(\"../size.js\").Size} Image size.\n * @api\n */\n getSize() {\n return !this.size_ ? this.iconImage_.getSize() : this.size_;\n }\n\n /**\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n */\n listenImageChange(listener) {\n this.iconImage_.addEventListener(EventType.CHANGE, listener);\n }\n\n /**\n * Load not yet loaded URI.\n * When rendering a feature with an icon style, the vector renderer will\n * automatically call this method. However, you might want to call this\n * method yourself for preloading or other purposes.\n * @api\n */\n load() {\n this.iconImage_.load();\n }\n\n /**\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n */\n unlistenImageChange(listener) {\n this.iconImage_.removeEventListener(EventType.CHANGE, listener);\n }\n}\n\nexport default Icon;\n","/**\n * @module ol/style\n */\n\nexport {default as Circle} from './style/Circle.js';\nexport {default as Fill} from './style/Fill.js';\nexport {default as Icon} from './style/Icon.js';\nexport {default as IconImage} from './style/IconImage.js';\nexport {default as Image} from './style/Image.js';\nexport {default as RegularShape} from './style/RegularShape.js';\nexport {default as Stroke} from './style/Stroke.js';\nexport {default as Style} from './style/Style.js';\nexport {default as Text} from './style/Text.js';\n","/**\n * @module ol/render/canvas/hitdetect\n */\n\nimport CanvasImmediateRenderer from './Immediate.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport IconAnchorUnits from '../../style/IconAnchorUnits.js';\nimport {Icon} from '../../style.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {intersects} from '../../extent.js';\nimport {numberSafeCompareFunction} from '../../array.js';\n\n/**\n * @param {import(\"../../size.js\").Size} size Canvas size in css pixels.\n * @param {Array<import(\"../../transform.js\").Transform>} transforms Transforms\n * for rendering features to all worlds of the viewport, from coordinates to css\n * pixels.\n * @param {Array<import(\"../../Feature.js\").FeatureLike>} features\n * Features to consider for hit detection.\n * @param {import(\"../../style/Style.js\").StyleFunction|undefined} styleFunction\n * Layer style function.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @return {ImageData} Hit detection image data.\n */\nexport function createHitDetectionImageData(\n size,\n transforms,\n features,\n styleFunction,\n extent,\n resolution,\n rotation\n) {\n const width = size[0] / 2;\n const height = size[1] / 2;\n const context = createCanvasContext2D(width, height);\n context.imageSmoothingEnabled = false;\n const canvas = context.canvas;\n const renderer = new CanvasImmediateRenderer(\n context,\n 0.5,\n extent,\n null,\n rotation\n );\n const featureCount = features.length;\n // Stretch hit detection index to use the whole available color range\n const indexFactor = Math.floor((256 * 256 * 256 - 1) / featureCount);\n const featuresByZIndex = {};\n for (let i = 1; i <= featureCount; ++i) {\n const feature = features[i - 1];\n const featureStyleFunction = feature.getStyleFunction() || styleFunction;\n if (!styleFunction) {\n continue;\n }\n let styles = featureStyleFunction(feature, resolution);\n if (!styles) {\n continue;\n }\n if (!Array.isArray(styles)) {\n styles = [styles];\n }\n const index = i * indexFactor;\n const color = '#' + ('000000' + index.toString(16)).slice(-6);\n for (let j = 0, jj = styles.length; j < jj; ++j) {\n const originalStyle = styles[j];\n const style = originalStyle.clone();\n const fill = style.getFill();\n if (fill) {\n fill.setColor(color);\n }\n const stroke = style.getStroke();\n if (stroke) {\n stroke.setColor(color);\n }\n style.setText(undefined);\n const image = originalStyle.getImage();\n if (image) {\n const imgSize = image.getImageSize();\n if (!imgSize) {\n continue;\n }\n\n const canvas = document.createElement('canvas');\n canvas.width = imgSize[0];\n canvas.height = imgSize[1];\n const imgContext = canvas.getContext('2d', {alpha: false});\n imgContext.fillStyle = color;\n const img = imgContext.canvas;\n imgContext.fillRect(0, 0, img.width, img.height);\n const width = imgSize ? imgSize[0] : img.width;\n const height = imgSize ? imgSize[1] : img.height;\n const iconContext = createCanvasContext2D(width, height);\n iconContext.drawImage(img, 0, 0);\n style.setImage(\n new Icon({\n img: img,\n imgSize: imgSize,\n anchor: image.getAnchor(),\n anchorXUnits: IconAnchorUnits.PIXELS,\n anchorYUnits: IconAnchorUnits.PIXELS,\n offset: image.getOrigin(),\n size: image.getSize(),\n opacity: image.getOpacity(),\n scale: image.getScale(),\n rotation: image.getRotation(),\n rotateWithView: image.getRotateWithView(),\n })\n );\n }\n const zIndex = Number(style.getZIndex());\n let byGeometryType = featuresByZIndex[zIndex];\n if (!byGeometryType) {\n byGeometryType = {};\n featuresByZIndex[zIndex] = byGeometryType;\n byGeometryType[GeometryType.POLYGON] = [];\n byGeometryType[GeometryType.CIRCLE] = [];\n byGeometryType[GeometryType.LINE_STRING] = [];\n byGeometryType[GeometryType.POINT] = [];\n }\n const geometry = style.getGeometryFunction()(feature);\n if (geometry && intersects(extent, geometry.getExtent())) {\n byGeometryType[geometry.getType().replace('Multi', '')].push(\n geometry,\n style\n );\n }\n }\n }\n\n const zIndexKeys = Object.keys(featuresByZIndex)\n .map(Number)\n .sort(numberSafeCompareFunction);\n for (let i = 0, ii = zIndexKeys.length; i < ii; ++i) {\n const byGeometryType = featuresByZIndex[zIndexKeys[i]];\n for (const type in byGeometryType) {\n const geomAndStyle = byGeometryType[type];\n for (let j = 0, jj = geomAndStyle.length; j < jj; j += 2) {\n renderer.setStyle(geomAndStyle[j + 1]);\n for (let k = 0, kk = transforms.length; k < kk; ++k) {\n renderer.setTransform(transforms[k]);\n renderer.drawGeometry(geomAndStyle[j]);\n }\n }\n }\n }\n return context.getImageData(0, 0, canvas.width, canvas.height);\n}\n\n/**\n * @param {import(\"../../pixel\").Pixel} pixel Pixel coordinate on the hit\n * detection canvas in css pixels.\n * @param {Array<import(\"../../Feature\").FeatureLike>} features Features. Has to\n * match the `features` array that was passed to `createHitDetectionImageData()`.\n * @param {ImageData} imageData Hit detection image data generated by\n * `createHitDetectionImageData()`.\n * @return {Array<import(\"../../Feature\").FeatureLike>} features Features.\n */\nexport function hitDetect(pixel, features, imageData) {\n const resultFeatures = [];\n if (imageData) {\n const index =\n (Math.round(pixel[0] / 2) + Math.round(pixel[1] / 2) * imageData.width) *\n 4;\n const r = imageData.data[index];\n const g = imageData.data[index + 1];\n const b = imageData.data[index + 2];\n const i = b + 256 * (g + 256 * r);\n const indexFactor = Math.floor((256 * 256 * 256 - 1) / features.length);\n if (i && i % indexFactor === 0) {\n resultFeatures.push(features[i / indexFactor - 1]);\n }\n }\n return resultFeatures;\n}\n","/**\n * @module ol/renderer/vector\n */\nimport BuilderType from '../render/canvas/BuilderType.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport ImageState from '../ImageState.js';\nimport {getUid} from '../util.js';\n\n/**\n * Feature callback. The callback will be called with three arguments. The first\n * argument is one {@link module:ol/Feature feature} or {@link module:ol/render/Feature render feature}\n * at the pixel, the second is the {@link module:ol/layer/Layer layer} of the feature and will be null for\n * unmanaged layers. The third is the {@link module:ol/geom/SimpleGeometry} of the feature. For features\n * with a GeometryCollection geometry, it will be the first detected geometry from the collection.\n * @template T\n * @typedef {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default, import(\"../geom/SimpleGeometry.js\").default): T} FeatureCallback\n */\n\n/**\n * Tolerance for geometry simplification in device pixels.\n * @type {number}\n */\nconst SIMPLIFY_TOLERANCE = 0.5;\n\n/**\n * @const\n * @type {Object<import(\"../geom/GeometryType.js\").default,\n * function(import(\"../render/canvas/BuilderGroup.js\").default, import(\"../geom/Geometry.js\").default,\n * import(\"../style/Style.js\").default, Object): void>}\n */\nconst GEOMETRY_RENDERERS = {\n 'Point': renderPointGeometry,\n 'LineString': renderLineStringGeometry,\n 'Polygon': renderPolygonGeometry,\n 'MultiPoint': renderMultiPointGeometry,\n 'MultiLineString': renderMultiLineStringGeometry,\n 'MultiPolygon': renderMultiPolygonGeometry,\n 'GeometryCollection': renderGeometryCollectionGeometry,\n 'Circle': renderCircleGeometry,\n};\n\n/**\n * @param {import(\"../Feature.js\").FeatureLike} feature1 Feature 1.\n * @param {import(\"../Feature.js\").FeatureLike} feature2 Feature 2.\n * @return {number} Order.\n */\nexport function defaultOrder(feature1, feature2) {\n return parseInt(getUid(feature1), 10) - parseInt(getUid(feature2), 10);\n}\n\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Squared pixel tolerance.\n */\nexport function getSquaredTolerance(resolution, pixelRatio) {\n const tolerance = getTolerance(resolution, pixelRatio);\n return tolerance * tolerance;\n}\n\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Pixel tolerance.\n */\nexport function getTolerance(resolution, pixelRatio) {\n return (SIMPLIFY_TOLERANCE * resolution) / pixelRatio;\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Builder group.\n * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default=} opt_declutterBuilderGroup Builder for decluttering.\n */\nfunction renderCircleGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n opt_declutterBuilderGroup\n) {\n const fillStyle = style.getFill();\n const strokeStyle = style.getStroke();\n if (fillStyle || strokeStyle) {\n const circleReplay = builderGroup.getBuilder(\n style.getZIndex(),\n BuilderType.CIRCLE\n );\n circleReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n circleReplay.drawCircle(geometry, feature);\n }\n const textStyle = style.getText();\n if (textStyle && textStyle.getText()) {\n const textReplay = (opt_declutterBuilderGroup || builderGroup).getBuilder(\n style.getZIndex(),\n BuilderType.TEXT\n );\n textReplay.setTextStyle(textStyle);\n textReplay.drawText(geometry, feature);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Transform from user to view projection.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default=} opt_declutterBuilderGroup Builder for decluttering.\n * @return {boolean} `true` if style is loading.\n */\nexport function renderFeature(\n replayGroup,\n feature,\n style,\n squaredTolerance,\n listener,\n opt_transform,\n opt_declutterBuilderGroup\n) {\n let loading = false;\n const imageStyle = style.getImage();\n if (imageStyle) {\n let imageState = imageStyle.getImageState();\n if (imageState == ImageState.LOADED || imageState == ImageState.ERROR) {\n imageStyle.unlistenImageChange(listener);\n } else {\n if (imageState == ImageState.IDLE) {\n imageStyle.load();\n }\n imageState = imageStyle.getImageState();\n imageStyle.listenImageChange(listener);\n loading = true;\n }\n }\n renderFeatureInternal(\n replayGroup,\n feature,\n style,\n squaredTolerance,\n opt_transform,\n opt_declutterBuilderGroup\n );\n\n return loading;\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Optional transform function.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default=} opt_declutterBuilderGroup Builder for decluttering.\n */\nfunction renderFeatureInternal(\n replayGroup,\n feature,\n style,\n squaredTolerance,\n opt_transform,\n opt_declutterBuilderGroup\n) {\n const geometry = style.getGeometryFunction()(feature);\n if (!geometry) {\n return;\n }\n const simplifiedGeometry = geometry.simplifyTransformed(\n squaredTolerance,\n opt_transform\n );\n const renderer = style.getRenderer();\n if (renderer) {\n renderGeometry(replayGroup, simplifiedGeometry, style, feature);\n } else {\n const geometryRenderer = GEOMETRY_RENDERERS[simplifiedGeometry.getType()];\n geometryRenderer(\n replayGroup,\n simplifiedGeometry,\n style,\n feature,\n opt_declutterBuilderGroup\n );\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderGeometry(replayGroup, geometry, style, feature) {\n if (geometry.getType() == GeometryType.GEOMETRY_COLLECTION) {\n const geometries = /** @type {import(\"../geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n renderGeometry(replayGroup, geometries[i], style, feature);\n }\n return;\n }\n const replay = replayGroup.getBuilder(style.getZIndex(), BuilderType.DEFAULT);\n replay.drawCustom(\n /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (geometry),\n feature,\n style.getRenderer()\n );\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default=} opt_declutterBuilderGroup Builder for decluttering.\n */\nfunction renderGeometryCollectionGeometry(\n replayGroup,\n geometry,\n style,\n feature,\n opt_declutterBuilderGroup\n) {\n const geometries = geometry.getGeometriesArray();\n let i, ii;\n for (i = 0, ii = geometries.length; i < ii; ++i) {\n const geometryRenderer = GEOMETRY_RENDERERS[geometries[i].getType()];\n geometryRenderer(\n replayGroup,\n geometries[i],\n style,\n feature,\n opt_declutterBuilderGroup\n );\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/LineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default=} opt_declutterBuilderGroup Builder for decluttering.\n */\nfunction renderLineStringGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n opt_declutterBuilderGroup\n) {\n const strokeStyle = style.getStroke();\n if (strokeStyle) {\n const lineStringReplay = builderGroup.getBuilder(\n style.getZIndex(),\n BuilderType.LINE_STRING\n );\n lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n lineStringReplay.drawLineString(geometry, feature);\n }\n const textStyle = style.getText();\n if (textStyle && textStyle.getText()) {\n const textReplay = (opt_declutterBuilderGroup || builderGroup).getBuilder(\n style.getZIndex(),\n BuilderType.TEXT\n );\n textReplay.setTextStyle(textStyle);\n textReplay.drawText(geometry, feature);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiLineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default=} opt_declutterBuilderGroup Builder for decluttering.\n */\nfunction renderMultiLineStringGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n opt_declutterBuilderGroup\n) {\n const strokeStyle = style.getStroke();\n if (strokeStyle) {\n const lineStringReplay = builderGroup.getBuilder(\n style.getZIndex(),\n BuilderType.LINE_STRING\n );\n lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n lineStringReplay.drawMultiLineString(geometry, feature);\n }\n const textStyle = style.getText();\n if (textStyle && textStyle.getText()) {\n const textReplay = (opt_declutterBuilderGroup || builderGroup).getBuilder(\n style.getZIndex(),\n BuilderType.TEXT\n );\n textReplay.setTextStyle(textStyle);\n textReplay.drawText(geometry, feature);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default=} opt_declutterBuilderGroup Builder for decluttering.\n */\nfunction renderMultiPolygonGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n opt_declutterBuilderGroup\n) {\n const fillStyle = style.getFill();\n const strokeStyle = style.getStroke();\n if (strokeStyle || fillStyle) {\n const polygonReplay = builderGroup.getBuilder(\n style.getZIndex(),\n BuilderType.POLYGON\n );\n polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n polygonReplay.drawMultiPolygon(geometry, feature);\n }\n const textStyle = style.getText();\n if (textStyle && textStyle.getText()) {\n const textReplay = (opt_declutterBuilderGroup || builderGroup).getBuilder(\n style.getZIndex(),\n BuilderType.TEXT\n );\n textReplay.setTextStyle(textStyle);\n textReplay.drawText(geometry, feature);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/Point.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default=} opt_declutterBuilderGroup Builder for decluttering.\n */\nfunction renderPointGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n opt_declutterBuilderGroup\n) {\n const imageStyle = style.getImage();\n const textStyle = style.getText();\n /** @type {import(\"../render/canvas.js\").DeclutterImageWithText} */\n let declutterImageWithText;\n if (opt_declutterBuilderGroup) {\n builderGroup = opt_declutterBuilderGroup;\n declutterImageWithText =\n imageStyle && textStyle && textStyle.getText() ? {} : undefined;\n }\n if (imageStyle) {\n if (imageStyle.getImageState() != ImageState.LOADED) {\n return;\n }\n const imageReplay = builderGroup.getBuilder(\n style.getZIndex(),\n BuilderType.IMAGE\n );\n imageReplay.setImageStyle(imageStyle, declutterImageWithText);\n imageReplay.drawPoint(geometry, feature);\n }\n if (textStyle && textStyle.getText()) {\n const textReplay = builderGroup.getBuilder(\n style.getZIndex(),\n BuilderType.TEXT\n );\n textReplay.setTextStyle(textStyle, declutterImageWithText);\n textReplay.drawText(geometry, feature);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiPoint.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default=} opt_declutterBuilderGroup Builder for decluttering.\n */\nfunction renderMultiPointGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n opt_declutterBuilderGroup\n) {\n const imageStyle = style.getImage();\n const textStyle = style.getText();\n /** @type {import(\"../render/canvas.js\").DeclutterImageWithText} */\n let declutterImageWithText;\n if (opt_declutterBuilderGroup) {\n builderGroup = opt_declutterBuilderGroup;\n declutterImageWithText =\n imageStyle && textStyle && textStyle.getText() ? {} : undefined;\n }\n if (imageStyle) {\n if (imageStyle.getImageState() != ImageState.LOADED) {\n return;\n }\n const imageReplay = builderGroup.getBuilder(\n style.getZIndex(),\n BuilderType.IMAGE\n );\n imageReplay.setImageStyle(imageStyle, declutterImageWithText);\n imageReplay.drawMultiPoint(geometry, feature);\n }\n if (textStyle && textStyle.getText()) {\n const textReplay = (opt_declutterBuilderGroup || builderGroup).getBuilder(\n style.getZIndex(),\n BuilderType.TEXT\n );\n textReplay.setTextStyle(textStyle, declutterImageWithText);\n textReplay.drawText(geometry, feature);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/Polygon.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default=} opt_declutterBuilderGroup Builder for decluttering.\n */\nfunction renderPolygonGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n opt_declutterBuilderGroup\n) {\n const fillStyle = style.getFill();\n const strokeStyle = style.getStroke();\n if (fillStyle || strokeStyle) {\n const polygonReplay = builderGroup.getBuilder(\n style.getZIndex(),\n BuilderType.POLYGON\n );\n polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n polygonReplay.drawPolygon(geometry, feature);\n }\n const textStyle = style.getText();\n if (textStyle && textStyle.getText()) {\n const textReplay = (opt_declutterBuilderGroup || builderGroup).getBuilder(\n style.getZIndex(),\n BuilderType.TEXT\n );\n textReplay.setTextStyle(textStyle);\n textReplay.drawText(geometry, feature);\n }\n}\n","/**\n * @module ol/renderer/canvas/VectorLayer\n */\nimport CanvasBuilderGroup from '../../render/canvas/BuilderGroup.js';\nimport CanvasLayerRenderer from './Layer.js';\nimport ExecutorGroup from '../../render/canvas/ExecutorGroup.js';\nimport ViewHint from '../../ViewHint.js';\nimport {\n apply,\n makeInverse,\n makeScale,\n toString as transformToString,\n} from '../../transform.js';\nimport {\n buffer,\n containsExtent,\n createEmpty,\n getWidth,\n intersects as intersectsExtent,\n wrapX as wrapExtentX,\n} from '../../extent.js';\nimport {\n createHitDetectionImageData,\n hitDetect,\n} from '../../render/canvas/hitdetect.js';\nimport {\n defaultOrder as defaultRenderOrder,\n getTolerance as getRenderTolerance,\n getSquaredTolerance as getSquaredRenderTolerance,\n renderFeature,\n} from '../vector.js';\nimport {\n fromUserExtent,\n getTransformFromProjections,\n getUserProjection,\n toUserExtent,\n} from '../../proj.js';\nimport {getUid} from '../../util.js';\nimport {wrapX as wrapCoordinateX} from '../../coordinate.js';\n\n/**\n * @classdesc\n * Canvas renderer for vector layers.\n * @api\n */\nclass CanvasVectorLayerRenderer extends CanvasLayerRenderer {\n /**\n * @param {import(\"../../layer/Vector.js\").default} vectorLayer Vector layer.\n */\n constructor(vectorLayer) {\n super(vectorLayer);\n\n /** @private */\n this.boundHandleStyleImageChange_ = this.handleStyleImageChange_.bind(this);\n\n /**\n * @type {boolean}\n */\n this.animatingOrInteracting_;\n\n /**\n * @private\n * @type {boolean}\n */\n this.dirty_ = false;\n\n /**\n * @type {ImageData}\n */\n this.hitDetectionImageData_ = null;\n\n /**\n * @type {Array<import(\"../../Feature.js\").default>}\n */\n this.renderedFeatures_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedRevision_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedResolution_ = NaN;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.renderedExtent_ = createEmpty();\n\n /**\n * @private\n * @type {number}\n */\n this.renderedRotation_;\n\n /**\n * @private\n * @type {import(\"../../coordinate\").Coordinate}\n */\n this.renderedCenter_ = null;\n\n /**\n * @private\n * @type {import(\"../../proj/Projection\").default}\n */\n this.renderedProjection_ = null;\n\n /**\n * @private\n * @type {function(import(\"../../Feature.js\").default, import(\"../../Feature.js\").default): number|null}\n */\n this.renderedRenderOrder_ = null;\n\n /**\n * @private\n * @type {import(\"../../render/canvas/ExecutorGroup\").default}\n */\n this.replayGroup_ = null;\n\n /**\n * A new replay group had to be created by `prepareFrame()`\n * @type {boolean}\n */\n this.replayGroupChanged = true;\n\n /**\n * @type {import(\"../../render/canvas/ExecutorGroup\").default}\n */\n this.declutterExecutorGroup = null;\n\n /**\n * Clipping to be performed by `renderFrame()`\n * @type {boolean}\n */\n this.clipping = true;\n }\n\n /**\n * Get a rendering container from an existing target, if compatible.\n * @param {HTMLElement} target Potential render target.\n * @param {string} transform CSS Transform.\n * @param {number} opacity Opacity.\n */\n useContainer(target, transform, opacity) {\n if (opacity < 1) {\n target = null;\n }\n super.useContainer(target, transform, opacity);\n }\n\n /**\n * @param {ExecutorGroup} executorGroup Executor group.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"rbush\").default=} opt_declutterTree Declutter tree.\n */\n renderWorlds(executorGroup, frameState, opt_declutterTree) {\n const extent = frameState.extent;\n const viewState = frameState.viewState;\n const center = viewState.center;\n const resolution = viewState.resolution;\n const projection = viewState.projection;\n const rotation = viewState.rotation;\n const projectionExtent = projection.getExtent();\n const vectorSource = this.getLayer().getSource();\n const pixelRatio = frameState.pixelRatio;\n const viewHints = frameState.viewHints;\n const snapToPixel = !(\n viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]\n );\n const context = this.context;\n const width = Math.round(frameState.size[0] * pixelRatio);\n const height = Math.round(frameState.size[1] * pixelRatio);\n\n const multiWorld = vectorSource.getWrapX() && projection.canWrapX();\n const worldWidth = multiWorld ? getWidth(projectionExtent) : null;\n const endWorld = multiWorld\n ? Math.ceil((extent[2] - projectionExtent[2]) / worldWidth) + 1\n : 1;\n let world = multiWorld\n ? Math.floor((extent[0] - projectionExtent[0]) / worldWidth)\n : 0;\n do {\n const transform = this.getRenderTransform(\n center,\n resolution,\n rotation,\n pixelRatio,\n width,\n height,\n world * worldWidth\n );\n executorGroup.execute(\n context,\n 1,\n transform,\n rotation,\n snapToPixel,\n undefined,\n opt_declutterTree\n );\n } while (++world < endWorld);\n }\n\n /**\n * Render declutter items for this layer\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n */\n renderDeclutter(frameState) {\n if (this.declutterExecutorGroup) {\n this.renderWorlds(\n this.declutterExecutorGroup,\n frameState,\n frameState.declutterTree\n );\n }\n }\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 renderFrame(frameState, target) {\n const pixelRatio = frameState.pixelRatio;\n const layerState = frameState.layerStatesArray[frameState.layerIndex];\n\n // set forward and inverse pixel transforms\n makeScale(this.pixelTransform, 1 / pixelRatio, 1 / pixelRatio);\n makeInverse(this.inversePixelTransform, this.pixelTransform);\n\n const canvasTransform = transformToString(this.pixelTransform);\n\n this.useContainer(target, canvasTransform, layerState.opacity);\n const context = this.context;\n const canvas = context.canvas;\n\n const replayGroup = this.replayGroup_;\n const declutterExecutorGroup = this.declutterExecutorGroup;\n if (\n (!replayGroup || replayGroup.isEmpty()) &&\n (!declutterExecutorGroup || declutterExecutorGroup.isEmpty())\n ) {\n if (!this.containerReused && canvas.width > 0) {\n canvas.width = 0;\n }\n return this.container;\n }\n\n // resize and clear\n const width = Math.round(frameState.size[0] * pixelRatio);\n const height = Math.round(frameState.size[1] * pixelRatio);\n if (canvas.width != width || canvas.height != height) {\n canvas.width = width;\n canvas.height = height;\n if (canvas.style.transform !== canvasTransform) {\n canvas.style.transform = canvasTransform;\n }\n } else if (!this.containerReused) {\n context.clearRect(0, 0, width, height);\n }\n\n this.preRender(context, frameState);\n\n const viewState = frameState.viewState;\n const projection = viewState.projection;\n\n // clipped rendering if layer extent is set\n let clipped = false;\n if (layerState.extent && this.clipping) {\n const layerExtent = fromUserExtent(layerState.extent, projection);\n clipped =\n !containsExtent(layerExtent, frameState.extent) &&\n intersectsExtent(layerExtent, frameState.extent);\n if (clipped) {\n this.clipUnrotated(context, frameState, layerExtent);\n }\n }\n\n this.renderWorlds(replayGroup, frameState);\n\n if (clipped) {\n context.restore();\n }\n\n this.postRender(context, frameState);\n\n const opacity = layerState.opacity;\n const container = this.container;\n if (opacity !== parseFloat(container.style.opacity)) {\n container.style.opacity = opacity === 1 ? '' : String(opacity);\n }\n\n if (this.renderedRotation_ !== viewState.rotation) {\n this.renderedRotation_ = viewState.rotation;\n this.hitDetectionImageData_ = null;\n }\n return this.container;\n }\n\n /**\n * Asynchronous layer level hit detection.\n * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n * @return {Promise<Array<import(\"../../Feature\").default>>} Promise that resolves with an array of features.\n */\n getFeatures(pixel) {\n return new Promise(\n /**\n * @param {function(Array<import(\"../../Feature\").default|import(\"../../render/Feature\").default>): void} resolve Resolver function.\n * @this {CanvasVectorLayerRenderer}\n */\n function (resolve) {\n if (!this.hitDetectionImageData_ && !this.animatingOrInteracting_) {\n const size = [this.context.canvas.width, this.context.canvas.height];\n apply(this.pixelTransform, size);\n const center = this.renderedCenter_;\n const resolution = this.renderedResolution_;\n const rotation = this.renderedRotation_;\n const projection = this.renderedProjection_;\n const extent = this.renderedExtent_;\n const layer = this.getLayer();\n const transforms = [];\n const width = size[0] / 2;\n const height = size[1] / 2;\n transforms.push(\n this.getRenderTransform(\n center,\n resolution,\n rotation,\n 0.5,\n width,\n height,\n 0\n ).slice()\n );\n const source = layer.getSource();\n const projectionExtent = projection.getExtent();\n if (\n source.getWrapX() &&\n projection.canWrapX() &&\n !containsExtent(projectionExtent, extent)\n ) {\n let startX = extent[0];\n const worldWidth = getWidth(projectionExtent);\n let world = 0;\n let offsetX;\n while (startX < projectionExtent[0]) {\n --world;\n offsetX = worldWidth * world;\n transforms.push(\n this.getRenderTransform(\n center,\n resolution,\n rotation,\n 0.5,\n width,\n height,\n offsetX\n ).slice()\n );\n startX += worldWidth;\n }\n world = 0;\n startX = extent[2];\n while (startX > projectionExtent[2]) {\n ++world;\n offsetX = worldWidth * world;\n transforms.push(\n this.getRenderTransform(\n center,\n resolution,\n rotation,\n 0.5,\n width,\n height,\n offsetX\n ).slice()\n );\n startX -= worldWidth;\n }\n }\n\n this.hitDetectionImageData_ = createHitDetectionImageData(\n size,\n transforms,\n this.renderedFeatures_,\n layer.getStyleFunction(),\n extent,\n resolution,\n rotation\n );\n }\n resolve(\n hitDetect(pixel, this.renderedFeatures_, this.hitDetectionImageData_)\n );\n }.bind(this)\n );\n }\n\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {import(\"../vector.js\").FeatureCallback<T>} callback Feature callback.\n * @param {Array<import(\"../Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n * @return {T|undefined} Callback result.\n * @template T\n */\n forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n callback,\n matches\n ) {\n if (!this.replayGroup_) {\n return undefined;\n }\n const resolution = frameState.viewState.resolution;\n const rotation = frameState.viewState.rotation;\n const layer = this.getLayer();\n\n /** @type {!Object<string, import(\"../Map.js\").HitMatch<T>|true>} */\n const features = {};\n\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @param {number} distanceSq The squared distance to the click position\n * @return {T|undefined} Callback result.\n */\n const featureCallback = function (feature, geometry, distanceSq) {\n const key = getUid(feature);\n const match = features[key];\n if (!match) {\n if (distanceSq === 0) {\n features[key] = true;\n return callback(feature, layer, geometry);\n }\n matches.push(\n (features[key] = {\n feature: feature,\n layer: layer,\n geometry: geometry,\n distanceSq: distanceSq,\n callback: callback,\n })\n );\n } else if (match !== true && distanceSq < match.distanceSq) {\n if (distanceSq === 0) {\n features[key] = true;\n matches.splice(matches.lastIndexOf(match), 1);\n return callback(feature, layer, geometry);\n }\n match.geometry = geometry;\n match.distanceSq = distanceSq;\n }\n return undefined;\n };\n\n let result;\n const executorGroups = [this.replayGroup_];\n if (this.declutterExecutorGroup) {\n executorGroups.push(this.declutterExecutorGroup);\n }\n executorGroups.some((executorGroup) => {\n return (result = executorGroup.forEachFeatureAtCoordinate(\n coordinate,\n resolution,\n rotation,\n hitTolerance,\n featureCallback,\n executorGroup === this.declutterExecutorGroup\n ? frameState.declutterTree.all().map((item) => item.value)\n : null\n ));\n });\n\n return result;\n }\n\n /**\n * Perform action necessary to get the layer rendered after new fonts have loaded\n */\n handleFontsChanged() {\n const layer = this.getLayer();\n if (layer.getVisible() && this.replayGroup_) {\n layer.changed();\n }\n }\n\n /**\n * Handle changes in image style state.\n * @param {import(\"../../events/Event.js\").default} event Image style change event.\n * @private\n */\n handleStyleImageChange_(event) {\n this.renderIfReadyAndVisible();\n }\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 prepareFrame(frameState) {\n const vectorLayer = this.getLayer();\n const vectorSource = vectorLayer.getSource();\n if (!vectorSource) {\n return false;\n }\n\n const animating = frameState.viewHints[ViewHint.ANIMATING];\n const interacting = frameState.viewHints[ViewHint.INTERACTING];\n const updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();\n const updateWhileInteracting = vectorLayer.getUpdateWhileInteracting();\n\n if (\n (!this.dirty_ && !updateWhileAnimating && animating) ||\n (!updateWhileInteracting && interacting)\n ) {\n this.animatingOrInteracting_ = true;\n return true;\n }\n this.animatingOrInteracting_ = false;\n\n const frameStateExtent = frameState.extent;\n const viewState = frameState.viewState;\n const projection = viewState.projection;\n const resolution = viewState.resolution;\n const pixelRatio = frameState.pixelRatio;\n const vectorLayerRevision = vectorLayer.getRevision();\n const vectorLayerRenderBuffer = vectorLayer.getRenderBuffer();\n let vectorLayerRenderOrder = vectorLayer.getRenderOrder();\n\n if (vectorLayerRenderOrder === undefined) {\n vectorLayerRenderOrder = defaultRenderOrder;\n }\n\n const center = viewState.center.slice();\n const extent = buffer(\n frameStateExtent,\n vectorLayerRenderBuffer * resolution\n );\n const loadExtents = [extent.slice()];\n const projectionExtent = projection.getExtent();\n\n if (\n vectorSource.getWrapX() &&\n projection.canWrapX() &&\n !containsExtent(projectionExtent, frameState.extent)\n ) {\n // For the replay group, we need an extent that intersects the real world\n // (-180° to +180°). To support geometries in a coordinate range from -540°\n // to +540°, we add at least 1 world width on each side of the projection\n // extent. If the viewport is wider than the world, we need to add half of\n // the viewport width to make sure we cover the whole viewport.\n const worldWidth = getWidth(projectionExtent);\n const gutter = Math.max(getWidth(extent) / 2, worldWidth);\n extent[0] = projectionExtent[0] - gutter;\n extent[2] = projectionExtent[2] + gutter;\n wrapCoordinateX(center, projection);\n const loadExtent = wrapExtentX(loadExtents[0], projection);\n // If the extent crosses the date line, we load data for both edges of the worlds\n if (\n loadExtent[0] < projectionExtent[0] &&\n loadExtent[2] < projectionExtent[2]\n ) {\n loadExtents.push([\n loadExtent[0] + worldWidth,\n loadExtent[1],\n loadExtent[2] + worldWidth,\n loadExtent[3],\n ]);\n } else if (\n loadExtent[0] > projectionExtent[0] &&\n loadExtent[2] > projectionExtent[2]\n ) {\n loadExtents.push([\n loadExtent[0] - worldWidth,\n loadExtent[1],\n loadExtent[2] - worldWidth,\n loadExtent[3],\n ]);\n }\n }\n\n if (\n !this.dirty_ &&\n this.renderedResolution_ == resolution &&\n this.renderedRevision_ == vectorLayerRevision &&\n this.renderedRenderOrder_ == vectorLayerRenderOrder &&\n containsExtent(this.renderedExtent_, extent)\n ) {\n this.replayGroupChanged = false;\n return true;\n }\n\n this.replayGroup_ = null;\n\n this.dirty_ = false;\n\n const replayGroup = new CanvasBuilderGroup(\n getRenderTolerance(resolution, pixelRatio),\n extent,\n resolution,\n pixelRatio\n );\n\n let declutterBuilderGroup;\n if (this.getLayer().getDeclutter()) {\n declutterBuilderGroup = new CanvasBuilderGroup(\n getRenderTolerance(resolution, pixelRatio),\n extent,\n resolution,\n pixelRatio\n );\n }\n\n const userProjection = getUserProjection();\n let userTransform;\n if (userProjection) {\n for (let i = 0, ii = loadExtents.length; i < ii; ++i) {\n vectorSource.loadFeatures(\n toUserExtent(loadExtents[i], projection),\n resolution,\n userProjection\n );\n }\n userTransform = getTransformFromProjections(userProjection, projection);\n } else {\n for (let i = 0, ii = loadExtents.length; i < ii; ++i) {\n vectorSource.loadFeatures(loadExtents[i], resolution, projection);\n }\n }\n\n const squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio);\n\n const render =\n /**\n * @param {import(\"../../Feature.js\").default} feature Feature.\n * @this {CanvasVectorLayerRenderer}\n */\n function (feature) {\n let styles;\n const styleFunction =\n feature.getStyleFunction() || vectorLayer.getStyleFunction();\n if (styleFunction) {\n styles = styleFunction(feature, resolution);\n }\n if (styles) {\n const dirty = this.renderFeature(\n feature,\n squaredTolerance,\n styles,\n replayGroup,\n userTransform,\n declutterBuilderGroup\n );\n this.dirty_ = this.dirty_ || dirty;\n }\n }.bind(this);\n\n const userExtent = toUserExtent(extent, projection);\n /** @type {Array<import(\"../../Feature.js\").default>} */\n const features = vectorSource.getFeaturesInExtent(userExtent);\n if (vectorLayerRenderOrder) {\n features.sort(vectorLayerRenderOrder);\n }\n for (let i = 0, ii = features.length; i < ii; ++i) {\n render(features[i]);\n }\n this.renderedFeatures_ = features;\n\n const replayGroupInstructions = replayGroup.finish();\n const executorGroup = new ExecutorGroup(\n extent,\n resolution,\n pixelRatio,\n vectorSource.getOverlaps(),\n replayGroupInstructions,\n vectorLayer.getRenderBuffer()\n );\n\n if (declutterBuilderGroup) {\n this.declutterExecutorGroup = new ExecutorGroup(\n extent,\n resolution,\n pixelRatio,\n vectorSource.getOverlaps(),\n declutterBuilderGroup.finish(),\n vectorLayer.getRenderBuffer()\n );\n }\n\n this.renderedResolution_ = resolution;\n this.renderedRevision_ = vectorLayerRevision;\n this.renderedRenderOrder_ = vectorLayerRenderOrder;\n this.renderedExtent_ = extent;\n this.renderedCenter_ = center;\n this.renderedProjection_ = projection;\n this.replayGroup_ = executorGroup;\n this.hitDetectionImageData_ = null;\n\n this.replayGroupChanged = true;\n return true;\n }\n\n /**\n * @param {import(\"../../Feature.js\").default} feature Feature.\n * @param {number} squaredTolerance Squared render tolerance.\n * @param {import(\"../../style/Style.js\").default|Array<import(\"../../style/Style.js\").default>} styles The style or array of styles.\n * @param {import(\"../../render/canvas/BuilderGroup.js\").default} builderGroup Builder group.\n * @param {import(\"../../proj.js\").TransformFunction=} opt_transform Transform from user to view projection.\n * @param {import(\"../../render/canvas/BuilderGroup.js\").default=} opt_declutterBuilderGroup Builder for decluttering.\n * @return {boolean} `true` if an image is loading.\n */\n renderFeature(\n feature,\n squaredTolerance,\n styles,\n builderGroup,\n opt_transform,\n opt_declutterBuilderGroup\n ) {\n if (!styles) {\n return false;\n }\n let loading = false;\n if (Array.isArray(styles)) {\n for (let i = 0, ii = styles.length; i < ii; ++i) {\n loading =\n renderFeature(\n builderGroup,\n feature,\n styles[i],\n squaredTolerance,\n this.boundHandleStyleImageChange_,\n opt_transform,\n opt_declutterBuilderGroup\n ) || loading;\n }\n } else {\n loading = renderFeature(\n builderGroup,\n feature,\n styles,\n squaredTolerance,\n this.boundHandleStyleImageChange_,\n opt_transform,\n opt_declutterBuilderGroup\n );\n }\n return loading;\n }\n}\n\nexport default CanvasVectorLayerRenderer;\n","/**\n * @module ol/layer/Vector\n */\nimport BaseVectorLayer from './BaseVector.js';\nimport CanvasVectorLayerRenderer from '../renderer/canvas/VectorLayer.js';\n\n/**\n * @classdesc\n * Vector data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @extends {BaseVectorLayer<import(\"../source/Vector.js\").default>}\n * @api\n */\nclass VectorLayer extends BaseVectorLayer {\n /**\n * @param {import(\"./BaseVector.js\").Options=} opt_options Options.\n */\n constructor(opt_options) {\n super(opt_options);\n }\n\n /**\n * Create a renderer for this layer.\n * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n */\n createRenderer() {\n return new CanvasVectorLayerRenderer(this);\n }\n}\n\nexport default VectorLayer;\n","/**\n * @module ol/structs/RBush\n */\nimport RBush_ from 'rbush';\nimport {createOrUpdate, equals} from '../extent.js';\nimport {getUid} from '../util.js';\nimport {isEmpty} from '../obj.js';\n\n/**\n * @typedef {Object} Entry\n * @property {number} minX\n * @property {number} minY\n * @property {number} maxX\n * @property {number} maxY\n * @property {Object} [value]\n */\n\n/**\n * @classdesc\n * Wrapper around the RBush by Vladimir Agafonkin.\n * See https://github.com/mourner/rbush.\n *\n * @template T\n */\nclass RBush {\n /**\n * @param {number=} opt_maxEntries Max entries.\n */\n constructor(opt_maxEntries) {\n /**\n * @private\n */\n this.rbush_ = new RBush_(opt_maxEntries);\n\n /**\n * A mapping between the objects added to this rbush wrapper\n * and the objects that are actually added to the internal rbush.\n * @private\n * @type {Object<string, Entry>}\n */\n this.items_ = {};\n }\n\n /**\n * Insert a value into the RBush.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {T} value Value.\n */\n insert(extent, value) {\n /** @type {Entry} */\n const item = {\n minX: extent[0],\n minY: extent[1],\n maxX: extent[2],\n maxY: extent[3],\n value: value,\n };\n\n this.rbush_.insert(item);\n this.items_[getUid(value)] = item;\n }\n\n /**\n * Bulk-insert values into the RBush.\n * @param {Array<import(\"../extent.js\").Extent>} extents Extents.\n * @param {Array<T>} values Values.\n */\n load(extents, values) {\n const items = new Array(values.length);\n for (let i = 0, l = values.length; i < l; i++) {\n const extent = extents[i];\n const value = values[i];\n\n /** @type {Entry} */\n const item = {\n minX: extent[0],\n minY: extent[1],\n maxX: extent[2],\n maxY: extent[3],\n value: value,\n };\n items[i] = item;\n this.items_[getUid(value)] = item;\n }\n this.rbush_.load(items);\n }\n\n /**\n * Remove a value from the RBush.\n * @param {T} value Value.\n * @return {boolean} Removed.\n */\n remove(value) {\n const uid = getUid(value);\n\n // get the object in which the value was wrapped when adding to the\n // internal rbush. then use that object to do the removal.\n const item = this.items_[uid];\n delete this.items_[uid];\n return this.rbush_.remove(item) !== null;\n }\n\n /**\n * Update the extent of a value in the RBush.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {T} value Value.\n */\n update(extent, value) {\n const item = this.items_[getUid(value)];\n const bbox = [item.minX, item.minY, item.maxX, item.maxY];\n if (!equals(bbox, extent)) {\n this.remove(value);\n this.insert(extent, value);\n }\n }\n\n /**\n * Return all values in the RBush.\n * @return {Array<T>} All.\n */\n getAll() {\n const items = this.rbush_.all();\n return items.map(function (item) {\n return item.value;\n });\n }\n\n /**\n * Return all values in the given extent.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {Array<T>} All in extent.\n */\n getInExtent(extent) {\n /** @type {Entry} */\n const bbox = {\n minX: extent[0],\n minY: extent[1],\n maxX: extent[2],\n maxY: extent[3],\n };\n const items = this.rbush_.search(bbox);\n return items.map(function (item) {\n return item.value;\n });\n }\n\n /**\n * Calls a callback function with each value in the tree.\n * If the callback returns a truthy value, this value is returned without\n * checking the rest of the tree.\n * @param {function(T): *} callback Callback.\n * @return {*} Callback return value.\n */\n forEach(callback) {\n return this.forEach_(this.getAll(), callback);\n }\n\n /**\n * Calls a callback function with each value in the provided extent.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {function(T): *} callback Callback.\n * @return {*} Callback return value.\n */\n forEachInExtent(extent, callback) {\n return this.forEach_(this.getInExtent(extent), callback);\n }\n\n /**\n * @param {Array<T>} values Values.\n * @param {function(T): *} callback Callback.\n * @private\n * @return {*} Callback return value.\n */\n forEach_(values, callback) {\n let result;\n for (let i = 0, l = values.length; i < l; i++) {\n result = callback(values[i]);\n if (result) {\n return result;\n }\n }\n return result;\n }\n\n /**\n * @return {boolean} Is empty.\n */\n isEmpty() {\n return isEmpty(this.items_);\n }\n\n /**\n * Remove all values from the RBush.\n */\n clear() {\n this.rbush_.clear();\n this.items_ = {};\n }\n\n /**\n * @param {import(\"../extent.js\").Extent=} opt_extent Extent.\n * @return {import(\"../extent.js\").Extent} Extent.\n */\n getExtent(opt_extent) {\n const data = this.rbush_.toJSON();\n return createOrUpdate(\n data.minX,\n data.minY,\n data.maxX,\n data.maxY,\n opt_extent\n );\n }\n\n /**\n * @param {RBush} rbush R-Tree.\n */\n concat(rbush) {\n this.rbush_.load(rbush.rbush_.all());\n for (const i in rbush.items_) {\n this.items_[i] = rbush.items_[i];\n }\n }\n}\n\nexport default RBush;\n","/**\n * @module ol/source/Source\n */\nimport BaseObject from '../Object.js';\nimport SourceState from './State.js';\nimport {abstract} from '../util.js';\nimport {get as getProjection} from '../proj.js';\n\n/**\n * A function that returns a string or an array of strings representing source\n * attributions.\n *\n * @typedef {function(import(\"../PluggableMap.js\").FrameState): (string|Array<string>)} Attribution\n */\n\n/**\n * A type that can be used to provide attribution information for data sources.\n *\n * It represents either\n * * a simple string (e.g. `'© Acme Inc.'`)\n * * an array of simple strings (e.g. `['© Acme Inc.', '© Bacme Inc.']`)\n * * a function that returns a string or array of strings ({@link module:ol/source/Source~Attribution})\n *\n * @typedef {string|Array<string>|Attribution} AttributionLike\n */\n\n/**\n * @typedef {Object} Options\n * @property {AttributionLike} [attributions]\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {import(\"./State.js\").default} [state='ready']\n * @property {boolean} [wrapX=false]\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for {@link module:ol/layer/Layer~Layer} sources.\n *\n * A generic `change` event is triggered when the state of the source changes.\n * @abstract\n * @api\n */\nclass Source extends BaseObject {\n /**\n * @param {Options} options Source options.\n */\n constructor(options) {\n super();\n\n /**\n * @private\n * @type {import(\"../proj/Projection.js\").default}\n */\n this.projection_ = getProjection(options.projection);\n\n /**\n * @private\n * @type {?Attribution}\n */\n this.attributions_ = adaptAttributions(options.attributions);\n\n /**\n * @private\n * @type {boolean}\n */\n this.attributionsCollapsible_ =\n options.attributionsCollapsible !== undefined\n ? options.attributionsCollapsible\n : true;\n\n /**\n * This source is currently loading data. Sources that defer loading to the\n * map's tile queue never set this to `true`.\n * @type {boolean}\n */\n this.loading = false;\n\n /**\n * @private\n * @type {import(\"./State.js\").default}\n */\n this.state_ =\n options.state !== undefined ? options.state : SourceState.READY;\n\n /**\n * @private\n * @type {boolean}\n */\n this.wrapX_ = options.wrapX !== undefined ? options.wrapX : false;\n }\n\n /**\n * Get the attribution function for the source.\n * @return {?Attribution} Attribution function.\n */\n getAttributions() {\n return this.attributions_;\n }\n\n /**\n * @return {boolean} Attributions are collapsible.\n */\n getAttributionsCollapsible() {\n return this.attributionsCollapsible_;\n }\n\n /**\n * Get the projection of the source.\n * @return {import(\"../proj/Projection.js\").default} Projection.\n * @api\n */\n getProjection() {\n return this.projection_;\n }\n\n /**\n * @abstract\n * @return {Array<number>|undefined} Resolutions.\n */\n getResolutions() {\n return abstract();\n }\n\n /**\n * Get the state of the source, see {@link module:ol/source/State~State} for possible states.\n * @return {import(\"./State.js\").default} State.\n * @api\n */\n getState() {\n return this.state_;\n }\n\n /**\n * @return {boolean|undefined} Wrap X.\n */\n getWrapX() {\n return this.wrapX_;\n }\n\n /**\n * @return {Object|undefined} Context options.\n */\n getContextOptions() {\n return undefined;\n }\n\n /**\n * Refreshes the source. The source will be cleared, and data from the server will be reloaded.\n * @api\n */\n refresh() {\n this.changed();\n }\n\n /**\n * Set the attributions of the source.\n * @param {AttributionLike|undefined} attributions Attributions.\n * Can be passed as `string`, `Array<string>`, {@link module:ol/source/Source~Attribution},\n * or `undefined`.\n * @api\n */\n setAttributions(attributions) {\n this.attributions_ = adaptAttributions(attributions);\n this.changed();\n }\n\n /**\n * Set the state of the source.\n * @param {import(\"./State.js\").default} state State.\n */\n setState(state) {\n this.state_ = state;\n this.changed();\n }\n}\n\n/**\n * Turns the attributions option into an attributions function.\n * @param {AttributionLike|undefined} attributionLike The attribution option.\n * @return {?Attribution} An attribution function (or null).\n */\nfunction adaptAttributions(attributionLike) {\n if (!attributionLike) {\n return null;\n }\n if (Array.isArray(attributionLike)) {\n return function (frameState) {\n return attributionLike;\n };\n }\n\n if (typeof attributionLike === 'function') {\n return attributionLike;\n }\n\n return function (frameState) {\n return [attributionLike];\n };\n}\n\nexport default Source;\n","/**\n * @module ol/source/VectorEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n /**\n * Triggered when a feature is added to the source.\n * @event module:ol/source/Vector.VectorSourceEvent#addfeature\n * @api\n */\n ADDFEATURE: 'addfeature',\n\n /**\n * Triggered when a feature is updated.\n * @event module:ol/source/Vector.VectorSourceEvent#changefeature\n * @api\n */\n CHANGEFEATURE: 'changefeature',\n\n /**\n * Triggered when the clear method is called on the source.\n * @event module:ol/source/Vector.VectorSourceEvent#clear\n * @api\n */\n CLEAR: 'clear',\n\n /**\n * Triggered when a feature is removed from the source.\n * See {@link module:ol/source/Vector#clear source.clear()} for exceptions.\n * @event module:ol/source/Vector.VectorSourceEvent#removefeature\n * @api\n */\n REMOVEFEATURE: 'removefeature',\n\n /**\n * Triggered when features starts loading.\n * @event module:ol/source/Vector.VectorSourceEvent#featuresloadstart\n * @api\n */\n FEATURESLOADSTART: 'featuresloadstart',\n\n /**\n * Triggered when features finishes loading.\n * @event module:ol/source/Vector.VectorSourceEvent#featuresloadend\n * @api\n */\n FEATURESLOADEND: 'featuresloadend',\n\n /**\n * Triggered if feature loading results in an error.\n * @event module:ol/source/Vector.VectorSourceEvent#featuresloaderror\n * @api\n */\n FEATURESLOADERROR: 'featuresloaderror',\n};\n","/**\n * @module ol/loadingstrategy\n */\n\n/**\n * Strategy function for loading all features with a single request.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array<import(\"./extent.js\").Extent>} Extents.\n * @api\n */\nexport function all(extent, resolution) {\n return [[-Infinity, -Infinity, Infinity, Infinity]];\n}\n\n/**\n * Strategy function for loading features based on the view's extent and\n * resolution.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array<import(\"./extent.js\").Extent>} Extents.\n * @api\n */\nexport function bbox(extent, resolution) {\n return [extent];\n}\n\n/**\n * Creates a strategy function for loading features based on a tile grid.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {function(import(\"./extent.js\").Extent, number): Array<import(\"./extent.js\").Extent>} Loading strategy.\n * @api\n */\nexport function tile(tileGrid) {\n return (\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array<import(\"./extent.js\").Extent>} Extents.\n */\n function (extent, resolution) {\n const z = tileGrid.getZForResolution(resolution);\n const tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n /** @type {Array<import(\"./extent.js\").Extent>} */\n const extents = [];\n /** @type {import(\"./tilecoord.js\").TileCoord} */\n const tileCoord = [z, 0, 0];\n for (\n tileCoord[1] = tileRange.minX;\n tileCoord[1] <= tileRange.maxX;\n ++tileCoord[1]\n ) {\n for (\n tileCoord[2] = tileRange.minY;\n tileCoord[2] <= tileRange.maxY;\n ++tileCoord[2]\n ) {\n extents.push(tileGrid.getTileCoordExtent(tileCoord));\n }\n }\n return extents;\n }\n );\n}\n","/**\n * @module ol/format/FormatType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n ARRAY_BUFFER: 'arraybuffer',\n JSON: 'json',\n TEXT: 'text',\n XML: 'xml',\n};\n","/**\n * @module ol/featureloader\n */\nimport FormatType from './format/FormatType.js';\nimport {VOID} from './functions.js';\n\n/**\n *\n * @type {boolean}\n * @private\n */\nlet withCredentials = false;\n\n/**\n * {@link module:ol/source/Vector} sources use a function of this type to\n * load features.\n *\n * This function takes an {@link module:ol/extent~Extent} representing the area to be loaded,\n * a `{number}` representing the resolution (map units per pixel), an\n * {@link module:ol/proj/Projection} for the projection and success and failure callbacks as\n * arguments. `this` within the function is bound to the\n * {@link module:ol/source/Vector} it's called from.\n *\n * The function is responsible for loading the features and adding them to the\n * source.\n * @typedef {function(this:(import(\"./source/Vector\").default|import(\"./VectorTile.js\").default),\n * import(\"./extent.js\").Extent,\n * number,\n * import(\"./proj/Projection.js\").default,\n * function(Array<import(\"./Feature.js\").default>): void=,\n * function(): void=): void} FeatureLoader\n * @api\n */\n\n/**\n * {@link module:ol/source/Vector} sources use a function of this type to\n * get the url to load features from.\n *\n * This function takes an {@link module:ol/extent~Extent} representing the area\n * to be loaded, a `{number}` representing the resolution (map units per pixel)\n * and an {@link module:ol/proj/Projection} for the projection as\n * arguments and returns a `{string}` representing the URL.\n * @typedef {function(import(\"./extent.js\").Extent, number, import(\"./proj/Projection.js\").default): string} FeatureUrlFunction\n * @api\n */\n\n/**\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {function(Array<import(\"./Feature.js\").default>, import(\"./proj/Projection.js\").default): void} success Success\n * Function called with the loaded features and optionally with the data projection.\n * @param {function(): void} failure Failure\n * Function called when loading failed.\n */\nexport function loadFeaturesXhr(\n url,\n format,\n extent,\n resolution,\n projection,\n success,\n failure\n) {\n const xhr = new XMLHttpRequest();\n xhr.open(\n 'GET',\n typeof url === 'function' ? url(extent, resolution, projection) : url,\n true\n );\n if (format.getType() == FormatType.ARRAY_BUFFER) {\n xhr.responseType = 'arraybuffer';\n }\n xhr.withCredentials = withCredentials;\n /**\n * @param {Event} event Event.\n * @private\n */\n xhr.onload = function (event) {\n // status will be 0 for file:// urls\n if (!xhr.status || (xhr.status >= 200 && xhr.status < 300)) {\n const type = format.getType();\n /** @type {Document|Node|Object|string|undefined} */\n let source;\n if (type == FormatType.JSON || type == FormatType.TEXT) {\n source = xhr.responseText;\n } else if (type == FormatType.XML) {\n source = xhr.responseXML;\n if (!source) {\n source = new DOMParser().parseFromString(\n xhr.responseText,\n 'application/xml'\n );\n }\n } else if (type == FormatType.ARRAY_BUFFER) {\n source = /** @type {ArrayBuffer} */ (xhr.response);\n }\n if (source) {\n success(\n /** @type {Array<import(\"./Feature.js\").default>} */\n (format.readFeatures(source, {\n extent: extent,\n featureProjection: projection,\n })),\n format.readProjection(source)\n );\n } else {\n failure();\n }\n } else {\n failure();\n }\n };\n /**\n * @private\n */\n xhr.onerror = failure;\n xhr.send();\n}\n\n/**\n * Create an XHR feature loader for a `url` and `format`. The feature loader\n * loads features (with XHR), parses the features, and adds them to the\n * vector source.\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @return {FeatureLoader} The feature loader.\n * @api\n */\nexport function xhr(url, format) {\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {function(): void=} success Success\n * Function called when loading succeeded.\n * @param {function(): void=} failure Failure\n * Function called when loading failed.\n * @this {import(\"./source/Vector\").default}\n */\n return function (extent, resolution, projection, success, failure) {\n const source = /** @type {import(\"./source/Vector\").default} */ (this);\n loadFeaturesXhr(\n url,\n format,\n extent,\n resolution,\n projection,\n /**\n * @param {Array<import(\"./Feature.js\").default>} features The loaded features.\n * @param {import(\"./proj/Projection.js\").default} dataProjection Data\n * projection.\n */\n function (features, dataProjection) {\n if (success !== undefined) {\n success(features);\n }\n source.addFeatures(features);\n },\n /* FIXME handle error */ failure ? failure : VOID\n );\n };\n}\n\n/**\n * Setter for the withCredentials configuration for the XHR.\n *\n * @param {boolean} xhrWithCredentials The value of withCredentials to set.\n * Compare https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/\n * @api\n */\nexport function setWithCredentials(xhrWithCredentials) {\n withCredentials = xhrWithCredentials;\n}\n","/**\n * @module ol/source/Vector\n */\n\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport RBush from '../structs/RBush.js';\nimport Source from './Source.js';\nimport SourceState from './State.js';\nimport VectorEventType from './VectorEventType.js';\nimport {TRUE, VOID} from '../functions.js';\nimport {all as allStrategy} from '../loadingstrategy.js';\nimport {assert} from '../asserts.js';\nimport {containsExtent, equals} from '../extent.js';\nimport {extend} from '../array.js';\nimport {getUid} from '../util.js';\nimport {getValues, isEmpty} from '../obj.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport {xhr} from '../featureloader.js';\n\n/**\n * A function that takes an {@link module:ol/extent~Extent} and a resolution as arguments, and\n * returns an array of {@link module:ol/extent~Extent} with the extents to load. Usually this\n * is one of the standard {@link module:ol/loadingstrategy} strategies.\n *\n * @typedef {function(import(\"../extent.js\").Extent, number): Array<import(\"../extent.js\").Extent>} LoadingStrategy\n * @api\n */\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Vector} instances are instances of this\n * type.\n * @template {import(\"../geom/Geometry.js\").default} Geometry\n */\nexport class VectorSourceEvent extends Event {\n /**\n * @param {string} type Type.\n * @param {import(\"../Feature.js\").default<Geometry>=} opt_feature Feature.\n * @param {Array<import(\"../Feature.js\").default<Geometry>>=} opt_features Features.\n */\n constructor(type, opt_feature, opt_features) {\n super(type);\n\n /**\n * The added or removed feature for the `ADDFEATURE` and `REMOVEFEATURE` events, `undefined` otherwise.\n * @type {import(\"../Feature.js\").default<Geometry>|undefined}\n * @api\n */\n this.feature = opt_feature;\n\n /**\n * The loaded features for the `FEATURESLOADED` event, `undefined` otherwise.\n * @type {Array<import(\"../Feature.js\").default<Geometry>>|undefined}\n * @api\n */\n this.features = opt_features;\n }\n}\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {Array<import(\"../Feature.js\").default>|Collection<import(\"../Feature.js\").default>} [features]\n * Features. If provided as {@link module:ol/Collection}, the features in the source\n * and the collection will stay in sync.\n * @property {import(\"../format/Feature.js\").default} [format] The feature format used by the XHR\n * feature loader when `url` is set. Required if `url` is set, otherwise ignored.\n * @property {import(\"../featureloader.js\").FeatureLoader} [loader]\n * The loader function used to load features, from a remote source for example.\n * If this is not set and `url` is set, the source will create and use an XHR\n * feature loader.\n *\n * Example:\n *\n * ```js\n * import {Vector} from 'ol/source';\n * import {GeoJSON} from 'ol/format';\n * import {bbox} from 'ol/loadingstrategy';\n *\n * var vectorSource = new Vector({\n * format: new GeoJSON(),\n * loader: function(extent, resolution, projection) {\n * var proj = projection.getCode();\n * var url = 'https://ahocevar.com/geoserver/wfs?service=WFS&' +\n * 'version=1.1.0&request=GetFeature&typename=osm:water_areas&' +\n * 'outputFormat=application/json&srsname=' + proj + '&' +\n * 'bbox=' + extent.join(',') + ',' + proj;\n * var xhr = new XMLHttpRequest();\n * xhr.open('GET', url);\n * var onError = function() {\n * vectorSource.removeLoadedExtent(extent);\n * }\n * xhr.onerror = onError;\n * xhr.onload = function() {\n * if (xhr.status == 200) {\n * vectorSource.addFeatures(\n * vectorSource.getFormat().readFeatures(xhr.responseText));\n * } else {\n * onError();\n * }\n * }\n * xhr.send();\n * },\n * strategy: bbox\n * });\n * ```\n * @property {boolean} [overlaps=true] This source may have overlapping geometries.\n * Setting this to `false` (e.g. for sources with polygons that represent administrative\n * boundaries or TopoJSON sources) allows the renderer to optimise fill and\n * stroke operations.\n * @property {LoadingStrategy} [strategy] The loading strategy to use.\n * By default an {@link module:ol/loadingstrategy~all}\n * strategy is used, a one-off strategy which loads all features at once.\n * @property {string|import(\"../featureloader.js\").FeatureUrlFunction} [url]\n * Setting this option instructs the source to load features using an XHR loader\n * (see {@link module:ol/featureloader~xhr}). Use a `string` and an\n * {@link module:ol/loadingstrategy~all} for a one-off download of all features from\n * the given URL. Use a {@link module:ol/featureloader~FeatureUrlFunction} to generate the url with\n * other loading strategies.\n * Requires `format` to be set as well.\n * When default XHR feature loader is provided, the features will\n * be transformed from the data projection to the view projection\n * during parsing. If your remote data source does not advertise its projection\n * properly, this transformation will be incorrect. For some formats, the\n * default projection (usually EPSG:4326) can be overridden by setting the\n * dataProjection constructor option on the format.\n * Note that if a source contains non-feature data, such as a GeoJSON geometry\n * or a KML NetworkLink, these will be ignored. Use a custom loader to load these.\n * @property {boolean} [useSpatialIndex=true]\n * By default, an RTree is used as spatial index. When features are removed and\n * added frequently, and the total number of features is low, setting this to\n * `false` may improve performance.\n *\n * Note that\n * {@link module:ol/source/Vector~VectorSource#getFeaturesInExtent},\n * {@link module:ol/source/Vector~VectorSource#getClosestFeatureToCoordinate} and\n * {@link module:ol/source/Vector~VectorSource#getExtent} cannot be used when `useSpatialIndex` is\n * set to `false`, and {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent} will loop\n * through all features.\n *\n * When set to `false`, the features will be maintained in an\n * {@link module:ol/Collection}, which can be retrieved through\n * {@link module:ol/source/Vector~VectorSource#getFeaturesCollection}.\n * @property {boolean} [wrapX=true] Wrap the world horizontally. For vector editing across the\n * -180° and 180° meridians to work properly, this should be set to `false`. The\n * resulting geometry coordinates will then exceed the world bounds.\n */\n\n/**\n * @classdesc\n * Provides a source of features for vector layers. Vector features provided\n * by this source are suitable for editing. See {@link module:ol/source/VectorTile~VectorTile} for\n * vector data that is optimized for rendering.\n *\n * @fires VectorSourceEvent\n * @api\n * @template {import(\"../geom/Geometry.js\").default} Geometry\n */\nclass VectorSource extends Source {\n /**\n * @param {Options=} opt_options Vector source options.\n */\n constructor(opt_options) {\n const options = opt_options || {};\n\n super({\n attributions: options.attributions,\n projection: undefined,\n state: SourceState.READY,\n wrapX: options.wrapX !== undefined ? options.wrapX : true,\n });\n\n /**\n * @private\n * @type {import(\"../featureloader.js\").FeatureLoader}\n */\n this.loader_ = VOID;\n\n /**\n * @private\n * @type {import(\"../format/Feature.js\").default|undefined}\n */\n this.format_ = options.format;\n\n /**\n * @private\n * @type {boolean}\n */\n this.overlaps_ = options.overlaps === undefined ? true : options.overlaps;\n\n /**\n * @private\n * @type {string|import(\"../featureloader.js\").FeatureUrlFunction|undefined}\n */\n this.url_ = options.url;\n\n if (options.loader !== undefined) {\n this.loader_ = options.loader;\n } else if (this.url_ !== undefined) {\n assert(this.format_, 7); // `format` must be set when `url` is set\n // create a XHR feature loader for \"url\" and \"format\"\n this.loader_ = xhr(\n this.url_,\n /** @type {import(\"../format/Feature.js\").default} */ (this.format_)\n );\n }\n\n /**\n * @private\n * @type {LoadingStrategy}\n */\n this.strategy_ =\n options.strategy !== undefined ? options.strategy : allStrategy;\n\n const useSpatialIndex =\n options.useSpatialIndex !== undefined ? options.useSpatialIndex : true;\n\n /**\n * @private\n * @type {RBush<import(\"../Feature.js\").default<Geometry>>}\n */\n this.featuresRtree_ = useSpatialIndex ? new RBush() : null;\n\n /**\n * @private\n * @type {RBush<{extent: import(\"../extent.js\").Extent}>}\n */\n this.loadedExtentsRtree_ = new RBush();\n\n /**\n * @private\n * @type {!Object<string, import(\"../Feature.js\").default<Geometry>>}\n */\n this.nullGeometryFeatures_ = {};\n\n /**\n * A lookup of features by id (the return from feature.getId()).\n * @private\n * @type {!Object<string, import(\"../Feature.js\").default<Geometry>>}\n */\n this.idIndex_ = {};\n\n /**\n * A lookup of features by uid (using getUid(feature)).\n * @private\n * @type {!Object<string, import(\"../Feature.js\").default<Geometry>>}\n */\n this.uidIndex_ = {};\n\n /**\n * @private\n * @type {Object<string, Array<import(\"../events.js\").EventsKey>>}\n */\n this.featureChangeKeys_ = {};\n\n /**\n * @private\n * @type {Collection<import(\"../Feature.js\").default<Geometry>>}\n */\n this.featuresCollection_ = null;\n\n let collection, features;\n if (Array.isArray(options.features)) {\n features = options.features;\n } else if (options.features) {\n collection = options.features;\n features = collection.getArray();\n }\n if (!useSpatialIndex && collection === undefined) {\n collection = new Collection(features);\n }\n if (features !== undefined) {\n this.addFeaturesInternal(features);\n }\n if (collection !== undefined) {\n this.bindFeaturesCollection_(collection);\n }\n }\n\n /**\n * Add a single feature to the source. If you want to add a batch of features\n * at once, call {@link module:ol/source/Vector~VectorSource#addFeatures #addFeatures()}\n * instead. A feature will not be added to the source if feature with\n * the same id is already there. The reason for this behavior is to avoid\n * feature duplication when using bbox or tile loading strategies.\n * Note: this also applies if an {@link module:ol/Collection} is used for features,\n * meaning that if a feature with a duplicate id is added in the collection, it will\n * be removed from it right away.\n * @param {import(\"../Feature.js\").default<Geometry>} feature Feature to add.\n * @api\n */\n addFeature(feature) {\n this.addFeatureInternal(feature);\n this.changed();\n }\n\n /**\n * Add a feature without firing a `change` event.\n * @param {import(\"../Feature.js\").default<Geometry>} feature Feature.\n * @protected\n */\n addFeatureInternal(feature) {\n const featureKey = getUid(feature);\n\n if (!this.addToIndex_(featureKey, feature)) {\n if (this.featuresCollection_) {\n this.featuresCollection_.remove(feature);\n }\n return;\n }\n\n this.setupChangeEvents_(featureKey, feature);\n\n const geometry = feature.getGeometry();\n if (geometry) {\n const extent = geometry.getExtent();\n if (this.featuresRtree_) {\n this.featuresRtree_.insert(extent, feature);\n }\n } else {\n this.nullGeometryFeatures_[featureKey] = feature;\n }\n\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.ADDFEATURE, feature)\n );\n }\n\n /**\n * @param {string} featureKey Unique identifier for the feature.\n * @param {import(\"../Feature.js\").default<Geometry>} feature The feature.\n * @private\n */\n setupChangeEvents_(featureKey, feature) {\n this.featureChangeKeys_[featureKey] = [\n listen(feature, EventType.CHANGE, this.handleFeatureChange_, this),\n listen(\n feature,\n ObjectEventType.PROPERTYCHANGE,\n this.handleFeatureChange_,\n this\n ),\n ];\n }\n\n /**\n * @param {string} featureKey Unique identifier for the feature.\n * @param {import(\"../Feature.js\").default<Geometry>} feature The feature.\n * @return {boolean} The feature is \"valid\", in the sense that it is also a\n * candidate for insertion into the Rtree.\n * @private\n */\n addToIndex_(featureKey, feature) {\n let valid = true;\n const id = feature.getId();\n if (id !== undefined) {\n if (!(id.toString() in this.idIndex_)) {\n this.idIndex_[id.toString()] = feature;\n } else {\n valid = false;\n }\n }\n if (valid) {\n assert(!(featureKey in this.uidIndex_), 30); // The passed `feature` was already added to the source\n this.uidIndex_[featureKey] = feature;\n }\n return valid;\n }\n\n /**\n * Add a batch of features to the source.\n * @param {Array<import(\"../Feature.js\").default<Geometry>>} features Features to add.\n * @api\n */\n addFeatures(features) {\n this.addFeaturesInternal(features);\n this.changed();\n }\n\n /**\n * Add features without firing a `change` event.\n * @param {Array<import(\"../Feature.js\").default<Geometry>>} features Features.\n * @protected\n */\n addFeaturesInternal(features) {\n const extents = [];\n const newFeatures = [];\n const geometryFeatures = [];\n\n for (let i = 0, length = features.length; i < length; i++) {\n const feature = features[i];\n const featureKey = getUid(feature);\n if (this.addToIndex_(featureKey, feature)) {\n newFeatures.push(feature);\n }\n }\n\n for (let i = 0, length = newFeatures.length; i < length; i++) {\n const feature = newFeatures[i];\n const featureKey = getUid(feature);\n this.setupChangeEvents_(featureKey, feature);\n\n const geometry = feature.getGeometry();\n if (geometry) {\n const extent = geometry.getExtent();\n extents.push(extent);\n geometryFeatures.push(feature);\n } else {\n this.nullGeometryFeatures_[featureKey] = feature;\n }\n }\n if (this.featuresRtree_) {\n this.featuresRtree_.load(extents, geometryFeatures);\n }\n\n for (let i = 0, length = newFeatures.length; i < length; i++) {\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.ADDFEATURE, newFeatures[i])\n );\n }\n }\n\n /**\n * @param {!Collection<import(\"../Feature.js\").default<Geometry>>} collection Collection.\n * @private\n */\n bindFeaturesCollection_(collection) {\n let modifyingCollection = false;\n this.addEventListener(\n VectorEventType.ADDFEATURE,\n /**\n * @param {VectorSourceEvent<Geometry>} evt The vector source event\n */\n function (evt) {\n if (!modifyingCollection) {\n modifyingCollection = true;\n collection.push(evt.feature);\n modifyingCollection = false;\n }\n }\n );\n this.addEventListener(\n VectorEventType.REMOVEFEATURE,\n /**\n * @param {VectorSourceEvent<Geometry>} evt The vector source event\n */\n function (evt) {\n if (!modifyingCollection) {\n modifyingCollection = true;\n collection.remove(evt.feature);\n modifyingCollection = false;\n }\n }\n );\n collection.addEventListener(\n CollectionEventType.ADD,\n /**\n * @param {import(\"../Collection.js\").CollectionEvent} evt The collection event\n */\n function (evt) {\n if (!modifyingCollection) {\n modifyingCollection = true;\n this.addFeature(\n /** @type {import(\"../Feature.js\").default<Geometry>} */ (evt.element)\n );\n modifyingCollection = false;\n }\n }.bind(this)\n );\n collection.addEventListener(\n CollectionEventType.REMOVE,\n /**\n * @param {import(\"../Collection.js\").CollectionEvent} evt The collection event\n */\n function (evt) {\n if (!modifyingCollection) {\n modifyingCollection = true;\n this.removeFeature(\n /** @type {import(\"../Feature.js\").default<Geometry>} */ (evt.element)\n );\n modifyingCollection = false;\n }\n }.bind(this)\n );\n this.featuresCollection_ = collection;\n }\n\n /**\n * Remove all features from the source.\n * @param {boolean=} opt_fast Skip dispatching of {@link module:ol/source/Vector.VectorSourceEvent#removefeature} events.\n * @api\n */\n clear(opt_fast) {\n if (opt_fast) {\n for (const featureId in this.featureChangeKeys_) {\n const keys = this.featureChangeKeys_[featureId];\n keys.forEach(unlistenByKey);\n }\n if (!this.featuresCollection_) {\n this.featureChangeKeys_ = {};\n this.idIndex_ = {};\n this.uidIndex_ = {};\n }\n } else {\n if (this.featuresRtree_) {\n this.featuresRtree_.forEach(this.removeFeatureInternal.bind(this));\n for (const id in this.nullGeometryFeatures_) {\n this.removeFeatureInternal(this.nullGeometryFeatures_[id]);\n }\n }\n }\n if (this.featuresCollection_) {\n this.featuresCollection_.clear();\n }\n\n if (this.featuresRtree_) {\n this.featuresRtree_.clear();\n }\n this.nullGeometryFeatures_ = {};\n\n const clearEvent = new VectorSourceEvent(VectorEventType.CLEAR);\n this.dispatchEvent(clearEvent);\n this.changed();\n }\n\n /**\n * Iterate through all features on the source, calling the provided callback\n * with each one. If the callback returns any \"truthy\" value, iteration will\n * stop and the function will return the same value.\n * Note: this function only iterate through the feature that have a defined geometry.\n *\n * @param {function(import(\"../Feature.js\").default<Geometry>): T} callback Called with each feature\n * on the source. Return a truthy value to stop iteration.\n * @return {T|undefined} The return value from the last call to the callback.\n * @template T\n * @api\n */\n forEachFeature(callback) {\n if (this.featuresRtree_) {\n return this.featuresRtree_.forEach(callback);\n } else if (this.featuresCollection_) {\n this.featuresCollection_.forEach(callback);\n }\n }\n\n /**\n * Iterate through all features whose geometries contain the provided\n * coordinate, calling the callback with each feature. If the callback returns\n * a \"truthy\" value, iteration will stop and the function will return the same\n * value.\n *\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {function(import(\"../Feature.js\").default<Geometry>): T} callback Called with each feature\n * whose goemetry contains the provided coordinate.\n * @return {T|undefined} The return value from the last call to the callback.\n * @template T\n */\n forEachFeatureAtCoordinateDirect(coordinate, callback) {\n const extent = [coordinate[0], coordinate[1], coordinate[0], coordinate[1]];\n return this.forEachFeatureInExtent(extent, function (feature) {\n const geometry = feature.getGeometry();\n if (geometry.intersectsCoordinate(coordinate)) {\n return callback(feature);\n } else {\n return undefined;\n }\n });\n }\n\n /**\n * Iterate through all features whose bounding box intersects the provided\n * extent (note that the feature's geometry may not intersect the extent),\n * calling the callback with each feature. If the callback returns a \"truthy\"\n * value, iteration will stop and the function will return the same value.\n *\n * If you are interested in features whose geometry intersects an extent, call\n * the {@link module:ol/source/Vector~VectorSource#forEachFeatureIntersectingExtent #forEachFeatureIntersectingExtent()} method instead.\n *\n * When `useSpatialIndex` is set to false, this method will loop through all\n * features, equivalent to {@link module:ol/source/Vector~VectorSource#forEachFeature #forEachFeature()}.\n *\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {function(import(\"../Feature.js\").default<Geometry>): T} callback Called with each feature\n * whose bounding box intersects the provided extent.\n * @return {T|undefined} The return value from the last call to the callback.\n * @template T\n * @api\n */\n forEachFeatureInExtent(extent, callback) {\n if (this.featuresRtree_) {\n return this.featuresRtree_.forEachInExtent(extent, callback);\n } else if (this.featuresCollection_) {\n this.featuresCollection_.forEach(callback);\n }\n }\n\n /**\n * Iterate through all features whose geometry intersects the provided extent,\n * calling the callback with each feature. If the callback returns a \"truthy\"\n * value, iteration will stop and the function will return the same value.\n *\n * If you only want to test for bounding box intersection, call the\n * {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent #forEachFeatureInExtent()} method instead.\n *\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {function(import(\"../Feature.js\").default<Geometry>): T} callback Called with each feature\n * whose geometry intersects the provided extent.\n * @return {T|undefined} The return value from the last call to the callback.\n * @template T\n * @api\n */\n forEachFeatureIntersectingExtent(extent, callback) {\n return this.forEachFeatureInExtent(\n extent,\n /**\n * @param {import(\"../Feature.js\").default<Geometry>} feature Feature.\n * @return {T|undefined} The return value from the last call to the callback.\n */\n function (feature) {\n const geometry = feature.getGeometry();\n if (geometry.intersectsExtent(extent)) {\n const result = callback(feature);\n if (result) {\n return result;\n }\n }\n }\n );\n }\n\n /**\n * Get the features collection associated with this source. Will be `null`\n * unless the source was configured with `useSpatialIndex` set to `false`, or\n * with an {@link module:ol/Collection} as `features`.\n * @return {Collection<import(\"../Feature.js\").default<Geometry>>} The collection of features.\n * @api\n */\n getFeaturesCollection() {\n return this.featuresCollection_;\n }\n\n /**\n * Get all features on the source in random order.\n * @return {Array<import(\"../Feature.js\").default<Geometry>>} Features.\n * @api\n */\n getFeatures() {\n let features;\n if (this.featuresCollection_) {\n features = this.featuresCollection_.getArray();\n } else if (this.featuresRtree_) {\n features = this.featuresRtree_.getAll();\n if (!isEmpty(this.nullGeometryFeatures_)) {\n extend(features, getValues(this.nullGeometryFeatures_));\n }\n }\n return /** @type {Array<import(\"../Feature.js\").default<Geometry>>} */ (features);\n }\n\n /**\n * Get all features whose geometry intersects the provided coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {Array<import(\"../Feature.js\").default<Geometry>>} Features.\n * @api\n */\n getFeaturesAtCoordinate(coordinate) {\n const features = [];\n this.forEachFeatureAtCoordinateDirect(coordinate, function (feature) {\n features.push(feature);\n });\n return features;\n }\n\n /**\n * Get all features whose bounding box intersects the provided extent. Note that this returns an array of\n * all features intersecting the given extent in random order (so it may include\n * features whose geometries do not intersect the extent).\n *\n * When `useSpatialIndex` is set to false, this method will return all\n * features.\n *\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {Array<import(\"../Feature.js\").default<Geometry>>} Features.\n * @api\n */\n getFeaturesInExtent(extent) {\n if (this.featuresRtree_) {\n return this.featuresRtree_.getInExtent(extent);\n } else if (this.featuresCollection_) {\n return this.featuresCollection_.getArray();\n } else {\n return [];\n }\n }\n\n /**\n * Get the closest feature to the provided coordinate.\n *\n * This method is not available when the source is configured with\n * `useSpatialIndex` set to `false`.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {function(import(\"../Feature.js\").default<Geometry>):boolean=} opt_filter Feature filter function.\n * The filter function will receive one argument, the {@link module:ol/Feature feature}\n * and it should return a boolean value. By default, no filtering is made.\n * @return {import(\"../Feature.js\").default<Geometry>} Closest feature.\n * @api\n */\n getClosestFeatureToCoordinate(coordinate, opt_filter) {\n // Find the closest feature using branch and bound. We start searching an\n // infinite extent, and find the distance from the first feature found. This\n // becomes the closest feature. We then compute a smaller extent which any\n // closer feature must intersect. We continue searching with this smaller\n // extent, trying to find a closer feature. Every time we find a closer\n // feature, we update the extent being searched so that any even closer\n // feature must intersect it. We continue until we run out of features.\n const x = coordinate[0];\n const y = coordinate[1];\n let closestFeature = null;\n const closestPoint = [NaN, NaN];\n let minSquaredDistance = Infinity;\n const extent = [-Infinity, -Infinity, Infinity, Infinity];\n const filter = opt_filter ? opt_filter : TRUE;\n this.featuresRtree_.forEachInExtent(\n extent,\n /**\n * @param {import(\"../Feature.js\").default<Geometry>} feature Feature.\n */\n function (feature) {\n if (filter(feature)) {\n const geometry = feature.getGeometry();\n const previousMinSquaredDistance = minSquaredDistance;\n minSquaredDistance = geometry.closestPointXY(\n x,\n y,\n closestPoint,\n minSquaredDistance\n );\n if (minSquaredDistance < previousMinSquaredDistance) {\n closestFeature = feature;\n // This is sneaky. Reduce the extent that it is currently being\n // searched while the R-Tree traversal using this same extent object\n // is still in progress. This is safe because the new extent is\n // strictly contained by the old extent.\n const minDistance = Math.sqrt(minSquaredDistance);\n extent[0] = x - minDistance;\n extent[1] = y - minDistance;\n extent[2] = x + minDistance;\n extent[3] = y + minDistance;\n }\n }\n }\n );\n return closestFeature;\n }\n\n /**\n * Get the extent of the features currently in the source.\n *\n * This method is not available when the source is configured with\n * `useSpatialIndex` set to `false`.\n * @param {import(\"../extent.js\").Extent=} opt_extent Destination extent. If provided, no new extent\n * will be created. Instead, that extent's coordinates will be overwritten.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\n getExtent(opt_extent) {\n return this.featuresRtree_.getExtent(opt_extent);\n }\n\n /**\n * Get a feature by its identifier (the value returned by feature.getId()).\n * Note that the index treats string and numeric identifiers as the same. So\n * `source.getFeatureById(2)` will return a feature with id `'2'` or `2`.\n *\n * @param {string|number} id Feature identifier.\n * @return {import(\"../Feature.js\").default<Geometry>} The feature (or `null` if not found).\n * @api\n */\n getFeatureById(id) {\n const feature = this.idIndex_[id.toString()];\n return feature !== undefined ? feature : null;\n }\n\n /**\n * Get a feature by its internal unique identifier (using `getUid`).\n *\n * @param {string} uid Feature identifier.\n * @return {import(\"../Feature.js\").default<Geometry>} The feature (or `null` if not found).\n */\n getFeatureByUid(uid) {\n const feature = this.uidIndex_[uid];\n return feature !== undefined ? feature : null;\n }\n\n /**\n * Get the format associated with this source.\n *\n * @return {import(\"../format/Feature.js\").default|undefined} The feature format.\n * @api\n */\n getFormat() {\n return this.format_;\n }\n\n /**\n * @return {boolean} The source can have overlapping geometries.\n */\n getOverlaps() {\n return this.overlaps_;\n }\n\n /**\n * Get the url associated with this source.\n *\n * @return {string|import(\"../featureloader.js\").FeatureUrlFunction|undefined} The url.\n * @api\n */\n getUrl() {\n return this.url_;\n }\n\n /**\n * @param {Event} event Event.\n * @private\n */\n handleFeatureChange_(event) {\n const feature = /** @type {import(\"../Feature.js\").default<Geometry>} */ (event.target);\n const featureKey = getUid(feature);\n const geometry = feature.getGeometry();\n if (!geometry) {\n if (!(featureKey in this.nullGeometryFeatures_)) {\n if (this.featuresRtree_) {\n this.featuresRtree_.remove(feature);\n }\n this.nullGeometryFeatures_[featureKey] = feature;\n }\n } else {\n const extent = geometry.getExtent();\n if (featureKey in this.nullGeometryFeatures_) {\n delete this.nullGeometryFeatures_[featureKey];\n if (this.featuresRtree_) {\n this.featuresRtree_.insert(extent, feature);\n }\n } else {\n if (this.featuresRtree_) {\n this.featuresRtree_.update(extent, feature);\n }\n }\n }\n const id = feature.getId();\n if (id !== undefined) {\n const sid = id.toString();\n if (this.idIndex_[sid] !== feature) {\n this.removeFromIdIndex_(feature);\n this.idIndex_[sid] = feature;\n }\n } else {\n this.removeFromIdIndex_(feature);\n this.uidIndex_[featureKey] = feature;\n }\n this.changed();\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.CHANGEFEATURE, feature)\n );\n }\n\n /**\n * Returns true if the feature is contained within the source.\n * @param {import(\"../Feature.js\").default<Geometry>} feature Feature.\n * @return {boolean} Has feature.\n * @api\n */\n hasFeature(feature) {\n const id = feature.getId();\n if (id !== undefined) {\n return id in this.idIndex_;\n } else {\n return getUid(feature) in this.uidIndex_;\n }\n }\n\n /**\n * @return {boolean} Is empty.\n */\n isEmpty() {\n return this.featuresRtree_.isEmpty() && isEmpty(this.nullGeometryFeatures_);\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n */\n loadFeatures(extent, resolution, projection) {\n const loadedExtentsRtree = this.loadedExtentsRtree_;\n const extentsToLoad = this.strategy_(extent, resolution);\n this.loading = false;\n for (let i = 0, ii = extentsToLoad.length; i < ii; ++i) {\n const extentToLoad = extentsToLoad[i];\n const alreadyLoaded = loadedExtentsRtree.forEachInExtent(\n extentToLoad,\n /**\n * @param {{extent: import(\"../extent.js\").Extent}} object Object.\n * @return {boolean} Contains.\n */\n function (object) {\n return containsExtent(object.extent, extentToLoad);\n }\n );\n if (!alreadyLoaded) {\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.FEATURESLOADSTART)\n );\n this.loader_.call(\n this,\n extentToLoad,\n resolution,\n projection,\n function (features) {\n this.dispatchEvent(\n new VectorSourceEvent(\n VectorEventType.FEATURESLOADEND,\n undefined,\n features\n )\n );\n }.bind(this),\n function () {\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.FEATURESLOADERROR)\n );\n }.bind(this)\n );\n loadedExtentsRtree.insert(extentToLoad, {extent: extentToLoad.slice()});\n this.loading = this.loader_ !== VOID;\n }\n }\n }\n\n refresh() {\n this.clear(true);\n this.loadedExtentsRtree_.clear();\n super.refresh();\n }\n\n /**\n * Remove an extent from the list of loaded extents.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @api\n */\n removeLoadedExtent(extent) {\n const loadedExtentsRtree = this.loadedExtentsRtree_;\n let obj;\n loadedExtentsRtree.forEachInExtent(extent, function (object) {\n if (equals(object.extent, extent)) {\n obj = object;\n return true;\n }\n });\n if (obj) {\n loadedExtentsRtree.remove(obj);\n }\n }\n\n /**\n * Remove a single feature from the source. If you want to remove all features\n * at once, use the {@link module:ol/source/Vector~VectorSource#clear #clear()} method\n * instead.\n * @param {import(\"../Feature.js\").default<Geometry>} feature Feature to remove.\n * @api\n */\n removeFeature(feature) {\n const featureKey = getUid(feature);\n if (featureKey in this.nullGeometryFeatures_) {\n delete this.nullGeometryFeatures_[featureKey];\n } else {\n if (this.featuresRtree_) {\n this.featuresRtree_.remove(feature);\n }\n }\n this.removeFeatureInternal(feature);\n this.changed();\n }\n\n /**\n * Remove feature without firing a `change` event.\n * @param {import(\"../Feature.js\").default<Geometry>} feature Feature.\n * @protected\n */\n removeFeatureInternal(feature) {\n const featureKey = getUid(feature);\n this.featureChangeKeys_[featureKey].forEach(unlistenByKey);\n delete this.featureChangeKeys_[featureKey];\n const id = feature.getId();\n if (id !== undefined) {\n delete this.idIndex_[id.toString()];\n }\n delete this.uidIndex_[featureKey];\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.REMOVEFEATURE, feature)\n );\n }\n\n /**\n * Remove a feature from the id index. Called internally when the feature id\n * may have changed.\n * @param {import(\"../Feature.js\").default<Geometry>} feature The feature.\n * @return {boolean} Removed the feature from the index.\n * @private\n */\n removeFromIdIndex_(feature) {\n let removed = false;\n for (const id in this.idIndex_) {\n if (this.idIndex_[id] === feature) {\n delete this.idIndex_[id];\n removed = true;\n break;\n }\n }\n return removed;\n }\n\n /**\n * Set the new loader of the source. The next render cycle will use the\n * new loader.\n * @param {import(\"../featureloader.js\").FeatureLoader} loader The loader to set.\n * @api\n */\n setLoader(loader) {\n this.loader_ = loader;\n }\n\n /**\n * Points the source to a new url. The next render cycle will use the new url.\n * @param {string|import(\"../featureloader.js\").FeatureUrlFunction} url Url.\n * @api\n */\n setUrl(url) {\n assert(this.format_, 7); // `format` must be set when `url` is set\n this.setLoader(xhr(url, this.format_));\n }\n}\n\nexport default VectorSource;\n","/**\n * @module ol/render\n */\nimport CanvasImmediateRenderer from './render/canvas/Immediate.js';\nimport {DEVICE_PIXEL_RATIO} from './has.js';\nimport {\n apply as applyTransform,\n create as createTransform,\n multiply as multiplyTransform,\n scale as scaleTransform,\n} from './transform.js';\nimport {getSquaredTolerance} from './renderer/vector.js';\nimport {getTransformFromProjections, getUserProjection} from './proj.js';\n\n/**\n * @typedef {Object} State\n * @property {CanvasRenderingContext2D} context Canvas context that the layer is being rendered to.\n * @property {import(\"./Feature.js\").FeatureLike} feature\n * @property {import(\"./geom/SimpleGeometry.js\").default} geometry\n * @property {number} pixelRatio Pixel ratio used by the layer renderer.\n * @property {number} resolution Resolution that the render batch was created and optimized for.\n * This is not the view's resolution that is being rendered.\n * @property {number} rotation Rotation of the rendered layer in radians.\n */\n\n/**\n * A function to be used when sorting features before rendering.\n * It takes two instances of {@link module:ol/Feature} or\n * {@link module:ol/render/Feature} and returns a `{number}`.\n *\n * @typedef {function(import(\"./Feature.js\").FeatureLike, import(\"./Feature.js\").FeatureLike):number} OrderFunction\n */\n\n/**\n * @typedef {Object} ToContextOptions\n * @property {import(\"./size.js\").Size} [size] Desired size of the canvas in css\n * pixels. When provided, both canvas and css size will be set according to the\n * `pixelRatio`. If not provided, the current canvas and css sizes will not be\n * altered.\n * @property {number} [pixelRatio=window.devicePixelRatio] Pixel ratio (canvas\n * pixel to css pixel ratio) for the canvas.\n */\n\n/**\n * Binds a Canvas Immediate API to a canvas context, to allow drawing geometries\n * to the context's canvas.\n *\n * The units for geometry coordinates are css pixels relative to the top left\n * corner of the canvas element.\n * ```js\n * import {toContext} from 'ol/render';\n * import Fill from 'ol/style/Fill';\n * import Polygon from 'ol/geom/Polygon';\n *\n * var canvas = document.createElement('canvas');\n * var render = toContext(canvas.getContext('2d'),\n * { size: [100, 100] });\n * render.setFillStrokeStyle(new Fill({ color: blue }));\n * render.drawPolygon(\n * new Polygon([[[0, 0], [100, 100], [100, 0], [0, 0]]]));\n * ```\n *\n * @param {CanvasRenderingContext2D} context Canvas context.\n * @param {ToContextOptions=} opt_options Options.\n * @return {CanvasImmediateRenderer} Canvas Immediate.\n * @api\n */\nexport function toContext(context, opt_options) {\n const canvas = context.canvas;\n const options = opt_options ? opt_options : {};\n const pixelRatio = options.pixelRatio || DEVICE_PIXEL_RATIO;\n const size = options.size;\n if (size) {\n canvas.width = size[0] * pixelRatio;\n canvas.height = size[1] * pixelRatio;\n canvas.style.width = size[0] + 'px';\n canvas.style.height = size[1] + 'px';\n }\n const extent = [0, 0, canvas.width, canvas.height];\n const transform = scaleTransform(createTransform(), pixelRatio, pixelRatio);\n return new CanvasImmediateRenderer(context, pixelRatio, extent, transform, 0);\n}\n\n/**\n * Gets a vector context for drawing to the event's canvas.\n * @param {import(\"./render/Event.js\").default} event Render event.\n * @returns {CanvasImmediateRenderer} Vector context.\n * @api\n */\nexport function getVectorContext(event) {\n const frameState = event.frameState;\n const transform = multiplyTransform(\n event.inversePixelTransform.slice(),\n frameState.coordinateToPixelTransform\n );\n const squaredTolerance = getSquaredTolerance(\n frameState.viewState.resolution,\n frameState.pixelRatio\n );\n let userTransform;\n const userProjection = getUserProjection();\n if (userProjection) {\n userTransform = getTransformFromProjections(\n userProjection,\n frameState.viewState.projection\n );\n }\n return new CanvasImmediateRenderer(\n event.context,\n frameState.pixelRatio,\n frameState.extent,\n transform,\n frameState.viewState.rotation,\n squaredTolerance,\n userTransform\n );\n}\n\n/**\n * Gets the pixel of the event's canvas context from the map viewport's CSS pixel.\n * @param {import(\"./render/Event.js\").default} event Render event.\n * @param {import(\"./pixel.js\").Pixel} pixel CSS pixel relative to the top-left\n * corner of the map viewport.\n * @returns {import(\"./pixel.js\").Pixel} Pixel on the event's canvas context.\n * @api\n */\nexport function getRenderPixel(event, pixel) {\n const result = pixel.slice(0);\n applyTransform(event.inversePixelTransform.slice(), result);\n return result;\n}\n","/**\n * @module ol/geom/flat/geodesic\n */\nimport {get as getProjection, getTransform} from '../../proj.js';\nimport {squaredSegmentDistance, toDegrees, toRadians} from '../../math.js';\n\n/**\n * @param {function(number): import(\"../../coordinate.js\").Coordinate} interpolate Interpolate function.\n * @param {import(\"../../proj.js\").TransformFunction} transform Transform from longitude/latitude to\n * projected coordinates.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array<number>} Flat coordinates.\n */\nfunction line(interpolate, transform, squaredTolerance) {\n // FIXME reduce garbage generation\n // FIXME optimize stack operations\n\n /** @type {Array<number>} */\n const flatCoordinates = [];\n\n let geoA = interpolate(0);\n let geoB = interpolate(1);\n\n let a = transform(geoA);\n let b = transform(geoB);\n\n /** @type {Array<import(\"../../coordinate.js\").Coordinate>} */\n const geoStack = [geoB, geoA];\n /** @type {Array<import(\"../../coordinate.js\").Coordinate>} */\n const stack = [b, a];\n /** @type {Array<number>} */\n const fractionStack = [1, 0];\n\n /** @type {!Object<string, boolean>} */\n const fractions = {};\n\n let maxIterations = 1e5;\n let geoM, m, fracA, fracB, fracM, key;\n\n while (--maxIterations > 0 && fractionStack.length > 0) {\n // Pop the a coordinate off the stack\n fracA = fractionStack.pop();\n geoA = geoStack.pop();\n a = stack.pop();\n // Add the a coordinate if it has not been added yet\n key = fracA.toString();\n if (!(key in fractions)) {\n flatCoordinates.push(a[0], a[1]);\n fractions[key] = true;\n }\n // Pop the b coordinate off the stack\n fracB = fractionStack.pop();\n geoB = geoStack.pop();\n b = stack.pop();\n // Find the m point between the a and b coordinates\n fracM = (fracA + fracB) / 2;\n geoM = interpolate(fracM);\n m = transform(geoM);\n if (\n squaredSegmentDistance(m[0], m[1], a[0], a[1], b[0], b[1]) <\n squaredTolerance\n ) {\n // If the m point is sufficiently close to the straight line, then we\n // discard it. Just use the b coordinate and move on to the next line\n // segment.\n flatCoordinates.push(b[0], b[1]);\n key = fracB.toString();\n fractions[key] = true;\n } else {\n // Otherwise, we need to subdivide the current line segment. Split it\n // into two and push the two line segments onto the stack.\n fractionStack.push(fracB, fracM, fracM, fracA);\n stack.push(b, m, m, a);\n geoStack.push(geoB, geoM, geoM, geoA);\n }\n }\n\n return flatCoordinates;\n}\n\n/**\n * Generate a great-circle arcs between two lat/lon points.\n * @param {number} lon1 Longitude 1 in degrees.\n * @param {number} lat1 Latitude 1 in degrees.\n * @param {number} lon2 Longitude 2 in degrees.\n * @param {number} lat2 Latitude 2 in degrees.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array<number>} Flat coordinates.\n */\nexport function greatCircleArc(\n lon1,\n lat1,\n lon2,\n lat2,\n projection,\n squaredTolerance\n) {\n const geoProjection = getProjection('EPSG:4326');\n\n const cosLat1 = Math.cos(toRadians(lat1));\n const sinLat1 = Math.sin(toRadians(lat1));\n const cosLat2 = Math.cos(toRadians(lat2));\n const sinLat2 = Math.sin(toRadians(lat2));\n const cosDeltaLon = Math.cos(toRadians(lon2 - lon1));\n const sinDeltaLon = Math.sin(toRadians(lon2 - lon1));\n const d = sinLat1 * sinLat2 + cosLat1 * cosLat2 * cosDeltaLon;\n\n return line(\n /**\n * @param {number} frac Fraction.\n * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n */\n function (frac) {\n if (1 <= d) {\n return [lon2, lat2];\n }\n const D = frac * Math.acos(d);\n const cosD = Math.cos(D);\n const sinD = Math.sin(D);\n const y = sinDeltaLon * cosLat2;\n const x = cosLat1 * sinLat2 - sinLat1 * cosLat2 * cosDeltaLon;\n const theta = Math.atan2(y, x);\n const lat = Math.asin(sinLat1 * cosD + cosLat1 * sinD * Math.cos(theta));\n const lon =\n toRadians(lon1) +\n Math.atan2(\n Math.sin(theta) * sinD * cosLat1,\n cosD - sinLat1 * Math.sin(lat)\n );\n return [toDegrees(lon), toDegrees(lat)];\n },\n getTransform(geoProjection, projection),\n squaredTolerance\n );\n}\n\n/**\n * Generate a meridian (line at constant longitude).\n * @param {number} lon Longitude.\n * @param {number} lat1 Latitude 1.\n * @param {number} lat2 Latitude 2.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array<number>} Flat coordinates.\n */\nexport function meridian(lon, lat1, lat2, projection, squaredTolerance) {\n const epsg4326Projection = getProjection('EPSG:4326');\n return line(\n /**\n * @param {number} frac Fraction.\n * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n */\n function (frac) {\n return [lon, lat1 + (lat2 - lat1) * frac];\n },\n getTransform(epsg4326Projection, projection),\n squaredTolerance\n );\n}\n\n/**\n * Generate a parallel (line at constant latitude).\n * @param {number} lat Latitude.\n * @param {number} lon1 Longitude 1.\n * @param {number} lon2 Longitude 2.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array<number>} Flat coordinates.\n */\nexport function parallel(lat, lon1, lon2, projection, squaredTolerance) {\n const epsg4326Projection = getProjection('EPSG:4326');\n return line(\n /**\n * @param {number} frac Fraction.\n * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n */\n function (frac) {\n return [lon1 + (lon2 - lon1) * frac, lat];\n },\n getTransform(epsg4326Projection, projection),\n squaredTolerance\n );\n}\n","/**\n * @module ol/layer/Graticule\n */\nimport Collection from '../Collection.js';\nimport EventType from '../render/EventType.js';\nimport Feature from '../Feature.js';\nimport Fill from '../style/Fill.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport Point from '../geom/Point.js';\nimport Stroke from '../style/Stroke.js';\nimport Style from '../style/Style.js';\nimport Text from '../style/Text.js';\nimport VectorLayer from './Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport {\n applyTransform,\n approximatelyEquals,\n containsCoordinate,\n containsExtent,\n equals,\n getCenter,\n getHeight,\n getIntersection,\n getWidth,\n intersects,\n isEmpty,\n wrapX as wrapExtentX,\n} from '../extent.js';\nimport {assign} from '../obj.js';\nimport {clamp} from '../math.js';\nimport {degreesToStringHDMS} from '../coordinate.js';\nimport {\n equivalent as equivalentProjection,\n get as getProjection,\n getTransform,\n} from '../proj.js';\nimport {getVectorContext} from '../render.js';\nimport {meridian, parallel} from '../geom/flat/geodesic.js';\n\n/**\n * @type {Stroke}\n * @private\n * @const\n */\nconst DEFAULT_STROKE_STYLE = new Stroke({\n color: 'rgba(0,0,0,0.2)',\n});\n\n/**\n * @type {Array<number>}\n * @private\n */\nconst INTERVALS = [\n 90,\n 45,\n 30,\n 20,\n 10,\n 5,\n 2,\n 1,\n 0.5,\n 0.2,\n 0.1,\n 0.05,\n 0.01,\n 0.005,\n 0.002,\n 0.001,\n];\n\n/**\n * @typedef {Object} GraticuleLabelDataType\n * @property {Point} geom\n * @property {string} text\n */\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 {number} [maxLines=100] The maximum number of meridians and\n * parallels from the center of the map. The default value of 100 means that at\n * most 200 meridians and 200 parallels will be displayed. The default value is\n * appropriate for conformal projections like Spherical Mercator. If you\n * increase the value, more lines will be drawn and the drawing performance will\n * decrease.\n * @property {Stroke} [strokeStyle='rgba(0,0,0,0.2)'] The\n * stroke style to use for drawing the graticule. If not provided, a not fully\n * opaque black will be used.\n * @property {number} [targetSize=100] The target size of the graticule cells,\n * in pixels.\n * @property {boolean} [showLabels=false] Render a label with the respective\n * latitude/longitude for each graticule line.\n * @property {function(number):string} [lonLabelFormatter] Label formatter for\n * longitudes. This function is called with the longitude as argument, and\n * should return a formatted string representing the longitude. By default,\n * labels are formatted as degrees, minutes, seconds and hemisphere.\n * @property {function(number):string} [latLabelFormatter] Label formatter for\n * latitudes. This function is called with the latitude as argument, and\n * should return a formatted string representing the latitude. By default,\n * labels are formatted as degrees, minutes, seconds and hemisphere.\n * @property {number} [lonLabelPosition=0] Longitude label position in fractions\n * (0..1) of view extent. 0 means at the bottom of the viewport, 1 means at the\n * top.\n * @property {number} [latLabelPosition=1] Latitude label position in fractions\n * (0..1) of view extent. 0 means at the left of the viewport, 1 means at the\n * right.\n * @property {Text} [lonLabelStyle] Longitude label text\n * style. If not provided, the following style will be used:\n * ```js\n * new Text({\n * font: '12px Calibri,sans-serif',\n * textBaseline: 'bottom',\n * fill: new Fill({\n * color: 'rgba(0,0,0,1)'\n * }),\n * stroke: new Stroke({\n * color: 'rgba(255,255,255,1)',\n * width: 3\n * })\n * });\n * ```\n * Note that the default's `textBaseline` configuration will not work well for\n * `lonLabelPosition` configurations that position labels close to the top of\n * the viewport.\n * @property {Text} [latLabelStyle] Latitude label text style.\n * If not provided, the following style will be used:\n * ```js\n * new Text({\n * font: '12px Calibri,sans-serif',\n * textAlign: 'end',\n * fill: new Fill({\n * color: 'rgba(0,0,0,1)'\n * }),\n * stroke: Stroke({\n * color: 'rgba(255,255,255,1)',\n * width: 3\n * })\n * });\n * ```\n * Note that the default's `textAlign` configuration will not work well for\n * `latLabelPosition` configurations that position labels close to the left of\n * the viewport.\n * @property {Array<number>} [intervals=[90, 45, 30, 20, 10, 5, 2, 1, 0.5, 0.2, 0.1, 0.05, 0.01, 0.005, 0.002, 0.001]]\n * Intervals (in degrees) for the graticule. Example to limit graticules to 30 and 10 degrees intervals:\n * ```js\n * [30, 10]\n * ```\n * @property {boolean} [wrapX=true] Whether to repeat the graticule horizontally.\n */\n\n/**\n * @classdesc\n * Layer that renders a grid for a coordinate system (currently only EPSG:4326 is supported).\n * Note that the view projection must define both extent and worldExtent.\n *\n * @fires import(\"../render/Event.js\").RenderEvent\n * @api\n */\nclass Graticule extends VectorLayer {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n const baseOptions = assign(\n {\n updateWhileAnimating: true,\n updateWhileInteracting: true,\n renderBuffer: 0,\n },\n options\n );\n\n delete baseOptions.maxLines;\n delete baseOptions.strokeStyle;\n delete baseOptions.targetSize;\n delete baseOptions.showLabels;\n delete baseOptions.lonLabelFormatter;\n delete baseOptions.latLabelFormatter;\n delete baseOptions.lonLabelPosition;\n delete baseOptions.latLabelPosition;\n delete baseOptions.lonLabelStyle;\n delete baseOptions.latLabelStyle;\n delete baseOptions.intervals;\n super(baseOptions);\n\n /**\n * @type {import(\"../proj/Projection.js\").default}\n */\n this.projection_ = null;\n\n /**\n * @type {number}\n * @private\n */\n this.maxLat_ = Infinity;\n\n /**\n * @type {number}\n * @private\n */\n this.maxLon_ = Infinity;\n\n /**\n * @type {number}\n * @private\n */\n this.minLat_ = -Infinity;\n\n /**\n * @type {number}\n * @private\n */\n this.minLon_ = -Infinity;\n\n /**\n * @type {number}\n * @private\n */\n this.maxX_ = Infinity;\n\n /**\n * @type {number}\n * @private\n */\n this.maxY_ = Infinity;\n\n /**\n * @type {number}\n * @private\n */\n this.minX_ = -Infinity;\n\n /**\n * @type {number}\n * @private\n */\n this.minY_ = -Infinity;\n\n /**\n * @type {number}\n * @private\n */\n this.targetSize_ =\n options.targetSize !== undefined ? options.targetSize : 100;\n\n /**\n * @type {number}\n * @private\n */\n this.maxLines_ = options.maxLines !== undefined ? options.maxLines : 100;\n\n /**\n * @type {Array<LineString>}\n * @private\n */\n this.meridians_ = [];\n\n /**\n * @type {Array<LineString>}\n * @private\n */\n this.parallels_ = [];\n\n /**\n * @type {Stroke}\n * @private\n */\n this.strokeStyle_ =\n options.strokeStyle !== undefined\n ? options.strokeStyle\n : DEFAULT_STROKE_STYLE;\n\n /**\n * @type {import(\"../proj.js\").TransformFunction|undefined}\n * @private\n */\n this.fromLonLatTransform_ = undefined;\n\n /**\n * @type {import(\"../proj.js\").TransformFunction|undefined}\n * @private\n */\n this.toLonLatTransform_ = undefined;\n\n /**\n * @type {import(\"../coordinate.js\").Coordinate}\n * @private\n */\n this.projectionCenterLonLat_ = null;\n\n /**\n * @type {import(\"../coordinate.js\").Coordinate}\n * @private\n */\n this.bottomLeft_ = null;\n\n /**\n * @type {import(\"../coordinate.js\").Coordinate}\n * @private\n */\n this.bottomRight_ = null;\n\n /**\n * @type {import(\"../coordinate.js\").Coordinate}\n * @private\n */\n this.topLeft_ = null;\n\n /**\n * @type {import(\"../coordinate.js\").Coordinate}\n * @private\n */\n this.topRight_ = null;\n\n /**\n * @type {Array<GraticuleLabelDataType>}\n * @private\n */\n this.meridiansLabels_ = null;\n\n /**\n * @type {Array<GraticuleLabelDataType>}\n * @private\n */\n this.parallelsLabels_ = null;\n\n if (options.showLabels) {\n /**\n * @type {null|function(number):string}\n * @private\n */\n this.lonLabelFormatter_ =\n options.lonLabelFormatter == undefined\n ? degreesToStringHDMS.bind(this, 'EW')\n : options.lonLabelFormatter;\n\n /**\n * @type {function(number):string}\n * @private\n */\n this.latLabelFormatter_ =\n options.latLabelFormatter == undefined\n ? degreesToStringHDMS.bind(this, 'NS')\n : options.latLabelFormatter;\n\n /**\n * Longitude label position in fractions (0..1) of view extent. 0 means\n * bottom, 1 means top.\n * @type {number}\n * @private\n */\n this.lonLabelPosition_ =\n options.lonLabelPosition == undefined ? 0 : options.lonLabelPosition;\n\n /**\n * Latitude Label position in fractions (0..1) of view extent. 0 means left, 1\n * means right.\n * @type {number}\n * @private\n */\n this.latLabelPosition_ =\n options.latLabelPosition == undefined ? 1 : options.latLabelPosition;\n\n /**\n * @type {Style}\n * @private\n */\n this.lonLabelStyleBase_ = new Style({\n text:\n options.lonLabelStyle !== undefined\n ? options.lonLabelStyle.clone()\n : new Text({\n font: '12px Calibri,sans-serif',\n textBaseline: 'bottom',\n fill: new Fill({\n color: 'rgba(0,0,0,1)',\n }),\n stroke: new Stroke({\n color: 'rgba(255,255,255,1)',\n width: 3,\n }),\n }),\n });\n\n /**\n * @private\n * @param {import(\"../Feature\").default} feature Feature\n * @return {Style} style\n */\n this.lonLabelStyle_ = function (feature) {\n const label = feature.get('graticule_label');\n this.lonLabelStyleBase_.getText().setText(label);\n return this.lonLabelStyleBase_;\n }.bind(this);\n\n /**\n * @type {Style}\n * @private\n */\n this.latLabelStyleBase_ = new Style({\n text:\n options.latLabelStyle !== undefined\n ? options.latLabelStyle.clone()\n : new Text({\n font: '12px Calibri,sans-serif',\n textAlign: 'right',\n fill: new Fill({\n color: 'rgba(0,0,0,1)',\n }),\n stroke: new Stroke({\n color: 'rgba(255,255,255,1)',\n width: 3,\n }),\n }),\n });\n\n /**\n * @private\n * @param {import(\"../Feature\").default} feature Feature\n * @return {Style} style\n */\n this.latLabelStyle_ = function (feature) {\n const label = feature.get('graticule_label');\n this.latLabelStyleBase_.getText().setText(label);\n return this.latLabelStyleBase_;\n }.bind(this);\n\n this.meridiansLabels_ = [];\n this.parallelsLabels_ = [];\n\n this.addEventListener(EventType.POSTRENDER, this.drawLabels_.bind(this));\n }\n\n /**\n * @type {Array<number>}\n * @private\n */\n this.intervals_ =\n options.intervals !== undefined ? options.intervals : INTERVALS;\n\n // use a source with a custom loader for lines & text\n this.setSource(\n new VectorSource({\n loader: this.loaderFunction.bind(this),\n strategy: this.strategyFunction.bind(this),\n features: new Collection(),\n overlaps: false,\n useSpatialIndex: false,\n wrapX: options.wrapX,\n })\n );\n\n /**\n * feature pool to use when updating graticule\n * @type {Array<Feature>}\n * @private\n */\n this.featurePool_ = [];\n\n /**\n * @type {Style}\n * @private\n */\n this.lineStyle_ = new Style({\n stroke: this.strokeStyle_,\n });\n\n /**\n * @type {?import(\"../extent.js\").Extent}\n * @private\n */\n this.loadedExtent_ = null;\n\n /**\n * @type {?import(\"../extent.js\").Extent}\n */\n this.renderedExtent_ = null;\n\n this.setRenderOrder(null);\n }\n\n /**\n * Strategy function for loading features based on the view's extent and\n * resolution.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array<import(\"../extent.js\").Extent>} Extents.\n */\n strategyFunction(extent, resolution) {\n // extents may be passed in different worlds, to avoid endless loop we use only one\n let realWorldExtent = extent.slice();\n if (this.projection_ && this.getSource().getWrapX()) {\n wrapExtentX(realWorldExtent, this.projection_);\n }\n if (this.loadedExtent_) {\n if (\n approximatelyEquals(this.loadedExtent_, realWorldExtent, resolution)\n ) {\n // make sure result is exactly equal to previous extent\n realWorldExtent = this.loadedExtent_.slice();\n } else {\n // we should not keep track of loaded extents\n this.getSource().removeLoadedExtent(this.loadedExtent_);\n }\n }\n return [realWorldExtent];\n }\n\n /**\n * Update geometries in the source based on current view\n * @param {import(\"../extent\").Extent} extent Extent\n * @param {number} resolution Resolution\n * @param {import(\"../proj/Projection.js\").default} projection Projection\n */\n loaderFunction(extent, resolution, projection) {\n this.loadedExtent_ = extent;\n const source = this.getSource();\n\n // only consider the intersection between our own extent & the requested one\n const layerExtent = this.getExtent() || [\n -Infinity,\n -Infinity,\n Infinity,\n Infinity,\n ];\n const renderExtent = getIntersection(layerExtent, extent);\n\n if (this.renderedExtent_ && equals(this.renderedExtent_, renderExtent)) {\n return;\n }\n this.renderedExtent_ = renderExtent;\n\n // bail out if nothing to render\n if (isEmpty(renderExtent)) {\n return;\n }\n\n // update projection info\n const center = getCenter(renderExtent);\n const squaredTolerance = (resolution * resolution) / 4;\n\n const updateProjectionInfo =\n !this.projection_ || !equivalentProjection(this.projection_, projection);\n\n if (updateProjectionInfo) {\n this.updateProjectionInfo_(projection);\n }\n\n this.createGraticule_(renderExtent, center, resolution, squaredTolerance);\n\n // first make sure we have enough features in the pool\n let featureCount = this.meridians_.length + this.parallels_.length;\n if (this.meridiansLabels_) {\n featureCount += this.meridians_.length;\n }\n if (this.parallelsLabels_) {\n featureCount += this.parallels_.length;\n }\n\n let feature;\n while (featureCount > this.featurePool_.length) {\n feature = new Feature();\n this.featurePool_.push(feature);\n }\n\n const featuresColl = source.getFeaturesCollection();\n featuresColl.clear();\n let poolIndex = 0;\n\n // add features for the lines & labels\n let i, l;\n for (i = 0, l = this.meridians_.length; i < l; ++i) {\n feature = this.featurePool_[poolIndex++];\n feature.setGeometry(this.meridians_[i]);\n feature.setStyle(this.lineStyle_);\n featuresColl.push(feature);\n }\n for (i = 0, l = this.parallels_.length; i < l; ++i) {\n feature = this.featurePool_[poolIndex++];\n feature.setGeometry(this.parallels_[i]);\n feature.setStyle(this.lineStyle_);\n featuresColl.push(feature);\n }\n }\n\n /**\n * @param {number} lon Longitude.\n * @param {number} minLat Minimal latitude.\n * @param {number} maxLat Maximal latitude.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} index Index.\n * @return {number} Index.\n * @private\n */\n addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, index) {\n const lineString = this.getMeridian_(\n lon,\n minLat,\n maxLat,\n squaredTolerance,\n index\n );\n if (intersects(lineString.getExtent(), extent)) {\n if (this.meridiansLabels_) {\n const text = this.lonLabelFormatter_(lon);\n if (index in this.meridiansLabels_) {\n this.meridiansLabels_[index].text = text;\n } else {\n this.meridiansLabels_[index] = {\n geom: new Point([]),\n text: text,\n };\n }\n }\n this.meridians_[index++] = lineString;\n }\n return index;\n }\n\n /**\n * @param {number} lat Latitude.\n * @param {number} minLon Minimal longitude.\n * @param {number} maxLon Maximal longitude.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} index Index.\n * @return {number} Index.\n * @private\n */\n addParallel_(lat, minLon, maxLon, squaredTolerance, extent, index) {\n const lineString = this.getParallel_(\n lat,\n minLon,\n maxLon,\n squaredTolerance,\n index\n );\n if (intersects(lineString.getExtent(), extent)) {\n if (this.parallelsLabels_) {\n const text = this.latLabelFormatter_(lat);\n if (index in this.parallelsLabels_) {\n this.parallelsLabels_[index].text = text;\n } else {\n this.parallelsLabels_[index] = {\n geom: new Point([]),\n text: text,\n };\n }\n }\n this.parallels_[index++] = lineString;\n }\n return index;\n }\n\n /**\n * @param {import(\"../render/Event.js\").default} event Render event.\n * @private\n */\n drawLabels_(event) {\n const rotation = event.frameState.viewState.rotation;\n const extent = event.frameState.extent;\n const rotationCenter = getCenter(extent);\n let rotationExtent = extent;\n if (rotation) {\n const width = getWidth(extent);\n const height = getHeight(extent);\n const cr = Math.abs(Math.cos(rotation));\n const sr = Math.abs(Math.sin(rotation));\n const unrotatedWidth = (sr * height - cr * width) / (sr * sr - cr * cr);\n const unrotatedHeight = (sr * width - cr * height) / (sr * sr - cr * cr);\n rotationExtent = [\n rotationCenter[0] - unrotatedWidth / 2,\n rotationCenter[1] - unrotatedHeight / 2,\n rotationCenter[0] + unrotatedWidth / 2,\n rotationCenter[1] + unrotatedHeight / 2,\n ];\n }\n\n let startWorld = 0;\n let endWorld = 0;\n let labelsAtStart = this.latLabelPosition_ < 0.5;\n const projectionExtent = this.projection_.getExtent();\n const worldWidth = getWidth(projectionExtent);\n if (\n this.getSource().getWrapX() &&\n this.projection_.canWrapX() &&\n !containsExtent(projectionExtent, extent)\n ) {\n startWorld = Math.floor((extent[0] - projectionExtent[0]) / worldWidth);\n endWorld = Math.ceil((extent[2] - projectionExtent[2]) / worldWidth);\n const inverted = Math.abs(rotation) > Math.PI / 2;\n labelsAtStart = labelsAtStart !== inverted;\n }\n const vectorContext = getVectorContext(event);\n\n for (let world = startWorld; world <= endWorld; ++world) {\n let poolIndex = this.meridians_.length + this.parallels_.length;\n let feature, index, l, textPoint;\n\n if (this.meridiansLabels_) {\n for (index = 0, l = this.meridiansLabels_.length; index < l; ++index) {\n const lineString = this.meridians_[index];\n if (!rotation && world === 0) {\n textPoint = this.getMeridianPoint_(lineString, extent, index);\n } else {\n const clone = lineString.clone();\n clone.translate(world * worldWidth, 0);\n clone.rotate(-rotation, rotationCenter);\n textPoint = this.getMeridianPoint_(clone, rotationExtent, index);\n textPoint.rotate(rotation, rotationCenter);\n }\n feature = this.featurePool_[poolIndex++];\n feature.setGeometry(textPoint);\n feature.set('graticule_label', this.meridiansLabels_[index].text);\n vectorContext.drawFeature(feature, this.lonLabelStyle_(feature));\n }\n }\n if (this.parallelsLabels_) {\n if (\n (world === startWorld && labelsAtStart) ||\n (world === endWorld && !labelsAtStart)\n ) {\n for (index = 0, l = this.parallels_.length; index < l; ++index) {\n const lineString = this.parallels_[index];\n if (!rotation && world === 0) {\n textPoint = this.getParallelPoint_(lineString, extent, index);\n } else {\n const clone = lineString.clone();\n clone.translate(world * worldWidth, 0);\n clone.rotate(-rotation, rotationCenter);\n textPoint = this.getParallelPoint_(clone, rotationExtent, index);\n textPoint.rotate(rotation, rotationCenter);\n }\n feature = this.featurePool_[poolIndex++];\n feature.setGeometry(textPoint);\n feature.set('graticule_label', this.parallelsLabels_[index].text);\n vectorContext.drawFeature(feature, this.latLabelStyle_(feature));\n }\n }\n }\n }\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {import(\"../coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} squaredTolerance Squared tolerance.\n * @private\n */\n createGraticule_(extent, center, resolution, squaredTolerance) {\n const interval = this.getInterval_(resolution);\n if (interval == -1) {\n this.meridians_.length = 0;\n this.parallels_.length = 0;\n if (this.meridiansLabels_) {\n this.meridiansLabels_.length = 0;\n }\n if (this.parallelsLabels_) {\n this.parallelsLabels_.length = 0;\n }\n return;\n }\n\n let wrapX = false;\n const projectionExtent = this.projection_.getExtent();\n const worldWidth = getWidth(projectionExtent);\n if (\n this.getSource().getWrapX() &&\n this.projection_.canWrapX() &&\n !containsExtent(projectionExtent, extent)\n ) {\n if (getWidth(extent) >= worldWidth) {\n extent[0] = projectionExtent[0];\n extent[2] = projectionExtent[2];\n } else {\n wrapX = true;\n }\n }\n\n // Constrain the center to fit into the extent available to the graticule\n\n const validCenterP = [\n clamp(center[0], this.minX_, this.maxX_),\n clamp(center[1], this.minY_, this.maxY_),\n ];\n\n // Transform the center to lon lat\n // Some projections may have a void area at the poles\n // so replace any NaN latitudes with the min or max value closest to a pole\n\n const centerLonLat = this.toLonLatTransform_(validCenterP);\n if (isNaN(centerLonLat[1])) {\n centerLonLat[1] =\n Math.abs(this.maxLat_) >= Math.abs(this.minLat_)\n ? this.maxLat_\n : this.minLat_;\n }\n let centerLon = clamp(centerLonLat[0], this.minLon_, this.maxLon_);\n let centerLat = clamp(centerLonLat[1], this.minLat_, this.maxLat_);\n const maxLines = this.maxLines_;\n let cnt, idx, lat, lon;\n\n // Limit the extent to fit into the extent available to the graticule\n\n let validExtentP = extent;\n if (!wrapX) {\n validExtentP = [\n clamp(extent[0], this.minX_, this.maxX_),\n clamp(extent[1], this.minY_, this.maxY_),\n clamp(extent[2], this.minX_, this.maxX_),\n clamp(extent[3], this.minY_, this.maxY_),\n ];\n }\n\n // Transform the extent to get the lon lat ranges for the edges of the extent\n\n const validExtent = applyTransform(\n validExtentP,\n this.toLonLatTransform_,\n undefined,\n 8\n );\n\n let maxLat = validExtent[3];\n let maxLon = validExtent[2];\n let minLat = validExtent[1];\n let minLon = validExtent[0];\n\n if (!wrapX) {\n // Check if extremities of the world extent lie inside the extent\n // (for example the pole in a polar projection)\n // and extend the extent as appropriate\n\n if (containsCoordinate(validExtentP, this.bottomLeft_)) {\n minLon = this.minLon_;\n minLat = this.minLat_;\n }\n if (containsCoordinate(validExtentP, this.bottomRight_)) {\n maxLon = this.maxLon_;\n minLat = this.minLat_;\n }\n if (containsCoordinate(validExtentP, this.topLeft_)) {\n minLon = this.minLon_;\n maxLat = this.maxLat_;\n }\n if (containsCoordinate(validExtentP, this.topRight_)) {\n maxLon = this.maxLon_;\n maxLat = this.maxLat_;\n }\n\n // The transformed center may also extend the lon lat ranges used for rendering\n\n maxLat = clamp(maxLat, centerLat, this.maxLat_);\n maxLon = clamp(maxLon, centerLon, this.maxLon_);\n minLat = clamp(minLat, this.minLat_, centerLat);\n minLon = clamp(minLon, this.minLon_, centerLon);\n }\n\n // Create meridians\n\n centerLon = Math.floor(centerLon / interval) * interval;\n lon = clamp(centerLon, this.minLon_, this.maxLon_);\n\n idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, 0);\n\n cnt = 0;\n if (wrapX) {\n while ((lon -= interval) >= minLon && cnt++ < maxLines) {\n idx = this.addMeridian_(\n lon,\n minLat,\n maxLat,\n squaredTolerance,\n extent,\n idx\n );\n }\n } else {\n while (lon != this.minLon_ && cnt++ < maxLines) {\n lon = Math.max(lon - interval, this.minLon_);\n idx = this.addMeridian_(\n lon,\n minLat,\n maxLat,\n squaredTolerance,\n extent,\n idx\n );\n }\n }\n\n lon = clamp(centerLon, this.minLon_, this.maxLon_);\n\n cnt = 0;\n if (wrapX) {\n while ((lon += interval) <= maxLon && cnt++ < maxLines) {\n idx = this.addMeridian_(\n lon,\n minLat,\n maxLat,\n squaredTolerance,\n extent,\n idx\n );\n }\n } else {\n while (lon != this.maxLon_ && cnt++ < maxLines) {\n lon = Math.min(lon + interval, this.maxLon_);\n idx = this.addMeridian_(\n lon,\n minLat,\n maxLat,\n squaredTolerance,\n extent,\n idx\n );\n }\n }\n\n this.meridians_.length = idx;\n if (this.meridiansLabels_) {\n this.meridiansLabels_.length = idx;\n }\n\n // Create parallels\n\n centerLat = Math.floor(centerLat / interval) * interval;\n lat = clamp(centerLat, this.minLat_, this.maxLat_);\n\n idx = this.addParallel_(lat, minLon, maxLon, squaredTolerance, extent, 0);\n\n cnt = 0;\n while (lat != this.minLat_ && cnt++ < maxLines) {\n lat = Math.max(lat - interval, this.minLat_);\n idx = this.addParallel_(\n lat,\n minLon,\n maxLon,\n squaredTolerance,\n extent,\n idx\n );\n }\n\n lat = clamp(centerLat, this.minLat_, this.maxLat_);\n\n cnt = 0;\n while (lat != this.maxLat_ && cnt++ < maxLines) {\n lat = Math.min(lat + interval, this.maxLat_);\n idx = this.addParallel_(\n lat,\n minLon,\n maxLon,\n squaredTolerance,\n extent,\n idx\n );\n }\n\n this.parallels_.length = idx;\n if (this.parallelsLabels_) {\n this.parallelsLabels_.length = idx;\n }\n }\n\n /**\n * @param {number} resolution Resolution.\n * @return {number} The interval in degrees.\n * @private\n */\n getInterval_(resolution) {\n const centerLon = this.projectionCenterLonLat_[0];\n const centerLat = this.projectionCenterLonLat_[1];\n let interval = -1;\n const target = Math.pow(this.targetSize_ * resolution, 2);\n /** @type {Array<number>} **/\n const p1 = [];\n /** @type {Array<number>} **/\n const p2 = [];\n for (let i = 0, ii = this.intervals_.length; i < ii; ++i) {\n const delta = clamp(this.intervals_[i] / 2, 0, 90);\n // Don't attempt to transform latitudes beyond the poles!\n const clampedLat = clamp(centerLat, -90 + delta, 90 - delta);\n p1[0] = centerLon - delta;\n p1[1] = clampedLat - delta;\n p2[0] = centerLon + delta;\n p2[1] = clampedLat + delta;\n this.fromLonLatTransform_(p1, p1);\n this.fromLonLatTransform_(p2, p2);\n const dist = Math.pow(p2[0] - p1[0], 2) + Math.pow(p2[1] - p1[1], 2);\n if (dist <= target) {\n break;\n }\n interval = this.intervals_[i];\n }\n return interval;\n }\n\n /**\n * @param {number} lon Longitude.\n * @param {number} minLat Minimal latitude.\n * @param {number} maxLat Maximal latitude.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {LineString} The meridian line string.\n * @param {number} index Index.\n * @private\n */\n getMeridian_(lon, minLat, maxLat, squaredTolerance, index) {\n const flatCoordinates = meridian(\n lon,\n minLat,\n maxLat,\n this.projection_,\n squaredTolerance\n );\n let lineString = this.meridians_[index];\n if (!lineString) {\n lineString = new LineString(flatCoordinates, GeometryLayout.XY);\n this.meridians_[index] = lineString;\n } else {\n lineString.setFlatCoordinates(GeometryLayout.XY, flatCoordinates);\n lineString.changed();\n }\n return lineString;\n }\n\n /**\n * @param {LineString} lineString Meridian\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} index Index.\n * @return {Point} Meridian point.\n * @private\n */\n getMeridianPoint_(lineString, extent, index) {\n const flatCoordinates = lineString.getFlatCoordinates();\n let bottom = 1;\n let top = flatCoordinates.length - 1;\n if (flatCoordinates[bottom] > flatCoordinates[top]) {\n bottom = top;\n top = 1;\n }\n const clampedBottom = Math.max(extent[1], flatCoordinates[bottom]);\n const clampedTop = Math.min(extent[3], flatCoordinates[top]);\n const lat = clamp(\n extent[1] + Math.abs(extent[1] - extent[3]) * this.lonLabelPosition_,\n clampedBottom,\n clampedTop\n );\n const coordinate0 =\n flatCoordinates[bottom - 1] +\n ((flatCoordinates[top - 1] - flatCoordinates[bottom - 1]) *\n (lat - flatCoordinates[bottom])) /\n (flatCoordinates[top] - flatCoordinates[bottom]);\n const coordinate = [coordinate0, lat];\n const point = this.meridiansLabels_[index].geom;\n point.setCoordinates(coordinate);\n return point;\n }\n\n /**\n * Get the list of meridians. Meridians are lines of equal longitude.\n * @return {Array<LineString>} The meridians.\n * @api\n */\n getMeridians() {\n return this.meridians_;\n }\n\n /**\n * @param {number} lat Latitude.\n * @param {number} minLon Minimal longitude.\n * @param {number} maxLon Maximal longitude.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {LineString} The parallel line string.\n * @param {number} index Index.\n * @private\n */\n getParallel_(lat, minLon, maxLon, squaredTolerance, index) {\n const flatCoordinates = parallel(\n lat,\n minLon,\n maxLon,\n this.projection_,\n squaredTolerance\n );\n let lineString = this.parallels_[index];\n if (!lineString) {\n lineString = new LineString(flatCoordinates, GeometryLayout.XY);\n } else {\n lineString.setFlatCoordinates(GeometryLayout.XY, flatCoordinates);\n lineString.changed();\n }\n return lineString;\n }\n\n /**\n * @param {LineString} lineString Parallels.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} index Index.\n * @return {Point} Parallel point.\n * @private\n */\n getParallelPoint_(lineString, extent, index) {\n const flatCoordinates = lineString.getFlatCoordinates();\n let left = 0;\n let right = flatCoordinates.length - 2;\n if (flatCoordinates[left] > flatCoordinates[right]) {\n left = right;\n right = 0;\n }\n const clampedLeft = Math.max(extent[0], flatCoordinates[left]);\n const clampedRight = Math.min(extent[2], flatCoordinates[right]);\n const lon = clamp(\n extent[0] + Math.abs(extent[0] - extent[2]) * this.latLabelPosition_,\n clampedLeft,\n clampedRight\n );\n const coordinate1 =\n flatCoordinates[left + 1] +\n ((flatCoordinates[right + 1] - flatCoordinates[left + 1]) *\n (lon - flatCoordinates[left])) /\n (flatCoordinates[right] - flatCoordinates[left]);\n const coordinate = [lon, coordinate1];\n const point = this.parallelsLabels_[index].geom;\n point.setCoordinates(coordinate);\n return point;\n }\n\n /**\n * Get the list of parallels. Parallels are lines of equal latitude.\n * @return {Array<LineString>} The parallels.\n * @api\n */\n getParallels() {\n return this.parallels_;\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @private\n */\n updateProjectionInfo_(projection) {\n const epsg4326Projection = getProjection('EPSG:4326');\n\n const worldExtent = projection.getWorldExtent();\n\n this.maxLat_ = worldExtent[3];\n this.maxLon_ = worldExtent[2];\n this.minLat_ = worldExtent[1];\n this.minLon_ = worldExtent[0];\n\n // If the world extent crosses the dateline define a custom transform to\n // return longitudes which wrap the dateline\n\n const toLonLatTransform = getTransform(projection, epsg4326Projection);\n if (this.minLon_ < this.maxLon_) {\n this.toLonLatTransform_ = toLonLatTransform;\n } else {\n const split = this.minLon_ + this.maxLon_ / 2;\n this.maxLon_ += 360;\n this.toLonLatTransform_ = function (\n coordinates,\n opt_output,\n opt_dimension\n ) {\n const dimension = opt_dimension || 2;\n const lonLatCoordinates = toLonLatTransform(\n coordinates,\n opt_output,\n dimension\n );\n for (let i = 0, l = lonLatCoordinates.length; i < l; i += dimension) {\n if (lonLatCoordinates[i] < split) {\n lonLatCoordinates[i] += 360;\n }\n }\n return lonLatCoordinates;\n };\n }\n\n // Transform the extent to get the limits of the view projection extent\n // which should be available to the graticule\n\n this.fromLonLatTransform_ = getTransform(epsg4326Projection, projection);\n const worldExtentP = applyTransform(\n [this.minLon_, this.minLat_, this.maxLon_, this.maxLat_],\n this.fromLonLatTransform_,\n undefined,\n 8\n );\n\n this.minX_ = worldExtentP[0];\n this.maxX_ = worldExtentP[2];\n this.minY_ = worldExtentP[1];\n this.maxY_ = worldExtentP[3];\n\n // Determine the view projection coordinates of the extremities of the world extent\n // as these may lie inside a view extent (for example the pole in a polar projection)\n\n this.bottomLeft_ = this.fromLonLatTransform_([this.minLon_, this.minLat_]);\n this.bottomRight_ = this.fromLonLatTransform_([this.maxLon_, this.minLat_]);\n this.topLeft_ = this.fromLonLatTransform_([this.minLon_, this.maxLat_]);\n this.topRight_ = this.fromLonLatTransform_([this.maxLon_, this.maxLat_]);\n\n // Transform the projection center to lon lat\n // Some projections may have a void area at the poles\n // so replace any NaN latitudes with the min or max value closest to a pole\n\n this.projectionCenterLonLat_ = this.toLonLatTransform_(\n getCenter(projection.getExtent())\n );\n if (isNaN(this.projectionCenterLonLat_[1])) {\n this.projectionCenterLonLat_[1] =\n Math.abs(this.maxLat_) >= Math.abs(this.minLat_)\n ? this.maxLat_\n : this.minLat_;\n }\n\n this.projection_ = projection;\n }\n}\n\nexport default Graticule;\n","/**\n * @module ol/ImageCanvas\n */\nimport ImageBase from './ImageBase.js';\nimport ImageState from './ImageState.js';\n\n/**\n * A function that is called to trigger asynchronous canvas drawing. It is\n * called with a \"done\" callback that should be called when drawing is done.\n * If any error occurs during drawing, the \"done\" callback should be called with\n * that error.\n *\n * @typedef {function(function(Error=): void): void} Loader\n */\n\nclass ImageCanvas extends ImageBase {\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {HTMLCanvasElement} canvas Canvas.\n * @param {Loader=} opt_loader Optional loader function to\n * support asynchronous canvas drawing.\n */\n constructor(extent, resolution, pixelRatio, canvas, opt_loader) {\n const state =\n opt_loader !== undefined ? ImageState.IDLE : ImageState.LOADED;\n\n super(extent, resolution, pixelRatio, state);\n\n /**\n * Optional canvas loader function.\n * @type {?Loader}\n * @private\n */\n this.loader_ = opt_loader !== undefined ? opt_loader : null;\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.canvas_ = canvas;\n\n /**\n * @private\n * @type {?Error}\n */\n this.error_ = null;\n }\n\n /**\n * Get any error associated with asynchronous rendering.\n * @return {?Error} Any error that occurred during rendering.\n */\n getError() {\n return this.error_;\n }\n\n /**\n * Handle async drawing complete.\n * @param {Error=} err Any error during drawing.\n * @private\n */\n handleLoad_(err) {\n if (err) {\n this.error_ = err;\n this.state = ImageState.ERROR;\n } else {\n this.state = ImageState.LOADED;\n }\n this.changed();\n }\n\n /**\n * Load not yet loaded URI.\n */\n load() {\n if (this.state == ImageState.IDLE) {\n this.state = ImageState.LOADING;\n this.changed();\n this.loader_(this.handleLoad_.bind(this));\n }\n }\n\n /**\n * @return {HTMLCanvasElement} Canvas element.\n */\n getImage() {\n return this.canvas_;\n }\n}\n\nexport default ImageCanvas;\n","/**\n * @module ol/TileState\n */\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","/**\n * @module ol/easing\n */\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/**\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/**\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/**\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/**\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 } else {\n return 1 - inAndOut(2 * (t - 0.5));\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/**\n * A function that takes an {@link module:ol/Tile} for the tile and a\n * `{string}` for the url as arguments. The default is\n * ```js\n * source.setTileLoadFunction(function(tile, src) {\n * tile.getImage().src = src;\n * });\n * ```\n * For more fine grained control, the load function can use fetch or XMLHttpRequest and involve\n * error handling:\n *\n * ```js\n * import TileState from 'ol/TileState';\n *\n * source.setTileLoadFunction(function(tile, src) {\n * var xhr = new XMLHttpRequest();\n * xhr.responseType = 'blob';\n * xhr.addEventListener('loadend', function (evt) {\n * var data = this.response;\n * if (data !== undefined) {\n * tile.getImage().src = URL.createObjectURL(data);\n * } else {\n * tile.setState(TileState.ERROR);\n * }\n * });\n * xhr.addEventListener('error', function () {\n * tile.setState(TileState.ERROR);\n * });\n * xhr.open('GET', src);\n * xhr.send();\n * });\n * ```\n *\n * @typedef {function(Tile, string): void} LoadFunction\n * @api\n */\n\n/**\n * {@link module:ol/source/Tile~Tile} sources use a function of this type to get\n * the url that provides a tile for a given tile coordinate.\n *\n * This function takes an {@link module:ol/tilecoord~TileCoord} for the tile\n * coordinate, a `{number}` representing the pixel ratio and a\n * {@link module:ol/proj/Projection} for the projection as arguments\n * and returns a `{string}` representing the tile URL, or undefined if no tile\n * should be requested for the passed tile coordinate.\n *\n * @typedef {function(import(\"./tilecoord.js\").TileCoord, number,\n * import(\"./proj/Projection.js\").default): (string|undefined)} UrlFunction\n * @api\n */\n\n/**\n * @typedef {Object} Options\n * @property {number} [transition=250] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @api\n */\n\n/**\n * @classdesc\n * Base class for tiles.\n *\n * @abstract\n */\nclass Tile extends EventTarget {\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 constructor(tileCoord, state, opt_options) {\n super();\n\n const options = opt_options ? opt_options : {};\n\n /**\n * @type {import(\"./tilecoord.js\").TileCoord}\n */\n this.tileCoord = tileCoord;\n\n /**\n * @protected\n * @type {import(\"./TileState.js\").default}\n */\n this.state = state;\n\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 /**\n * The tile is available at the highest possible resolution. Subclasses can\n * set this to `false` initially. Tile load listeners will not be\n * unregistered before this is set to `true` and a `#changed()` is called.\n * @type {boolean}\n */\n this.hifi = true;\n\n /**\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 /**\n * The duration for the opacity transition.\n * @type {number}\n */\n this.transition_ =\n options.transition === undefined ? 250 : options.transition;\n\n /**\n * Lookup of start times for rendering transitions. If the start time is\n * equal to -1, the transition is complete.\n * @type {Object<string, number>}\n */\n this.transitionStarts_ = {};\n }\n\n /**\n * @protected\n */\n changed() {\n this.dispatchEvent(EventType.CHANGE);\n }\n\n /**\n * Called by the tile cache when the tile is removed from the cache due to expiry\n */\n release() {}\n\n /**\n * @return {string} Key.\n */\n getKey() {\n return this.key + '/' + this.tileCoord;\n }\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 getInterimTile() {\n if (!this.interimTile) {\n //empty chain\n return this;\n }\n let tile = this.interimTile;\n\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\n // we can not find a better tile\n return this;\n }\n\n /**\n * Goes through the chain of interim tiles and discards sections of the chain\n * that are no longer relevant.\n */\n refreshInterimChain() {\n if (!this.interimTile) {\n return;\n }\n\n let tile = this.interimTile;\n let prev = /** @type {Tile} */ (this);\n\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 } 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 } 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 } else {\n prev = tile;\n }\n tile = prev.interimTile;\n } while (tile);\n }\n\n /**\n * Get the tile coordinate for this tile.\n * @return {import(\"./tilecoord.js\").TileCoord} The tile coordinate.\n * @api\n */\n getTileCoord() {\n return this.tileCoord;\n }\n\n /**\n * @return {import(\"./TileState.js\").default} State.\n */\n getState() {\n return this.state;\n }\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 setState(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 /**\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 load() {\n abstract();\n }\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 getAlpha(id, time) {\n if (!this.transition_) {\n return 1;\n }\n\n let start = this.transitionStarts_[id];\n if (!start) {\n start = time;\n this.transitionStarts_[id] = start;\n } else if (start === -1) {\n return 1;\n }\n\n const 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 /**\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 inTransition(id) {\n if (!this.transition_) {\n return false;\n }\n return this.transitionStarts_[id] !== -1;\n }\n\n /**\n * Mark a transition as complete.\n * @param {string} id An id for the renderer.\n */\n endTransition(id) {\n if (this.transition_) {\n this.transitionStarts_[id] = -1;\n }\n }\n}\n\nexport default Tile;\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';\n\nclass ImageTile extends Tile {\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 constructor(\n tileCoord,\n state,\n src,\n crossOrigin,\n tileLoadFunction,\n opt_options\n ) {\n super(tileCoord, state, opt_options);\n\n /**\n * @private\n * @type {?string}\n */\n this.crossOrigin_ = crossOrigin;\n\n /**\n * Image URI\n *\n * @private\n * @type {string}\n */\n this.src_ = src;\n\n this.key = src;\n\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 /**\n * @private\n * @type {?function():void}\n */\n this.unlisten_ = null;\n\n /**\n * @private\n * @type {import(\"./Tile.js\").LoadFunction}\n */\n this.tileLoadFunction_ = tileLoadFunction;\n }\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 getImage() {\n return this.image_;\n }\n\n /**\n * Tracks loading or read errors.\n *\n * @private\n */\n handleImageError_() {\n this.state = TileState.ERROR;\n this.unlistenImage_();\n this.image_ = getBlankImage();\n this.changed();\n }\n\n /**\n * Tracks successful image load.\n *\n * @private\n */\n handleImageLoad_() {\n const image = /** @type {HTMLImageElement} */ (this.image_);\n if (image.naturalWidth && image.naturalHeight) {\n this.state = TileState.LOADED;\n } else {\n this.state = TileState.EMPTY;\n }\n this.unlistenImage_();\n this.changed();\n }\n\n /**\n * Load not yet loaded URI.\n * @api\n */\n load() {\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(\n this.image_,\n this.handleImageLoad_.bind(this),\n this.handleImageError_.bind(this)\n );\n }\n }\n\n /**\n * Discards event handlers which listen for load completion or errors.\n *\n * @private\n */\n unlistenImage_() {\n if (this.unlisten_) {\n this.unlisten_();\n this.unlisten_ = null;\n }\n }\n}\n\n/**\n * Get a 1-pixel blank image.\n * @return {HTMLCanvasElement} Blank image.\n */\nfunction getBlankImage() {\n const ctx = createCanvasContext2D(1, 1);\n ctx.fillStyle = 'rgba(0,0,0,0)';\n ctx.fillRect(0, 0, 1, 1);\n return ctx.canvas;\n}\n\nexport default ImageTile;\n","/**\n * @module ol/Kinetic\n */\n\n/**\n * @classdesc\n * Implementation of inertial deceleration for map movement.\n *\n * @api\n */\nclass Kinetic {\n /**\n * @param {number} decay Rate of decay (must be negative).\n * @param {number} minVelocity Minimum velocity (pixels/millisecond).\n * @param {number} delay Delay to consider to calculate the kinetic\n * initial values (milliseconds).\n */\n constructor(decay, minVelocity, delay) {\n /**\n * @private\n * @type {number}\n */\n this.decay_ = decay;\n\n /**\n * @private\n * @type {number}\n */\n this.minVelocity_ = minVelocity;\n\n /**\n * @private\n * @type {number}\n */\n this.delay_ = delay;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.points_ = [];\n\n /**\n * @private\n * @type {number}\n */\n this.angle_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.initialVelocity_ = 0;\n }\n\n /**\n * FIXME empty description for jsdoc\n */\n begin() {\n this.points_.length = 0;\n this.angle_ = 0;\n this.initialVelocity_ = 0;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n */\n update(x, y) {\n this.points_.push(x, y, Date.now());\n }\n\n /**\n * @return {boolean} Whether we should do kinetic animation.\n */\n end() {\n if (this.points_.length < 6) {\n // at least 2 points are required (i.e. there must be at least 6 elements\n // in the array)\n return false;\n }\n const delay = Date.now() - this.delay_;\n const lastIndex = this.points_.length - 3;\n if (this.points_[lastIndex + 2] < delay) {\n // the last tracked point is too old, which means that the user stopped\n // panning before releasing the map\n return false;\n }\n\n // get the first point which still falls into the delay time\n let firstIndex = lastIndex - 3;\n while (firstIndex > 0 && this.points_[firstIndex + 2] > delay) {\n firstIndex -= 3;\n }\n\n const duration = this.points_[lastIndex + 2] - this.points_[firstIndex + 2];\n // we don't want a duration of 0 (divide by zero)\n // we also make sure the user panned for a duration of at least one frame\n // (1/60s) to compute sane displacement values\n if (duration < 1000 / 60) {\n return false;\n }\n\n const dx = this.points_[lastIndex] - this.points_[firstIndex];\n const dy = this.points_[lastIndex + 1] - this.points_[firstIndex + 1];\n this.angle_ = Math.atan2(dy, dx);\n this.initialVelocity_ = Math.sqrt(dx * dx + dy * dy) / duration;\n return this.initialVelocity_ > this.minVelocity_;\n }\n\n /**\n * @return {number} Total distance travelled (pixels).\n */\n getDistance() {\n return (this.minVelocity_ - this.initialVelocity_) / this.decay_;\n }\n\n /**\n * @return {number} Angle of the kinetic panning animation (radians).\n */\n getAngle() {\n return this.angle_;\n }\n}\n\nexport default Kinetic;\n","/**\n * @module ol/renderer/Map\n */\nimport Disposable from '../Disposable.js';\nimport {TRUE} from '../functions.js';\nimport {abstract} from '../util.js';\nimport {compose as composeTransform, makeInverse} from '../transform.js';\nimport {getWidth} from '../extent.js';\nimport {shared as iconImageCache} from '../style/IconImageCache.js';\nimport {inView} from '../layer/Layer.js';\nimport {wrapX} from '../coordinate.js';\n\n/**\n * @typedef HitMatch\n * @property {import(\"../Feature.js\").FeatureLike} feature\n * @property {import(\"../layer/Layer.js\").default} layer\n * @property {import(\"../geom/SimpleGeometry.js\").default} geometry\n * @property {number} distanceSq\n * @property {import(\"./vector.js\").FeatureCallback<T>} callback\n * @template T\n */\n\n/**\n * @abstract\n */\nclass MapRenderer extends Disposable {\n /**\n * @param {import(\"../PluggableMap.js\").default} map Map.\n */\n constructor(map) {\n super();\n\n /**\n * @private\n * @type {import(\"../PluggableMap.js\").default}\n */\n this.map_ = map;\n }\n\n /**\n * @abstract\n * @param {import(\"../render/EventType.js\").default} type Event type.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n */\n dispatchRenderEvent(type, frameState) {\n abstract();\n }\n\n /**\n * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n * @protected\n */\n calculateMatrices2D(frameState) {\n const viewState = frameState.viewState;\n const coordinateToPixelTransform = frameState.coordinateToPixelTransform;\n const pixelToCoordinateTransform = frameState.pixelToCoordinateTransform;\n\n composeTransform(\n coordinateToPixelTransform,\n frameState.size[0] / 2,\n frameState.size[1] / 2,\n 1 / viewState.resolution,\n -1 / viewState.resolution,\n -viewState.rotation,\n -viewState.center[0],\n -viewState.center[1]\n );\n\n makeInverse(pixelToCoordinateTransform, coordinateToPixelTransform);\n }\n\n /**\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {boolean} checkWrapped Check for wrapped geometries.\n * @param {import(\"./vector.js\").FeatureCallback<T>} callback Feature callback.\n * @param {S} thisArg Value to use as `this` when executing `callback`.\n * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n * function, only layers which are visible and for which this function\n * returns `true` will be tested for features. By default, all visible\n * layers will be tested.\n * @param {U} thisArg2 Value to use as `this` when executing `layerFilter`.\n * @return {T|undefined} Callback result.\n * @template S,T,U\n */\n forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n checkWrapped,\n callback,\n thisArg,\n layerFilter,\n thisArg2\n ) {\n let result;\n const viewState = frameState.viewState;\n\n /**\n * @param {boolean} managed Managed layer.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../layer/Layer.js\").default} layer Layer.\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @return {T|undefined} Callback result.\n */\n function forEachFeatureAtCoordinate(managed, feature, layer, geometry) {\n return callback.call(thisArg, feature, managed ? layer : null, geometry);\n }\n\n const projection = viewState.projection;\n\n const translatedCoordinate = wrapX(coordinate.slice(), projection);\n const offsets = [[0, 0]];\n if (projection.canWrapX() && checkWrapped) {\n const projectionExtent = projection.getExtent();\n const worldWidth = getWidth(projectionExtent);\n offsets.push([-worldWidth, 0], [worldWidth, 0]);\n }\n\n const layerStates = frameState.layerStatesArray;\n const numLayers = layerStates.length;\n\n const matches = /** @type {Array<HitMatch<T>>} */ ([]);\n const tmpCoord = [];\n for (let i = 0; i < offsets.length; i++) {\n for (let j = numLayers - 1; j >= 0; --j) {\n const layerState = layerStates[j];\n const layer = layerState.layer;\n if (\n layer.hasRenderer() &&\n inView(layerState, viewState) &&\n layerFilter.call(thisArg2, layer)\n ) {\n const layerRenderer = layer.getRenderer();\n const source = layer.getSource();\n if (layerRenderer && source) {\n const coordinates = source.getWrapX()\n ? translatedCoordinate\n : coordinate;\n const callback = forEachFeatureAtCoordinate.bind(\n null,\n layerState.managed\n );\n tmpCoord[0] = coordinates[0] + offsets[i][0];\n tmpCoord[1] = coordinates[1] + offsets[i][1];\n result = layerRenderer.forEachFeatureAtCoordinate(\n tmpCoord,\n frameState,\n hitTolerance,\n callback,\n matches\n );\n }\n if (result) {\n return result;\n }\n }\n }\n }\n if (matches.length === 0) {\n return undefined;\n }\n const order = 1 / matches.length;\n matches.forEach((m, i) => (m.distanceSq += i * order));\n matches.sort((a, b) => a.distanceSq - b.distanceSq);\n matches.some((m) => {\n return (result = m.callback(m.feature, m.layer, m.geometry));\n });\n return result;\n }\n\n /**\n * @abstract\n * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {function(import(\"../layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer\n * callback.\n * @param {function(import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n * function, only layers which are visible and for which this function\n * returns `true` will be tested for features. By default, all visible\n * layers will be tested.\n * @return {T|undefined} Callback result.\n * @template T\n */\n forEachLayerAtPixel(pixel, frameState, hitTolerance, callback, layerFilter) {\n return abstract();\n }\n\n /**\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {boolean} checkWrapped Check for wrapped geometries.\n * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n * function, only layers which are visible and for which this function\n * returns `true` will be tested for features. By default, all visible\n * layers will be tested.\n * @param {U} thisArg Value to use as `this` when executing `layerFilter`.\n * @return {boolean} Is there a feature at the given coordinate?\n * @template U\n */\n hasFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n checkWrapped,\n layerFilter,\n thisArg\n ) {\n const hasFeature = this.forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n checkWrapped,\n TRUE,\n this,\n layerFilter,\n thisArg\n );\n\n return hasFeature !== undefined;\n }\n\n /**\n * @return {import(\"../PluggableMap.js\").default} Map.\n */\n getMap() {\n return this.map_;\n }\n\n /**\n * Render.\n * @abstract\n * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n */\n renderFrame(frameState) {\n abstract();\n }\n\n /**\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @protected\n */\n scheduleExpireIconCache(frameState) {\n if (iconImageCache.canExpireCache()) {\n frameState.postRenderFunctions.push(expireIconCache);\n }\n }\n}\n\n/**\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n */\nfunction expireIconCache(map, frameState) {\n iconImageCache.expire();\n}\n\nexport default MapRenderer;\n","/**\n * @module ol/renderer/Composite\n */\nimport MapRenderer from './Map.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport RenderEvent from '../render/Event.js';\nimport RenderEventType from '../render/EventType.js';\nimport SourceState from '../source/State.js';\nimport {CLASS_UNSELECTABLE} from '../css.js';\nimport {checkedFonts} from '../render/canvas.js';\nimport {inView} from '../layer/Layer.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport {replaceChildren} from '../dom.js';\n\n/**\n * @classdesc\n * Canvas map renderer.\n * @api\n */\nclass CompositeMapRenderer extends MapRenderer {\n /**\n * @param {import(\"../PluggableMap.js\").default} map Map.\n */\n constructor(map) {\n super(map);\n\n /**\n * @type {import(\"../events.js\").EventsKey}\n */\n this.fontChangeListenerKey_ = listen(\n checkedFonts,\n ObjectEventType.PROPERTYCHANGE,\n map.redrawText.bind(map)\n );\n\n /**\n * @private\n * @type {HTMLDivElement}\n */\n this.element_ = document.createElement('div');\n const style = this.element_.style;\n style.position = 'absolute';\n style.width = '100%';\n style.height = '100%';\n style.zIndex = '0';\n\n this.element_.className = CLASS_UNSELECTABLE + ' ol-layers';\n\n const container = map.getViewport();\n container.insertBefore(this.element_, container.firstChild || null);\n\n /**\n * @private\n * @type {Array<HTMLElement>}\n */\n this.children_ = [];\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderedVisible_ = true;\n }\n\n /**\n * @param {import(\"../render/EventType.js\").default} type Event type.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n */\n dispatchRenderEvent(type, frameState) {\n const map = this.getMap();\n if (map.hasListener(type)) {\n const event = new RenderEvent(type, undefined, frameState);\n map.dispatchEvent(event);\n }\n }\n\n disposeInternal() {\n unlistenByKey(this.fontChangeListenerKey_);\n this.element_.parentNode.removeChild(this.element_);\n super.disposeInternal();\n }\n\n /**\n * Render.\n * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n */\n renderFrame(frameState) {\n if (!frameState) {\n if (this.renderedVisible_) {\n this.element_.style.display = 'none';\n this.renderedVisible_ = false;\n }\n return;\n }\n\n this.calculateMatrices2D(frameState);\n this.dispatchRenderEvent(RenderEventType.PRECOMPOSE, frameState);\n\n const layerStatesArray = frameState.layerStatesArray.sort(function (a, b) {\n return a.zIndex - b.zIndex;\n });\n const viewState = frameState.viewState;\n\n this.children_.length = 0;\n /**\n * @type {Array<import(\"../layer/BaseVector.js\").default>}\n */\n const declutterLayers = [];\n let previousElement = null;\n for (let i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n const layerState = layerStatesArray[i];\n frameState.layerIndex = i;\n if (\n !inView(layerState, viewState) ||\n (layerState.sourceState != SourceState.READY &&\n layerState.sourceState != SourceState.UNDEFINED)\n ) {\n continue;\n }\n\n const layer = layerState.layer;\n const element = layer.render(frameState, previousElement);\n if (!element) {\n continue;\n }\n if (element !== previousElement) {\n this.children_.push(element);\n previousElement = element;\n }\n if ('getDeclutter' in layer) {\n declutterLayers.push(layer);\n }\n }\n for (let i = declutterLayers.length - 1; i >= 0; --i) {\n declutterLayers[i].renderDeclutter(frameState);\n }\n\n replaceChildren(this.element_, this.children_);\n\n this.dispatchRenderEvent(RenderEventType.POSTCOMPOSE, frameState);\n\n if (!this.renderedVisible_) {\n this.element_.style.display = '';\n this.renderedVisible_ = true;\n }\n\n this.scheduleExpireIconCache(frameState);\n }\n\n /**\n * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {function(import(\"../layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer\n * callback.\n * @param {function(import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n * function, only layers which are visible and for which this function\n * returns `true` will be tested for features. By default, all visible\n * layers will be tested.\n * @return {T|undefined} Callback result.\n * @template T\n */\n forEachLayerAtPixel(pixel, frameState, hitTolerance, callback, layerFilter) {\n const viewState = frameState.viewState;\n\n const layerStates = frameState.layerStatesArray;\n const numLayers = layerStates.length;\n\n for (let i = numLayers - 1; i >= 0; --i) {\n const layerState = layerStates[i];\n const layer = layerState.layer;\n if (\n layer.hasRenderer() &&\n inView(layerState, viewState) &&\n layerFilter(layer)\n ) {\n const layerRenderer = layer.getRenderer();\n const data = layerRenderer.getDataAtPixel(\n pixel,\n frameState,\n hitTolerance\n );\n if (data) {\n const result = callback(layer, data);\n if (result) {\n return result;\n }\n }\n }\n }\n return undefined;\n }\n}\n\nexport default CompositeMapRenderer;\n","/**\n * @module ol/layer/Group\n */\nimport BaseLayer from './Base.js';\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport EventType from '../events/EventType.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport SourceState from '../source/State.js';\nimport {assert} from '../asserts.js';\nimport {assign, clear} from '../obj.js';\nimport {getChangeEventType} from '../Object.js';\nimport {getIntersection} from '../extent.js';\nimport {getUid} from '../util.js';\nimport {listen, unlistenByKey} from '../events.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {Array<import(\"./Base.js\").default>|import(\"../Collection.js\").default<import(\"./Base.js\").default>} [layers] Child layers.\n */\n\n/**\n * @enum {string}\n * @private\n */\nconst Property = {\n LAYERS: 'layers',\n};\n\n/**\n * @classdesc\n * A {@link module:ol/Collection~Collection} of layers that are handled together.\n *\n * A generic `change` event is triggered when the group/Collection changes.\n *\n * @api\n */\nclass LayerGroup extends BaseLayer {\n /**\n * @param {Options=} opt_options Layer options.\n */\n constructor(opt_options) {\n const options = opt_options || {};\n const baseOptions = /** @type {Options} */ (assign({}, options));\n delete baseOptions.layers;\n\n let layers = options.layers;\n\n super(baseOptions);\n\n /**\n * @private\n * @type {Array<import(\"../events.js\").EventsKey>}\n */\n this.layersListenerKeys_ = [];\n\n /**\n * @private\n * @type {Object<string, Array<import(\"../events.js\").EventsKey>>}\n */\n this.listenerKeys_ = {};\n\n this.addEventListener(\n getChangeEventType(Property.LAYERS),\n this.handleLayersChanged_\n );\n\n if (layers) {\n if (Array.isArray(layers)) {\n layers = new Collection(layers.slice(), {unique: true});\n } else {\n assert(typeof (/** @type {?} */ (layers).getArray) === 'function', 43); // Expected `layers` to be an array or a `Collection`\n }\n } else {\n layers = new Collection(undefined, {unique: true});\n }\n\n this.setLayers(layers);\n }\n\n /**\n * @private\n */\n handleLayerChange_() {\n this.changed();\n }\n\n /**\n * @private\n */\n handleLayersChanged_() {\n this.layersListenerKeys_.forEach(unlistenByKey);\n this.layersListenerKeys_.length = 0;\n\n const layers = this.getLayers();\n this.layersListenerKeys_.push(\n listen(layers, CollectionEventType.ADD, this.handleLayersAdd_, this),\n listen(layers, CollectionEventType.REMOVE, this.handleLayersRemove_, this)\n );\n\n for (const id in this.listenerKeys_) {\n this.listenerKeys_[id].forEach(unlistenByKey);\n }\n clear(this.listenerKeys_);\n\n const layersArray = layers.getArray();\n for (let i = 0, ii = layersArray.length; i < ii; i++) {\n const layer = layersArray[i];\n this.listenerKeys_[getUid(layer)] = [\n listen(\n layer,\n ObjectEventType.PROPERTYCHANGE,\n this.handleLayerChange_,\n this\n ),\n listen(layer, EventType.CHANGE, this.handleLayerChange_, this),\n ];\n }\n\n this.changed();\n }\n\n /**\n * @param {import(\"../Collection.js\").CollectionEvent} collectionEvent CollectionEvent.\n * @private\n */\n handleLayersAdd_(collectionEvent) {\n const layer = /** @type {import(\"./Base.js\").default} */ (collectionEvent.element);\n this.listenerKeys_[getUid(layer)] = [\n listen(\n layer,\n ObjectEventType.PROPERTYCHANGE,\n this.handleLayerChange_,\n this\n ),\n listen(layer, EventType.CHANGE, this.handleLayerChange_, this),\n ];\n this.changed();\n }\n\n /**\n * @param {import(\"../Collection.js\").CollectionEvent} collectionEvent CollectionEvent.\n * @private\n */\n handleLayersRemove_(collectionEvent) {\n const layer = /** @type {import(\"./Base.js\").default} */ (collectionEvent.element);\n const key = getUid(layer);\n this.listenerKeys_[key].forEach(unlistenByKey);\n delete this.listenerKeys_[key];\n this.changed();\n }\n\n /**\n * Returns the {@link module:ol/Collection collection} of {@link module:ol/layer/Layer~Layer layers}\n * in this group.\n * @return {!import(\"../Collection.js\").default<import(\"./Base.js\").default>} Collection of\n * {@link module:ol/layer/Base layers} that are part of this group.\n * @observable\n * @api\n */\n getLayers() {\n return /** @type {!import(\"../Collection.js\").default<import(\"./Base.js\").default>} */ (this.get(\n Property.LAYERS\n ));\n }\n\n /**\n * Set the {@link module:ol/Collection collection} of {@link module:ol/layer/Layer~Layer layers}\n * in this group.\n * @param {!import(\"../Collection.js\").default<import(\"./Base.js\").default>} layers Collection of\n * {@link module:ol/layer/Base layers} that are part of this group.\n * @observable\n * @api\n */\n setLayers(layers) {\n this.set(Property.LAYERS, layers);\n }\n\n /**\n * @param {Array<import(\"./Layer.js\").default>=} opt_array Array of layers (to be modified in place).\n * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n */\n getLayersArray(opt_array) {\n const array = opt_array !== undefined ? opt_array : [];\n this.getLayers().forEach(function (layer) {\n layer.getLayersArray(array);\n });\n return array;\n }\n\n /**\n * @param {Array<import(\"./Layer.js\").State>=} opt_states Optional list of layer states (to be modified in place).\n * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n */\n getLayerStatesArray(opt_states) {\n const states = opt_states !== undefined ? opt_states : [];\n\n const pos = states.length;\n\n this.getLayers().forEach(function (layer) {\n layer.getLayerStatesArray(states);\n });\n\n const ownLayerState = this.getLayerState();\n for (let i = pos, ii = states.length; i < ii; i++) {\n const layerState = states[i];\n layerState.opacity *= ownLayerState.opacity;\n layerState.visible = layerState.visible && ownLayerState.visible;\n layerState.maxResolution = Math.min(\n layerState.maxResolution,\n ownLayerState.maxResolution\n );\n layerState.minResolution = Math.max(\n layerState.minResolution,\n ownLayerState.minResolution\n );\n layerState.minZoom = Math.max(layerState.minZoom, ownLayerState.minZoom);\n layerState.maxZoom = Math.min(layerState.maxZoom, ownLayerState.maxZoom);\n if (ownLayerState.extent !== undefined) {\n if (layerState.extent !== undefined) {\n layerState.extent = getIntersection(\n layerState.extent,\n ownLayerState.extent\n );\n } else {\n layerState.extent = ownLayerState.extent;\n }\n }\n }\n\n return states;\n }\n\n /**\n * @return {import(\"../source/State.js\").default} Source state.\n */\n getSourceState() {\n return SourceState.READY;\n }\n}\n\nexport default LayerGroup;\n","/**\n * @module ol/MapEvent\n */\nimport Event from './events/Event.js';\n\n/**\n * @classdesc\n * Events emitted as map events are instances of this type.\n * See {@link module:ol/PluggableMap~PluggableMap} for which events trigger a map event.\n */\nclass MapEvent extends Event {\n /**\n * @param {string} type Event type.\n * @param {import(\"./PluggableMap.js\").default} map Map.\n * @param {?import(\"./PluggableMap.js\").FrameState=} opt_frameState Frame state.\n */\n constructor(type, map, opt_frameState) {\n super(type);\n\n /**\n * The map where the event occurred.\n * @type {import(\"./PluggableMap.js\").default}\n * @api\n */\n this.map = map;\n\n /**\n * The frame state at the time of the event.\n * @type {?import(\"./PluggableMap.js\").FrameState}\n * @api\n */\n this.frameState = opt_frameState !== undefined ? opt_frameState : null;\n }\n}\n\nexport default MapEvent;\n","/**\n * @module ol/MapBrowserEvent\n */\nimport MapEvent from './MapEvent.js';\n\n/**\n * @classdesc\n * Events emitted as map browser events are instances of this type.\n * See {@link module:ol/PluggableMap~PluggableMap} for which events trigger a map browser event.\n * @template {UIEvent} EVENT\n */\nclass MapBrowserEvent extends MapEvent {\n /**\n * @param {string} type Event type.\n * @param {import(\"./PluggableMap.js\").default} map Map.\n * @param {EVENT} originalEvent Original event.\n * @param {boolean=} opt_dragging Is the map currently being dragged?\n * @param {?import(\"./PluggableMap.js\").FrameState=} opt_frameState Frame state.\n */\n constructor(type, map, originalEvent, opt_dragging, opt_frameState) {\n super(type, map, opt_frameState);\n\n /**\n * The original browser event.\n * @const\n * @type {EVENT}\n * @api\n */\n this.originalEvent = originalEvent;\n\n /**\n * The map pixel relative to the viewport corresponding to the original browser event.\n * @type {?import(\"./pixel.js\").Pixel}\n */\n this.pixel_ = null;\n\n /**\n * The coordinate in the user projection corresponding to the original browser event.\n * @type {?import(\"./coordinate.js\").Coordinate}\n */\n this.coordinate_ = null;\n\n /**\n * Indicates if the map is currently being dragged. Only set for\n * `POINTERDRAG` and `POINTERMOVE` events. Default is `false`.\n *\n * @type {boolean}\n * @api\n */\n this.dragging = opt_dragging !== undefined ? opt_dragging : false;\n }\n\n /**\n * The map pixel relative to the viewport corresponding to the original event.\n * @type {import(\"./pixel.js\").Pixel}\n * @api\n */\n get pixel() {\n if (!this.pixel_) {\n this.pixel_ = this.map.getEventPixel(this.originalEvent);\n }\n return this.pixel_;\n }\n set pixel(pixel) {\n this.pixel_ = pixel;\n }\n\n /**\n * The coordinate corresponding to the original browser event. This will be in the user\n * projection if one is set. Otherwise it will be in the view projection.\n * @type {import(\"./coordinate.js\").Coordinate}\n * @api\n */\n get coordinate() {\n if (!this.coordinate_) {\n this.coordinate_ = this.map.getCoordinateFromPixel(this.pixel);\n }\n return this.coordinate_;\n }\n set coordinate(coordinate) {\n this.coordinate_ = coordinate;\n }\n\n /**\n * Prevents the default browser action.\n * See https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault.\n * @api\n */\n preventDefault() {\n super.preventDefault();\n this.originalEvent.preventDefault();\n }\n\n /**\n * Prevents further propagation of the current event.\n * See https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation.\n * @api\n */\n stopPropagation() {\n super.stopPropagation();\n this.originalEvent.stopPropagation();\n }\n}\n\nexport default MapBrowserEvent;\n","/**\n * @module ol/MapBrowserEventType\n */\nimport EventType from './events/EventType.js';\n\n/**\n * Constants for event names.\n * @enum {string}\n */\nexport default {\n /**\n * A true single click with no dragging and no double click. Note that this\n * event is delayed by 250 ms to ensure that it is not a double click.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#singleclick\n * @api\n */\n SINGLECLICK: 'singleclick',\n\n /**\n * A click with no dragging. A double click will fire two of this.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#click\n * @api\n */\n CLICK: EventType.CLICK,\n\n /**\n * A true double click, with no dragging.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#dblclick\n * @api\n */\n DBLCLICK: EventType.DBLCLICK,\n\n /**\n * Triggered when a pointer is dragged.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointerdrag\n * @api\n */\n POINTERDRAG: 'pointerdrag',\n\n /**\n * Triggered when a pointer is moved. Note that on touch devices this is\n * triggered when the map is panned, so is not the same as mousemove.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointermove\n * @api\n */\n POINTERMOVE: 'pointermove',\n\n POINTERDOWN: 'pointerdown',\n POINTERUP: 'pointerup',\n POINTEROVER: 'pointerover',\n POINTEROUT: 'pointerout',\n POINTERENTER: 'pointerenter',\n POINTERLEAVE: 'pointerleave',\n POINTERCANCEL: 'pointercancel',\n};\n","/**\n * @module ol/pointer/EventType\n */\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","/**\n * @module ol/MapBrowserEventHandler\n */\n\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport MapBrowserEvent from './MapBrowserEvent.js';\nimport MapBrowserEventType from './MapBrowserEventType.js';\nimport PointerEventType from './pointer/EventType.js';\nimport {DEVICE_PIXEL_RATIO, PASSIVE_EVENT_LISTENERS} from './has.js';\nimport {listen, unlistenByKey} from './events.js';\n\nclass MapBrowserEventHandler extends EventTarget {\n /**\n * @param {import(\"./PluggableMap.js\").default} map The map with the viewport to listen to events on.\n * @param {number=} moveTolerance The minimal distance the pointer must travel to trigger a move.\n */\n constructor(map, moveTolerance) {\n super(map);\n\n /**\n * This is the element that we will listen to the real events on.\n * @type {import(\"./PluggableMap.js\").default}\n * @private\n */\n this.map_ = map;\n\n /**\n * @type {any}\n * @private\n */\n this.clickTimeoutId_;\n\n /**\n * Emulate dblclick and singleclick. Will be true when only one pointer is active.\n * @type {boolean}\n */\n this.emulateClicks_ = false;\n\n /**\n * @type {boolean}\n * @private\n */\n this.dragging_ = false;\n\n /**\n * @type {!Array<import(\"./events.js\").EventsKey>}\n * @private\n */\n this.dragListenerKeys_ = [];\n\n /**\n * @type {number}\n * @private\n */\n this.moveTolerance_ = moveTolerance\n ? moveTolerance * DEVICE_PIXEL_RATIO\n : DEVICE_PIXEL_RATIO;\n\n /**\n * The most recent \"down\" type event (or null if none have occurred).\n * Set on pointerdown.\n * @type {PointerEvent}\n * @private\n */\n this.down_ = null;\n\n const element = this.map_.getViewport();\n\n /**\n * @type {number}\n * @private\n */\n this.activePointers_ = 0;\n\n /**\n * @type {!Object<number, boolean>}\n * @private\n */\n this.trackedTouches_ = {};\n\n this.element_ = element;\n\n /**\n * @type {?import(\"./events.js\").EventsKey}\n * @private\n */\n this.pointerdownListenerKey_ = listen(\n element,\n PointerEventType.POINTERDOWN,\n this.handlePointerDown_,\n this\n );\n\n /**\n * @type {PointerEvent}\n * @private\n */\n this.originalPointerMoveEvent_;\n\n /**\n * @type {?import(\"./events.js\").EventsKey}\n * @private\n */\n this.relayedListenerKey_ = listen(\n element,\n PointerEventType.POINTERMOVE,\n this.relayEvent_,\n this\n );\n\n /**\n * @private\n */\n this.boundHandleTouchMove_ = this.handleTouchMove_.bind(this);\n\n this.element_.addEventListener(\n EventType.TOUCHMOVE,\n this.boundHandleTouchMove_,\n PASSIVE_EVENT_LISTENERS ? {passive: false} : false\n );\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n emulateClick_(pointerEvent) {\n let newEvent = new MapBrowserEvent(\n MapBrowserEventType.CLICK,\n this.map_,\n pointerEvent\n );\n this.dispatchEvent(newEvent);\n if (this.clickTimeoutId_ !== undefined) {\n // double-click\n clearTimeout(this.clickTimeoutId_);\n this.clickTimeoutId_ = undefined;\n newEvent = new MapBrowserEvent(\n MapBrowserEventType.DBLCLICK,\n this.map_,\n pointerEvent\n );\n this.dispatchEvent(newEvent);\n } else {\n // click\n this.clickTimeoutId_ = setTimeout(\n /** @this {MapBrowserEventHandler} */\n function () {\n this.clickTimeoutId_ = undefined;\n const newEvent = new MapBrowserEvent(\n MapBrowserEventType.SINGLECLICK,\n this.map_,\n pointerEvent\n );\n this.dispatchEvent(newEvent);\n }.bind(this),\n 250\n );\n }\n }\n\n /**\n * Keeps track on how many pointers are currently active.\n *\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n updateActivePointers_(pointerEvent) {\n const event = pointerEvent;\n\n if (\n event.type == MapBrowserEventType.POINTERUP ||\n event.type == MapBrowserEventType.POINTERCANCEL\n ) {\n delete this.trackedTouches_[event.pointerId];\n } else if (event.type == MapBrowserEventType.POINTERDOWN) {\n this.trackedTouches_[event.pointerId] = true;\n }\n this.activePointers_ = Object.keys(this.trackedTouches_).length;\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n handlePointerUp_(pointerEvent) {\n this.updateActivePointers_(pointerEvent);\n const newEvent = new MapBrowserEvent(\n MapBrowserEventType.POINTERUP,\n this.map_,\n pointerEvent\n );\n this.dispatchEvent(newEvent);\n\n // We emulate click events on left mouse button click, touch contact, and pen\n // contact. isMouseActionButton returns true in these cases (evt.button is set\n // to 0).\n // See http://www.w3.org/TR/pointerevents/#button-states\n // We only fire click, singleclick, and doubleclick if nobody has called\n // event.stopPropagation() or event.preventDefault().\n if (\n this.emulateClicks_ &&\n !newEvent.propagationStopped &&\n !this.dragging_ &&\n this.isMouseActionButton_(pointerEvent)\n ) {\n this.emulateClick_(this.down_);\n }\n\n if (this.activePointers_ === 0) {\n this.dragListenerKeys_.forEach(unlistenByKey);\n this.dragListenerKeys_.length = 0;\n this.dragging_ = false;\n this.down_ = null;\n }\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @return {boolean} If the left mouse button was pressed.\n * @private\n */\n isMouseActionButton_(pointerEvent) {\n return pointerEvent.button === 0;\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n handlePointerDown_(pointerEvent) {\n this.emulateClicks_ = this.activePointers_ === 0;\n this.updateActivePointers_(pointerEvent);\n const newEvent = new MapBrowserEvent(\n MapBrowserEventType.POINTERDOWN,\n this.map_,\n pointerEvent\n );\n this.dispatchEvent(newEvent);\n\n this.down_ = pointerEvent;\n\n if (this.dragListenerKeys_.length === 0) {\n const doc = this.map_.getOwnerDocument();\n this.dragListenerKeys_.push(\n listen(\n doc,\n MapBrowserEventType.POINTERMOVE,\n this.handlePointerMove_,\n this\n ),\n listen(doc, MapBrowserEventType.POINTERUP, this.handlePointerUp_, this),\n /* Note that the listener for `pointercancel is set up on\n * `pointerEventHandler_` and not `documentPointerEventHandler_` like\n * the `pointerup` and `pointermove` listeners.\n *\n * The reason for this is the following: `TouchSource.vacuumTouches_()`\n * issues `pointercancel` events, when there was no `touchend` for a\n * `touchstart`. Now, let's say a first `touchstart` is registered on\n * `pointerEventHandler_`. The `documentPointerEventHandler_` is set up.\n * But `documentPointerEventHandler_` doesn't know about the first\n * `touchstart`. If there is no `touchend` for the `touchstart`, we can\n * only receive a `touchcancel` from `pointerEventHandler_`, because it is\n * only registered there.\n */\n listen(\n this.element_,\n MapBrowserEventType.POINTERCANCEL,\n this.handlePointerUp_,\n this\n )\n );\n if (this.element_.getRootNode && this.element_.getRootNode() !== doc) {\n this.dragListenerKeys_.push(\n listen(\n this.element_.getRootNode(),\n MapBrowserEventType.POINTERUP,\n this.handlePointerUp_,\n this\n )\n );\n }\n }\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n handlePointerMove_(pointerEvent) {\n // Between pointerdown and pointerup, pointermove events are triggered.\n // To avoid a 'false' touchmove event to be dispatched, we test if the pointer\n // moved a significant distance.\n if (this.isMoving_(pointerEvent)) {\n this.dragging_ = true;\n const newEvent = new MapBrowserEvent(\n MapBrowserEventType.POINTERDRAG,\n this.map_,\n pointerEvent,\n this.dragging_\n );\n this.dispatchEvent(newEvent);\n }\n }\n\n /**\n * Wrap and relay a pointer event. Note that this requires that the type\n * string for the MapBrowserEvent matches the PointerEvent type.\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n relayEvent_(pointerEvent) {\n this.originalPointerMoveEvent_ = pointerEvent;\n const dragging = !!(this.down_ && this.isMoving_(pointerEvent));\n this.dispatchEvent(\n new MapBrowserEvent(pointerEvent.type, this.map_, pointerEvent, dragging)\n );\n }\n\n /**\n * Flexible handling of a `touch-action: none` css equivalent: because calling\n * `preventDefault()` on a `pointermove` event does not stop native page scrolling\n * and zooming, we also listen for `touchmove` and call `preventDefault()` on it\n * when an interaction (currently `DragPan` handles the event.\n * @param {TouchEvent} event Event.\n * @private\n */\n handleTouchMove_(event) {\n // Due to https://github.com/mpizenberg/elm-pep/issues/2, `this.originalPointerMoveEvent_`\n // may not be initialized yet when we get here on a platform without native pointer events.\n if (\n !this.originalPointerMoveEvent_ ||\n this.originalPointerMoveEvent_.defaultPrevented\n ) {\n event.preventDefault();\n }\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @return {boolean} Is moving.\n * @private\n */\n isMoving_(pointerEvent) {\n return (\n this.dragging_ ||\n Math.abs(pointerEvent.clientX - this.down_.clientX) >\n this.moveTolerance_ ||\n Math.abs(pointerEvent.clientY - this.down_.clientY) > this.moveTolerance_\n );\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n if (this.relayedListenerKey_) {\n unlistenByKey(this.relayedListenerKey_);\n this.relayedListenerKey_ = null;\n }\n this.element_.removeEventListener(\n EventType.TOUCHMOVE,\n this.boundHandleTouchMove_\n );\n\n if (this.pointerdownListenerKey_) {\n unlistenByKey(this.pointerdownListenerKey_);\n this.pointerdownListenerKey_ = null;\n }\n\n this.dragListenerKeys_.forEach(unlistenByKey);\n this.dragListenerKeys_.length = 0;\n\n this.element_ = null;\n super.disposeInternal();\n }\n}\n\nexport default MapBrowserEventHandler;\n","/**\n * @module ol/MapEventType\n */\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 /**\n * Triggered when the map starts moving.\n * @event module:ol/MapEvent~MapEvent#movestart\n * @api\n */\n MOVESTART: 'movestart',\n\n /**\n * Triggered after the map is moved.\n * @event module:ol/MapEvent~MapEvent#moveend\n * @api\n */\n MOVEEND: 'moveend',\n};\n","/**\n * @module ol/MapProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n LAYERGROUP: 'layergroup',\n SIZE: 'size',\n TARGET: 'target',\n VIEW: 'view',\n};\n","/**\n * @module ol/structs/PriorityQueue\n */\nimport {assert} from '../asserts.js';\nimport {clear} from '../obj.js';\n\n/**\n * @type {number}\n */\nexport const DROP = Infinity;\n\n/**\n * @classdesc\n * Priority queue.\n *\n * The implementation is inspired from the Closure Library's Heap class and\n * Python's heapq module.\n *\n * See http://closure-library.googlecode.com/svn/docs/closure_goog_structs_heap.js.source.html\n * and http://hg.python.org/cpython/file/2.7/Lib/heapq.py.\n *\n * @template T\n */\nclass PriorityQueue {\n /**\n * @param {function(T): number} priorityFunction Priority function.\n * @param {function(T): string} keyFunction Key function.\n */\n constructor(priorityFunction, keyFunction) {\n /**\n * @type {function(T): number}\n * @private\n */\n this.priorityFunction_ = priorityFunction;\n\n /**\n * @type {function(T): string}\n * @private\n */\n this.keyFunction_ = keyFunction;\n\n /**\n * @type {Array<T>}\n * @private\n */\n this.elements_ = [];\n\n /**\n * @type {Array<number>}\n * @private\n */\n this.priorities_ = [];\n\n /**\n * @type {!Object<string, boolean>}\n * @private\n */\n this.queuedElements_ = {};\n }\n\n /**\n * FIXME empty description for jsdoc\n */\n clear() {\n this.elements_.length = 0;\n this.priorities_.length = 0;\n clear(this.queuedElements_);\n }\n\n /**\n * Remove and return the highest-priority element. O(log N).\n * @return {T} Element.\n */\n dequeue() {\n const elements = this.elements_;\n const priorities = this.priorities_;\n const element = elements[0];\n if (elements.length == 1) {\n elements.length = 0;\n priorities.length = 0;\n } else {\n elements[0] = elements.pop();\n priorities[0] = priorities.pop();\n this.siftUp_(0);\n }\n const elementKey = this.keyFunction_(element);\n delete this.queuedElements_[elementKey];\n return element;\n }\n\n /**\n * Enqueue an element. O(log N).\n * @param {T} element Element.\n * @return {boolean} The element was added to the queue.\n */\n enqueue(element) {\n assert(!(this.keyFunction_(element) in this.queuedElements_), 31); // Tried to enqueue an `element` that was already added to the queue\n const priority = this.priorityFunction_(element);\n if (priority != DROP) {\n this.elements_.push(element);\n this.priorities_.push(priority);\n this.queuedElements_[this.keyFunction_(element)] = true;\n this.siftDown_(0, this.elements_.length - 1);\n return true;\n }\n return false;\n }\n\n /**\n * @return {number} Count.\n */\n getCount() {\n return this.elements_.length;\n }\n\n /**\n * Gets the index of the left child of the node at the given index.\n * @param {number} index The index of the node to get the left child for.\n * @return {number} The index of the left child.\n * @private\n */\n getLeftChildIndex_(index) {\n return index * 2 + 1;\n }\n\n /**\n * Gets the index of the right child of the node at the given index.\n * @param {number} index The index of the node to get the right child for.\n * @return {number} The index of the right child.\n * @private\n */\n getRightChildIndex_(index) {\n return index * 2 + 2;\n }\n\n /**\n * Gets the index of the parent of the node at the given index.\n * @param {number} index The index of the node to get the parent for.\n * @return {number} The index of the parent.\n * @private\n */\n getParentIndex_(index) {\n return (index - 1) >> 1;\n }\n\n /**\n * Make this a heap. O(N).\n * @private\n */\n heapify_() {\n let i;\n for (i = (this.elements_.length >> 1) - 1; i >= 0; i--) {\n this.siftUp_(i);\n }\n }\n\n /**\n * @return {boolean} Is empty.\n */\n isEmpty() {\n return this.elements_.length === 0;\n }\n\n /**\n * @param {string} key Key.\n * @return {boolean} Is key queued.\n */\n isKeyQueued(key) {\n return key in this.queuedElements_;\n }\n\n /**\n * @param {T} element Element.\n * @return {boolean} Is queued.\n */\n isQueued(element) {\n return this.isKeyQueued(this.keyFunction_(element));\n }\n\n /**\n * @param {number} index The index of the node to move down.\n * @private\n */\n siftUp_(index) {\n const elements = this.elements_;\n const priorities = this.priorities_;\n const count = elements.length;\n const element = elements[index];\n const priority = priorities[index];\n const startIndex = index;\n\n while (index < count >> 1) {\n const lIndex = this.getLeftChildIndex_(index);\n const rIndex = this.getRightChildIndex_(index);\n\n const smallerChildIndex =\n rIndex < count && priorities[rIndex] < priorities[lIndex]\n ? rIndex\n : lIndex;\n\n elements[index] = elements[smallerChildIndex];\n priorities[index] = priorities[smallerChildIndex];\n index = smallerChildIndex;\n }\n\n elements[index] = element;\n priorities[index] = priority;\n this.siftDown_(startIndex, index);\n }\n\n /**\n * @param {number} startIndex The index of the root.\n * @param {number} index The index of the node to move up.\n * @private\n */\n siftDown_(startIndex, index) {\n const elements = this.elements_;\n const priorities = this.priorities_;\n const element = elements[index];\n const priority = priorities[index];\n\n while (index > startIndex) {\n const parentIndex = this.getParentIndex_(index);\n if (priorities[parentIndex] > priority) {\n elements[index] = elements[parentIndex];\n priorities[index] = priorities[parentIndex];\n index = parentIndex;\n } else {\n break;\n }\n }\n elements[index] = element;\n priorities[index] = priority;\n }\n\n /**\n * FIXME empty description for jsdoc\n */\n reprioritize() {\n const priorityFunction = this.priorityFunction_;\n const elements = this.elements_;\n const priorities = this.priorities_;\n let index = 0;\n const n = elements.length;\n let element, i, priority;\n for (i = 0; i < n; ++i) {\n element = elements[i];\n priority = priorityFunction(element);\n if (priority == DROP) {\n delete this.queuedElements_[this.keyFunction_(element)];\n } else {\n priorities[index] = priority;\n elements[index++] = element;\n }\n }\n elements.length = index;\n priorities.length = index;\n this.heapify_();\n }\n}\n\nexport default PriorityQueue;\n","/**\n * @module ol/TileQueue\n */\nimport EventType from './events/EventType.js';\nimport PriorityQueue, {DROP} from './structs/PriorityQueue.js';\nimport TileState from './TileState.js';\n\n/**\n * @typedef {function(import(\"./Tile.js\").default, string, import(\"./coordinate.js\").Coordinate, number): number} PriorityFunction\n */\n\nclass TileQueue extends PriorityQueue {\n /**\n * @param {PriorityFunction} tilePriorityFunction Tile priority function.\n * @param {function(): ?} tileChangeCallback Function called on each tile change event.\n */\n constructor(tilePriorityFunction, tileChangeCallback) {\n super(\n /**\n * @param {Array} element Element.\n * @return {number} Priority.\n */\n function (element) {\n return tilePriorityFunction.apply(null, element);\n },\n /**\n * @param {Array} element Element.\n * @return {string} Key.\n */\n function (element) {\n return /** @type {import(\"./Tile.js\").default} */ (element[0]).getKey();\n }\n );\n\n /** @private */\n this.boundHandleTileChange_ = this.handleTileChange.bind(this);\n\n /**\n * @private\n * @type {function(): ?}\n */\n this.tileChangeCallback_ = tileChangeCallback;\n\n /**\n * @private\n * @type {number}\n */\n this.tilesLoading_ = 0;\n\n /**\n * @private\n * @type {!Object<string,boolean>}\n */\n this.tilesLoadingKeys_ = {};\n }\n\n /**\n * @param {Array} element Element.\n * @return {boolean} The element was added to the queue.\n */\n enqueue(element) {\n const added = super.enqueue(element);\n if (added) {\n const tile = element[0];\n tile.addEventListener(EventType.CHANGE, this.boundHandleTileChange_);\n }\n return added;\n }\n\n /**\n * @return {number} Number of tiles loading.\n */\n getTilesLoading() {\n return this.tilesLoading_;\n }\n\n /**\n * @param {import(\"./events/Event.js\").default} event Event.\n * @protected\n */\n handleTileChange(event) {\n const tile = /** @type {import(\"./Tile.js\").default} */ (event.target);\n const state = tile.getState();\n if (\n (tile.hifi && state === TileState.LOADED) ||\n state === TileState.ERROR ||\n state === TileState.EMPTY\n ) {\n tile.removeEventListener(EventType.CHANGE, this.boundHandleTileChange_);\n const tileKey = tile.getKey();\n if (tileKey in this.tilesLoadingKeys_) {\n delete this.tilesLoadingKeys_[tileKey];\n --this.tilesLoading_;\n }\n this.tileChangeCallback_();\n }\n }\n\n /**\n * @param {number} maxTotalLoading Maximum number tiles to load simultaneously.\n * @param {number} maxNewLoads Maximum number of new tiles to load.\n */\n loadMoreTiles(maxTotalLoading, maxNewLoads) {\n let newLoads = 0;\n let state, tile, tileKey;\n while (\n this.tilesLoading_ < maxTotalLoading &&\n newLoads < maxNewLoads &&\n this.getCount() > 0\n ) {\n tile = /** @type {import(\"./Tile.js\").default} */ (this.dequeue()[0]);\n tileKey = tile.getKey();\n state = tile.getState();\n if (state === TileState.IDLE && !(tileKey in this.tilesLoadingKeys_)) {\n this.tilesLoadingKeys_[tileKey] = true;\n ++this.tilesLoading_;\n ++newLoads;\n tile.load();\n }\n }\n }\n}\n\nexport default TileQueue;\n\n/**\n * @param {import('./PluggableMap.js').FrameState} frameState Frame state.\n * @param {import(\"./Tile.js\").default} tile Tile.\n * @param {string} tileSourceKey Tile source key.\n * @param {import(\"./coordinate.js\").Coordinate} tileCenter Tile center.\n * @param {number} tileResolution Tile resolution.\n * @return {number} Tile priority.\n */\nexport function getTilePriority(\n frameState,\n tile,\n tileSourceKey,\n tileCenter,\n tileResolution\n) {\n // Filter out tiles at higher zoom levels than the current zoom level, or that\n // are outside the visible extent.\n if (!frameState || !(tileSourceKey in frameState.wantedTiles)) {\n return DROP;\n }\n if (!frameState.wantedTiles[tileSourceKey][tile.getKey()]) {\n return DROP;\n }\n // Prioritize the highest zoom level tiles closest to the focus.\n // Tiles at higher zoom levels are prioritized using Math.log(tileResolution).\n // Within a zoom level, tiles are prioritized by the distance in pixels between\n // the center of the tile and the center of the viewport. The factor of 65536\n // means that the prioritization should behave as desired for tiles up to\n // 65536 * Math.log(2) = 45426 pixels from the focus.\n const center = frameState.viewState.center;\n const deltaX = tileCenter[0] - center[0];\n const deltaY = tileCenter[1] - center[1];\n return (\n 65536 * Math.log(tileResolution) +\n Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution\n );\n}\n","/**\n * @module ol/ViewProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n CENTER: 'center',\n RESOLUTION: 'resolution',\n ROTATION: 'rotation',\n};\n","/**\n * @module ol/tilegrid/common\n */\n\n/**\n * Default maximum zoom for default tile grids.\n * @type {number}\n */\nexport const DEFAULT_MAX_ZOOM = 42;\n\n/**\n * Default tile size.\n * @type {number}\n */\nexport const DEFAULT_TILE_SIZE = 256;\n","/**\n * @module ol/centerconstraint\n */\nimport {clamp} from './math.js';\n\n/**\n * @typedef {function((import(\"./coordinate.js\").Coordinate|undefined), number, import(\"./size.js\").Size, boolean=, Array<number>=): (import(\"./coordinate.js\").Coordinate|undefined)} Type\n */\n\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {boolean} onlyCenter If true, the constraint will only apply to the view center.\n * @param {boolean} smooth If true, the view will be able to go slightly out of the given extent\n * (only during interaction and animation).\n * @return {Type} The constraint.\n */\nexport function createExtent(extent, onlyCenter, smooth) {\n return (\n /**\n * @param {import(\"./coordinate.js\").Coordinate|undefined} center Center.\n * @param {number} resolution Resolution.\n * @param {import(\"./size.js\").Size} size Viewport size; unused if `onlyCenter` was specified.\n * @param {boolean=} opt_isMoving True if an interaction or animation is in progress.\n * @param {Array<number>=} opt_centerShift Shift between map center and viewport center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n */\n function (center, resolution, size, opt_isMoving, opt_centerShift) {\n if (center) {\n const viewWidth = onlyCenter ? 0 : size[0] * resolution;\n const viewHeight = onlyCenter ? 0 : size[1] * resolution;\n const shiftX = opt_centerShift ? opt_centerShift[0] : 0;\n const shiftY = opt_centerShift ? opt_centerShift[1] : 0;\n let minX = extent[0] + viewWidth / 2 + shiftX;\n let maxX = extent[2] - viewWidth / 2 + shiftX;\n let minY = extent[1] + viewHeight / 2 + shiftY;\n let maxY = extent[3] - viewHeight / 2 + shiftY;\n\n // note: when zooming out of bounds, min and max values for x and y may\n // end up inverted (min > max); this has to be accounted for\n if (minX > maxX) {\n minX = (maxX + minX) / 2;\n maxX = minX;\n }\n if (minY > maxY) {\n minY = (maxY + minY) / 2;\n maxY = minY;\n }\n\n let x = clamp(center[0], minX, maxX);\n let y = clamp(center[1], minY, maxY);\n const ratio = 30 * resolution;\n\n // during an interaction, allow some overscroll\n if (opt_isMoving && smooth) {\n x +=\n -ratio * Math.log(1 + Math.max(0, minX - center[0]) / ratio) +\n ratio * Math.log(1 + Math.max(0, center[0] - maxX) / ratio);\n y +=\n -ratio * Math.log(1 + Math.max(0, minY - center[1]) / ratio) +\n ratio * Math.log(1 + Math.max(0, center[1] - maxY) / ratio);\n }\n\n return [x, y];\n } else {\n return undefined;\n }\n }\n );\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate=} center Center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n */\nexport function none(center) {\n return center;\n}\n","/**\n * @module ol/resolutionconstraint\n */\nimport {clamp} from './math.js';\nimport {getHeight, getWidth} from './extent.js';\nimport {linearFindNearest} from './array.js';\n\n/**\n * @typedef {function((number|undefined), number, import(\"./size.js\").Size, boolean=): (number|undefined)} Type\n */\n\n/**\n * Returns a modified resolution taking into account the viewport size and maximum\n * allowed extent.\n * @param {number} resolution Resolution\n * @param {import(\"./extent.js\").Extent} maxExtent Maximum allowed extent.\n * @param {import(\"./size.js\").Size} viewportSize Viewport size.\n * @param {boolean} showFullExtent Whether to show the full extent.\n * @return {number} Capped resolution.\n */\nfunction getViewportClampedResolution(\n resolution,\n maxExtent,\n viewportSize,\n showFullExtent\n) {\n const xResolution = getWidth(maxExtent) / viewportSize[0];\n const yResolution = getHeight(maxExtent) / viewportSize[1];\n\n if (showFullExtent) {\n return Math.min(resolution, Math.max(xResolution, yResolution));\n }\n return Math.min(resolution, Math.min(xResolution, yResolution));\n}\n\n/**\n * Returns a modified resolution to be between maxResolution and minResolution while\n * still allowing the value to be slightly out of bounds.\n * Note: the computation is based on the logarithm function (ln):\n * - at 1, ln(x) is 0\n * - above 1, ln(x) keeps increasing but at a much slower pace than x\n * The final result is clamped to prevent getting too far away from bounds.\n * @param {number} resolution Resolution.\n * @param {number} maxResolution Max resolution.\n * @param {number} minResolution Min resolution.\n * @return {number} Smoothed resolution.\n */\nfunction getSmoothClampedResolution(resolution, maxResolution, minResolution) {\n let result = Math.min(resolution, maxResolution);\n const ratio = 50;\n\n result *=\n Math.log(1 + ratio * Math.max(0, resolution / maxResolution - 1)) / ratio +\n 1;\n if (minResolution) {\n result = Math.max(result, minResolution);\n result /=\n Math.log(1 + ratio * Math.max(0, minResolution / resolution - 1)) /\n ratio +\n 1;\n }\n return clamp(result, minResolution / 2, maxResolution * 2);\n}\n\n/**\n * @param {Array<number>} resolutions Resolutions.\n * @param {boolean=} opt_smooth If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent=} opt_maxExtent Maximum allowed extent.\n * @param {boolean=} opt_showFullExtent If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createSnapToResolutions(\n resolutions,\n opt_smooth,\n opt_maxExtent,\n opt_showFullExtent\n) {\n return (\n /**\n * @param {number|undefined} resolution Resolution.\n * @param {number} direction Direction.\n * @param {import(\"./size.js\").Size} size Viewport size.\n * @param {boolean=} opt_isMoving True if an interaction or animation is in progress.\n * @return {number|undefined} Resolution.\n */\n function (resolution, direction, size, opt_isMoving) {\n if (resolution !== undefined) {\n const maxResolution = resolutions[0];\n const minResolution = resolutions[resolutions.length - 1];\n const cappedMaxRes = opt_maxExtent\n ? getViewportClampedResolution(\n maxResolution,\n opt_maxExtent,\n size,\n opt_showFullExtent\n )\n : maxResolution;\n\n // during interacting or animating, allow intermediary values\n if (opt_isMoving) {\n const smooth = opt_smooth !== undefined ? opt_smooth : true;\n if (!smooth) {\n return clamp(resolution, minResolution, cappedMaxRes);\n }\n return getSmoothClampedResolution(\n resolution,\n cappedMaxRes,\n minResolution\n );\n }\n\n const capped = Math.min(cappedMaxRes, resolution);\n const z = Math.floor(linearFindNearest(resolutions, capped, direction));\n if (resolutions[z] > cappedMaxRes && z < resolutions.length - 1) {\n return resolutions[z + 1];\n }\n return resolutions[z];\n } else {\n return undefined;\n }\n }\n );\n}\n\n/**\n * @param {number} power Power.\n * @param {number} maxResolution Maximum resolution.\n * @param {number=} opt_minResolution Minimum resolution.\n * @param {boolean=} opt_smooth If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent=} opt_maxExtent Maximum allowed extent.\n * @param {boolean=} opt_showFullExtent If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createSnapToPower(\n power,\n maxResolution,\n opt_minResolution,\n opt_smooth,\n opt_maxExtent,\n opt_showFullExtent\n) {\n return (\n /**\n * @param {number|undefined} resolution Resolution.\n * @param {number} direction Direction.\n * @param {import(\"./size.js\").Size} size Viewport size.\n * @param {boolean=} opt_isMoving True if an interaction or animation is in progress.\n * @return {number|undefined} Resolution.\n */\n function (resolution, direction, size, opt_isMoving) {\n if (resolution !== undefined) {\n const cappedMaxRes = opt_maxExtent\n ? getViewportClampedResolution(\n maxResolution,\n opt_maxExtent,\n size,\n opt_showFullExtent\n )\n : maxResolution;\n const minResolution =\n opt_minResolution !== undefined ? opt_minResolution : 0;\n\n // during interacting or animating, allow intermediary values\n if (opt_isMoving) {\n const smooth = opt_smooth !== undefined ? opt_smooth : true;\n if (!smooth) {\n return clamp(resolution, minResolution, cappedMaxRes);\n }\n return getSmoothClampedResolution(\n resolution,\n cappedMaxRes,\n minResolution\n );\n }\n\n const tolerance = 1e-9;\n const minZoomLevel = Math.ceil(\n Math.log(maxResolution / cappedMaxRes) / Math.log(power) - tolerance\n );\n const offset = -direction * (0.5 - tolerance) + 0.5;\n const capped = Math.min(cappedMaxRes, resolution);\n const cappedZoomLevel = Math.floor(\n Math.log(maxResolution / capped) / Math.log(power) + offset\n );\n const zoomLevel = Math.max(minZoomLevel, cappedZoomLevel);\n const newResolution = maxResolution / Math.pow(power, zoomLevel);\n return clamp(newResolution, minResolution, cappedMaxRes);\n } else {\n return undefined;\n }\n }\n );\n}\n\n/**\n * @param {number} maxResolution Max resolution.\n * @param {number} minResolution Min resolution.\n * @param {boolean=} opt_smooth If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent=} opt_maxExtent Maximum allowed extent.\n * @param {boolean=} opt_showFullExtent If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createMinMaxResolution(\n maxResolution,\n minResolution,\n opt_smooth,\n opt_maxExtent,\n opt_showFullExtent\n) {\n return (\n /**\n * @param {number|undefined} resolution Resolution.\n * @param {number} direction Direction.\n * @param {import(\"./size.js\").Size} size Viewport size.\n * @param {boolean=} opt_isMoving True if an interaction or animation is in progress.\n * @return {number|undefined} Resolution.\n */\n function (resolution, direction, size, opt_isMoving) {\n if (resolution !== undefined) {\n const cappedMaxRes = opt_maxExtent\n ? getViewportClampedResolution(\n maxResolution,\n opt_maxExtent,\n size,\n opt_showFullExtent\n )\n : maxResolution;\n const smooth = opt_smooth !== undefined ? opt_smooth : true;\n\n if (!smooth || !opt_isMoving) {\n return clamp(resolution, minResolution, cappedMaxRes);\n }\n return getSmoothClampedResolution(\n resolution,\n cappedMaxRes,\n minResolution\n );\n } else {\n return undefined;\n }\n }\n );\n}\n","/**\n * @module ol/rotationconstraint\n */\nimport {toRadians} from './math.js';\n\n/**\n * @typedef {function((number|undefined), boolean=): (number|undefined)} Type\n */\n\n/**\n * @param {number|undefined} rotation Rotation.\n * @return {number|undefined} Rotation.\n */\nexport function disable(rotation) {\n if (rotation !== undefined) {\n return 0;\n } else {\n return undefined;\n }\n}\n\n/**\n * @param {number|undefined} rotation Rotation.\n * @return {number|undefined} Rotation.\n */\nexport function none(rotation) {\n if (rotation !== undefined) {\n return rotation;\n } else {\n return undefined;\n }\n}\n\n/**\n * @param {number} n N.\n * @return {Type} Rotation constraint.\n */\nexport function createSnapToN(n) {\n const theta = (2 * Math.PI) / n;\n return (\n /**\n * @param {number|undefined} rotation Rotation.\n * @param {boolean=} opt_isMoving True if an interaction or animation is in progress.\n * @return {number|undefined} Rotation.\n */\n function (rotation, opt_isMoving) {\n if (opt_isMoving) {\n return rotation;\n }\n\n if (rotation !== undefined) {\n rotation = Math.floor(rotation / theta + 0.5) * theta;\n return rotation;\n } else {\n return undefined;\n }\n }\n );\n}\n\n/**\n * @param {number=} opt_tolerance Tolerance.\n * @return {Type} Rotation constraint.\n */\nexport function createSnapToZero(opt_tolerance) {\n const tolerance = opt_tolerance || toRadians(5);\n return (\n /**\n * @param {number|undefined} rotation Rotation.\n * @param {boolean=} opt_isMoving True if an interaction or animation is in progress.\n * @return {number|undefined} Rotation.\n */\n function (rotation, opt_isMoving) {\n if (opt_isMoving) {\n return rotation;\n }\n\n if (rotation !== undefined) {\n if (Math.abs(rotation) <= tolerance) {\n return 0;\n } else {\n return rotation;\n }\n } else {\n return undefined;\n }\n }\n );\n}\n","/**\n * @module ol/View\n */\nimport BaseObject from './Object.js';\nimport GeometryType from './geom/GeometryType.js';\nimport Units from './proj/Units.js';\nimport ViewHint from './ViewHint.js';\nimport ViewProperty from './ViewProperty.js';\nimport {DEFAULT_TILE_SIZE} from './tilegrid/common.js';\nimport {\n METERS_PER_UNIT,\n createProjection,\n fromUserCoordinate,\n fromUserExtent,\n getUserProjection,\n toUserCoordinate,\n toUserExtent,\n} from './proj.js';\nimport {VOID} from './functions.js';\nimport {\n add as addCoordinate,\n equals as coordinatesEqual,\n rotate as rotateCoordinate,\n} from './coordinate.js';\nimport {assert} from './asserts.js';\nimport {assign} from './obj.js';\nimport {none as centerNone, createExtent} from './centerconstraint.js';\nimport {clamp, modulo} from './math.js';\nimport {createMinMaxResolution} from './resolutionconstraint.js';\nimport {\n createSnapToN,\n createSnapToZero,\n disable,\n none as rotationNone,\n} from './rotationconstraint.js';\nimport {\n createSnapToPower,\n createSnapToResolutions,\n} from './resolutionconstraint.js';\nimport {easeOut} from './easing.js';\nimport {equals} from './coordinate.js';\nimport {\n getCenter,\n getForViewAndSize,\n getHeight,\n getWidth,\n isEmpty,\n} from './extent.js';\nimport {inAndOut} from './easing.js';\nimport {linearFindNearest} from './array.js';\nimport {fromExtent as polygonFromExtent} from './geom/Polygon.js';\n\n/**\n * An animation configuration\n *\n * @typedef {Object} Animation\n * @property {import(\"./coordinate.js\").Coordinate} [sourceCenter]\n * @property {import(\"./coordinate.js\").Coordinate} [targetCenter]\n * @property {number} [sourceResolution]\n * @property {number} [targetResolution]\n * @property {number} [sourceRotation]\n * @property {number} [targetRotation]\n * @property {import(\"./coordinate.js\").Coordinate} [anchor]\n * @property {number} start\n * @property {number} duration\n * @property {boolean} complete\n * @property {function(number):number} easing\n * @property {function(boolean):void} callback\n */\n\n/**\n * @typedef {Object} Constraints\n * @property {import(\"./centerconstraint.js\").Type} center\n * @property {import(\"./resolutionconstraint.js\").Type} resolution\n * @property {import(\"./rotationconstraint.js\").Type} rotation\n */\n\n/**\n * @typedef {Object} FitOptions\n * @property {import(\"./size.js\").Size} [size] The size in pixels of the box to fit\n * the extent into. Default is the current size of the first map in the DOM that\n * uses this view, or `[100, 100]` if no such map is found.\n * @property {!Array<number>} [padding=[0, 0, 0, 0]] Padding (in pixels) to be\n * cleared inside the view. Values in the array are top, right, bottom and left\n * padding.\n * @property {boolean} [nearest=false] If the view `constrainResolution` option is `true`,\n * get the nearest extent instead of the closest that actually fits the view.\n * @property {number} [minResolution=0] Minimum resolution that we zoom to.\n * @property {number} [maxZoom] Maximum zoom level that we zoom to. If\n * `minResolution` is given, this property is ignored.\n * @property {number} [duration] The duration of the animation in milliseconds.\n * By default, there is no animation to the target extent.\n * @property {function(number):number} [easing] The easing function used during\n * the animation (defaults to {@link module:ol/easing~inAndOut}).\n * The function will be called for each frame with a number representing a\n * fraction of the animation's duration. The function should return a number\n * between 0 and 1 representing the progress toward the destination state.\n * @property {function(boolean):void} [callback] Function called when the view is in\n * its final position. The callback will be called with `true` if the animation\n * series completed on its own or `false` if it was cancelled.\n */\n\n/**\n * @typedef {Object} ViewOptions\n * @property {import(\"./coordinate.js\").Coordinate} [center] The initial center for\n * the view. If a user projection is not set, the coordinate system for the center is\n * specified with the `projection` option. Layer sources will not be fetched if this\n * is not set, but the center can be set later with {@link #setCenter}.\n * @property {boolean|number} [constrainRotation=true] Rotation constraint.\n * `false` means no constraint. `true` means no constraint, but snap to zero\n * near zero. A number constrains the rotation to that number of values. For\n * example, `4` will constrain the rotation to 0, 90, 180, and 270 degrees.\n * @property {boolean} [enableRotation=true] Enable rotation.\n * If `false`, a rotation constraint that always sets the rotation to zero is\n * used. The `constrainRotation` option has no effect if `enableRotation` is\n * `false`.\n * @property {import(\"./extent.js\").Extent} [extent] The extent that constrains the\n * view, in other words, nothing outside of this extent can be visible on the map.\n * @property {boolean} [constrainOnlyCenter=false] If true, the extent\n * constraint will only apply to the view center and not the whole extent.\n * @property {boolean} [smoothExtentConstraint=true] If true, the extent\n * constraint will be applied smoothly, i.e. allow the view to go slightly outside\n * of the given `extent`.\n * @property {number} [maxResolution] The maximum resolution used to determine\n * the resolution constraint. It is used together with `minResolution` (or\n * `maxZoom`) and `zoomFactor`. If unspecified it is calculated in such a way\n * that the projection's validity extent fits in a 256x256 px tile. If the\n * projection is Spherical Mercator (the default) then `maxResolution` defaults\n * to `40075016.68557849 / 256 = 156543.03392804097`.\n * @property {number} [minResolution] The minimum resolution used to determine\n * the resolution constraint. It is used together with `maxResolution` (or\n * `minZoom`) and `zoomFactor`. If unspecified it is calculated assuming 29\n * zoom levels (with a factor of 2). If the projection is Spherical Mercator\n * (the default) then `minResolution` defaults to\n * `40075016.68557849 / 256 / Math.pow(2, 28) = 0.0005831682455839253`.\n * @property {number} [maxZoom=28] The maximum zoom level used to determine the\n * resolution constraint. It is used together with `minZoom` (or\n * `maxResolution`) and `zoomFactor`. Note that if `minResolution` is also\n * provided, it is given precedence over `maxZoom`.\n * @property {number} [minZoom=0] The minimum zoom level used to determine the\n * resolution constraint. It is used together with `maxZoom` (or\n * `minResolution`) and `zoomFactor`. Note that if `maxResolution` is also\n * provided, it is given precedence over `minZoom`.\n * @property {boolean} [multiWorld=false] If `false` the view is constrained so\n * only one world is visible, and you cannot pan off the edge. If `true` the map\n * may show multiple worlds at low zoom levels. Only used if the `projection` is\n * global. Note that if `extent` is also provided it is given precedence.\n * @property {boolean} [constrainResolution=false] If true, the view will always\n * animate to the closest zoom level after an interaction; false means\n * intermediary zoom levels are allowed.\n * @property {boolean} [smoothResolutionConstraint=true] If true, the resolution\n * min/max values will be applied smoothly, i. e. allow the view to exceed slightly\n * the given resolution or zoom bounds.\n * @property {boolean} [showFullExtent=false] Allow the view to be zoomed out to\n * show the full configured extent. By default, when a view is configured with an\n * extent, users will not be able to zoom out so the viewport exceeds the extent in\n * either dimension. This means the full extent may not be visible if the viewport\n * is taller or wider than the aspect ratio of the configured extent. If\n * showFullExtent is true, the user will be able to zoom out so that the viewport\n * exceeds the height or width of the configured extent, but not both, allowing the\n * full extent to be shown.\n * @property {import(\"./proj.js\").ProjectionLike} [projection='EPSG:3857'] The\n * projection. The default is Spherical Mercator.\n * @property {number} [resolution] The initial resolution for the view. The\n * units are `projection` units per pixel (e.g. meters per pixel). An\n * alternative to setting this is to set `zoom`. Layer sources will not be\n * fetched if neither this nor `zoom` are defined, but they can be set later\n * with {@link #setZoom} or {@link #setResolution}.\n * @property {Array<number>} [resolutions] Resolutions to determine the\n * resolution constraint. If set the `maxResolution`, `minResolution`,\n * `minZoom`, `maxZoom`, and `zoomFactor` options are ignored.\n * @property {number} [rotation=0] The initial rotation for the view in radians\n * (positive rotation clockwise, 0 means North).\n * @property {number} [zoom] Only used if `resolution` is not defined. Zoom\n * level used to calculate the initial resolution for the view.\n * @property {number} [zoomFactor=2] The zoom factor used to compute the\n * corresponding resolution.\n * @property {!Array<number>} [padding=[0, 0, 0, 0]] Padding (in css pixels).\n * If the map viewport is partially covered with other content (overlays) along\n * its edges, this setting allows to shift the center of the viewport away from\n * that content. The order of the values is top, right, bottom, left.\n */\n\n/**\n * @typedef {Object} AnimationOptions\n * @property {import(\"./coordinate.js\").Coordinate} [center] The center of the view at the end of\n * the animation.\n * @property {number} [zoom] The zoom level of the view at the end of the\n * animation. This takes precedence over `resolution`.\n * @property {number} [resolution] The resolution of the view at the end\n * of the animation. If `zoom` is also provided, this option will be ignored.\n * @property {number} [rotation] The rotation of the view at the end of\n * the animation.\n * @property {import(\"./coordinate.js\").Coordinate} [anchor] Optional anchor to remain fixed\n * during a rotation or resolution animation.\n * @property {number} [duration=1000] The duration of the animation in milliseconds.\n * @property {function(number):number} [easing] The easing function used\n * during the animation (defaults to {@link module:ol/easing~inAndOut}).\n * The function will be called for each frame with a number representing a\n * fraction of the animation's duration. The function should return a number\n * between 0 and 1 representing the progress toward the destination state.\n */\n\n/**\n * @typedef {Object} State\n * @property {import(\"./coordinate.js\").Coordinate} center\n * @property {import(\"./proj/Projection.js\").default} projection\n * @property {number} resolution\n * @property {number} rotation\n * @property {number} zoom\n */\n\n/**\n * Default min zoom level for the map view.\n * @type {number}\n */\nconst DEFAULT_MIN_ZOOM = 0;\n\n/**\n * @classdesc\n * A View object represents a simple 2D view of the map.\n *\n * This is the object to act upon to change the center, resolution,\n * and rotation of the map.\n *\n * A View has a `projection`. The projection determines the\n * coordinate system of the center, and its units determine the units of the\n * resolution (projection units per pixel). The default projection is\n * Spherical Mercator (EPSG:3857).\n *\n * ### The view states\n *\n * A View is determined by three states: `center`, `resolution`,\n * and `rotation`. Each state has a corresponding getter and setter, e.g.\n * `getCenter` and `setCenter` for the `center` state.\n *\n * The `zoom` state is actually not saved on the view: all computations\n * internally use the `resolution` state. Still, the `setZoom` and `getZoom`\n * methods are available, as well as `getResolutionForZoom` and\n * `getZoomForResolution` to switch from one system to the other.\n *\n * ### The constraints\n *\n * `setCenter`, `setResolution` and `setRotation` can be used to change the\n * states of the view, but any constraint defined in the constructor will\n * be applied along the way.\n *\n * A View object can have a *resolution constraint*, a *rotation constraint*\n * and a *center constraint*.\n *\n * The *resolution constraint* typically restricts min/max values and\n * snaps to specific resolutions. It is determined by the following\n * options: `resolutions`, `maxResolution`, `maxZoom` and `zoomFactor`.\n * If `resolutions` is set, the other three options are ignored. See\n * documentation for each option for more information. By default, the view\n * only has a min/max restriction and allow intermediary zoom levels when\n * pinch-zooming for example.\n *\n * The *rotation constraint* snaps to specific angles. It is determined\n * by the following options: `enableRotation` and `constrainRotation`.\n * By default rotation is allowed and its value is snapped to zero when approaching the\n * horizontal.\n *\n * The *center constraint* is determined by the `extent` option. By\n * default the view center is not constrained at all.\n *\n * ### Changing the view state\n *\n * It is important to note that `setZoom`, `setResolution`, `setCenter` and\n * `setRotation` are subject to the above mentioned constraints. As such, it\n * may sometimes not be possible to know in advance the resulting state of the\n * View. For example, calling `setResolution(10)` does not guarantee that\n * `getResolution()` will return `10`.\n *\n * A consequence of this is that, when applying a delta on the view state, one\n * should use `adjustCenter`, `adjustRotation`, `adjustZoom` and `adjustResolution`\n * rather than the corresponding setters. This will let view do its internal\n * computations. Besides, the `adjust*` methods also take an `opt_anchor`\n * argument which allows specifying an origin for the transformation.\n *\n * ### Interacting with the view\n *\n * View constraints are usually only applied when the view is *at rest*, meaning that\n * no interaction or animation is ongoing. As such, if the user puts the view in a\n * state that is not equivalent to a constrained one (e.g. rotating the view when\n * the snap angle is 0), an animation will be triggered at the interaction end to\n * put back the view to a stable state;\n *\n * @api\n */\nclass View extends BaseObject {\n /**\n * @param {ViewOptions=} opt_options View options.\n */\n constructor(opt_options) {\n super();\n\n const options = assign({}, opt_options);\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.hints_ = [0, 0];\n\n /**\n * @private\n * @type {Array<Array<Animation>>}\n */\n this.animations_ = [];\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.updateAnimationKey_;\n\n /**\n * @private\n * @const\n * @type {import(\"./proj/Projection.js\").default}\n */\n this.projection_ = createProjection(options.projection, 'EPSG:3857');\n\n /**\n * @private\n * @type {import(\"./size.js\").Size}\n */\n this.viewportSize_ = [100, 100];\n\n /**\n * @private\n * @type {import(\"./coordinate.js\").Coordinate|undefined}\n */\n this.targetCenter_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.targetResolution_;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.targetRotation_;\n\n /**\n * @private\n * @type {import(\"./coordinate.js\").Coordinate|undefined}\n */\n this.cancelAnchor_ = undefined;\n\n if (options.center) {\n options.center = fromUserCoordinate(options.center, this.projection_);\n }\n if (options.extent) {\n options.extent = fromUserExtent(options.extent, this.projection_);\n }\n\n this.applyOptions_(options);\n }\n\n /**\n * Set up the view with the given options.\n * @param {ViewOptions} options View options.\n */\n applyOptions_(options) {\n /**\n * @type {Object<string, *>}\n */\n const properties = {};\n\n const resolutionConstraintInfo = createResolutionConstraint(options);\n\n /**\n * @private\n * @type {number}\n */\n this.maxResolution_ = resolutionConstraintInfo.maxResolution;\n\n /**\n * @private\n * @type {number}\n */\n this.minResolution_ = resolutionConstraintInfo.minResolution;\n\n /**\n * @private\n * @type {number}\n */\n this.zoomFactor_ = resolutionConstraintInfo.zoomFactor;\n\n /**\n * @private\n * @type {Array<number>|undefined}\n */\n this.resolutions_ = options.resolutions;\n\n /**\n * Padding (in css pixels).\n * If the map viewport is partially covered with other content (overlays) along\n * its edges, this setting allows to shift the center of the viewport away from that\n * content. The order of the values in the array is top, right, bottom, left.\n * The default is no padding, which is equivalent to `[0, 0, 0, 0]`.\n * @type {Array<number>|undefined}\n * @api\n */\n this.padding = options.padding;\n\n /**\n * @private\n * @type {number}\n */\n this.minZoom_ = resolutionConstraintInfo.minZoom;\n\n const centerConstraint = createCenterConstraint(options);\n const resolutionConstraint = resolutionConstraintInfo.constraint;\n const rotationConstraint = createRotationConstraint(options);\n\n /**\n * @private\n * @type {Constraints}\n */\n this.constraints_ = {\n center: centerConstraint,\n resolution: resolutionConstraint,\n rotation: rotationConstraint,\n };\n\n this.setRotation(options.rotation !== undefined ? options.rotation : 0);\n this.setCenterInternal(\n options.center !== undefined ? options.center : null\n );\n if (options.resolution !== undefined) {\n this.setResolution(options.resolution);\n } else if (options.zoom !== undefined) {\n this.setZoom(options.zoom);\n }\n\n this.setProperties(properties);\n\n /**\n * @private\n * @type {ViewOptions}\n */\n this.options_ = options;\n }\n\n /**\n * Get an updated version of the view options used to construct the view. The\n * current resolution (or zoom), center, and rotation are applied to any stored\n * options. The provided options can be used to apply new min/max zoom or\n * resolution limits.\n * @param {ViewOptions} newOptions New options to be applied.\n * @return {ViewOptions} New options updated with the current view state.\n */\n getUpdatedOptions_(newOptions) {\n const options = assign({}, this.options_);\n\n // preserve resolution (or zoom)\n if (options.resolution !== undefined) {\n options.resolution = this.getResolution();\n } else {\n options.zoom = this.getZoom();\n }\n\n // preserve center\n options.center = this.getCenterInternal();\n\n // preserve rotation\n options.rotation = this.getRotation();\n\n return assign({}, options, newOptions);\n }\n\n /**\n * Animate the view. The view's center, zoom (or resolution), and rotation\n * can be animated for smooth transitions between view states. For example,\n * to animate the view to a new zoom level:\n *\n * view.animate({zoom: view.getZoom() + 1});\n *\n * By default, the animation lasts one second and uses in-and-out easing. You\n * can customize this behavior by including `duration` (in milliseconds) and\n * `easing` options (see {@link module:ol/easing}).\n *\n * To chain together multiple animations, call the method with multiple\n * animation objects. For example, to first zoom and then pan:\n *\n * view.animate({zoom: 10}, {center: [0, 0]});\n *\n * If you provide a function as the last argument to the animate method, it\n * will get called at the end of an animation series. The callback will be\n * called with `true` if the animation series completed on its own or `false`\n * if it was cancelled.\n *\n * Animations are cancelled by user interactions (e.g. dragging the map) or by\n * calling `view.setCenter()`, `view.setResolution()`, or `view.setRotation()`\n * (or another method that calls one of these).\n *\n * @param {...(AnimationOptions|function(boolean): void)} var_args Animation\n * options. Multiple animations can be run in series by passing multiple\n * options objects. To run multiple animations in parallel, call the method\n * multiple times. An optional callback can be provided as a final\n * argument. The callback will be called with a boolean indicating whether\n * the animation completed without being cancelled.\n * @api\n */\n animate(var_args) {\n if (this.isDef() && !this.getAnimating()) {\n this.resolveConstraints(0);\n }\n const args = new Array(arguments.length);\n for (let i = 0; i < args.length; ++i) {\n let options = arguments[i];\n if (options.center) {\n options = assign({}, options);\n options.center = fromUserCoordinate(\n options.center,\n this.getProjection()\n );\n }\n if (options.anchor) {\n options = assign({}, options);\n options.anchor = fromUserCoordinate(\n options.anchor,\n this.getProjection()\n );\n }\n args[i] = options;\n }\n this.animateInternal.apply(this, args);\n }\n\n /**\n * @param {...(AnimationOptions|function(boolean): void)} var_args Animation options.\n */\n animateInternal(var_args) {\n let animationCount = arguments.length;\n let callback;\n if (\n animationCount > 1 &&\n typeof arguments[animationCount - 1] === 'function'\n ) {\n callback = arguments[animationCount - 1];\n --animationCount;\n }\n if (!this.isDef()) {\n // if view properties are not yet set, shortcut to the final state\n const state = arguments[animationCount - 1];\n if (state.center) {\n this.setCenterInternal(state.center);\n }\n if (state.zoom !== undefined) {\n this.setZoom(state.zoom);\n }\n if (state.rotation !== undefined) {\n this.setRotation(state.rotation);\n }\n if (callback) {\n animationCallback(callback, true);\n }\n return;\n }\n let start = Date.now();\n let center = this.targetCenter_.slice();\n let resolution = this.targetResolution_;\n let rotation = this.targetRotation_;\n const series = [];\n for (let i = 0; i < animationCount; ++i) {\n const options = /** @type {AnimationOptions} */ (arguments[i]);\n\n const animation = {\n start: start,\n complete: false,\n anchor: options.anchor,\n duration: options.duration !== undefined ? options.duration : 1000,\n easing: options.easing || inAndOut,\n callback: callback,\n };\n\n if (options.center) {\n animation.sourceCenter = center;\n animation.targetCenter = options.center.slice();\n center = animation.targetCenter;\n }\n\n if (options.zoom !== undefined) {\n animation.sourceResolution = resolution;\n animation.targetResolution = this.getResolutionForZoom(options.zoom);\n resolution = animation.targetResolution;\n } else if (options.resolution) {\n animation.sourceResolution = resolution;\n animation.targetResolution = options.resolution;\n resolution = animation.targetResolution;\n }\n\n if (options.rotation !== undefined) {\n animation.sourceRotation = rotation;\n const delta =\n modulo(options.rotation - rotation + Math.PI, 2 * Math.PI) - Math.PI;\n animation.targetRotation = rotation + delta;\n rotation = animation.targetRotation;\n }\n\n // check if animation is a no-op\n if (isNoopAnimation(animation)) {\n animation.complete = true;\n // we still push it onto the series for callback handling\n } else {\n start += animation.duration;\n }\n series.push(animation);\n }\n this.animations_.push(series);\n this.setHint(ViewHint.ANIMATING, 1);\n this.updateAnimations_();\n }\n\n /**\n * Determine if the view is being animated.\n * @return {boolean} The view is being animated.\n * @api\n */\n getAnimating() {\n return this.hints_[ViewHint.ANIMATING] > 0;\n }\n\n /**\n * Determine if the user is interacting with the view, such as panning or zooming.\n * @return {boolean} The view is being interacted with.\n * @api\n */\n getInteracting() {\n return this.hints_[ViewHint.INTERACTING] > 0;\n }\n\n /**\n * Cancel any ongoing animations.\n * @api\n */\n cancelAnimations() {\n this.setHint(ViewHint.ANIMATING, -this.hints_[ViewHint.ANIMATING]);\n let anchor;\n for (let i = 0, ii = this.animations_.length; i < ii; ++i) {\n const series = this.animations_[i];\n if (series[0].callback) {\n animationCallback(series[0].callback, false);\n }\n if (!anchor) {\n for (let j = 0, jj = series.length; j < jj; ++j) {\n const animation = series[j];\n if (!animation.complete) {\n anchor = animation.anchor;\n break;\n }\n }\n }\n }\n this.animations_.length = 0;\n this.cancelAnchor_ = anchor;\n }\n\n /**\n * Update all animations.\n */\n updateAnimations_() {\n if (this.updateAnimationKey_ !== undefined) {\n cancelAnimationFrame(this.updateAnimationKey_);\n this.updateAnimationKey_ = undefined;\n }\n if (!this.getAnimating()) {\n return;\n }\n const now = Date.now();\n let more = false;\n for (let i = this.animations_.length - 1; i >= 0; --i) {\n const series = this.animations_[i];\n let seriesComplete = true;\n for (let j = 0, jj = series.length; j < jj; ++j) {\n const animation = series[j];\n if (animation.complete) {\n continue;\n }\n const elapsed = now - animation.start;\n let fraction =\n animation.duration > 0 ? elapsed / animation.duration : 1;\n if (fraction >= 1) {\n animation.complete = true;\n fraction = 1;\n } else {\n seriesComplete = false;\n }\n const progress = animation.easing(fraction);\n if (animation.sourceCenter) {\n const x0 = animation.sourceCenter[0];\n const y0 = animation.sourceCenter[1];\n const x1 = animation.targetCenter[0];\n const y1 = animation.targetCenter[1];\n const x = x0 + progress * (x1 - x0);\n const y = y0 + progress * (y1 - y0);\n this.targetCenter_ = [x, y];\n }\n if (animation.sourceResolution && animation.targetResolution) {\n const resolution =\n progress === 1\n ? animation.targetResolution\n : animation.sourceResolution +\n progress *\n (animation.targetResolution - animation.sourceResolution);\n if (animation.anchor) {\n const size = this.getViewportSize_(this.getRotation());\n const constrainedResolution = this.constraints_.resolution(\n resolution,\n 0,\n size,\n true\n );\n this.targetCenter_ = this.calculateCenterZoom(\n constrainedResolution,\n animation.anchor\n );\n }\n this.targetResolution_ = resolution;\n this.applyTargetState_(true);\n }\n if (\n animation.sourceRotation !== undefined &&\n animation.targetRotation !== undefined\n ) {\n const rotation =\n progress === 1\n ? modulo(animation.targetRotation + Math.PI, 2 * Math.PI) -\n Math.PI\n : animation.sourceRotation +\n progress *\n (animation.targetRotation - animation.sourceRotation);\n if (animation.anchor) {\n const constrainedRotation = this.constraints_.rotation(\n rotation,\n true\n );\n this.targetCenter_ = this.calculateCenterRotate(\n constrainedRotation,\n animation.anchor\n );\n }\n this.targetRotation_ = rotation;\n }\n this.applyTargetState_(true);\n more = true;\n if (!animation.complete) {\n break;\n }\n }\n if (seriesComplete) {\n this.animations_[i] = null;\n this.setHint(ViewHint.ANIMATING, -1);\n const callback = series[0].callback;\n if (callback) {\n animationCallback(callback, true);\n }\n }\n }\n // prune completed series\n this.animations_ = this.animations_.filter(Boolean);\n if (more && this.updateAnimationKey_ === undefined) {\n this.updateAnimationKey_ = requestAnimationFrame(\n this.updateAnimations_.bind(this)\n );\n }\n }\n\n /**\n * @param {number} rotation Target rotation.\n * @param {import(\"./coordinate.js\").Coordinate} anchor Rotation anchor.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center for rotation and anchor.\n */\n calculateCenterRotate(rotation, anchor) {\n let center;\n const currentCenter = this.getCenterInternal();\n if (currentCenter !== undefined) {\n center = [currentCenter[0] - anchor[0], currentCenter[1] - anchor[1]];\n rotateCoordinate(center, rotation - this.getRotation());\n addCoordinate(center, anchor);\n }\n return center;\n }\n\n /**\n * @param {number} resolution Target resolution.\n * @param {import(\"./coordinate.js\").Coordinate} anchor Zoom anchor.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center for resolution and anchor.\n */\n calculateCenterZoom(resolution, anchor) {\n let center;\n const currentCenter = this.getCenterInternal();\n const currentResolution = this.getResolution();\n if (currentCenter !== undefined && currentResolution !== undefined) {\n const x =\n anchor[0] -\n (resolution * (anchor[0] - currentCenter[0])) / currentResolution;\n const y =\n anchor[1] -\n (resolution * (anchor[1] - currentCenter[1])) / currentResolution;\n center = [x, y];\n }\n return center;\n }\n\n /**\n * Returns the current viewport size.\n * @private\n * @param {number=} opt_rotation Take into account the rotation of the viewport when giving the size\n * @return {import(\"./size.js\").Size} Viewport size or `[100, 100]` when no viewport is found.\n */\n getViewportSize_(opt_rotation) {\n const size = this.viewportSize_;\n if (opt_rotation) {\n const w = size[0];\n const h = size[1];\n return [\n Math.abs(w * Math.cos(opt_rotation)) +\n Math.abs(h * Math.sin(opt_rotation)),\n Math.abs(w * Math.sin(opt_rotation)) +\n Math.abs(h * Math.cos(opt_rotation)),\n ];\n } else {\n return size;\n }\n }\n\n /**\n * Stores the viewport size on the view. The viewport size is not read every time from the DOM\n * to avoid performance hit and layout reflow.\n * This should be done on map size change.\n * Note: the constraints are not resolved during an animation to avoid stopping it\n * @param {import(\"./size.js\").Size=} opt_size Viewport size; if undefined, [100, 100] is assumed\n */\n setViewportSize(opt_size) {\n this.viewportSize_ = Array.isArray(opt_size)\n ? opt_size.slice()\n : [100, 100];\n if (!this.getAnimating()) {\n this.resolveConstraints(0);\n }\n }\n\n /**\n * Get the view center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The center of the view.\n * @observable\n * @api\n */\n getCenter() {\n const center = this.getCenterInternal();\n if (!center) {\n return center;\n }\n return toUserCoordinate(center, this.getProjection());\n }\n\n /**\n * Get the view center without transforming to user projection.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The center of the view.\n */\n getCenterInternal() {\n return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (this.get(\n ViewProperty.CENTER\n ));\n }\n\n /**\n * @return {Constraints} Constraints.\n */\n getConstraints() {\n return this.constraints_;\n }\n\n /**\n * @return {boolean} Resolution constraint is set\n */\n getConstrainResolution() {\n return this.options_.constrainResolution;\n }\n\n /**\n * @param {Array<number>=} opt_hints Destination array.\n * @return {Array<number>} Hint.\n */\n getHints(opt_hints) {\n if (opt_hints !== undefined) {\n opt_hints[0] = this.hints_[0];\n opt_hints[1] = this.hints_[1];\n return opt_hints;\n } else {\n return this.hints_.slice();\n }\n }\n\n /**\n * Calculate the extent for the current view state and the passed size.\n * The size is the pixel dimensions of the box into which the calculated extent\n * should fit. In most cases you want to get the extent of the entire map,\n * that is `map.getSize()`.\n * @param {import(\"./size.js\").Size=} opt_size Box pixel size. If not provided, the size\n * of the map that uses this view will be used.\n * @return {import(\"./extent.js\").Extent} Extent.\n * @api\n */\n calculateExtent(opt_size) {\n const extent = this.calculateExtentInternal(opt_size);\n return toUserExtent(extent, this.getProjection());\n }\n\n /**\n * @param {import(\"./size.js\").Size=} opt_size Box pixel size. If not provided,\n * the map's last known viewport size will be used.\n * @return {import(\"./extent.js\").Extent} Extent.\n */\n calculateExtentInternal(opt_size) {\n const size = opt_size || this.getViewportSize_();\n const center = /** @type {!import(\"./coordinate.js\").Coordinate} */ (this.getCenterInternal());\n assert(center, 1); // The view center is not defined\n const resolution = /** @type {!number} */ (this.getResolution());\n assert(resolution !== undefined, 2); // The view resolution is not defined\n const rotation = /** @type {!number} */ (this.getRotation());\n assert(rotation !== undefined, 3); // The view rotation is not defined\n\n return getForViewAndSize(center, resolution, rotation, size);\n }\n\n /**\n * Get the maximum resolution of the view.\n * @return {number} The maximum resolution of the view.\n * @api\n */\n getMaxResolution() {\n return this.maxResolution_;\n }\n\n /**\n * Get the minimum resolution of the view.\n * @return {number} The minimum resolution of the view.\n * @api\n */\n getMinResolution() {\n return this.minResolution_;\n }\n\n /**\n * Get the maximum zoom level for the view.\n * @return {number} The maximum zoom level.\n * @api\n */\n getMaxZoom() {\n return /** @type {number} */ (this.getZoomForResolution(\n this.minResolution_\n ));\n }\n\n /**\n * Set a new maximum zoom level for the view.\n * @param {number} zoom The maximum zoom level.\n * @api\n */\n setMaxZoom(zoom) {\n this.applyOptions_(this.getUpdatedOptions_({maxZoom: zoom}));\n }\n\n /**\n * Get the minimum zoom level for the view.\n * @return {number} The minimum zoom level.\n * @api\n */\n getMinZoom() {\n return /** @type {number} */ (this.getZoomForResolution(\n this.maxResolution_\n ));\n }\n\n /**\n * Set a new minimum zoom level for the view.\n * @param {number} zoom The minimum zoom level.\n * @api\n */\n setMinZoom(zoom) {\n this.applyOptions_(this.getUpdatedOptions_({minZoom: zoom}));\n }\n\n /**\n * Set whether the view shoud allow intermediary zoom levels.\n * @param {boolean} enabled Whether the resolution is constrained.\n * @api\n */\n setConstrainResolution(enabled) {\n this.applyOptions_(this.getUpdatedOptions_({constrainResolution: enabled}));\n }\n\n /**\n * Get the view projection.\n * @return {import(\"./proj/Projection.js\").default} The projection of the view.\n * @api\n */\n getProjection() {\n return this.projection_;\n }\n\n /**\n * Get the view resolution.\n * @return {number|undefined} The resolution of the view.\n * @observable\n * @api\n */\n getResolution() {\n return /** @type {number|undefined} */ (this.get(ViewProperty.RESOLUTION));\n }\n\n /**\n * Get the resolutions for the view. This returns the array of resolutions\n * passed to the constructor of the View, or undefined if none were given.\n * @return {Array<number>|undefined} The resolutions of the view.\n * @api\n */\n getResolutions() {\n return this.resolutions_;\n }\n\n /**\n * Get the resolution for a provided extent (in map units) and size (in pixels).\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {import(\"./size.js\").Size=} opt_size Box pixel size.\n * @return {number} The resolution at which the provided extent will render at\n * the given size.\n * @api\n */\n getResolutionForExtent(extent, opt_size) {\n return this.getResolutionForExtentInternal(\n fromUserExtent(extent, this.getProjection()),\n opt_size\n );\n }\n\n /**\n * Get the resolution for a provided extent (in map units) and size (in pixels).\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {import(\"./size.js\").Size=} opt_size Box pixel size.\n * @return {number} The resolution at which the provided extent will render at\n * the given size.\n */\n getResolutionForExtentInternal(extent, opt_size) {\n const size = opt_size || this.getViewportSize_();\n const xResolution = getWidth(extent) / size[0];\n const yResolution = getHeight(extent) / size[1];\n return Math.max(xResolution, yResolution);\n }\n\n /**\n * Return a function that returns a value between 0 and 1 for a\n * resolution. Exponential scaling is assumed.\n * @param {number=} opt_power Power.\n * @return {function(number): number} Resolution for value function.\n */\n getResolutionForValueFunction(opt_power) {\n const power = opt_power || 2;\n const maxResolution = this.getConstrainedResolution(this.maxResolution_);\n const minResolution = this.minResolution_;\n const max = Math.log(maxResolution / minResolution) / Math.log(power);\n return (\n /**\n * @param {number} value Value.\n * @return {number} Resolution.\n */\n function (value) {\n const resolution = maxResolution / Math.pow(power, value * max);\n return resolution;\n }\n );\n }\n\n /**\n * Get the view rotation.\n * @return {number} The rotation of the view in radians.\n * @observable\n * @api\n */\n getRotation() {\n return /** @type {number} */ (this.get(ViewProperty.ROTATION));\n }\n\n /**\n * Return a function that returns a resolution for a value between\n * 0 and 1. Exponential scaling is assumed.\n * @param {number=} opt_power Power.\n * @return {function(number): number} Value for resolution function.\n */\n getValueForResolutionFunction(opt_power) {\n const logPower = Math.log(opt_power || 2);\n const maxResolution = this.getConstrainedResolution(this.maxResolution_);\n const minResolution = this.minResolution_;\n const max = Math.log(maxResolution / minResolution) / logPower;\n return (\n /**\n * @param {number} resolution Resolution.\n * @return {number} Value.\n */\n function (resolution) {\n const value = Math.log(maxResolution / resolution) / logPower / max;\n return value;\n }\n );\n }\n\n /**\n * Returns the size of the viewport minus padding.\n * @private\n * @param {number=} opt_rotation Take into account the rotation of the viewport when giving the size\n * @return {import(\"./size.js\").Size} Viewport size reduced by the padding.\n */\n getViewportSizeMinusPadding_(opt_rotation) {\n let size = this.getViewportSize_(opt_rotation);\n const padding = this.padding;\n if (padding) {\n size = [\n size[0] - padding[1] - padding[3],\n size[1] - padding[0] - padding[2],\n ];\n }\n return size;\n }\n\n /**\n * @return {State} View state.\n */\n getState() {\n const projection = this.getProjection();\n const resolution = /** @type {number} */ (this.getResolution());\n const rotation = this.getRotation();\n let center = /** @type {import(\"./coordinate.js\").Coordinate} */ (this.getCenterInternal());\n const padding = this.padding;\n if (padding) {\n const reducedSize = this.getViewportSizeMinusPadding_();\n center = calculateCenterOn(\n center,\n this.getViewportSize_(),\n [reducedSize[0] / 2 + padding[3], reducedSize[1] / 2 + padding[0]],\n resolution,\n rotation\n );\n }\n return {\n center: center.slice(0),\n projection: projection !== undefined ? projection : null,\n resolution: resolution,\n rotation: rotation,\n zoom: this.getZoom(),\n };\n }\n\n /**\n * Get the current zoom level. This method may return non-integer zoom levels\n * if the view does not constrain the resolution, or if an interaction or\n * animation is underway.\n * @return {number|undefined} Zoom.\n * @api\n */\n getZoom() {\n let zoom;\n const resolution = this.getResolution();\n if (resolution !== undefined) {\n zoom = this.getZoomForResolution(resolution);\n }\n return zoom;\n }\n\n /**\n * Get the zoom level for a resolution.\n * @param {number} resolution The resolution.\n * @return {number|undefined} The zoom level for the provided resolution.\n * @api\n */\n getZoomForResolution(resolution) {\n let offset = this.minZoom_ || 0;\n let max, zoomFactor;\n if (this.resolutions_) {\n const nearest = linearFindNearest(this.resolutions_, resolution, 1);\n offset = nearest;\n max = this.resolutions_[nearest];\n if (nearest == this.resolutions_.length - 1) {\n zoomFactor = 2;\n } else {\n zoomFactor = max / this.resolutions_[nearest + 1];\n }\n } else {\n max = this.maxResolution_;\n zoomFactor = this.zoomFactor_;\n }\n return offset + Math.log(max / resolution) / Math.log(zoomFactor);\n }\n\n /**\n * Get the resolution for a zoom level.\n * @param {number} zoom Zoom level.\n * @return {number} The view resolution for the provided zoom level.\n * @api\n */\n getResolutionForZoom(zoom) {\n if (this.resolutions_) {\n if (this.resolutions_.length <= 1) {\n return 0;\n }\n const baseLevel = clamp(\n Math.floor(zoom),\n 0,\n this.resolutions_.length - 2\n );\n const zoomFactor =\n this.resolutions_[baseLevel] / this.resolutions_[baseLevel + 1];\n return (\n this.resolutions_[baseLevel] /\n Math.pow(zoomFactor, clamp(zoom - baseLevel, 0, 1))\n );\n } else {\n return (\n this.maxResolution_ / Math.pow(this.zoomFactor_, zoom - this.minZoom_)\n );\n }\n }\n\n /**\n * Fit the given geometry or extent based on the given map size and border.\n * The size is pixel dimensions of the box to fit the extent into.\n * In most cases you will want to use the map size, that is `map.getSize()`.\n * Takes care of the map angle.\n * @param {import(\"./geom/SimpleGeometry.js\").default|import(\"./extent.js\").Extent} geometryOrExtent The geometry or\n * extent to fit the view to.\n * @param {FitOptions=} opt_options Options.\n * @api\n */\n fit(geometryOrExtent, opt_options) {\n /** @type {import(\"./geom/SimpleGeometry.js\").default} */\n let geometry;\n assert(\n Array.isArray(geometryOrExtent) ||\n typeof (/** @type {?} */ (geometryOrExtent).getSimplifiedGeometry) ===\n 'function',\n 24\n ); // Invalid extent or geometry provided as `geometry`\n if (Array.isArray(geometryOrExtent)) {\n assert(!isEmpty(geometryOrExtent), 25); // Cannot fit empty extent provided as `geometry`\n const extent = fromUserExtent(geometryOrExtent, this.getProjection());\n geometry = polygonFromExtent(extent);\n } else if (geometryOrExtent.getType() === GeometryType.CIRCLE) {\n const extent = fromUserExtent(\n geometryOrExtent.getExtent(),\n this.getProjection()\n );\n geometry = polygonFromExtent(extent);\n geometry.rotate(this.getRotation(), getCenter(extent));\n } else {\n const userProjection = getUserProjection();\n if (userProjection) {\n geometry = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometryOrExtent\n .clone()\n .transform(userProjection, this.getProjection()));\n } else {\n geometry = geometryOrExtent;\n }\n }\n\n this.fitInternal(geometry, opt_options);\n }\n\n /**\n * @param {import(\"./geom/SimpleGeometry.js\").default} geometry The geometry.\n * @param {FitOptions=} opt_options Options.\n */\n fitInternal(geometry, opt_options) {\n const options = opt_options || {};\n let size = options.size;\n if (!size) {\n size = this.getViewportSizeMinusPadding_();\n }\n const padding =\n options.padding !== undefined ? options.padding : [0, 0, 0, 0];\n const nearest = options.nearest !== undefined ? options.nearest : false;\n let minResolution;\n if (options.minResolution !== undefined) {\n minResolution = options.minResolution;\n } else if (options.maxZoom !== undefined) {\n minResolution = this.getResolutionForZoom(options.maxZoom);\n } else {\n minResolution = 0;\n }\n const coords = geometry.getFlatCoordinates();\n\n // calculate rotated extent\n const rotation = this.getRotation();\n const cosAngle = Math.cos(-rotation);\n let sinAngle = Math.sin(-rotation);\n let minRotX = +Infinity;\n let minRotY = +Infinity;\n let maxRotX = -Infinity;\n let maxRotY = -Infinity;\n const stride = geometry.getStride();\n for (let i = 0, ii = coords.length; i < ii; i += stride) {\n const rotX = coords[i] * cosAngle - coords[i + 1] * sinAngle;\n const rotY = coords[i] * sinAngle + coords[i + 1] * cosAngle;\n minRotX = Math.min(minRotX, rotX);\n minRotY = Math.min(minRotY, rotY);\n maxRotX = Math.max(maxRotX, rotX);\n maxRotY = Math.max(maxRotY, rotY);\n }\n\n // calculate resolution\n let resolution = this.getResolutionForExtentInternal(\n [minRotX, minRotY, maxRotX, maxRotY],\n [size[0] - padding[1] - padding[3], size[1] - padding[0] - padding[2]]\n );\n resolution = isNaN(resolution)\n ? minResolution\n : Math.max(resolution, minResolution);\n resolution = this.getConstrainedResolution(resolution, nearest ? 0 : 1);\n\n // calculate center\n sinAngle = -sinAngle; // go back to original rotation\n let centerRotX = (minRotX + maxRotX) / 2;\n let centerRotY = (minRotY + maxRotY) / 2;\n centerRotX += ((padding[1] - padding[3]) / 2) * resolution;\n centerRotY += ((padding[0] - padding[2]) / 2) * resolution;\n const centerX = centerRotX * cosAngle - centerRotY * sinAngle;\n const centerY = centerRotY * cosAngle + centerRotX * sinAngle;\n const center = this.getConstrainedCenter([centerX, centerY], resolution);\n const callback = options.callback ? options.callback : VOID;\n\n if (options.duration !== undefined) {\n this.animateInternal(\n {\n resolution: resolution,\n center: center,\n duration: options.duration,\n easing: options.easing,\n },\n callback\n );\n } else {\n this.targetResolution_ = resolution;\n this.targetCenter_ = center;\n this.applyTargetState_(false, true);\n animationCallback(callback, true);\n }\n }\n\n /**\n * Center on coordinate and view position.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"./size.js\").Size} size Box pixel size.\n * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n * @api\n */\n centerOn(coordinate, size, position) {\n this.centerOnInternal(\n fromUserCoordinate(coordinate, this.getProjection()),\n size,\n position\n );\n }\n\n /**\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"./size.js\").Size} size Box pixel size.\n * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n */\n centerOnInternal(coordinate, size, position) {\n this.setCenterInternal(\n calculateCenterOn(\n coordinate,\n size,\n position,\n this.getResolution(),\n this.getRotation()\n )\n );\n }\n\n /**\n * Calculates the shift between map and viewport center.\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<number>|undefined} Center shift.\n */\n calculateCenterShift(center, resolution, rotation, size) {\n let centerShift;\n const padding = this.padding;\n if (padding && center) {\n const reducedSize = this.getViewportSizeMinusPadding_(-rotation);\n const shiftedCenter = calculateCenterOn(\n center,\n size,\n [reducedSize[0] / 2 + padding[3], reducedSize[1] / 2 + padding[0]],\n resolution,\n rotation\n );\n centerShift = [\n center[0] - shiftedCenter[0],\n center[1] - shiftedCenter[1],\n ];\n }\n return centerShift;\n }\n\n /**\n * @return {boolean} Is defined.\n */\n isDef() {\n return !!this.getCenterInternal() && this.getResolution() !== undefined;\n }\n\n /**\n * Adds relative coordinates to the center of the view. Any extent constraint will apply.\n * @param {import(\"./coordinate.js\").Coordinate} deltaCoordinates Relative value to add.\n * @api\n */\n adjustCenter(deltaCoordinates) {\n const center = toUserCoordinate(this.targetCenter_, this.getProjection());\n this.setCenter([\n center[0] + deltaCoordinates[0],\n center[1] + deltaCoordinates[1],\n ]);\n }\n\n /**\n * Adds relative coordinates to the center of the view. Any extent constraint will apply.\n * @param {import(\"./coordinate.js\").Coordinate} deltaCoordinates Relative value to add.\n */\n adjustCenterInternal(deltaCoordinates) {\n const center = this.targetCenter_;\n this.setCenterInternal([\n center[0] + deltaCoordinates[0],\n center[1] + deltaCoordinates[1],\n ]);\n }\n\n /**\n * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution\n * constraint will apply.\n * @param {number} ratio The ratio to apply on the view resolution.\n * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n * @api\n */\n adjustResolution(ratio, opt_anchor) {\n const anchor =\n opt_anchor && fromUserCoordinate(opt_anchor, this.getProjection());\n this.adjustResolutionInternal(ratio, anchor);\n }\n\n /**\n * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution\n * constraint will apply.\n * @param {number} ratio The ratio to apply on the view resolution.\n * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n */\n adjustResolutionInternal(ratio, opt_anchor) {\n const isMoving = this.getAnimating() || this.getInteracting();\n const size = this.getViewportSize_(this.getRotation());\n const newResolution = this.constraints_.resolution(\n this.targetResolution_ * ratio,\n 0,\n size,\n isMoving\n );\n\n if (opt_anchor) {\n this.targetCenter_ = this.calculateCenterZoom(newResolution, opt_anchor);\n }\n\n this.targetResolution_ *= ratio;\n this.applyTargetState_();\n }\n\n /**\n * Adds a value to the view zoom level, optionally using an anchor. Any resolution\n * constraint will apply.\n * @param {number} delta Relative value to add to the zoom level.\n * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n * @api\n */\n adjustZoom(delta, opt_anchor) {\n this.adjustResolution(Math.pow(this.zoomFactor_, -delta), opt_anchor);\n }\n\n /**\n * Adds a value to the view rotation, optionally using an anchor. Any rotation\n * constraint will apply.\n * @param {number} delta Relative value to add to the zoom rotation, in radians.\n * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The rotation center.\n * @api\n */\n adjustRotation(delta, opt_anchor) {\n if (opt_anchor) {\n opt_anchor = fromUserCoordinate(opt_anchor, this.getProjection());\n }\n this.adjustRotationInternal(delta, opt_anchor);\n }\n\n /**\n * @param {number} delta Relative value to add to the zoom rotation, in radians.\n * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The rotation center.\n */\n adjustRotationInternal(delta, opt_anchor) {\n const isMoving = this.getAnimating() || this.getInteracting();\n const newRotation = this.constraints_.rotation(\n this.targetRotation_ + delta,\n isMoving\n );\n if (opt_anchor) {\n this.targetCenter_ = this.calculateCenterRotate(newRotation, opt_anchor);\n }\n this.targetRotation_ += delta;\n this.applyTargetState_();\n }\n\n /**\n * Set the center of the current view. Any extent constraint will apply.\n * @param {import(\"./coordinate.js\").Coordinate|undefined} center The center of the view.\n * @observable\n * @api\n */\n setCenter(center) {\n this.setCenterInternal(fromUserCoordinate(center, this.getProjection()));\n }\n\n /**\n * Set the center using the view projection (not the user projection).\n * @param {import(\"./coordinate.js\").Coordinate|undefined} center The center of the view.\n */\n setCenterInternal(center) {\n this.targetCenter_ = center;\n this.applyTargetState_();\n }\n\n /**\n * @param {import(\"./ViewHint.js\").default} hint Hint.\n * @param {number} delta Delta.\n * @return {number} New value.\n */\n setHint(hint, delta) {\n this.hints_[hint] += delta;\n this.changed();\n return this.hints_[hint];\n }\n\n /**\n * Set the resolution for this view. Any resolution constraint will apply.\n * @param {number|undefined} resolution The resolution of the view.\n * @observable\n * @api\n */\n setResolution(resolution) {\n this.targetResolution_ = resolution;\n this.applyTargetState_();\n }\n\n /**\n * Set the rotation for this view. Any rotation constraint will apply.\n * @param {number} rotation The rotation of the view in radians.\n * @observable\n * @api\n */\n setRotation(rotation) {\n this.targetRotation_ = rotation;\n this.applyTargetState_();\n }\n\n /**\n * Zoom to a specific zoom level. Any resolution constrain will apply.\n * @param {number} zoom Zoom level.\n * @api\n */\n setZoom(zoom) {\n this.setResolution(this.getResolutionForZoom(zoom));\n }\n\n /**\n * Recompute rotation/resolution/center based on target values.\n * Note: we have to compute rotation first, then resolution and center considering that\n * parameters can influence one another in case a view extent constraint is present.\n * @param {boolean=} opt_doNotCancelAnims Do not cancel animations.\n * @param {boolean=} opt_forceMoving Apply constraints as if the view is moving.\n * @private\n */\n applyTargetState_(opt_doNotCancelAnims, opt_forceMoving) {\n const isMoving =\n this.getAnimating() || this.getInteracting() || opt_forceMoving;\n\n // compute rotation\n const newRotation = this.constraints_.rotation(\n this.targetRotation_,\n isMoving\n );\n const size = this.getViewportSize_(newRotation);\n const newResolution = this.constraints_.resolution(\n this.targetResolution_,\n 0,\n size,\n isMoving\n );\n const newCenter = this.constraints_.center(\n this.targetCenter_,\n newResolution,\n size,\n isMoving,\n this.calculateCenterShift(\n this.targetCenter_,\n newResolution,\n newRotation,\n size\n )\n );\n\n if (this.get(ViewProperty.ROTATION) !== newRotation) {\n this.set(ViewProperty.ROTATION, newRotation);\n }\n if (this.get(ViewProperty.RESOLUTION) !== newResolution) {\n this.set(ViewProperty.RESOLUTION, newResolution);\n }\n if (\n !this.get(ViewProperty.CENTER) ||\n !equals(this.get(ViewProperty.CENTER), newCenter)\n ) {\n this.set(ViewProperty.CENTER, newCenter);\n }\n\n if (this.getAnimating() && !opt_doNotCancelAnims) {\n this.cancelAnimations();\n }\n this.cancelAnchor_ = undefined;\n }\n\n /**\n * If any constraints need to be applied, an animation will be triggered.\n * This is typically done on interaction end.\n * Note: calling this with a duration of 0 will apply the constrained values straight away,\n * without animation.\n * @param {number=} opt_duration The animation duration in ms.\n * @param {number=} opt_resolutionDirection Which direction to zoom.\n * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n */\n resolveConstraints(opt_duration, opt_resolutionDirection, opt_anchor) {\n const duration = opt_duration !== undefined ? opt_duration : 200;\n const direction = opt_resolutionDirection || 0;\n\n const newRotation = this.constraints_.rotation(this.targetRotation_);\n const size = this.getViewportSize_(newRotation);\n const newResolution = this.constraints_.resolution(\n this.targetResolution_,\n direction,\n size\n );\n const newCenter = this.constraints_.center(\n this.targetCenter_,\n newResolution,\n size,\n false,\n this.calculateCenterShift(\n this.targetCenter_,\n newResolution,\n newRotation,\n size\n )\n );\n\n if (duration === 0 && !this.cancelAnchor_) {\n this.targetResolution_ = newResolution;\n this.targetRotation_ = newRotation;\n this.targetCenter_ = newCenter;\n this.applyTargetState_();\n return;\n }\n\n const anchor =\n opt_anchor || (duration === 0 ? this.cancelAnchor_ : undefined);\n this.cancelAnchor_ = undefined;\n\n if (\n this.getResolution() !== newResolution ||\n this.getRotation() !== newRotation ||\n !this.getCenterInternal() ||\n !equals(this.getCenterInternal(), newCenter)\n ) {\n if (this.getAnimating()) {\n this.cancelAnimations();\n }\n\n this.animateInternal({\n rotation: newRotation,\n center: newCenter,\n resolution: newResolution,\n duration: duration,\n easing: easeOut,\n anchor: anchor,\n });\n }\n }\n\n /**\n * Notify the View that an interaction has started.\n * The view state will be resolved to a stable one if needed\n * (depending on its constraints).\n * @api\n */\n beginInteraction() {\n this.resolveConstraints(0);\n\n this.setHint(ViewHint.INTERACTING, 1);\n }\n\n /**\n * Notify the View that an interaction has ended. The view state will be resolved\n * to a stable one if needed (depending on its constraints).\n * @param {number=} opt_duration Animation duration in ms.\n * @param {number=} opt_resolutionDirection Which direction to zoom.\n * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n * @api\n */\n endInteraction(opt_duration, opt_resolutionDirection, opt_anchor) {\n const anchor =\n opt_anchor && fromUserCoordinate(opt_anchor, this.getProjection());\n this.endInteractionInternal(opt_duration, opt_resolutionDirection, anchor);\n }\n\n /**\n * Notify the View that an interaction has ended. The view state will be resolved\n * to a stable one if needed (depending on its constraints).\n * @param {number=} opt_duration Animation duration in ms.\n * @param {number=} opt_resolutionDirection Which direction to zoom.\n * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n */\n endInteractionInternal(opt_duration, opt_resolutionDirection, opt_anchor) {\n this.setHint(ViewHint.INTERACTING, -1);\n\n this.resolveConstraints(opt_duration, opt_resolutionDirection, opt_anchor);\n }\n\n /**\n * Get a valid position for the view center according to the current constraints.\n * @param {import(\"./coordinate.js\").Coordinate|undefined} targetCenter Target center position.\n * @param {number=} opt_targetResolution Target resolution. If not supplied, the current one will be used.\n * This is useful to guess a valid center position at a different zoom level.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Valid center position.\n */\n getConstrainedCenter(targetCenter, opt_targetResolution) {\n const size = this.getViewportSize_(this.getRotation());\n return this.constraints_.center(\n targetCenter,\n opt_targetResolution || this.getResolution(),\n size\n );\n }\n\n /**\n * Get a valid zoom level according to the current view constraints.\n * @param {number|undefined} targetZoom Target zoom.\n * @param {number=} [opt_direction=0] Indicate which resolution should be used\n * by a renderer if the view resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n * @return {number|undefined} Valid zoom level.\n */\n getConstrainedZoom(targetZoom, opt_direction) {\n const targetRes = this.getResolutionForZoom(targetZoom);\n return this.getZoomForResolution(\n this.getConstrainedResolution(targetRes, opt_direction)\n );\n }\n\n /**\n * Get a valid resolution according to the current view constraints.\n * @param {number|undefined} targetResolution Target resolution.\n * @param {number=} [opt_direction=0] Indicate which resolution should be used\n * by a renderer if the view resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n * @return {number|undefined} Valid resolution.\n */\n getConstrainedResolution(targetResolution, opt_direction) {\n const direction = opt_direction || 0;\n const size = this.getViewportSize_(this.getRotation());\n\n return this.constraints_.resolution(targetResolution, direction, size);\n }\n}\n\n/**\n * @param {Function} callback Callback.\n * @param {*} returnValue Return value.\n */\nfunction animationCallback(callback, returnValue) {\n setTimeout(function () {\n callback(returnValue);\n }, 0);\n}\n\n/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./centerconstraint.js\").Type} The constraint.\n */\nexport function createCenterConstraint(options) {\n if (options.extent !== undefined) {\n const smooth =\n options.smoothExtentConstraint !== undefined\n ? options.smoothExtentConstraint\n : true;\n return createExtent(options.extent, options.constrainOnlyCenter, smooth);\n }\n\n const projection = createProjection(options.projection, 'EPSG:3857');\n if (options.multiWorld !== true && projection.isGlobal()) {\n const extent = projection.getExtent().slice();\n extent[0] = -Infinity;\n extent[2] = Infinity;\n return createExtent(extent, false, false);\n }\n\n return centerNone;\n}\n\n/**\n * @param {ViewOptions} options View options.\n * @return {{constraint: import(\"./resolutionconstraint.js\").Type, maxResolution: number,\n * minResolution: number, minZoom: number, zoomFactor: number}} The constraint.\n */\nexport function createResolutionConstraint(options) {\n let resolutionConstraint;\n let maxResolution;\n let minResolution;\n\n // TODO: move these to be ol constants\n // see https://github.com/openlayers/openlayers/issues/2076\n const defaultMaxZoom = 28;\n const defaultZoomFactor = 2;\n\n let minZoom =\n options.minZoom !== undefined ? options.minZoom : DEFAULT_MIN_ZOOM;\n\n let maxZoom =\n options.maxZoom !== undefined ? options.maxZoom : defaultMaxZoom;\n\n const zoomFactor =\n options.zoomFactor !== undefined ? options.zoomFactor : defaultZoomFactor;\n\n const multiWorld =\n options.multiWorld !== undefined ? options.multiWorld : false;\n\n const smooth =\n options.smoothResolutionConstraint !== undefined\n ? options.smoothResolutionConstraint\n : true;\n\n const showFullExtent =\n options.showFullExtent !== undefined ? options.showFullExtent : false;\n\n const projection = createProjection(options.projection, 'EPSG:3857');\n const projExtent = projection.getExtent();\n let constrainOnlyCenter = options.constrainOnlyCenter;\n let extent = options.extent;\n if (!multiWorld && !extent && projection.isGlobal()) {\n constrainOnlyCenter = false;\n extent = projExtent;\n }\n\n if (options.resolutions !== undefined) {\n const resolutions = options.resolutions;\n maxResolution = resolutions[minZoom];\n minResolution =\n resolutions[maxZoom] !== undefined\n ? resolutions[maxZoom]\n : resolutions[resolutions.length - 1];\n\n if (options.constrainResolution) {\n resolutionConstraint = createSnapToResolutions(\n resolutions,\n smooth,\n !constrainOnlyCenter && extent,\n showFullExtent\n );\n } else {\n resolutionConstraint = createMinMaxResolution(\n maxResolution,\n minResolution,\n smooth,\n !constrainOnlyCenter && extent,\n showFullExtent\n );\n }\n } else {\n // calculate the default min and max resolution\n const size = !projExtent\n ? // use an extent that can fit the whole world if need be\n (360 * METERS_PER_UNIT[Units.DEGREES]) / projection.getMetersPerUnit()\n : Math.max(getWidth(projExtent), getHeight(projExtent));\n\n const defaultMaxResolution =\n size / DEFAULT_TILE_SIZE / Math.pow(defaultZoomFactor, DEFAULT_MIN_ZOOM);\n\n const defaultMinResolution =\n defaultMaxResolution /\n Math.pow(defaultZoomFactor, defaultMaxZoom - DEFAULT_MIN_ZOOM);\n\n // user provided maxResolution takes precedence\n maxResolution = options.maxResolution;\n if (maxResolution !== undefined) {\n minZoom = 0;\n } else {\n maxResolution = defaultMaxResolution / Math.pow(zoomFactor, minZoom);\n }\n\n // user provided minResolution takes precedence\n minResolution = options.minResolution;\n if (minResolution === undefined) {\n if (options.maxZoom !== undefined) {\n if (options.maxResolution !== undefined) {\n minResolution = maxResolution / Math.pow(zoomFactor, maxZoom);\n } else {\n minResolution = defaultMaxResolution / Math.pow(zoomFactor, maxZoom);\n }\n } else {\n minResolution = defaultMinResolution;\n }\n }\n\n // given discrete zoom levels, minResolution may be different than provided\n maxZoom =\n minZoom +\n Math.floor(\n Math.log(maxResolution / minResolution) / Math.log(zoomFactor)\n );\n minResolution = maxResolution / Math.pow(zoomFactor, maxZoom - minZoom);\n\n if (options.constrainResolution) {\n resolutionConstraint = createSnapToPower(\n zoomFactor,\n maxResolution,\n minResolution,\n smooth,\n !constrainOnlyCenter && extent,\n showFullExtent\n );\n } else {\n resolutionConstraint = createMinMaxResolution(\n maxResolution,\n minResolution,\n smooth,\n !constrainOnlyCenter && extent,\n showFullExtent\n );\n }\n }\n return {\n constraint: resolutionConstraint,\n maxResolution: maxResolution,\n minResolution: minResolution,\n minZoom: minZoom,\n zoomFactor: zoomFactor,\n };\n}\n\n/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./rotationconstraint.js\").Type} Rotation constraint.\n */\nexport function createRotationConstraint(options) {\n const enableRotation =\n options.enableRotation !== undefined ? options.enableRotation : true;\n if (enableRotation) {\n const constrainRotation = options.constrainRotation;\n if (constrainRotation === undefined || constrainRotation === true) {\n return createSnapToZero();\n } else if (constrainRotation === false) {\n return rotationNone;\n } else if (typeof constrainRotation === 'number') {\n return createSnapToN(constrainRotation);\n } else {\n return rotationNone;\n }\n } else {\n return disable;\n }\n}\n\n/**\n * Determine if an animation involves no view change.\n * @param {Animation} animation The animation.\n * @return {boolean} The animation involves no view change.\n */\nexport function isNoopAnimation(animation) {\n if (animation.sourceCenter && animation.targetCenter) {\n if (!coordinatesEqual(animation.sourceCenter, animation.targetCenter)) {\n return false;\n }\n }\n if (animation.sourceResolution !== animation.targetResolution) {\n return false;\n }\n if (animation.sourceRotation !== animation.targetRotation) {\n return false;\n }\n return true;\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"./size.js\").Size} size Box pixel size.\n * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @return {import(\"./coordinate.js\").Coordinate} Shifted center.\n */\nfunction calculateCenterOn(coordinate, size, position, resolution, rotation) {\n // calculate rotated position\n const cosAngle = Math.cos(-rotation);\n let sinAngle = Math.sin(-rotation);\n let rotX = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n let rotY = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n rotX += (size[0] / 2 - position[0]) * resolution;\n rotY += (position[1] - size[1] / 2) * resolution;\n\n // go back to original angle\n sinAngle = -sinAngle; // go back to original rotation\n const centerX = rotX * cosAngle - rotY * sinAngle;\n const centerY = rotY * cosAngle + rotX * sinAngle;\n\n return [centerX, centerY];\n}\n\nexport default View;\n","/**\n * @module ol/PluggableMap\n */\nimport BaseObject, {getChangeEventType} from './Object.js';\nimport Collection from './Collection.js';\nimport CollectionEventType from './CollectionEventType.js';\nimport EventType from './events/EventType.js';\nimport LayerGroup from './layer/Group.js';\nimport MapBrowserEvent from './MapBrowserEvent.js';\nimport MapBrowserEventHandler from './MapBrowserEventHandler.js';\nimport MapBrowserEventType from './MapBrowserEventType.js';\nimport MapEvent from './MapEvent.js';\nimport MapEventType from './MapEventType.js';\nimport MapProperty from './MapProperty.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport PointerEventType from './pointer/EventType.js';\nimport RenderEventType from './render/EventType.js';\nimport TileQueue, {getTilePriority} from './TileQueue.js';\nimport View from './View.js';\nimport ViewHint from './ViewHint.js';\nimport {\n DEVICE_PIXEL_RATIO,\n IMAGE_DECODE,\n PASSIVE_EVENT_LISTENERS,\n} from './has.js';\nimport {TRUE} from './functions.js';\nimport {\n apply as applyTransform,\n create as createTransform,\n} from './transform.js';\nimport {assert} from './asserts.js';\nimport {\n clone,\n createOrUpdateEmpty,\n equals,\n getForViewAndSize,\n isEmpty,\n} from './extent.js';\nimport {fromUserCoordinate, toUserCoordinate} from './proj.js';\nimport {hasArea} from './size.js';\nimport {listen, unlistenByKey} from './events.js';\nimport {removeNode} from './dom.js';\n\n/**\n * State of the current frame. Only `pixelRatio`, `time` and `viewState` should\n * be used in applications.\n * @typedef {Object} FrameState\n * @property {number} pixelRatio The pixel ratio of the frame.\n * @property {number} time The time when rendering of the frame was requested.\n * @property {import(\"./View.js\").State} viewState The state of the current view.\n * @property {boolean} animate\n * @property {import(\"./transform.js\").Transform} coordinateToPixelTransform\n * @property {import(\"rbush\").default} declutterTree\n * @property {null|import(\"./extent.js\").Extent} extent\n * @property {number} index\n * @property {Array<import(\"./layer/Layer.js\").State>} layerStatesArray\n * @property {number} layerIndex\n * @property {import(\"./transform.js\").Transform} pixelToCoordinateTransform\n * @property {Array<PostRenderFunction>} postRenderFunctions\n * @property {import(\"./size.js\").Size} size\n * @property {TileQueue} tileQueue\n * @property {!Object<string, Object<string, boolean>>} usedTiles\n * @property {Array<number>} viewHints\n * @property {!Object<string, Object<string, boolean>>} wantedTiles\n */\n\n/**\n * @typedef {function(PluggableMap, ?FrameState): any} PostRenderFunction\n */\n\n/**\n * @typedef {Object} AtPixelOptions\n * @property {undefined|function(import(\"./layer/Layer.js\").default): boolean} [layerFilter] Layer filter\n * function. The filter function will receive one argument, the\n * {@link module:ol/layer/Layer layer-candidate} and it should return a boolean value.\n * Only layers which are visible and for which this function returns `true`\n * will be tested for features. By default, all visible layers will be tested.\n * @property {number} [hitTolerance=0] Hit-detection tolerance in css pixels. Pixels\n * inside the radius around the given position will be checked for features.\n * @property {boolean} [checkWrapped=true] Check-Wrapped Will check for for wrapped geometries inside the range of\n * +/- 1 world width. Works only if a projection is used that can be wrapped.\n */\n\n/**\n * @typedef {Object} MapOptionsInternal\n * @property {Collection<import(\"./control/Control.js\").default>} [controls]\n * @property {Collection<import(\"./interaction/Interaction.js\").default>} [interactions]\n * @property {HTMLElement|Document} keyboardEventTarget\n * @property {Collection<import(\"./Overlay.js\").default>} overlays\n * @property {Object<string, *>} values\n */\n\n/**\n * Object literal with config options for the map.\n * @typedef {Object} MapOptions\n * @property {Collection<import(\"./control/Control.js\").default>|Array<import(\"./control/Control.js\").default>} [controls]\n * Controls initially added to the map. If not specified,\n * {@link module:ol/control~defaults} is used.\n * @property {number} [pixelRatio=window.devicePixelRatio] The ratio between\n * physical pixels and device-independent pixels (dips) on the device.\n * @property {Collection<import(\"./interaction/Interaction.js\").default>|Array<import(\"./interaction/Interaction.js\").default>} [interactions]\n * Interactions that are initially added to the map. If not specified,\n * {@link module:ol/interaction~defaults} is used.\n * @property {HTMLElement|Document|string} [keyboardEventTarget] The element to\n * listen to keyboard events on. This determines when the `KeyboardPan` and\n * `KeyboardZoom` interactions trigger. For example, if this option is set to\n * `document` the keyboard interactions will always trigger. If this option is\n * not specified, the element the library listens to keyboard events on is the\n * map target (i.e. the user-provided div for the map). If this is not\n * `document`, the target element needs to be focused for key events to be\n * emitted, requiring that the target element has a `tabindex` attribute.\n * @property {Array<import(\"./layer/Base.js\").default>|Collection<import(\"./layer/Base.js\").default>|LayerGroup} [layers]\n * Layers. If this is not defined, a map with no layers will be rendered. Note\n * that layers are rendered in the order supplied, so if you want, for example,\n * a vector layer to appear on top of a tile layer, it must come after the tile\n * layer.\n * @property {number} [maxTilesLoading=16] Maximum number tiles to load\n * simultaneously.\n * @property {number} [moveTolerance=1] The minimum distance in pixels the\n * cursor must move to be detected as a map move event instead of a click.\n * Increasing this value can make it easier to click on the map.\n * @property {Collection<import(\"./Overlay.js\").default>|Array<import(\"./Overlay.js\").default>} [overlays]\n * Overlays initially added to the map. By default, no overlays are added.\n * @property {HTMLElement|string} [target] The container for the map, either the\n * element itself or the `id` of the element. If not specified at construction\n * time, {@link module:ol/Map~Map#setTarget} must be called for the map to be\n * rendered. If passed by element, the container can be in a secondary document.\n * @property {View} [view] The map's view. No layer sources will be\n * fetched unless this is specified at construction time or through\n * {@link module:ol/Map~Map#setView}.\n */\n\n/**\n * @fires import(\"./MapBrowserEvent.js\").MapBrowserEvent\n * @fires import(\"./MapEvent.js\").MapEvent\n * @fires import(\"./render/Event.js\").default#precompose\n * @fires import(\"./render/Event.js\").default#postcompose\n * @fires import(\"./render/Event.js\").default#rendercomplete\n * @api\n */\nclass PluggableMap extends BaseObject {\n /**\n * @param {MapOptions} options Map options.\n */\n constructor(options) {\n super();\n\n const optionsInternal = createOptionsInternal(options);\n\n /** @private */\n this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this);\n\n /**\n * @type {number}\n * @private\n */\n this.maxTilesLoading_ =\n options.maxTilesLoading !== undefined ? options.maxTilesLoading : 16;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ =\n options.pixelRatio !== undefined\n ? options.pixelRatio\n : DEVICE_PIXEL_RATIO;\n\n /**\n * @private\n * @type {*}\n */\n this.postRenderTimeoutHandle_;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.animationDelayKey_;\n\n /**\n * @private\n */\n this.animationDelay_ = /** @this {PluggableMap} */ function () {\n this.animationDelayKey_ = undefined;\n this.renderFrame_(Date.now());\n }.bind(this);\n\n /**\n * @private\n * @type {import(\"./transform.js\").Transform}\n */\n this.coordinateToPixelTransform_ = createTransform();\n\n /**\n * @private\n * @type {import(\"./transform.js\").Transform}\n */\n this.pixelToCoordinateTransform_ = createTransform();\n\n /**\n * @private\n * @type {number}\n */\n this.frameIndex_ = 0;\n\n /**\n * @private\n * @type {?FrameState}\n */\n this.frameState_ = null;\n\n /**\n * The extent at the previous 'moveend' event.\n * @private\n * @type {import(\"./extent.js\").Extent}\n */\n this.previousExtent_ = null;\n\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.viewPropertyListenerKey_ = null;\n\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.viewChangeListenerKey_ = null;\n\n /**\n * @private\n * @type {?Array<import(\"./events.js\").EventsKey>}\n */\n this.layerGroupPropertyListenerKeys_ = null;\n\n /**\n * @private\n * @type {!HTMLElement}\n */\n this.viewport_ = document.createElement('div');\n this.viewport_.className =\n 'ol-viewport' + ('ontouchstart' in window ? ' ol-touch' : '');\n this.viewport_.style.position = 'relative';\n this.viewport_.style.overflow = 'hidden';\n this.viewport_.style.width = '100%';\n this.viewport_.style.height = '100%';\n\n /**\n * @private\n * @type {!HTMLElement}\n */\n this.overlayContainer_ = document.createElement('div');\n this.overlayContainer_.style.position = 'absolute';\n this.overlayContainer_.style.zIndex = '0';\n this.overlayContainer_.style.width = '100%';\n this.overlayContainer_.style.height = '100%';\n this.overlayContainer_.style.pointerEvents = 'none';\n this.overlayContainer_.className = 'ol-overlaycontainer';\n this.viewport_.appendChild(this.overlayContainer_);\n\n /**\n * @private\n * @type {!HTMLElement}\n */\n this.overlayContainerStopEvent_ = document.createElement('div');\n this.overlayContainerStopEvent_.style.position = 'absolute';\n this.overlayContainerStopEvent_.style.zIndex = '0';\n this.overlayContainerStopEvent_.style.width = '100%';\n this.overlayContainerStopEvent_.style.height = '100%';\n this.overlayContainerStopEvent_.style.pointerEvents = 'none';\n this.overlayContainerStopEvent_.className = 'ol-overlaycontainer-stopevent';\n this.viewport_.appendChild(this.overlayContainerStopEvent_);\n\n /**\n * @private\n * @type {MapBrowserEventHandler}\n */\n this.mapBrowserEventHandler_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.moveTolerance_ = options.moveTolerance;\n\n /**\n * @private\n * @type {HTMLElement|Document}\n */\n this.keyboardEventTarget_ = optionsInternal.keyboardEventTarget;\n\n /**\n * @private\n * @type {?Array<import(\"./events.js\").EventsKey>}\n */\n this.keyHandlerKeys_ = null;\n\n /**\n * @type {Collection<import(\"./control/Control.js\").default>}\n * @protected\n */\n this.controls = optionsInternal.controls || new Collection();\n\n /**\n * @type {Collection<import(\"./interaction/Interaction.js\").default>}\n * @protected\n */\n this.interactions = optionsInternal.interactions || new Collection();\n\n /**\n * @type {Collection<import(\"./Overlay.js\").default>}\n * @private\n */\n this.overlays_ = optionsInternal.overlays;\n\n /**\n * A lookup of overlays by id.\n * @private\n * @type {Object<string, import(\"./Overlay.js\").default>}\n */\n this.overlayIdIndex_ = {};\n\n /**\n * @type {import(\"./renderer/Map.js\").default}\n * @private\n */\n this.renderer_ = null;\n\n /**\n * @type {undefined|function(Event): void}\n * @private\n */\n this.handleResize_;\n\n /**\n * @private\n * @type {!Array<PostRenderFunction>}\n */\n this.postRenderFunctions_ = [];\n\n /**\n * @private\n * @type {TileQueue}\n */\n this.tileQueue_ = new TileQueue(\n this.getTilePriority.bind(this),\n this.handleTileChange_.bind(this)\n );\n\n this.addEventListener(\n getChangeEventType(MapProperty.LAYERGROUP),\n this.handleLayerGroupChanged_\n );\n this.addEventListener(\n getChangeEventType(MapProperty.VIEW),\n this.handleViewChanged_\n );\n this.addEventListener(\n getChangeEventType(MapProperty.SIZE),\n this.handleSizeChanged_\n );\n this.addEventListener(\n getChangeEventType(MapProperty.TARGET),\n this.handleTargetChanged_\n );\n\n // setProperties will trigger the rendering of the map if the map\n // is \"defined\" already.\n this.setProperties(optionsInternal.values);\n\n this.controls.forEach(\n /**\n * @param {import(\"./control/Control.js\").default} control Control.\n * @this {PluggableMap}\n */\n function (control) {\n control.setMap(this);\n }.bind(this)\n );\n\n this.controls.addEventListener(\n CollectionEventType.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function (event) {\n event.element.setMap(this);\n }.bind(this)\n );\n\n this.controls.addEventListener(\n CollectionEventType.REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function (event) {\n event.element.setMap(null);\n }.bind(this)\n );\n\n this.interactions.forEach(\n /**\n * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction.\n * @this {PluggableMap}\n */\n function (interaction) {\n interaction.setMap(this);\n }.bind(this)\n );\n\n this.interactions.addEventListener(\n CollectionEventType.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function (event) {\n event.element.setMap(this);\n }.bind(this)\n );\n\n this.interactions.addEventListener(\n CollectionEventType.REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function (event) {\n event.element.setMap(null);\n }.bind(this)\n );\n\n this.overlays_.forEach(this.addOverlayInternal_.bind(this));\n\n this.overlays_.addEventListener(\n CollectionEventType.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function (event) {\n this.addOverlayInternal_(\n /** @type {import(\"./Overlay.js\").default} */ (event.element)\n );\n }.bind(this)\n );\n\n this.overlays_.addEventListener(\n CollectionEventType.REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function (event) {\n const overlay = /** @type {import(\"./Overlay.js\").default} */ (event.element);\n const id = overlay.getId();\n if (id !== undefined) {\n delete this.overlayIdIndex_[id.toString()];\n }\n event.element.setMap(null);\n }.bind(this)\n );\n }\n\n /**\n * @abstract\n * @return {import(\"./renderer/Map.js\").default} The map renderer\n */\n createRenderer() {\n throw new Error('Use a map type that has a createRenderer method');\n }\n\n /**\n * Add the given control to the map.\n * @param {import(\"./control/Control.js\").default} control Control.\n * @api\n */\n addControl(control) {\n this.getControls().push(control);\n }\n\n /**\n * Add the given interaction to the map. If you want to add an interaction\n * at another point of the collection use `getInteraction()` and the methods\n * available on {@link module:ol/Collection~Collection}. This can be used to\n * stop the event propagation from the handleEvent function. The interactions\n * get to handle the events in the reverse order of this collection.\n * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to add.\n * @api\n */\n addInteraction(interaction) {\n this.getInteractions().push(interaction);\n }\n\n /**\n * Adds the given layer to the top of this map. If you want to add a layer\n * elsewhere in the stack, use `getLayers()` and the methods available on\n * {@link module:ol/Collection~Collection}.\n * @param {import(\"./layer/Base.js\").default} layer Layer.\n * @api\n */\n addLayer(layer) {\n const layers = this.getLayerGroup().getLayers();\n layers.push(layer);\n }\n\n /**\n * Add the given overlay to the map.\n * @param {import(\"./Overlay.js\").default} overlay Overlay.\n * @api\n */\n addOverlay(overlay) {\n this.getOverlays().push(overlay);\n }\n\n /**\n * This deals with map's overlay collection changes.\n * @param {import(\"./Overlay.js\").default} overlay Overlay.\n * @private\n */\n addOverlayInternal_(overlay) {\n const id = overlay.getId();\n if (id !== undefined) {\n this.overlayIdIndex_[id.toString()] = overlay;\n }\n overlay.setMap(this);\n }\n\n /**\n *\n * Clean up.\n */\n disposeInternal() {\n this.setTarget(null);\n super.disposeInternal();\n }\n\n /**\n * Detect features that intersect a pixel on the viewport, and execute a\n * callback with each intersecting feature. Layers included in the detection can\n * be configured through the `layerFilter` option in `opt_options`.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n * @param {function(import(\"./Feature.js\").FeatureLike, import(\"./layer/Layer.js\").default, import(\"./geom/SimpleGeometry.js\").default): T} callback Feature callback. The callback will be\n * called with two arguments. The first argument is one\n * {@link module:ol/Feature feature} or\n * {@link module:ol/render/Feature render feature} at the pixel, the second is\n * the {@link module:ol/layer/Layer layer} of the feature and will be null for\n * unmanaged layers. To stop detection, callback functions can return a\n * truthy value.\n * @param {AtPixelOptions=} opt_options Optional options.\n * @return {T|undefined} Callback result, i.e. the return value of last\n * callback execution, or the first truthy callback return value.\n * @template S,T\n * @api\n */\n forEachFeatureAtPixel(pixel, callback, opt_options) {\n if (!this.frameState_) {\n return;\n }\n const coordinate = this.getCoordinateFromPixelInternal(pixel);\n opt_options = opt_options !== undefined ? opt_options : {};\n const hitTolerance =\n opt_options.hitTolerance !== undefined ? opt_options.hitTolerance : 0;\n const layerFilter =\n opt_options.layerFilter !== undefined ? opt_options.layerFilter : TRUE;\n const checkWrapped = opt_options.checkWrapped !== false;\n return this.renderer_.forEachFeatureAtCoordinate(\n coordinate,\n this.frameState_,\n hitTolerance,\n checkWrapped,\n callback,\n null,\n layerFilter,\n null\n );\n }\n\n /**\n * Get all features that intersect a pixel on the viewport.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n * @param {AtPixelOptions=} opt_options Optional options.\n * @return {Array<import(\"./Feature.js\").FeatureLike>} The detected features or\n * an empty array if none were found.\n * @api\n */\n getFeaturesAtPixel(pixel, opt_options) {\n const features = [];\n this.forEachFeatureAtPixel(\n pixel,\n function (feature) {\n features.push(feature);\n },\n opt_options\n );\n return features;\n }\n\n /**\n * Detect layers that have a color value at a pixel on the viewport, and\n * execute a callback with each matching layer. Layers included in the\n * detection can be configured through `opt_layerFilter`.\n *\n * Note: this may give false positives unless the map layers have had different `className`\n * properties assigned to them.\n *\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n * @param {function(this: S, import(\"./layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback\n * Layer callback. This callback will receive two arguments: first is the\n * {@link module:ol/layer/Layer layer}, second argument is an array representing\n * [R, G, B, A] pixel values (0 - 255) and will be `null` for layer types\n * that do not currently support this argument. To stop detection, callback\n * functions can return a truthy value.\n * @param {AtPixelOptions=} opt_options Configuration options.\n * @return {T|undefined} Callback result, i.e. the return value of last\n * callback execution, or the first truthy callback return value.\n * @template S,T\n * @api\n */\n forEachLayerAtPixel(pixel, callback, opt_options) {\n if (!this.frameState_) {\n return;\n }\n const options = opt_options || {};\n const hitTolerance =\n options.hitTolerance !== undefined ? options.hitTolerance : 0;\n const layerFilter = options.layerFilter || TRUE;\n return this.renderer_.forEachLayerAtPixel(\n pixel,\n this.frameState_,\n hitTolerance,\n callback,\n layerFilter\n );\n }\n\n /**\n * Detect if features intersect a pixel on the viewport. Layers included in the\n * detection can be configured through `opt_layerFilter`.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n * @param {AtPixelOptions=} opt_options Optional options.\n * @return {boolean} Is there a feature at the given pixel?\n * @api\n */\n hasFeatureAtPixel(pixel, opt_options) {\n if (!this.frameState_) {\n return false;\n }\n const coordinate = this.getCoordinateFromPixelInternal(pixel);\n opt_options = opt_options !== undefined ? opt_options : {};\n const layerFilter =\n opt_options.layerFilter !== undefined ? opt_options.layerFilter : TRUE;\n const hitTolerance =\n opt_options.hitTolerance !== undefined ? opt_options.hitTolerance : 0;\n const checkWrapped = opt_options.checkWrapped !== false;\n return this.renderer_.hasFeatureAtCoordinate(\n coordinate,\n this.frameState_,\n hitTolerance,\n checkWrapped,\n layerFilter,\n null\n );\n }\n\n /**\n * Returns the coordinate in user projection for a browser event.\n * @param {MouseEvent} event Event.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n * @api\n */\n getEventCoordinate(event) {\n return this.getCoordinateFromPixel(this.getEventPixel(event));\n }\n\n /**\n * Returns the coordinate in view projection for a browser event.\n * @param {MouseEvent} event Event.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n */\n getEventCoordinateInternal(event) {\n return this.getCoordinateFromPixelInternal(this.getEventPixel(event));\n }\n\n /**\n * Returns the map pixel position for a browser event relative to the viewport.\n * @param {UIEvent} event Event.\n * @return {import(\"./pixel.js\").Pixel} Pixel.\n * @api\n */\n getEventPixel(event) {\n const viewportPosition = this.viewport_.getBoundingClientRect();\n const eventPosition =\n //FIXME Are we really calling this with a TouchEvent anywhere?\n 'changedTouches' in event\n ? /** @type {TouchEvent} */ (event).changedTouches[0]\n : /** @type {MouseEvent} */ (event);\n\n return [\n eventPosition.clientX - viewportPosition.left,\n eventPosition.clientY - viewportPosition.top,\n ];\n }\n\n /**\n * Get the target in which this map is rendered.\n * Note that this returns what is entered as an option or in setTarget:\n * if that was an element, it returns an element; if a string, it returns that.\n * @return {HTMLElement|string|undefined} The Element or id of the Element that the\n * map is rendered in.\n * @observable\n * @api\n */\n getTarget() {\n return /** @type {HTMLElement|string|undefined} */ (this.get(\n MapProperty.TARGET\n ));\n }\n\n /**\n * Get the DOM element into which this map is rendered. In contrast to\n * `getTarget` this method always return an `Element`, or `null` if the\n * map has no target.\n * @return {HTMLElement} The element that the map is rendered in.\n * @api\n */\n getTargetElement() {\n const target = this.getTarget();\n if (target !== undefined) {\n return typeof target === 'string'\n ? document.getElementById(target)\n : target;\n } else {\n return null;\n }\n }\n\n /**\n * Get the coordinate for a given pixel. This returns a coordinate in the\n * user projection.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel position in the map viewport.\n * @return {import(\"./coordinate.js\").Coordinate} The coordinate for the pixel position.\n * @api\n */\n getCoordinateFromPixel(pixel) {\n return toUserCoordinate(\n this.getCoordinateFromPixelInternal(pixel),\n this.getView().getProjection()\n );\n }\n\n /**\n * Get the coordinate for a given pixel. This returns a coordinate in the\n * map view projection.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel position in the map viewport.\n * @return {import(\"./coordinate.js\").Coordinate} The coordinate for the pixel position.\n */\n getCoordinateFromPixelInternal(pixel) {\n const frameState = this.frameState_;\n if (!frameState) {\n return null;\n } else {\n return applyTransform(\n frameState.pixelToCoordinateTransform,\n pixel.slice()\n );\n }\n }\n\n /**\n * Get the map controls. Modifying this collection changes the controls\n * associated with the map.\n * @return {Collection<import(\"./control/Control.js\").default>} Controls.\n * @api\n */\n getControls() {\n return this.controls;\n }\n\n /**\n * Get the map overlays. Modifying this collection changes the overlays\n * associated with the map.\n * @return {Collection<import(\"./Overlay.js\").default>} Overlays.\n * @api\n */\n getOverlays() {\n return this.overlays_;\n }\n\n /**\n * Get an overlay by its identifier (the value returned by overlay.getId()).\n * Note that the index treats string and numeric identifiers as the same. So\n * `map.getOverlayById(2)` will return an overlay with id `'2'` or `2`.\n * @param {string|number} id Overlay identifier.\n * @return {import(\"./Overlay.js\").default} Overlay.\n * @api\n */\n getOverlayById(id) {\n const overlay = this.overlayIdIndex_[id.toString()];\n return overlay !== undefined ? overlay : null;\n }\n\n /**\n * Get the map interactions. Modifying this collection changes the interactions\n * associated with the map.\n *\n * Interactions are used for e.g. pan, zoom and rotate.\n * @return {Collection<import(\"./interaction/Interaction.js\").default>} Interactions.\n * @api\n */\n getInteractions() {\n return this.interactions;\n }\n\n /**\n * Get the layergroup associated with this map.\n * @return {LayerGroup} A layer group containing the layers in this map.\n * @observable\n * @api\n */\n getLayerGroup() {\n return /** @type {LayerGroup} */ (this.get(MapProperty.LAYERGROUP));\n }\n\n /**\n * Get the collection of layers associated with this map.\n * @return {!Collection<import(\"./layer/Base.js\").default>} Layers.\n * @api\n */\n getLayers() {\n const layers = this.getLayerGroup().getLayers();\n return layers;\n }\n\n /**\n * @return {boolean} Layers have sources that are still loading.\n */\n getLoading() {\n const layerStatesArray = this.getLayerGroup().getLayerStatesArray();\n for (let i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n const layer = layerStatesArray[i].layer;\n const source = /** @type {import(\"./layer/Layer.js\").default} */ (layer).getSource();\n if (source && source.loading) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Get the pixel for a coordinate. This takes a coordinate in the user\n * projection and returns the corresponding pixel.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate A map coordinate.\n * @return {import(\"./pixel.js\").Pixel} A pixel position in the map viewport.\n * @api\n */\n getPixelFromCoordinate(coordinate) {\n const viewCoordinate = fromUserCoordinate(\n coordinate,\n this.getView().getProjection()\n );\n return this.getPixelFromCoordinateInternal(viewCoordinate);\n }\n\n /**\n * Get the pixel for a coordinate. This takes a coordinate in the map view\n * projection and returns the corresponding pixel.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate A map coordinate.\n * @return {import(\"./pixel.js\").Pixel} A pixel position in the map viewport.\n */\n getPixelFromCoordinateInternal(coordinate) {\n const frameState = this.frameState_;\n if (!frameState) {\n return null;\n } else {\n return applyTransform(\n frameState.coordinateToPixelTransform,\n coordinate.slice(0, 2)\n );\n }\n }\n\n /**\n * Get the map renderer.\n * @return {import(\"./renderer/Map.js\").default} Renderer\n */\n getRenderer() {\n return this.renderer_;\n }\n\n /**\n * Get the size of this map.\n * @return {import(\"./size.js\").Size|undefined} The size in pixels of the map in the DOM.\n * @observable\n * @api\n */\n getSize() {\n return /** @type {import(\"./size.js\").Size|undefined} */ (this.get(\n MapProperty.SIZE\n ));\n }\n\n /**\n * Get the view associated with this map. A view manages properties such as\n * center and resolution.\n * @return {View} The view that controls this map.\n * @observable\n * @api\n */\n getView() {\n return /** @type {View} */ (this.get(MapProperty.VIEW));\n }\n\n /**\n * Get the element that serves as the map viewport.\n * @return {HTMLElement} Viewport.\n * @api\n */\n getViewport() {\n return this.viewport_;\n }\n\n /**\n * Get the element that serves as the container for overlays. Elements added to\n * this container will let mousedown and touchstart events through to the map,\n * so clicks and gestures on an overlay will trigger {@link module:ol/MapBrowserEvent~MapBrowserEvent}\n * events.\n * @return {!HTMLElement} The map's overlay container.\n */\n getOverlayContainer() {\n return this.overlayContainer_;\n }\n\n /**\n * Get the element that serves as a container for overlays that don't allow\n * event propagation. Elements added to this container won't let mousedown and\n * touchstart events through to the map, so clicks and gestures on an overlay\n * don't trigger any {@link module:ol/MapBrowserEvent~MapBrowserEvent}.\n * @return {!HTMLElement} The map's overlay container that stops events.\n */\n getOverlayContainerStopEvent() {\n return this.overlayContainerStopEvent_;\n }\n\n /**\n * @return {!Document} The document where the map is displayed.\n */\n getOwnerDocument() {\n return this.getTargetElement()\n ? this.getTargetElement().ownerDocument\n : document;\n }\n\n /**\n * @param {import(\"./Tile.js\").default} tile Tile.\n * @param {string} tileSourceKey Tile source key.\n * @param {import(\"./coordinate.js\").Coordinate} tileCenter Tile center.\n * @param {number} tileResolution Tile resolution.\n * @return {number} Tile priority.\n */\n getTilePriority(tile, tileSourceKey, tileCenter, tileResolution) {\n return getTilePriority(\n this.frameState_,\n tile,\n tileSourceKey,\n tileCenter,\n tileResolution\n );\n }\n\n /**\n * @param {UIEvent} browserEvent Browser event.\n * @param {string=} opt_type Type.\n */\n handleBrowserEvent(browserEvent, opt_type) {\n const type = opt_type || browserEvent.type;\n const mapBrowserEvent = new MapBrowserEvent(type, this, browserEvent);\n this.handleMapBrowserEvent(mapBrowserEvent);\n }\n\n /**\n * @param {MapBrowserEvent} mapBrowserEvent The event to handle.\n */\n handleMapBrowserEvent(mapBrowserEvent) {\n if (!this.frameState_) {\n // With no view defined, we cannot translate pixels into geographical\n // coordinates so interactions cannot be used.\n return;\n }\n const originalEvent = /** @type {PointerEvent} */ (mapBrowserEvent.originalEvent);\n const eventType = originalEvent.type;\n if (\n eventType === PointerEventType.POINTERDOWN ||\n eventType === EventType.WHEEL ||\n eventType === EventType.KEYDOWN\n ) {\n const doc = this.getOwnerDocument();\n const rootNode = this.viewport_.getRootNode\n ? this.viewport_.getRootNode()\n : doc;\n const target =\n 'host' in rootNode // ShadowRoot\n ? /** @type {ShadowRoot} */ (rootNode).elementFromPoint(\n originalEvent.clientX,\n originalEvent.clientY\n )\n : /** @type {Node} */ (originalEvent.target);\n if (\n // Abort if the target is a child of the container for elements whose events are not meant\n // to be handled by map interactions.\n this.overlayContainerStopEvent_.contains(target) ||\n // Abort if the event target is a child of the container that is no longer in the page.\n // It's possible for the target to no longer be in the page if it has been removed in an\n // event listener, this might happen in a Control that recreates it's content based on\n // user interaction either manually or via a render in something like https://reactjs.org/\n !(rootNode === doc ? doc.documentElement : rootNode).contains(target)\n ) {\n return;\n }\n }\n mapBrowserEvent.frameState = this.frameState_;\n if (this.dispatchEvent(mapBrowserEvent) !== false) {\n const interactionsArray = this.getInteractions().getArray().slice();\n for (let i = interactionsArray.length - 1; i >= 0; i--) {\n const interaction = interactionsArray[i];\n if (\n interaction.getMap() !== this ||\n !interaction.getActive() ||\n !this.getTargetElement()\n ) {\n continue;\n }\n const cont = interaction.handleEvent(mapBrowserEvent);\n if (!cont || mapBrowserEvent.propagationStopped) {\n break;\n }\n }\n }\n }\n\n /**\n * @protected\n */\n handlePostRender() {\n const frameState = this.frameState_;\n\n // Manage the tile queue\n // Image loads are expensive and a limited resource, so try to use them\n // efficiently:\n // * When the view is static we allow a large number of parallel tile loads\n // to complete the frame as quickly as possible.\n // * When animating or interacting, image loads can cause janks, so we reduce\n // the maximum number of loads per frame and limit the number of parallel\n // tile loads to remain reactive to view changes and to reduce the chance of\n // loading tiles that will quickly disappear from view.\n const tileQueue = this.tileQueue_;\n if (!tileQueue.isEmpty()) {\n let maxTotalLoading = this.maxTilesLoading_;\n let maxNewLoads = maxTotalLoading;\n if (frameState) {\n const hints = frameState.viewHints;\n if (hints[ViewHint.ANIMATING] || hints[ViewHint.INTERACTING]) {\n const lowOnFrameBudget =\n !IMAGE_DECODE && Date.now() - frameState.time > 8;\n maxTotalLoading = lowOnFrameBudget ? 0 : 8;\n maxNewLoads = lowOnFrameBudget ? 0 : 2;\n }\n }\n if (tileQueue.getTilesLoading() < maxTotalLoading) {\n tileQueue.reprioritize(); // FIXME only call if view has changed\n tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads);\n }\n }\n\n if (\n frameState &&\n this.hasListener(RenderEventType.RENDERCOMPLETE) &&\n !frameState.animate &&\n !this.tileQueue_.getTilesLoading() &&\n !this.getLoading()\n ) {\n this.renderer_.dispatchRenderEvent(\n RenderEventType.RENDERCOMPLETE,\n frameState\n );\n }\n\n const postRenderFunctions = this.postRenderFunctions_;\n for (let i = 0, ii = postRenderFunctions.length; i < ii; ++i) {\n postRenderFunctions[i](this, frameState);\n }\n postRenderFunctions.length = 0;\n }\n\n /**\n * @private\n */\n handleSizeChanged_() {\n if (this.getView() && !this.getView().getAnimating()) {\n this.getView().resolveConstraints(0);\n }\n\n this.render();\n }\n\n /**\n * @private\n */\n handleTargetChanged_() {\n // target may be undefined, null, a string or an Element.\n // If it's a string we convert it to an Element before proceeding.\n // If it's not now an Element we remove the viewport from the DOM.\n // If it's an Element we append the viewport element to it.\n\n let targetElement;\n if (this.getTarget()) {\n targetElement = this.getTargetElement();\n }\n\n if (this.mapBrowserEventHandler_) {\n for (let i = 0, ii = this.keyHandlerKeys_.length; i < ii; ++i) {\n unlistenByKey(this.keyHandlerKeys_[i]);\n }\n this.keyHandlerKeys_ = null;\n this.viewport_.removeEventListener(\n EventType.CONTEXTMENU,\n this.boundHandleBrowserEvent_\n );\n this.viewport_.removeEventListener(\n EventType.WHEEL,\n this.boundHandleBrowserEvent_\n );\n if (this.handleResize_ !== undefined) {\n removeEventListener(EventType.RESIZE, this.handleResize_, false);\n this.handleResize_ = undefined;\n }\n this.mapBrowserEventHandler_.dispose();\n this.mapBrowserEventHandler_ = null;\n removeNode(this.viewport_);\n }\n\n if (!targetElement) {\n if (this.renderer_) {\n clearTimeout(this.postRenderTimeoutHandle_);\n this.postRenderTimeoutHandle_ = undefined;\n this.postRenderFunctions_.length = 0;\n this.renderer_.dispose();\n this.renderer_ = null;\n }\n if (this.animationDelayKey_) {\n cancelAnimationFrame(this.animationDelayKey_);\n this.animationDelayKey_ = undefined;\n }\n } else {\n targetElement.appendChild(this.viewport_);\n if (!this.renderer_) {\n this.renderer_ = this.createRenderer();\n }\n\n this.mapBrowserEventHandler_ = new MapBrowserEventHandler(\n this,\n this.moveTolerance_\n );\n for (const key in MapBrowserEventType) {\n this.mapBrowserEventHandler_.addEventListener(\n MapBrowserEventType[key],\n this.handleMapBrowserEvent.bind(this)\n );\n }\n this.viewport_.addEventListener(\n EventType.CONTEXTMENU,\n this.boundHandleBrowserEvent_,\n false\n );\n this.viewport_.addEventListener(\n EventType.WHEEL,\n this.boundHandleBrowserEvent_,\n PASSIVE_EVENT_LISTENERS ? {passive: false} : false\n );\n\n const keyboardEventTarget = !this.keyboardEventTarget_\n ? targetElement\n : this.keyboardEventTarget_;\n this.keyHandlerKeys_ = [\n listen(\n keyboardEventTarget,\n EventType.KEYDOWN,\n this.handleBrowserEvent,\n this\n ),\n listen(\n keyboardEventTarget,\n EventType.KEYPRESS,\n this.handleBrowserEvent,\n this\n ),\n ];\n\n if (!this.handleResize_) {\n this.handleResize_ = this.updateSize.bind(this);\n window.addEventListener(EventType.RESIZE, this.handleResize_, false);\n }\n }\n\n this.updateSize();\n // updateSize calls setSize, so no need to call this.render\n // ourselves here.\n }\n\n /**\n * @private\n */\n handleTileChange_() {\n this.render();\n }\n\n /**\n * @private\n */\n handleViewPropertyChanged_() {\n this.render();\n }\n\n /**\n * @private\n */\n handleViewChanged_() {\n if (this.viewPropertyListenerKey_) {\n unlistenByKey(this.viewPropertyListenerKey_);\n this.viewPropertyListenerKey_ = null;\n }\n if (this.viewChangeListenerKey_) {\n unlistenByKey(this.viewChangeListenerKey_);\n this.viewChangeListenerKey_ = null;\n }\n const view = this.getView();\n if (view) {\n this.updateViewportSize_();\n\n this.viewPropertyListenerKey_ = listen(\n view,\n ObjectEventType.PROPERTYCHANGE,\n this.handleViewPropertyChanged_,\n this\n );\n this.viewChangeListenerKey_ = listen(\n view,\n EventType.CHANGE,\n this.handleViewPropertyChanged_,\n this\n );\n\n view.resolveConstraints(0);\n }\n this.render();\n }\n\n /**\n * @private\n */\n handleLayerGroupChanged_() {\n if (this.layerGroupPropertyListenerKeys_) {\n this.layerGroupPropertyListenerKeys_.forEach(unlistenByKey);\n this.layerGroupPropertyListenerKeys_ = null;\n }\n const layerGroup = this.getLayerGroup();\n if (layerGroup) {\n this.layerGroupPropertyListenerKeys_ = [\n listen(layerGroup, ObjectEventType.PROPERTYCHANGE, this.render, this),\n listen(layerGroup, EventType.CHANGE, this.render, this),\n ];\n }\n this.render();\n }\n\n /**\n * @return {boolean} Is rendered.\n */\n isRendered() {\n return !!this.frameState_;\n }\n\n /**\n * Requests an immediate render in a synchronous manner.\n * @api\n */\n renderSync() {\n if (this.animationDelayKey_) {\n cancelAnimationFrame(this.animationDelayKey_);\n }\n this.animationDelay_();\n }\n\n /**\n * Redraws all text after new fonts have loaded\n */\n redrawText() {\n const layerStates = this.getLayerGroup().getLayerStatesArray();\n for (let i = 0, ii = layerStates.length; i < ii; ++i) {\n const layer = layerStates[i].layer;\n if (layer.hasRenderer()) {\n layer.getRenderer().handleFontsChanged();\n }\n }\n }\n\n /**\n * Request a map rendering (at the next animation frame).\n * @api\n */\n render() {\n if (this.renderer_ && this.animationDelayKey_ === undefined) {\n this.animationDelayKey_ = requestAnimationFrame(this.animationDelay_);\n }\n }\n\n /**\n * Remove the given control from the map.\n * @param {import(\"./control/Control.js\").default} control Control.\n * @return {import(\"./control/Control.js\").default|undefined} The removed control (or undefined\n * if the control was not found).\n * @api\n */\n removeControl(control) {\n return this.getControls().remove(control);\n }\n\n /**\n * Remove the given interaction from the map.\n * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to remove.\n * @return {import(\"./interaction/Interaction.js\").default|undefined} The removed interaction (or\n * undefined if the interaction was not found).\n * @api\n */\n removeInteraction(interaction) {\n return this.getInteractions().remove(interaction);\n }\n\n /**\n * Removes the given layer from the map.\n * @param {import(\"./layer/Base.js\").default} layer Layer.\n * @return {import(\"./layer/Base.js\").default|undefined} The removed layer (or undefined if the\n * layer was not found).\n * @api\n */\n removeLayer(layer) {\n const layers = this.getLayerGroup().getLayers();\n return layers.remove(layer);\n }\n\n /**\n * Remove the given overlay from the map.\n * @param {import(\"./Overlay.js\").default} overlay Overlay.\n * @return {import(\"./Overlay.js\").default|undefined} The removed overlay (or undefined\n * if the overlay was not found).\n * @api\n */\n removeOverlay(overlay) {\n return this.getOverlays().remove(overlay);\n }\n\n /**\n * @param {number} time Time.\n * @private\n */\n renderFrame_(time) {\n const size = this.getSize();\n const view = this.getView();\n const previousFrameState = this.frameState_;\n /** @type {?FrameState} */\n let frameState = null;\n if (size !== undefined && hasArea(size) && view && view.isDef()) {\n const viewHints = view.getHints(\n this.frameState_ ? this.frameState_.viewHints : undefined\n );\n const viewState = view.getState();\n frameState = {\n animate: false,\n coordinateToPixelTransform: this.coordinateToPixelTransform_,\n declutterTree: null,\n extent: getForViewAndSize(\n viewState.center,\n viewState.resolution,\n viewState.rotation,\n size\n ),\n index: this.frameIndex_++,\n layerIndex: 0,\n layerStatesArray: this.getLayerGroup().getLayerStatesArray(),\n pixelRatio: this.pixelRatio_,\n pixelToCoordinateTransform: this.pixelToCoordinateTransform_,\n postRenderFunctions: [],\n size: size,\n tileQueue: this.tileQueue_,\n time: time,\n usedTiles: {},\n viewState: viewState,\n viewHints: viewHints,\n wantedTiles: {},\n };\n }\n\n this.frameState_ = frameState;\n this.renderer_.renderFrame(frameState);\n\n if (frameState) {\n if (frameState.animate) {\n this.render();\n }\n Array.prototype.push.apply(\n this.postRenderFunctions_,\n frameState.postRenderFunctions\n );\n\n if (previousFrameState) {\n const moveStart =\n !this.previousExtent_ ||\n (!isEmpty(this.previousExtent_) &&\n !equals(frameState.extent, this.previousExtent_));\n if (moveStart) {\n this.dispatchEvent(\n new MapEvent(MapEventType.MOVESTART, this, previousFrameState)\n );\n this.previousExtent_ = createOrUpdateEmpty(this.previousExtent_);\n }\n }\n\n const idle =\n this.previousExtent_ &&\n !frameState.viewHints[ViewHint.ANIMATING] &&\n !frameState.viewHints[ViewHint.INTERACTING] &&\n !equals(frameState.extent, this.previousExtent_);\n\n if (idle) {\n this.dispatchEvent(\n new MapEvent(MapEventType.MOVEEND, this, frameState)\n );\n clone(frameState.extent, this.previousExtent_);\n }\n }\n\n this.dispatchEvent(new MapEvent(MapEventType.POSTRENDER, this, frameState));\n\n if (!this.postRenderTimeoutHandle_) {\n this.postRenderTimeoutHandle_ = setTimeout(() => {\n this.postRenderTimeoutHandle_ = undefined;\n this.handlePostRender();\n }, 0);\n }\n }\n\n /**\n * Sets the layergroup of this map.\n * @param {LayerGroup} layerGroup A layer group containing the layers in this map.\n * @observable\n * @api\n */\n setLayerGroup(layerGroup) {\n this.set(MapProperty.LAYERGROUP, layerGroup);\n }\n\n /**\n * Set the size of this map.\n * @param {import(\"./size.js\").Size|undefined} size The size in pixels of the map in the DOM.\n * @observable\n * @api\n */\n setSize(size) {\n this.set(MapProperty.SIZE, size);\n }\n\n /**\n * Set the target element to render this map into.\n * @param {HTMLElement|string|undefined} target The Element or id of the Element\n * that the map is rendered in.\n * @observable\n * @api\n */\n setTarget(target) {\n this.set(MapProperty.TARGET, target);\n }\n\n /**\n * Set the view for this map.\n * @param {View} view The view that controls this map.\n * @observable\n * @api\n */\n setView(view) {\n this.set(MapProperty.VIEW, view);\n }\n\n /**\n * Force a recalculation of the map viewport size. This should be called when\n * third-party code changes the size of the map viewport.\n * @api\n */\n updateSize() {\n const targetElement = this.getTargetElement();\n\n if (!targetElement) {\n this.setSize(undefined);\n } else {\n const computedStyle = getComputedStyle(targetElement);\n this.setSize([\n targetElement.offsetWidth -\n parseFloat(computedStyle['borderLeftWidth']) -\n parseFloat(computedStyle['paddingLeft']) -\n parseFloat(computedStyle['paddingRight']) -\n parseFloat(computedStyle['borderRightWidth']),\n targetElement.offsetHeight -\n parseFloat(computedStyle['borderTopWidth']) -\n parseFloat(computedStyle['paddingTop']) -\n parseFloat(computedStyle['paddingBottom']) -\n parseFloat(computedStyle['borderBottomWidth']),\n ]);\n }\n\n this.updateViewportSize_();\n }\n\n /**\n * Recomputes the viewport size and save it on the view object (if any)\n * @private\n */\n updateViewportSize_() {\n const view = this.getView();\n if (view) {\n let size = undefined;\n const computedStyle = getComputedStyle(this.viewport_);\n if (computedStyle.width && computedStyle.height) {\n size = [\n parseInt(computedStyle.width, 10),\n parseInt(computedStyle.height, 10),\n ];\n }\n view.setViewportSize(size);\n }\n }\n}\n\n/**\n * @param {MapOptions} options Map options.\n * @return {MapOptionsInternal} Internal map options.\n */\nfunction createOptionsInternal(options) {\n /**\n * @type {HTMLElement|Document}\n */\n let keyboardEventTarget = null;\n if (options.keyboardEventTarget !== undefined) {\n keyboardEventTarget =\n typeof options.keyboardEventTarget === 'string'\n ? document.getElementById(options.keyboardEventTarget)\n : options.keyboardEventTarget;\n }\n\n /**\n * @type {Object<string, *>}\n */\n const values = {};\n\n const layerGroup =\n options.layers &&\n typeof (/** @type {?} */ (options.layers).getLayers) === 'function'\n ? /** @type {LayerGroup} */ (options.layers)\n : new LayerGroup({layers: /** @type {Collection} */ (options.layers)});\n values[MapProperty.LAYERGROUP] = layerGroup;\n\n values[MapProperty.TARGET] = options.target;\n\n values[MapProperty.VIEW] =\n options.view !== undefined ? options.view : new View();\n\n let controls;\n if (options.controls !== undefined) {\n if (Array.isArray(options.controls)) {\n controls = new Collection(options.controls.slice());\n } else {\n assert(\n typeof (/** @type {?} */ (options.controls).getArray) === 'function',\n 47\n ); // Expected `controls` to be an array or an `import(\"./Collection.js\").Collection`\n controls = /** @type {Collection} */ (options.controls);\n }\n }\n\n let interactions;\n if (options.interactions !== undefined) {\n if (Array.isArray(options.interactions)) {\n interactions = new Collection(options.interactions.slice());\n } else {\n assert(\n typeof (/** @type {?} */ (options.interactions).getArray) ===\n 'function',\n 48\n ); // Expected `interactions` to be an array or an `import(\"./Collection.js\").Collection`\n interactions = /** @type {Collection} */ (options.interactions);\n }\n }\n\n let overlays;\n if (options.overlays !== undefined) {\n if (Array.isArray(options.overlays)) {\n overlays = new Collection(options.overlays.slice());\n } else {\n assert(\n typeof (/** @type {?} */ (options.overlays).getArray) === 'function',\n 49\n ); // Expected `overlays` to be an array or an `import(\"./Collection.js\").Collection`\n overlays = options.overlays;\n }\n } else {\n overlays = new Collection();\n }\n\n return {\n controls: controls,\n interactions: interactions,\n keyboardEventTarget: keyboardEventTarget,\n overlays: overlays,\n values: values,\n };\n}\nexport default PluggableMap;\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/**\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/**\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 */\nclass Control extends BaseObject {\n /**\n * @param {Options} options Control options.\n */\n constructor(options) {\n super();\n\n const element = options.element;\n if (element && !options.target && !element.style.pointerEvents) {\n element.style.pointerEvents = 'auto';\n }\n\n /**\n * @protected\n * @type {HTMLElement}\n */\n this.element = element ? element : null;\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.target_ = null;\n\n /**\n * @private\n * @type {import(\"../PluggableMap.js\").default}\n */\n this.map_ = null;\n\n /**\n * @protected\n * @type {!Array<import(\"../events.js\").EventsKey>}\n */\n this.listenerKeys = [];\n\n if (options.render) {\n this.render = options.render;\n }\n\n if (options.target) {\n this.setTarget(options.target);\n }\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n removeNode(this.element);\n super.disposeInternal();\n }\n\n /**\n * Get the map associated with this control.\n * @return {import(\"../PluggableMap.js\").default} Map.\n * @api\n */\n getMap() {\n return this.map_;\n }\n\n /**\n * Remove the control from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @api\n */\n setMap(map) {\n if (this.map_) {\n removeNode(this.element);\n }\n for (let i = 0, ii = this.listenerKeys.length; i < ii; ++i) {\n unlistenByKey(this.listenerKeys[i]);\n }\n this.listenerKeys.length = 0;\n this.map_ = map;\n if (this.map_) {\n const target = this.target_\n ? this.target_\n : map.getOverlayContainerStopEvent();\n target.appendChild(this.element);\n if (this.render !== VOID) {\n this.listenerKeys.push(\n listen(map, MapEventType.POSTRENDER, this.render, this)\n );\n }\n map.render();\n }\n }\n\n /**\n * Renders the control.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @api\n */\n render(mapEvent) {}\n\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 setTarget(target) {\n this.target_ =\n typeof target === 'string' ? document.getElementById(target) : target;\n }\n}\n\nexport default Control;\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/**\n * @typedef {Object} Options\n * @property {string} [className='ol-attribution'] CSS class name.\n * @property {HTMLElement|string} [target] Specify a target if you\n * want the control to be rendered outside of the map's\n * viewport.\n * @property {boolean} [collapsible] Specify if attributions can\n * be collapsed. If not specified, sources control this behavior with their\n * `attributionsCollapsible` setting.\n * @property {boolean} [collapsed=true] Specify if attributions should\n * be collapsed at startup.\n * @property {string} [tipLabel='Attributions'] Text label to use for the button tip.\n * @property {string} [label='i'] Text label to use for the\n * collapsed attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [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/**\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 */\nclass Attribution extends Control {\n /**\n * @param {Options=} opt_options Attribution options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n super({\n element: document.createElement('div'),\n render: options.render,\n target: options.target,\n });\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.ulElement_ = document.createElement('ul');\n\n /**\n * @private\n * @type {boolean}\n */\n this.collapsed_ =\n options.collapsed !== undefined ? options.collapsed : true;\n\n /**\n * @private\n * @type {boolean}\n */\n this.userCollapsed_ = this.collapsed_;\n\n /**\n * @private\n * @type {boolean}\n */\n this.overrideCollapsible_ = options.collapsible !== undefined;\n\n /**\n * @private\n * @type {boolean}\n */\n this.collapsible_ =\n options.collapsible !== undefined ? options.collapsible : true;\n\n if (!this.collapsible_) {\n this.collapsed_ = false;\n }\n\n const className =\n options.className !== undefined ? options.className : 'ol-attribution';\n\n const tipLabel =\n options.tipLabel !== undefined ? options.tipLabel : 'Attributions';\n\n const expandClassName =\n options.expandClassName !== undefined\n ? options.expandClassName\n : className + '-expand';\n\n const collapseLabel =\n options.collapseLabel !== undefined ? options.collapseLabel : '\\u00BB';\n\n const collapseClassName =\n options.collapseClassName !== undefined\n ? options.collapseClassName\n : className + '-collpase';\n\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 } else {\n this.collapseLabel_ = collapseLabel;\n }\n\n const label = options.label !== undefined ? options.label : 'i';\n\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 } else {\n this.label_ = label;\n }\n\n const activeLabel =\n this.collapsible_ && !this.collapsed_ ? this.collapseLabel_ : this.label_;\n const button = document.createElement('button');\n button.setAttribute('type', 'button');\n button.title = tipLabel;\n button.appendChild(activeLabel);\n\n button.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this),\n false\n );\n\n const cssClasses =\n className +\n ' ' +\n CLASS_UNSELECTABLE +\n ' ' +\n CLASS_CONTROL +\n (this.collapsed_ && this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') +\n (this.collapsible_ ? '' : ' ol-uncollapsible');\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(this.ulElement_);\n element.appendChild(button);\n\n /**\n * A list of currently rendered resolutions.\n * @type {Array<string>}\n * @private\n */\n this.renderedAttributions_ = [];\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderedVisible_ = true;\n }\n\n /**\n * Collect a list of visible attributions and set the collapsible state.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @return {Array<string>} Attributions.\n * @private\n */\n collectSourceAttributions_(frameState) {\n /**\n * Used to determine if an attribution already exists.\n * @type {!Object<string, boolean>}\n */\n const lookup = {};\n\n /**\n * A list of visible attributions.\n * @type {Array<string>}\n */\n const visibleAttributions = [];\n\n let collapsible = true;\n const layerStatesArray = frameState.layerStatesArray;\n for (let i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n const layerState = layerStatesArray[i];\n if (!inView(layerState, frameState.viewState)) {\n continue;\n }\n\n const source = /** @type {import(\"../layer/Layer.js\").default} */ (layerState.layer).getSource();\n if (!source) {\n continue;\n }\n\n const attributionGetter = source.getAttributions();\n if (!attributionGetter) {\n continue;\n }\n\n const attributions = attributionGetter(frameState);\n if (!attributions) {\n continue;\n }\n\n collapsible =\n collapsible && source.getAttributionsCollapsible() !== false;\n\n if (Array.isArray(attributions)) {\n for (let 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 } 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 /**\n * @private\n * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n */\n updateElement_(frameState) {\n if (!frameState) {\n if (this.renderedVisible_) {\n this.element.style.display = 'none';\n this.renderedVisible_ = false;\n }\n return;\n }\n\n const attributions = this.collectSourceAttributions_(frameState);\n\n const visible = attributions.length > 0;\n if (this.renderedVisible_ != visible) {\n this.element.style.display = visible ? '' : 'none';\n this.renderedVisible_ = visible;\n }\n\n if (equals(attributions, this.renderedAttributions_)) {\n return;\n }\n\n removeChildren(this.ulElement_);\n\n // append the attributions\n for (let i = 0, ii = attributions.length; i < ii; ++i) {\n const element = document.createElement('li');\n element.innerHTML = attributions[i];\n this.ulElement_.appendChild(element);\n }\n\n this.renderedAttributions_ = attributions;\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n this.handleToggle_();\n this.userCollapsed_ = this.collapsed_;\n }\n\n /**\n * @private\n */\n handleToggle_() {\n this.element.classList.toggle(CLASS_COLLAPSED);\n if (this.collapsed_) {\n replaceNode(this.collapseLabel_, this.label_);\n } else {\n replaceNode(this.label_, this.collapseLabel_);\n }\n this.collapsed_ = !this.collapsed_;\n }\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 getCollapsible() {\n return this.collapsible_;\n }\n\n /**\n * Set whether the attribution should be collapsible.\n * @param {boolean} collapsible True if the widget is collapsible.\n * @api\n */\n setCollapsible(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 /**\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 setCollapsed(collapsed) {\n this.userCollapsed_ = collapsed;\n if (!this.collapsible_ || this.collapsed_ === collapsed) {\n return;\n }\n this.handleToggle_();\n }\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 getCollapsed() {\n return this.collapsed_;\n }\n\n /**\n * Update the attribution element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n this.updateElement_(mapEvent.frameState);\n }\n}\n\nexport default Attribution;\n","/**\n * @module ol/control/Rotate\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport {CLASS_CONTROL, CLASS_HIDDEN, CLASS_UNSELECTABLE} from '../css.js';\nimport {easeOut} from '../easing.js';\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-rotate'] CSS class name.\n * @property {string|HTMLElement} [label='⇧'] Text label to use for the rotate button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Reset rotation'] Text label to use for the rotate tip.\n * @property {string} [compassClassName='ol-compass'] CSS class name for the compass.\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {boolean} [autoHide=true] Hide the control when rotation is 0.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control should\n * be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {function():void} [resetNorth] Function called when the control is clicked.\n * This will override the default `resetNorth`.\n * @property {HTMLElement|string} [target] Specify a target if you want the control to be\n * rendered outside of the map's viewport.\n */\n\n/**\n * @classdesc\n * A button control to reset rotation to 0.\n * To style this control use css selector `.ol-rotate`. A `.ol-hidden` css\n * selector is added to the button when the rotation is 0.\n *\n * @api\n */\nclass Rotate extends Control {\n /**\n * @param {Options=} opt_options Rotate options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n super({\n element: document.createElement('div'),\n render: options.render,\n target: options.target,\n });\n\n const className =\n options.className !== undefined ? options.className : 'ol-rotate';\n\n const label = options.label !== undefined ? options.label : '\\u21E7';\n\n const compassClassName =\n options.compassClassName !== undefined\n ? options.compassClassName\n : 'ol-compass';\n\n /**\n * @type {HTMLElement}\n * @private\n */\n this.label_ = null;\n\n if (typeof label === 'string') {\n this.label_ = document.createElement('span');\n this.label_.className = compassClassName;\n this.label_.textContent = label;\n } else {\n this.label_ = label;\n this.label_.classList.add(compassClassName);\n }\n\n const tipLabel = options.tipLabel ? options.tipLabel : 'Reset rotation';\n\n const button = document.createElement('button');\n button.className = className + '-reset';\n button.setAttribute('type', 'button');\n button.title = tipLabel;\n button.appendChild(this.label_);\n\n button.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this),\n false\n );\n\n const cssClasses =\n className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(button);\n\n this.callResetNorth_ = options.resetNorth ? options.resetNorth : undefined;\n\n /**\n * @type {number}\n * @private\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n /**\n * @type {boolean}\n * @private\n */\n this.autoHide_ = options.autoHide !== undefined ? options.autoHide : true;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.rotation_ = undefined;\n\n if (this.autoHide_) {\n this.element.classList.add(CLASS_HIDDEN);\n }\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n if (this.callResetNorth_ !== undefined) {\n this.callResetNorth_();\n } else {\n this.resetNorth_();\n }\n }\n\n /**\n * @private\n */\n resetNorth_() {\n const map = this.getMap();\n const 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 const rotation = view.getRotation();\n if (rotation !== undefined) {\n if (this.duration_ > 0 && rotation % (2 * Math.PI) !== 0) {\n view.animate({\n rotation: 0,\n duration: this.duration_,\n easing: easeOut,\n });\n } else {\n view.setRotation(0);\n }\n }\n }\n\n /**\n * Update the rotate control element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n const frameState = mapEvent.frameState;\n if (!frameState) {\n return;\n }\n const rotation = frameState.viewState.rotation;\n if (rotation != this.rotation_) {\n const transform = 'rotate(' + rotation + 'rad)';\n if (this.autoHide_) {\n const contains = this.element.classList.contains(CLASS_HIDDEN);\n if (!contains && rotation === 0) {\n this.element.classList.add(CLASS_HIDDEN);\n } else if (contains && rotation !== 0) {\n this.element.classList.remove(CLASS_HIDDEN);\n }\n }\n this.label_.style.transform = transform;\n }\n this.rotation_ = rotation;\n }\n}\n\nexport default Rotate;\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/**\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/**\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 */\nclass Zoom extends Control {\n /**\n * @param {Options=} opt_options Zoom options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n super({\n element: document.createElement('div'),\n target: options.target,\n });\n\n const className =\n options.className !== undefined ? options.className : 'ol-zoom';\n\n const delta = options.delta !== undefined ? options.delta : 1;\n\n const zoomInClassName =\n options.zoomInClassName !== undefined\n ? options.zoomInClassName\n : className + '-in';\n\n const zoomOutClassName =\n options.zoomOutClassName !== undefined\n ? options.zoomOutClassName\n : className + '-out';\n\n const zoomInLabel =\n options.zoomInLabel !== undefined ? options.zoomInLabel : '+';\n const zoomOutLabel =\n options.zoomOutLabel !== undefined ? options.zoomOutLabel : '\\u2212';\n\n const zoomInTipLabel =\n options.zoomInTipLabel !== undefined ? options.zoomInTipLabel : 'Zoom in';\n const zoomOutTipLabel =\n options.zoomOutTipLabel !== undefined\n ? options.zoomOutTipLabel\n : 'Zoom out';\n\n const inElement = document.createElement('button');\n inElement.className = zoomInClassName;\n inElement.setAttribute('type', 'button');\n inElement.title = zoomInTipLabel;\n inElement.appendChild(\n typeof zoomInLabel === 'string'\n ? document.createTextNode(zoomInLabel)\n : zoomInLabel\n );\n\n inElement.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this, delta),\n false\n );\n\n const outElement = document.createElement('button');\n outElement.className = zoomOutClassName;\n outElement.setAttribute('type', 'button');\n outElement.title = zoomOutTipLabel;\n outElement.appendChild(\n typeof zoomOutLabel === 'string'\n ? document.createTextNode(zoomOutLabel)\n : zoomOutLabel\n );\n\n outElement.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this, -delta),\n false\n );\n\n const cssClasses =\n className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(inElement);\n element.appendChild(outElement);\n\n /**\n * @type {number}\n * @private\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n }\n\n /**\n * @param {number} delta Zoom delta.\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(delta, event) {\n event.preventDefault();\n this.zoomByDelta_(delta);\n }\n\n /**\n * @param {number} delta Zoom delta.\n * @private\n */\n zoomByDelta_(delta) {\n const map = this.getMap();\n const 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 const currentZoom = view.getZoom();\n if (currentZoom !== undefined) {\n const 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 } else {\n view.setZoom(newZoom);\n }\n }\n }\n}\n\nexport default Zoom;\n","/**\n * @module ol/control/FullScreen\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport {CLASS_CONTROL, CLASS_UNSELECTABLE, CLASS_UNSUPPORTED} from '../css.js';\nimport {listen} from '../events.js';\nimport {replaceNode} from '../dom.js';\n\nconst events = [\n 'fullscreenchange',\n 'webkitfullscreenchange',\n 'MSFullscreenChange',\n];\n\n/**\n * @enum {string}\n */\nconst FullScreenEventType = {\n /**\n * Triggered after the map entered fullscreen.\n * @event FullScreenEventType#enterfullscreen\n * @api\n */\n ENTERFULLSCREEN: 'enterfullscreen',\n\n /**\n * Triggered after the map leave fullscreen.\n * @event FullScreenEventType#leavefullscreen\n * @api\n */\n LEAVEFULLSCREEN: 'leavefullscreen',\n};\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-full-screen'] CSS class name.\n * @property {string|Text} [label='\\u2922'] Text label to use for the button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|Text} [labelActive='\\u00d7'] Text label to use for the\n * button when full-screen is active.\n * @property {string} [activeClassName=className + '-true'] CSS class name for the button\n * when full-screen is active.\n * @property {string} [inactiveClassName=className + '-false'] CSS class name for the button\n * when full-screen is inactive.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Toggle full-screen'] Text label to use for the button tip.\n * @property {boolean} [keys=false] Full keyboard access.\n * @property {HTMLElement|string} [target] Specify a target if you want the\n * control to be rendered outside of the map's viewport.\n * @property {HTMLElement|string} [source] The element to be displayed\n * fullscreen. When not provided, the element containing the map viewport will\n * be displayed fullscreen.\n */\n\n/**\n * @classdesc\n * Provides a button that when clicked fills up the full screen with the map.\n * The full screen source element is by default the element containing the map viewport unless\n * overridden by providing the `source` option. In which case, the dom\n * element introduced using this parameter will be displayed in full screen.\n *\n * When in full screen mode, a close button is shown to exit full screen mode.\n * The [Fullscreen API](http://www.w3.org/TR/fullscreen/) is used to\n * toggle the map in full screen mode.\n *\n * @fires FullScreenEventType#enterfullscreen\n * @fires FullScreenEventType#leavefullscreen\n * @api\n */\nclass FullScreen extends Control {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n super({\n element: document.createElement('div'),\n target: options.target,\n });\n\n /**\n * @private\n * @type {string}\n */\n this.cssClassName_ =\n options.className !== undefined ? options.className : 'ol-full-screen';\n\n /**\n * @private\n * @type {Array<string>}\n */\n this.activeClassName_ =\n options.activeClassName !== undefined\n ? options.activeClassName.split(' ')\n : [this.cssClassName_ + '-true'];\n\n /**\n * @private\n * @type {Array<string>}\n */\n this.inactiveClassName_ =\n options.inactiveClassName !== undefined\n ? options.inactiveClassName.split(' ')\n : [this.cssClassName_ + '-false'];\n\n const label = options.label !== undefined ? options.label : '\\u2922';\n\n /**\n * @private\n * @type {Text}\n */\n this.labelNode_ =\n typeof label === 'string' ? document.createTextNode(label) : label;\n\n const labelActive =\n options.labelActive !== undefined ? options.labelActive : '\\u00d7';\n\n /**\n * @private\n * @type {Text}\n */\n this.labelActiveNode_ =\n typeof labelActive === 'string'\n ? document.createTextNode(labelActive)\n : labelActive;\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.button_ = document.createElement('button');\n\n const tipLabel = options.tipLabel ? options.tipLabel : 'Toggle full-screen';\n this.setClassName_(this.button_, isFullScreen());\n this.button_.setAttribute('type', 'button');\n this.button_.title = tipLabel;\n this.button_.appendChild(this.labelNode_);\n\n this.button_.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this),\n false\n );\n\n const cssClasses =\n this.cssClassName_ +\n ' ' +\n CLASS_UNSELECTABLE +\n ' ' +\n CLASS_CONTROL +\n ' ' +\n (!isFullScreenSupported() ? CLASS_UNSUPPORTED : '');\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(this.button_);\n\n /**\n * @private\n * @type {boolean}\n */\n this.keys_ = options.keys !== undefined ? options.keys : false;\n\n /**\n * @private\n * @type {HTMLElement|string|undefined}\n */\n this.source_ = options.source;\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n this.handleFullScreen_();\n }\n\n /**\n * @private\n */\n handleFullScreen_() {\n if (!isFullScreenSupported()) {\n return;\n }\n const map = this.getMap();\n if (!map) {\n return;\n }\n if (isFullScreen()) {\n exitFullScreen();\n } else {\n let element;\n if (this.source_) {\n element =\n typeof this.source_ === 'string'\n ? document.getElementById(this.source_)\n : this.source_;\n } else {\n element = map.getTargetElement();\n }\n if (this.keys_) {\n requestFullScreenWithKeys(element);\n } else {\n requestFullScreen(element);\n }\n }\n }\n\n /**\n * @private\n */\n handleFullScreenChange_() {\n const map = this.getMap();\n if (isFullScreen()) {\n this.setClassName_(this.button_, true);\n replaceNode(this.labelActiveNode_, this.labelNode_);\n this.dispatchEvent(FullScreenEventType.ENTERFULLSCREEN);\n } else {\n this.setClassName_(this.button_, false);\n replaceNode(this.labelNode_, this.labelActiveNode_);\n this.dispatchEvent(FullScreenEventType.LEAVEFULLSCREEN);\n }\n if (map) {\n map.updateSize();\n }\n }\n\n /**\n * @param {HTMLElement} element Target element\n * @param {boolean} fullscreen True if fullscreen class name should be active\n * @private\n */\n setClassName_(element, fullscreen) {\n const activeClassName = this.activeClassName_;\n const inactiveClassName = this.inactiveClassName_;\n const nextClassName = fullscreen ? activeClassName : inactiveClassName;\n element.classList.remove(...activeClassName);\n element.classList.remove(...inactiveClassName);\n element.classList.add(...nextClassName);\n }\n\n /**\n * Remove the control from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @api\n */\n setMap(map) {\n super.setMap(map);\n if (map) {\n for (let i = 0, ii = events.length; i < ii; ++i) {\n this.listenerKeys.push(\n listen(document, events[i], this.handleFullScreenChange_, this)\n );\n }\n }\n }\n}\n\n/**\n * @return {boolean} Fullscreen is supported by the current platform.\n */\nfunction isFullScreenSupported() {\n const body = document.body;\n return !!(\n body['webkitRequestFullscreen'] ||\n (body['msRequestFullscreen'] && document['msFullscreenEnabled']) ||\n (body.requestFullscreen && document.fullscreenEnabled)\n );\n}\n\n/**\n * @return {boolean} Element is currently in fullscreen.\n */\nfunction isFullScreen() {\n return !!(\n document['webkitIsFullScreen'] ||\n document['msFullscreenElement'] ||\n document.fullscreenElement\n );\n}\n\n/**\n * Request to fullscreen an element.\n * @param {HTMLElement} element Element to request fullscreen\n */\nfunction requestFullScreen(element) {\n if (element.requestFullscreen) {\n element.requestFullscreen();\n } else if (element['msRequestFullscreen']) {\n element['msRequestFullscreen']();\n } else if (element['webkitRequestFullscreen']) {\n element['webkitRequestFullscreen']();\n }\n}\n\n/**\n * Request to fullscreen an element with keyboard input.\n * @param {HTMLElement} element Element to request fullscreen\n */\nfunction requestFullScreenWithKeys(element) {\n if (element['webkitRequestFullscreen']) {\n element['webkitRequestFullscreen']();\n } else {\n requestFullScreen(element);\n }\n}\n\n/**\n * Exit fullscreen.\n */\nfunction exitFullScreen() {\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document['msExitFullscreen']) {\n document['msExitFullscreen']();\n } else if (document['webkitExitFullscreen']) {\n document['webkitExitFullscreen']();\n }\n}\n\nexport default FullScreen;\n","/**\n * @module ol/control/MousePosition\n */\n\nimport Control from './Control.js';\nimport EventType from '../pointer/EventType.js';\nimport {getChangeEventType} from '../Object.js';\nimport {\n get as getProjection,\n getTransformFromProjections,\n getUserProjection,\n identityTransform,\n} from '../proj.js';\nimport {listen} from '../events.js';\n\n/**\n * @type {string}\n */\nconst PROJECTION = 'projection';\n\n/**\n * @type {string}\n */\nconst COORDINATE_FORMAT = 'coordinateFormat';\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} [undefinedHTML=' '] Markup to show when coordinates are not\n * available (e.g. when the pointer leaves the map viewport). By default, the last position\n * will be replaced with `' '` (` `) when the pointer leaves the viewport. To\n * retain the last rendered position, set this option to something falsey (like an empty\n * string `''`).\n */\n\n/**\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 */\nclass MousePosition extends Control {\n /**\n * @param {Options=} opt_options Mouse position options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n const element = document.createElement('div');\n element.className =\n options.className !== undefined ? options.className : 'ol-mouse-position';\n\n super({\n element: element,\n render: options.render,\n target: options.target,\n });\n\n this.addEventListener(\n getChangeEventType(PROJECTION),\n this.handleProjectionChanged_\n );\n\n if (options.coordinateFormat) {\n this.setCoordinateFormat(options.coordinateFormat);\n }\n if (options.projection) {\n this.setProjection(options.projection);\n }\n\n /**\n * @private\n * @type {string}\n */\n this.undefinedHTML_ =\n options.undefinedHTML !== undefined ? options.undefinedHTML : ' ';\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderOnMouseOut_ = !!this.undefinedHTML_;\n\n /**\n * @private\n * @type {string}\n */\n this.renderedHTML_ = element.innerHTML;\n\n /**\n * @private\n * @type {?import(\"../proj/Projection.js\").default}\n */\n this.mapProjection_ = null;\n\n /**\n * @private\n * @type {?import(\"../proj.js\").TransformFunction}\n */\n this.transform_ = null;\n }\n\n /**\n * @private\n */\n handleProjectionChanged_() {\n this.transform_ = null;\n }\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 getCoordinateFormat() {\n return /** @type {import(\"../coordinate.js\").CoordinateFormat|undefined} */ (this.get(\n COORDINATE_FORMAT\n ));\n }\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 getProjection() {\n return /** @type {import(\"../proj/Projection.js\").default|undefined} */ (this.get(\n PROJECTION\n ));\n }\n\n /**\n * @param {MouseEvent} event Browser event.\n * @protected\n */\n handleMouseMove(event) {\n const map = this.getMap();\n this.updateHTML_(map.getEventPixel(event));\n }\n\n /**\n * @param {Event} event Browser event.\n * @protected\n */\n handleMouseOut(event) {\n this.updateHTML_(null);\n }\n\n /**\n * Remove the control from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @api\n */\n setMap(map) {\n super.setMap(map);\n if (map) {\n const viewport = map.getViewport();\n this.listenerKeys.push(\n listen(viewport, EventType.POINTERMOVE, this.handleMouseMove, this)\n );\n if (this.renderOnMouseOut_) {\n this.listenerKeys.push(\n listen(viewport, EventType.POINTEROUT, this.handleMouseOut, this)\n );\n }\n }\n }\n\n /**\n * Set the coordinate format type used to render the current position.\n * @param {import(\"../coordinate.js\").CoordinateFormat} format The format to render the current\n * position in.\n * @observable\n * @api\n */\n setCoordinateFormat(format) {\n this.set(COORDINATE_FORMAT, format);\n }\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 setProjection(projection) {\n this.set(PROJECTION, getProjection(projection));\n }\n\n /**\n * @param {?import(\"../pixel.js\").Pixel} pixel Pixel.\n * @private\n */\n updateHTML_(pixel) {\n let html = this.undefinedHTML_;\n if (pixel && this.mapProjection_) {\n if (!this.transform_) {\n const projection = this.getProjection();\n if (projection) {\n this.transform_ = getTransformFromProjections(\n this.mapProjection_,\n projection\n );\n } else {\n this.transform_ = identityTransform;\n }\n }\n const map = this.getMap();\n const coordinate = map.getCoordinateFromPixelInternal(pixel);\n if (coordinate) {\n const userProjection = getUserProjection();\n if (userProjection) {\n this.transform_ = getTransformFromProjections(\n this.mapProjection_,\n userProjection\n );\n }\n this.transform_(coordinate, coordinate);\n const coordinateFormat = this.getCoordinateFormat();\n if (coordinateFormat) {\n html = coordinateFormat(coordinate);\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 /**\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 render(mapEvent) {\n const frameState = mapEvent.frameState;\n if (!frameState) {\n this.mapProjection_ = null;\n } else {\n if (this.mapProjection_ != frameState.viewState.projection) {\n this.mapProjection_ = frameState.viewState.projection;\n this.transform_ = null;\n }\n }\n }\n}\n\nexport default MousePosition;\n","/**\n * @module ol/OverlayPositioning\n */\n\n/**\n * Overlay position: `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, `'top-right'`\n * @enum {string}\n */\nexport default {\n BOTTOM_LEFT: 'bottom-left',\n BOTTOM_CENTER: 'bottom-center',\n BOTTOM_RIGHT: 'bottom-right',\n CENTER_LEFT: 'center-left',\n CENTER_CENTER: 'center-center',\n CENTER_RIGHT: 'center-right',\n TOP_LEFT: 'top-left',\n TOP_CENTER: 'top-center',\n TOP_RIGHT: 'top-right',\n};\n","/**\n * @module ol/Overlay\n */\nimport BaseObject, {getChangeEventType} from './Object.js';\nimport MapEventType from './MapEventType.js';\nimport OverlayPositioning from './OverlayPositioning.js';\nimport {CLASS_SELECTABLE} from './css.js';\nimport {containsExtent} from './extent.js';\nimport {listen, unlistenByKey} from './events.js';\nimport {outerHeight, outerWidth, removeChildren, removeNode} from './dom.js';\n\n/**\n * @typedef {Object} Options\n * @property {number|string} [id] Set the overlay id. The overlay id can be used\n * with the {@link module:ol/Map~Map#getOverlayById} method.\n * @property {HTMLElement} [element] The overlay element.\n * @property {Array<number>} [offset=[0, 0]] Offsets in pixels used when positioning\n * the overlay. The first element in the\n * array is the horizontal offset. A positive value shifts the overlay right.\n * The second element in the array is the vertical offset. A positive value\n * shifts the overlay down.\n * @property {import(\"./coordinate.js\").Coordinate} [position] The overlay position\n * in map projection.\n * @property {import(\"./OverlayPositioning.js\").default} [positioning='top-left'] Defines how\n * the overlay is actually positioned with respect to its `position` property.\n * Possible values are `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, and `'top-right'`.\n * @property {boolean} [stopEvent=true] Whether event propagation to the map\n * viewport should be stopped. If `true` the overlay is placed in the same\n * container as that of the controls (CSS class name\n * `ol-overlaycontainer-stopevent`); if `false` it is placed in the container\n * with CSS class name specified by the `className` property.\n * @property {boolean} [insertFirst=true] Whether the overlay is inserted first\n * in the overlay container, or appended. If the overlay is placed in the same\n * container as that of the controls (see the `stopEvent` option) you will\n * probably set `insertFirst` to `true` so the overlay is displayed below the\n * controls.\n * @property {PanIntoViewOptions|boolean} [autoPan=false] Pan the map when calling\n * `setPosition`, so that the overlay is entirely visible in the current viewport?\n * If `true` (deprecated), then `autoPanAnimation` and `autoPanMargin` will be\n * used to determine the panning parameters; if an object is supplied then other\n * parameters are ignored.\n * @property {PanOptions} [autoPanAnimation] The animation options used to pan\n * the overlay into view. This animation is only used when `autoPan` is enabled.\n * A `duration` and `easing` may be provided to customize the animation.\n * Deprecated and ignored if `autoPan` is supplied as an object.\n * @property {number} [autoPanMargin=20] The margin (in pixels) between the\n * overlay and the borders of the map when autopanning. Deprecated and ignored\n * if `autoPan` is supplied as an object.\n * @property {PanIntoViewOptions} [autoPanOptions] The options to use for the\n * autoPan. This is only used when `autoPan` is enabled and has preference over\n * the individual `autoPanMargin` and `autoPanOptions`.\n * @property {string} [className='ol-overlay-container ol-selectable'] CSS class\n * name.\n */\n\n/**\n * @typedef {Object} PanOptions\n * @property {number} [duration=1000] The duration of the animation in\n * milliseconds.\n * @property {function(number):number} [easing] The easing function to use. Can\n * be one from {@link module:ol/easing} or a custom function.\n * Default is {@link module:ol/easing~inAndOut}.\n */\n\n/**\n * @typedef {Object} PanIntoViewOptions\n * @property {PanOptions} [animation={}] The animation parameters for the pan\n * @property {number} [margin=20] The margin (in pixels) between the\n * overlay and the borders of the map when panning into view.\n */\n\n/**\n * @enum {string}\n * @protected\n */\nconst Property = {\n ELEMENT: 'element',\n MAP: 'map',\n OFFSET: 'offset',\n POSITION: 'position',\n POSITIONING: 'positioning',\n};\n\n/**\n * @classdesc\n * An element to be displayed over the map and attached to a single map\n * location. Like {@link module:ol/control/Control~Control}, Overlays are\n * visible widgets. Unlike Controls, they are not in a fixed position on the\n * screen, but are tied to a geographical coordinate, so panning the map will\n * move an Overlay but not a Control.\n *\n * Example:\n *\n * import Overlay from 'ol/Overlay';\n *\n * var popup = new Overlay({\n * element: document.getElementById('popup')\n * });\n * popup.setPosition(coordinate);\n * map.addOverlay(popup);\n *\n * @api\n */\nclass Overlay extends BaseObject {\n /**\n * @param {Options} options Overlay options.\n */\n constructor(options) {\n super();\n\n /**\n * @protected\n * @type {Options}\n */\n this.options = options;\n\n /**\n * @protected\n * @type {number|string|undefined}\n */\n this.id = options.id;\n\n /**\n * @protected\n * @type {boolean}\n */\n this.insertFirst =\n options.insertFirst !== undefined ? options.insertFirst : true;\n\n /**\n * @protected\n * @type {boolean}\n */\n this.stopEvent = options.stopEvent !== undefined ? options.stopEvent : true;\n\n /**\n * @protected\n * @type {HTMLElement}\n */\n this.element = document.createElement('div');\n this.element.className =\n options.className !== undefined\n ? options.className\n : 'ol-overlay-container ' + CLASS_SELECTABLE;\n this.element.style.position = 'absolute';\n this.element.style.pointerEvents = 'auto';\n\n let autoPan = options.autoPan;\n if (autoPan && 'object' !== typeof autoPan) {\n autoPan = {\n animation: options.autoPanAnimation,\n margin: options.autoPanMargin,\n };\n }\n /**\n * @protected\n * @type {PanIntoViewOptions|false}\n */\n this.autoPan = /** @type {PanIntoViewOptions} */ (autoPan) || false;\n\n /**\n * @protected\n * @type {{transform_: string,\n * visible: boolean}}\n */\n this.rendered = {\n transform_: '',\n visible: true,\n };\n\n /**\n * @protected\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.mapPostrenderListenerKey = null;\n\n this.addEventListener(\n getChangeEventType(Property.ELEMENT),\n this.handleElementChanged\n );\n this.addEventListener(\n getChangeEventType(Property.MAP),\n this.handleMapChanged\n );\n this.addEventListener(\n getChangeEventType(Property.OFFSET),\n this.handleOffsetChanged\n );\n this.addEventListener(\n getChangeEventType(Property.POSITION),\n this.handlePositionChanged\n );\n this.addEventListener(\n getChangeEventType(Property.POSITIONING),\n this.handlePositioningChanged\n );\n\n if (options.element !== undefined) {\n this.setElement(options.element);\n }\n\n this.setOffset(options.offset !== undefined ? options.offset : [0, 0]);\n\n this.setPositioning(\n options.positioning !== undefined\n ? /** @type {import(\"./OverlayPositioning.js\").default} */ (options.positioning)\n : OverlayPositioning.TOP_LEFT\n );\n\n if (options.position !== undefined) {\n this.setPosition(options.position);\n }\n }\n\n /**\n * Get the DOM element of this overlay.\n * @return {HTMLElement|undefined} The Element containing the overlay.\n * @observable\n * @api\n */\n getElement() {\n return /** @type {HTMLElement|undefined} */ (this.get(Property.ELEMENT));\n }\n\n /**\n * Get the overlay identifier which is set on constructor.\n * @return {number|string|undefined} Id.\n * @api\n */\n getId() {\n return this.id;\n }\n\n /**\n * Get the map associated with this overlay.\n * @return {import(\"./PluggableMap.js\").default|undefined} The map that the\n * overlay is part of.\n * @observable\n * @api\n */\n getMap() {\n return /** @type {import(\"./PluggableMap.js\").default|undefined} */ (this.get(\n Property.MAP\n ));\n }\n\n /**\n * Get the offset of this overlay.\n * @return {Array<number>} The offset.\n * @observable\n * @api\n */\n getOffset() {\n return /** @type {Array<number>} */ (this.get(Property.OFFSET));\n }\n\n /**\n * Get the current position of this overlay.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The spatial point that the overlay is\n * anchored at.\n * @observable\n * @api\n */\n getPosition() {\n return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (this.get(\n Property.POSITION\n ));\n }\n\n /**\n * Get the current positioning of this overlay.\n * @return {import(\"./OverlayPositioning.js\").default} How the overlay is positioned\n * relative to its point on the map.\n * @observable\n * @api\n */\n getPositioning() {\n return /** @type {import(\"./OverlayPositioning.js\").default} */ (this.get(\n Property.POSITIONING\n ));\n }\n\n /**\n * @protected\n */\n handleElementChanged() {\n removeChildren(this.element);\n const element = this.getElement();\n if (element) {\n this.element.appendChild(element);\n }\n }\n\n /**\n * @protected\n */\n handleMapChanged() {\n if (this.mapPostrenderListenerKey) {\n removeNode(this.element);\n unlistenByKey(this.mapPostrenderListenerKey);\n this.mapPostrenderListenerKey = null;\n }\n const map = this.getMap();\n if (map) {\n this.mapPostrenderListenerKey = listen(\n map,\n MapEventType.POSTRENDER,\n this.render,\n this\n );\n this.updatePixelPosition();\n const container = this.stopEvent\n ? map.getOverlayContainerStopEvent()\n : map.getOverlayContainer();\n if (this.insertFirst) {\n container.insertBefore(this.element, container.childNodes[0] || null);\n } else {\n container.appendChild(this.element);\n }\n this.performAutoPan();\n }\n }\n\n /**\n * @protected\n */\n render() {\n this.updatePixelPosition();\n }\n\n /**\n * @protected\n */\n handleOffsetChanged() {\n this.updatePixelPosition();\n }\n\n /**\n * @protected\n */\n handlePositionChanged() {\n this.updatePixelPosition();\n this.performAutoPan();\n }\n\n /**\n * @protected\n */\n handlePositioningChanged() {\n this.updatePixelPosition();\n }\n\n /**\n * Set the DOM element to be associated with this overlay.\n * @param {HTMLElement|undefined} element The Element containing the overlay.\n * @observable\n * @api\n */\n setElement(element) {\n this.set(Property.ELEMENT, element);\n }\n\n /**\n * Set the map to be associated with this overlay.\n * @param {import(\"./PluggableMap.js\").default|undefined} map The map that the\n * overlay is part of.\n * @observable\n * @api\n */\n setMap(map) {\n this.set(Property.MAP, map);\n }\n\n /**\n * Set the offset for this overlay.\n * @param {Array<number>} offset Offset.\n * @observable\n * @api\n */\n setOffset(offset) {\n this.set(Property.OFFSET, offset);\n }\n\n /**\n * Set the position for this overlay. If the position is `undefined` the\n * overlay is hidden.\n * @param {import(\"./coordinate.js\").Coordinate|undefined} position The spatial point that the overlay\n * is anchored at.\n * @observable\n * @api\n */\n setPosition(position) {\n this.set(Property.POSITION, position);\n }\n\n /**\n * Pan the map so that the overlay is entirely visisble in the current viewport\n * (if necessary) using the configured autoPan parameters\n * @protected\n */\n performAutoPan() {\n if (this.autoPan) {\n this.panIntoView(this.autoPan);\n }\n }\n\n /**\n * Pan the map so that the overlay is entirely visible in the current viewport\n * (if necessary).\n * @param {PanIntoViewOptions=} opt_panIntoViewOptions Options for the pan action\n * @api\n */\n panIntoView(opt_panIntoViewOptions) {\n const map = this.getMap();\n\n if (!map || !map.getTargetElement() || !this.get(Property.POSITION)) {\n return;\n }\n\n const mapRect = this.getRect(map.getTargetElement(), map.getSize());\n const element = this.getElement();\n const overlayRect = this.getRect(element, [\n outerWidth(element),\n outerHeight(element),\n ]);\n\n const panIntoViewOptions = opt_panIntoViewOptions || {};\n\n const myMargin =\n panIntoViewOptions.margin === undefined ? 20 : panIntoViewOptions.margin;\n if (!containsExtent(mapRect, overlayRect)) {\n // the overlay is not completely inside the viewport, so pan the map\n const offsetLeft = overlayRect[0] - mapRect[0];\n const offsetRight = mapRect[2] - overlayRect[2];\n const offsetTop = overlayRect[1] - mapRect[1];\n const offsetBottom = mapRect[3] - overlayRect[3];\n\n const delta = [0, 0];\n if (offsetLeft < 0) {\n // move map to the left\n delta[0] = offsetLeft - myMargin;\n } else if (offsetRight < 0) {\n // move map to the right\n delta[0] = Math.abs(offsetRight) + myMargin;\n }\n if (offsetTop < 0) {\n // move map up\n delta[1] = offsetTop - myMargin;\n } else if (offsetBottom < 0) {\n // move map down\n delta[1] = Math.abs(offsetBottom) + myMargin;\n }\n\n if (delta[0] !== 0 || delta[1] !== 0) {\n const center = /** @type {import(\"./coordinate.js\").Coordinate} */ (map\n .getView()\n .getCenterInternal());\n const centerPx = map.getPixelFromCoordinateInternal(center);\n if (!centerPx) {\n return;\n }\n const newCenterPx = [centerPx[0] + delta[0], centerPx[1] + delta[1]];\n\n const panOptions = panIntoViewOptions.animation || {};\n map.getView().animateInternal({\n center: map.getCoordinateFromPixelInternal(newCenterPx),\n duration: panOptions.duration,\n easing: panOptions.easing,\n });\n }\n }\n }\n\n /**\n * Get the extent of an element relative to the document\n * @param {HTMLElement} element The element.\n * @param {import(\"./size.js\").Size} size The size of the element.\n * @return {import(\"./extent.js\").Extent} The extent.\n * @protected\n */\n getRect(element, size) {\n const box = element.getBoundingClientRect();\n const offsetX = box.left + window.pageXOffset;\n const offsetY = box.top + window.pageYOffset;\n return [offsetX, offsetY, offsetX + size[0], offsetY + size[1]];\n }\n\n /**\n * Set the positioning for this overlay.\n * @param {import(\"./OverlayPositioning.js\").default} positioning how the overlay is\n * positioned relative to its point on the map.\n * @observable\n * @api\n */\n setPositioning(positioning) {\n this.set(Property.POSITIONING, positioning);\n }\n\n /**\n * Modify the visibility of the element.\n * @param {boolean} visible Element visibility.\n * @protected\n */\n setVisible(visible) {\n if (this.rendered.visible !== visible) {\n this.element.style.display = visible ? '' : 'none';\n this.rendered.visible = visible;\n }\n }\n\n /**\n * Update pixel position.\n * @protected\n */\n updatePixelPosition() {\n const map = this.getMap();\n const position = this.getPosition();\n if (!map || !map.isRendered() || !position) {\n this.setVisible(false);\n return;\n }\n\n const pixel = map.getPixelFromCoordinate(position);\n const mapSize = map.getSize();\n this.updateRenderedPosition(pixel, mapSize);\n }\n\n /**\n * @param {import(\"./pixel.js\").Pixel} pixel The pixel location.\n * @param {import(\"./size.js\").Size|undefined} mapSize The map size.\n * @protected\n */\n updateRenderedPosition(pixel, mapSize) {\n const style = this.element.style;\n const offset = this.getOffset();\n\n const positioning = this.getPositioning();\n\n this.setVisible(true);\n\n const x = Math.round(pixel[0] + offset[0]) + 'px';\n const y = Math.round(pixel[1] + offset[1]) + 'px';\n let posX = '0%';\n let posY = '0%';\n if (\n positioning == OverlayPositioning.BOTTOM_RIGHT ||\n positioning == OverlayPositioning.CENTER_RIGHT ||\n positioning == OverlayPositioning.TOP_RIGHT\n ) {\n posX = '-100%';\n } else if (\n positioning == OverlayPositioning.BOTTOM_CENTER ||\n positioning == OverlayPositioning.CENTER_CENTER ||\n positioning == OverlayPositioning.TOP_CENTER\n ) {\n posX = '-50%';\n }\n if (\n positioning == OverlayPositioning.BOTTOM_LEFT ||\n positioning == OverlayPositioning.BOTTOM_CENTER ||\n positioning == OverlayPositioning.BOTTOM_RIGHT\n ) {\n posY = '-100%';\n } else if (\n positioning == OverlayPositioning.CENTER_LEFT ||\n positioning == OverlayPositioning.CENTER_CENTER ||\n positioning == OverlayPositioning.CENTER_RIGHT\n ) {\n posY = '-50%';\n }\n const transform = `translate(${posX}, ${posY}) translate(${x}, ${y})`;\n if (this.rendered.transform_ != transform) {\n this.rendered.transform_ = transform;\n style.transform = transform;\n // @ts-ignore IE9\n style.msTransform = transform;\n }\n }\n\n /**\n * returns the options this Overlay has been created with\n * @return {Options} overlay options\n */\n getOptions() {\n return this.options;\n }\n}\n\nexport default Overlay;\n","/**\n * @module ol/control/OverviewMap\n */\nimport CompositeMapRenderer from '../renderer/Composite.js';\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport MapEventType from '../MapEventType.js';\nimport MapProperty from '../MapProperty.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport Overlay from '../Overlay.js';\nimport OverlayPositioning from '../OverlayPositioning.js';\nimport PluggableMap from '../PluggableMap.js';\nimport View from '../View.js';\nimport ViewProperty from '../ViewProperty.js';\nimport {CLASS_COLLAPSED, CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';\nimport {\n containsExtent,\n equals as equalsExtent,\n getBottomRight,\n getTopLeft,\n scaleFromCenter,\n} from '../extent.js';\nimport {getChangeEventType} from '../Object.js';\nimport {listen, listenOnce} from '../events.js';\nimport {fromExtent as polygonFromExtent} from '../geom/Polygon.js';\nimport {replaceNode} from '../dom.js';\n\n/**\n * Maximum width and/or height extent ratio that determines when the overview\n * map should be zoomed out.\n * @type {number}\n */\nconst MAX_RATIO = 0.75;\n\n/**\n * Minimum width and/or height extent ratio that determines when the overview\n * map should be zoomed in.\n * @type {number}\n */\nconst MIN_RATIO = 0.1;\n\nclass ControlledMap extends PluggableMap {\n createRenderer() {\n return new CompositeMapRenderer(this);\n }\n}\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-overviewmap'] CSS class name.\n * @property {boolean} [collapsed=true] Whether the control should start collapsed or not (expanded).\n * @property {string|HTMLElement} [collapseLabel='«'] Text label to use for the\n * expanded overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {boolean} [collapsible=true] Whether the control can be collapsed or not.\n * @property {string|HTMLElement} [label='»'] Text label to use for the collapsed\n * overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {Array<import(\"../layer/Layer.js\").default>|import(\"../Collection.js\").default<import(\"../layer/Layer.js\").default>} [layers]\n * Layers for the overview map.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {boolean} [rotateWithView=false] Whether the control view should rotate with the main map view.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {string} [tipLabel='Overview map'] Text label to use for the button tip.\n * @property {View} [view] Custom view for the overview map (should use same projection as main map). If not provided,\n * a default view with the same projection as the main map will be used.\n */\n\n/**\n * Create a new control with a map acting as an overview map for another\n * defined map.\n *\n * @api\n */\nclass OverviewMap extends Control {\n /**\n * @param {Options=} opt_options OverviewMap options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n super({\n element: document.createElement('div'),\n render: options.render,\n target: options.target,\n });\n\n /**\n * @private\n */\n this.boundHandleRotationChanged_ = this.handleRotationChanged_.bind(this);\n\n /**\n * @type {boolean}\n * @private\n */\n this.collapsed_ =\n options.collapsed !== undefined ? options.collapsed : true;\n\n /**\n * @private\n * @type {boolean}\n */\n this.collapsible_ =\n options.collapsible !== undefined ? options.collapsible : true;\n\n if (!this.collapsible_) {\n this.collapsed_ = false;\n }\n\n /**\n * @private\n * @type {boolean}\n */\n this.rotateWithView_ =\n options.rotateWithView !== undefined ? options.rotateWithView : false;\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent|undefined}\n */\n this.viewExtent_ = undefined;\n\n const className =\n options.className !== undefined ? options.className : 'ol-overviewmap';\n\n const tipLabel =\n options.tipLabel !== undefined ? options.tipLabel : 'Overview map';\n\n const collapseLabel =\n options.collapseLabel !== undefined ? options.collapseLabel : '\\u00AB';\n\n if (typeof collapseLabel === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n this.collapseLabel_ = document.createElement('span');\n this.collapseLabel_.textContent = collapseLabel;\n } else {\n this.collapseLabel_ = collapseLabel;\n }\n\n const label = options.label !== undefined ? options.label : '\\u00BB';\n\n if (typeof label === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n this.label_ = document.createElement('span');\n this.label_.textContent = label;\n } else {\n this.label_ = label;\n }\n\n const activeLabel =\n this.collapsible_ && !this.collapsed_ ? this.collapseLabel_ : this.label_;\n const button = document.createElement('button');\n button.setAttribute('type', 'button');\n button.title = tipLabel;\n button.appendChild(activeLabel);\n\n button.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this),\n false\n );\n\n /**\n * @type {HTMLElement}\n * @private\n */\n this.ovmapDiv_ = document.createElement('div');\n this.ovmapDiv_.className = 'ol-overviewmap-map';\n\n /**\n * Explicitly given view to be used instead of a view derived from the main map.\n * @type {View}\n * @private\n */\n this.view_ = options.view;\n\n /**\n * @type {ControlledMap}\n * @private\n */\n this.ovmap_ = new ControlledMap({\n view: options.view,\n });\n const ovmap = this.ovmap_;\n\n if (options.layers) {\n options.layers.forEach(function (layer) {\n ovmap.addLayer(layer);\n });\n }\n\n const box = document.createElement('div');\n box.className = 'ol-overviewmap-box';\n box.style.boxSizing = 'border-box';\n\n /**\n * @type {import(\"../Overlay.js\").default}\n * @private\n */\n this.boxOverlay_ = new Overlay({\n position: [0, 0],\n positioning: OverlayPositioning.CENTER_CENTER,\n element: box,\n });\n this.ovmap_.addOverlay(this.boxOverlay_);\n\n const cssClasses =\n className +\n ' ' +\n CLASS_UNSELECTABLE +\n ' ' +\n CLASS_CONTROL +\n (this.collapsed_ && this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') +\n (this.collapsible_ ? '' : ' ol-uncollapsible');\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(this.ovmapDiv_);\n element.appendChild(button);\n\n /* Interactive map */\n\n const scope = this;\n\n const overlay = this.boxOverlay_;\n const overlayBox = this.boxOverlay_.getElement();\n\n /* Functions definition */\n\n const computeDesiredMousePosition = function (mousePosition) {\n return {\n clientX: mousePosition.clientX,\n clientY: mousePosition.clientY,\n };\n };\n\n const move = function (event) {\n const position = /** @type {?} */ (computeDesiredMousePosition(event));\n const coordinates = ovmap.getEventCoordinateInternal(\n /** @type {MouseEvent} */ (position)\n );\n\n overlay.setPosition(coordinates);\n };\n\n const endMoving = function (event) {\n const coordinates = ovmap.getEventCoordinateInternal(event);\n\n scope.getMap().getView().setCenterInternal(coordinates);\n\n window.removeEventListener('mousemove', move);\n window.removeEventListener('mouseup', endMoving);\n };\n\n /* Binding */\n\n overlayBox.addEventListener('mousedown', function () {\n window.addEventListener('mousemove', move);\n window.addEventListener('mouseup', endMoving);\n });\n }\n\n /**\n * Remove the control from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @api\n */\n setMap(map) {\n const oldMap = this.getMap();\n if (map === oldMap) {\n return;\n }\n if (oldMap) {\n const oldView = oldMap.getView();\n if (oldView) {\n this.unbindView_(oldView);\n }\n this.ovmap_.setTarget(null);\n }\n super.setMap(map);\n\n if (map) {\n this.ovmap_.setTarget(this.ovmapDiv_);\n this.listenerKeys.push(\n listen(\n map,\n ObjectEventType.PROPERTYCHANGE,\n this.handleMapPropertyChange_,\n this\n )\n );\n\n const view = map.getView();\n if (view) {\n this.bindView_(view);\n if (view.isDef()) {\n this.ovmap_.updateSize();\n this.resetExtent_();\n }\n }\n }\n }\n\n /**\n * Handle map property changes. This only deals with changes to the map's view.\n * @param {import(\"../Object.js\").ObjectEvent} event The propertychange event.\n * @private\n */\n handleMapPropertyChange_(event) {\n if (event.key === MapProperty.VIEW) {\n const oldView = /** @type {import(\"../View.js\").default} */ (event.oldValue);\n if (oldView) {\n this.unbindView_(oldView);\n }\n const newView = this.getMap().getView();\n this.bindView_(newView);\n }\n }\n\n /**\n * Register listeners for view property changes.\n * @param {import(\"../View.js\").default} view The view.\n * @private\n */\n bindView_(view) {\n if (!this.view_) {\n // Unless an explicit view definition was given, derive default from whatever main map uses.\n const newView = new View({\n projection: view.getProjection(),\n });\n this.ovmap_.setView(newView);\n }\n\n view.addEventListener(\n getChangeEventType(ViewProperty.ROTATION),\n this.boundHandleRotationChanged_\n );\n // Sync once with the new view\n this.handleRotationChanged_();\n }\n\n /**\n * Unregister listeners for view property changes.\n * @param {import(\"../View.js\").default} view The view.\n * @private\n */\n unbindView_(view) {\n view.removeEventListener(\n getChangeEventType(ViewProperty.ROTATION),\n this.boundHandleRotationChanged_\n );\n }\n\n /**\n * Handle rotation changes to the main map.\n * @private\n */\n handleRotationChanged_() {\n if (this.rotateWithView_) {\n this.ovmap_.getView().setRotation(this.getMap().getView().getRotation());\n }\n }\n\n /**\n * Reset the overview map extent if the box size (width or\n * height) is less than the size of the overview map size times minRatio\n * or is greater than the size of the overview size times maxRatio.\n *\n * If the map extent was not reset, the box size can fits in the defined\n * ratio sizes. This method then checks if is contained inside the overview\n * map current extent. If not, recenter the overview map to the current\n * main map center location.\n * @private\n */\n validateExtent_() {\n const map = this.getMap();\n const ovmap = this.ovmap_;\n\n if (!map.isRendered() || !ovmap.isRendered()) {\n return;\n }\n\n const mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n\n const view = map.getView();\n const extent = view.calculateExtentInternal(mapSize);\n\n if (this.viewExtent_ && equalsExtent(extent, this.viewExtent_)) {\n // repeats of the same extent may indicate constraint conflicts leading to an endless cycle\n return;\n }\n this.viewExtent_ = extent;\n\n const ovmapSize = /** @type {import(\"../size.js\").Size} */ (ovmap.getSize());\n\n const ovview = ovmap.getView();\n const ovextent = ovview.calculateExtentInternal(ovmapSize);\n\n const topLeftPixel = ovmap.getPixelFromCoordinateInternal(\n getTopLeft(extent)\n );\n const bottomRightPixel = ovmap.getPixelFromCoordinateInternal(\n getBottomRight(extent)\n );\n\n const boxWidth = Math.abs(topLeftPixel[0] - bottomRightPixel[0]);\n const boxHeight = Math.abs(topLeftPixel[1] - bottomRightPixel[1]);\n\n const ovmapWidth = ovmapSize[0];\n const ovmapHeight = ovmapSize[1];\n\n if (\n boxWidth < ovmapWidth * MIN_RATIO ||\n boxHeight < ovmapHeight * MIN_RATIO ||\n boxWidth > ovmapWidth * MAX_RATIO ||\n boxHeight > ovmapHeight * MAX_RATIO\n ) {\n this.resetExtent_();\n } else if (!containsExtent(ovextent, extent)) {\n this.recenter_();\n }\n }\n\n /**\n * Reset the overview map extent to half calculated min and max ratio times\n * the extent of the main map.\n * @private\n */\n resetExtent_() {\n if (MAX_RATIO === 0 || MIN_RATIO === 0) {\n return;\n }\n\n const map = this.getMap();\n const ovmap = this.ovmap_;\n\n const mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n\n const view = map.getView();\n const extent = view.calculateExtentInternal(mapSize);\n\n const ovview = ovmap.getView();\n\n // get how many times the current map overview could hold different\n // box sizes using the min and max ratio, pick the step in the middle used\n // to calculate the extent from the main map to set it to the overview map,\n const steps = Math.log(MAX_RATIO / MIN_RATIO) / Math.LN2;\n const ratio = 1 / (Math.pow(2, steps / 2) * MIN_RATIO);\n scaleFromCenter(extent, ratio);\n ovview.fitInternal(polygonFromExtent(extent));\n }\n\n /**\n * Set the center of the overview map to the map center without changing its\n * resolution.\n * @private\n */\n recenter_() {\n const map = this.getMap();\n const ovmap = this.ovmap_;\n\n const view = map.getView();\n\n const ovview = ovmap.getView();\n\n ovview.setCenterInternal(view.getCenterInternal());\n }\n\n /**\n * Update the box using the main map extent\n * @private\n */\n updateBox_() {\n const map = this.getMap();\n const ovmap = this.ovmap_;\n\n if (!map.isRendered() || !ovmap.isRendered()) {\n return;\n }\n\n const mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n\n const view = map.getView();\n\n const ovview = ovmap.getView();\n\n const rotation = this.rotateWithView_ ? 0 : -view.getRotation();\n\n const overlay = this.boxOverlay_;\n const box = this.boxOverlay_.getElement();\n const center = view.getCenterInternal();\n const resolution = view.getResolution();\n const ovresolution = ovview.getResolution();\n const width = (mapSize[0] * resolution) / ovresolution;\n const height = (mapSize[1] * resolution) / ovresolution;\n\n // set position using center coordinates\n overlay.setPosition(center);\n\n // set box size calculated from map extent size and overview map resolution\n if (box) {\n box.style.width = width + 'px';\n box.style.height = height + 'px';\n const transform = 'rotate(' + rotation + 'rad)';\n box.style.transform = transform;\n }\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n this.handleToggle_();\n }\n\n /**\n * @private\n */\n handleToggle_() {\n this.element.classList.toggle(CLASS_COLLAPSED);\n if (this.collapsed_) {\n replaceNode(this.collapseLabel_, this.label_);\n } else {\n replaceNode(this.label_, this.collapseLabel_);\n }\n this.collapsed_ = !this.collapsed_;\n\n // manage overview map if it had not been rendered before and control\n // is expanded\n const ovmap = this.ovmap_;\n if (!this.collapsed_) {\n if (ovmap.isRendered()) {\n this.viewExtent_ = undefined;\n ovmap.render();\n return;\n }\n ovmap.updateSize();\n this.resetExtent_();\n listenOnce(\n ovmap,\n MapEventType.POSTRENDER,\n function (event) {\n this.updateBox_();\n },\n this\n );\n }\n }\n\n /**\n * Return `true` if the overview map is collapsible, `false` otherwise.\n * @return {boolean} True if the widget is collapsible.\n * @api\n */\n getCollapsible() {\n return this.collapsible_;\n }\n\n /**\n * Set whether the overview map should be collapsible.\n * @param {boolean} collapsible True if the widget is collapsible.\n * @api\n */\n setCollapsible(collapsible) {\n if (this.collapsible_ === collapsible) {\n return;\n }\n this.collapsible_ = collapsible;\n this.element.classList.toggle('ol-uncollapsible');\n if (!collapsible && this.collapsed_) {\n this.handleToggle_();\n }\n }\n\n /**\n * Collapse or expand the overview map according to the passed parameter. Will\n * not do anything if the overview map isn't collapsible or if the current\n * collapsed state is already the one requested.\n * @param {boolean} collapsed True if the widget is collapsed.\n * @api\n */\n setCollapsed(collapsed) {\n if (!this.collapsible_ || this.collapsed_ === collapsed) {\n return;\n }\n this.handleToggle_();\n }\n\n /**\n * Determine if the overview map is collapsed.\n * @return {boolean} The overview map is collapsed.\n * @api\n */\n getCollapsed() {\n return this.collapsed_;\n }\n\n /**\n * Return `true` if the overview map view can rotate, `false` otherwise.\n * @return {boolean} True if the control view can rotate.\n * @api\n */\n getRotateWithView() {\n return this.rotateWithView_;\n }\n\n /**\n * Set whether the overview map view should rotate with the main map view.\n * @param {boolean} rotateWithView True if the control view should rotate.\n * @api\n */\n setRotateWithView(rotateWithView) {\n if (this.rotateWithView_ === rotateWithView) {\n return;\n }\n this.rotateWithView_ = rotateWithView;\n if (this.getMap().getView().getRotation() !== 0) {\n if (this.rotateWithView_) {\n this.handleRotationChanged_();\n } else {\n this.ovmap_.getView().setRotation(0);\n }\n this.viewExtent_ = undefined;\n this.validateExtent_();\n this.updateBox_();\n }\n }\n\n /**\n * Return the overview map.\n * @return {import(\"../PluggableMap.js\").default} Overview map.\n * @api\n */\n getOverviewMap() {\n return this.ovmap_;\n }\n\n /**\n * Update the overview map element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n this.validateExtent_();\n this.updateBox_();\n }\n}\n\nexport default OverviewMap;\n","/**\n * @module ol/control/ScaleLine\n */\nimport Control from './Control.js';\nimport ProjUnits from '../proj/Units.js';\nimport {CLASS_UNSELECTABLE} from '../css.js';\nimport {METERS_PER_UNIT, getPointResolution} from '../proj.js';\nimport {assert} from '../asserts.js';\nimport {getChangeEventType} from '../Object.js';\n\n/**\n * @type {string}\n */\nconst UNITS_PROP = 'units';\n\n/**\n * Units for the scale line. Supported values are `'degrees'`, `'imperial'`,\n * `'nautical'`, `'metric'`, `'us'`.\n * @enum {string}\n */\nexport const Units = {\n DEGREES: 'degrees',\n IMPERIAL: 'imperial',\n NAUTICAL: 'nautical',\n METRIC: 'metric',\n US: 'us',\n};\n\n/**\n * @const\n * @type {Array<number>}\n */\nconst LEADING_DIGITS = [1, 2, 5];\n\n/**\n * @const\n * @type {number}\n */\nconst DEFAULT_DPI = 25.4 / 0.28;\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-scale-line'] CSS Class name.\n * @property {number} [minWidth=64] Minimum width in pixels at the OGC default dpi. The width will be\n * adjusted to match the dpi used.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {import(\"./ScaleLine.js\").Units|string} [units='metric'] Units.\n * @property {boolean} [bar=false] Render scalebars instead of a line.\n * @property {number} [steps=4] Number of steps the scalebar should use. Use even numbers\n * for best results. Only applies when `bar` is `true`.\n * @property {boolean} [text=false] Render the text scale above of the scalebar. Only applies\n * when `bar` is `true`.\n * @property {number|undefined} [dpi=undefined] dpi of output device such as printer. Only applies\n * when `bar` is `true`. If undefined the OGC default screen pixel size of 0.28mm will be assumed.\n */\n\n/**\n * @classdesc\n * A control displaying rough y-axis distances, calculated for the center of the\n * viewport. For conformal projections (e.g. EPSG:3857, the default view\n * projection in OpenLayers), the scale is valid for all directions.\n * No scale line will be shown when the y-axis distance of a pixel at the\n * viewport center cannot be calculated in the view projection.\n * By default the scale line will show in the bottom left portion of the map,\n * but this can be changed by using the css selector `.ol-scale-line`.\n * When specifying `bar` as `true`, a scalebar will be rendered instead\n * of a scaleline.\n *\n * @api\n */\nclass ScaleLine extends Control {\n /**\n * @param {Options=} opt_options Scale line options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n const className =\n options.className !== undefined\n ? options.className\n : options.bar\n ? 'ol-scale-bar'\n : 'ol-scale-line';\n\n super({\n element: document.createElement('div'),\n render: options.render,\n target: options.target,\n });\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.innerElement_ = document.createElement('div');\n this.innerElement_.className = className + '-inner';\n\n this.element.className = className + ' ' + CLASS_UNSELECTABLE;\n this.element.appendChild(this.innerElement_);\n\n /**\n * @private\n * @type {?import(\"../View.js\").State}\n */\n this.viewState_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.minWidth_ = options.minWidth !== undefined ? options.minWidth : 64;\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderedVisible_ = false;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.renderedWidth_ = undefined;\n\n /**\n * @private\n * @type {string}\n */\n this.renderedHTML_ = '';\n\n this.addEventListener(\n getChangeEventType(UNITS_PROP),\n this.handleUnitsChanged_\n );\n\n this.setUnits(options.units || Units.METRIC);\n\n /**\n * @private\n * @type {boolean}\n */\n this.scaleBar_ = options.bar || false;\n\n /**\n * @private\n * @type {number}\n */\n this.scaleBarSteps_ = options.steps || 4;\n\n /**\n * @private\n * @type {boolean}\n */\n this.scaleBarText_ = options.text || false;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.dpi_ = options.dpi || undefined;\n }\n\n /**\n * Return the units to use in the scale line.\n * @return {import(\"./ScaleLine.js\").Units} The units\n * to use in the scale line.\n * @observable\n * @api\n */\n getUnits() {\n return this.get(UNITS_PROP);\n }\n\n /**\n * @private\n */\n handleUnitsChanged_() {\n this.updateElement_();\n }\n\n /**\n * Set the units to use in the scale line.\n * @param {import(\"./ScaleLine.js\").Units} units The units to use in the scale line.\n * @observable\n * @api\n */\n setUnits(units) {\n this.set(UNITS_PROP, units);\n }\n\n /**\n * Specify the dpi of output device such as printer.\n * @param {number|undefined} dpi The dpi of output device.\n * @api\n */\n setDpi(dpi) {\n this.dpi_ = dpi;\n }\n\n /**\n * @private\n */\n updateElement_() {\n const viewState = this.viewState_;\n\n if (!viewState) {\n if (this.renderedVisible_) {\n this.element.style.display = 'none';\n this.renderedVisible_ = false;\n }\n return;\n }\n\n const center = viewState.center;\n const projection = viewState.projection;\n const units = this.getUnits();\n const pointResolutionUnits =\n units == Units.DEGREES ? ProjUnits.DEGREES : ProjUnits.METERS;\n let pointResolution = getPointResolution(\n projection,\n viewState.resolution,\n center,\n pointResolutionUnits\n );\n\n const minWidth =\n (this.minWidth_ * (this.dpi_ || DEFAULT_DPI)) / DEFAULT_DPI;\n\n let nominalCount = minWidth * pointResolution;\n let suffix = '';\n if (units == Units.DEGREES) {\n const metersPerDegree = METERS_PER_UNIT[ProjUnits.DEGREES];\n nominalCount *= metersPerDegree;\n if (nominalCount < metersPerDegree / 60) {\n suffix = '\\u2033'; // seconds\n pointResolution *= 3600;\n } else if (nominalCount < metersPerDegree) {\n suffix = '\\u2032'; // minutes\n pointResolution *= 60;\n } else {\n suffix = '\\u00b0'; // degrees\n }\n } else if (units == Units.IMPERIAL) {\n if (nominalCount < 0.9144) {\n suffix = 'in';\n pointResolution /= 0.0254;\n } else if (nominalCount < 1609.344) {\n suffix = 'ft';\n pointResolution /= 0.3048;\n } else {\n suffix = 'mi';\n pointResolution /= 1609.344;\n }\n } else if (units == Units.NAUTICAL) {\n pointResolution /= 1852;\n suffix = 'nm';\n } else if (units == Units.METRIC) {\n if (nominalCount < 0.001) {\n suffix = 'μm';\n pointResolution *= 1000000;\n } else if (nominalCount < 1) {\n suffix = 'mm';\n pointResolution *= 1000;\n } else if (nominalCount < 1000) {\n suffix = 'm';\n } else {\n suffix = 'km';\n pointResolution /= 1000;\n }\n } else if (units == Units.US) {\n if (nominalCount < 0.9144) {\n suffix = 'in';\n pointResolution *= 39.37;\n } else if (nominalCount < 1609.344) {\n suffix = 'ft';\n pointResolution /= 0.30480061;\n } else {\n suffix = 'mi';\n pointResolution /= 1609.3472;\n }\n } else {\n assert(false, 33); // Invalid units\n }\n\n let i = 3 * Math.floor(Math.log(minWidth * pointResolution) / Math.log(10));\n let count, width, decimalCount;\n while (true) {\n decimalCount = Math.floor(i / 3);\n const decimal = Math.pow(10, decimalCount);\n count = LEADING_DIGITS[((i % 3) + 3) % 3] * decimal;\n width = Math.round(count / pointResolution);\n if (isNaN(width)) {\n this.element.style.display = 'none';\n this.renderedVisible_ = false;\n return;\n } else if (width >= minWidth) {\n break;\n }\n ++i;\n }\n let html;\n if (this.scaleBar_) {\n html = this.createScaleBar(width, count, suffix);\n } else {\n html = count.toFixed(decimalCount < 0 ? -decimalCount : 0) + ' ' + suffix;\n }\n\n if (this.renderedHTML_ != html) {\n this.innerElement_.innerHTML = html;\n this.renderedHTML_ = html;\n }\n\n if (this.renderedWidth_ != width) {\n this.innerElement_.style.width = width + 'px';\n this.renderedWidth_ = width;\n }\n\n if (!this.renderedVisible_) {\n this.element.style.display = '';\n this.renderedVisible_ = true;\n }\n }\n\n /**\n * @private\n * @param {number} width The current width of the scalebar.\n * @param {number} scale The current scale.\n * @param {string} suffix The suffix to append to the scale text.\n * @returns {string} The stringified HTML of the scalebar.\n */\n createScaleBar(width, scale, suffix) {\n const mapScale =\n '1 : ' + Math.round(this.getScaleForResolution()).toLocaleString();\n const scaleSteps = [];\n const stepWidth = width / this.scaleBarSteps_;\n let backgroundColor = '#ffffff';\n for (let i = 0; i < this.scaleBarSteps_; i++) {\n if (i === 0) {\n // create the first marker at position 0\n scaleSteps.push(this.createMarker('absolute', i));\n }\n scaleSteps.push(\n '<div>' +\n '<div ' +\n 'class=\"ol-scale-singlebar\" ' +\n 'style=' +\n '\"width: ' +\n stepWidth +\n 'px;' +\n 'background-color: ' +\n backgroundColor +\n ';\"' +\n '>' +\n '</div>' +\n this.createMarker('relative', i) +\n /*render text every second step, except when only 2 steps */\n (i % 2 === 0 || this.scaleBarSteps_ === 2\n ? this.createStepText(i, width, false, scale, suffix)\n : '') +\n '</div>'\n );\n if (i === this.scaleBarSteps_ - 1) {\n {\n /*render text at the end */\n }\n scaleSteps.push(this.createStepText(i + 1, width, true, scale, suffix));\n }\n // switch colors of steps between black and white\n if (backgroundColor === '#ffffff') {\n backgroundColor = '#000000';\n } else {\n backgroundColor = '#ffffff';\n }\n }\n\n let scaleBarText;\n if (this.scaleBarText_) {\n scaleBarText =\n '<div ' +\n 'class=\"ol-scale-text\" ' +\n 'style=\"width: ' +\n width +\n 'px;\">' +\n mapScale +\n '</div>';\n } else {\n scaleBarText = '';\n }\n const container =\n '<div ' +\n 'style=\"display: flex;\">' +\n scaleBarText +\n scaleSteps.join('') +\n '</div>';\n return container;\n }\n\n /**\n * Creates a marker at given position\n * @param {string} position - The position, absolute or relative\n * @param {number} i - The iterator\n * @returns {string} The stringified div containing the marker\n */\n createMarker(position, i) {\n const top = position === 'absolute' ? 3 : -10;\n return (\n '<div ' +\n 'class=\"ol-scale-step-marker\" ' +\n 'style=\"position: ' +\n position +\n ';' +\n 'top: ' +\n top +\n 'px;\"' +\n '></div>'\n );\n }\n\n /**\n * Creates the label for a marker marker at given position\n * @param {number} i - The iterator\n * @param {number} width - The width the scalebar will currently use\n * @param {boolean} isLast - Flag indicating if we add the last step text\n * @param {number} scale - The current scale for the whole scalebar\n * @param {string} suffix - The suffix for the scale\n * @returns {string} The stringified div containing the step text\n */\n createStepText(i, width, isLast, scale, suffix) {\n const length =\n i === 0 ? 0 : Math.round((scale / this.scaleBarSteps_) * i * 100) / 100;\n const lengthString = length + (i === 0 ? '' : ' ' + suffix);\n const margin = i === 0 ? -3 : (width / this.scaleBarSteps_) * -1;\n const minWidth = i === 0 ? 0 : (width / this.scaleBarSteps_) * 2;\n return (\n '<div ' +\n 'class=\"ol-scale-step-text\" ' +\n 'style=\"' +\n 'margin-left: ' +\n margin +\n 'px;' +\n 'text-align: ' +\n (i === 0 ? 'left' : 'center') +\n '; ' +\n 'min-width: ' +\n minWidth +\n 'px;' +\n 'left: ' +\n (isLast ? width + 'px' : 'unset') +\n ';\"' +\n '>' +\n lengthString +\n '</div>'\n );\n }\n\n /**\n * Returns the appropriate scale for the given resolution and units.\n * @return {number} The appropriate scale.\n */\n getScaleForResolution() {\n const resolution = getPointResolution(\n this.viewState_.projection,\n this.viewState_.resolution,\n this.viewState_.center\n );\n const dpi = this.dpi_ || DEFAULT_DPI;\n const mpu = this.viewState_.projection.getMetersPerUnit();\n const inchesPerMeter = 1000 / 25.4;\n return parseFloat(resolution.toString()) * mpu * inchesPerMeter * dpi;\n }\n\n /**\n * Update the scale line element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n const frameState = mapEvent.frameState;\n if (!frameState) {\n this.viewState_ = null;\n } else {\n this.viewState_ = frameState.viewState;\n }\n this.updateElement_();\n }\n}\n\nexport default ScaleLine;\n","/**\n * @module ol/control/ZoomSlider\n */\n\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport PointerEventType from '../pointer/EventType.js';\nimport {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';\nimport {clamp} from '../math.js';\nimport {easeOut} from '../easing.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport {stopPropagation} from '../events/Event.js';\n\n/**\n * The enum for available directions.\n *\n * @enum {number}\n */\nconst Direction = {\n VERTICAL: 0,\n HORIZONTAL: 1,\n};\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-zoomslider'] CSS class name.\n * @property {number} [duration=200] Animation duration in milliseconds.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n */\n\n/**\n * @classdesc\n * A slider type of control for zooming.\n *\n * Example:\n *\n * map.addControl(new ZoomSlider());\n *\n * @api\n */\nclass ZoomSlider extends Control {\n /**\n * @param {Options=} opt_options Zoom slider options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n super({\n element: document.createElement('div'),\n render: options.render,\n });\n\n /**\n * @type {!Array.<import(\"../events.js\").EventsKey>}\n * @private\n */\n this.dragListenerKeys_ = [];\n\n /**\n * Will hold the current resolution of the view.\n *\n * @type {number|undefined}\n * @private\n */\n this.currentResolution_ = undefined;\n\n /**\n * The direction of the slider. Will be determined from actual display of the\n * container and defaults to Direction.VERTICAL.\n *\n * @type {Direction}\n * @private\n */\n this.direction_ = Direction.VERTICAL;\n\n /**\n * @type {boolean}\n * @private\n */\n this.dragging_;\n\n /**\n * @type {number}\n * @private\n */\n this.heightLimit_ = 0;\n\n /**\n * @type {number}\n * @private\n */\n this.widthLimit_ = 0;\n\n /**\n * @type {number|undefined}\n * @private\n */\n this.startX_;\n\n /**\n * @type {number|undefined}\n * @private\n */\n this.startY_;\n\n /**\n * The calculated thumb size (border box plus margins). Set when initSlider_\n * is called.\n * @type {import(\"../size.js\").Size}\n * @private\n */\n this.thumbSize_ = null;\n\n /**\n * Whether the slider is initialized.\n * @type {boolean}\n * @private\n */\n this.sliderInitialized_ = false;\n\n /**\n * @type {number}\n * @private\n */\n this.duration_ = options.duration !== undefined ? options.duration : 200;\n\n const className =\n options.className !== undefined ? options.className : 'ol-zoomslider';\n const thumbElement = document.createElement('button');\n thumbElement.setAttribute('type', 'button');\n thumbElement.className = className + '-thumb ' + CLASS_UNSELECTABLE;\n const containerElement = this.element;\n containerElement.className =\n className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n containerElement.appendChild(thumbElement);\n\n containerElement.addEventListener(\n PointerEventType.POINTERDOWN,\n this.handleDraggerStart_.bind(this),\n false\n );\n containerElement.addEventListener(\n PointerEventType.POINTERMOVE,\n this.handleDraggerDrag_.bind(this),\n false\n );\n containerElement.addEventListener(\n PointerEventType.POINTERUP,\n this.handleDraggerEnd_.bind(this),\n false\n );\n\n containerElement.addEventListener(\n EventType.CLICK,\n this.handleContainerClick_.bind(this),\n false\n );\n thumbElement.addEventListener(EventType.CLICK, stopPropagation, false);\n }\n\n /**\n * Remove the control from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @api\n */\n setMap(map) {\n super.setMap(map);\n if (map) {\n map.render();\n }\n }\n\n /**\n * Initializes the slider element. This will determine and set this controls\n * direction_ and also constrain the dragging of the thumb to always be within\n * the bounds of the container.\n *\n * @return {boolean} Initialization successful\n * @private\n */\n initSlider_() {\n const container = this.element;\n const containerWidth = container.offsetWidth;\n const containerHeight = container.offsetHeight;\n if (containerWidth === 0 && containerHeight === 0) {\n return (this.sliderInitialized_ = false);\n }\n\n const thumb = /** @type {HTMLElement} */ (container.firstElementChild);\n const computedStyle = getComputedStyle(thumb);\n const thumbWidth =\n thumb.offsetWidth +\n parseFloat(computedStyle['marginRight']) +\n parseFloat(computedStyle['marginLeft']);\n const thumbHeight =\n thumb.offsetHeight +\n parseFloat(computedStyle['marginTop']) +\n parseFloat(computedStyle['marginBottom']);\n this.thumbSize_ = [thumbWidth, thumbHeight];\n\n if (containerWidth > containerHeight) {\n this.direction_ = Direction.HORIZONTAL;\n this.widthLimit_ = containerWidth - thumbWidth;\n } else {\n this.direction_ = Direction.VERTICAL;\n this.heightLimit_ = containerHeight - thumbHeight;\n }\n return (this.sliderInitialized_ = true);\n }\n\n /**\n * @param {PointerEvent} event The browser event to handle.\n * @private\n */\n handleContainerClick_(event) {\n const view = this.getMap().getView();\n\n const relativePosition = this.getRelativePosition_(\n event.offsetX - this.thumbSize_[0] / 2,\n event.offsetY - this.thumbSize_[1] / 2\n );\n\n const resolution = this.getResolutionForPosition_(relativePosition);\n const zoom = view.getConstrainedZoom(view.getZoomForResolution(resolution));\n\n view.animateInternal({\n zoom: zoom,\n duration: this.duration_,\n easing: easeOut,\n });\n }\n\n /**\n * Handle dragger start events.\n * @param {PointerEvent} event The drag event.\n * @private\n */\n handleDraggerStart_(event) {\n if (!this.dragging_ && event.target === this.element.firstElementChild) {\n const element = /** @type {HTMLElement} */ (this.element\n .firstElementChild);\n this.getMap().getView().beginInteraction();\n this.startX_ = event.clientX - parseFloat(element.style.left);\n this.startY_ = event.clientY - parseFloat(element.style.top);\n this.dragging_ = true;\n\n if (this.dragListenerKeys_.length === 0) {\n const drag = this.handleDraggerDrag_;\n const end = this.handleDraggerEnd_;\n const doc = this.getMap().getOwnerDocument();\n this.dragListenerKeys_.push(\n listen(doc, PointerEventType.POINTERMOVE, drag, this),\n listen(doc, PointerEventType.POINTERUP, end, this)\n );\n }\n }\n }\n\n /**\n * Handle dragger drag events.\n *\n * @param {PointerEvent} event The drag event.\n * @private\n */\n handleDraggerDrag_(event) {\n if (this.dragging_) {\n const deltaX = event.clientX - this.startX_;\n const deltaY = event.clientY - this.startY_;\n const relativePosition = this.getRelativePosition_(deltaX, deltaY);\n this.currentResolution_ = this.getResolutionForPosition_(\n relativePosition\n );\n this.getMap().getView().setResolution(this.currentResolution_);\n }\n }\n\n /**\n * Handle dragger end events.\n * @param {PointerEvent} event The drag event.\n * @private\n */\n handleDraggerEnd_(event) {\n if (this.dragging_) {\n const view = this.getMap().getView();\n view.endInteraction();\n\n this.dragging_ = false;\n this.startX_ = undefined;\n this.startY_ = undefined;\n this.dragListenerKeys_.forEach(unlistenByKey);\n this.dragListenerKeys_.length = 0;\n }\n }\n\n /**\n * Positions the thumb inside its container according to the given resolution.\n *\n * @param {number} res The res.\n * @private\n */\n setThumbPosition_(res) {\n const position = this.getPositionForResolution_(res);\n const thumb = /** @type {HTMLElement} */ (this.element.firstElementChild);\n\n if (this.direction_ == Direction.HORIZONTAL) {\n thumb.style.left = this.widthLimit_ * position + 'px';\n } else {\n thumb.style.top = this.heightLimit_ * position + 'px';\n }\n }\n\n /**\n * Calculates the relative position of the thumb given x and y offsets. The\n * relative position scales from 0 to 1. The x and y offsets are assumed to be\n * in pixel units within the dragger limits.\n *\n * @param {number} x Pixel position relative to the left of the slider.\n * @param {number} y Pixel position relative to the top of the slider.\n * @return {number} The relative position of the thumb.\n * @private\n */\n getRelativePosition_(x, y) {\n let amount;\n if (this.direction_ === Direction.HORIZONTAL) {\n amount = x / this.widthLimit_;\n } else {\n amount = y / this.heightLimit_;\n }\n return clamp(amount, 0, 1);\n }\n\n /**\n * Calculates the corresponding resolution of the thumb given its relative\n * position (where 0 is the minimum and 1 is the maximum).\n *\n * @param {number} position The relative position of the thumb.\n * @return {number} The corresponding resolution.\n * @private\n */\n getResolutionForPosition_(position) {\n const fn = this.getMap().getView().getResolutionForValueFunction();\n return fn(1 - position);\n }\n\n /**\n * Determines the relative position of the slider for the given resolution. A\n * relative position of 0 corresponds to the minimum view resolution. A\n * relative position of 1 corresponds to the maximum view resolution.\n *\n * @param {number} res The resolution.\n * @return {number} The relative position value (between 0 and 1).\n * @private\n */\n getPositionForResolution_(res) {\n const fn = this.getMap().getView().getValueForResolutionFunction();\n return clamp(1 - fn(res), 0, 1);\n }\n\n /**\n * Update the zoomslider element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n if (!mapEvent.frameState) {\n return;\n }\n if (!this.sliderInitialized_ && !this.initSlider_()) {\n return;\n }\n const res = mapEvent.frameState.viewState.resolution;\n this.currentResolution_ = res;\n this.setThumbPosition_(res);\n }\n}\n\nexport default ZoomSlider;\n","/**\n * @module ol/control/ZoomToExtent\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';\nimport {fromExtent as polygonFromExtent} from '../geom/Polygon.js';\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-zoom-extent'] Class name.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {string|HTMLElement} [label='E'] Text label to use for the button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Fit to extent'] Text label to use for the button tip.\n * @property {import(\"../extent.js\").Extent} [extent] The extent to zoom to. If undefined the validity\n * extent of the view projection is used.\n */\n\n/**\n * @classdesc\n * A button control which, when pressed, changes the map view to a specific\n * extent. To style this control use the css selector `.ol-zoom-extent`.\n *\n * @api\n */\nclass ZoomToExtent extends Control {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n super({\n element: document.createElement('div'),\n target: options.target,\n });\n\n /**\n * @type {?import(\"../extent.js\").Extent}\n * @protected\n */\n this.extent = options.extent ? options.extent : null;\n\n const className =\n options.className !== undefined ? options.className : 'ol-zoom-extent';\n\n const label = options.label !== undefined ? options.label : 'E';\n const tipLabel =\n options.tipLabel !== undefined ? options.tipLabel : 'Fit to extent';\n const button = document.createElement('button');\n button.setAttribute('type', 'button');\n button.title = tipLabel;\n button.appendChild(\n typeof label === 'string' ? document.createTextNode(label) : label\n );\n\n button.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this),\n false\n );\n\n const cssClasses =\n className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(button);\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n this.handleZoomToExtent();\n }\n\n /**\n * @protected\n */\n handleZoomToExtent() {\n const map = this.getMap();\n const view = map.getView();\n const extent = !this.extent\n ? view.getProjection().getExtent()\n : this.extent;\n view.fitInternal(polygonFromExtent(extent));\n }\n}\n\nexport default ZoomToExtent;\n","/**\n * @module ol/control\n */\nimport Attribution from './control/Attribution.js';\nimport Collection from './Collection.js';\nimport Rotate from './control/Rotate.js';\nimport Zoom from './control/Zoom.js';\n\nexport {default as Attribution} from './control/Attribution.js';\nexport {default as Control} from './control/Control.js';\nexport {default as FullScreen} from './control/FullScreen.js';\nexport {default as MousePosition} from './control/MousePosition.js';\nexport {default as OverviewMap} from './control/OverviewMap.js';\nexport {default as Rotate} from './control/Rotate.js';\nexport {default as ScaleLine} from './control/ScaleLine.js';\nexport {default as Zoom} from './control/Zoom.js';\nexport {default as ZoomSlider} from './control/ZoomSlider.js';\nexport {default as ZoomToExtent} from './control/ZoomToExtent.js';\n\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [attribution=true] Include\n * {@link module:ol/control/Attribution~Attribution}.\n * @property {import(\"./control/Attribution.js\").Options} [attributionOptions]\n * Options for {@link module:ol/control/Attribution~Attribution}.\n * @property {boolean} [rotate=true] Include\n * {@link module:ol/control/Rotate~Rotate}.\n * @property {import(\"./control/Rotate.js\").Options} [rotateOptions] Options\n * for {@link module:ol/control/Rotate~Rotate}.\n * @property {boolean} [zoom] Include {@link module:ol/control/Zoom~Zoom}.\n * @property {import(\"./control/Zoom.js\").Options} [zoomOptions] Options for\n * {@link module:ol/control/Zoom~Zoom}.\n * @api\n */\n\n/**\n * Set of controls included in maps by default. Unless configured otherwise,\n * this returns a collection containing an instance of each of the following\n * controls:\n * * {@link module:ol/control/Zoom~Zoom}\n * * {@link module:ol/control/Rotate~Rotate}\n * * {@link module:ol/control/Attribution~Attribution}\n *\n * @param {DefaultsOptions=} opt_options\n * Defaults options.\n * @return {Collection<import(\"./control/Control.js\").default>}\n * Controls.\n * @api\n */\nexport function defaults(opt_options) {\n const options = opt_options ? opt_options : {};\n\n const controls = new Collection();\n\n const zoomControl = options.zoom !== undefined ? options.zoom : true;\n if (zoomControl) {\n controls.push(new Zoom(options.zoomOptions));\n }\n\n const rotateControl = options.rotate !== undefined ? options.rotate : true;\n if (rotateControl) {\n controls.push(new Rotate(options.rotateOptions));\n }\n\n const attributionControl =\n options.attribution !== undefined ? options.attribution : true;\n if (attributionControl) {\n controls.push(new Attribution(options.attributionOptions));\n }\n\n return controls;\n}\n","/**\n * @module ol/interaction/Property\n */\n\n/**\n * @enum {string}\n */\nexport default {\n ACTIVE: 'active',\n};\n","/**\n * @module ol/interaction/Interaction\n */\nimport BaseObject from '../Object.js';\nimport InteractionProperty from './Property.js';\nimport {easeOut, linear} from '../easing.js';\n\n/**\n * Object literal with config options for interactions.\n * @typedef {Object} InteractionOptions\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} handleEvent\n * Method called by the map to notify the interaction that a browser event was\n * dispatched to the map. If the function returns a falsy value, propagation of\n * the event to other interactions in the map's interactions chain will be\n * prevented (this includes functions with no explicit return). The interactions\n * are traversed in reverse order of the interactions collection of the map.\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * User actions that change the state of the map. Some are similar to controls,\n * but are not associated with a DOM element.\n * For example, {@link module:ol/interaction/KeyboardZoom~KeyboardZoom} is\n * functionally the same as {@link module:ol/control/Zoom~Zoom}, but triggered\n * by a keyboard event not a button element event.\n * Although interactions do not have a DOM element, some of them do render\n * vectors and so are visible on the screen.\n * @api\n */\nclass Interaction extends BaseObject {\n /**\n * @param {InteractionOptions=} opt_options Options.\n */\n constructor(opt_options) {\n super();\n\n if (opt_options && opt_options.handleEvent) {\n this.handleEvent = opt_options.handleEvent;\n }\n\n /**\n * @private\n * @type {import(\"../PluggableMap.js\").default}\n */\n this.map_ = null;\n\n this.setActive(true);\n }\n\n /**\n * Return whether the interaction is currently active.\n * @return {boolean} `true` if the interaction is active, `false` otherwise.\n * @observable\n * @api\n */\n getActive() {\n return /** @type {boolean} */ (this.get(InteractionProperty.ACTIVE));\n }\n\n /**\n * Get the map associated with this interaction.\n * @return {import(\"../PluggableMap.js\").default} Map.\n * @api\n */\n getMap() {\n return this.map_;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent map browser event}.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @api\n */\n handleEvent(mapBrowserEvent) {\n return true;\n }\n\n /**\n * Activate or deactivate the interaction.\n * @param {boolean} active Active.\n * @observable\n * @api\n */\n setActive(active) {\n this.set(InteractionProperty.ACTIVE, active);\n }\n\n /**\n * Remove the interaction from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n */\n setMap(map) {\n this.map_ = map;\n }\n}\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {import(\"../coordinate.js\").Coordinate} delta Delta.\n * @param {number=} opt_duration Duration.\n */\nexport function pan(view, delta, opt_duration) {\n const currentCenter = view.getCenterInternal();\n if (currentCenter) {\n const center = [currentCenter[0] + delta[0], currentCenter[1] + delta[1]];\n view.animateInternal({\n duration: opt_duration !== undefined ? opt_duration : 250,\n easing: linear,\n center: view.getConstrainedCenter(center),\n });\n }\n}\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number} delta Delta from previous zoom level.\n * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor Anchor coordinate in the user projection.\n * @param {number=} opt_duration Duration.\n */\nexport function zoomByDelta(view, delta, opt_anchor, opt_duration) {\n const currentZoom = view.getZoom();\n\n if (currentZoom === undefined) {\n return;\n }\n\n const newZoom = view.getConstrainedZoom(currentZoom + delta);\n const newResolution = view.getResolutionForZoom(newZoom);\n\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n view.animate({\n resolution: newResolution,\n anchor: opt_anchor,\n duration: opt_duration !== undefined ? opt_duration : 250,\n easing: easeOut,\n });\n}\n\nexport default Interaction;\n","/**\n * @module ol/interaction/DoubleClickZoom\n */\nimport Interaction, {zoomByDelta} from './Interaction.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {number} [delta=1] The zoom delta applied on each double click.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom by double-clicking on the map.\n * @api\n */\nclass DoubleClickZoom extends Interaction {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n super();\n\n const options = opt_options ? opt_options : {};\n\n /**\n * @private\n * @type {number}\n */\n this.delta_ = options.delta ? options.delta : 1;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent map browser event} (if it was a\n * doubleclick) and eventually zooms the map.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n */\n handleEvent(mapBrowserEvent) {\n let stopEvent = false;\n if (mapBrowserEvent.type == MapBrowserEventType.DBLCLICK) {\n const browserEvent = /** @type {MouseEvent} */ (mapBrowserEvent.originalEvent);\n const map = mapBrowserEvent.map;\n const anchor = mapBrowserEvent.coordinate;\n const delta = browserEvent.shiftKey ? -this.delta_ : this.delta_;\n const view = map.getView();\n zoomByDelta(view, delta, anchor, this.duration_);\n browserEvent.preventDefault();\n stopEvent = true;\n }\n return !stopEvent;\n }\n}\n\nexport default DoubleClickZoom;\n","/**\n * @module ol/interaction/Pointer\n */\nimport Interaction from './Interaction.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport {getValues} from '../obj.js';\n\n/**\n * @typedef {Object} Options\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleDownEvent]\n * Function handling \"down\" events. If the function returns `true` then a drag\n * sequence is started.\n * @property {function(import(\"../MapBrowserEvent.js\").default):void} [handleDragEvent]\n * Function handling \"drag\" events. This function is called on \"move\" events\n * during a drag sequence.\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleEvent]\n * Method called by the map to notify the interaction that a browser event was\n * dispatched to the map. The function may return `false` to prevent the\n * propagation of the event to other interactions in the map's interactions\n * chain.\n * @property {function(import(\"../MapBrowserEvent.js\").default):void} [handleMoveEvent]\n * Function handling \"move\" events. This function is called on \"move\" events.\n * This functions is also called during a drag sequence, so during a drag\n * sequence both the `handleDragEvent` function and this function are called.\n * If `handleDownEvent` is defined and it returns true this function will not\n * be called during a drag sequence.\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleUpEvent]\n * Function handling \"up\" events. If the function returns `false` then the\n * current drag sequence is stopped.\n * @property {function(boolean):boolean} [stopDown]\n * Should the down event be propagated to other interactions, or should be\n * stopped?\n */\n\n/**\n * @classdesc\n * Base class that calls user-defined functions on `down`, `move` and `up`\n * events. This class also manages \"drag sequences\".\n *\n * When the `handleDownEvent` user function returns `true` a drag sequence is\n * started. During a drag sequence the `handleDragEvent` user function is\n * called on `move` events. The drag sequence ends when the `handleUpEvent`\n * user function is called and returns `false`.\n * @api\n */\nclass PointerInteraction extends Interaction {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n super(\n /** @type {import(\"./Interaction.js\").InteractionOptions} */ (options)\n );\n\n if (options.handleDownEvent) {\n this.handleDownEvent = options.handleDownEvent;\n }\n\n if (options.handleDragEvent) {\n this.handleDragEvent = options.handleDragEvent;\n }\n\n if (options.handleMoveEvent) {\n this.handleMoveEvent = options.handleMoveEvent;\n }\n\n if (options.handleUpEvent) {\n this.handleUpEvent = options.handleUpEvent;\n }\n\n if (options.stopDown) {\n this.stopDown = options.stopDown;\n }\n\n /**\n * @type {boolean}\n * @protected\n */\n this.handlingDownUpSequence = false;\n\n /**\n * @type {!Object<string, PointerEvent>}\n * @private\n */\n this.trackedPointers_ = {};\n\n /**\n * @type {Array<PointerEvent>}\n * @protected\n */\n this.targetPointers = [];\n }\n\n /**\n * Returns the current number of pointers involved in the interaction,\n * e.g. `2` when two fingers are used.\n * @return {number} The number of pointers.\n * @api\n */\n getPointerCount() {\n return this.targetPointers.length;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @protected\n */\n handleDownEvent(mapBrowserEvent) {\n return false;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @protected\n */\n handleDragEvent(mapBrowserEvent) {}\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent map browser event} and may call into\n * other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are\n * detected.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @api\n */\n handleEvent(mapBrowserEvent) {\n if (!mapBrowserEvent.originalEvent) {\n return true;\n }\n\n let stopEvent = false;\n this.updateTrackedPointers_(mapBrowserEvent);\n if (this.handlingDownUpSequence) {\n if (mapBrowserEvent.type == MapBrowserEventType.POINTERDRAG) {\n this.handleDragEvent(mapBrowserEvent);\n // prevent page scrolling during dragging\n mapBrowserEvent.originalEvent.preventDefault();\n } else if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {\n const handledUp = this.handleUpEvent(mapBrowserEvent);\n this.handlingDownUpSequence =\n handledUp && this.targetPointers.length > 0;\n }\n } else {\n if (mapBrowserEvent.type == MapBrowserEventType.POINTERDOWN) {\n const handled = this.handleDownEvent(mapBrowserEvent);\n this.handlingDownUpSequence = handled;\n stopEvent = this.stopDown(handled);\n } else if (mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE) {\n this.handleMoveEvent(mapBrowserEvent);\n }\n }\n return !stopEvent;\n }\n\n /**\n * Handle pointer move events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @protected\n */\n handleMoveEvent(mapBrowserEvent) {}\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @protected\n */\n handleUpEvent(mapBrowserEvent) {\n return false;\n }\n\n /**\n * This function is used to determine if \"down\" events should be propagated\n * to other interactions or should be stopped.\n * @param {boolean} handled Was the event handled by the interaction?\n * @return {boolean} Should the `down` event be stopped?\n */\n stopDown(handled) {\n return handled;\n }\n\n /**\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @private\n */\n updateTrackedPointers_(mapBrowserEvent) {\n if (isPointerDraggingEvent(mapBrowserEvent)) {\n const event = mapBrowserEvent.originalEvent;\n\n const id = event.pointerId.toString();\n if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {\n delete this.trackedPointers_[id];\n } else if (mapBrowserEvent.type == MapBrowserEventType.POINTERDOWN) {\n this.trackedPointers_[id] = event;\n } else if (id in this.trackedPointers_) {\n // update only when there was a pointerdown event for this pointer\n this.trackedPointers_[id] = event;\n }\n this.targetPointers = getValues(this.trackedPointers_);\n }\n }\n}\n\n/**\n * @param {Array<PointerEvent>} pointerEvents List of events.\n * @return {import(\"../pixel.js\").Pixel} Centroid pixel.\n */\nexport function centroid(pointerEvents) {\n const length = pointerEvents.length;\n let clientX = 0;\n let clientY = 0;\n for (let i = 0; i < length; i++) {\n clientX += pointerEvents[i].clientX;\n clientY += pointerEvents[i].clientY;\n }\n return [clientX / length, clientY / length];\n}\n\n/**\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} Whether the event is a pointerdown, pointerdrag\n * or pointerup event.\n */\nfunction isPointerDraggingEvent(mapBrowserEvent) {\n const type = mapBrowserEvent.type;\n return (\n type === MapBrowserEventType.POINTERDOWN ||\n type === MapBrowserEventType.POINTERDRAG ||\n type === MapBrowserEventType.POINTERUP\n );\n}\n\nexport default PointerInteraction;\n","/**\n * @module ol/events/condition\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport {FALSE, TRUE} from '../functions.js';\nimport {MAC, WEBKIT} from '../has.js';\nimport {assert} from '../asserts.js';\n\n/**\n * A function that takes an {@link module:ol/MapBrowserEvent} and returns a\n * `{boolean}`. If the condition is met, true should be returned.\n *\n * @typedef {function(this: ?, import(\"../MapBrowserEvent.js\").default): boolean} Condition\n */\n\n/**\n * Creates a condition function that passes when all provided conditions pass.\n * @param {...Condition} var_args Conditions to check.\n * @return {Condition} Condition function.\n */\nexport function all(var_args) {\n const conditions = arguments;\n /**\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @return {boolean} All conditions passed.\n */\n return function (event) {\n let pass = true;\n for (let i = 0, ii = conditions.length; i < ii; ++i) {\n pass = pass && conditions[i](event);\n if (!pass) {\n break;\n }\n }\n return pass;\n };\n}\n\n/**\n * Return `true` if only the alt-key is pressed, `false` otherwise (e.g. when\n * additionally the shift-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the alt key is pressed.\n * @api\n */\nexport const altKeyOnly = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n return (\n originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n !originalEvent.shiftKey\n );\n};\n\n/**\n * Return `true` if only the alt-key and shift-key is pressed, `false` otherwise\n * (e.g. when additionally the platform-modifier-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the alt and shift keys are pressed.\n * @api\n */\nexport const altShiftKeysOnly = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n return (\n originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n originalEvent.shiftKey\n );\n};\n\n/**\n * Return `true` if the map has the focus. This condition requires a map target\n * element with a `tabindex` attribute, e.g. `<div id=\"map\" tabindex=\"1\">`.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} The map has the focus.\n * @api\n */\nexport const focus = function (event) {\n return event.target.getTargetElement().contains(document.activeElement);\n};\n\n/**\n * Return `true` if the map has the focus or no 'tabindex' attribute set.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} The map container has the focus or no 'tabindex' attribute.\n */\nexport const focusWithTabindex = function (event) {\n return event.map.getTargetElement().hasAttribute('tabindex')\n ? focus(event)\n : true;\n};\n\n/**\n * Return always true.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True.\n * @api\n */\nexport const always = TRUE;\n\n/**\n * Return `true` if the event is a `click` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `click` event.\n * @api\n */\nexport const click = function (mapBrowserEvent) {\n return mapBrowserEvent.type == MapBrowserEventType.CLICK;\n};\n\n/**\n * Return `true` if the event has an \"action\"-producing mouse button.\n *\n * By definition, this includes left-click on windows/linux, and left-click\n * without the ctrl key on Macs.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} The result.\n */\nexport const mouseActionButton = function (mapBrowserEvent) {\n const originalEvent = /** @type {MouseEvent} */ (mapBrowserEvent.originalEvent);\n return originalEvent.button == 0 && !(WEBKIT && MAC && originalEvent.ctrlKey);\n};\n\n/**\n * Return always false.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} False.\n * @api\n */\nexport const never = FALSE;\n\n/**\n * Return `true` if the browser event is a `pointermove` event, `false`\n * otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the browser event is a `pointermove` event.\n * @api\n */\nexport const pointerMove = function (mapBrowserEvent) {\n return mapBrowserEvent.type == 'pointermove';\n};\n\n/**\n * Return `true` if the event is a map `singleclick` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `singleclick` event.\n * @api\n */\nexport const singleClick = function (mapBrowserEvent) {\n return mapBrowserEvent.type == MapBrowserEventType.SINGLECLICK;\n};\n\n/**\n * Return `true` if the event is a map `dblclick` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `dblclick` event.\n * @api\n */\nexport const doubleClick = function (mapBrowserEvent) {\n return mapBrowserEvent.type == MapBrowserEventType.DBLCLICK;\n};\n\n/**\n * Return `true` if no modifier key (alt-, shift- or platform-modifier-key) is\n * pressed.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True only if there no modifier keys are pressed.\n * @api\n */\nexport const noModifierKeys = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n return (\n !originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n !originalEvent.shiftKey\n );\n};\n\n/**\n * Return `true` if only the platform-modifier-key (the meta-key on Mac,\n * ctrl-key otherwise) is pressed, `false` otherwise (e.g. when additionally\n * the shift-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the platform modifier key is pressed.\n * @api\n */\nexport const platformModifierKeyOnly = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n return (\n !originalEvent.altKey &&\n (MAC ? originalEvent.metaKey : originalEvent.ctrlKey) &&\n !originalEvent.shiftKey\n );\n};\n\n/**\n * Return `true` if only the shift-key is pressed, `false` otherwise (e.g. when\n * additionally the alt-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the shift key is pressed.\n * @api\n */\nexport const shiftKeyOnly = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n return (\n !originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n originalEvent.shiftKey\n );\n};\n\n/**\n * Return `true` if the target element is not editable, i.e. not a `<input>`-,\n * `<select>`- or `<textarea>`-element, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True only if the target element is not editable.\n * @api\n */\nexport const targetNotEditable = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n const tagName = /** @type {Element} */ (originalEvent.target).tagName;\n return tagName !== 'INPUT' && tagName !== 'SELECT' && tagName !== 'TEXTAREA';\n};\n\n/**\n * Return `true` if the event originates from a mouse device.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a mouse device.\n * @api\n */\nexport const mouseOnly = function (mapBrowserEvent) {\n const pointerEvent = /** @type {import(\"../MapBrowserEvent\").default} */ (mapBrowserEvent)\n .originalEvent;\n assert(pointerEvent !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n // see http://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n return pointerEvent.pointerType == 'mouse';\n};\n\n/**\n * Return `true` if the event originates from a touchable device.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a touchable device.\n * @api\n */\nexport const touchOnly = function (mapBrowserEvent) {\n const pointerEvt = /** @type {import(\"../MapBrowserEvent\").default} */ (mapBrowserEvent)\n .originalEvent;\n assert(pointerEvt !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n // see http://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n return pointerEvt.pointerType === 'touch';\n};\n\n/**\n * Return `true` if the event originates from a digital pen.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a digital pen.\n * @api\n */\nexport const penOnly = function (mapBrowserEvent) {\n const pointerEvt = /** @type {import(\"../MapBrowserEvent\").default} */ (mapBrowserEvent)\n .originalEvent;\n assert(pointerEvt !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n // see http://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n return pointerEvt.pointerType === 'pen';\n};\n\n/**\n * Return `true` if the event originates from a primary pointer in\n * contact with the surface or if the left mouse button is pressed.\n * See http://www.w3.org/TR/pointerevents/#button-states.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a primary pointer.\n * @api\n */\nexport const primaryAction = function (mapBrowserEvent) {\n const pointerEvent = /** @type {import(\"../MapBrowserEvent\").default} */ (mapBrowserEvent)\n .originalEvent;\n assert(pointerEvent !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n return pointerEvent.isPrimary && pointerEvent.button === 0;\n};\n","/**\n * @module ol/interaction/DragPan\n */\nimport PointerInteraction, {\n centroid as centroidFromPointers,\n} from './Pointer.js';\nimport {FALSE} from '../functions.js';\nimport {\n all,\n focusWithTabindex,\n noModifierKeys,\n primaryAction,\n} from '../events/condition.js';\nimport {easeOut} from '../easing.js';\nimport {\n rotate as rotateCoordinate,\n scale as scaleCoordinate,\n} from '../coordinate.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition~noModifierKeys} and {@link module:ol/events/condition~primaryAction}.\n * @property {boolean} [onFocusOnly=false] When the map's target has a `tabindex` attribute set,\n * the interaction will only handle events when the map has the focus.\n * @property {import(\"../Kinetic.js\").default} [kinetic] Kinetic inertia to apply to the pan.\n */\n\n/**\n * @classdesc\n * Allows the user to pan the map by dragging the map.\n * @api\n */\nclass DragPan extends PointerInteraction {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n super({\n stopDown: FALSE,\n });\n\n const options = opt_options ? opt_options : {};\n\n /**\n * @private\n * @type {import(\"../Kinetic.js\").default|undefined}\n */\n this.kinetic_ = options.kinetic;\n\n /**\n * @type {import(\"../pixel.js\").Pixel}\n */\n this.lastCentroid = null;\n\n /**\n * @type {number}\n */\n this.lastPointersCount_;\n\n /**\n * @type {boolean}\n */\n this.panning_ = false;\n\n const condition = options.condition\n ? options.condition\n : all(noModifierKeys, primaryAction);\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.onFocusOnly\n ? all(focusWithTabindex, condition)\n : condition;\n\n /**\n * @private\n * @type {boolean}\n */\n this.noKinetic_ = false;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n if (!this.panning_) {\n this.panning_ = true;\n this.getMap().getView().beginInteraction();\n }\n const targetPointers = this.targetPointers;\n const centroid = centroidFromPointers(targetPointers);\n if (targetPointers.length == this.lastPointersCount_) {\n if (this.kinetic_) {\n this.kinetic_.update(centroid[0], centroid[1]);\n }\n if (this.lastCentroid) {\n const delta = [\n this.lastCentroid[0] - centroid[0],\n centroid[1] - this.lastCentroid[1],\n ];\n const map = mapBrowserEvent.map;\n const view = map.getView();\n scaleCoordinate(delta, view.getResolution());\n rotateCoordinate(delta, view.getRotation());\n view.adjustCenterInternal(delta);\n }\n } else if (this.kinetic_) {\n // reset so we don't overestimate the kinetic energy after\n // after one finger down, tiny drag, second finger down\n this.kinetic_.begin();\n }\n this.lastCentroid = centroid;\n this.lastPointersCount_ = targetPointers.length;\n mapBrowserEvent.originalEvent.preventDefault();\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(mapBrowserEvent) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n if (this.targetPointers.length === 0) {\n if (!this.noKinetic_ && this.kinetic_ && this.kinetic_.end()) {\n const distance = this.kinetic_.getDistance();\n const angle = this.kinetic_.getAngle();\n const center = view.getCenterInternal();\n const centerpx = map.getPixelFromCoordinateInternal(center);\n const dest = map.getCoordinateFromPixelInternal([\n centerpx[0] - distance * Math.cos(angle),\n centerpx[1] - distance * Math.sin(angle),\n ]);\n view.animateInternal({\n center: view.getConstrainedCenter(dest),\n duration: 500,\n easing: easeOut,\n });\n }\n if (this.panning_) {\n this.panning_ = false;\n view.endInteraction();\n }\n return false;\n } else {\n if (this.kinetic_) {\n // reset so we don't overestimate the kinetic energy after\n // after one finger up, tiny drag, second finger up\n this.kinetic_.begin();\n }\n this.lastCentroid = null;\n return true;\n }\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleDownEvent(mapBrowserEvent) {\n if (this.targetPointers.length > 0 && this.condition_(mapBrowserEvent)) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n this.lastCentroid = null;\n // stop any current animation\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n if (this.kinetic_) {\n this.kinetic_.begin();\n }\n // No kinetic as soon as more than one pointer on the screen is\n // detected. This is to prevent nasty pans after pinch.\n this.noKinetic_ = this.targetPointers.length > 1;\n return true;\n } else {\n return false;\n }\n }\n}\n\nexport default DragPan;\n","/**\n * @module ol/interaction/DragRotate\n */\nimport PointerInteraction from './Pointer.js';\nimport {FALSE} from '../functions.js';\nimport {\n altShiftKeysOnly,\n mouseActionButton,\n mouseOnly,\n} from '../events/condition.js';\nimport {disable} from '../rotationconstraint.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes an\n * {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition~altShiftKeysOnly}.\n * @property {number} [duration=250] Animation duration in milliseconds.\n */\n\n/**\n * @classdesc\n * Allows the user to rotate the map by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n * it to when the alt and shift keys are held down.\n *\n * This interaction is only supported for mouse devices.\n * @api\n */\nclass DragRotate extends PointerInteraction {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n super({\n stopDown: FALSE,\n });\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : altShiftKeysOnly;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lastAngle_ = undefined;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return;\n }\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n if (view.getConstraints().rotation === disable) {\n return;\n }\n const size = map.getSize();\n const offset = mapBrowserEvent.pixel;\n const theta = Math.atan2(size[1] / 2 - offset[1], offset[0] - size[0] / 2);\n if (this.lastAngle_ !== undefined) {\n const delta = theta - this.lastAngle_;\n view.adjustRotationInternal(-delta);\n }\n this.lastAngle_ = theta;\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return true;\n }\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n view.endInteraction(this.duration_);\n return false;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleDownEvent(mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return false;\n }\n\n if (\n mouseActionButton(mapBrowserEvent) &&\n this.condition_(mapBrowserEvent)\n ) {\n const map = mapBrowserEvent.map;\n map.getView().beginInteraction();\n this.lastAngle_ = undefined;\n return true;\n } else {\n return false;\n }\n }\n}\n\nexport default DragRotate;\n","/**\n * @module ol/render/Box\n */\n\nimport Disposable from '../Disposable.js';\nimport Polygon from '../geom/Polygon.js';\n\nclass RenderBox extends Disposable {\n /**\n * @param {string} className CSS class name.\n */\n constructor(className) {\n super();\n\n /**\n * @type {import(\"../geom/Polygon.js\").default}\n * @private\n */\n this.geometry_ = null;\n\n /**\n * @type {HTMLDivElement}\n * @private\n */\n this.element_ = document.createElement('div');\n this.element_.style.position = 'absolute';\n this.element_.style.pointerEvents = 'auto';\n this.element_.className = 'ol-box ' + className;\n\n /**\n * @private\n * @type {import(\"../PluggableMap.js\").default}\n */\n this.map_ = null;\n\n /**\n * @private\n * @type {import(\"../pixel.js\").Pixel}\n */\n this.startPixel_ = null;\n\n /**\n * @private\n * @type {import(\"../pixel.js\").Pixel}\n */\n this.endPixel_ = null;\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n this.setMap(null);\n }\n\n /**\n * @private\n */\n render_() {\n const startPixel = this.startPixel_;\n const endPixel = this.endPixel_;\n const px = 'px';\n const style = this.element_.style;\n style.left = Math.min(startPixel[0], endPixel[0]) + px;\n style.top = Math.min(startPixel[1], endPixel[1]) + px;\n style.width = Math.abs(endPixel[0] - startPixel[0]) + px;\n style.height = Math.abs(endPixel[1] - startPixel[1]) + px;\n }\n\n /**\n * @param {import(\"../PluggableMap.js\").default} map Map.\n */\n setMap(map) {\n if (this.map_) {\n this.map_.getOverlayContainer().removeChild(this.element_);\n const style = this.element_.style;\n style.left = 'inherit';\n style.top = 'inherit';\n style.width = 'inherit';\n style.height = 'inherit';\n }\n this.map_ = map;\n if (this.map_) {\n this.map_.getOverlayContainer().appendChild(this.element_);\n }\n }\n\n /**\n * @param {import(\"../pixel.js\").Pixel} startPixel Start pixel.\n * @param {import(\"../pixel.js\").Pixel} endPixel End pixel.\n */\n setPixels(startPixel, endPixel) {\n this.startPixel_ = startPixel;\n this.endPixel_ = endPixel;\n this.createOrUpdateGeometry();\n this.render_();\n }\n\n /**\n * Creates or updates the cached geometry.\n */\n createOrUpdateGeometry() {\n const startPixel = this.startPixel_;\n const endPixel = this.endPixel_;\n const pixels = [\n startPixel,\n [startPixel[0], endPixel[1]],\n endPixel,\n [endPixel[0], startPixel[1]],\n ];\n const coordinates = pixels.map(\n this.map_.getCoordinateFromPixelInternal,\n this.map_\n );\n // close the polygon\n coordinates[4] = coordinates[0].slice();\n if (!this.geometry_) {\n this.geometry_ = new Polygon([coordinates]);\n } else {\n this.geometry_.setCoordinates([coordinates]);\n }\n }\n\n /**\n * @return {import(\"../geom/Polygon.js\").default} Geometry.\n */\n getGeometry() {\n return this.geometry_;\n }\n}\n\nexport default RenderBox;\n","/**\n * @module ol/interaction/DragBox\n */\n// FIXME draw drag box\nimport Event from '../events/Event.js';\nimport PointerInteraction from './Pointer.js';\nimport RenderBox from '../render/Box.js';\nimport {mouseActionButton} from '../events/condition.js';\n\n/**\n * A function that takes a {@link module:ol/MapBrowserEvent} and two\n * {@link module:ol/pixel~Pixel}s and returns a `{boolean}`. If the condition is met,\n * true should be returned.\n * @typedef {function(this: ?, import(\"../MapBrowserEvent.js\").default, import(\"../pixel.js\").Pixel, import(\"../pixel.js\").Pixel):boolean} EndCondition\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-dragbox'] CSS class name for styling the box.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link ol/events/condition~mouseActionButton}.\n * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the default\n * `boxEndCondition` function.\n * @property {EndCondition} [boxEndCondition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two\n * {@link module:ol/pixel~Pixel}s to indicate whether a `boxend` event should be fired.\n * Default is `true` if the area of the box is bigger than the `minArea` option.\n * @property {function(this:DragBox, import(\"../MapBrowserEvent.js\").default):void} [onBoxEnd] Code to execute just\n * before `boxend` is fired.\n */\n\n/**\n * @enum {string}\n */\nconst DragBoxEventType = {\n /**\n * Triggered upon drag box start.\n * @event DragBoxEvent#boxstart\n * @api\n */\n BOXSTART: 'boxstart',\n\n /**\n * Triggered on drag when box is active.\n * @event DragBoxEvent#boxdrag\n * @api\n */\n BOXDRAG: 'boxdrag',\n\n /**\n * Triggered upon drag box end.\n * @event DragBoxEvent#boxend\n * @api\n */\n BOXEND: 'boxend',\n\n /**\n * Triggered upon drag box canceled.\n * @event DragBoxEvent#boxcancel\n * @api\n */\n BOXCANCEL: 'boxcancel',\n};\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/DragBox~DragBox} instances are instances of\n * this type.\n */\nexport class DragBoxEvent extends Event {\n /**\n * @param {string} type The event type.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate The event coordinate.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Originating event.\n */\n constructor(type, coordinate, mapBrowserEvent) {\n super(type);\n\n /**\n * The coordinate of the drag event.\n * @const\n * @type {import(\"../coordinate.js\").Coordinate}\n * @api\n */\n this.coordinate = coordinate;\n\n /**\n * @const\n * @type {import(\"../MapBrowserEvent.js\").default}\n * @api\n */\n this.mapBrowserEvent = mapBrowserEvent;\n }\n}\n\n/**\n * @classdesc\n * Allows the user to draw a vector box by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n * it to when the shift or other key is held down. This is used, for example,\n * for zooming to a specific area of the map\n * (see {@link module:ol/interaction/DragZoom~DragZoom} and\n * {@link module:ol/interaction/DragRotateAndZoom}).\n *\n * @fires DragBoxEvent\n * @api\n */\nclass DragBox extends PointerInteraction {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n super();\n\n const options = opt_options ? opt_options : {};\n\n /**\n * @type {import(\"../render/Box.js\").default}\n * @private\n */\n this.box_ = new RenderBox(options.className || 'ol-dragbox');\n\n /**\n * @type {number}\n * @private\n */\n this.minArea_ = options.minArea !== undefined ? options.minArea : 64;\n\n if (options.onBoxEnd) {\n this.onBoxEnd = options.onBoxEnd;\n }\n\n /**\n * @type {import(\"../pixel.js\").Pixel}\n * @private\n */\n this.startPixel_ = null;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : mouseActionButton;\n\n /**\n * @private\n * @type {EndCondition}\n */\n this.boxEndCondition_ = options.boxEndCondition\n ? options.boxEndCondition\n : this.defaultBoxEndCondition;\n }\n\n /**\n * The default condition for determining whether the boxend event\n * should fire.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent The originating MapBrowserEvent\n * leading to the box end.\n * @param {import(\"../pixel.js\").Pixel} startPixel The starting pixel of the box.\n * @param {import(\"../pixel.js\").Pixel} endPixel The end pixel of the box.\n * @return {boolean} Whether or not the boxend condition should be fired.\n */\n defaultBoxEndCondition(mapBrowserEvent, startPixel, endPixel) {\n const width = endPixel[0] - startPixel[0];\n const height = endPixel[1] - startPixel[1];\n return width * width + height * height >= this.minArea_;\n }\n\n /**\n * Returns geometry of last drawn box.\n * @return {import(\"../geom/Polygon.js\").default} Geometry.\n * @api\n */\n getGeometry() {\n return this.box_.getGeometry();\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel);\n\n this.dispatchEvent(\n new DragBoxEvent(\n DragBoxEventType.BOXDRAG,\n mapBrowserEvent.coordinate,\n mapBrowserEvent\n )\n );\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(mapBrowserEvent) {\n this.box_.setMap(null);\n\n const completeBox = this.boxEndCondition_(\n mapBrowserEvent,\n this.startPixel_,\n mapBrowserEvent.pixel\n );\n if (completeBox) {\n this.onBoxEnd(mapBrowserEvent);\n }\n this.dispatchEvent(\n new DragBoxEvent(\n completeBox ? DragBoxEventType.BOXEND : DragBoxEventType.BOXCANCEL,\n mapBrowserEvent.coordinate,\n mapBrowserEvent\n )\n );\n return false;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleDownEvent(mapBrowserEvent) {\n if (this.condition_(mapBrowserEvent)) {\n this.startPixel_ = mapBrowserEvent.pixel;\n this.box_.setMap(mapBrowserEvent.map);\n this.box_.setPixels(this.startPixel_, this.startPixel_);\n this.dispatchEvent(\n new DragBoxEvent(\n DragBoxEventType.BOXSTART,\n mapBrowserEvent.coordinate,\n mapBrowserEvent\n )\n );\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Function to execute just before `onboxend` is fired\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n */\n onBoxEnd(event) {}\n}\n\nexport default DragBox;\n","/**\n * @module ol/interaction/DragZoom\n */\nimport DragBox from './DragBox.js';\nimport {\n createOrUpdateFromCoordinates,\n getBottomLeft,\n getCenter,\n getTopRight,\n scaleFromCenter,\n} from '../extent.js';\nimport {easeOut} from '../easing.js';\nimport {shiftKeyOnly} from '../events/condition.js';\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-dragzoom'] CSS class name for styling the\n * box.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition~shiftKeyOnly}.\n * @property {number} [duration=200] Animation duration in milliseconds.\n * @property {boolean} [out=false] Use interaction for zooming out.\n * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the parent default\n * `boxEndCondition` function.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom the map by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n * it to when a key, shift by default, is held down.\n *\n * To change the style of the box, use CSS and the `.ol-dragzoom` selector, or\n * your custom one configured with `className`.\n * @api\n */\nclass DragZoom extends DragBox {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n const condition = options.condition ? options.condition : shiftKeyOnly;\n\n super({\n condition: condition,\n className: options.className || 'ol-dragzoom',\n minArea: options.minArea,\n });\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 200;\n\n /**\n * @private\n * @type {boolean}\n */\n this.out_ = options.out !== undefined ? options.out : false;\n }\n\n /**\n * Function to execute just before `onboxend` is fired\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n */\n onBoxEnd(event) {\n const map = this.getMap();\n const view = /** @type {!import(\"../View.js\").default} */ (map.getView());\n const size = /** @type {!import(\"../size.js\").Size} */ (map.getSize());\n let extent = this.getGeometry().getExtent();\n\n if (this.out_) {\n const mapExtent = view.calculateExtentInternal(size);\n const boxPixelExtent = createOrUpdateFromCoordinates([\n map.getPixelFromCoordinateInternal(getBottomLeft(extent)),\n map.getPixelFromCoordinateInternal(getTopRight(extent)),\n ]);\n const factor = view.getResolutionForExtentInternal(boxPixelExtent, size);\n\n scaleFromCenter(mapExtent, 1 / factor);\n extent = mapExtent;\n }\n\n const resolution = view.getConstrainedResolution(\n view.getResolutionForExtentInternal(extent, size)\n );\n const center = view.getConstrainedCenter(getCenter(extent), resolution);\n\n view.animateInternal({\n resolution: resolution,\n center: center,\n duration: this.duration_,\n easing: easeOut,\n });\n }\n}\n\nexport default DragZoom;\n","/**\n * @module ol/events/KeyCode\n */\n\n/**\n * @enum {number}\n * @const\n */\nexport default {\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n};\n","/**\n * @module ol/interaction/KeyboardPan\n */\nimport EventType from '../events/EventType.js';\nimport Interaction, {pan} from './Interaction.js';\nimport KeyCode from '../events/KeyCode.js';\nimport {noModifierKeys, targetNotEditable} from '../events/condition.js';\nimport {rotate as rotateCoordinate} from '../coordinate.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition~noModifierKeys} and\n * {@link module:ol/events/condition~targetNotEditable}.\n * @property {number} [duration=100] Animation duration in milliseconds.\n * @property {number} [pixelDelta=128] The amount of pixels to pan on each key\n * press.\n */\n\n/**\n * @classdesc\n * Allows the user to pan the map using keyboard arrows.\n * Note that, although this interaction is by default included in maps,\n * the keys can only be used when browser focus is on the element to which\n * the keyboard events are attached. By default, this is the map div,\n * though you can change this with the `keyboardEventTarget` in\n * {@link module:ol/Map~Map}. `document` never loses focus but, for any other\n * element, focus will have to be on, and returned to, this element if the keys\n * are to function.\n * See also {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}.\n * @api\n */\nclass KeyboardPan extends Interaction {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n super();\n\n const options = opt_options || {};\n\n /**\n * @private\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Browser event.\n * @return {boolean} Combined condition result.\n */\n this.defaultCondition_ = function (mapBrowserEvent) {\n return (\n noModifierKeys(mapBrowserEvent) && targetNotEditable(mapBrowserEvent)\n );\n };\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ =\n options.condition !== undefined\n ? options.condition\n : this.defaultCondition_;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 100;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelDelta_ =\n options.pixelDelta !== undefined ? options.pixelDelta : 128;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent map browser event} if it was a\n * `KeyEvent`, and decides the direction to pan to (if an arrow key was\n * pressed).\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @this {KeyboardPan}\n */\n handleEvent(mapBrowserEvent) {\n let stopEvent = false;\n if (mapBrowserEvent.type == EventType.KEYDOWN) {\n const keyEvent = /** @type {KeyboardEvent} */ (mapBrowserEvent.originalEvent);\n const keyCode = keyEvent.keyCode;\n if (\n this.condition_(mapBrowserEvent) &&\n (keyCode == KeyCode.DOWN ||\n keyCode == KeyCode.LEFT ||\n keyCode == KeyCode.RIGHT ||\n keyCode == KeyCode.UP)\n ) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n const mapUnitsDelta = view.getResolution() * this.pixelDelta_;\n let deltaX = 0,\n deltaY = 0;\n if (keyCode == KeyCode.DOWN) {\n deltaY = -mapUnitsDelta;\n } else if (keyCode == KeyCode.LEFT) {\n deltaX = -mapUnitsDelta;\n } else if (keyCode == KeyCode.RIGHT) {\n deltaX = mapUnitsDelta;\n } else {\n deltaY = mapUnitsDelta;\n }\n const delta = [deltaX, deltaY];\n rotateCoordinate(delta, view.getRotation());\n pan(view, delta, this.duration_);\n keyEvent.preventDefault();\n stopEvent = true;\n }\n }\n return !stopEvent;\n }\n}\n\nexport default KeyboardPan;\n","/**\n * @module ol/interaction/KeyboardZoom\n */\nimport EventType from '../events/EventType.js';\nimport Interaction, {zoomByDelta} from './Interaction.js';\nimport {targetNotEditable} from '../events/condition.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=100] Animation duration in milliseconds.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition~targetNotEditable}.\n * @property {number} [delta=1] The zoom level delta on each key press.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom the map using keyboard + and -.\n * Note that, although this interaction is by default included in maps,\n * the keys can only be used when browser focus is on the element to which\n * the keyboard events are attached. By default, this is the map div,\n * though you can change this with the `keyboardEventTarget` in\n * {@link module:ol/Map~Map}. `document` never loses focus but, for any other\n * element, focus will have to be on, and returned to, this element if the keys\n * are to function.\n * See also {@link module:ol/interaction/KeyboardPan~KeyboardPan}.\n * @api\n */\nclass KeyboardZoom extends Interaction {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n super();\n\n const options = opt_options ? opt_options : {};\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : targetNotEditable;\n\n /**\n * @private\n * @type {number}\n */\n this.delta_ = options.delta ? options.delta : 1;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 100;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent map browser event} if it was a\n * `KeyEvent`, and decides whether to zoom in or out (depending on whether the\n * key pressed was '+' or '-').\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @this {KeyboardZoom}\n */\n handleEvent(mapBrowserEvent) {\n let stopEvent = false;\n if (\n mapBrowserEvent.type == EventType.KEYDOWN ||\n mapBrowserEvent.type == EventType.KEYPRESS\n ) {\n const keyEvent = /** @type {KeyboardEvent} */ (mapBrowserEvent.originalEvent);\n const charCode = keyEvent.charCode;\n if (\n this.condition_(mapBrowserEvent) &&\n (charCode == '+'.charCodeAt(0) || charCode == '-'.charCodeAt(0))\n ) {\n const map = mapBrowserEvent.map;\n const delta =\n charCode == '+'.charCodeAt(0) ? this.delta_ : -this.delta_;\n const view = map.getView();\n zoomByDelta(view, delta, undefined, this.duration_);\n keyEvent.preventDefault();\n stopEvent = true;\n }\n }\n return !stopEvent;\n }\n}\n\nexport default KeyboardZoom;\n","/**\n * @module ol/interaction/MouseWheelZoom\n */\nimport EventType from '../events/EventType.js';\nimport Interaction, {zoomByDelta} from './Interaction.js';\nimport {DEVICE_PIXEL_RATIO, FIREFOX} from '../has.js';\nimport {all, always, focusWithTabindex} from '../events/condition.js';\nimport {clamp} from '../math.js';\n\n/**\n * @enum {string}\n */\nexport const Mode = {\n TRACKPAD: 'trackpad',\n WHEEL: 'wheel',\n};\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition~always}.\n * @property {boolean} [onFocusOnly=false] When the map's target has a `tabindex` attribute set,\n * the interaction will only handle events when the map has the focus.\n * @property {number} [maxDelta=1] Maximum mouse wheel delta.\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {number} [timeout=80] Mouse wheel timeout duration in milliseconds.\n * @property {boolean} [useAnchor=true] Enable zooming using the mouse's\n * location as the anchor. When set to `false`, zooming in and out will zoom to\n * the center of the screen instead of zooming on the mouse's location.\n * @property {boolean} [constrainResolution=false] If true, the mouse wheel zoom\n * event will always animate to the closest zoom level after an interaction;\n * false means intermediary zoom levels are allowed.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom the map by scrolling the mouse wheel.\n * @api\n */\nclass MouseWheelZoom extends Interaction {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n super(\n /** @type {import(\"./Interaction.js\").InteractionOptions} */ (options)\n );\n\n /**\n * @private\n * @type {number}\n */\n this.totalDelta_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.lastDelta_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = options.maxDelta !== undefined ? options.maxDelta : 1;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n /**\n * @private\n * @type {number}\n */\n this.timeout_ = options.timeout !== undefined ? options.timeout : 80;\n\n /**\n * @private\n * @type {boolean}\n */\n this.useAnchor_ =\n options.useAnchor !== undefined ? options.useAnchor : true;\n\n /**\n * @private\n * @type {boolean}\n */\n this.constrainResolution_ =\n options.constrainResolution !== undefined\n ? options.constrainResolution\n : false;\n\n const condition = options.condition ? options.condition : always;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.onFocusOnly\n ? all(focusWithTabindex, condition)\n : condition;\n\n /**\n * @private\n * @type {?import(\"../coordinate.js\").Coordinate}\n */\n this.lastAnchor_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.startTime_ = undefined;\n\n /**\n * @private\n * @type {?}\n */\n this.timeoutId_;\n\n /**\n * @private\n * @type {Mode|undefined}\n */\n this.mode_ = undefined;\n\n /**\n * Trackpad events separated by this delay will be considered separate\n * interactions.\n * @type {number}\n */\n this.trackpadEventGap_ = 400;\n\n /**\n * @type {?}\n */\n this.trackpadTimeoutId_;\n\n /**\n * The number of delta values per zoom level\n * @private\n * @type {number}\n */\n this.deltaPerZoom_ = 300;\n }\n\n /**\n * @private\n */\n endInteraction_() {\n this.trackpadTimeoutId_ = undefined;\n const view = this.getMap().getView();\n view.endInteraction(\n undefined,\n this.lastDelta_ ? (this.lastDelta_ > 0 ? 1 : -1) : 0,\n this.lastAnchor_\n );\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent map browser event} (if it was a mousewheel-event) and eventually\n * zooms the map.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n */\n handleEvent(mapBrowserEvent) {\n if (!this.condition_(mapBrowserEvent)) {\n return true;\n }\n const type = mapBrowserEvent.type;\n if (type !== EventType.WHEEL) {\n return true;\n }\n\n const map = mapBrowserEvent.map;\n const wheelEvent = /** @type {WheelEvent} */ (mapBrowserEvent.originalEvent);\n wheelEvent.preventDefault();\n\n if (this.useAnchor_) {\n this.lastAnchor_ = mapBrowserEvent.coordinate;\n }\n\n // Delta normalisation inspired by\n // https://github.com/mapbox/mapbox-gl-js/blob/001c7b9/js/ui/handler/scroll_zoom.js\n let delta;\n if (mapBrowserEvent.type == EventType.WHEEL) {\n delta = wheelEvent.deltaY;\n if (FIREFOX && wheelEvent.deltaMode === WheelEvent.DOM_DELTA_PIXEL) {\n delta /= DEVICE_PIXEL_RATIO;\n }\n if (wheelEvent.deltaMode === WheelEvent.DOM_DELTA_LINE) {\n delta *= 40;\n }\n }\n\n if (delta === 0) {\n return false;\n } else {\n this.lastDelta_ = delta;\n }\n\n const now = Date.now();\n\n if (this.startTime_ === undefined) {\n this.startTime_ = now;\n }\n\n if (!this.mode_ || now - this.startTime_ > this.trackpadEventGap_) {\n this.mode_ = Math.abs(delta) < 4 ? Mode.TRACKPAD : Mode.WHEEL;\n }\n\n const view = map.getView();\n if (\n this.mode_ === Mode.TRACKPAD &&\n !(view.getConstrainResolution() || this.constrainResolution_)\n ) {\n if (this.trackpadTimeoutId_) {\n clearTimeout(this.trackpadTimeoutId_);\n } else {\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n view.beginInteraction();\n }\n this.trackpadTimeoutId_ = setTimeout(\n this.endInteraction_.bind(this),\n this.timeout_\n );\n view.adjustZoom(-delta / this.deltaPerZoom_, this.lastAnchor_);\n this.startTime_ = now;\n return false;\n }\n\n this.totalDelta_ += delta;\n\n const timeLeft = Math.max(this.timeout_ - (now - this.startTime_), 0);\n\n clearTimeout(this.timeoutId_);\n this.timeoutId_ = setTimeout(\n this.handleWheelZoom_.bind(this, map),\n timeLeft\n );\n\n return false;\n }\n\n /**\n * @private\n * @param {import(\"../PluggableMap.js\").default} map Map.\n */\n handleWheelZoom_(map) {\n const view = map.getView();\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n let delta =\n -clamp(\n this.totalDelta_,\n -this.maxDelta_ * this.deltaPerZoom_,\n this.maxDelta_ * this.deltaPerZoom_\n ) / this.deltaPerZoom_;\n if (view.getConstrainResolution() || this.constrainResolution_) {\n // view has a zoom constraint, zoom by 1\n delta = delta ? (delta > 0 ? 1 : -1) : 0;\n }\n zoomByDelta(view, delta, this.lastAnchor_, this.duration_);\n\n this.mode_ = undefined;\n this.totalDelta_ = 0;\n this.lastAnchor_ = null;\n this.startTime_ = undefined;\n this.timeoutId_ = undefined;\n }\n\n /**\n * Enable or disable using the mouse's location as an anchor when zooming\n * @param {boolean} useAnchor true to zoom to the mouse's location, false\n * to zoom to the center of the map\n * @api\n */\n setMouseAnchor(useAnchor) {\n this.useAnchor_ = useAnchor;\n if (!useAnchor) {\n this.lastAnchor_ = null;\n }\n }\n}\n\nexport default MouseWheelZoom;\n","/**\n * @module ol/interaction/PinchRotate\n */\nimport PointerInteraction, {\n centroid as centroidFromPointers,\n} from './Pointer.js';\nimport {FALSE} from '../functions.js';\nimport {disable} from '../rotationconstraint.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] The duration of the animation in\n * milliseconds.\n * @property {number} [threshold=0.3] Minimal angle in radians to start a rotation.\n */\n\n/**\n * @classdesc\n * Allows the user to rotate the map by twisting with two fingers\n * on a touch screen.\n * @api\n */\nclass PinchRotate extends PointerInteraction {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n const pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n\n if (!pointerOptions.stopDown) {\n pointerOptions.stopDown = FALSE;\n }\n\n super(pointerOptions);\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n this.anchor_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lastAngle_ = undefined;\n\n /**\n * @private\n * @type {boolean}\n */\n this.rotating_ = false;\n\n /**\n * @private\n * @type {number}\n */\n this.rotationDelta_ = 0.0;\n\n /**\n * @private\n * @type {number}\n */\n this.threshold_ = options.threshold !== undefined ? options.threshold : 0.3;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n let rotationDelta = 0.0;\n\n const touch0 = this.targetPointers[0];\n const touch1 = this.targetPointers[1];\n\n // angle between touches\n const angle = Math.atan2(\n touch1.clientY - touch0.clientY,\n touch1.clientX - touch0.clientX\n );\n\n if (this.lastAngle_ !== undefined) {\n const delta = angle - this.lastAngle_;\n this.rotationDelta_ += delta;\n if (!this.rotating_ && Math.abs(this.rotationDelta_) > this.threshold_) {\n this.rotating_ = true;\n }\n rotationDelta = delta;\n }\n this.lastAngle_ = angle;\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n if (view.getConstraints().rotation === disable) {\n return;\n }\n\n // rotate anchor point.\n // FIXME: should be the intersection point between the lines:\n // touch0,touch1 and previousTouch0,previousTouch1\n const viewportPosition = map.getViewport().getBoundingClientRect();\n const centroid = centroidFromPointers(this.targetPointers);\n centroid[0] -= viewportPosition.left;\n centroid[1] -= viewportPosition.top;\n this.anchor_ = map.getCoordinateFromPixelInternal(centroid);\n\n // rotate\n if (this.rotating_) {\n map.render();\n view.adjustRotationInternal(rotationDelta, this.anchor_);\n }\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(mapBrowserEvent) {\n if (this.targetPointers.length < 2) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n view.endInteraction(this.duration_);\n return false;\n } else {\n return true;\n }\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleDownEvent(mapBrowserEvent) {\n if (this.targetPointers.length >= 2) {\n const map = mapBrowserEvent.map;\n this.anchor_ = null;\n this.lastAngle_ = undefined;\n this.rotating_ = false;\n this.rotationDelta_ = 0.0;\n if (!this.handlingDownUpSequence) {\n map.getView().beginInteraction();\n }\n return true;\n } else {\n return false;\n }\n }\n}\n\nexport default PinchRotate;\n","/**\n * @module ol/interaction/PinchZoom\n */\nimport PointerInteraction, {\n centroid as centroidFromPointers,\n} from './Pointer.js';\nimport {FALSE} from '../functions.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=400] Animation duration in milliseconds.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom the map by pinching with two fingers\n * on a touch screen.\n * @api\n */\nclass PinchZoom extends PointerInteraction {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n const pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n\n if (!pointerOptions.stopDown) {\n pointerOptions.stopDown = FALSE;\n }\n\n super(pointerOptions);\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n this.anchor_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 400;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lastDistance_ = undefined;\n\n /**\n * @private\n * @type {number}\n */\n this.lastScaleDelta_ = 1;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n let scaleDelta = 1.0;\n\n const touch0 = this.targetPointers[0];\n const touch1 = this.targetPointers[1];\n const dx = touch0.clientX - touch1.clientX;\n const dy = touch0.clientY - touch1.clientY;\n\n // distance between touches\n const distance = Math.sqrt(dx * dx + dy * dy);\n\n if (this.lastDistance_ !== undefined) {\n scaleDelta = this.lastDistance_ / distance;\n }\n this.lastDistance_ = distance;\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n\n if (scaleDelta != 1.0) {\n this.lastScaleDelta_ = scaleDelta;\n }\n\n // scale anchor point.\n const viewportPosition = map.getViewport().getBoundingClientRect();\n const centroid = centroidFromPointers(this.targetPointers);\n centroid[0] -= viewportPosition.left;\n centroid[1] -= viewportPosition.top;\n this.anchor_ = map.getCoordinateFromPixelInternal(centroid);\n\n // scale, bypass the resolution constraint\n map.render();\n view.adjustResolutionInternal(scaleDelta, this.anchor_);\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(mapBrowserEvent) {\n if (this.targetPointers.length < 2) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n const direction = this.lastScaleDelta_ > 1 ? 1 : -1;\n view.endInteraction(this.duration_, direction);\n return false;\n } else {\n return true;\n }\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleDownEvent(mapBrowserEvent) {\n if (this.targetPointers.length >= 2) {\n const map = mapBrowserEvent.map;\n this.anchor_ = null;\n this.lastDistance_ = undefined;\n this.lastScaleDelta_ = 1;\n if (!this.handlingDownUpSequence) {\n map.getView().beginInteraction();\n }\n return true;\n } else {\n return false;\n }\n }\n}\n\nexport default PinchZoom;\n","/**\n * @module ol/interaction/DragAndDrop\n */\n// FIXME should handle all geo-referenced data, not just vector data\n\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport FormatType from '../format/FormatType.js';\nimport Interaction from './Interaction.js';\nimport {TRUE} from '../functions.js';\nimport {get as getProjection} from '../proj.js';\nimport {listen, unlistenByKey} from '../events.js';\n\n/**\n * @typedef {Object} Options\n * @property {Array<typeof import(\"../format/Feature.js\").default|import(\"../format/Feature.js\").default>} [formatConstructors] Format constructors\n * (and/or formats pre-constructed with options).\n * @property {import(\"../source/Vector.js\").default} [source] Optional vector source where features will be added. If a source is provided\n * all existing features will be removed and new features will be added when\n * they are dropped on the target. If you want to add features to a vector\n * source without removing the existing features (append only), instead of\n * providing the source option listen for the \"addfeatures\" event.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Target projection. By default, the map's view's projection is used.\n * @property {HTMLElement} [target] The element that is used as the drop target, default is the viewport element.\n */\n\n/**\n * @enum {string}\n */\nconst DragAndDropEventType = {\n /**\n * Triggered when features are added\n * @event DragAndDropEvent#addfeatures\n * @api\n */\n ADD_FEATURES: 'addfeatures',\n};\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/DragAndDrop~DragAndDrop} instances are instances\n * of this type.\n */\nexport class DragAndDropEvent extends Event {\n /**\n * @param {DragAndDropEventType} type Type.\n * @param {File} file File.\n * @param {Array<import(\"../Feature.js\").default>=} opt_features Features.\n * @param {import(\"../proj/Projection.js\").default=} opt_projection Projection.\n */\n constructor(type, file, opt_features, opt_projection) {\n super(type);\n\n /**\n * The features parsed from dropped data.\n * @type {Array<import(\"../Feature.js\").FeatureLike>|undefined}\n * @api\n */\n this.features = opt_features;\n\n /**\n * The dropped file.\n * @type {File}\n * @api\n */\n this.file = file;\n\n /**\n * The feature projection.\n * @type {import(\"../proj/Projection.js\").default|undefined}\n * @api\n */\n this.projection = opt_projection;\n }\n}\n\n/**\n * @classdesc\n * Handles input of vector data by drag and drop.\n *\n * Note that the DragAndDrop interaction uses the TextDecoder() constructor if the supplied\n * combinnation of formats read both text string and ArrayBuffer sources. Older browsers such\n * as IE which do not support this will need a TextDecoder polyfill to be loaded before use.\n *\n * @api\n *\n * @fires DragAndDropEvent\n */\nclass DragAndDrop extends Interaction {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n super({\n handleEvent: TRUE,\n });\n\n /**\n * @private\n * @type {boolean}\n */\n this.readAsBuffer_ = false;\n\n /**\n * @private\n * @type {Array<import(\"../format/Feature.js\").default>}\n */\n this.formats_ = [];\n const formatConstructors = options.formatConstructors\n ? options.formatConstructors\n : [];\n for (let i = 0, ii = formatConstructors.length; i < ii; ++i) {\n let format = formatConstructors[i];\n if (typeof format === 'function') {\n format = new format();\n }\n this.formats_.push(format);\n this.readAsBuffer_ =\n this.readAsBuffer_ || format.getType() === FormatType.ARRAY_BUFFER;\n }\n\n /**\n * @private\n * @type {import(\"../proj/Projection.js\").default}\n */\n this.projection_ = options.projection\n ? getProjection(options.projection)\n : null;\n\n /**\n * @private\n * @type {?Array<import(\"../events.js\").EventsKey>}\n */\n this.dropListenKeys_ = null;\n\n /**\n * @private\n * @type {import(\"../source/Vector.js\").default}\n */\n this.source_ = options.source || null;\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.target = options.target ? options.target : null;\n }\n\n /**\n * @param {File} file File.\n * @param {Event} event Load event.\n * @private\n */\n handleResult_(file, event) {\n const result = event.target.result;\n const map = this.getMap();\n let projection = this.projection_;\n if (!projection) {\n const view = map.getView();\n projection = view.getProjection();\n }\n\n let text;\n const formats = this.formats_;\n for (let i = 0, ii = formats.length; i < ii; ++i) {\n const format = formats[i];\n let input = result;\n if (this.readAsBuffer_ && format.getType() !== FormatType.ARRAY_BUFFER) {\n if (text === undefined) {\n text = new TextDecoder().decode(result);\n }\n input = text;\n }\n const features = this.tryReadFeatures_(format, input, {\n featureProjection: projection,\n });\n if (features && features.length > 0) {\n if (this.source_) {\n this.source_.clear();\n this.source_.addFeatures(features);\n }\n this.dispatchEvent(\n new DragAndDropEvent(\n DragAndDropEventType.ADD_FEATURES,\n file,\n features,\n projection\n )\n );\n break;\n }\n }\n }\n\n /**\n * @private\n */\n registerListeners_() {\n const map = this.getMap();\n if (map) {\n const dropArea = this.target ? this.target : map.getViewport();\n this.dropListenKeys_ = [\n listen(dropArea, EventType.DROP, this.handleDrop, this),\n listen(dropArea, EventType.DRAGENTER, this.handleStop, this),\n listen(dropArea, EventType.DRAGOVER, this.handleStop, this),\n listen(dropArea, EventType.DROP, this.handleStop, this),\n ];\n }\n }\n\n /**\n * Activate or deactivate the interaction.\n * @param {boolean} active Active.\n * @observable\n * @api\n */\n setActive(active) {\n if (!this.getActive() && active) {\n this.registerListeners_();\n }\n if (this.getActive() && !active) {\n this.unregisterListeners_();\n }\n super.setActive(active);\n }\n\n /**\n * Remove the interaction from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n */\n setMap(map) {\n this.unregisterListeners_();\n super.setMap(map);\n if (this.getActive()) {\n this.registerListeners_();\n }\n }\n\n /**\n * @param {import(\"../format/Feature.js\").default} format Format.\n * @param {string} text Text.\n * @param {import(\"../format/Feature.js\").ReadOptions} options Read options.\n * @private\n * @return {Array<import(\"../Feature.js\").default>} Features.\n */\n tryReadFeatures_(format, text, options) {\n try {\n return (\n /** @type {Array<import(\"../Feature.js\").default>} */\n (format.readFeatures(text, options))\n );\n } catch (e) {\n return null;\n }\n }\n\n /**\n * @private\n */\n unregisterListeners_() {\n if (this.dropListenKeys_) {\n this.dropListenKeys_.forEach(unlistenByKey);\n this.dropListenKeys_ = null;\n }\n }\n\n /**\n * @param {DragEvent} event Event.\n */\n handleDrop(event) {\n const files = event.dataTransfer.files;\n for (let i = 0, ii = files.length; i < ii; ++i) {\n const file = files.item(i);\n const reader = new FileReader();\n reader.addEventListener(\n EventType.LOAD,\n this.handleResult_.bind(this, file)\n );\n if (this.readAsBuffer_) {\n reader.readAsArrayBuffer(file);\n } else {\n reader.readAsText(file);\n }\n }\n }\n\n /**\n * @param {DragEvent} event Event.\n */\n handleStop(event) {\n event.stopPropagation();\n event.preventDefault();\n event.dataTransfer.dropEffect = 'copy';\n }\n}\n\nexport default DragAndDrop;\n","/**\n * @module ol/interaction/DragRotateAndZoom\n */\nimport PointerInteraction from './Pointer.js';\nimport {mouseOnly, shiftKeyOnly} from '../events/condition.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition~shiftKeyOnly}.\n * @property {number} [duration=400] Animation duration in milliseconds.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom and rotate the map by clicking and dragging\n * on the map. By default, this interaction is limited to when the shift\n * key is held down.\n *\n * This interaction is only supported for mouse devices.\n *\n * And this interaction is not included in the default interactions.\n * @api\n */\nclass DragRotateAndZoom extends PointerInteraction {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n super(/** @type {import(\"./Pointer.js\").Options} */ (options));\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : shiftKeyOnly;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lastAngle_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lastMagnitude_ = undefined;\n\n /**\n * @private\n * @type {number}\n */\n this.lastScaleDelta_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 400;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return;\n }\n\n const map = mapBrowserEvent.map;\n const size = map.getSize();\n const offset = mapBrowserEvent.pixel;\n const deltaX = offset[0] - size[0] / 2;\n const deltaY = size[1] / 2 - offset[1];\n const theta = Math.atan2(deltaY, deltaX);\n const magnitude = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n const view = map.getView();\n if (this.lastAngle_ !== undefined) {\n const angleDelta = this.lastAngle_ - theta;\n view.adjustRotationInternal(angleDelta);\n }\n this.lastAngle_ = theta;\n if (this.lastMagnitude_ !== undefined) {\n view.adjustResolutionInternal(this.lastMagnitude_ / magnitude);\n }\n if (this.lastMagnitude_ !== undefined) {\n this.lastScaleDelta_ = this.lastMagnitude_ / magnitude;\n }\n this.lastMagnitude_ = magnitude;\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return true;\n }\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n const direction = this.lastScaleDelta_ > 1 ? 1 : -1;\n view.endInteraction(this.duration_, direction);\n this.lastScaleDelta_ = 0;\n return false;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleDownEvent(mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return false;\n }\n\n if (this.condition_(mapBrowserEvent)) {\n mapBrowserEvent.map.getView().beginInteraction();\n this.lastAngle_ = undefined;\n this.lastMagnitude_ = undefined;\n return true;\n } else {\n return false;\n }\n }\n}\n\nexport default DragRotateAndZoom;\n","/**\n * @module ol/geom/Circle\n */\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {createOrUpdate, forEachCorner, intersects} from '../extent.js';\nimport {deflateCoordinate} from './flat/deflate.js';\nimport {rotate, translate} from './flat/transform.js';\n\n/**\n * @classdesc\n * Circle geometry.\n *\n * @api\n */\nclass Circle extends SimpleGeometry {\n /**\n * @param {!import(\"../coordinate.js\").Coordinate} center Center.\n * For internal use, flat coordinates in combination with `opt_layout` and no\n * `opt_radius` are also accepted.\n * @param {number=} opt_radius Radius.\n * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n */\n constructor(center, opt_radius, opt_layout) {\n super();\n if (opt_layout !== undefined && opt_radius === undefined) {\n this.setFlatCoordinates(opt_layout, center);\n } else {\n const radius = opt_radius ? opt_radius : 0;\n this.setCenterAndRadius(center, radius, opt_layout);\n }\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!Circle} Clone.\n * @api\n */\n clone() {\n const circle = new Circle(\n this.flatCoordinates.slice(),\n undefined,\n this.layout\n );\n circle.applyProperties(this);\n return circle;\n }\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 closestPointXY(x, y, closestPoint, minSquaredDistance) {\n const flatCoordinates = this.flatCoordinates;\n const dx = x - flatCoordinates[0];\n const dy = y - flatCoordinates[1];\n const squaredDistance = dx * dx + dy * dy;\n if (squaredDistance < minSquaredDistance) {\n if (squaredDistance === 0) {\n for (let i = 0; i < this.stride; ++i) {\n closestPoint[i] = flatCoordinates[i];\n }\n } else {\n const delta = this.getRadius() / Math.sqrt(squaredDistance);\n closestPoint[0] = flatCoordinates[0] + delta * dx;\n closestPoint[1] = flatCoordinates[1] + delta * dy;\n for (let i = 2; i < this.stride; ++i) {\n closestPoint[i] = flatCoordinates[i];\n }\n }\n closestPoint.length = this.stride;\n return squaredDistance;\n } else {\n return minSquaredDistance;\n }\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\n containsXY(x, y) {\n const flatCoordinates = this.flatCoordinates;\n const dx = x - flatCoordinates[0];\n const dy = y - flatCoordinates[1];\n return dx * dx + dy * dy <= this.getRadiusSquared_();\n }\n\n /**\n * Return the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.\n * @return {import(\"../coordinate.js\").Coordinate} Center.\n * @api\n */\n getCenter() {\n return this.flatCoordinates.slice(0, this.stride);\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n */\n computeExtent(extent) {\n const flatCoordinates = this.flatCoordinates;\n const radius = flatCoordinates[this.stride] - flatCoordinates[0];\n return createOrUpdate(\n flatCoordinates[0] - radius,\n flatCoordinates[1] - radius,\n flatCoordinates[0] + radius,\n flatCoordinates[1] + radius,\n extent\n );\n }\n\n /**\n * Return the radius of the circle.\n * @return {number} Radius.\n * @api\n */\n getRadius() {\n return Math.sqrt(this.getRadiusSquared_());\n }\n\n /**\n * @private\n * @return {number} Radius squared.\n */\n getRadiusSquared_() {\n const dx = this.flatCoordinates[this.stride] - this.flatCoordinates[0];\n const dy = this.flatCoordinates[this.stride + 1] - this.flatCoordinates[1];\n return dx * dx + dy * dy;\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./GeometryType.js\").default} Geometry type.\n * @api\n */\n getType() {\n return GeometryType.CIRCLE;\n }\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 intersectsExtent(extent) {\n const circleExtent = this.getExtent();\n if (intersects(extent, circleExtent)) {\n const center = this.getCenter();\n\n if (extent[0] <= center[0] && extent[2] >= center[0]) {\n return true;\n }\n if (extent[1] <= center[1] && extent[3] >= center[1]) {\n return true;\n }\n\n return forEachCorner(extent, this.intersectsCoordinate.bind(this));\n }\n return false;\n }\n\n /**\n * Set the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.\n * @param {import(\"../coordinate.js\").Coordinate} center Center.\n * @api\n */\n setCenter(center) {\n const stride = this.stride;\n const radius = this.flatCoordinates[stride] - this.flatCoordinates[0];\n const flatCoordinates = center.slice();\n flatCoordinates[stride] = flatCoordinates[0] + radius;\n for (let i = 1; i < stride; ++i) {\n flatCoordinates[stride + i] = center[i];\n }\n this.setFlatCoordinates(this.layout, flatCoordinates);\n this.changed();\n }\n\n /**\n * Set the center (as {@link module:ol/coordinate~Coordinate coordinate}) and the radius (as\n * number) of the circle.\n * @param {!import(\"../coordinate.js\").Coordinate} center Center.\n * @param {number} radius Radius.\n * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n * @api\n */\n setCenterAndRadius(center, radius, opt_layout) {\n this.setLayout(opt_layout, center, 0);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n /** @type {Array<number>} */\n const flatCoordinates = this.flatCoordinates;\n let offset = deflateCoordinate(flatCoordinates, 0, center, this.stride);\n flatCoordinates[offset++] = flatCoordinates[0] + radius;\n for (let i = 1, ii = this.stride; i < ii; ++i) {\n flatCoordinates[offset++] = flatCoordinates[i];\n }\n flatCoordinates.length = offset;\n this.changed();\n }\n\n getCoordinates() {\n return null;\n }\n\n setCoordinates(coordinates, opt_layout) {}\n\n /**\n * Set the radius of the circle. The radius is in the units of the projection.\n * @param {number} radius Radius.\n * @api\n */\n setRadius(radius) {\n this.flatCoordinates[this.stride] = this.flatCoordinates[0] + radius;\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 rotate(angle, anchor) {\n const center = this.getCenter();\n const stride = this.getStride();\n this.setCenter(\n rotate(center, 0, center.length, stride, angle, anchor, center)\n );\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 translate(deltaX, deltaY) {\n const center = this.getCenter();\n const stride = this.getStride();\n this.setCenter(\n translate(center, 0, center.length, stride, deltaX, deltaY, center)\n );\n this.changed();\n }\n}\n\n/**\n * Transform each coordinate of the circle from one coordinate reference system\n * to another. The geometry is modified in place.\n * If you do not want the geometry modified in place, first clone() it and\n * then use this function on the clone.\n *\n * Internally a circle is currently represented by two points: the center of\n * the circle `[cx, cy]`, and the point to the right of the circle\n * `[cx + r, cy]`. This `transform` function just transforms these two points.\n * So the resulting geometry is also a circle, and that circle does not\n * correspond to the shape that would be obtained by transforming every point\n * of the original circle.\n *\n * @param {import(\"../proj.js\").ProjectionLike} source The current projection. Can be a\n * string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection. Can be a\n * string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @return {Circle} This geometry. Note that original geometry is\n * modified in place.\n * @function\n * @api\n */\nCircle.prototype.transform;\nexport default Circle;\n","/**\n * @module ol/geom/MultiLineString\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport LineString from './LineString.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {arrayMaxSquaredDelta, assignClosestArrayPoint} from './flat/closest.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport {deflateCoordinatesArray} from './flat/deflate.js';\nimport {douglasPeuckerArray} from './flat/simplify.js';\nimport {extend} from '../array.js';\nimport {inflateCoordinatesArray} from './flat/inflate.js';\nimport {\n interpolatePoint,\n lineStringsCoordinateAtM,\n} from './flat/interpolate.js';\nimport {intersectsLineStringArray} from './flat/intersectsextent.js';\n\n/**\n * @classdesc\n * Multi-linestring geometry.\n *\n * @api\n */\nclass MultiLineString extends SimpleGeometry {\n /**\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>|LineString>|Array<number>} coordinates\n * Coordinates or LineString geometries. (For internal use, flat coordinates in\n * combination with `opt_layout` and `opt_ends` are also accepted.)\n * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n * @param {Array<number>=} opt_ends Flat coordinate ends for internal use.\n */\n constructor(coordinates, opt_layout, opt_ends) {\n super();\n\n /**\n * @type {Array<number>}\n * @private\n */\n this.ends_ = [];\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n if (Array.isArray(coordinates[0])) {\n this.setCoordinates(\n /** @type {Array<Array<import(\"../coordinate.js\").Coordinate>>} */ (coordinates),\n opt_layout\n );\n } else if (opt_layout !== undefined && opt_ends) {\n this.setFlatCoordinates(\n opt_layout,\n /** @type {Array<number>} */ (coordinates)\n );\n this.ends_ = opt_ends;\n } else {\n let layout = this.getLayout();\n const lineStrings = /** @type {Array<LineString>} */ (coordinates);\n const flatCoordinates = [];\n const ends = [];\n for (let i = 0, ii = lineStrings.length; i < ii; ++i) {\n const 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 }\n\n /**\n * Append the passed linestring to the multilinestring.\n * @param {LineString} lineString LineString.\n * @api\n */\n appendLineString(lineString) {\n if (!this.flatCoordinates) {\n this.flatCoordinates = lineString.getFlatCoordinates().slice();\n } else {\n extend(this.flatCoordinates, lineString.getFlatCoordinates().slice());\n }\n this.ends_.push(this.flatCoordinates.length);\n this.changed();\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!MultiLineString} Clone.\n * @api\n */\n clone() {\n const multiLineString = new MultiLineString(\n this.flatCoordinates.slice(),\n this.layout,\n this.ends_.slice()\n );\n multiLineString.applyProperties(this);\n return multiLineString;\n }\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 closestPointXY(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(\n arrayMaxSquaredDelta(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n 0\n )\n );\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestArrayPoint(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n this.maxDelta_,\n false,\n x,\n y,\n closestPoint,\n minSquaredDistance\n );\n }\n\n /**\n * Returns the coordinate at `m` using linear interpolation, or `null` if no\n * such coordinate exists.\n *\n * `opt_extrapolate` controls extrapolation beyond the range of Ms in the\n * MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first\n * M will return the first coordinate and Ms greater than the last M will\n * return the last coordinate.\n *\n * `opt_interpolate` controls interpolation between consecutive LineStrings\n * within the MultiLineString. If `opt_interpolate` is `true` the coordinates\n * will be linearly interpolated between the last coordinate of one LineString\n * and the first coordinate of the next LineString. If `opt_interpolate` is\n * `false` then the function will return `null` for Ms falling between\n * LineStrings.\n *\n * @param {number} m M.\n * @param {boolean=} opt_extrapolate Extrapolate. Default is `false`.\n * @param {boolean=} opt_interpolate Interpolate. Default is `false`.\n * @return {import(\"../coordinate.js\").Coordinate} Coordinate.\n * @api\n */\n getCoordinateAtM(m, opt_extrapolate, opt_interpolate) {\n if (\n (this.layout != GeometryLayout.XYM &&\n this.layout != GeometryLayout.XYZM) ||\n this.flatCoordinates.length === 0\n ) {\n return null;\n }\n const extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;\n const interpolate = opt_interpolate !== undefined ? opt_interpolate : false;\n return lineStringsCoordinateAtM(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n m,\n extrapolate,\n interpolate\n );\n }\n\n /**\n * Return the coordinates of the multilinestring.\n * @return {Array<Array<import(\"../coordinate.js\").Coordinate>>} Coordinates.\n * @api\n */\n getCoordinates() {\n return inflateCoordinatesArray(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride\n );\n }\n\n /**\n * @return {Array<number>} Ends.\n */\n getEnds() {\n return this.ends_;\n }\n\n /**\n * Return the linestring at the specified index.\n * @param {number} index Index.\n * @return {LineString} LineString.\n * @api\n */\n getLineString(index) {\n if (index < 0 || this.ends_.length <= index) {\n return null;\n }\n return new LineString(\n this.flatCoordinates.slice(\n index === 0 ? 0 : this.ends_[index - 1],\n this.ends_[index]\n ),\n this.layout\n );\n }\n\n /**\n * Return the linestrings of this multilinestring.\n * @return {Array<LineString>} LineStrings.\n * @api\n */\n getLineStrings() {\n const flatCoordinates = this.flatCoordinates;\n const ends = this.ends_;\n const layout = this.layout;\n /** @type {Array<LineString>} */\n const lineStrings = [];\n let offset = 0;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const lineString = new LineString(\n flatCoordinates.slice(offset, end),\n layout\n );\n lineStrings.push(lineString);\n offset = end;\n }\n return lineStrings;\n }\n\n /**\n * @return {Array<number>} Flat midpoints.\n */\n getFlatMidpoints() {\n const midpoints = [];\n const flatCoordinates = this.flatCoordinates;\n let offset = 0;\n const ends = this.ends_;\n const stride = this.stride;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const midpoint = interpolatePoint(\n flatCoordinates,\n offset,\n end,\n stride,\n 0.5\n );\n extend(midpoints, midpoint);\n offset = end;\n }\n return midpoints;\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {MultiLineString} Simplified MultiLineString.\n * @protected\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n const simplifiedFlatCoordinates = [];\n const simplifiedEnds = [];\n simplifiedFlatCoordinates.length = douglasPeuckerArray(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0,\n simplifiedEnds\n );\n return new MultiLineString(\n simplifiedFlatCoordinates,\n GeometryLayout.XY,\n simplifiedEnds\n );\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./GeometryType.js\").default} Geometry type.\n * @api\n */\n getType() {\n return GeometryType.MULTI_LINE_STRING;\n }\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 intersectsExtent(extent) {\n return intersectsLineStringArray(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n extent\n );\n }\n\n /**\n * Set the coordinates of the multilinestring.\n * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>} coordinates Coordinates.\n * @param {GeometryLayout=} opt_layout Layout.\n * @api\n */\n setCoordinates(coordinates, opt_layout) {\n this.setLayout(opt_layout, coordinates, 2);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n const ends = deflateCoordinatesArray(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride,\n this.ends_\n );\n this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n this.changed();\n }\n}\n\nexport default MultiLineString;\n","/**\n * @module ol/geom/MultiPoint\n */\nimport GeometryType from './GeometryType.js';\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {closestSquaredDistanceXY, containsXY} from '../extent.js';\nimport {deflateCoordinates} from './flat/deflate.js';\nimport {extend} from '../array.js';\nimport {inflateCoordinates} from './flat/inflate.js';\nimport {squaredDistance as squaredDx} from '../math.js';\n\n/**\n * @classdesc\n * Multi-point geometry.\n *\n * @api\n */\nclass MultiPoint extends SimpleGeometry {\n /**\n * @param {Array<import(\"../coordinate.js\").Coordinate>|Array<number>} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `opt_layout` are also accepted.\n * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n */\n constructor(coordinates, opt_layout) {\n super();\n if (opt_layout && !Array.isArray(coordinates[0])) {\n this.setFlatCoordinates(\n opt_layout,\n /** @type {Array<number>} */ (coordinates)\n );\n } else {\n this.setCoordinates(\n /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates),\n opt_layout\n );\n }\n }\n\n /**\n * Append the passed point to this multipoint.\n * @param {Point} point Point.\n * @api\n */\n appendPoint(point) {\n if (!this.flatCoordinates) {\n this.flatCoordinates = point.getFlatCoordinates().slice();\n } else {\n extend(this.flatCoordinates, point.getFlatCoordinates());\n }\n this.changed();\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!MultiPoint} Clone.\n * @api\n */\n clone() {\n const multiPoint = new MultiPoint(\n this.flatCoordinates.slice(),\n this.layout\n );\n multiPoint.applyProperties(this);\n return multiPoint;\n }\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 closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n const flatCoordinates = this.flatCoordinates;\n const stride = this.stride;\n for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n const squaredDistance = squaredDx(\n x,\n y,\n flatCoordinates[i],\n flatCoordinates[i + 1]\n );\n if (squaredDistance < minSquaredDistance) {\n minSquaredDistance = squaredDistance;\n for (let j = 0; j < stride; ++j) {\n closestPoint[j] = flatCoordinates[i + j];\n }\n closestPoint.length = stride;\n }\n }\n return minSquaredDistance;\n }\n\n /**\n * Return the coordinates of the multipoint.\n * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n * @api\n */\n getCoordinates() {\n return inflateCoordinates(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride\n );\n }\n\n /**\n * Return the point at the specified index.\n * @param {number} index Index.\n * @return {Point} Point.\n * @api\n */\n getPoint(index) {\n const 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(\n this.flatCoordinates.slice(\n index * this.stride,\n (index + 1) * this.stride\n ),\n this.layout\n );\n }\n\n /**\n * Return the points of this multipoint.\n * @return {Array<Point>} Points.\n * @api\n */\n getPoints() {\n const flatCoordinates = this.flatCoordinates;\n const layout = this.layout;\n const stride = this.stride;\n /** @type {Array<Point>} */\n const points = [];\n for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n const point = new Point(flatCoordinates.slice(i, i + stride), layout);\n points.push(point);\n }\n return points;\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./GeometryType.js\").default} Geometry type.\n * @api\n */\n getType() {\n return GeometryType.MULTI_POINT;\n }\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 intersectsExtent(extent) {\n const flatCoordinates = this.flatCoordinates;\n const stride = this.stride;\n for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n const x = flatCoordinates[i];\n const y = flatCoordinates[i + 1];\n if (containsXY(extent, x, y)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Set the coordinates of the multipoint.\n * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n * @api\n */\n setCoordinates(coordinates, opt_layout) {\n this.setLayout(opt_layout, coordinates, 1);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = deflateCoordinates(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride\n );\n this.changed();\n }\n}\n\nexport default MultiPoint;\n","/**\n * @module ol/geom/flat/center\n */\nimport {createEmpty, createOrUpdateFromFlatCoordinates} from '../../extent.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @return {Array<number>} Flat centers.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n const flatCenters = [];\n let extent = createEmpty();\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n extent = createOrUpdateFromFlatCoordinates(\n flatCoordinates,\n offset,\n ends[0],\n stride\n );\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","/**\n * @module ol/geom/MultiPolygon\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport MultiPoint from './MultiPoint.js';\nimport Polygon from './Polygon.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {\n assignClosestMultiArrayPoint,\n multiArrayMaxSquaredDelta,\n} 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 {\n linearRingssAreOriented,\n orientLinearRingsArray,\n} 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/**\n * @classdesc\n * Multi-polygon geometry.\n *\n * @api\n */\nclass MultiPolygon extends SimpleGeometry {\n /**\n * @param {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>|Polygon>|Array<number>} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `opt_layout` and `opt_endss` are also accepted.\n * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n * @param {Array<Array<number>>=} opt_endss Array of ends for internal use with flat coordinates.\n */\n constructor(coordinates, opt_layout, opt_endss) {\n super();\n\n /**\n * @type {Array<Array<number>>}\n * @private\n */\n this.endss_ = [];\n\n /**\n * @private\n * @type {number}\n */\n this.flatInteriorPointsRevision_ = -1;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.flatInteriorPoints_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.orientedRevision_ = -1;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.orientedFlatCoordinates_ = null;\n\n if (!opt_endss && !Array.isArray(coordinates[0])) {\n let layout = this.getLayout();\n const polygons = /** @type {Array<Polygon>} */ (coordinates);\n const flatCoordinates = [];\n const endss = [];\n for (let i = 0, ii = polygons.length; i < ii; ++i) {\n const polygon = polygons[i];\n if (i === 0) {\n layout = polygon.getLayout();\n }\n const offset = flatCoordinates.length;\n const ends = polygon.getEnds();\n for (let 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(\n opt_layout,\n /** @type {Array<number>} */ (coordinates)\n );\n this.endss_ = opt_endss;\n } else {\n this.setCoordinates(\n /** @type {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} */ (coordinates),\n opt_layout\n );\n }\n }\n\n /**\n * Append the passed polygon to this multipolygon.\n * @param {Polygon} polygon Polygon.\n * @api\n */\n appendPolygon(polygon) {\n /** @type {Array<number>} */\n let ends;\n if (!this.flatCoordinates) {\n this.flatCoordinates = polygon.getFlatCoordinates().slice();\n ends = polygon.getEnds().slice();\n this.endss_.push();\n } else {\n const offset = this.flatCoordinates.length;\n extend(this.flatCoordinates, polygon.getFlatCoordinates());\n ends = polygon.getEnds().slice();\n for (let 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 /**\n * Make a complete copy of the geometry.\n * @return {!MultiPolygon} Clone.\n * @api\n */\n clone() {\n const len = this.endss_.length;\n const newEndss = new Array(len);\n for (let i = 0; i < len; ++i) {\n newEndss[i] = this.endss_[i].slice();\n }\n\n const multiPolygon = new MultiPolygon(\n this.flatCoordinates.slice(),\n this.layout,\n newEndss\n );\n multiPolygon.applyProperties(this);\n\n return multiPolygon;\n }\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 closestPointXY(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(\n multiArrayMaxSquaredDelta(\n this.flatCoordinates,\n 0,\n this.endss_,\n this.stride,\n 0\n )\n );\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestMultiArrayPoint(\n this.getOrientedFlatCoordinates(),\n 0,\n this.endss_,\n this.stride,\n this.maxDelta_,\n true,\n x,\n y,\n closestPoint,\n minSquaredDistance\n );\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\n containsXY(x, y) {\n return linearRingssContainsXY(\n this.getOrientedFlatCoordinates(),\n 0,\n this.endss_,\n this.stride,\n x,\n y\n );\n }\n\n /**\n * Return the area of the multipolygon on projected plane.\n * @return {number} Area (on projected plane).\n * @api\n */\n getArea() {\n return linearRingssArea(\n this.getOrientedFlatCoordinates(),\n 0,\n this.endss_,\n this.stride\n );\n }\n\n /**\n * Get the coordinate array for this geometry. This array has the structure\n * of a GeoJSON coordinate array for multi-polygons.\n *\n * @param {boolean=} opt_right Orient coordinates according to the right-hand\n * rule (counter-clockwise for exterior and clockwise for interior rings).\n * If `false`, coordinates will be oriented according to the left-hand rule\n * (clockwise for exterior and counter-clockwise for interior rings).\n * By default, coordinate orientation will depend on how the geometry was\n * constructed.\n * @return {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} Coordinates.\n * @api\n */\n getCoordinates(opt_right) {\n let flatCoordinates;\n if (opt_right !== undefined) {\n flatCoordinates = this.getOrientedFlatCoordinates().slice();\n orientLinearRingsArray(\n flatCoordinates,\n 0,\n this.endss_,\n this.stride,\n opt_right\n );\n } else {\n flatCoordinates = this.flatCoordinates;\n }\n\n return inflateMultiCoordinatesArray(\n flatCoordinates,\n 0,\n this.endss_,\n this.stride\n );\n }\n\n /**\n * @return {Array<Array<number>>} Endss.\n */\n getEndss() {\n return this.endss_;\n }\n\n /**\n * @return {Array<number>} Flat interior points.\n */\n getFlatInteriorPoints() {\n if (this.flatInteriorPointsRevision_ != this.getRevision()) {\n const flatCenters = linearRingssCenter(\n this.flatCoordinates,\n 0,\n this.endss_,\n this.stride\n );\n this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(\n this.getOrientedFlatCoordinates(),\n 0,\n this.endss_,\n this.stride,\n flatCenters\n );\n this.flatInteriorPointsRevision_ = this.getRevision();\n }\n return this.flatInteriorPoints_;\n }\n\n /**\n * Return the interior points as {@link module:ol/geom/MultiPoint multipoint}.\n * @return {MultiPoint} Interior points as XYM coordinates, where M is\n * the length of the horizontal intersection that the point belongs to.\n * @api\n */\n getInteriorPoints() {\n return new MultiPoint(\n this.getFlatInteriorPoints().slice(),\n GeometryLayout.XYM\n );\n }\n\n /**\n * @return {Array<number>} Oriented flat coordinates.\n */\n getOrientedFlatCoordinates() {\n if (this.orientedRevision_ != this.getRevision()) {\n const flatCoordinates = this.flatCoordinates;\n if (\n linearRingssAreOriented(flatCoordinates, 0, this.endss_, this.stride)\n ) {\n this.orientedFlatCoordinates_ = flatCoordinates;\n } else {\n this.orientedFlatCoordinates_ = flatCoordinates.slice();\n this.orientedFlatCoordinates_.length = orientLinearRingsArray(\n this.orientedFlatCoordinates_,\n 0,\n this.endss_,\n this.stride\n );\n }\n this.orientedRevision_ = this.getRevision();\n }\n return this.orientedFlatCoordinates_;\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {MultiPolygon} Simplified MultiPolygon.\n * @protected\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n const simplifiedFlatCoordinates = [];\n const simplifiedEndss = [];\n simplifiedFlatCoordinates.length = quantizeMultiArray(\n this.flatCoordinates,\n 0,\n this.endss_,\n this.stride,\n Math.sqrt(squaredTolerance),\n simplifiedFlatCoordinates,\n 0,\n simplifiedEndss\n );\n return new MultiPolygon(\n simplifiedFlatCoordinates,\n GeometryLayout.XY,\n simplifiedEndss\n );\n }\n\n /**\n * Return the polygon at the specified index.\n * @param {number} index Index.\n * @return {Polygon} Polygon.\n * @api\n */\n getPolygon(index) {\n if (index < 0 || this.endss_.length <= index) {\n return null;\n }\n let offset;\n if (index === 0) {\n offset = 0;\n } else {\n const prevEnds = this.endss_[index - 1];\n offset = prevEnds[prevEnds.length - 1];\n }\n const ends = this.endss_[index].slice();\n const end = ends[ends.length - 1];\n if (offset !== 0) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n ends[i] -= offset;\n }\n }\n return new Polygon(\n this.flatCoordinates.slice(offset, end),\n this.layout,\n ends\n );\n }\n\n /**\n * Return the polygons of this multipolygon.\n * @return {Array<Polygon>} Polygons.\n * @api\n */\n getPolygons() {\n const layout = this.layout;\n const flatCoordinates = this.flatCoordinates;\n const endss = this.endss_;\n const polygons = [];\n let offset = 0;\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i].slice();\n const end = ends[ends.length - 1];\n if (offset !== 0) {\n for (let j = 0, jj = ends.length; j < jj; ++j) {\n ends[j] -= offset;\n }\n }\n const polygon = new Polygon(\n flatCoordinates.slice(offset, end),\n layout,\n ends\n );\n polygons.push(polygon);\n offset = end;\n }\n return polygons;\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./GeometryType.js\").default} Geometry type.\n * @api\n */\n getType() {\n return GeometryType.MULTI_POLYGON;\n }\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 intersectsExtent(extent) {\n return intersectsLinearRingMultiArray(\n this.getOrientedFlatCoordinates(),\n 0,\n this.endss_,\n this.stride,\n extent\n );\n }\n\n /**\n * Set the coordinates of the multipolygon.\n * @param {!Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} coordinates Coordinates.\n * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n * @api\n */\n setCoordinates(coordinates, opt_layout) {\n this.setLayout(opt_layout, coordinates, 3);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n const endss = deflateMultiCoordinatesArray(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride,\n this.endss_\n );\n if (endss.length === 0) {\n this.flatCoordinates.length = 0;\n } else {\n const lastEnds = endss[endss.length - 1];\n this.flatCoordinates.length =\n lastEnds.length === 0 ? 0 : lastEnds[lastEnds.length - 1];\n }\n this.changed();\n }\n}\n\nexport default MultiPolygon;\n","/**\n * @module ol/interaction/Draw\n */\nimport Circle from '../geom/Circle.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport Feature from '../Feature.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport InteractionProperty from './Property.js';\nimport LineString from '../geom/LineString.js';\nimport MapBrowserEvent from '../MapBrowserEvent.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport PointerInteraction from './Pointer.js';\nimport Polygon, {fromCircle, makeRegular} from '../geom/Polygon.js';\nimport VectorLayer from '../layer/Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport {FALSE, TRUE} from '../functions.js';\nimport {always, noModifierKeys, shiftKeyOnly} from '../events/condition.js';\nimport {\n boundingExtent,\n getBottomLeft,\n getBottomRight,\n getTopLeft,\n getTopRight,\n} from '../extent.js';\nimport {createEditingStyle} from '../style/Style.js';\nimport {fromUserCoordinate, getUserProjection} from '../proj.js';\nimport {getChangeEventType} from '../Object.js';\nimport {squaredDistance as squaredCoordinateDistance} from '../coordinate.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../geom/GeometryType.js\").default} type Geometry type of\n * the geometries being drawn with this instance.\n * @property {number} [clickTolerance=6] The maximum distance in pixels between\n * \"down\" and \"up\" for a \"up\" event to be considered a \"click\" event and\n * actually add a point/vertex to the geometry being drawn. The default of `6`\n * was chosen for the draw interaction to behave correctly on mouse as well as\n * on touch devices.\n * @property {import(\"../Collection.js\").default<Feature>} [features]\n * Destination collection for the drawn features.\n * @property {VectorSource} [source] Destination source for\n * the drawn features.\n * @property {number} [dragVertexDelay=500] Delay in milliseconds after pointerdown\n * before the current vertex can be dragged to its exact position.\n * @property {number} [snapTolerance=12] Pixel distance for snapping to the\n * drawing finish. Must be greater than `0`.\n * @property {boolean} [stopClick=false] Stop click, singleclick, and\n * doubleclick events from firing during drawing.\n * @property {number} [maxPoints] The number of points that can be drawn before\n * a polygon ring or line string is finished. By default there is no\n * restriction.\n * @property {number} [minPoints] The number of points that must be drawn\n * before a polygon ring or line string can be finished. Default is `3` for\n * polygon rings and `2` for line strings.\n * @property {import(\"../events/condition.js\").Condition} [finishCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether the drawing can be finished. Not used when drawing\n * POINT or MULTI_POINT geometries.\n * @property {import(\"../style/Style.js\").StyleLike} [style]\n * Style for sketch features.\n * @property {GeometryFunction} [geometryFunction]\n * Function that is called when a geometry's coordinates are updated.\n * @property {string} [geometryName] Geometry name to use for features created\n * by the draw interaction.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * By default {@link module:ol/events/condition~noModifierKeys}, i.e. a click,\n * adds a vertex or deactivates freehand drawing.\n * @property {boolean} [freehand=false] Operate in freehand mode for lines,\n * polygons, and circles. This makes the interaction always operate in freehand\n * mode and takes precedence over any `freehandCondition` option.\n * @property {import(\"../events/condition.js\").Condition} [freehandCondition]\n * Condition that activates freehand drawing for lines and polygons. This\n * function takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and\n * returns a boolean to indicate whether that event should be handled. The\n * default is {@link module:ol/events/condition~shiftKeyOnly}, meaning that the\n * Shift key activates freehand drawing.\n * @property {boolean} [wrapX=false] Wrap the world horizontally on the sketch\n * overlay.\n */\n\n/**\n * Coordinate type when drawing points.\n * @typedef {import(\"../coordinate.js\").Coordinate} PointCoordType\n */\n\n/**\n * Coordinate type when drawing lines.\n * @typedef {Array<import(\"../coordinate.js\").Coordinate>} LineCoordType\n */\n\n/**\n * Coordinate type when drawing polygons.\n * @typedef {Array<Array<import(\"../coordinate.js\").Coordinate>>} PolyCoordType\n */\n\n/**\n * Types used for drawing coordinates.\n * @typedef {PointCoordType|LineCoordType|PolyCoordType} SketchCoordType\n */\n\n/**\n * Function that takes an array of coordinates and an optional existing geometry\n * and a projection as arguments, and returns a geometry. The optional existing\n * geometry is the geometry that is returned when the function is called without\n * a second argument.\n * @typedef {function(!SketchCoordType, import(\"../geom/SimpleGeometry.js\").default,\n * import(\"../proj/Projection.js\").default):\n * import(\"../geom/SimpleGeometry.js\").default} GeometryFunction\n */\n\n/**\n * Draw mode. This collapses multi-part geometry types with their single-part\n * cousins.\n * @enum {string}\n */\nconst Mode = {\n POINT: 'Point',\n LINE_STRING: 'LineString',\n POLYGON: 'Polygon',\n CIRCLE: 'Circle',\n};\n\n/**\n * @enum {string}\n */\nconst DrawEventType = {\n /**\n * Triggered upon feature draw start\n * @event DrawEvent#drawstart\n * @api\n */\n DRAWSTART: 'drawstart',\n /**\n * Triggered upon feature draw end\n * @event DrawEvent#drawend\n * @api\n */\n DRAWEND: 'drawend',\n /**\n * Triggered upon feature draw abortion\n * @event DrawEvent#drawabort\n * @api\n */\n DRAWABORT: 'drawabort',\n};\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Draw~Draw} instances are\n * instances of this type.\n */\nexport class DrawEvent extends Event {\n /**\n * @param {DrawEventType} type Type.\n * @param {Feature} feature The feature drawn.\n */\n constructor(type, feature) {\n super(type);\n\n /**\n * The feature being drawn.\n * @type {Feature}\n * @api\n */\n this.feature = feature;\n }\n}\n\n/**\n * @classdesc\n * Interaction for drawing feature geometries.\n *\n * @fires DrawEvent\n * @api\n */\nclass Draw extends PointerInteraction {\n /**\n * @param {Options} options Options.\n */\n constructor(options) {\n const pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n if (!pointerOptions.stopDown) {\n pointerOptions.stopDown = FALSE;\n }\n\n super(pointerOptions);\n\n /**\n * @type {boolean}\n * @private\n */\n this.shouldHandle_ = false;\n\n /**\n * @type {import(\"../pixel.js\").Pixel}\n * @private\n */\n this.downPx_ = null;\n\n /**\n * @type {?}\n * @private\n */\n this.downTimeout_;\n\n /**\n * @type {number|undefined}\n * @private\n */\n this.lastDragTime_;\n\n /**\n * Pointer type of the last pointermove event\n * @type {string}\n * @private\n */\n this.pointerType_;\n\n /**\n * @type {boolean}\n * @private\n */\n this.freehand_ = false;\n\n /**\n * Target source for drawn features.\n * @type {VectorSource}\n * @private\n */\n this.source_ = options.source ? options.source : null;\n\n /**\n * Target collection for drawn features.\n * @type {import(\"../Collection.js\").default<Feature>}\n * @private\n */\n this.features_ = options.features ? options.features : null;\n\n /**\n * Pixel distance for snapping.\n * @type {number}\n * @private\n */\n this.snapTolerance_ = options.snapTolerance ? options.snapTolerance : 12;\n\n /**\n * Geometry type.\n * @type {import(\"../geom/GeometryType.js\").default}\n * @private\n */\n this.type_ = /** @type {import(\"../geom/GeometryType.js\").default} */ (options.type);\n\n /**\n * Drawing mode (derived from geometry type.\n * @type {Mode}\n * @private\n */\n this.mode_ = getMode(this.type_);\n\n /**\n * Stop click, singleclick, and doubleclick events from firing during drawing.\n * Default is `false`.\n * @type {boolean}\n * @private\n */\n this.stopClick_ = !!options.stopClick;\n\n /**\n * The number of points that must be drawn before a polygon ring or line\n * string can be finished. The default is 3 for polygon rings and 2 for\n * line strings.\n * @type {number}\n * @private\n */\n this.minPoints_ = options.minPoints\n ? options.minPoints\n : this.mode_ === Mode.POLYGON\n ? 3\n : 2;\n\n /**\n * The number of points that can be drawn before a polygon ring or line string\n * is finished. The default is no restriction.\n * @type {number}\n * @private\n */\n this.maxPoints_ =\n this.mode_ === Mode.CIRCLE\n ? 2\n : options.maxPoints\n ? options.maxPoints\n : Infinity;\n\n /**\n * A function to decide if a potential finish coordinate is permissible\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.finishCondition_ = options.finishCondition\n ? options.finishCondition\n : TRUE;\n\n let geometryFunction = options.geometryFunction;\n if (!geometryFunction) {\n const mode = this.mode_;\n if (mode === Mode.CIRCLE) {\n /**\n * @param {!LineCoordType} coordinates The coordinates.\n * @param {import(\"../geom/SimpleGeometry.js\").default|undefined} geometry Optional geometry.\n * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n * @return {import(\"../geom/SimpleGeometry.js\").default} A geometry.\n */\n geometryFunction = function (coordinates, geometry, projection) {\n const circle = geometry\n ? /** @type {Circle} */ (geometry)\n : new Circle([NaN, NaN]);\n const center = fromUserCoordinate(coordinates[0], projection);\n const squaredLength = squaredCoordinateDistance(\n center,\n fromUserCoordinate(coordinates[coordinates.length - 1], projection)\n );\n circle.setCenterAndRadius(center, Math.sqrt(squaredLength));\n const userProjection = getUserProjection();\n if (userProjection) {\n circle.transform(projection, userProjection);\n }\n return circle;\n };\n } else {\n let Constructor;\n if (mode === Mode.POINT) {\n Constructor = Point;\n } else if (mode === Mode.LINE_STRING) {\n Constructor = LineString;\n } else if (mode === Mode.POLYGON) {\n Constructor = Polygon;\n }\n /**\n * @param {!LineCoordType} coordinates The coordinates.\n * @param {import(\"../geom/SimpleGeometry.js\").default|undefined} geometry Optional geometry.\n * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n * @return {import(\"../geom/SimpleGeometry.js\").default} A geometry.\n */\n geometryFunction = function (coordinates, geometry, projection) {\n if (geometry) {\n if (mode === Mode.POLYGON) {\n if (coordinates[0].length) {\n // Add a closing coordinate to match the first\n geometry.setCoordinates([\n coordinates[0].concat([coordinates[0][0]]),\n ]);\n } else {\n geometry.setCoordinates([]);\n }\n } else {\n geometry.setCoordinates(coordinates);\n }\n } else {\n geometry = new Constructor(coordinates);\n }\n return geometry;\n };\n }\n }\n\n /**\n * @type {GeometryFunction}\n * @private\n */\n this.geometryFunction_ = geometryFunction;\n\n /**\n * @type {number}\n * @private\n */\n this.dragVertexDelay_ =\n options.dragVertexDelay !== undefined ? options.dragVertexDelay : 500;\n\n /**\n * Finish coordinate for the feature (first point for polygons, last point for\n * linestrings).\n * @type {import(\"../coordinate.js\").Coordinate}\n * @private\n */\n this.finishCoordinate_ = null;\n\n /**\n * Sketch feature.\n * @type {Feature}\n * @private\n */\n this.sketchFeature_ = null;\n\n /**\n * Sketch point.\n * @type {Feature<Point>}\n * @private\n */\n this.sketchPoint_ = null;\n\n /**\n * Sketch coordinates. Used when drawing a line or polygon.\n * @type {SketchCoordType}\n * @private\n */\n this.sketchCoords_ = null;\n\n /**\n * Sketch line. Used when drawing polygon.\n * @type {Feature<LineString>}\n * @private\n */\n this.sketchLine_ = null;\n\n /**\n * Sketch line coordinates. Used when drawing a polygon or circle.\n * @type {LineCoordType}\n * @private\n */\n this.sketchLineCoords_ = null;\n\n /**\n * Squared tolerance for handling up events. If the squared distance\n * between a down and up event is greater than this tolerance, up events\n * will not be handled.\n * @type {number}\n * @private\n */\n this.squaredClickTolerance_ = options.clickTolerance\n ? options.clickTolerance * options.clickTolerance\n : 36;\n\n /**\n * Draw overlay where our sketch features are drawn.\n * @type {VectorLayer}\n * @private\n */\n this.overlay_ = new VectorLayer({\n source: new VectorSource({\n useSpatialIndex: false,\n wrapX: options.wrapX ? options.wrapX : false,\n }),\n style: options.style ? options.style : getDefaultStyleFunction(),\n updateWhileInteracting: true,\n });\n\n /**\n * Name of the geometry attribute for newly created features.\n * @type {string|undefined}\n * @private\n */\n this.geometryName_ = options.geometryName;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : noModifierKeys;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.freehandCondition_;\n if (options.freehand) {\n this.freehandCondition_ = always;\n } else {\n this.freehandCondition_ = options.freehandCondition\n ? options.freehandCondition\n : shiftKeyOnly;\n }\n\n this.addEventListener(\n getChangeEventType(InteractionProperty.ACTIVE),\n this.updateState_\n );\n }\n\n /**\n * Remove the interaction from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n */\n setMap(map) {\n super.setMap(map);\n this.updateState_();\n }\n\n /**\n * Get the overlay layer that this interaction renders sketch features to.\n * @return {VectorLayer} Overlay layer.\n * @api\n */\n getOverlay() {\n return this.overlay_;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent map browser event} and may actually draw or finish the drawing.\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @api\n */\n handleEvent(event) {\n if (event.originalEvent.type === EventType.CONTEXTMENU) {\n // Avoid context menu for long taps when drawing on mobile\n event.originalEvent.preventDefault();\n }\n this.freehand_ =\n this.mode_ !== Mode.POINT && this.freehandCondition_(event);\n let move = event.type === MapBrowserEventType.POINTERMOVE;\n let pass = true;\n if (\n !this.freehand_ &&\n this.lastDragTime_ &&\n event.type === MapBrowserEventType.POINTERDRAG\n ) {\n const now = Date.now();\n if (now - this.lastDragTime_ >= this.dragVertexDelay_) {\n this.downPx_ = event.pixel;\n this.shouldHandle_ = !this.freehand_;\n move = true;\n } else {\n this.lastDragTime_ = undefined;\n }\n if (this.shouldHandle_ && this.downTimeout_ !== undefined) {\n clearTimeout(this.downTimeout_);\n this.downTimeout_ = undefined;\n }\n }\n if (\n this.freehand_ &&\n event.type === MapBrowserEventType.POINTERDRAG &&\n this.sketchFeature_ !== null\n ) {\n this.addToDrawing_(event.coordinate);\n pass = false;\n } else if (\n this.freehand_ &&\n event.type === MapBrowserEventType.POINTERDOWN\n ) {\n pass = false;\n } else if (move && this.getPointerCount() < 2) {\n pass = event.type === MapBrowserEventType.POINTERMOVE;\n if (pass && this.freehand_) {\n this.handlePointerMove_(event);\n if (this.shouldHandle_) {\n // Avoid page scrolling when freehand drawing on mobile\n event.originalEvent.preventDefault();\n }\n } else if (\n event.originalEvent.pointerType === 'mouse' ||\n (event.type === MapBrowserEventType.POINTERDRAG &&\n this.downTimeout_ === undefined)\n ) {\n this.handlePointerMove_(event);\n }\n } else if (event.type === MapBrowserEventType.DBLCLICK) {\n pass = false;\n }\n\n return super.handleEvent(event) && pass;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @return {boolean} If the event was consumed.\n */\n handleDownEvent(event) {\n this.shouldHandle_ = !this.freehand_;\n\n if (this.freehand_) {\n this.downPx_ = event.pixel;\n if (!this.finishCoordinate_) {\n this.startDrawing_(event.coordinate);\n }\n return true;\n } else if (this.condition_(event)) {\n this.lastDragTime_ = Date.now();\n this.downTimeout_ = setTimeout(\n function () {\n this.handlePointerMove_(\n new MapBrowserEvent(\n MapBrowserEventType.POINTERMOVE,\n event.map,\n event.originalEvent,\n false,\n event.frameState\n )\n );\n }.bind(this),\n this.dragVertexDelay_\n );\n this.downPx_ = event.pixel;\n return true;\n } else {\n this.lastDragTime_ = undefined;\n return false;\n }\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(event) {\n let pass = true;\n\n if (this.getPointerCount() === 0) {\n if (this.downTimeout_) {\n clearTimeout(this.downTimeout_);\n this.downTimeout_ = undefined;\n }\n\n this.handlePointerMove_(event);\n\n if (this.shouldHandle_) {\n switch (true) {\n case !this.finishCoordinate_:\n this.startDrawing_(event.coordinate);\n if (this.mode_ !== Mode.POINT) {\n break;\n }\n // eslint-disable-next-line no-fallthrough\n case this.freehand_ ||\n (this.atFinish_(event.pixel) && this.finishCondition_(event)):\n this.finishDrawing();\n break;\n case !this.freehand_:\n this.addToDrawing_(event.coordinate);\n break;\n default:\n break;\n }\n pass = false;\n } else if (this.freehand_) {\n this.abortDrawing();\n }\n }\n\n if (!pass && this.stopClick_) {\n event.originalEvent.stopPropagation();\n }\n return pass;\n }\n\n /**\n * Handle move events.\n * @param {import(\"../MapBrowserEvent.js\").default} event A move event.\n * @private\n */\n handlePointerMove_(event) {\n this.pointerType_ = event.originalEvent.pointerType;\n if (\n this.downPx_ &&\n ((!this.freehand_ && this.shouldHandle_) ||\n (this.freehand_ && !this.shouldHandle_))\n ) {\n const downPx = this.downPx_;\n const clickPx = event.pixel;\n const dx = downPx[0] - clickPx[0];\n const dy = downPx[1] - clickPx[1];\n const squaredDistance = dx * dx + dy * dy;\n this.shouldHandle_ = this.freehand_\n ? squaredDistance > this.squaredClickTolerance_\n : squaredDistance <= this.squaredClickTolerance_;\n if (!this.shouldHandle_) {\n return;\n }\n }\n\n if (this.finishCoordinate_) {\n this.modifyDrawing_(event.coordinate);\n } else {\n this.createOrUpdateSketchPoint_(event);\n }\n }\n\n /**\n * Determine if an event is within the snapping tolerance of the start coord.\n * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n * @return {boolean} The event is within the snapping tolerance of the start.\n * @private\n */\n atFinish_(pixel) {\n let at = false;\n if (this.sketchFeature_) {\n let potentiallyDone = false;\n let potentiallyFinishCoordinates = [this.finishCoordinate_];\n const mode = this.mode_;\n if (mode === Mode.POINT) {\n at = true;\n } else if (mode === Mode.CIRCLE) {\n at = this.sketchCoords_.length === 2;\n } else if (mode === Mode.LINE_STRING) {\n potentiallyDone = this.sketchCoords_.length > this.minPoints_;\n } else if (mode === Mode.POLYGON) {\n const sketchCoords = /** @type {PolyCoordType} */ (this.sketchCoords_);\n potentiallyDone = sketchCoords[0].length > this.minPoints_;\n potentiallyFinishCoordinates = [\n sketchCoords[0][0],\n sketchCoords[0][sketchCoords[0].length - 2],\n ];\n }\n if (potentiallyDone) {\n const map = this.getMap();\n for (let i = 0, ii = potentiallyFinishCoordinates.length; i < ii; i++) {\n const finishCoordinate = potentiallyFinishCoordinates[i];\n const finishPixel = map.getPixelFromCoordinate(finishCoordinate);\n const dx = pixel[0] - finishPixel[0];\n const dy = pixel[1] - finishPixel[1];\n const snapTolerance = this.freehand_ ? 1 : this.snapTolerance_;\n at = Math.sqrt(dx * dx + dy * dy) <= snapTolerance;\n if (at) {\n this.finishCoordinate_ = finishCoordinate;\n break;\n }\n }\n }\n }\n return at;\n }\n\n /**\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @private\n */\n createOrUpdateSketchPoint_(event) {\n const coordinates = event.coordinate.slice();\n if (!this.sketchPoint_) {\n this.sketchPoint_ = new Feature(new Point(coordinates));\n this.updateSketchFeatures_();\n } else {\n const sketchPointGeom = this.sketchPoint_.getGeometry();\n sketchPointGeom.setCoordinates(coordinates);\n }\n }\n\n /**\n * @param {import(\"../geom/Polygon.js\").default} geometry Polygon geometry.\n * @private\n */\n createOrUpdateCustomSketchLine_(geometry) {\n if (!this.sketchLine_) {\n this.sketchLine_ = new Feature();\n }\n const ring = geometry.getLinearRing(0);\n let sketchLineGeom = this.sketchLine_.getGeometry();\n if (!sketchLineGeom) {\n sketchLineGeom = new LineString(\n ring.getFlatCoordinates(),\n ring.getLayout()\n );\n this.sketchLine_.setGeometry(sketchLineGeom);\n } else {\n sketchLineGeom.setFlatCoordinates(\n ring.getLayout(),\n ring.getFlatCoordinates()\n );\n sketchLineGeom.changed();\n }\n }\n\n /**\n * Start the drawing.\n * @param {import(\"../coordinate.js\").Coordinate} start Start coordinate.\n * @private\n */\n startDrawing_(start) {\n const projection = this.getMap().getView().getProjection();\n this.finishCoordinate_ = start;\n if (this.mode_ === Mode.POINT) {\n this.sketchCoords_ = start.slice();\n } else if (this.mode_ === Mode.POLYGON) {\n this.sketchCoords_ = [[start.slice(), start.slice()]];\n this.sketchLineCoords_ = this.sketchCoords_[0];\n } else {\n this.sketchCoords_ = [start.slice(), start.slice()];\n }\n if (this.sketchLineCoords_) {\n this.sketchLine_ = new Feature(new LineString(this.sketchLineCoords_));\n }\n const geometry = this.geometryFunction_(\n this.sketchCoords_,\n undefined,\n projection\n );\n this.sketchFeature_ = new Feature();\n if (this.geometryName_) {\n this.sketchFeature_.setGeometryName(this.geometryName_);\n }\n this.sketchFeature_.setGeometry(geometry);\n this.updateSketchFeatures_();\n this.dispatchEvent(\n new DrawEvent(DrawEventType.DRAWSTART, this.sketchFeature_)\n );\n }\n\n /**\n * Modify the drawing.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @private\n */\n modifyDrawing_(coordinate) {\n const map = this.getMap();\n const geometry = this.sketchFeature_.getGeometry();\n const projection = map.getView().getProjection();\n let coordinates, last;\n if (this.mode_ === Mode.POINT) {\n last = this.sketchCoords_;\n } else if (this.mode_ === Mode.POLYGON) {\n coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n last = coordinates[coordinates.length - 1];\n if (this.atFinish_(map.getPixelFromCoordinate(coordinate))) {\n // snap to finish\n coordinate = this.finishCoordinate_.slice();\n }\n } else {\n coordinates = this.sketchCoords_;\n last = coordinates[coordinates.length - 1];\n }\n last[0] = coordinate[0];\n last[1] = coordinate[1];\n this.geometryFunction_(\n /** @type {!LineCoordType} */ (this.sketchCoords_),\n geometry,\n projection\n );\n if (this.sketchPoint_) {\n const sketchPointGeom = this.sketchPoint_.getGeometry();\n sketchPointGeom.setCoordinates(coordinate);\n }\n if (\n geometry.getType() === GeometryType.POLYGON &&\n this.mode_ !== Mode.POLYGON\n ) {\n this.createOrUpdateCustomSketchLine_(/** @type {Polygon} */ (geometry));\n } else if (this.sketchLineCoords_) {\n const sketchLineGeom = this.sketchLine_.getGeometry();\n sketchLineGeom.setCoordinates(this.sketchLineCoords_);\n }\n this.updateSketchFeatures_();\n }\n\n /**\n * Add a new coordinate to the drawing.\n * @param {!PointCoordType} coordinate Coordinate\n * @private\n */\n addToDrawing_(coordinate) {\n const geometry = this.sketchFeature_.getGeometry();\n const projection = this.getMap().getView().getProjection();\n let done;\n let coordinates;\n const mode = this.mode_;\n if (mode === Mode.LINE_STRING || mode === Mode.CIRCLE) {\n this.finishCoordinate_ = coordinate.slice();\n coordinates = /** @type {LineCoordType} */ (this.sketchCoords_);\n if (coordinates.length >= this.maxPoints_) {\n if (this.freehand_) {\n coordinates.pop();\n } else {\n done = true;\n }\n }\n coordinates.push(coordinate.slice());\n this.geometryFunction_(coordinates, geometry, projection);\n } else if (mode === Mode.POLYGON) {\n coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n if (coordinates.length >= this.maxPoints_) {\n if (this.freehand_) {\n coordinates.pop();\n } else {\n done = true;\n }\n }\n coordinates.push(coordinate.slice());\n if (done) {\n this.finishCoordinate_ = coordinates[0];\n }\n this.geometryFunction_(this.sketchCoords_, geometry, projection);\n }\n this.updateSketchFeatures_();\n if (done) {\n this.finishDrawing();\n }\n }\n\n /**\n * Remove last point of the feature currently being drawn. Does not do anything when\n * drawing POINT or MULTI_POINT geometries.\n * @api\n */\n removeLastPoint() {\n if (!this.sketchFeature_) {\n return;\n }\n const geometry = this.sketchFeature_.getGeometry();\n const projection = this.getMap().getView().getProjection();\n let coordinates;\n const mode = this.mode_;\n if (mode === Mode.LINE_STRING || mode === Mode.CIRCLE) {\n coordinates = /** @type {LineCoordType} */ (this.sketchCoords_);\n coordinates.splice(-2, 1);\n if (coordinates.length >= 2) {\n this.finishCoordinate_ = coordinates[coordinates.length - 2].slice();\n const finishCoordinate = this.finishCoordinate_.slice();\n coordinates[coordinates.length - 1] = finishCoordinate;\n this.sketchPoint_.setGeometry(new Point(finishCoordinate));\n }\n this.geometryFunction_(coordinates, geometry, projection);\n if (geometry.getType() === GeometryType.POLYGON && this.sketchLine_) {\n this.createOrUpdateCustomSketchLine_(/** @type {Polygon} */ (geometry));\n }\n } else if (mode === Mode.POLYGON) {\n coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n coordinates.splice(-2, 1);\n const sketchLineGeom = this.sketchLine_.getGeometry();\n if (coordinates.length >= 2) {\n const finishCoordinate = coordinates[coordinates.length - 2].slice();\n coordinates[coordinates.length - 1] = finishCoordinate;\n this.sketchPoint_.setGeometry(new Point(finishCoordinate));\n }\n sketchLineGeom.setCoordinates(coordinates);\n this.geometryFunction_(this.sketchCoords_, geometry, projection);\n }\n\n if (coordinates.length === 1) {\n this.abortDrawing();\n }\n\n this.updateSketchFeatures_();\n }\n\n /**\n * Stop drawing and add the sketch feature to the target layer.\n * The {@link module:ol/interaction/Draw~DrawEventType.DRAWEND} event is\n * dispatched before inserting the feature.\n * @api\n */\n finishDrawing() {\n const sketchFeature = this.abortDrawing_();\n if (!sketchFeature) {\n return;\n }\n let coordinates = this.sketchCoords_;\n const geometry = sketchFeature.getGeometry();\n const projection = this.getMap().getView().getProjection();\n if (this.mode_ === Mode.LINE_STRING) {\n // remove the redundant last point\n coordinates.pop();\n this.geometryFunction_(coordinates, geometry, projection);\n } else if (this.mode_ === Mode.POLYGON) {\n // remove the redundant last point in ring\n /** @type {PolyCoordType} */ (coordinates)[0].pop();\n this.geometryFunction_(coordinates, geometry, projection);\n coordinates = geometry.getCoordinates();\n }\n\n // cast multi-part geometries\n if (this.type_ === GeometryType.MULTI_POINT) {\n sketchFeature.setGeometry(\n new MultiPoint([/** @type {PointCoordType} */ (coordinates)])\n );\n } else if (this.type_ === GeometryType.MULTI_LINE_STRING) {\n sketchFeature.setGeometry(\n new MultiLineString([/** @type {LineCoordType} */ (coordinates)])\n );\n } else if (this.type_ === GeometryType.MULTI_POLYGON) {\n sketchFeature.setGeometry(\n new MultiPolygon([/** @type {PolyCoordType} */ (coordinates)])\n );\n }\n\n // First dispatch event to allow full set up of feature\n this.dispatchEvent(new DrawEvent(DrawEventType.DRAWEND, sketchFeature));\n\n // Then insert feature\n if (this.features_) {\n this.features_.push(sketchFeature);\n }\n if (this.source_) {\n this.source_.addFeature(sketchFeature);\n }\n }\n\n /**\n * Stop drawing without adding the sketch feature to the target layer.\n * @return {Feature} The sketch feature (or null if none).\n * @private\n */\n abortDrawing_() {\n this.finishCoordinate_ = null;\n const sketchFeature = this.sketchFeature_;\n this.sketchFeature_ = null;\n this.sketchPoint_ = null;\n this.sketchLine_ = null;\n this.overlay_.getSource().clear(true);\n return sketchFeature;\n }\n\n /**\n * Stop drawing without adding the sketch feature to the target layer.\n * @api\n */\n abortDrawing() {\n const sketchFeature = this.abortDrawing_();\n if (sketchFeature) {\n this.dispatchEvent(new DrawEvent(DrawEventType.DRAWABORT, sketchFeature));\n }\n }\n\n /**\n * Append coordinates to the end of the geometry that is currently being drawn.\n * This can be used when drawing LineStrings or Polygons. Coordinates will\n * either be appended to the current LineString or the outer ring of the current\n * Polygon. If no geometry is being drawn, a new one will be created.\n * @param {!LineCoordType} coordinates Linear coordinates to be appended to\n * the coordinate array.\n * @api\n */\n appendCoordinates(coordinates) {\n const mode = this.mode_;\n const newDrawing = !this.sketchFeature_;\n if (newDrawing) {\n this.startDrawing_(coordinates[0]);\n }\n /** @type {LineCoordType} */\n let sketchCoords;\n if (mode === Mode.LINE_STRING || mode === Mode.CIRCLE) {\n sketchCoords = /** @type {LineCoordType} */ (this.sketchCoords_);\n } else if (mode === Mode.POLYGON) {\n sketchCoords =\n this.sketchCoords_ && this.sketchCoords_.length\n ? /** @type {PolyCoordType} */ (this.sketchCoords_)[0]\n : [];\n } else {\n return;\n }\n\n if (newDrawing) {\n sketchCoords.shift();\n }\n\n // Remove last coordinate from sketch drawing (this coordinate follows cursor position)\n sketchCoords.pop();\n\n // Append coordinate list\n for (let i = 0; i < coordinates.length; i++) {\n this.addToDrawing_(coordinates[i]);\n }\n\n const ending = coordinates[coordinates.length - 1];\n // Duplicate last coordinate for sketch drawing (cursor position)\n this.addToDrawing_(ending);\n this.modifyDrawing_(ending);\n }\n\n /**\n * Initiate draw mode by starting from an existing geometry which will\n * receive new additional points. This only works on features with\n * `LineString` geometries, where the interaction will extend lines by adding\n * points to the end of the coordinates array.\n * This will change the original feature, instead of drawing a copy.\n *\n * The function will dispatch a `drawstart` event.\n *\n * @param {!Feature<LineString>} feature Feature to be extended.\n * @api\n */\n extend(feature) {\n const geometry = feature.getGeometry();\n const lineString = geometry;\n this.sketchFeature_ = feature;\n this.sketchCoords_ = lineString.getCoordinates();\n const last = this.sketchCoords_[this.sketchCoords_.length - 1];\n this.finishCoordinate_ = last.slice();\n this.sketchCoords_.push(last.slice());\n this.sketchPoint_ = new Feature(new Point(last));\n this.updateSketchFeatures_();\n this.dispatchEvent(\n new DrawEvent(DrawEventType.DRAWSTART, this.sketchFeature_)\n );\n }\n\n /**\n * Redraw the sketch features.\n * @private\n */\n updateSketchFeatures_() {\n const sketchFeatures = [];\n if (this.sketchFeature_) {\n sketchFeatures.push(this.sketchFeature_);\n }\n if (this.sketchLine_) {\n sketchFeatures.push(this.sketchLine_);\n }\n if (this.sketchPoint_) {\n sketchFeatures.push(this.sketchPoint_);\n }\n const overlaySource = this.overlay_.getSource();\n overlaySource.clear(true);\n overlaySource.addFeatures(sketchFeatures);\n }\n\n /**\n * @private\n */\n updateState_() {\n const map = this.getMap();\n const active = this.getActive();\n if (!map || !active) {\n this.abortDrawing();\n }\n this.overlay_.setMap(active ? map : null);\n }\n}\n\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n const styles = createEditingStyle();\n return function (feature, resolution) {\n return styles[feature.getGeometry().getType()];\n };\n}\n\n/**\n * Create a `geometryFunction` for `type: 'Circle'` that will create a regular\n * polygon with a user specified number of sides and start angle instead of a\n * `import(\"../geom/Circle.js\").Circle` geometry.\n * @param {number=} opt_sides Number of sides of the regular polygon.\n * Default is 32.\n * @param {number=} opt_angle Angle of the first point in counter-clockwise\n * radians. 0 means East.\n * Default is the angle defined by the heading from the center of the\n * regular polygon to the current pointer position.\n * @return {GeometryFunction} Function that draws a polygon.\n * @api\n */\nexport function createRegularPolygon(opt_sides, opt_angle) {\n return function (coordinates, opt_geometry, projection) {\n const center = fromUserCoordinate(\n /** @type {LineCoordType} */ (coordinates)[0],\n projection\n );\n const end = fromUserCoordinate(\n /** @type {LineCoordType} */ (coordinates)[coordinates.length - 1],\n projection\n );\n const radius = Math.sqrt(squaredCoordinateDistance(center, end));\n const geometry = opt_geometry\n ? /** @type {Polygon} */ (opt_geometry)\n : fromCircle(new Circle(center), opt_sides);\n\n let angle = opt_angle;\n if (!opt_angle && opt_angle !== 0) {\n const x = end[0] - center[0];\n const y = end[1] - center[1];\n angle = Math.atan2(y, x);\n }\n makeRegular(geometry, center, radius, angle);\n\n const userProjection = getUserProjection();\n if (userProjection) {\n geometry.transform(projection, userProjection);\n }\n return geometry;\n };\n}\n\n/**\n * Create a `geometryFunction` that will create a box-shaped polygon (aligned\n * with the coordinate system axes). Use this with the draw interaction and\n * `type: 'Circle'` to return a box instead of a circle geometry.\n * @return {GeometryFunction} Function that draws a box-shaped polygon.\n * @api\n */\nexport function createBox() {\n return function (coordinates, opt_geometry, projection) {\n const extent = boundingExtent(\n /** @type {LineCoordType} */ ([\n coordinates[0],\n coordinates[coordinates.length - 1],\n ]).map(function (coordinate) {\n return fromUserCoordinate(coordinate, projection);\n })\n );\n const boxCoordinates = [\n [\n getBottomLeft(extent),\n getBottomRight(extent),\n getTopRight(extent),\n getTopLeft(extent),\n getBottomLeft(extent),\n ],\n ];\n let geometry = opt_geometry;\n if (geometry) {\n geometry.setCoordinates(boxCoordinates);\n } else {\n geometry = new Polygon(boxCoordinates);\n }\n const userProjection = getUserProjection();\n if (userProjection) {\n geometry.transform(projection, userProjection);\n }\n return geometry;\n };\n}\n\n/**\n * Get the drawing mode. The mode for mult-part geometries is the same as for\n * their single-part cousins.\n * @param {import(\"../geom/GeometryType.js\").default} type Geometry type.\n * @return {Mode} Drawing mode.\n */\nfunction getMode(type) {\n let mode;\n if (type === GeometryType.POINT || type === GeometryType.MULTI_POINT) {\n mode = Mode.POINT;\n } else if (\n type === GeometryType.LINE_STRING ||\n type === GeometryType.MULTI_LINE_STRING\n ) {\n mode = Mode.LINE_STRING;\n } else if (\n type === GeometryType.POLYGON ||\n type === GeometryType.MULTI_POLYGON\n ) {\n mode = Mode.POLYGON;\n } else if (type === GeometryType.CIRCLE) {\n mode = Mode.CIRCLE;\n }\n return /** @type {!Mode} */ (mode);\n}\n\nexport default Draw;\n","/**\n * @module ol/interaction/Extent\n */\nimport Event from '../events/Event.js';\nimport Feature from '../Feature.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport Point from '../geom/Point.js';\nimport PointerInteraction from './Pointer.js';\nimport VectorLayer from '../layer/Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport {always} from '../events/condition.js';\nimport {boundingExtent, getArea} from '../extent.js';\nimport {\n closestOnSegment,\n distance as coordinateDistance,\n squaredDistance as squaredCoordinateDistance,\n squaredDistanceToSegment,\n} from '../coordinate.js';\nimport {createEditingStyle} from '../style/Style.js';\nimport {fromExtent as polygonFromExtent} from '../geom/Polygon.js';\nimport {toUserExtent} from '../proj.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition~always}.\n * @property {import(\"../extent.js\").Extent} [extent] Initial extent. Defaults to no\n * initial extent.\n * @property {import(\"../style/Style.js\").StyleLike} [boxStyle]\n * Style for the drawn extent box. Defaults to\n * {@link module:ol/style/Style~createEditing()['Polygon']}\n * @property {number} [pixelTolerance=10] Pixel tolerance for considering the\n * pointer close enough to a segment or vertex for editing.\n * @property {import(\"../style/Style.js\").StyleLike} [pointerStyle]\n * Style for the cursor used to draw the extent. Defaults to\n * {@link module:ol/style/Style~createEditing()['Point']}\n * @property {boolean} [wrapX=false] Wrap the drawn extent across multiple maps\n * in the X direction? Only affects visuals, not functionality.\n */\n\n/**\n * @enum {string}\n */\nconst ExtentEventType = {\n /**\n * Triggered after the extent is changed\n * @event ExtentEvent#extentchanged\n * @api\n */\n EXTENTCHANGED: 'extentchanged',\n};\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Extent~Extent} instances are\n * instances of this type.\n */\nexport class ExtentEvent extends Event {\n /**\n * @param {import(\"../extent.js\").Extent} extent the new extent\n */\n constructor(extent) {\n super(ExtentEventType.EXTENTCHANGED);\n\n /**\n * The current extent.\n * @type {import(\"../extent.js\").Extent}\n * @api\n */\n this.extent = extent;\n }\n}\n\n/**\n * @classdesc\n * Allows the user to draw a vector box by clicking and dragging on the map.\n * Once drawn, the vector box can be modified by dragging its vertices or edges.\n * This interaction is only supported for mouse devices.\n *\n * @fires ExtentEvent\n * @api\n */\nclass Extent extends PointerInteraction {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options || {};\n\n super(/** @type {import(\"./Pointer.js\").Options} */ (options));\n\n /**\n * Condition\n * @type {import(\"../events/condition.js\").Condition}\n * @private\n */\n this.condition_ = options.condition ? options.condition : always;\n\n /**\n * Extent of the drawn box\n * @type {import(\"../extent.js\").Extent}\n * @private\n */\n this.extent_ = null;\n\n /**\n * Handler for pointer move events\n * @type {function (import(\"../coordinate.js\").Coordinate): import(\"../extent.js\").Extent|null}\n * @private\n */\n this.pointerHandler_ = null;\n\n /**\n * Pixel threshold to snap to extent\n * @type {number}\n * @private\n */\n this.pixelTolerance_ =\n options.pixelTolerance !== undefined ? options.pixelTolerance : 10;\n\n /**\n * Is the pointer snapped to an extent vertex\n * @type {boolean}\n * @private\n */\n this.snappedToVertex_ = false;\n\n /**\n * Feature for displaying the visible extent\n * @type {Feature}\n * @private\n */\n this.extentFeature_ = null;\n\n /**\n * Feature for displaying the visible pointer\n * @type {Feature<Point>}\n * @private\n */\n this.vertexFeature_ = null;\n\n if (!opt_options) {\n opt_options = {};\n }\n\n /**\n * Layer for the extentFeature\n * @type {VectorLayer}\n * @private\n */\n this.extentOverlay_ = new VectorLayer({\n source: new VectorSource({\n useSpatialIndex: false,\n wrapX: !!opt_options.wrapX,\n }),\n style: opt_options.boxStyle\n ? opt_options.boxStyle\n : getDefaultExtentStyleFunction(),\n updateWhileAnimating: true,\n updateWhileInteracting: true,\n });\n\n /**\n * Layer for the vertexFeature\n * @type {VectorLayer}\n * @private\n */\n this.vertexOverlay_ = new VectorLayer({\n source: new VectorSource({\n useSpatialIndex: false,\n wrapX: !!opt_options.wrapX,\n }),\n style: opt_options.pointerStyle\n ? opt_options.pointerStyle\n : getDefaultPointerStyleFunction(),\n updateWhileAnimating: true,\n updateWhileInteracting: true,\n });\n\n if (opt_options.extent) {\n this.setExtent(opt_options.extent);\n }\n }\n\n /**\n * @param {import(\"../pixel.js\").Pixel} pixel cursor location\n * @param {import(\"../PluggableMap.js\").default} map map\n * @returns {import(\"../coordinate.js\").Coordinate|null} snapped vertex on extent\n * @private\n */\n snapToVertex_(pixel, map) {\n const pixelCoordinate = map.getCoordinateFromPixelInternal(pixel);\n const sortByDistance = function (a, b) {\n return (\n squaredDistanceToSegment(pixelCoordinate, a) -\n squaredDistanceToSegment(pixelCoordinate, b)\n );\n };\n const extent = this.getExtentInternal();\n if (extent) {\n //convert extents to line segments and find the segment closest to pixelCoordinate\n const segments = getSegments(extent);\n segments.sort(sortByDistance);\n const closestSegment = segments[0];\n\n let vertex = closestOnSegment(pixelCoordinate, closestSegment);\n const vertexPixel = map.getPixelFromCoordinateInternal(vertex);\n\n //if the distance is within tolerance, snap to the segment\n if (coordinateDistance(pixel, vertexPixel) <= this.pixelTolerance_) {\n //test if we should further snap to a vertex\n const pixel1 = map.getPixelFromCoordinateInternal(closestSegment[0]);\n const pixel2 = map.getPixelFromCoordinateInternal(closestSegment[1]);\n const squaredDist1 = squaredCoordinateDistance(vertexPixel, pixel1);\n const squaredDist2 = squaredCoordinateDistance(vertexPixel, pixel2);\n const dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n this.snappedToVertex_ = dist <= this.pixelTolerance_;\n if (this.snappedToVertex_) {\n vertex =\n squaredDist1 > squaredDist2 ? closestSegment[1] : closestSegment[0];\n }\n return vertex;\n }\n }\n return null;\n }\n\n /**\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent pointer move event\n * @private\n */\n handlePointerMove_(mapBrowserEvent) {\n const pixel = mapBrowserEvent.pixel;\n const map = mapBrowserEvent.map;\n\n let vertex = this.snapToVertex_(pixel, map);\n if (!vertex) {\n vertex = map.getCoordinateFromPixelInternal(pixel);\n }\n this.createOrUpdatePointerFeature_(vertex);\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent extent\n * @returns {Feature} extent as featrue\n * @private\n */\n createOrUpdateExtentFeature_(extent) {\n let extentFeature = this.extentFeature_;\n\n if (!extentFeature) {\n if (!extent) {\n extentFeature = new Feature({});\n } else {\n extentFeature = new Feature(polygonFromExtent(extent));\n }\n this.extentFeature_ = extentFeature;\n this.extentOverlay_.getSource().addFeature(extentFeature);\n } else {\n if (!extent) {\n extentFeature.setGeometry(undefined);\n } else {\n extentFeature.setGeometry(polygonFromExtent(extent));\n }\n }\n return extentFeature;\n }\n\n /**\n * @param {import(\"../coordinate.js\").Coordinate} vertex location of feature\n * @returns {Feature} vertex as feature\n * @private\n */\n createOrUpdatePointerFeature_(vertex) {\n let vertexFeature = this.vertexFeature_;\n if (!vertexFeature) {\n vertexFeature = new Feature(new Point(vertex));\n this.vertexFeature_ = vertexFeature;\n this.vertexOverlay_.getSource().addFeature(vertexFeature);\n } else {\n const geometry = vertexFeature.getGeometry();\n geometry.setCoordinates(vertex);\n }\n return vertexFeature;\n }\n\n /**\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n */\n handleEvent(mapBrowserEvent) {\n if (!mapBrowserEvent.originalEvent || !this.condition_(mapBrowserEvent)) {\n return true;\n }\n //display pointer (if not dragging)\n if (\n mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE &&\n !this.handlingDownUpSequence\n ) {\n this.handlePointerMove_(mapBrowserEvent);\n }\n //call pointer to determine up/down/drag\n super.handleEvent(mapBrowserEvent);\n //return false to stop propagation\n return false;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleDownEvent(mapBrowserEvent) {\n const pixel = mapBrowserEvent.pixel;\n const map = mapBrowserEvent.map;\n\n const extent = this.getExtentInternal();\n let vertex = this.snapToVertex_(pixel, map);\n\n //find the extent corner opposite the passed corner\n const getOpposingPoint = function (point) {\n let x_ = null;\n let y_ = null;\n if (point[0] == extent[0]) {\n x_ = extent[2];\n } else if (point[0] == extent[2]) {\n x_ = extent[0];\n }\n if (point[1] == extent[1]) {\n y_ = extent[3];\n } else if (point[1] == extent[3]) {\n y_ = extent[1];\n }\n if (x_ !== null && y_ !== null) {\n return [x_, y_];\n }\n return null;\n };\n if (vertex && extent) {\n const x =\n vertex[0] == extent[0] || vertex[0] == extent[2] ? vertex[0] : null;\n const y =\n vertex[1] == extent[1] || vertex[1] == extent[3] ? vertex[1] : null;\n\n //snap to point\n if (x !== null && y !== null) {\n this.pointerHandler_ = getPointHandler(getOpposingPoint(vertex));\n //snap to edge\n } else if (x !== null) {\n this.pointerHandler_ = getEdgeHandler(\n getOpposingPoint([x, extent[1]]),\n getOpposingPoint([x, extent[3]])\n );\n } else if (y !== null) {\n this.pointerHandler_ = getEdgeHandler(\n getOpposingPoint([extent[0], y]),\n getOpposingPoint([extent[2], y])\n );\n }\n //no snap - new bbox\n } else {\n vertex = map.getCoordinateFromPixelInternal(pixel);\n this.setExtent([vertex[0], vertex[1], vertex[0], vertex[1]]);\n this.pointerHandler_ = getPointHandler(vertex);\n }\n return true; //event handled; start downup sequence\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n if (this.pointerHandler_) {\n const pixelCoordinate = mapBrowserEvent.coordinate;\n this.setExtent(this.pointerHandler_(pixelCoordinate));\n this.createOrUpdatePointerFeature_(pixelCoordinate);\n }\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(mapBrowserEvent) {\n this.pointerHandler_ = null;\n //If bbox is zero area, set to null;\n const extent = this.getExtentInternal();\n if (!extent || getArea(extent) === 0) {\n this.setExtent(null);\n }\n return false; //Stop handling downup sequence\n }\n\n /**\n * Remove the interaction from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n */\n setMap(map) {\n this.extentOverlay_.setMap(map);\n this.vertexOverlay_.setMap(map);\n super.setMap(map);\n }\n\n /**\n * Returns the current drawn extent in the view projection (or user projection if set)\n *\n * @return {import(\"../extent.js\").Extent} Drawn extent in the view projection.\n * @api\n */\n getExtent() {\n return toUserExtent(\n this.getExtentInternal(),\n this.getMap().getView().getProjection()\n );\n }\n\n /**\n * Returns the current drawn extent in the view projection\n *\n * @return {import(\"../extent.js\").Extent} Drawn extent in the view projection.\n * @api\n */\n getExtentInternal() {\n return this.extent_;\n }\n\n /**\n * Manually sets the drawn extent, using the view projection.\n *\n * @param {import(\"../extent.js\").Extent} extent Extent\n * @api\n */\n setExtent(extent) {\n //Null extent means no bbox\n this.extent_ = extent ? extent : null;\n this.createOrUpdateExtentFeature_(extent);\n this.dispatchEvent(new ExtentEvent(this.extent_));\n }\n}\n\n/**\n * Returns the default style for the drawn bbox\n *\n * @return {import(\"../style/Style.js\").StyleFunction} Default Extent style\n */\nfunction getDefaultExtentStyleFunction() {\n const style = createEditingStyle();\n return function (feature, resolution) {\n return style[GeometryType.POLYGON];\n };\n}\n\n/**\n * Returns the default style for the pointer\n *\n * @return {import(\"../style/Style.js\").StyleFunction} Default pointer style\n */\nfunction getDefaultPointerStyleFunction() {\n const style = createEditingStyle();\n return function (feature, resolution) {\n return style[GeometryType.POINT];\n };\n}\n\n/**\n * @param {import(\"../coordinate.js\").Coordinate} fixedPoint corner that will be unchanged in the new extent\n * @returns {function (import(\"../coordinate.js\").Coordinate): import(\"../extent.js\").Extent} event handler\n */\nfunction getPointHandler(fixedPoint) {\n return function (point) {\n return boundingExtent([fixedPoint, point]);\n };\n}\n\n/**\n * @param {import(\"../coordinate.js\").Coordinate} fixedP1 first corner that will be unchanged in the new extent\n * @param {import(\"../coordinate.js\").Coordinate} fixedP2 second corner that will be unchanged in the new extent\n * @returns {function (import(\"../coordinate.js\").Coordinate): import(\"../extent.js\").Extent|null} event handler\n */\nfunction getEdgeHandler(fixedP1, fixedP2) {\n if (fixedP1[0] == fixedP2[0]) {\n return function (point) {\n return boundingExtent([fixedP1, [point[0], fixedP2[1]]]);\n };\n } else if (fixedP1[1] == fixedP2[1]) {\n return function (point) {\n return boundingExtent([fixedP1, [fixedP2[0], point[1]]]);\n };\n } else {\n return null;\n }\n}\n\n/**\n * @param {import(\"../extent.js\").Extent} extent extent\n * @returns {Array<Array<import(\"../coordinate.js\").Coordinate>>} extent line segments\n */\nfunction getSegments(extent) {\n return [\n [\n [extent[0], extent[1]],\n [extent[0], extent[3]],\n ],\n [\n [extent[0], extent[3]],\n [extent[2], extent[3]],\n ],\n [\n [extent[2], extent[3]],\n [extent[2], extent[1]],\n ],\n [\n [extent[2], extent[1]],\n [extent[0], extent[1]],\n ],\n ];\n}\n\nexport default Extent;\n","/**\n * @module ol/interaction/Modify\n */\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport Feature from '../Feature.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport Point from '../geom/Point.js';\nimport PointerInteraction from './Pointer.js';\nimport RBush from '../structs/RBush.js';\nimport VectorEventType from '../source/VectorEventType.js';\nimport VectorLayer from '../layer/Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport {\n altKeyOnly,\n always,\n primaryAction,\n singleClick,\n} from '../events/condition.js';\nimport {\n boundingExtent,\n buffer as bufferExtent,\n createOrUpdateFromCoordinate as createExtent,\n} from '../extent.js';\nimport {\n closestOnSegment,\n distance as coordinateDistance,\n equals as coordinatesEqual,\n squaredDistance as squaredCoordinateDistance,\n squaredDistanceToSegment,\n} from '../coordinate.js';\nimport {createEditingStyle} from '../style/Style.js';\nimport {equals} from '../array.js';\nimport {fromCircle} from '../geom/Polygon.js';\nimport {\n fromUserCoordinate,\n fromUserExtent,\n getUserProjection,\n toUserCoordinate,\n toUserExtent,\n} from '../proj.js';\nimport {getUid} from '../util.js';\n\n/**\n * The segment index assigned to a circle's center when\n * breaking up a circle into ModifySegmentDataType segments.\n * @type {number}\n */\nconst CIRCLE_CENTER_INDEX = 0;\n\n/**\n * The segment index assigned to a circle's circumference when\n * breaking up a circle into ModifySegmentDataType segments.\n * @type {number}\n */\nconst CIRCLE_CIRCUMFERENCE_INDEX = 1;\n\nconst tempExtent = [0, 0, 0, 0];\nconst tempSegment = [];\n\n/**\n * @enum {string}\n */\nconst ModifyEventType = {\n /**\n * Triggered upon feature modification start\n * @event ModifyEvent#modifystart\n * @api\n */\n MODIFYSTART: 'modifystart',\n /**\n * Triggered upon feature modification end\n * @event ModifyEvent#modifyend\n * @api\n */\n MODIFYEND: 'modifyend',\n};\n\n/**\n * @typedef {Object} SegmentData\n * @property {Array<number>} [depth]\n * @property {Feature} feature\n * @property {import(\"../geom/SimpleGeometry.js\").default} geometry\n * @property {number} [index]\n * @property {Array<import(\"../extent.js\").Extent>} segment\n * @property {Array<SegmentData>} [featureSegments]\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event will be considered to add or move a\n * vertex to the sketch. Default is\n * {@link module:ol/events/condition~primaryAction}.\n * @property {import(\"../events/condition.js\").Condition} [deleteCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. By default,\n * {@link module:ol/events/condition~singleClick} with\n * {@link module:ol/events/condition~altKeyOnly} results in a vertex deletion.\n * @property {import(\"../events/condition.js\").Condition} [insertVertexCondition] A\n * function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and\n * returns a boolean to indicate whether a new vertex should be added to the sketch\n * features. Default is {@link module:ol/events/condition~always}.\n * @property {number} [pixelTolerance=10] Pixel tolerance for considering the\n * pointer close enough to a segment or vertex for editing.\n * @property {import(\"../style/Style.js\").StyleLike} [style]\n * Style used for the modification point or vertex. For linestrings and polygons, this will\n * be the affected vertex, for circles a point along the circle, and for points the actual\n * point. If not configured, the default edit style is used (see {@link module:ol/style}).\n * When using a style function, the point feature passed to the function will have a `features`\n * property - an array whose entries are the features that are being modified, and a `geometries`\n * property - an array whose entries are the geometries that are being modified. Both arrays are\n * in the same order. The `geometries` are only useful when modifying geometry collections, where\n * the geometry will be the particular geometry from the collection that is being modified.\n * @property {VectorSource} [source] The vector source with\n * features to modify. If a vector source is not provided, a feature collection\n * must be provided with the `features` option.\n * @property {boolean|import(\"../layer/BaseVector\").default} [hitDetection] When configured, point\n * features will be considered for modification based on their visual appearance, instead of being within\n * the `pixelTolerance` from the pointer location. When a {@link module:ol/layer/BaseVector} is\n * provided, only the rendered representation of the features on that layer will be considered.\n * @property {Collection<Feature>} [features]\n * The features the interaction works on. If a feature collection is not\n * provided, a vector source must be provided with the `source` option.\n * @property {boolean} [wrapX=false] Wrap the world horizontally on the sketch\n * overlay.\n */\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Modify~Modify} instances are\n * instances of this type.\n */\nexport class ModifyEvent extends Event {\n /**\n * @param {ModifyEventType} type Type.\n * @param {Collection<Feature>} features\n * The features modified.\n * @param {import(\"../MapBrowserEvent.js\").default} MapBrowserEvent\n * Associated {@link module:ol/MapBrowserEvent}.\n */\n constructor(type, features, MapBrowserEvent) {\n super(type);\n\n /**\n * The features being modified.\n * @type {Collection<Feature>}\n * @api\n */\n this.features = features;\n\n /**\n * Associated {@link module:ol/MapBrowserEvent}.\n * @type {import(\"../MapBrowserEvent.js\").default}\n * @api\n */\n this.mapBrowserEvent = MapBrowserEvent;\n }\n}\n\n/**\n * @classdesc\n * Interaction for modifying feature geometries. To modify features that have\n * been added to an existing source, construct the modify interaction with the\n * `source` option. If you want to modify features in a collection (for example,\n * the collection used by a select interaction), construct the interaction with\n * the `features` option. The interaction must be constructed with either a\n * `source` or `features` option.\n *\n * Cartesian distance from the pointer is used to determine the features that\n * will be modified. This means that geometries will only be considered for\n * modification when they are within the configured `pixelTolerane`. For point\n * geometries, the `hitDetection` option can be used to match their visual\n * appearance.\n *\n * By default, the interaction will allow deletion of vertices when the `alt`\n * key is pressed. To configure the interaction with a different condition\n * for deletion, use the `deleteCondition` option.\n * @fires ModifyEvent\n * @api\n */\nclass Modify extends PointerInteraction {\n /**\n * @param {Options} options Options.\n */\n constructor(options) {\n super(/** @type {import(\"./Pointer.js\").Options} */ (options));\n\n /** @private */\n this.boundHandleFeatureChange_ = this.handleFeatureChange_.bind(this);\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : primaryAction;\n\n /**\n * @private\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Browser event.\n * @return {boolean} Combined condition result.\n */\n this.defaultDeleteCondition_ = function (mapBrowserEvent) {\n return altKeyOnly(mapBrowserEvent) && singleClick(mapBrowserEvent);\n };\n\n /**\n * @type {import(\"../events/condition.js\").Condition}\n * @private\n */\n this.deleteCondition_ = options.deleteCondition\n ? options.deleteCondition\n : this.defaultDeleteCondition_;\n\n /**\n * @type {import(\"../events/condition.js\").Condition}\n * @private\n */\n this.insertVertexCondition_ = options.insertVertexCondition\n ? options.insertVertexCondition\n : always;\n\n /**\n * Editing vertex.\n * @type {Feature}\n * @private\n */\n this.vertexFeature_ = null;\n\n /**\n * Segments intersecting {@link this.vertexFeature_} by segment uid.\n * @type {Object<string, boolean>}\n * @private\n */\n this.vertexSegments_ = null;\n\n /**\n * @type {import(\"../pixel.js\").Pixel}\n * @private\n */\n this.lastPixel_ = [0, 0];\n\n /**\n * Tracks if the next `singleclick` event should be ignored to prevent\n * accidental deletion right after vertex creation.\n * @type {boolean}\n * @private\n */\n this.ignoreNextSingleClick_ = false;\n\n /**\n * @type {Collection<Feature>}\n * @private\n */\n this.featuresBeingModified_ = null;\n\n /**\n * Segment RTree for each layer\n * @type {RBush<SegmentData>}\n * @private\n */\n this.rBush_ = new RBush();\n\n /**\n * @type {number}\n * @private\n */\n this.pixelTolerance_ =\n options.pixelTolerance !== undefined ? options.pixelTolerance : 10;\n\n /**\n * @type {boolean}\n * @private\n */\n this.snappedToVertex_ = false;\n\n /**\n * Indicate whether the interaction is currently changing a feature's\n * coordinates.\n * @type {boolean}\n * @private\n */\n this.changingFeature_ = false;\n\n /**\n * @type {Array}\n * @private\n */\n this.dragSegments_ = [];\n\n /**\n * Draw overlay where sketch features are drawn.\n * @type {VectorLayer}\n * @private\n */\n this.overlay_ = new VectorLayer({\n source: new VectorSource({\n useSpatialIndex: false,\n wrapX: !!options.wrapX,\n }),\n style: options.style ? options.style : getDefaultStyleFunction(),\n updateWhileAnimating: true,\n updateWhileInteracting: true,\n });\n\n /**\n * @const\n * @private\n * @type {!Object<string, function(Feature, import(\"../geom/Geometry.js\").default): void>}\n */\n this.SEGMENT_WRITERS_ = {\n 'Point': this.writePointGeometry_.bind(this),\n 'LineString': this.writeLineStringGeometry_.bind(this),\n 'LinearRing': this.writeLineStringGeometry_.bind(this),\n 'Polygon': this.writePolygonGeometry_.bind(this),\n 'MultiPoint': this.writeMultiPointGeometry_.bind(this),\n 'MultiLineString': this.writeMultiLineStringGeometry_.bind(this),\n 'MultiPolygon': this.writeMultiPolygonGeometry_.bind(this),\n 'Circle': this.writeCircleGeometry_.bind(this),\n 'GeometryCollection': this.writeGeometryCollectionGeometry_.bind(this),\n };\n\n /**\n * @type {VectorSource}\n * @private\n */\n this.source_ = null;\n\n /**\n * @type {boolean|import(\"../layer/BaseVector\").default}\n */\n this.hitDetection_ = null;\n\n let features;\n if (options.features) {\n features = options.features;\n } else if (options.source) {\n this.source_ = options.source;\n features = new Collection(this.source_.getFeatures());\n this.source_.addEventListener(\n VectorEventType.ADDFEATURE,\n this.handleSourceAdd_.bind(this)\n );\n this.source_.addEventListener(\n VectorEventType.REMOVEFEATURE,\n this.handleSourceRemove_.bind(this)\n );\n }\n if (!features) {\n throw new Error(\n 'The modify interaction requires features, a source or a layer'\n );\n }\n if (options.hitDetection) {\n this.hitDetection_ = options.hitDetection;\n }\n\n /**\n * @type {Collection<import(\"../Feature.js\").FeatureLike>}\n * @private\n */\n this.features_ = features;\n\n this.features_.forEach(this.addFeature_.bind(this));\n this.features_.addEventListener(\n CollectionEventType.ADD,\n this.handleFeatureAdd_.bind(this)\n );\n this.features_.addEventListener(\n CollectionEventType.REMOVE,\n this.handleFeatureRemove_.bind(this)\n );\n\n /**\n * @type {import(\"../MapBrowserEvent.js\").default}\n * @private\n */\n this.lastPointerEvent_ = null;\n\n /**\n * Delta (x, y in map units) between matched rtree vertex and pointer vertex.\n * @type {Array<number>}\n */\n this.delta_ = [0, 0];\n }\n\n /**\n * @param {Feature} feature Feature.\n * @private\n */\n addFeature_(feature) {\n const geometry = feature.getGeometry();\n if (geometry) {\n const writer = this.SEGMENT_WRITERS_[geometry.getType()];\n if (writer) {\n writer(feature, geometry);\n }\n }\n const map = this.getMap();\n if (map && map.isRendered() && this.getActive()) {\n this.handlePointerAtPixel_(this.lastPixel_, map);\n }\n feature.addEventListener(EventType.CHANGE, this.boundHandleFeatureChange_);\n }\n\n /**\n * @param {import(\"../MapBrowserEvent.js\").default} evt Map browser event.\n * @param {Array<Array<SegmentData>>} segments The segments subject to modification.\n * @private\n */\n willModifyFeatures_(evt, segments) {\n if (!this.featuresBeingModified_) {\n this.featuresBeingModified_ = new Collection();\n const features = this.featuresBeingModified_.getArray();\n for (let i = 0, ii = segments.length; i < ii; ++i) {\n const feature = segments[i][0].feature;\n if (features.indexOf(feature) === -1) {\n this.featuresBeingModified_.push(feature);\n }\n }\n\n this.dispatchEvent(\n new ModifyEvent(\n ModifyEventType.MODIFYSTART,\n this.featuresBeingModified_,\n evt\n )\n );\n }\n }\n\n /**\n * @param {Feature} feature Feature.\n * @private\n */\n removeFeature_(feature) {\n this.removeFeatureSegmentData_(feature);\n // Remove the vertex feature if the collection of canditate features is empty.\n if (this.vertexFeature_ && this.features_.getLength() === 0) {\n this.overlay_.getSource().removeFeature(this.vertexFeature_);\n this.vertexFeature_ = null;\n }\n feature.removeEventListener(\n EventType.CHANGE,\n this.boundHandleFeatureChange_\n );\n }\n\n /**\n * @param {Feature} feature Feature.\n * @private\n */\n removeFeatureSegmentData_(feature) {\n const rBush = this.rBush_;\n /** @type {Array<SegmentData>} */\n const nodesToRemove = [];\n rBush.forEach(\n /**\n * @param {SegmentData} node RTree node.\n */\n function (node) {\n if (feature === node.feature) {\n nodesToRemove.push(node);\n }\n }\n );\n for (let i = nodesToRemove.length - 1; i >= 0; --i) {\n const nodeToRemove = nodesToRemove[i];\n for (let j = this.dragSegments_.length - 1; j >= 0; --j) {\n if (this.dragSegments_[j][0] === nodeToRemove) {\n this.dragSegments_.splice(j, 1);\n }\n }\n rBush.remove(nodeToRemove);\n }\n }\n\n /**\n * Activate or deactivate the interaction.\n * @param {boolean} active Active.\n * @observable\n * @api\n */\n setActive(active) {\n if (this.vertexFeature_ && !active) {\n this.overlay_.getSource().removeFeature(this.vertexFeature_);\n this.vertexFeature_ = null;\n }\n super.setActive(active);\n }\n\n /**\n * Remove the interaction from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n */\n setMap(map) {\n this.overlay_.setMap(map);\n super.setMap(map);\n }\n\n /**\n * Get the overlay layer that this interaction renders the modification point or vertex to.\n * @return {VectorLayer} Overlay layer.\n * @api\n */\n getOverlay() {\n return this.overlay_;\n }\n\n /**\n * @param {import(\"../source/Vector.js\").VectorSourceEvent} event Event.\n * @private\n */\n handleSourceAdd_(event) {\n if (event.feature) {\n this.features_.push(event.feature);\n }\n }\n\n /**\n * @param {import(\"../source/Vector.js\").VectorSourceEvent} event Event.\n * @private\n */\n handleSourceRemove_(event) {\n if (event.feature) {\n this.features_.remove(event.feature);\n }\n }\n\n /**\n * @param {import(\"../Collection.js\").CollectionEvent} evt Event.\n * @private\n */\n handleFeatureAdd_(evt) {\n this.addFeature_(/** @type {Feature} */ (evt.element));\n }\n\n /**\n * @param {import(\"../events/Event.js\").default} evt Event.\n * @private\n */\n handleFeatureChange_(evt) {\n if (!this.changingFeature_) {\n const feature = /** @type {Feature} */ (evt.target);\n this.removeFeature_(feature);\n this.addFeature_(feature);\n }\n }\n\n /**\n * @param {import(\"../Collection.js\").CollectionEvent} evt Event.\n * @private\n */\n handleFeatureRemove_(evt) {\n const feature = /** @type {Feature} */ (evt.element);\n this.removeFeature_(feature);\n }\n\n /**\n * @param {Feature} feature Feature\n * @param {Point} geometry Geometry.\n * @private\n */\n writePointGeometry_(feature, geometry) {\n const coordinates = geometry.getCoordinates();\n\n /** @type {SegmentData} */\n const segmentData = {\n feature: feature,\n geometry: geometry,\n segment: [coordinates, coordinates],\n };\n\n this.rBush_.insert(geometry.getExtent(), segmentData);\n }\n\n /**\n * @param {Feature} feature Feature\n * @param {import(\"../geom/MultiPoint.js\").default} geometry Geometry.\n * @private\n */\n writeMultiPointGeometry_(feature, geometry) {\n const points = geometry.getCoordinates();\n for (let i = 0, ii = points.length; i < ii; ++i) {\n const coordinates = points[i];\n\n /** @type {SegmentData} */\n const segmentData = {\n feature: feature,\n geometry: geometry,\n depth: [i],\n index: i,\n segment: [coordinates, coordinates],\n };\n\n this.rBush_.insert(geometry.getExtent(), segmentData);\n }\n }\n\n /**\n * @param {Feature} feature Feature\n * @param {import(\"../geom/LineString.js\").default} geometry Geometry.\n * @private\n */\n writeLineStringGeometry_(feature, geometry) {\n const coordinates = geometry.getCoordinates();\n for (let i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n const segment = coordinates.slice(i, i + 2);\n\n /** @type {SegmentData} */\n const segmentData = {\n feature: feature,\n geometry: geometry,\n index: i,\n segment: segment,\n };\n\n this.rBush_.insert(boundingExtent(segment), segmentData);\n }\n }\n\n /**\n * @param {Feature} feature Feature\n * @param {import(\"../geom/MultiLineString.js\").default} geometry Geometry.\n * @private\n */\n writeMultiLineStringGeometry_(feature, geometry) {\n const lines = geometry.getCoordinates();\n for (let j = 0, jj = lines.length; j < jj; ++j) {\n const coordinates = lines[j];\n for (let i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n const segment = coordinates.slice(i, i + 2);\n\n /** @type {SegmentData} */\n const segmentData = {\n feature: feature,\n geometry: geometry,\n depth: [j],\n index: i,\n segment: segment,\n };\n\n this.rBush_.insert(boundingExtent(segment), segmentData);\n }\n }\n }\n\n /**\n * @param {Feature} feature Feature\n * @param {import(\"../geom/Polygon.js\").default} geometry Geometry.\n * @private\n */\n writePolygonGeometry_(feature, geometry) {\n const rings = geometry.getCoordinates();\n for (let j = 0, jj = rings.length; j < jj; ++j) {\n const coordinates = rings[j];\n for (let i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n const segment = coordinates.slice(i, i + 2);\n\n /** @type {SegmentData} */\n const segmentData = {\n feature: feature,\n geometry: geometry,\n depth: [j],\n index: i,\n segment: segment,\n };\n\n this.rBush_.insert(boundingExtent(segment), segmentData);\n }\n }\n }\n\n /**\n * @param {Feature} feature Feature\n * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n * @private\n */\n writeMultiPolygonGeometry_(feature, geometry) {\n const polygons = geometry.getCoordinates();\n for (let k = 0, kk = polygons.length; k < kk; ++k) {\n const rings = polygons[k];\n for (let j = 0, jj = rings.length; j < jj; ++j) {\n const coordinates = rings[j];\n for (let i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n const segment = coordinates.slice(i, i + 2);\n\n /** @type {SegmentData} */\n const segmentData = {\n feature: feature,\n geometry: geometry,\n depth: [j, k],\n index: i,\n segment: segment,\n };\n\n this.rBush_.insert(boundingExtent(segment), segmentData);\n }\n }\n }\n }\n\n /**\n * We convert a circle into two segments. The segment at index\n * {@link CIRCLE_CENTER_INDEX} is the\n * circle's center (a point). The segment at index\n * {@link CIRCLE_CIRCUMFERENCE_INDEX} is\n * the circumference, and is not a line segment.\n *\n * @param {Feature} feature Feature.\n * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n * @private\n */\n writeCircleGeometry_(feature, geometry) {\n const coordinates = geometry.getCenter();\n\n /** @type {SegmentData} */\n const centerSegmentData = {\n feature: feature,\n geometry: geometry,\n index: CIRCLE_CENTER_INDEX,\n segment: [coordinates, coordinates],\n };\n\n /** @type {SegmentData} */\n const circumferenceSegmentData = {\n feature: feature,\n geometry: geometry,\n index: CIRCLE_CIRCUMFERENCE_INDEX,\n segment: [coordinates, coordinates],\n };\n\n const featureSegments = [centerSegmentData, circumferenceSegmentData];\n centerSegmentData.featureSegments = featureSegments;\n circumferenceSegmentData.featureSegments = featureSegments;\n this.rBush_.insert(createExtent(coordinates), centerSegmentData);\n let circleGeometry = /** @type {import(\"../geom/Geometry.js\").default} */ (geometry);\n const userProjection = getUserProjection();\n if (userProjection && this.getMap()) {\n const projection = this.getMap().getView().getProjection();\n circleGeometry = circleGeometry\n .clone()\n .transform(userProjection, projection);\n circleGeometry = fromCircle(\n /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry)\n ).transform(projection, userProjection);\n }\n this.rBush_.insert(circleGeometry.getExtent(), circumferenceSegmentData);\n }\n\n /**\n * @param {Feature} feature Feature\n * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n * @private\n */\n writeGeometryCollectionGeometry_(feature, geometry) {\n const geometries = geometry.getGeometriesArray();\n for (let i = 0; i < geometries.length; ++i) {\n const geometry = geometries[i];\n const writer = this.SEGMENT_WRITERS_[geometry.getType()];\n writer(feature, geometry);\n }\n }\n\n /**\n * @param {import(\"../coordinate.js\").Coordinate} coordinates Coordinates.\n * @param {Array<Feature>} features The features being modified.\n * @param {Array<import(\"../geom/SimpleGeometry.js\").default>} geometries The geometries being modified.\n * @return {Feature} Vertex feature.\n * @private\n */\n createOrUpdateVertexFeature_(coordinates, features, geometries) {\n let vertexFeature = this.vertexFeature_;\n if (!vertexFeature) {\n vertexFeature = new Feature(new Point(coordinates));\n this.vertexFeature_ = vertexFeature;\n this.overlay_.getSource().addFeature(vertexFeature);\n } else {\n const geometry = vertexFeature.getGeometry();\n geometry.setCoordinates(coordinates);\n }\n vertexFeature.set('features', features);\n vertexFeature.set('geometries', geometries);\n return vertexFeature;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent map browser event} and may modify the geometry.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n */\n handleEvent(mapBrowserEvent) {\n if (!mapBrowserEvent.originalEvent) {\n return true;\n }\n this.lastPointerEvent_ = mapBrowserEvent;\n\n let handled;\n if (\n !mapBrowserEvent.map.getView().getInteracting() &&\n mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE &&\n !this.handlingDownUpSequence\n ) {\n this.handlePointerMove_(mapBrowserEvent);\n }\n if (this.vertexFeature_ && this.deleteCondition_(mapBrowserEvent)) {\n if (\n mapBrowserEvent.type != MapBrowserEventType.SINGLECLICK ||\n !this.ignoreNextSingleClick_\n ) {\n handled = this.removePoint();\n } else {\n handled = true;\n }\n }\n\n if (mapBrowserEvent.type == MapBrowserEventType.SINGLECLICK) {\n this.ignoreNextSingleClick_ = false;\n }\n\n return super.handleEvent(mapBrowserEvent) && !handled;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n */\n handleDragEvent(evt) {\n this.ignoreNextSingleClick_ = false;\n this.willModifyFeatures_(evt, this.dragSegments_);\n\n const vertex = [\n evt.coordinate[0] + this.delta_[0],\n evt.coordinate[1] + this.delta_[1],\n ];\n const features = [];\n const geometries = [];\n for (let i = 0, ii = this.dragSegments_.length; i < ii; ++i) {\n const dragSegment = this.dragSegments_[i];\n const segmentData = dragSegment[0];\n const feature = segmentData.feature;\n if (features.indexOf(feature) === -1) {\n features.push(feature);\n }\n const geometry = segmentData.geometry;\n if (geometries.indexOf(geometry) === -1) {\n geometries.push(geometry);\n }\n const depth = segmentData.depth;\n let coordinates;\n const segment = segmentData.segment;\n const index = dragSegment[1];\n\n while (vertex.length < geometry.getStride()) {\n vertex.push(segment[index][vertex.length]);\n }\n\n switch (geometry.getType()) {\n case GeometryType.POINT:\n coordinates = vertex;\n segment[0] = vertex;\n segment[1] = vertex;\n break;\n case GeometryType.MULTI_POINT:\n coordinates = geometry.getCoordinates();\n coordinates[segmentData.index] = vertex;\n segment[0] = vertex;\n segment[1] = vertex;\n break;\n case GeometryType.LINE_STRING:\n coordinates = geometry.getCoordinates();\n coordinates[segmentData.index + index] = vertex;\n segment[index] = vertex;\n break;\n case GeometryType.MULTI_LINE_STRING:\n coordinates = geometry.getCoordinates();\n coordinates[depth[0]][segmentData.index + index] = vertex;\n segment[index] = vertex;\n break;\n case GeometryType.POLYGON:\n coordinates = geometry.getCoordinates();\n coordinates[depth[0]][segmentData.index + index] = vertex;\n segment[index] = vertex;\n break;\n case GeometryType.MULTI_POLYGON:\n coordinates = geometry.getCoordinates();\n coordinates[depth[1]][depth[0]][segmentData.index + index] = vertex;\n segment[index] = vertex;\n break;\n case GeometryType.CIRCLE:\n segment[0] = vertex;\n segment[1] = vertex;\n if (segmentData.index === CIRCLE_CENTER_INDEX) {\n this.changingFeature_ = true;\n geometry.setCenter(vertex);\n this.changingFeature_ = false;\n } else {\n // We're dragging the circle's circumference:\n this.changingFeature_ = true;\n const projection = evt.map.getView().getProjection();\n let radius = coordinateDistance(\n fromUserCoordinate(geometry.getCenter(), projection),\n fromUserCoordinate(vertex, projection)\n );\n const userProjection = getUserProjection();\n if (userProjection) {\n const circleGeometry = geometry\n .clone()\n .transform(userProjection, projection);\n circleGeometry.setRadius(radius);\n radius = circleGeometry\n .transform(projection, userProjection)\n .getRadius();\n }\n geometry.setRadius(radius);\n this.changingFeature_ = false;\n }\n break;\n default:\n // pass\n }\n\n if (coordinates) {\n this.setGeometryCoordinates_(geometry, coordinates);\n }\n }\n this.createOrUpdateVertexFeature_(vertex, features, geometries);\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n * @return {boolean} If the event was consumed.\n */\n handleDownEvent(evt) {\n if (!this.condition_(evt)) {\n return false;\n }\n const pixelCoordinate = evt.coordinate;\n this.handlePointerAtPixel_(evt.pixel, evt.map, pixelCoordinate);\n this.dragSegments_.length = 0;\n this.featuresBeingModified_ = null;\n const vertexFeature = this.vertexFeature_;\n if (vertexFeature) {\n const projection = evt.map.getView().getProjection();\n const insertVertices = [];\n const vertex = vertexFeature.getGeometry().getCoordinates();\n const vertexExtent = boundingExtent([vertex]);\n const segmentDataMatches = this.rBush_.getInExtent(vertexExtent);\n const componentSegments = {};\n segmentDataMatches.sort(compareIndexes);\n for (let i = 0, ii = segmentDataMatches.length; i < ii; ++i) {\n const segmentDataMatch = segmentDataMatches[i];\n const segment = segmentDataMatch.segment;\n let uid = getUid(segmentDataMatch.geometry);\n const depth = segmentDataMatch.depth;\n if (depth) {\n uid += '-' + depth.join('-'); // separate feature components\n }\n if (!componentSegments[uid]) {\n componentSegments[uid] = new Array(2);\n }\n\n if (\n segmentDataMatch.geometry.getType() === GeometryType.CIRCLE &&\n segmentDataMatch.index === CIRCLE_CIRCUMFERENCE_INDEX\n ) {\n const closestVertex = closestOnSegmentData(\n pixelCoordinate,\n segmentDataMatch,\n projection\n );\n if (\n coordinatesEqual(closestVertex, vertex) &&\n !componentSegments[uid][0]\n ) {\n this.dragSegments_.push([segmentDataMatch, 0]);\n componentSegments[uid][0] = segmentDataMatch;\n }\n continue;\n }\n\n if (\n coordinatesEqual(segment[0], vertex) &&\n !componentSegments[uid][0]\n ) {\n this.dragSegments_.push([segmentDataMatch, 0]);\n componentSegments[uid][0] = segmentDataMatch;\n continue;\n }\n\n if (\n coordinatesEqual(segment[1], vertex) &&\n !componentSegments[uid][1]\n ) {\n // prevent dragging closed linestrings by the connecting node\n if (\n (segmentDataMatch.geometry.getType() === GeometryType.LINE_STRING ||\n segmentDataMatch.geometry.getType() ===\n GeometryType.MULTI_LINE_STRING) &&\n componentSegments[uid][0] &&\n componentSegments[uid][0].index === 0\n ) {\n continue;\n }\n\n this.dragSegments_.push([segmentDataMatch, 1]);\n componentSegments[uid][1] = segmentDataMatch;\n continue;\n }\n\n if (\n getUid(segment) in this.vertexSegments_ &&\n !componentSegments[uid][0] &&\n !componentSegments[uid][1] &&\n this.insertVertexCondition_(evt)\n ) {\n insertVertices.push(segmentDataMatch);\n }\n }\n\n if (insertVertices.length) {\n this.willModifyFeatures_(evt, [insertVertices]);\n }\n\n for (let j = insertVertices.length - 1; j >= 0; --j) {\n this.insertVertex_(insertVertices[j], vertex);\n }\n }\n return !!this.vertexFeature_;\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(evt) {\n for (let i = this.dragSegments_.length - 1; i >= 0; --i) {\n const segmentData = this.dragSegments_[i][0];\n const geometry = segmentData.geometry;\n if (geometry.getType() === GeometryType.CIRCLE) {\n // Update a circle object in the R* bush:\n const coordinates = geometry.getCenter();\n const centerSegmentData = segmentData.featureSegments[0];\n const circumferenceSegmentData = segmentData.featureSegments[1];\n centerSegmentData.segment[0] = coordinates;\n centerSegmentData.segment[1] = coordinates;\n circumferenceSegmentData.segment[0] = coordinates;\n circumferenceSegmentData.segment[1] = coordinates;\n this.rBush_.update(createExtent(coordinates), centerSegmentData);\n let circleGeometry = geometry;\n const userProjection = getUserProjection();\n if (userProjection) {\n const projection = evt.map.getView().getProjection();\n circleGeometry = circleGeometry\n .clone()\n .transform(userProjection, projection);\n circleGeometry = fromCircle(circleGeometry).transform(\n projection,\n userProjection\n );\n }\n this.rBush_.update(\n circleGeometry.getExtent(),\n circumferenceSegmentData\n );\n } else {\n this.rBush_.update(boundingExtent(segmentData.segment), segmentData);\n }\n }\n if (this.featuresBeingModified_) {\n this.dispatchEvent(\n new ModifyEvent(\n ModifyEventType.MODIFYEND,\n this.featuresBeingModified_,\n evt\n )\n );\n this.featuresBeingModified_ = null;\n }\n return false;\n }\n\n /**\n * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n * @private\n */\n handlePointerMove_(evt) {\n this.lastPixel_ = evt.pixel;\n this.handlePointerAtPixel_(evt.pixel, evt.map, evt.coordinate);\n }\n\n /**\n * @param {import(\"../pixel.js\").Pixel} pixel Pixel\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @param {import(\"../coordinate.js\").Coordinate=} opt_coordinate The pixel Coordinate.\n * @private\n */\n handlePointerAtPixel_(pixel, map, opt_coordinate) {\n const pixelCoordinate = opt_coordinate || map.getCoordinateFromPixel(pixel);\n const projection = map.getView().getProjection();\n const sortByDistance = function (a, b) {\n return (\n projectedDistanceToSegmentDataSquared(pixelCoordinate, a, projection) -\n projectedDistanceToSegmentDataSquared(pixelCoordinate, b, projection)\n );\n };\n\n let nodes, hitPointGeometry;\n if (this.hitDetection_) {\n const layerFilter =\n typeof this.hitDetection_ === 'object'\n ? (layer) => layer === this.hitDetection_\n : undefined;\n map.forEachFeatureAtPixel(\n pixel,\n (feature, layer, geometry) => {\n geometry = geometry || feature.getGeometry();\n if (geometry.getType() === GeometryType.POINT) {\n hitPointGeometry = geometry;\n const coordinate = geometry.getCoordinates();\n nodes = [\n {\n feature,\n geometry,\n segment: [coordinate, coordinate],\n },\n ];\n }\n return true;\n },\n {layerFilter}\n );\n }\n if (!nodes) {\n const viewExtent = fromUserExtent(\n createExtent(pixelCoordinate, tempExtent),\n projection\n );\n const buffer = map.getView().getResolution() * this.pixelTolerance_;\n const box = toUserExtent(\n bufferExtent(viewExtent, buffer, tempExtent),\n projection\n );\n nodes = this.rBush_.getInExtent(box);\n }\n\n if (nodes && nodes.length > 0) {\n const node = nodes.sort(sortByDistance)[0];\n const closestSegment = node.segment;\n let vertex = closestOnSegmentData(pixelCoordinate, node, projection);\n const vertexPixel = map.getPixelFromCoordinate(vertex);\n let dist = coordinateDistance(pixel, vertexPixel);\n if (hitPointGeometry || dist <= this.pixelTolerance_) {\n /** @type {Object<string, boolean>} */\n const vertexSegments = {};\n vertexSegments[getUid(closestSegment)] = true;\n\n this.delta_[0] = vertex[0] - pixelCoordinate[0];\n this.delta_[1] = vertex[1] - pixelCoordinate[1];\n if (\n node.geometry.getType() === GeometryType.CIRCLE &&\n node.index === CIRCLE_CIRCUMFERENCE_INDEX\n ) {\n this.snappedToVertex_ = true;\n this.createOrUpdateVertexFeature_(\n vertex,\n [node.feature],\n [node.geometry]\n );\n } else {\n const pixel1 = map.getPixelFromCoordinate(closestSegment[0]);\n const pixel2 = map.getPixelFromCoordinate(closestSegment[1]);\n const squaredDist1 = squaredCoordinateDistance(vertexPixel, pixel1);\n const squaredDist2 = squaredCoordinateDistance(vertexPixel, pixel2);\n dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n this.snappedToVertex_ = dist <= this.pixelTolerance_;\n if (this.snappedToVertex_) {\n vertex =\n squaredDist1 > squaredDist2\n ? closestSegment[1]\n : closestSegment[0];\n }\n this.createOrUpdateVertexFeature_(\n vertex,\n [node.feature],\n [node.geometry]\n );\n const geometries = {};\n geometries[getUid(node.geometry)] = true;\n for (let i = 1, ii = nodes.length; i < ii; ++i) {\n const segment = nodes[i].segment;\n if (\n (coordinatesEqual(closestSegment[0], segment[0]) &&\n coordinatesEqual(closestSegment[1], segment[1])) ||\n (coordinatesEqual(closestSegment[0], segment[1]) &&\n coordinatesEqual(closestSegment[1], segment[0]))\n ) {\n const geometryUid = getUid(nodes[i].geometry);\n if (!(geometryUid in geometries)) {\n geometries[geometryUid] = true;\n vertexSegments[getUid(segment)] = true;\n }\n } else {\n break;\n }\n }\n }\n\n this.vertexSegments_ = vertexSegments;\n return;\n }\n }\n if (this.vertexFeature_) {\n this.overlay_.getSource().removeFeature(this.vertexFeature_);\n this.vertexFeature_ = null;\n }\n }\n\n /**\n * @param {SegmentData} segmentData Segment data.\n * @param {import(\"../coordinate.js\").Coordinate} vertex Vertex.\n * @private\n */\n insertVertex_(segmentData, vertex) {\n const segment = segmentData.segment;\n const feature = segmentData.feature;\n const geometry = segmentData.geometry;\n const depth = segmentData.depth;\n const index = segmentData.index;\n let coordinates;\n\n while (vertex.length < geometry.getStride()) {\n vertex.push(0);\n }\n\n switch (geometry.getType()) {\n case GeometryType.MULTI_LINE_STRING:\n coordinates = geometry.getCoordinates();\n coordinates[depth[0]].splice(index + 1, 0, vertex);\n break;\n case GeometryType.POLYGON:\n coordinates = geometry.getCoordinates();\n coordinates[depth[0]].splice(index + 1, 0, vertex);\n break;\n case GeometryType.MULTI_POLYGON:\n coordinates = geometry.getCoordinates();\n coordinates[depth[1]][depth[0]].splice(index + 1, 0, vertex);\n break;\n case GeometryType.LINE_STRING:\n coordinates = geometry.getCoordinates();\n coordinates.splice(index + 1, 0, vertex);\n break;\n default:\n return;\n }\n\n this.setGeometryCoordinates_(geometry, coordinates);\n const rTree = this.rBush_;\n rTree.remove(segmentData);\n this.updateSegmentIndices_(geometry, index, depth, 1);\n\n /** @type {SegmentData} */\n const newSegmentData = {\n segment: [segment[0], vertex],\n feature: feature,\n geometry: geometry,\n depth: depth,\n index: index,\n };\n\n rTree.insert(boundingExtent(newSegmentData.segment), newSegmentData);\n this.dragSegments_.push([newSegmentData, 1]);\n\n /** @type {SegmentData} */\n const newSegmentData2 = {\n segment: [vertex, segment[1]],\n feature: feature,\n geometry: geometry,\n depth: depth,\n index: index + 1,\n };\n\n rTree.insert(boundingExtent(newSegmentData2.segment), newSegmentData2);\n this.dragSegments_.push([newSegmentData2, 0]);\n this.ignoreNextSingleClick_ = true;\n }\n\n /**\n * Removes the vertex currently being pointed.\n * @return {boolean} True when a vertex was removed.\n * @api\n */\n removePoint() {\n if (\n this.lastPointerEvent_ &&\n this.lastPointerEvent_.type != MapBrowserEventType.POINTERDRAG\n ) {\n const evt = this.lastPointerEvent_;\n this.willModifyFeatures_(evt, this.dragSegments_);\n const removed = this.removeVertex_();\n this.dispatchEvent(\n new ModifyEvent(\n ModifyEventType.MODIFYEND,\n this.featuresBeingModified_,\n evt\n )\n );\n this.featuresBeingModified_ = null;\n return removed;\n }\n return false;\n }\n\n /**\n * Removes a vertex from all matching features.\n * @return {boolean} True when a vertex was removed.\n * @private\n */\n removeVertex_() {\n const dragSegments = this.dragSegments_;\n const segmentsByFeature = {};\n let deleted = false;\n let component, coordinates, dragSegment, geometry, i, index, left;\n let newIndex, right, segmentData, uid;\n for (i = dragSegments.length - 1; i >= 0; --i) {\n dragSegment = dragSegments[i];\n segmentData = dragSegment[0];\n uid = getUid(segmentData.feature);\n if (segmentData.depth) {\n // separate feature components\n uid += '-' + segmentData.depth.join('-');\n }\n if (!(uid in segmentsByFeature)) {\n segmentsByFeature[uid] = {};\n }\n if (dragSegment[1] === 0) {\n segmentsByFeature[uid].right = segmentData;\n segmentsByFeature[uid].index = segmentData.index;\n } else if (dragSegment[1] == 1) {\n segmentsByFeature[uid].left = segmentData;\n segmentsByFeature[uid].index = segmentData.index + 1;\n }\n }\n for (uid in segmentsByFeature) {\n right = segmentsByFeature[uid].right;\n left = segmentsByFeature[uid].left;\n index = segmentsByFeature[uid].index;\n newIndex = index - 1;\n if (left !== undefined) {\n segmentData = left;\n } else {\n segmentData = right;\n }\n if (newIndex < 0) {\n newIndex = 0;\n }\n geometry = segmentData.geometry;\n coordinates = geometry.getCoordinates();\n component = coordinates;\n deleted = false;\n switch (geometry.getType()) {\n case GeometryType.MULTI_LINE_STRING:\n if (coordinates[segmentData.depth[0]].length > 2) {\n coordinates[segmentData.depth[0]].splice(index, 1);\n deleted = true;\n }\n break;\n case GeometryType.LINE_STRING:\n if (coordinates.length > 2) {\n coordinates.splice(index, 1);\n deleted = true;\n }\n break;\n case GeometryType.MULTI_POLYGON:\n component = component[segmentData.depth[1]];\n /* falls through */\n case GeometryType.POLYGON:\n component = component[segmentData.depth[0]];\n if (component.length > 4) {\n if (index == component.length - 1) {\n index = 0;\n }\n component.splice(index, 1);\n deleted = true;\n if (index === 0) {\n // close the ring again\n component.pop();\n component.push(component[0]);\n newIndex = component.length - 1;\n }\n }\n break;\n default:\n // pass\n }\n\n if (deleted) {\n this.setGeometryCoordinates_(geometry, coordinates);\n const segments = [];\n if (left !== undefined) {\n this.rBush_.remove(left);\n segments.push(left.segment[0]);\n }\n if (right !== undefined) {\n this.rBush_.remove(right);\n segments.push(right.segment[1]);\n }\n if (left !== undefined && right !== undefined) {\n /** @type {SegmentData} */\n const newSegmentData = {\n depth: segmentData.depth,\n feature: segmentData.feature,\n geometry: segmentData.geometry,\n index: newIndex,\n segment: segments,\n };\n\n this.rBush_.insert(\n boundingExtent(newSegmentData.segment),\n newSegmentData\n );\n }\n this.updateSegmentIndices_(geometry, index, segmentData.depth, -1);\n if (this.vertexFeature_) {\n this.overlay_.getSource().removeFeature(this.vertexFeature_);\n this.vertexFeature_ = null;\n }\n dragSegments.length = 0;\n }\n }\n return deleted;\n }\n\n /**\n * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @param {Array} coordinates Coordinates.\n * @private\n */\n setGeometryCoordinates_(geometry, coordinates) {\n this.changingFeature_ = true;\n geometry.setCoordinates(coordinates);\n this.changingFeature_ = false;\n }\n\n /**\n * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @param {number} index Index.\n * @param {Array<number>|undefined} depth Depth.\n * @param {number} delta Delta (1 or -1).\n * @private\n */\n updateSegmentIndices_(geometry, index, depth, delta) {\n this.rBush_.forEachInExtent(geometry.getExtent(), function (\n segmentDataMatch\n ) {\n if (\n segmentDataMatch.geometry === geometry &&\n (depth === undefined ||\n segmentDataMatch.depth === undefined ||\n equals(segmentDataMatch.depth, depth)) &&\n segmentDataMatch.index > index\n ) {\n segmentDataMatch.index += delta;\n }\n });\n }\n}\n\n/**\n * @param {SegmentData} a The first segment data.\n * @param {SegmentData} b The second segment data.\n * @return {number} The difference in indexes.\n */\nfunction compareIndexes(a, b) {\n return a.index - b.index;\n}\n\n/**\n * Returns the distance from a point to a line segment.\n *\n * @param {import(\"../coordinate.js\").Coordinate} pointCoordinates The coordinates of the point from\n * which to calculate the distance.\n * @param {SegmentData} segmentData The object describing the line\n * segment we are calculating the distance to.\n * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n * @return {number} The square of the distance between a point and a line segment.\n */\nfunction projectedDistanceToSegmentDataSquared(\n pointCoordinates,\n segmentData,\n projection\n) {\n const geometry = segmentData.geometry;\n\n if (geometry.getType() === GeometryType.CIRCLE) {\n let circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (geometry);\n\n if (segmentData.index === CIRCLE_CIRCUMFERENCE_INDEX) {\n const userProjection = getUserProjection();\n if (userProjection) {\n circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry\n .clone()\n .transform(userProjection, projection));\n }\n const distanceToCenterSquared = squaredCoordinateDistance(\n circleGeometry.getCenter(),\n fromUserCoordinate(pointCoordinates, projection)\n );\n const distanceToCircumference =\n Math.sqrt(distanceToCenterSquared) - circleGeometry.getRadius();\n return distanceToCircumference * distanceToCircumference;\n }\n }\n\n const coordinate = fromUserCoordinate(pointCoordinates, projection);\n tempSegment[0] = fromUserCoordinate(segmentData.segment[0], projection);\n tempSegment[1] = fromUserCoordinate(segmentData.segment[1], projection);\n return squaredDistanceToSegment(coordinate, tempSegment);\n}\n\n/**\n * Returns the point closest to a given line segment.\n *\n * @param {import(\"../coordinate.js\").Coordinate} pointCoordinates The point to which a closest point\n * should be found.\n * @param {SegmentData} segmentData The object describing the line\n * segment which should contain the closest point.\n * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n * @return {import(\"../coordinate.js\").Coordinate} The point closest to the specified line segment.\n */\nfunction closestOnSegmentData(pointCoordinates, segmentData, projection) {\n const geometry = segmentData.geometry;\n\n if (\n geometry.getType() === GeometryType.CIRCLE &&\n segmentData.index === CIRCLE_CIRCUMFERENCE_INDEX\n ) {\n let circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (geometry);\n const userProjection = getUserProjection();\n if (userProjection) {\n circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry\n .clone()\n .transform(userProjection, projection));\n }\n return toUserCoordinate(\n circleGeometry.getClosestPoint(\n fromUserCoordinate(pointCoordinates, projection)\n ),\n projection\n );\n }\n const coordinate = fromUserCoordinate(pointCoordinates, projection);\n tempSegment[0] = fromUserCoordinate(segmentData.segment[0], projection);\n tempSegment[1] = fromUserCoordinate(segmentData.segment[1], projection);\n return toUserCoordinate(\n closestOnSegment(coordinate, tempSegment),\n projection\n );\n}\n\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n const style = createEditingStyle();\n return function (feature, resolution) {\n return style[GeometryType.POINT];\n };\n}\n\nexport default Modify;\n","/**\n * @module ol/interaction/Select\n */\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport Event from '../events/Event.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport Interaction from './Interaction.js';\nimport {TRUE} from '../functions.js';\nimport {clear} from '../obj.js';\nimport {createEditingStyle} from '../style/Style.js';\nimport {extend, includes} from '../array.js';\nimport {getUid} from '../util.js';\nimport {never, shiftKeyOnly, singleClick} from '../events/condition.js';\n\n/**\n * @enum {string}\n */\nconst SelectEventType = {\n /**\n * Triggered when feature(s) has been (de)selected.\n * @event SelectEvent#select\n * @api\n */\n SELECT: 'select',\n};\n\n/**\n * A function that takes an {@link module:ol/Feature} or\n * {@link module:ol/render/Feature} and an\n * {@link module:ol/layer/Layer} and returns `true` if the feature may be\n * selected or `false` otherwise.\n * @typedef {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default):boolean} FilterFunction\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [addCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * By default, this is {@link module:ol/events/condition~never}. Use this if you\n * want to use different events for add and remove instead of `toggle`.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. This is the event\n * for the selected features as a whole. By default, this is\n * {@link module:ol/events/condition~singleClick}. Clicking on a feature selects that\n * feature and removes any that were in the selection. Clicking outside any\n * feature removes all from the selection.\n * See `toggle`, `add`, `remove` options for adding/removing extra features to/\n * from the selection.\n * @property {Array<import(\"../layer/Layer.js\").default>|function(import(\"../layer/Layer.js\").default): boolean} [layers]\n * A list of layers from which features should be selected. Alternatively, a\n * filter function can be provided. The function will be called for each layer\n * in the map and should return `true` for layers that you want to be\n * selectable. If the option is absent, all visible layers will be considered\n * selectable.\n * @property {import(\"../style/Style.js\").StyleLike|null} [style]\n * Style for the selected features. By default the default edit style is used\n * (see {@link module:ol/style}). Set to `null` if this interaction should not apply\n * any style changes for selected features.\n * If set to a falsey value, the selected feature's style will not change.\n * @property {import(\"../events/condition.js\").Condition} [removeCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * By default, this is {@link module:ol/events/condition~never}. Use this if you\n * want to use different events for add and remove instead of `toggle`.\n * @property {import(\"../events/condition.js\").Condition} [toggleCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. This is in addition\n * to the `condition` event. By default,\n * {@link module:ol/events/condition~shiftKeyOnly}, i.e. pressing `shift` as\n * well as the `condition` event, adds that feature to the current selection if\n * it is not currently selected, and removes it if it is. See `add` and `remove`\n * if you want to use different events instead of a toggle.\n * @property {boolean} [multi=false] A boolean that determines if the default\n * behaviour should select only single features or all (overlapping) features at\n * the clicked map position. The default of `false` means single select.\n * @property {import(\"../Collection.js\").default<import(\"../Feature.js\").default>} [features]\n * Collection where the interaction will place selected features. Optional. If\n * not set the interaction will create a collection. In any case the collection\n * used by the interaction is returned by\n * {@link module:ol/interaction/Select~Select#getFeatures}.\n * @property {FilterFunction} [filter] A function\n * that takes an {@link module:ol/Feature} and an\n * {@link module:ol/layer/Layer} and returns `true` if the feature may be\n * selected or `false` otherwise.\n * @property {number} [hitTolerance=0] Hit-detection tolerance. Pixels inside\n * the radius around the given position will be checked for features.\n */\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Select~Select} instances are instances of\n * this type.\n */\nexport class SelectEvent extends Event {\n /**\n * @param {SelectEventType} type The event type.\n * @param {Array<import(\"../Feature.js\").default>} selected Selected features.\n * @param {Array<import(\"../Feature.js\").default>} deselected Deselected features.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Associated\n * {@link module:ol/MapBrowserEvent}.\n */\n constructor(type, selected, deselected, mapBrowserEvent) {\n super(type);\n\n /**\n * Selected features array.\n * @type {Array<import(\"../Feature.js\").default>}\n * @api\n */\n this.selected = selected;\n\n /**\n * Deselected features array.\n * @type {Array<import(\"../Feature.js\").default>}\n * @api\n */\n this.deselected = deselected;\n\n /**\n * Associated {@link module:ol/MapBrowserEvent}.\n * @type {import(\"../MapBrowserEvent.js\").default}\n * @api\n */\n this.mapBrowserEvent = mapBrowserEvent;\n }\n}\n\n/**\n * Original feature styles to reset to when features are no longer selected.\n * @type {Object.<number, import(\"../style/Style.js\").default|Array.<import(\"../style/Style.js\").default>|import(\"../style/Style.js\").StyleFunction>}\n */\nconst originalFeatureStyles = {};\n\n/**\n * @classdesc\n * Interaction for selecting vector features. By default, selected features are\n * styled differently, so this interaction can be used for visual highlighting,\n * as well as selecting features for other actions, such as modification or\n * output. There are three ways of controlling which features are selected:\n * using the browser event as defined by the `condition` and optionally the\n * `toggle`, `add`/`remove`, and `multi` options; a `layers` filter; and a\n * further feature filter using the `filter` option.\n *\n * Selected features are added to an internal unmanaged layer.\n *\n * @fires SelectEvent\n * @api\n */\nclass Select extends Interaction {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n super();\n\n const options = opt_options ? opt_options : {};\n\n /**\n * @private\n */\n this.boundAddFeature_ = this.addFeature_.bind(this);\n\n /**\n * @private\n */\n this.boundRemoveFeature_ = this.removeFeature_.bind(this);\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : singleClick;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.addCondition_ = options.addCondition ? options.addCondition : never;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.removeCondition_ = options.removeCondition\n ? options.removeCondition\n : never;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.toggleCondition_ = options.toggleCondition\n ? options.toggleCondition\n : shiftKeyOnly;\n\n /**\n * @private\n * @type {boolean}\n */\n this.multi_ = options.multi ? options.multi : false;\n\n /**\n * @private\n * @type {FilterFunction}\n */\n this.filter_ = options.filter ? options.filter : TRUE;\n\n /**\n * @private\n * @type {number}\n */\n this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;\n\n /**\n * @private\n * @type {import(\"../style/Style.js\").default|Array.<import(\"../style/Style.js\").default>|import(\"../style/Style.js\").StyleFunction|null}\n */\n this.style_ =\n options.style !== undefined ? options.style : getDefaultStyleFunction();\n\n /**\n * @private\n * @type {import(\"../Collection.js\").default}\n */\n this.features_ = options.features || new Collection();\n\n /** @type {function(import(\"../layer/Layer.js\").default): boolean} */\n let layerFilter;\n if (options.layers) {\n if (typeof options.layers === 'function') {\n layerFilter = options.layers;\n } else {\n const layers = options.layers;\n layerFilter = function (layer) {\n return includes(layers, layer);\n };\n }\n } else {\n layerFilter = TRUE;\n }\n\n /**\n * @private\n * @type {function(import(\"../layer/Layer.js\").default): boolean}\n */\n this.layerFilter_ = layerFilter;\n\n /**\n * An association between selected feature (key)\n * and layer (value)\n * @private\n * @type {Object<string, import(\"../layer/Layer.js\").default>}\n */\n this.featureLayerAssociation_ = {};\n }\n\n /**\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../layer/Layer.js\").default} layer Layer.\n * @private\n */\n addFeatureLayerAssociation_(feature, layer) {\n this.featureLayerAssociation_[getUid(feature)] = layer;\n }\n\n /**\n * Get the selected features.\n * @return {import(\"../Collection.js\").default<import(\"../Feature.js\").default>} Features collection.\n * @api\n */\n getFeatures() {\n return this.features_;\n }\n\n /**\n * Returns the Hit-detection tolerance.\n * @returns {number} Hit tolerance in pixels.\n * @api\n */\n getHitTolerance() {\n return this.hitTolerance_;\n }\n\n /**\n * Returns the associated {@link module:ol/layer/Vector~Vector vectorlayer} of\n * the (last) selected feature. Note that this will not work with any\n * programmatic method like pushing features to\n * {@link module:ol/interaction/Select~Select#getFeatures collection}.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature\n * @return {import('../layer/Vector.js').default} Layer.\n * @api\n */\n getLayer(feature) {\n return /** @type {import('../layer/Vector.js').default} */ (this\n .featureLayerAssociation_[getUid(feature)]);\n }\n\n /**\n * Hit-detection tolerance. Pixels inside the radius around the given position\n * will be checked for features.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @api\n */\n setHitTolerance(hitTolerance) {\n this.hitTolerance_ = hitTolerance;\n }\n\n /**\n * Remove the interaction from its current map, if any, and attach it to a new\n * map, if any. Pass `null` to just remove the interaction from the current map.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @api\n */\n setMap(map) {\n const currentMap = this.getMap();\n if (currentMap && this.style_) {\n this.features_.forEach(this.restorePreviousStyle_.bind(this));\n }\n super.setMap(map);\n if (map) {\n this.features_.addEventListener(\n CollectionEventType.ADD,\n this.boundAddFeature_\n );\n this.features_.addEventListener(\n CollectionEventType.REMOVE,\n this.boundRemoveFeature_\n );\n\n if (this.style_) {\n this.features_.forEach(this.applySelectedStyle_.bind(this));\n }\n } else {\n this.features_.removeEventListener(\n CollectionEventType.ADD,\n this.boundAddFeature_\n );\n this.features_.removeEventListener(\n CollectionEventType.REMOVE,\n this.boundRemoveFeature_\n );\n }\n }\n\n /**\n * @param {import(\"../Collection.js\").CollectionEvent} evt Event.\n * @private\n */\n addFeature_(evt) {\n const feature = evt.element;\n if (this.style_) {\n this.applySelectedStyle_(feature);\n }\n }\n\n /**\n * @param {import(\"../Collection.js\").CollectionEvent} evt Event.\n * @private\n */\n removeFeature_(evt) {\n const feature = evt.element;\n if (this.style_) {\n this.restorePreviousStyle_(feature);\n }\n }\n\n /**\n * @return {import(\"../style/Style.js\").StyleLike|null} Select style.\n */\n getStyle() {\n return this.style_;\n }\n\n /**\n * @param {import(\"../Feature.js\").default} feature Feature\n * @private\n */\n applySelectedStyle_(feature) {\n const key = getUid(feature);\n if (!(key in originalFeatureStyles)) {\n originalFeatureStyles[key] = feature.getStyle();\n }\n feature.setStyle(this.style_);\n }\n\n /**\n * @param {import(\"../Feature.js\").default} feature Feature\n * @private\n */\n restorePreviousStyle_(feature) {\n const interactions = this.getMap().getInteractions().getArray();\n for (let i = interactions.length - 1; i >= 0; --i) {\n const interaction = interactions[i];\n if (\n interaction !== this &&\n interaction instanceof Select &&\n interaction.getStyle() &&\n interaction.getFeatures().getArray().lastIndexOf(feature) !== -1\n ) {\n feature.setStyle(interaction.getStyle());\n return;\n }\n }\n\n const key = getUid(feature);\n feature.setStyle(originalFeatureStyles[key]);\n delete originalFeatureStyles[key];\n }\n\n /**\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @private\n */\n removeFeatureLayerAssociation_(feature) {\n delete this.featureLayerAssociation_[getUid(feature)];\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent map browser event} and may change the\n * selected state of features.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @this {Select}\n */\n handleEvent(mapBrowserEvent) {\n if (!this.condition_(mapBrowserEvent)) {\n return true;\n }\n const add = this.addCondition_(mapBrowserEvent);\n const remove = this.removeCondition_(mapBrowserEvent);\n const toggle = this.toggleCondition_(mapBrowserEvent);\n const set = !add && !remove && !toggle;\n const map = mapBrowserEvent.map;\n const features = this.getFeatures();\n const deselected = [];\n const selected = [];\n if (set) {\n // Replace the currently selected feature(s) with the feature(s) at the\n // pixel, or clear the selected feature(s) if there is no feature at\n // the pixel.\n clear(this.featureLayerAssociation_);\n map.forEachFeatureAtPixel(\n mapBrowserEvent.pixel,\n /**\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../layer/Layer.js\").default} layer Layer.\n * @return {boolean|undefined} Continue to iterate over the features.\n */\n function (feature, layer) {\n if (this.filter_(feature, layer)) {\n selected.push(feature);\n this.addFeatureLayerAssociation_(feature, layer);\n return !this.multi_;\n }\n }.bind(this),\n {\n layerFilter: this.layerFilter_,\n hitTolerance: this.hitTolerance_,\n }\n );\n for (let i = features.getLength() - 1; i >= 0; --i) {\n const feature = features.item(i);\n const index = selected.indexOf(feature);\n if (index > -1) {\n // feature is already selected\n selected.splice(index, 1);\n } else {\n features.remove(feature);\n deselected.push(feature);\n }\n }\n if (selected.length !== 0) {\n features.extend(selected);\n }\n } else {\n // Modify the currently selected feature(s).\n map.forEachFeatureAtPixel(\n mapBrowserEvent.pixel,\n /**\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../layer/Layer.js\").default} layer Layer.\n * @return {boolean|undefined} Continue to iterate over the features.\n */\n function (feature, layer) {\n if (this.filter_(feature, layer)) {\n if ((add || toggle) && !includes(features.getArray(), feature)) {\n selected.push(feature);\n this.addFeatureLayerAssociation_(feature, layer);\n } else if (\n (remove || toggle) &&\n includes(features.getArray(), feature)\n ) {\n deselected.push(feature);\n this.removeFeatureLayerAssociation_(feature);\n }\n return !this.multi_;\n }\n }.bind(this),\n {\n layerFilter: this.layerFilter_,\n hitTolerance: this.hitTolerance_,\n }\n );\n for (let j = deselected.length - 1; j >= 0; --j) {\n features.remove(deselected[j]);\n }\n features.extend(selected);\n }\n if (selected.length > 0 || deselected.length > 0) {\n this.dispatchEvent(\n new SelectEvent(\n SelectEventType.SELECT,\n selected,\n deselected,\n mapBrowserEvent\n )\n );\n }\n return true;\n }\n}\n\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n const styles = createEditingStyle();\n extend(styles[GeometryType.POLYGON], styles[GeometryType.LINE_STRING]);\n extend(\n styles[GeometryType.GEOMETRY_COLLECTION],\n styles[GeometryType.LINE_STRING]\n );\n\n return function (feature) {\n if (!feature.getGeometry()) {\n return null;\n }\n return styles[feature.getGeometry().getType()];\n };\n}\n\nexport default Select;\n","/**\n * @module ol/interaction/Snap\n */\nimport CollectionEventType from '../CollectionEventType.js';\nimport EventType from '../events/EventType.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport PointerInteraction from './Pointer.js';\nimport RBush from '../structs/RBush.js';\nimport VectorEventType from '../source/VectorEventType.js';\nimport {FALSE, TRUE} from '../functions.js';\nimport {boundingExtent, createEmpty} from '../extent.js';\nimport {\n closestOnCircle,\n closestOnSegment,\n distance as coordinateDistance,\n squaredDistance as squaredCoordinateDistance,\n squaredDistanceToSegment,\n} from '../coordinate.js';\nimport {fromCircle} from '../geom/Polygon.js';\nimport {\n fromUserCoordinate,\n getUserProjection,\n toUserCoordinate,\n} from '../proj.js';\nimport {getUid} from '../util.js';\nimport {getValues} from '../obj.js';\nimport {listen, unlistenByKey} from '../events.js';\n\n/**\n * @typedef {Object} Result\n * @property {boolean} snapped\n * @property {import(\"../coordinate.js\").Coordinate|null} vertex\n * @property {import(\"../pixel.js\").Pixel|null} vertexPixel\n */\n\n/**\n * @typedef {Object} SegmentData\n * @property {import(\"../Feature.js\").default} feature\n * @property {Array<import(\"../coordinate.js\").Coordinate>} segment\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../Collection.js\").default<import(\"../Feature.js\").default>} [features] Snap to these features. Either this option or source should be provided.\n * @property {boolean} [edge=true] Snap to edges.\n * @property {boolean} [vertex=true] Snap to vertices.\n * @property {number} [pixelTolerance=10] Pixel tolerance for considering the pointer close enough to a segment or\n * vertex for snapping.\n * @property {import(\"../source/Vector.js\").default} [source] Snap to features from this source. Either this option or features should be provided\n */\n\n/**\n * @param {import(\"../source/Vector.js\").VectorSourceEvent|import(\"../Collection.js\").CollectionEvent} evt Event.\n * @return {import(\"../Feature.js\").default} Feature.\n */\nfunction getFeatureFromEvent(evt) {\n if (\n /** @type {import(\"../source/Vector.js\").VectorSourceEvent} */ (evt).feature\n ) {\n return /** @type {import(\"../source/Vector.js\").VectorSourceEvent} */ (evt)\n .feature;\n } else if (\n /** @type {import(\"../Collection.js\").CollectionEvent} */ (evt).element\n ) {\n return /** @type {import(\"../Feature.js\").default} */ (\n /** @type {import(\"../Collection.js\").CollectionEvent} */ (evt).element\n );\n }\n}\n\nconst tempSegment = [];\n\n/**\n * @classdesc\n * Handles snapping of vector features while modifying or drawing them. The\n * features can come from a {@link module:ol/source/Vector} or {@link module:ol/Collection~Collection}\n * Any interaction object that allows the user to interact\n * with the features using the mouse can benefit from the snapping, as long\n * as it is added before.\n *\n * The snap interaction modifies map browser event `coordinate` and `pixel`\n * properties to force the snap to occur to any interaction that them.\n *\n * Example:\n *\n * import Snap from 'ol/interaction/Snap';\n *\n * const snap = new Snap({\n * source: source\n * });\n *\n * map.addInteraction(snap);\n *\n * @api\n */\nclass Snap extends PointerInteraction {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n const pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n\n if (!pointerOptions.handleDownEvent) {\n pointerOptions.handleDownEvent = TRUE;\n }\n\n if (!pointerOptions.stopDown) {\n pointerOptions.stopDown = FALSE;\n }\n\n super(pointerOptions);\n\n /**\n * @type {import(\"../source/Vector.js\").default}\n * @private\n */\n this.source_ = options.source ? options.source : null;\n\n /**\n * @private\n * @type {boolean}\n */\n this.vertex_ = options.vertex !== undefined ? options.vertex : true;\n\n /**\n * @private\n * @type {boolean}\n */\n this.edge_ = options.edge !== undefined ? options.edge : true;\n\n /**\n * @type {import(\"../Collection.js\").default<import(\"../Feature.js\").default>}\n * @private\n */\n this.features_ = options.features ? options.features : null;\n\n /**\n * @type {Array<import(\"../events.js\").EventsKey>}\n * @private\n */\n this.featuresListenerKeys_ = [];\n\n /**\n * @type {Object<string, import(\"../events.js\").EventsKey>}\n * @private\n */\n this.featureChangeListenerKeys_ = {};\n\n /**\n * Extents are preserved so indexed segment can be quickly removed\n * when its feature geometry changes\n * @type {Object<string, import(\"../extent.js\").Extent>}\n * @private\n */\n this.indexedFeaturesExtents_ = {};\n\n /**\n * If a feature geometry changes while a pointer drag|move event occurs, the\n * feature doesn't get updated right away. It will be at the next 'pointerup'\n * event fired.\n * @type {!Object<string, import(\"../Feature.js\").default>}\n * @private\n */\n this.pendingFeatures_ = {};\n\n /**\n * @type {number}\n * @private\n */\n this.pixelTolerance_ =\n options.pixelTolerance !== undefined ? options.pixelTolerance : 10;\n\n /**\n * Segment RTree for each layer\n * @type {import(\"../structs/RBush.js\").default<SegmentData>}\n * @private\n */\n this.rBush_ = new RBush();\n\n /**\n * @const\n * @private\n * @type {Object<string, function(import(\"../Feature.js\").default, import(\"../geom/Geometry.js\").default): void>}\n */\n this.SEGMENT_WRITERS_ = {\n 'Point': this.writePointGeometry_.bind(this),\n 'LineString': this.writeLineStringGeometry_.bind(this),\n 'LinearRing': this.writeLineStringGeometry_.bind(this),\n 'Polygon': this.writePolygonGeometry_.bind(this),\n 'MultiPoint': this.writeMultiPointGeometry_.bind(this),\n 'MultiLineString': this.writeMultiLineStringGeometry_.bind(this),\n 'MultiPolygon': this.writeMultiPolygonGeometry_.bind(this),\n 'GeometryCollection': this.writeGeometryCollectionGeometry_.bind(this),\n 'Circle': this.writeCircleGeometry_.bind(this),\n };\n }\n\n /**\n * Add a feature to the collection of features that we may snap to.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {boolean=} opt_listen Whether to listen to the feature change or not\n * Defaults to `true`.\n * @api\n */\n addFeature(feature, opt_listen) {\n const register = opt_listen !== undefined ? opt_listen : true;\n const feature_uid = getUid(feature);\n const geometry = feature.getGeometry();\n if (geometry) {\n const segmentWriter = this.SEGMENT_WRITERS_[geometry.getType()];\n if (segmentWriter) {\n this.indexedFeaturesExtents_[feature_uid] = geometry.getExtent(\n createEmpty()\n );\n segmentWriter(feature, geometry);\n }\n }\n\n if (register) {\n this.featureChangeListenerKeys_[feature_uid] = listen(\n feature,\n EventType.CHANGE,\n this.handleFeatureChange_,\n this\n );\n }\n }\n\n /**\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @private\n */\n forEachFeatureAdd_(feature) {\n this.addFeature(feature);\n }\n\n /**\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @private\n */\n forEachFeatureRemove_(feature) {\n this.removeFeature(feature);\n }\n\n /**\n * @return {import(\"../Collection.js\").default<import(\"../Feature.js\").default>|Array<import(\"../Feature.js\").default>} Features.\n * @private\n */\n getFeatures_() {\n let features;\n if (this.features_) {\n features = this.features_;\n } else if (this.source_) {\n features = this.source_.getFeatures();\n }\n return features;\n }\n\n /**\n * @param {import(\"../MapBrowserEvent.js\").default} evt Map browser event.\n * @return {boolean} `false` to stop event propagation.\n */\n handleEvent(evt) {\n const result = this.snapTo(evt.pixel, evt.coordinate, evt.map);\n if (result.snapped) {\n evt.coordinate = result.vertex.slice(0, 2);\n evt.pixel = result.vertexPixel;\n }\n return super.handleEvent(evt);\n }\n\n /**\n * @param {import(\"../source/Vector.js\").VectorSourceEvent|import(\"../Collection.js\").CollectionEvent} evt Event.\n * @private\n */\n handleFeatureAdd_(evt) {\n const feature = getFeatureFromEvent(evt);\n this.addFeature(feature);\n }\n\n /**\n * @param {import(\"../source/Vector.js\").VectorSourceEvent|import(\"../Collection.js\").CollectionEvent} evt Event.\n * @private\n */\n handleFeatureRemove_(evt) {\n const feature = getFeatureFromEvent(evt);\n this.removeFeature(feature);\n }\n\n /**\n * @param {import(\"../events/Event.js\").default} evt Event.\n * @private\n */\n handleFeatureChange_(evt) {\n const feature = /** @type {import(\"../Feature.js\").default} */ (evt.target);\n if (this.handlingDownUpSequence) {\n const uid = getUid(feature);\n if (!(uid in this.pendingFeatures_)) {\n this.pendingFeatures_[uid] = feature;\n }\n } else {\n this.updateFeature_(feature);\n }\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(evt) {\n const featuresToUpdate = getValues(this.pendingFeatures_);\n if (featuresToUpdate.length) {\n featuresToUpdate.forEach(this.updateFeature_.bind(this));\n this.pendingFeatures_ = {};\n }\n return false;\n }\n\n /**\n * Remove a feature from the collection of features that we may snap to.\n * @param {import(\"../Feature.js\").default} feature Feature\n * @param {boolean=} opt_unlisten Whether to unlisten to the feature change\n * or not. Defaults to `true`.\n * @api\n */\n removeFeature(feature, opt_unlisten) {\n const unregister = opt_unlisten !== undefined ? opt_unlisten : true;\n const feature_uid = getUid(feature);\n const extent = this.indexedFeaturesExtents_[feature_uid];\n if (extent) {\n const rBush = this.rBush_;\n const nodesToRemove = [];\n rBush.forEachInExtent(extent, function (node) {\n if (feature === node.feature) {\n nodesToRemove.push(node);\n }\n });\n for (let i = nodesToRemove.length - 1; i >= 0; --i) {\n rBush.remove(nodesToRemove[i]);\n }\n }\n\n if (unregister) {\n unlistenByKey(this.featureChangeListenerKeys_[feature_uid]);\n delete this.featureChangeListenerKeys_[feature_uid];\n }\n }\n\n /**\n * Remove the interaction from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n */\n setMap(map) {\n const currentMap = this.getMap();\n const keys = this.featuresListenerKeys_;\n const features = /** @type {Array<import(\"../Feature.js\").default>} */ (this.getFeatures_());\n\n if (currentMap) {\n keys.forEach(unlistenByKey);\n keys.length = 0;\n features.forEach(this.forEachFeatureRemove_.bind(this));\n }\n super.setMap(map);\n\n if (map) {\n if (this.features_) {\n keys.push(\n listen(\n this.features_,\n CollectionEventType.ADD,\n this.handleFeatureAdd_,\n this\n ),\n listen(\n this.features_,\n CollectionEventType.REMOVE,\n this.handleFeatureRemove_,\n this\n )\n );\n } else if (this.source_) {\n keys.push(\n listen(\n this.source_,\n VectorEventType.ADDFEATURE,\n this.handleFeatureAdd_,\n this\n ),\n listen(\n this.source_,\n VectorEventType.REMOVEFEATURE,\n this.handleFeatureRemove_,\n this\n )\n );\n }\n features.forEach(this.forEachFeatureAdd_.bind(this));\n }\n }\n\n /**\n * @param {import(\"../pixel.js\").Pixel} pixel Pixel\n * @param {import(\"../coordinate.js\").Coordinate} pixelCoordinate Coordinate\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @return {Result} Snap result\n */\n snapTo(pixel, pixelCoordinate, map) {\n const lowerLeft = map.getCoordinateFromPixel([\n pixel[0] - this.pixelTolerance_,\n pixel[1] + this.pixelTolerance_,\n ]);\n const upperRight = map.getCoordinateFromPixel([\n pixel[0] + this.pixelTolerance_,\n pixel[1] - this.pixelTolerance_,\n ]);\n const box = boundingExtent([lowerLeft, upperRight]);\n\n let segments = this.rBush_.getInExtent(box);\n\n // If snapping on vertices only, don't consider circles\n if (this.vertex_ && !this.edge_) {\n segments = segments.filter(function (segment) {\n return segment.feature.getGeometry().getType() !== GeometryType.CIRCLE;\n });\n }\n\n let snapped = false;\n let vertex = null;\n let vertexPixel = null;\n\n if (segments.length === 0) {\n return {\n snapped: snapped,\n vertex: vertex,\n vertexPixel: vertexPixel,\n };\n }\n\n const projection = map.getView().getProjection();\n const projectedCoordinate = fromUserCoordinate(pixelCoordinate, projection);\n\n let closestSegmentData;\n let minSquaredDistance = Infinity;\n for (let i = 0; i < segments.length; ++i) {\n const segmentData = segments[i];\n tempSegment[0] = fromUserCoordinate(segmentData.segment[0], projection);\n tempSegment[1] = fromUserCoordinate(segmentData.segment[1], projection);\n const delta = squaredDistanceToSegment(projectedCoordinate, tempSegment);\n if (delta < minSquaredDistance) {\n closestSegmentData = segmentData;\n minSquaredDistance = delta;\n }\n }\n const closestSegment = closestSegmentData.segment;\n\n if (this.vertex_ && !this.edge_) {\n const pixel1 = map.getPixelFromCoordinate(closestSegment[0]);\n const pixel2 = map.getPixelFromCoordinate(closestSegment[1]);\n const squaredDist1 = squaredCoordinateDistance(pixel, pixel1);\n const squaredDist2 = squaredCoordinateDistance(pixel, pixel2);\n const dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n if (dist <= this.pixelTolerance_) {\n snapped = true;\n vertex =\n squaredDist1 > squaredDist2 ? closestSegment[1] : closestSegment[0];\n vertexPixel = map.getPixelFromCoordinate(vertex);\n }\n } else if (this.edge_) {\n const isCircle =\n closestSegmentData.feature.getGeometry().getType() ===\n GeometryType.CIRCLE;\n if (isCircle) {\n let circleGeometry = closestSegmentData.feature.getGeometry();\n const userProjection = getUserProjection();\n if (userProjection) {\n circleGeometry = circleGeometry\n .clone()\n .transform(userProjection, projection);\n }\n vertex = toUserCoordinate(\n closestOnCircle(\n projectedCoordinate,\n /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry)\n ),\n projection\n );\n } else {\n tempSegment[0] = fromUserCoordinate(closestSegment[0], projection);\n tempSegment[1] = fromUserCoordinate(closestSegment[1], projection);\n vertex = toUserCoordinate(\n closestOnSegment(projectedCoordinate, tempSegment),\n projection\n );\n }\n vertexPixel = map.getPixelFromCoordinate(vertex);\n\n if (coordinateDistance(pixel, vertexPixel) <= this.pixelTolerance_) {\n snapped = true;\n if (this.vertex_ && !isCircle) {\n const pixel1 = map.getPixelFromCoordinate(closestSegment[0]);\n const pixel2 = map.getPixelFromCoordinate(closestSegment[1]);\n const squaredDist1 = squaredCoordinateDistance(vertexPixel, pixel1);\n const squaredDist2 = squaredCoordinateDistance(vertexPixel, pixel2);\n const dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n if (dist <= this.pixelTolerance_) {\n vertex =\n squaredDist1 > squaredDist2\n ? closestSegment[1]\n : closestSegment[0];\n vertexPixel = map.getPixelFromCoordinate(vertex);\n }\n }\n }\n }\n\n if (snapped) {\n vertexPixel = [Math.round(vertexPixel[0]), Math.round(vertexPixel[1])];\n }\n\n return {\n snapped: snapped,\n vertex: vertex,\n vertexPixel: vertexPixel,\n };\n }\n\n /**\n * @param {import(\"../Feature.js\").default} feature Feature\n * @private\n */\n updateFeature_(feature) {\n this.removeFeature(feature, false);\n this.addFeature(feature, false);\n }\n\n /**\n * @param {import(\"../Feature.js\").default} feature Feature\n * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n * @private\n */\n writeCircleGeometry_(feature, geometry) {\n const projection = this.getMap().getView().getProjection();\n let circleGeometry = geometry;\n const userProjection = getUserProjection();\n if (userProjection) {\n circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry\n .clone()\n .transform(userProjection, projection));\n }\n const polygon = fromCircle(circleGeometry);\n if (userProjection) {\n polygon.transform(projection, userProjection);\n }\n const coordinates = polygon.getCoordinates()[0];\n for (let i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n const segment = coordinates.slice(i, i + 2);\n const segmentData = {\n feature: feature,\n segment: segment,\n };\n this.rBush_.insert(boundingExtent(segment), segmentData);\n }\n }\n\n /**\n * @param {import(\"../Feature.js\").default} feature Feature\n * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n * @private\n */\n writeGeometryCollectionGeometry_(feature, geometry) {\n const geometries = geometry.getGeometriesArray();\n for (let i = 0; i < geometries.length; ++i) {\n const segmentWriter = this.SEGMENT_WRITERS_[geometries[i].getType()];\n if (segmentWriter) {\n segmentWriter(feature, geometries[i]);\n }\n }\n }\n\n /**\n * @param {import(\"../Feature.js\").default} feature Feature\n * @param {import(\"../geom/LineString.js\").default} geometry Geometry.\n * @private\n */\n writeLineStringGeometry_(feature, geometry) {\n const coordinates = geometry.getCoordinates();\n for (let i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n const segment = coordinates.slice(i, i + 2);\n const segmentData = {\n feature: feature,\n segment: segment,\n };\n this.rBush_.insert(boundingExtent(segment), segmentData);\n }\n }\n\n /**\n * @param {import(\"../Feature.js\").default} feature Feature\n * @param {import(\"../geom/MultiLineString.js\").default} geometry Geometry.\n * @private\n */\n writeMultiLineStringGeometry_(feature, geometry) {\n const lines = geometry.getCoordinates();\n for (let j = 0, jj = lines.length; j < jj; ++j) {\n const coordinates = lines[j];\n for (let i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n const segment = coordinates.slice(i, i + 2);\n const segmentData = {\n feature: feature,\n segment: segment,\n };\n this.rBush_.insert(boundingExtent(segment), segmentData);\n }\n }\n }\n\n /**\n * @param {import(\"../Feature.js\").default} feature Feature\n * @param {import(\"../geom/MultiPoint.js\").default} geometry Geometry.\n * @private\n */\n writeMultiPointGeometry_(feature, geometry) {\n const points = geometry.getCoordinates();\n for (let i = 0, ii = points.length; i < ii; ++i) {\n const coordinates = points[i];\n const segmentData = {\n feature: feature,\n segment: [coordinates, coordinates],\n };\n this.rBush_.insert(geometry.getExtent(), segmentData);\n }\n }\n\n /**\n * @param {import(\"../Feature.js\").default} feature Feature\n * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n * @private\n */\n writeMultiPolygonGeometry_(feature, geometry) {\n const polygons = geometry.getCoordinates();\n for (let k = 0, kk = polygons.length; k < kk; ++k) {\n const rings = polygons[k];\n for (let j = 0, jj = rings.length; j < jj; ++j) {\n const coordinates = rings[j];\n for (let i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n const segment = coordinates.slice(i, i + 2);\n const segmentData = {\n feature: feature,\n segment: segment,\n };\n this.rBush_.insert(boundingExtent(segment), segmentData);\n }\n }\n }\n }\n\n /**\n * @param {import(\"../Feature.js\").default} feature Feature\n * @param {import(\"../geom/Point.js\").default} geometry Geometry.\n * @private\n */\n writePointGeometry_(feature, geometry) {\n const coordinates = geometry.getCoordinates();\n const segmentData = {\n feature: feature,\n segment: [coordinates, coordinates],\n };\n this.rBush_.insert(geometry.getExtent(), segmentData);\n }\n\n /**\n * @param {import(\"../Feature.js\").default} feature Feature\n * @param {import(\"../geom/Polygon.js\").default} geometry Geometry.\n * @private\n */\n writePolygonGeometry_(feature, geometry) {\n const rings = geometry.getCoordinates();\n for (let j = 0, jj = rings.length; j < jj; ++j) {\n const coordinates = rings[j];\n for (let i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n const segment = coordinates.slice(i, i + 2);\n const segmentData = {\n feature: feature,\n segment: segment,\n };\n this.rBush_.insert(boundingExtent(segment), segmentData);\n }\n }\n }\n}\n\nexport default Snap;\n","/**\n * @module ol/interaction/Translate\n */\nimport Collection from '../Collection.js';\nimport Event from '../events/Event.js';\nimport InteractionProperty from './Property.js';\nimport PointerInteraction from './Pointer.js';\nimport {TRUE} from '../functions.js';\nimport {getChangeEventType} from '../Object.js';\nimport {includes} from '../array.js';\n\n/**\n * @enum {string}\n */\nconst TranslateEventType = {\n /**\n * Triggered upon feature translation start.\n * @event TranslateEvent#translatestart\n * @api\n */\n TRANSLATESTART: 'translatestart',\n /**\n * Triggered upon feature translation.\n * @event TranslateEvent#translating\n * @api\n */\n TRANSLATING: 'translating',\n /**\n * Triggered upon feature translation end.\n * @event TranslateEvent#translateend\n * @api\n */\n TRANSLATEEND: 'translateend',\n};\n\n/**\n * A function that takes an {@link module:ol/Feature} or\n * {@link module:ol/render/Feature} and an\n * {@link module:ol/layer/Layer} and returns `true` if the feature may be\n * translated or `false` otherwise.\n * @typedef {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default):boolean} FilterFunction\n */\n\n/**\n * @typedef {Object} Options\n * @property {Collection<import(\"../Feature.js\").default>} [features] Only features contained in this collection will be able to be translated. If\n * not specified, all features on the map will be able to be translated.\n * @property {Array<import(\"../layer/Layer.js\").default>|function(import(\"../layer/Layer.js\").default): boolean} [layers] A list of layers from which features should be\n * translated. Alternatively, a filter function can be provided. The\n * function will be called for each layer in the map and should return\n * `true` for layers that you want to be translatable. If the option is\n * absent, all visible layers will be considered translatable.\n * @property {FilterFunction} [filter] A function\n * that takes an {@link module:ol/Feature} and an\n * {@link module:ol/layer/Layer} and returns `true` if the feature may be\n * translated or `false` otherwise.\n * @property {number} [hitTolerance=0] Hit-detection tolerance. Pixels inside the radius around the given position\n * will be checked for features.\n */\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Translate~Translate} instances\n * are instances of this type.\n */\nexport class TranslateEvent extends Event {\n /**\n * @param {TranslateEventType} type Type.\n * @param {Collection<import(\"../Feature.js\").default>} features The features translated.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate The event coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} startCoordinate The original coordinates before.translation started\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n */\n constructor(type, features, coordinate, startCoordinate, mapBrowserEvent) {\n super(type);\n\n /**\n * The features being translated.\n * @type {Collection<import(\"../Feature.js\").default>}\n * @api\n */\n this.features = features;\n\n /**\n * The coordinate of the drag event.\n * @const\n * @type {import(\"../coordinate.js\").Coordinate}\n * @api\n */\n this.coordinate = coordinate;\n\n /**\n * The coordinate of the start position before translation started.\n * @const\n * @type {import(\"../coordinate.js\").Coordinate}\n * @api\n */\n this.startCoordinate = startCoordinate;\n\n /**\n * Associated {@link module:ol/MapBrowserEvent}.\n * @type {import(\"../MapBrowserEvent.js\").default}\n * @api\n */\n this.mapBrowserEvent = mapBrowserEvent;\n }\n}\n\n/**\n * @classdesc\n * Interaction for translating (moving) features.\n *\n * @fires TranslateEvent\n * @api\n */\nclass Translate extends PointerInteraction {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n super(/** @type {import(\"./Pointer.js\").Options} */ (options));\n\n /**\n * The last position we translated to.\n * @type {import(\"../coordinate.js\").Coordinate}\n * @private\n */\n this.lastCoordinate_ = null;\n\n /**\n * The start position before translation started.\n * @type {import(\"../coordinate.js\").Coordinate}\n * @private\n */\n this.startCoordinate_ = null;\n\n /**\n * @type {Collection<import(\"../Feature.js\").default>}\n * @private\n */\n this.features_ = options.features !== undefined ? options.features : null;\n\n /** @type {function(import(\"../layer/Layer.js\").default): boolean} */\n let layerFilter;\n if (options.layers) {\n if (typeof options.layers === 'function') {\n layerFilter = options.layers;\n } else {\n const layers = options.layers;\n layerFilter = function (layer) {\n return includes(layers, layer);\n };\n }\n } else {\n layerFilter = TRUE;\n }\n\n /**\n * @private\n * @type {function(import(\"../layer/Layer.js\").default): boolean}\n */\n this.layerFilter_ = layerFilter;\n\n /**\n * @private\n * @type {FilterFunction}\n */\n this.filter_ = options.filter ? options.filter : TRUE;\n\n /**\n * @private\n * @type {number}\n */\n this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;\n\n /**\n * @type {import(\"../Feature.js\").default}\n * @private\n */\n this.lastFeature_ = null;\n\n this.addEventListener(\n getChangeEventType(InteractionProperty.ACTIVE),\n this.handleActiveChanged_\n );\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @return {boolean} If the event was consumed.\n */\n handleDownEvent(event) {\n this.lastFeature_ = this.featuresAtPixel_(event.pixel, event.map);\n if (!this.lastCoordinate_ && this.lastFeature_) {\n this.startCoordinate_ = event.coordinate;\n this.lastCoordinate_ = event.coordinate;\n this.handleMoveEvent(event);\n\n const features = this.features_ || new Collection([this.lastFeature_]);\n\n this.dispatchEvent(\n new TranslateEvent(\n TranslateEventType.TRANSLATESTART,\n features,\n event.coordinate,\n this.startCoordinate_,\n event\n )\n );\n return true;\n }\n return false;\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(event) {\n if (this.lastCoordinate_) {\n this.lastCoordinate_ = null;\n this.handleMoveEvent(event);\n\n const features = this.features_ || new Collection([this.lastFeature_]);\n\n this.dispatchEvent(\n new TranslateEvent(\n TranslateEventType.TRANSLATEEND,\n features,\n event.coordinate,\n this.startCoordinate_,\n event\n )\n );\n // cleanup\n this.startCoordinate_ = null;\n return true;\n }\n return false;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n */\n handleDragEvent(event) {\n if (this.lastCoordinate_) {\n const newCoordinate = event.coordinate;\n const deltaX = newCoordinate[0] - this.lastCoordinate_[0];\n const deltaY = newCoordinate[1] - this.lastCoordinate_[1];\n\n const features = this.features_ || new Collection([this.lastFeature_]);\n\n features.forEach(function (feature) {\n const geom = feature.getGeometry();\n geom.translate(deltaX, deltaY);\n feature.setGeometry(geom);\n });\n\n this.lastCoordinate_ = newCoordinate;\n\n this.dispatchEvent(\n new TranslateEvent(\n TranslateEventType.TRANSLATING,\n features,\n newCoordinate,\n this.startCoordinate_,\n event\n )\n );\n }\n }\n\n /**\n * Handle pointer move events.\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n */\n handleMoveEvent(event) {\n const elem = event.map.getViewport();\n\n // Change the cursor to grab/grabbing if hovering any of the features managed\n // by the interaction\n if (this.featuresAtPixel_(event.pixel, event.map)) {\n elem.classList.remove(this.lastCoordinate_ ? 'ol-grab' : 'ol-grabbing');\n elem.classList.add(this.lastCoordinate_ ? 'ol-grabbing' : 'ol-grab');\n } else {\n elem.classList.remove('ol-grab', 'ol-grabbing');\n }\n }\n\n /**\n * Tests to see if the given coordinates intersects any of our selected\n * features.\n * @param {import(\"../pixel.js\").Pixel} pixel Pixel coordinate to test for intersection.\n * @param {import(\"../PluggableMap.js\").default} map Map to test the intersection on.\n * @return {import(\"../Feature.js\").default} Returns the feature found at the specified pixel\n * coordinates.\n * @private\n */\n featuresAtPixel_(pixel, map) {\n return map.forEachFeatureAtPixel(\n pixel,\n function (feature, layer) {\n if (this.filter_(feature, layer)) {\n if (!this.features_ || includes(this.features_.getArray(), feature)) {\n return feature;\n }\n }\n }.bind(this),\n {\n layerFilter: this.layerFilter_,\n hitTolerance: this.hitTolerance_,\n }\n );\n }\n\n /**\n * Returns the Hit-detection tolerance.\n * @returns {number} Hit tolerance in pixels.\n * @api\n */\n getHitTolerance() {\n return this.hitTolerance_;\n }\n\n /**\n * Hit-detection tolerance. Pixels inside the radius around the given position\n * will be checked for features.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @api\n */\n setHitTolerance(hitTolerance) {\n this.hitTolerance_ = hitTolerance;\n }\n\n /**\n * Remove the interaction from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n */\n setMap(map) {\n const oldMap = this.getMap();\n super.setMap(map);\n this.updateState_(oldMap);\n }\n\n /**\n * @private\n */\n handleActiveChanged_() {\n this.updateState_(null);\n }\n\n /**\n * @param {import(\"../PluggableMap.js\").default} oldMap Old map.\n * @private\n */\n updateState_(oldMap) {\n let map = this.getMap();\n const active = this.getActive();\n if (!map || !active) {\n map = map || oldMap;\n if (map) {\n const elem = map.getViewport();\n elem.classList.remove('ol-grab', 'ol-grabbing');\n }\n }\n }\n}\n\nexport default Translate;\n","/**\n * @module ol/interaction\n */\nimport Collection from './Collection.js';\nimport DoubleClickZoom from './interaction/DoubleClickZoom.js';\nimport DragPan from './interaction/DragPan.js';\nimport DragRotate from './interaction/DragRotate.js';\nimport DragZoom from './interaction/DragZoom.js';\nimport KeyboardPan from './interaction/KeyboardPan.js';\nimport KeyboardZoom from './interaction/KeyboardZoom.js';\nimport Kinetic from './Kinetic.js';\nimport MouseWheelZoom from './interaction/MouseWheelZoom.js';\nimport PinchRotate from './interaction/PinchRotate.js';\nimport PinchZoom from './interaction/PinchZoom.js';\n\nexport {default as DoubleClickZoom} from './interaction/DoubleClickZoom.js';\nexport {default as DragAndDrop} from './interaction/DragAndDrop.js';\nexport {default as DragBox} from './interaction/DragBox.js';\nexport {default as DragPan} from './interaction/DragPan.js';\nexport {default as DragRotate} from './interaction/DragRotate.js';\nexport {default as DragRotateAndZoom} from './interaction/DragRotateAndZoom.js';\nexport {default as DragZoom} from './interaction/DragZoom.js';\nexport {default as Draw} from './interaction/Draw.js';\nexport {default as Extent} from './interaction/Extent.js';\nexport {default as Interaction} from './interaction/Interaction.js';\nexport {default as KeyboardPan} from './interaction/KeyboardPan.js';\nexport {default as KeyboardZoom} from './interaction/KeyboardZoom.js';\nexport {default as Modify} from './interaction/Modify.js';\nexport {default as MouseWheelZoom} from './interaction/MouseWheelZoom.js';\nexport {default as PinchRotate} from './interaction/PinchRotate.js';\nexport {default as PinchZoom} from './interaction/PinchZoom.js';\nexport {default as Pointer} from './interaction/Pointer.js';\nexport {default as Select} from './interaction/Select.js';\nexport {default as Snap} from './interaction/Snap.js';\nexport {default as Translate} from './interaction/Translate.js';\n\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [altShiftDragRotate=true] Whether Alt-Shift-drag rotate is\n * desired.\n * @property {boolean} [onFocusOnly=false] Interact only when the map has the\n * focus. This affects the `MouseWheelZoom` and `DragPan` interactions and is\n * useful when page scroll is desired for maps that do not have the browser's\n * focus.\n * @property {boolean} [doubleClickZoom=true] Whether double click zoom is\n * desired.\n * @property {boolean} [keyboard=true] Whether keyboard interaction is desired.\n * @property {boolean} [mouseWheelZoom=true] Whether mousewheel zoom is desired.\n * @property {boolean} [shiftDragZoom=true] Whether Shift-drag zoom is desired.\n * @property {boolean} [dragPan=true] Whether drag pan is desired.\n * @property {boolean} [pinchRotate=true] Whether pinch rotate is desired.\n * @property {boolean} [pinchZoom=true] Whether pinch zoom is desired.\n * @property {number} [zoomDelta] Zoom level delta when using keyboard or double click zoom.\n * @property {number} [zoomDuration] Duration of the zoom animation in\n * milliseconds.\n */\n\n/**\n * Set of interactions included in maps by default. Specific interactions can be\n * excluded by setting the appropriate option to false in the constructor\n * options, but the order of the interactions is fixed. If you want to specify\n * a different order for interactions, you will need to create your own\n * {@link module:ol/interaction/Interaction} instances and insert\n * them into a {@link module:ol/Collection} in the order you want\n * before creating your {@link module:ol/Map~Map} instance. Changing the order can\n * be of interest if the event propagation needs to be stopped at a point.\n * The default set of interactions, in sequence, is:\n * * {@link module:ol/interaction/DragRotate~DragRotate}\n * * {@link module:ol/interaction/DoubleClickZoom~DoubleClickZoom}\n * * {@link module:ol/interaction/DragPan~DragPan}\n * * {@link module:ol/interaction/PinchRotate~PinchRotate}\n * * {@link module:ol/interaction/PinchZoom~PinchZoom}\n * * {@link module:ol/interaction/KeyboardPan~KeyboardPan}\n * * {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}\n * * {@link module:ol/interaction/MouseWheelZoom~MouseWheelZoom}\n * * {@link module:ol/interaction/DragZoom~DragZoom}\n *\n * @param {DefaultsOptions=} opt_options Defaults options.\n * @return {import(\"./Collection.js\").default<import(\"./interaction/Interaction.js\").default>}\n * A collection of interactions to be used with the {@link module:ol/Map~Map}\n * constructor's `interactions` option.\n * @api\n */\nexport function defaults(opt_options) {\n const options = opt_options ? opt_options : {};\n\n const interactions = new Collection();\n\n const kinetic = new Kinetic(-0.005, 0.05, 100);\n\n const altShiftDragRotate =\n options.altShiftDragRotate !== undefined\n ? options.altShiftDragRotate\n : true;\n if (altShiftDragRotate) {\n interactions.push(new DragRotate());\n }\n\n const doubleClickZoom =\n options.doubleClickZoom !== undefined ? options.doubleClickZoom : true;\n if (doubleClickZoom) {\n interactions.push(\n new DoubleClickZoom({\n delta: options.zoomDelta,\n duration: options.zoomDuration,\n })\n );\n }\n\n const dragPan = options.dragPan !== undefined ? options.dragPan : true;\n if (dragPan) {\n interactions.push(\n new DragPan({\n onFocusOnly: options.onFocusOnly,\n kinetic: kinetic,\n })\n );\n }\n\n const pinchRotate =\n options.pinchRotate !== undefined ? options.pinchRotate : true;\n if (pinchRotate) {\n interactions.push(new PinchRotate());\n }\n\n const pinchZoom = options.pinchZoom !== undefined ? options.pinchZoom : true;\n if (pinchZoom) {\n interactions.push(\n new PinchZoom({\n duration: options.zoomDuration,\n })\n );\n }\n\n const keyboard = options.keyboard !== undefined ? options.keyboard : true;\n if (keyboard) {\n interactions.push(new KeyboardPan());\n interactions.push(\n new KeyboardZoom({\n delta: options.zoomDelta,\n duration: options.zoomDuration,\n })\n );\n }\n\n const mouseWheelZoom =\n options.mouseWheelZoom !== undefined ? options.mouseWheelZoom : true;\n if (mouseWheelZoom) {\n interactions.push(\n new MouseWheelZoom({\n onFocusOnly: options.onFocusOnly,\n duration: options.zoomDuration,\n })\n );\n }\n\n const shiftDragZoom =\n options.shiftDragZoom !== undefined ? options.shiftDragZoom : true;\n if (shiftDragZoom) {\n interactions.push(\n new DragZoom({\n duration: options.zoomDuration,\n })\n );\n }\n\n return interactions;\n}\n","/**\n * @module ol/Map\n */\nimport CompositeMapRenderer from './renderer/Composite.js';\nimport PluggableMap from './PluggableMap.js';\nimport {assign} from './obj.js';\nimport {defaults as defaultControls} from './control.js';\nimport {defaults as defaultInteractions} from './interaction.js';\n\n/**\n * @classdesc\n * The map is the core component of OpenLayers. For a map to render, a view,\n * one or more layers, and a target container are needed:\n *\n * import Map from 'ol/Map';\n * import View from 'ol/View';\n * import TileLayer from 'ol/layer/Tile';\n * import OSM from 'ol/source/OSM';\n *\n * var map = new Map({\n * view: new View({\n * center: [0, 0],\n * zoom: 1\n * }),\n * layers: [\n * new TileLayer({\n * source: new OSM()\n * })\n * ],\n * target: 'map'\n * });\n *\n * The above snippet creates a map using a {@link module:ol/layer/Tile} to\n * display {@link module:ol/source/OSM~OSM} OSM data and render it to a DOM\n * element with the id `map`.\n *\n * The constructor places a viewport container (with CSS class name\n * `ol-viewport`) in the target element (see `getViewport()`), and then two\n * further elements within the viewport: one with CSS class name\n * `ol-overlaycontainer-stopevent` for controls and some overlays, and one with\n * CSS class name `ol-overlaycontainer` for other overlays (see the `stopEvent`\n * option of {@link module:ol/Overlay~Overlay} for the difference). The map\n * itself is placed in a further element within the viewport.\n *\n * Layers are stored as a {@link module:ol/Collection~Collection} in\n * layerGroups. A top-level group is provided by the library. This is what is\n * accessed by `getLayerGroup` and `setLayerGroup`. Layers entered in the\n * options are added to this group, and `addLayer` and `removeLayer` change the\n * layer collection in the group. `getLayers` is a convenience function for\n * `getLayerGroup().getLayers()`. Note that {@link module:ol/layer/Group~Group}\n * is a subclass of {@link module:ol/layer/Base}, so layers entered in the\n * options or added with `addLayer` can be groups, which can contain further\n * groups, and so on.\n *\n * @api\n */\nclass Map extends PluggableMap {\n /**\n * @param {import(\"./PluggableMap.js\").MapOptions} options Map options.\n */\n constructor(options) {\n options = assign({}, options);\n if (!options.controls) {\n options.controls = defaultControls();\n }\n if (!options.interactions) {\n options.interactions = defaultInteractions({\n onFocusOnly: true,\n });\n }\n\n super(options);\n }\n\n createRenderer() {\n return new CompositeMapRenderer(this);\n }\n}\n\nexport default Map;\n","/**\n * @module ol/structs/LRUCache\n */\n\nimport {assert} from '../asserts.js';\n\n/**\n * @typedef {Object} Entry\n * @property {string} key_\n * @property {Object} newer\n * @property {Object} older\n * @property {*} value_\n */\n\n/**\n * @classdesc\n * Implements a Least-Recently-Used cache where the keys do not conflict with\n * Object's properties (e.g. 'hasOwnProperty' is not allowed as a key). Expiring\n * items from the cache is the responsibility of the user.\n *\n * @fires import(\"../events/Event.js\").default\n * @template T\n */\nclass LRUCache {\n /**\n * @param {number=} opt_highWaterMark High water mark.\n */\n constructor(opt_highWaterMark) {\n /**\n * Desired max cache size after expireCache(). If set to 0, no cache entries\n * will be pruned at all.\n * @type {number}\n */\n this.highWaterMark =\n opt_highWaterMark !== undefined ? opt_highWaterMark : 2048;\n\n /**\n * @private\n * @type {number}\n */\n this.count_ = 0;\n\n /**\n * @private\n * @type {!Object<string, Entry>}\n */\n this.entries_ = {};\n\n /**\n * @private\n * @type {?Entry}\n */\n this.oldest_ = null;\n\n /**\n * @private\n * @type {?Entry}\n */\n this.newest_ = null;\n }\n\n /**\n * @return {boolean} Can expire cache.\n */\n canExpireCache() {\n return this.highWaterMark > 0 && this.getCount() > this.highWaterMark;\n }\n\n /**\n * FIXME empty description for jsdoc\n */\n clear() {\n this.count_ = 0;\n this.entries_ = {};\n this.oldest_ = null;\n this.newest_ = null;\n }\n\n /**\n * @param {string} key Key.\n * @return {boolean} Contains key.\n */\n containsKey(key) {\n return this.entries_.hasOwnProperty(key);\n }\n\n /**\n * @param {function(T, string, LRUCache<T>): ?} f The function\n * to call for every entry from the oldest to the newer. This function takes\n * 3 arguments (the entry value, the entry key and the LRUCache object).\n * The return value is ignored.\n */\n forEach(f) {\n let entry = this.oldest_;\n while (entry) {\n f(entry.value_, entry.key_, this);\n entry = entry.newer;\n }\n }\n\n /**\n * @param {string} key Key.\n * @param {*=} opt_options Options (reserverd for subclasses).\n * @return {T} Value.\n */\n get(key, opt_options) {\n const entry = this.entries_[key];\n assert(entry !== undefined, 15); // Tried to get a value for a key that does not exist in the cache\n if (entry === this.newest_) {\n return entry.value_;\n } else if (entry === this.oldest_) {\n this.oldest_ = /** @type {Entry} */ (this.oldest_.newer);\n this.oldest_.older = null;\n } else {\n entry.newer.older = entry.older;\n entry.older.newer = entry.newer;\n }\n entry.newer = null;\n entry.older = this.newest_;\n this.newest_.newer = entry;\n this.newest_ = entry;\n return entry.value_;\n }\n\n /**\n * Remove an entry from the cache.\n * @param {string} key The entry key.\n * @return {T} The removed entry.\n */\n remove(key) {\n const entry = this.entries_[key];\n assert(entry !== undefined, 15); // Tried to get a value for a key that does not exist in the cache\n if (entry === this.newest_) {\n this.newest_ = /** @type {Entry} */ (entry.older);\n if (this.newest_) {\n this.newest_.newer = null;\n }\n } else if (entry === this.oldest_) {\n this.oldest_ = /** @type {Entry} */ (entry.newer);\n if (this.oldest_) {\n this.oldest_.older = null;\n }\n } else {\n entry.newer.older = entry.older;\n entry.older.newer = entry.newer;\n }\n delete this.entries_[key];\n --this.count_;\n return entry.value_;\n }\n\n /**\n * @return {number} Count.\n */\n getCount() {\n return this.count_;\n }\n\n /**\n * @return {Array<string>} Keys.\n */\n getKeys() {\n const keys = new Array(this.count_);\n let i = 0;\n let entry;\n for (entry = this.newest_; entry; entry = entry.older) {\n keys[i++] = entry.key_;\n }\n return keys;\n }\n\n /**\n * @return {Array<T>} Values.\n */\n getValues() {\n const values = new Array(this.count_);\n let i = 0;\n let entry;\n for (entry = this.newest_; entry; entry = entry.older) {\n values[i++] = entry.value_;\n }\n return values;\n }\n\n /**\n * @return {T} Last value.\n */\n peekLast() {\n return this.oldest_.value_;\n }\n\n /**\n * @return {string} Last key.\n */\n peekLastKey() {\n return this.oldest_.key_;\n }\n\n /**\n * Get the key of the newest item in the cache. Throws if the cache is empty.\n * @return {string} The newest key.\n */\n peekFirstKey() {\n return this.newest_.key_;\n }\n\n /**\n * @return {T} value Value.\n */\n pop() {\n const entry = this.oldest_;\n delete this.entries_[entry.key_];\n if (entry.newer) {\n entry.newer.older = null;\n }\n this.oldest_ = /** @type {Entry} */ (entry.newer);\n if (!this.oldest_) {\n this.newest_ = null;\n }\n --this.count_;\n return entry.value_;\n }\n\n /**\n * @param {string} key Key.\n * @param {T} value Value.\n */\n replace(key, value) {\n this.get(key); // update `newest_`\n this.entries_[key].value_ = value;\n }\n\n /**\n * @param {string} key Key.\n * @param {T} value Value.\n */\n set(key, value) {\n assert(!(key in this.entries_), 16); // Tried to set a value for a key that is used already\n const entry = {\n key_: key,\n newer: null,\n older: this.newest_,\n value_: value,\n };\n if (!this.newest_) {\n this.oldest_ = entry;\n } else {\n this.newest_.newer = entry;\n }\n this.newest_ = entry;\n this.entries_[key] = entry;\n ++this.count_;\n }\n\n /**\n * Set a maximum number of entries for the cache.\n * @param {number} size Cache size.\n * @api\n */\n setSize(size) {\n this.highWaterMark = size;\n }\n}\n\nexport default LRUCache;\n","/**\n * @module ol/tilecoord\n */\n\n/**\n * An array of three numbers representing the location of a tile in a tile\n * grid. The order is `z` (zoom level), `x` (column), and `y` (row).\n * @typedef {Array<number>} TileCoord\n * @api\n */\n\n/**\n * @param {number} z Z.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {TileCoord=} opt_tileCoord Tile coordinate.\n * @return {TileCoord} Tile coordinate.\n */\nexport function createOrUpdate(z, x, y, opt_tileCoord) {\n if (opt_tileCoord !== undefined) {\n opt_tileCoord[0] = z;\n opt_tileCoord[1] = x;\n opt_tileCoord[2] = y;\n return opt_tileCoord;\n } else {\n return [z, x, y];\n }\n}\n\n/**\n * @param {number} z Z.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {string} Key.\n */\nexport function getKeyZXY(z, x, y) {\n return z + '/' + x + '/' + y;\n}\n\n/**\n * Get the key for a tile coord.\n * @param {TileCoord} tileCoord The tile coord.\n * @return {string} Key.\n */\nexport function getKey(tileCoord) {\n return getKeyZXY(tileCoord[0], tileCoord[1], tileCoord[2]);\n}\n\n/**\n * Get a tile coord given a key.\n * @param {string} key The tile coord key.\n * @return {TileCoord} The tile coord.\n */\nexport function fromKey(key) {\n return key.split('/').map(Number);\n}\n\n/**\n * @param {TileCoord} tileCoord Tile coord.\n * @return {number} Hash.\n */\nexport function hash(tileCoord) {\n return (tileCoord[1] << tileCoord[0]) + tileCoord[2];\n}\n\n/**\n * @param {TileCoord} tileCoord Tile coordinate.\n * @param {!import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {boolean} Tile coordinate is within extent and zoom level range.\n */\nexport function withinExtentAndZ(tileCoord, tileGrid) {\n const z = tileCoord[0];\n const x = tileCoord[1];\n const y = tileCoord[2];\n\n if (tileGrid.getMinZoom() > z || z > tileGrid.getMaxZoom()) {\n return false;\n }\n const tileRange = tileGrid.getFullTileRange(z);\n if (!tileRange) {\n return true;\n } else {\n return tileRange.containsXY(x, y);\n }\n}\n","/**\n * @module ol/TileCache\n */\nimport LRUCache from './structs/LRUCache.js';\nimport {fromKey, getKey} from './tilecoord.js';\n\nclass TileCache extends LRUCache {\n /**\n * @param {!Object<string, boolean>} usedTiles Used tiles.\n */\n expireCache(usedTiles) {\n while (this.canExpireCache()) {\n const tile = this.peekLast();\n if (tile.getKey() in usedTiles) {\n break;\n } else {\n this.pop().release();\n }\n }\n }\n\n /**\n * Prune all tiles from the cache that don't have the same z as the newest tile.\n */\n pruneExceptNewestZ() {\n if (this.getCount() === 0) {\n return;\n }\n const key = this.peekFirstKey();\n const tileCoord = fromKey(key);\n const z = tileCoord[0];\n this.forEach(\n function (tile) {\n if (tile.tileCoord[0] !== z) {\n this.remove(getKey(tile.tileCoord));\n tile.release();\n }\n }.bind(this)\n );\n }\n}\n\nexport default TileCache;\n","/**\n * @module ol/TileRange\n */\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 */\nclass TileRange {\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 constructor(minX, maxX, minY, maxY) {\n /**\n * @type {number}\n */\n this.minX = minX;\n\n /**\n * @type {number}\n */\n this.maxX = maxX;\n\n /**\n * @type {number}\n */\n this.minY = minY;\n\n /**\n * @type {number}\n */\n this.maxY = maxY;\n }\n\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @return {boolean} Contains tile coordinate.\n */\n contains(tileCoord) {\n return this.containsXY(tileCoord[1], tileCoord[2]);\n }\n\n /**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Contains.\n */\n containsTileRange(tileRange) {\n return (\n this.minX <= tileRange.minX &&\n tileRange.maxX <= this.maxX &&\n this.minY <= tileRange.minY &&\n tileRange.maxY <= this.maxY\n );\n }\n\n /**\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @return {boolean} Contains coordinate.\n */\n containsXY(x, y) {\n return this.minX <= x && x <= this.maxX && this.minY <= y && y <= this.maxY;\n }\n\n /**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Equals.\n */\n equals(tileRange) {\n return (\n this.minX == tileRange.minX &&\n this.minY == tileRange.minY &&\n this.maxX == tileRange.maxX &&\n this.maxY == tileRange.maxY\n );\n }\n\n /**\n * @param {TileRange} tileRange Tile range.\n */\n extend(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 /**\n * @return {number} Height.\n */\n getHeight() {\n return this.maxY - this.minY + 1;\n }\n\n /**\n * @return {import(\"./size.js\").Size} Size.\n */\n getSize() {\n return [this.getWidth(), this.getHeight()];\n }\n\n /**\n * @return {number} Width.\n */\n getWidth() {\n return this.maxX - this.minX + 1;\n }\n\n /**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Intersects.\n */\n intersects(tileRange) {\n return (\n this.minX <= tileRange.maxX &&\n this.maxX >= tileRange.minX &&\n this.minY <= tileRange.maxY &&\n this.maxY >= tileRange.minY\n );\n }\n}\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 } else {\n return new TileRange(minX, maxX, minY, maxY);\n }\n}\n\nexport default TileRange;\n","/**\n * @module ol/VectorRenderTile\n */\nimport Tile from './Tile.js';\nimport {createCanvasContext2D} from './dom.js';\nimport {getUid} from './util.js';\n\n/**\n * @typedef {Object} ReplayState\n * @property {boolean} dirty\n * @property {null|import(\"./render.js\").OrderFunction} renderedRenderOrder\n * @property {number} renderedTileRevision\n * @property {number} renderedResolution\n * @property {number} renderedRevision\n * @property {number} renderedZ\n * @property {number} renderedTileResolution\n * @property {number} renderedTileZ\n */\n\n/**\n * @type {Array<HTMLCanvasElement>}\n */\nconst canvasPool = [];\n\nclass VectorRenderTile extends Tile {\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {import(\"./tilecoord.js\").TileCoord} urlTileCoord Wrapped tile coordinate for source urls.\n * @param {function(VectorRenderTile):Array<import(\"./VectorTile\").default>} getSourceTiles Function\n * to get source tiles for this tile.\n */\n constructor(tileCoord, state, urlTileCoord, getSourceTiles) {\n super(tileCoord, state, {transition: 0});\n\n /**\n * @private\n * @type {!Object<string, CanvasRenderingContext2D>}\n */\n this.context_ = {};\n\n /**\n * Executor groups by layer uid. Entries are read/written by the renderer.\n * @type {Object<string, Array<import(\"./render/canvas/ExecutorGroup.js\").default>>}\n */\n this.executorGroups = {};\n\n /**\n * Executor groups for decluttering, by layer uid. Entries are read/written by the renderer.\n * @type {Object<string, Array<import(\"./render/canvas/ExecutorGroup.js\").default>>}\n */\n this.declutterExecutorGroups = {};\n\n /**\n * Number of loading source tiles. Read/written by the source.\n * @type {number}\n */\n this.loadingSourceTiles = 0;\n\n /**\n * Tile keys of error source tiles. Read/written by the source.\n * @type {Object<string, boolean>}\n */\n this.errorSourceTileKeys = {};\n\n /**\n * @type {Object<number, ImageData>}\n */\n this.hitDetectionImageData = {};\n\n /**\n * @private\n * @type {!Object<string, ReplayState>}\n */\n this.replayState_ = {};\n\n /**\n * @type {Array<import(\"./VectorTile.js\").default>}\n */\n this.sourceTiles = null;\n\n /**\n * @type {number}\n */\n this.wantedResolution;\n\n /**\n * @type {!function():Array<import(\"./VectorTile.js\").default>}\n */\n this.getSourceTiles = getSourceTiles.bind(undefined, this);\n\n /**\n * z of the source tiles of the last getSourceTiles call.\n * @type {number}\n */\n this.sourceZ = -1;\n\n /**\n * True when all tiles for this tile's nominal resolution are available.\n * @type {boolean}\n */\n this.hifi = false;\n\n /**\n * @type {import(\"./tilecoord.js\").TileCoord}\n */\n this.wrappedTileCoord = urlTileCoord;\n }\n\n /**\n * @param {import(\"./layer/Layer.js\").default} layer Layer.\n * @return {CanvasRenderingContext2D} The rendering context.\n */\n getContext(layer) {\n const key = getUid(layer);\n if (!(key in this.context_)) {\n this.context_[key] = createCanvasContext2D(1, 1, canvasPool);\n }\n return this.context_[key];\n }\n\n /**\n * @param {import(\"./layer/Layer.js\").default} layer Layer.\n * @return {boolean} Tile has a rendering context for the given layer.\n */\n hasContext(layer) {\n return getUid(layer) in this.context_;\n }\n\n /**\n * Get the Canvas for this tile.\n * @param {import(\"./layer/Layer.js\").default} layer Layer.\n * @return {HTMLCanvasElement} Canvas.\n */\n getImage(layer) {\n return this.hasContext(layer) ? this.getContext(layer).canvas : null;\n }\n\n /**\n * @param {import(\"./layer/Layer.js\").default} layer Layer.\n * @return {ReplayState} The replay state.\n */\n getReplayState(layer) {\n const key = getUid(layer);\n if (!(key in this.replayState_)) {\n this.replayState_[key] = {\n dirty: false,\n renderedRenderOrder: null,\n renderedResolution: NaN,\n renderedRevision: -1,\n renderedTileResolution: NaN,\n renderedTileRevision: -1,\n renderedZ: -1,\n renderedTileZ: -1,\n };\n }\n return this.replayState_[key];\n }\n\n /**\n * Load the tile.\n */\n load() {\n this.getSourceTiles();\n }\n\n /**\n * Remove from the cache due to expiry\n */\n release() {\n for (const key in this.context_) {\n canvasPool.push(this.context_[key].canvas);\n delete this.context_[key];\n }\n super.release();\n }\n}\n\nexport default VectorRenderTile;\n","/**\n * @module ol/VectorTile\n */\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\n\nclass VectorTile extends Tile {\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {string} src Data source url.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @param {import(\"./Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n * @param {import(\"./Tile.js\").Options=} opt_options Tile options.\n */\n constructor(tileCoord, state, src, format, tileLoadFunction, opt_options) {\n super(tileCoord, state, opt_options);\n\n /**\n * Extent of this tile; set by the source.\n * @type {import(\"./extent.js\").Extent}\n */\n this.extent = null;\n\n /**\n * @private\n * @type {import(\"./format/Feature.js\").default}\n */\n this.format_ = format;\n\n /**\n * @private\n * @type {Array<import(\"./Feature.js\").default>}\n */\n this.features_ = null;\n\n /**\n * @private\n * @type {import(\"./featureloader.js\").FeatureLoader}\n */\n this.loader_;\n\n /**\n * Feature projection of this tile; set by the source.\n * @type {import(\"./proj/Projection.js\").default}\n */\n this.projection = null;\n\n /**\n * Resolution of this tile; set by the source.\n * @type {number}\n */\n this.resolution;\n\n /**\n * @private\n * @type {import(\"./Tile.js\").LoadFunction}\n */\n this.tileLoadFunction_ = tileLoadFunction;\n\n /**\n * @private\n * @type {string}\n */\n this.url_ = src;\n\n this.key = src;\n }\n\n /**\n * Get the feature format assigned for reading this tile's features.\n * @return {import(\"./format/Feature.js\").default} Feature format.\n * @api\n */\n getFormat() {\n return this.format_;\n }\n\n /**\n * Get the features for this tile. Geometries will be in the view projection.\n * @return {Array<import(\"./Feature.js\").FeatureLike>} Features.\n * @api\n */\n getFeatures() {\n return this.features_;\n }\n\n /**\n * Load not yet loaded URI.\n */\n load() {\n if (this.state == TileState.IDLE) {\n this.setState(TileState.LOADING);\n this.tileLoadFunction_(this, this.url_);\n if (this.loader_) {\n this.loader_(this.extent, this.resolution, this.projection);\n }\n }\n }\n\n /**\n * Handler for successful tile load.\n * @param {Array<import(\"./Feature.js\").default>} features The loaded features.\n * @param {import(\"./proj/Projection.js\").default} dataProjection Data projection.\n */\n onLoad(features, dataProjection) {\n this.setFeatures(features);\n }\n\n /**\n * Handler for tile load errors.\n */\n onError() {\n this.setState(TileState.ERROR);\n }\n\n /**\n * Function for use in an {@link module:ol/source/VectorTile~VectorTile}'s `tileLoadFunction`.\n * Sets the features for the tile.\n * @param {Array<import(\"./Feature.js\").default>} features Features.\n * @api\n */\n setFeatures(features) {\n this.features_ = features;\n this.setState(TileState.LOADED);\n }\n\n /**\n * Set the feature loader for reading this tile's features.\n * @param {import(\"./featureloader.js\").FeatureLoader} loader Feature loader.\n * @api\n */\n setLoader(loader) {\n this.loader_ = loader;\n }\n}\n\nexport default VectorTile;\n","/*\nol-mapbox-style - Use Mapbox Style objects with OpenLayers\nCopyright 2016-present ol-mapbox-style contributors\nLicense: https://raw.githubusercontent.com/openlayers/ol-mapbox-style/master/LICENSE\n*/\n\nimport mb2css from 'mapbox-to-css-font';\nimport applyStyleFunction, {getValue} from './stylefunction';\nimport googleFonts from 'webfont-matcher/lib/fonts/google';\nimport {fromLonLat} from 'ol/proj';\nimport {createXYZ} from 'ol/tilegrid';\nimport TileGrid from 'ol/tilegrid/TileGrid';\nimport Map from 'ol/Map';\nimport View from 'ol/View';\nimport GeoJSON from 'ol/format/GeoJSON';\nimport MVT from 'ol/format/MVT';\nimport {unByKey} from 'ol/Observable';\nimport TileLayer from 'ol/layer/Tile';\nimport VectorLayer from 'ol/layer/Vector';\nimport VectorTileLayer from 'ol/layer/VectorTile';\nimport TileJSON from 'ol/source/TileJSON';\nimport VectorSource from 'ol/source/Vector';\nimport VectorTileSource from 'ol/source/VectorTile';\nimport {Color} from '@mapbox/mapbox-gl-style-spec';\nimport {assign, defaultResolutions} from './util';\n\n/**\n * @typedef {import(\"ol/Map\").default} PluggableMap\n * @typedef {import(\"ol/layer/Layer\").default} Layer\n * @typedef {import(\"ol/source/Source\").default} Source\n * @private\n */\n\nconst tilejsonCache = {};\n\nconst fontFamilyRegEx = /font-family: ?([^;]*);/;\nconst stripQuotesRegEx = /(\"|')/g;\nlet loadedFontFamilies;\nfunction hasFontFamily(family) {\n if (!loadedFontFamilies) {\n loadedFontFamilies = {};\n const styleSheets = document.styleSheets;\n for (let i = 0, ii = styleSheets.length; i < ii; ++i) {\n const styleSheet = /** @type {CSSStyleSheet} */ (styleSheets[i]);\n try {\n const cssRules = styleSheet.rules || styleSheet.cssRules;\n if (cssRules) {\n for (let j = 0, jj = cssRules.length; j < jj; ++j) {\n const cssRule = cssRules[j];\n if (cssRule.type == 5) {\n const match = cssRule.cssText.match(fontFamilyRegEx);\n loadedFontFamilies[match[1].replace(stripQuotesRegEx, '')] = true;\n }\n }\n }\n } catch (e) {\n // empty catch block\n }\n }\n }\n return family in loadedFontFamilies;\n}\n\nconst processedFontFamilies = {};\nconst googleFamilies = googleFonts.getNames();\n\n/**\n * @private\n * @param {Array} fonts Fonts.\n * @return {Array} Processed fonts.\n */\nfunction getFonts(fonts) {\n const fontsKey = fonts.toString();\n if (fontsKey in processedFontFamilies) {\n return fonts;\n }\n const googleFontDescriptions = fonts.map(function(font) {\n const parts = mb2css(font, 1).split(' ');\n return [parts.slice(3).join(' ').replace(/\"/g, ''), parts[1] + parts[0]];\n });\n for (let i = 0, ii = googleFontDescriptions.length; i < ii; ++i) {\n const googleFontDescription = googleFontDescriptions[i];\n const family = googleFontDescription[0];\n if (!hasFontFamily(family) && googleFamilies.indexOf(family) !== -1) {\n const fontUrl = 'https://fonts.googleapis.com/css?family=' + family.replace(/ /g, '+') + ':' + googleFontDescription[1];\n if (!document.querySelector('link[href=\"' + fontUrl + '\"]')) {\n const markup = document.createElement('link');\n markup.href = fontUrl;\n markup.rel = 'stylesheet';\n document.head.appendChild(markup);\n }\n }\n }\n processedFontFamilies[fontsKey] = true;\n return fonts;\n}\n\nconst spriteRegEx = /^(.*)(\\?.*)$/;\n\nfunction withPath(url, path) {\n if (path && url.indexOf('.') === 0) {\n url = path + url;\n }\n return url;\n}\n\nfunction toSpriteUrl(url, path, extension) {\n url = withPath(url, path);\n const parts = url.match(spriteRegEx);\n return parts ?\n parts[1] + extension + (parts.length > 2 ? parts[2] : '') :\n url + extension;\n}\n\n/**\n * ```js\n * import {applyStyle} from 'ol-mapbox-style';\n * ```\n *\n * Applies a style function to an `ol.layer.VectorTile` or `ol.layer.Vector`\n * with an `ol.source.VectorTile` or an `ol.source.Vector`. The style function\n * will render all layers from the `glStyle` object that use the specified\n * `source`, or a subset of layers from the same source. The source needs to be\n * a `\"type\": \"vector\"` or `\"type\": \"geojson\"` source.\n *\n * Two additional properties will be set on the provided layer:\n *\n * * `mapbox-source`: The `id` of the Mapbox Style document's source that the\n * OpenLayers layer was created from. Usually `apply()` creates one\n * OpenLayers layer per Mapbox Style source, unless the layer stack has\n * layers from different sources in between.\n * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are\n * included in the OpenLayers layer.\n *\n * @param {VectorTileLayer|VectorLayer} layer OpenLayers layer.\n * @param {string|Object} glStyle Mapbox Style object.\n * @param {string|Array<string>} source `source` key or an array of layer `id`s from the\n * Mapbox Style object. When a `source` key is provided, all layers for the\n * specified source will be included in the style function. When layer `id`s\n * are provided, they must be from layers that use the same source.\n * @param {string} [path=undefined] Path of the style file. Only required when\n * a relative path is used with the `\"sprite\"` property of the style.\n * @param {Array<number>} [resolutions=undefined] Resolutions for mapping resolution to zoom level.\n * @return {Promise} Promise which will be resolved when the style can be used\n * for rendering.\n */\nexport function applyStyle(layer, glStyle, source, path, resolutions) {\n return new Promise(function(resolve, reject) {\n\n // TODO: figure out where best place to check source type is\n // Note that the source arg is an array of gl layer ids and each must be\n // dereferenced to get source type to validate\n if (typeof glStyle != 'object') {\n glStyle = JSON.parse(glStyle);\n }\n if (glStyle.version != 8) {\n return reject(new Error('glStyle version 8 required.'));\n }\n if (!(layer instanceof VectorLayer || layer instanceof VectorTileLayer)) {\n return reject(new Error('Can only apply to VectorLayer or VectorTileLayer'));\n }\n\n let spriteScale, spriteData, spriteImageUrl, style;\n function onChange() {\n if (!style && (!glStyle.sprite || spriteData)) {\n style = applyStyleFunction(layer, glStyle, source, resolutions, spriteData, spriteImageUrl, getFonts);\n if (!layer.getStyle()) {\n reject(new Error(`Nothing to show for source [${source}]`));\n } else {\n resolve();\n }\n } else if (style) {\n layer.setStyle(style);\n resolve();\n } else {\n reject(new Error('Something went wrong trying to apply style.'));\n }\n }\n\n if (glStyle.sprite) {\n spriteScale = window.devicePixelRatio >= 1.5 ? 0.5 : 1;\n const sizeFactor = spriteScale == 0.5 ? '@2x' : '';\n let spriteUrl = toSpriteUrl(glStyle.sprite, path, sizeFactor + '.json');\n\n fetch(spriteUrl, {credentials: 'same-origin'})\n .then(function(response) {\n if (!response.ok && (sizeFactor !== '')) {\n spriteUrl = toSpriteUrl(glStyle.sprite, path, '.json');\n return fetch(spriteUrl, {credentials: 'same-origin'});\n } else {\n return response;\n }\n })\n .then(function(response) {\n if (response.ok) {\n return response.json();\n } else {\n reject(new Error(`Problem fetching sprite from ${spriteUrl}: ${response.statusText}`));\n }\n })\n .then(function(spritesJson) {\n if ((spritesJson === undefined)) {\n return reject(new Error('No sprites found.'));\n }\n spriteData = spritesJson;\n spriteImageUrl = toSpriteUrl(glStyle.sprite, path, sizeFactor + '.png');\n onChange();\n })\n .catch(function(err) {\n reject(new Error(`Sprites cannot be loaded: ${spriteUrl}: ${err.message}`));\n });\n } else {\n onChange();\n }\n\n });\n}\n\nconst emptyObj = {};\n\nfunction setBackground(map, layer) {\n const background = {\n type: layer.type\n };\n function updateStyle() {\n const element = map.getTargetElement();\n if (!element) {\n return;\n }\n const layout = layer.layout || {};\n const paint = layer.paint || {};\n background['paint'] = paint;\n background.id = 'olms-bg-' + paint['background-opacity'] + paint['background-color'];\n const zoom = map.getView().getZoom();\n if (paint['background-color'] !== undefined) {\n const bg = getValue(background, 'paint', 'background-color', zoom, emptyObj);\n element.style.background = Color.parse(bg).toString();\n }\n if (paint['background-opacity'] !== undefined) {\n element.style.opacity = getValue(background, 'paint', 'background-opacity', zoom, emptyObj);\n }\n if (layout.visibility == 'none') {\n element.style.backgroundColor = '';\n element.style.opacity = '';\n }\n }\n if (map.getTargetElement()) {\n updateStyle();\n }\n map.on(['change:resolution', 'change:target'], updateStyle);\n}\n\n/**\n * ```js\n * import {applyBackground} from 'ol-mapbox-style';\n * ```\n * Applies properties of the Mapbox Style's first `background` layer to the map.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {Object} glStyle Mapbox Style object.\n */\nexport function applyBackground(map, glStyle) {\n glStyle.layers.some(function(l) {\n if (l.type == 'background') {\n setBackground(map, l);\n return true;\n }\n });\n}\n\nfunction getSourceIdByRef(layers, ref) {\n let sourceId;\n layers.some(function(layer) {\n if (layer.id == ref) {\n sourceId = layer.source;\n return true;\n }\n });\n return sourceId;\n}\n\nfunction extentFromTileJSON(tileJSON) {\n const bounds = tileJSON.bounds;\n if (bounds) {\n const ll = fromLonLat([bounds[0], bounds[1]]);\n const tr = fromLonLat([bounds[2], bounds[3]]);\n return [ll[0], ll[1], tr[0], tr[1]];\n }\n}\n\nfunction setupVectorLayer(glSource, accessToken, url) {\n glSource = assign({}, glSource);\n const layer = new VectorTileLayer({\n declutter: true,\n visible: false\n });\n const cacheKey = JSON.stringify(glSource);\n let tilejson = tilejsonCache[cacheKey];\n if (!tilejson) {\n tilejson = tilejsonCache[cacheKey] = new TileJSON({\n url: glSource.tiles ? undefined : url,\n tileJSON: glSource.tiles ? glSource : undefined\n });\n }\n const key = tilejson.on('change', function() {\n const state = tilejson.getState();\n if (state === 'ready') {\n const tileJSONDoc = tilejson.getTileJSON();\n const tiles = Array.isArray(tileJSONDoc.tiles) ? tileJSONDoc.tiles : [tileJSONDoc.tiles];\n if (url) {\n for (let i = 0, ii = tiles.length; i < ii; ++i) {\n const tile = tiles[i];\n if (tile.indexOf('http') != 0) {\n tiles[i] = url.replace(/\\/?$/, '/') + tile.replace(/^\\//, '');\n }\n }\n }\n const tileGrid = tilejson.getTileGrid();\n const extent = extentFromTileJSON(tileJSONDoc);\n const minZoom = tileJSONDoc.minzoom || 0;\n const maxZoom = tileJSONDoc.maxzoom || 22;\n let source = tilejson.get('ol-source');\n if (source === undefined) {\n source = new VectorTileSource({\n attributions: tilejson.getAttributions(),\n format: new MVT(),\n tileGrid: new TileGrid({\n origin: tileGrid.getOrigin(0),\n extent: extent || tileGrid.getExtent(),\n minZoom: minZoom,\n resolutions: defaultResolutions.slice(0, maxZoom + 1),\n tileSize: 512\n }),\n urls: tiles\n });\n tilejson.set('ol-source', source);\n }\n unByKey(key);\n layer.setSource(source);\n } else if (state === 'error') {\n tilejson.set('ol-source', null);\n unByKey(key);\n layer.setSource(undefined);\n }\n });\n if (tilejson.getState() === 'ready') {\n tilejson.changed();\n }\n return layer;\n}\n\nfunction setupRasterLayer(glSource, url) {\n const layer = new TileLayer();\n const source = new TileJSON({\n transition: 0,\n url: glSource.tiles ? undefined : url,\n tileJSON: glSource.tiles ? glSource : undefined,\n crossOrigin: 'anonymous'\n });\n const key = source.on('change', function() {\n const state = source.getState();\n if (state === 'ready') {\n unByKey(key);\n const tileJSONDoc = /** @type {Object} */ (source.getTileJSON());\n const extent = extentFromTileJSON(tileJSONDoc);\n const tileGrid = source.getTileGrid();\n const tileSize = glSource.tileSize || tileJSONDoc.tileSize || 512;\n const minZoom = tileJSONDoc.minzoom || 0;\n const maxZoom = tileJSONDoc.maxzoom || 22;\n // Only works when using ES modules\n source.tileGrid = new TileGrid({\n origin: tileGrid.getOrigin(0),\n extent: extent || tileGrid.getExtent(),\n minZoom: minZoom,\n resolutions: createXYZ({\n maxZoom: maxZoom,\n tileSize: tileSize\n }).getResolutions(),\n tileSize: tileSize\n });\n layer.setSource(source);\n } else if (state === 'error') {\n unByKey(key);\n layer.setSource(undefined);\n }\n });\n source.setTileLoadFunction(function(tile, src) {\n if (src.indexOf('{bbox-epsg-3857}') != -1) {\n const bbox = source.getTileGrid().getTileCoordExtent(tile.getTileCoord());\n src = src.replace('{bbox-epsg-3857}', bbox.toString());\n }\n const img = /** @type {import(\"ol/ImageTile\").default} */ (tile).getImage();\n /** @type {HTMLImageElement} */ (img).src = src;\n });\n return layer;\n}\n\nconst geoJsonFormat = new GeoJSON();\nfunction setupGeoJSONLayer(glSource, path) {\n const data = glSource.data;\n let features, geoJsonUrl;\n if (typeof data == 'string') {\n geoJsonUrl = withPath(data, path);\n } else {\n features = geoJsonFormat.readFeatures(data, {featureProjection: 'EPSG:3857'});\n }\n return new VectorLayer({\n source: new VectorSource({\n attributions: glSource.attribution,\n features: features,\n format: geoJsonFormat,\n url: geoJsonUrl\n }),\n visible: false\n });\n}\n\nfunction updateRasterLayerProperties(glLayer, layer, view) {\n const zoom = view.getZoom();\n const opacity = getValue(glLayer, 'paint', 'raster-opacity', zoom, emptyObj);\n layer.setOpacity(opacity);\n}\n\nfunction processStyle(glStyle, map, baseUrl, host, path, accessToken) {\n const promises = [];\n let view = map.getView();\n if (!view.isDef() && !view.getRotation() && !view.getResolutions()) {\n view = new View({\n maxResolution: defaultResolutions[0]\n });\n map.setView(view);\n }\n\n if ('center' in glStyle && !view.getCenter()) {\n view.setCenter(fromLonLat(glStyle.center));\n }\n if ('zoom' in glStyle && view.getZoom() === undefined) {\n view.setResolution(defaultResolutions[0] / Math.pow(2, glStyle.zoom));\n }\n if (!view.getCenter() || view.getZoom() === undefined) {\n view.fit(view.getProjection().getExtent(), {\n nearest: true,\n size: map.getSize()\n });\n }\n if (glStyle.sprite) {\n if (glStyle.sprite.indexOf('mapbox://') == 0) {\n glStyle.sprite = baseUrl + '/sprite' + accessToken;\n } else if (glStyle.sprite.indexOf('http') != 0) {\n glStyle.sprite = (host ? (host + path) : '') + glStyle.sprite + accessToken;\n }\n }\n\n const glLayers = glStyle.layers;\n let layerIds = [];\n\n let glLayer, glSource, glSourceId, id, layer, url;\n for (let i = 0, ii = glLayers.length; i < ii; ++i) {\n glLayer = glLayers[i];\n const type = glLayer.type;\n if (type == 'heatmap' || type == 'hillshade') {\n //FIXME Unsupported layer type\n } else if (type == 'background') {\n setBackground(map, glLayer);\n } else {\n id = glLayer.source || getSourceIdByRef(glLayers, glLayer.ref);\n // this technique assumes gl layers will be in a particular order\n if (id != glSourceId) {\n if (layerIds.length) {\n promises.push(finalizeLayer(layer, layerIds, glStyle, path, map));\n layerIds = [];\n }\n glSource = glStyle.sources[id];\n url = glSource.url;\n if (url) {\n url = withPath(url, path);\n if (url.indexOf('mapbox://') == 0) {\n const mapid = url.replace('mapbox://', '');\n glSource.tiles = ['a', 'b', 'c', 'd'].map(function(host) {\n return 'https://' + host + '.tiles.mapbox.com/v4/' + mapid +\n '/{z}/{x}/{y}.' +\n (glSource.type == 'vector' ? 'vector.pbf' : 'png') +\n accessToken;\n });\n } else if (url.indexOf('/') === 0 && host.indexOf('http') === 0) {\n url = host + url;\n }\n }\n\n\n if (glSource.type == 'vector') {\n layer = setupVectorLayer(glSource, accessToken, url);\n } else if (glSource.type == 'raster') {\n layer = setupRasterLayer(glSource, url);\n layer.setVisible(glLayer.layout ? glLayer.layout.visibility !== 'none' : true);\n view.on('change:resolution', updateRasterLayerProperties.bind(this, glLayer, layer, view));\n updateRasterLayerProperties(glLayer, layer, view);\n } else if (glSource.type == 'geojson') {\n layer = setupGeoJSONLayer(glSource, path);\n }\n glSourceId = id;\n if (layer) {\n layer.set('mapbox-source', glSourceId);\n }\n }\n layerIds.push(glLayer.id);\n }\n }\n promises.push(finalizeLayer(layer, layerIds, glStyle, path, map));\n map.set('mapbox-style', glStyle);\n return Promise.all(promises);\n}\n\n/**\n * ```js\n * import olms from 'ol-mapbox-style';\n * ```\n *\n * Loads and applies a Mapbox Style object to an OpenLayers Map. This includes\n * the map background, the layers, the center and the zoom.\n *\n * The center and zoom will only be set if present in the Mapbox Style document,\n * and if not already set on the OpenLayers map.\n *\n * Layers will be added to the OpenLayers map, without affecting any layers that\n * might already be set on the map.\n *\n * Layers added by `apply()` will have two additional properties:\n *\n * * `mapbox-source`: The `id` of the Mapbox Style document's source that the\n * OpenLayers layer was created from. Usually `apply()` creates one\n * OpenLayers layer per Mapbox Style source, unless the layer stack has\n * layers from different sources in between.\n * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are\n * included in the OpenLayers layer.\n *\n * This function sets an additional `mapbox-style` property on the OpenLayers\n * map instance, which holds the Mapbox Style object.\n *\n * @param {PluggableMap|HTMLElement|string} map Either an existing OpenLayers Map\n * instance, or a HTML element, or the id of a HTML element that will be the\n * target of a new OpenLayers Map.\n * @param {string|Object} style JSON style object or style url pointing to a\n * Mapbox Style object. When using Mapbox APIs, the url must contain an access\n * token and look like\n * `https://api.mapbox.com/styles/v1/mapbox/bright-v9?access_token=[your_access_token_here]`.\n * When passed as JSON style object, all OpenLayers layers created by `apply()`\n * will be immediately available, but they may not have a source yet (i.e. when\n * they are defined by a TileJSON url in the Mapbox Style document). When passed\n * as style url, layers will be added to the map when the Mapbox Style document\n * is loaded and parsed.\n * @return {Promise} A promise that resolves after all layers have been added to\n * the OpenLayers Map instance, their sources set, and their styles applied. the\n * `resolve` callback will be called with the OpenLayers Map instance as\n * argument.\n */\nexport default function olms(map, style) {\n\n let accessToken, baseUrl, host, path, promise;\n accessToken = baseUrl = host = path = '';\n\n if (typeof map === 'string' || map instanceof HTMLElement) {\n map = new Map({\n target: map\n });\n }\n\n if (typeof style === 'string') {\n const parts = style.match(spriteRegEx);\n if (parts) {\n baseUrl = parts[1];\n accessToken = parts.length > 2 ? parts[2] : '';\n }\n promise = new Promise(function(resolve, reject) {\n fetch(style, {\n credentials: 'same-origin'\n })\n .then(function(response) {\n return response.json();\n })\n .then(function(glStyle) {\n const a = /** @type {HTMLAnchorElement} */ (document.createElement('A'));\n a.href = style;\n const href = a.href;\n path = a.pathname.split('/').slice(0, -1).join('/') + '/';\n host = href.substr(0, href.indexOf(path));\n\n processStyle(glStyle, map, baseUrl, host, path, accessToken)\n .then(function() {\n resolve(map);\n })\n .catch(reject);\n })\n .catch(function(err) {\n reject(new Error(`Could not load ${style}: ${err.message}`));\n });\n });\n } else {\n promise = new Promise(function(resolve, reject) {\n processStyle(style, map)\n .then(function() {\n resolve(map);\n })\n .catch(reject);\n });\n }\n\n return promise;\n}\n\n/**\n * ```js\n * import {apply} from 'ol-mapbox-style';\n * ```\n * Like `olms`, but returns an `ol/Map` instance instead of a `Promise`.\n *\n * @param {PluggableMap|HTMLElement|string} map Either an existing OpenLayers Map\n * instance, or a HTML element, or the id of a HTML element that will be the\n * target of a new OpenLayers Map.\n * @param {string|Object} style JSON style object or style url pointing to a\n * Mapbox Style object. When using Mapbox APIs, the url must contain an access\n * token and look like\n * `https://api.mapbox.com/styles/v1/mapbox/bright-v9?access_token=[your_access_token_here]`.\n * When passed as JSON style object, all OpenLayers layers created by `apply()`\n * will be immediately available, but they may not have a source yet (i.e. when\n * they are defined by a TileJSON url in the Mapbox Style document). When passed\n * as style url, layers will be added to the map when the Mapbox Style document\n * is loaded and parsed.\n * @return {PluggableMap} The OpenLayers Map instance that will be populated with the\n * contents described in the Mapbox Style object.\n */\nexport function apply(map, style) {\n if (typeof map === 'string' || map instanceof HTMLElement) {\n map = new Map({\n target: map\n });\n }\n setTimeout(function() {\n olms(map, style);\n }, 0);\n return map;\n}\n\n\n/**\n * @private\n * If layerIds is not empty, applies the style specified in glStyle to the layer,\n * and adds the layer to the map.\n *\n * The layer may not yet have a source when the function is called. If so, the style\n * is applied to the layer via a once listener on the 'change:source' event.\n *\n * @param {Layer} layer An OpenLayers layer instance.\n * @param {Array<string>} layerIds Array containing layer ids of already-processed layers.\n * @param {Object} glStyle Style as a JSON object.\n * @param {string|undefined} path The path part of the style URL. Only required\n * when a relative path is used with the `\"sprite\"` property of the style.\n * @param {PluggableMap} map OpenLayers Map.\n * @return {Promise} Returns a promise that resolves after the source has\n * been set on the specified layer, and the style has been applied.\n */\nfunction finalizeLayer(layer, layerIds, glStyle, path, map) {\n let minZoom = 24;\n let maxZoom = 0;\n const glLayers = glStyle.layers;\n for (let i = 0, ii = glLayers.length; i < ii; ++i) {\n const glLayer = glLayers[i];\n if (layerIds.indexOf(glLayer.id) !== -1) {\n minZoom = Math.min('minzoom' in glLayer ? glLayer.minzoom : 0, minZoom);\n maxZoom = Math.max('maxzoom' in glLayer ? glLayer.maxzoom : 24, maxZoom);\n }\n }\n return new Promise(function(resolve, reject) {\n const setStyle = function() {\n const source = layer.getSource();\n if (!source || source.getState() === 'error') {\n reject(new Error('Error accessing data for source ' + layer.get('mapbox-source')));\n return;\n }\n if (typeof source.getTileGrid === 'function') {\n const tileGrid = source.getTileGrid();\n if (tileGrid) {\n const sourceMinZoom = tileGrid.getMinZoom();\n if (minZoom > 0 || sourceMinZoom > 0) {\n layer.setMaxResolution(Math.min(defaultResolutions[minZoom], tileGrid.getResolution(sourceMinZoom)) + 1e-9);\n }\n if (maxZoom < 24) {\n layer.setMinResolution(defaultResolutions[maxZoom] + 1e-9);\n }\n }\n }\n if (source instanceof VectorSource || source instanceof VectorTileSource) {\n applyStyle(/** @type {import(\"ol/layer/Vector\").default|import(\"ol/layer/VectorTile\").default} */ (layer), glStyle, layerIds, path).then(function() {\n layer.setVisible(true);\n resolve();\n }, function(e) {\n reject(e);\n });\n } else {\n resolve();\n }\n };\n\n layer.set('mapbox-layers', layerIds);\n if (map.getLayers().getArray().indexOf(layer) === -1) {\n map.addLayer(layer);\n }\n\n if (layer.getSource()) {\n setStyle();\n } else {\n layer.once('change:source', setStyle);\n }\n });\n}\n\n\n/**\n * ```js\n * import {getLayer} from 'ol-mapbox-style';\n * ```\n * Get the OpenLayers layer instance that contains the provided Mapbox Style\n * `layer`. Note that multiple Mapbox Style layers are combined in a single\n * OpenLayers layer instance when they use the same Mapbox Style `source`.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {string} layerId Mapbox Style layer id.\n * @return {Layer} OpenLayers layer instance.\n */\nexport function getLayer(map, layerId) {\n const layers = map.getLayers().getArray();\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const mapboxLayers = layers[i].get('mapbox-layers');\n if (mapboxLayers && mapboxLayers.indexOf(layerId) !== -1) {\n return /** @type {Layer} */ (layers[i]);\n }\n }\n}\n\n/**\n * ```js\n * import {getLayers} from 'ol-mapbox-style';\n * ```\n * Get the OpenLayers layer instances for the provided Mapbox Style `source`.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Array<Layer>} OpenLayers layer instances.\n */\nexport function getLayers(map, sourceId) {\n const result = [];\n const layers = map.getLayers().getArray();\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n if (layers[i].get('mapbox-source') === sourceId) {\n result.push(/** @type {Layer} */ (layers[i]));\n }\n }\n return result;\n}\n\n/**\n * ```js\n * import {getSource} from 'ol-mapbox-style';\n * ```\n * Get the OpenLayers source instance for the provided Mapbox Style `source`.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Source} OpenLayers source instance.\n */\nexport function getSource(map, sourceId) {\n const layers = map.getLayers().getArray();\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const source = /** @type {Layer} */ (layers[i]).getSource();\n if (layers[i].get('mapbox-source') === sourceId) {\n return source;\n }\n }\n}\n\nexport {\n finalizeLayer as _finalizeLayer,\n getFonts as _getFonts\n};\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('ol/control/Control'), require('ol/Observable'), require('ol/layer/Group')) :\n\ttypeof define === 'function' && define.amd ? define(['ol/control/Control', 'ol/Observable', 'ol/layer/Group'], factory) :\n\t(global.LayerSwitcher = factory(global.ol.control.Control,global.ol.Observable,global.ol.layer.Group));\n}(this, (function (Control,ol_Observable,LayerGroup) { 'use strict';\n\nControl = 'default' in Control ? Control['default'] : Control;\nLayerGroup = 'default' in LayerGroup ? LayerGroup['default'] : LayerGroup;\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n\n\n\n\n\nvar get = function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if (\"value\" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n};\n\nvar inherits = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\n\n\n\n\n\n\n\n\n\n\nvar possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\n/**\n * @protected\n */\nvar CSS_PREFIX = 'layer-switcher-';\n/**\n * OpenLayers LayerSwitcher Control, displays a list of layers and groups\n * associated with a map which have a `title` property.\n *\n * To be shown in the LayerSwitcher panel layers must have a `title` property;\n * base map layers should have a `type` property set to `base`. Group layers\n * (`LayerGroup`) can be used to visually group layers together; a group\n * with a `fold` property set to either `'open'` or `'close'` will be displayed\n * with a toggle.\n *\n * See [BaseLayerOptions](#baselayeroptions) for a full list of LayerSwitcher\n * properties for layers (`TileLayer`, `ImageLayer`, `VectorTile` etc.) and\n * [GroupLayerOptions](#grouplayeroptions) for group layer (`LayerGroup`)\n * LayerSwitcher properties.\n *\n * Layer and group properties can either be set by adding extra properties\n * to their options when they are created or via their set method.\n *\n * Specify a `title` for a Layer by adding a `title` property to it's options object:\n * ```javascript\n * var lyr = new ol.layer.Tile({\n * // Specify a title property which will be displayed by the layer switcher\n * title: 'OpenStreetMap',\n * visible: true,\n * source: new ol.source.OSM()\n * })\n * ```\n *\n * Alternatively the properties can be set via the `set` method after a layer has been created:\n * ```javascript\n * var lyr = new ol.layer.Tile({\n * visible: true,\n * source: new ol.source.OSM()\n * })\n * // Specify a title property which will be displayed by the layer switcher\n * lyr.set('title', 'OpenStreetMap');\n * ```\n *\n * To create a LayerSwitcher and add it to a map, create a new instance then pass it to the map's [`addControl` method](https://openlayers.org/en/latest/apidoc/module-ol_PluggableMap-PluggableMap.html#addControl).\n * ```javascript\n * var layerSwitcher = new LayerSwitcher({\n * reverse: true,\n * groupSelectStyle: 'group'\n * });\n * map.addControl(layerSwitcher);\n * ```\n *\n * @constructor\n * @extends {ol/control/Control~Control}\n * @param opt_options LayerSwitcher options, see [LayerSwitcher Options](#options) and [RenderOptions](#renderoptions) which LayerSwitcher `Options` extends for more details.\n */\n\nvar LayerSwitcher = function (_Control) {\n inherits(LayerSwitcher, _Control);\n\n function LayerSwitcher(opt_options) {\n classCallCheck(this, LayerSwitcher);\n\n var options = Object.assign({}, opt_options);\n // TODO Next: Rename to showButtonTitle\n var tipLabel = options.tipLabel ? options.tipLabel : 'Legend';\n // TODO Next: Rename to hideButtonTitle\n var collapseTipLabel = options.collapseTipLabel ? options.collapseTipLabel : 'Collapse legend';\n var element = document.createElement('div');\n\n var _this = possibleConstructorReturn(this, (LayerSwitcher.__proto__ || Object.getPrototypeOf(LayerSwitcher)).call(this, { element: element, target: options.target }));\n\n _this.activationMode = options.activationMode || 'mouseover';\n _this.startActive = options.startActive === true;\n // TODO Next: Rename to showButtonContent\n var label = options.label !== undefined ? options.label : '';\n // TODO Next: Rename to hideButtonContent\n var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\\xBB';\n _this.groupSelectStyle = LayerSwitcher.getGroupSelectStyle(options.groupSelectStyle);\n _this.reverse = options.reverse !== false;\n _this.mapListeners = [];\n _this.hiddenClassName = 'ol-unselectable ol-control layer-switcher';\n if (LayerSwitcher.isTouchDevice_()) {\n _this.hiddenClassName += ' touch';\n }\n _this.shownClassName = 'shown';\n element.className = _this.hiddenClassName;\n var button = document.createElement('button');\n button.setAttribute('title', tipLabel);\n button.setAttribute('aria-label', tipLabel);\n element.appendChild(button);\n _this.panel = document.createElement('div');\n _this.panel.className = 'panel';\n element.appendChild(_this.panel);\n LayerSwitcher.enableTouchScroll_(_this.panel);\n button.textContent = label;\n element.classList.add(CSS_PREFIX + 'group-select-style-' + _this.groupSelectStyle);\n element.classList.add(CSS_PREFIX + 'activation-mode-' + _this.activationMode);\n if (_this.activationMode === 'click') {\n // TODO Next: Remove in favour of layer-switcher-activation-mode-click\n element.classList.add('activationModeClick');\n if (_this.startActive) {\n button.textContent = collapseLabel;\n button.setAttribute('title', collapseTipLabel);\n button.setAttribute('aria-label', collapseTipLabel);\n }\n button.onclick = function (e) {\n var evt = e || window.event;\n if (_this.element.classList.contains(_this.shownClassName)) {\n _this.hidePanel();\n button.textContent = label;\n button.setAttribute('title', tipLabel);\n button.setAttribute('aria-label', tipLabel);\n } else {\n _this.showPanel();\n button.textContent = collapseLabel;\n button.setAttribute('title', collapseTipLabel);\n button.setAttribute('aria-label', collapseTipLabel);\n }\n evt.preventDefault();\n };\n } else {\n button.onmouseover = function () {\n _this.showPanel();\n };\n button.onclick = function (e) {\n var evt = e || window.event;\n _this.showPanel();\n evt.preventDefault();\n };\n _this.panel.onmouseout = function (evt) {\n if (!_this.panel.contains(evt.relatedTarget)) {\n _this.hidePanel();\n }\n };\n }\n return _this;\n }\n /**\n * Set the map instance the control is associated with.\n * @param map The map instance.\n */\n\n\n createClass(LayerSwitcher, [{\n key: 'setMap',\n value: function setMap(map) {\n var _this2 = this;\n\n // Clean up listeners associated with the previous map\n for (var i = 0; i < this.mapListeners.length; i++) {\n ol_Observable.unByKey(this.mapListeners[i]);\n }\n this.mapListeners.length = 0;\n // Wire up listeners etc. and store reference to new map\n get(LayerSwitcher.prototype.__proto__ || Object.getPrototypeOf(LayerSwitcher.prototype), 'setMap', this).call(this, map);\n if (map) {\n if (this.startActive) {\n this.showPanel();\n } else {\n this.renderPanel();\n }\n if (this.activationMode !== 'click') {\n this.mapListeners.push(map.on('pointerdown', function () {\n _this2.hidePanel();\n }));\n }\n }\n }\n /**\n * Show the layer panel.\n */\n\n }, {\n key: 'showPanel',\n value: function showPanel() {\n if (!this.element.classList.contains(this.shownClassName)) {\n this.element.classList.add(this.shownClassName);\n this.renderPanel();\n }\n }\n /**\n * Hide the layer panel.\n */\n\n }, {\n key: 'hidePanel',\n value: function hidePanel() {\n if (this.element.classList.contains(this.shownClassName)) {\n this.element.classList.remove(this.shownClassName);\n }\n }\n /**\n * Re-draw the layer panel to represent the current state of the layers.\n */\n\n }, {\n key: 'renderPanel',\n value: function renderPanel() {\n this.dispatchEvent('render');\n LayerSwitcher.renderPanel(this.getMap(), this.panel, {\n groupSelectStyle: this.groupSelectStyle,\n reverse: this.reverse\n });\n this.dispatchEvent('rendercomplete');\n }\n /**\n * **_[static]_** - Re-draw the layer panel to represent the current state of the layers.\n * @param map The OpenLayers Map instance to render layers for\n * @param panel The DOM Element into which the layer tree will be rendered\n * @param options Options for panel, group, and layers\n */\n\n }], [{\n key: 'renderPanel',\n value: function renderPanel(map, panel, options) {\n // Create the event.\n var render_event = new Event('render');\n // Dispatch the event.\n panel.dispatchEvent(render_event);\n options = options || {};\n options.groupSelectStyle = LayerSwitcher.getGroupSelectStyle(options.groupSelectStyle);\n LayerSwitcher.ensureTopVisibleBaseLayerShown(map, options.groupSelectStyle);\n while (panel.firstChild) {\n panel.removeChild(panel.firstChild);\n }\n // Reset indeterminate state for all layers and groups before\n // applying based on groupSelectStyle\n LayerSwitcher.forEachRecursive(map, function (l, _idx, _a) {\n l.set('indeterminate', false);\n });\n if (options.groupSelectStyle === 'children' || options.groupSelectStyle === 'none') {\n // Set visibile and indeterminate state of groups based on\n // their children's visibility\n LayerSwitcher.setGroupVisibility(map);\n } else if (options.groupSelectStyle === 'group') {\n // Set child indetermiate state based on their parent's visibility\n LayerSwitcher.setChildVisibility(map);\n }\n var ul = document.createElement('ul');\n panel.appendChild(ul);\n // passing two map arguments instead of lyr as we're passing the map as the root of the layers tree\n LayerSwitcher.renderLayers_(map, map, ul, options, function render(_changedLyr) {\n LayerSwitcher.renderPanel(map, panel, options);\n });\n // Create the event.\n var rendercomplete_event = new Event('rendercomplete');\n // Dispatch the event.\n panel.dispatchEvent(rendercomplete_event);\n }\n /**\n * **_[static]_** - Determine if a given layer group contains base layers\n * @param grp Group to test\n */\n\n }, {\n key: 'isBaseGroup',\n value: function isBaseGroup(grp) {\n if (grp instanceof LayerGroup) {\n var lyrs = grp.getLayers().getArray();\n return lyrs.length && lyrs[0].get('type') === 'base';\n } else {\n return false;\n }\n }\n }, {\n key: 'setGroupVisibility',\n value: function setGroupVisibility(map) {\n // Get a list of groups, with the deepest first\n var groups = LayerSwitcher.getGroupsAndLayers(map, function (l) {\n return l instanceof LayerGroup && !l.get('combine') && !LayerSwitcher.isBaseGroup(l);\n }).reverse();\n // console.log(groups.map(g => g.get('title')));\n groups.forEach(function (grp) {\n // TODO Can we use getLayersArray, is it public in the esm build?\n var descendantVisibility = grp.getLayersArray().map(function (l) {\n var state = l.getVisible();\n // console.log('>', l.get('title'), state);\n return state;\n });\n // console.log(descendantVisibility);\n if (descendantVisibility.every(function (v) {\n return v === true;\n })) {\n grp.setVisible(true);\n grp.set('indeterminate', false);\n } else if (descendantVisibility.every(function (v) {\n return v === false;\n })) {\n grp.setVisible(false);\n grp.set('indeterminate', false);\n } else {\n grp.setVisible(true);\n grp.set('indeterminate', true);\n }\n });\n }\n }, {\n key: 'setChildVisibility',\n value: function setChildVisibility(map) {\n // console.log('setChildVisibility');\n var groups = LayerSwitcher.getGroupsAndLayers(map, function (l) {\n return l instanceof LayerGroup && !l.get('combine') && !LayerSwitcher.isBaseGroup(l);\n });\n groups.forEach(function (grp) {\n var group = grp;\n // console.log(group.get('title'));\n var groupVisible = group.getVisible();\n var groupIndeterminate = group.get('indeterminate');\n group.getLayers().getArray().forEach(function (l) {\n l.set('indeterminate', false);\n if ((!groupVisible || groupIndeterminate) && l.getVisible()) {\n l.set('indeterminate', true);\n }\n });\n });\n }\n /**\n * Ensure only the top-most base layer is visible if more than one is visible.\n * @param map The map instance.\n * @param groupSelectStyle\n * @protected\n */\n\n }, {\n key: 'ensureTopVisibleBaseLayerShown',\n value: function ensureTopVisibleBaseLayerShown(map, groupSelectStyle) {\n var lastVisibleBaseLyr = void 0;\n LayerSwitcher.forEachRecursive(map, function (lyr, _idx, _arr) {\n if (lyr.get('type') === 'base' && lyr.getVisible()) {\n lastVisibleBaseLyr = lyr;\n }\n });\n if (lastVisibleBaseLyr) LayerSwitcher.setVisible_(map, lastVisibleBaseLyr, true, groupSelectStyle);\n }\n /**\n * **_[static]_** - Get an Array of all layers and groups displayed by the LayerSwitcher (has a `'title'` property)\n * contained by the specified map or layer group; optionally filtering via `filterFn`\n * @param grp The map or layer group for which layers are found.\n * @param filterFn Optional function used to filter the returned layers\n */\n\n }, {\n key: 'getGroupsAndLayers',\n value: function getGroupsAndLayers(grp, filterFn) {\n var layers = [];\n filterFn = filterFn || function (_lyr, _idx, _arr) {\n return true;\n };\n LayerSwitcher.forEachRecursive(grp, function (lyr, idx, arr) {\n if (lyr.get('title')) {\n if (filterFn(lyr, idx, arr)) {\n layers.push(lyr);\n }\n }\n });\n return layers;\n }\n /**\n * Toggle the visible state of a layer.\n * Takes care of hiding other layers in the same exclusive group if the layer\n * is toggle to visible.\n * @protected\n * @param map The map instance.\n * @param lyr layer whose visibility will be toggled.\n * @param visible Set whether the layer is shown\n * @param groupSelectStyle\n * @protected\n */\n\n }, {\n key: 'setVisible_',\n value: function setVisible_(map, lyr, visible, groupSelectStyle) {\n // console.log(lyr.get('title'), visible, groupSelectStyle);\n lyr.setVisible(visible);\n if (visible && lyr.get('type') === 'base') {\n // Hide all other base layers regardless of grouping\n LayerSwitcher.forEachRecursive(map, function (l, _idx, _arr) {\n if (l != lyr && l.get('type') === 'base') {\n l.setVisible(false);\n }\n });\n }\n if (lyr instanceof LayerGroup && !lyr.get('combine') && groupSelectStyle === 'children') {\n lyr.getLayers().forEach(function (l) {\n LayerSwitcher.setVisible_(map, l, lyr.getVisible(), groupSelectStyle);\n });\n }\n }\n /**\n * Render all layers that are children of a group.\n * @param map The map instance.\n * @param lyr Layer to be rendered (should have a title property).\n * @param idx Position in parent group list.\n * @param options Options for groups and layers\n * @protected\n */\n\n }, {\n key: 'renderLayer_',\n value: function renderLayer_(map, lyr, idx, options, render) {\n var li = document.createElement('li');\n var lyrTitle = lyr.get('title');\n var checkboxId = LayerSwitcher.uuid();\n var label = document.createElement('label');\n if (lyr instanceof LayerGroup && !lyr.get('combine')) {\n var isBaseGroup = LayerSwitcher.isBaseGroup(lyr);\n li.classList.add('group');\n if (isBaseGroup) {\n li.classList.add(CSS_PREFIX + 'base-group');\n }\n // Group folding\n if (lyr.get('fold')) {\n li.classList.add(CSS_PREFIX + 'fold');\n li.classList.add(CSS_PREFIX + lyr.get('fold'));\n var btn = document.createElement('button');\n btn.onclick = function (e) {\n var evt = e || window.event;\n LayerSwitcher.toggleFold_(lyr, li);\n evt.preventDefault();\n };\n li.appendChild(btn);\n }\n if (!isBaseGroup && options.groupSelectStyle != 'none') {\n var input = document.createElement('input');\n input.type = 'checkbox';\n input.id = checkboxId;\n input.checked = lyr.getVisible();\n input.indeterminate = lyr.get('indeterminate');\n input.onchange = function (e) {\n var target = e.target;\n LayerSwitcher.setVisible_(map, lyr, target.checked, options.groupSelectStyle);\n render(lyr);\n };\n li.appendChild(input);\n label.htmlFor = checkboxId;\n }\n label.innerHTML = lyrTitle;\n li.appendChild(label);\n var ul = document.createElement('ul');\n li.appendChild(ul);\n LayerSwitcher.renderLayers_(map, lyr, ul, options, render);\n } else {\n li.className = 'layer';\n var _input = document.createElement('input');\n if (lyr.get('type') === 'base') {\n _input.type = 'radio';\n _input.name = 'base';\n } else {\n _input.type = 'checkbox';\n }\n _input.id = checkboxId;\n _input.checked = lyr.get('visible');\n _input.indeterminate = lyr.get('indeterminate');\n _input.onchange = function (e) {\n var target = e.target;\n LayerSwitcher.setVisible_(map, lyr, target.checked, options.groupSelectStyle);\n render(lyr);\n };\n li.appendChild(_input);\n label.htmlFor = checkboxId;\n label.innerHTML = lyrTitle;\n var rsl = map.getView().getResolution();\n if (rsl > lyr.getMaxResolution() || rsl < lyr.getMinResolution()) {\n label.className += ' disabled';\n }\n li.appendChild(label);\n }\n return li;\n }\n /**\n * Render all layers that are children of a group.\n * @param map The map instance.\n * @param lyr Group layer whose children will be rendered.\n * @param elm DOM element that children will be appended to.\n * @param options Options for groups and layers\n * @protected\n */\n\n }, {\n key: 'renderLayers_',\n value: function renderLayers_(map, lyr, elm, options, render) {\n var lyrs = lyr.getLayers().getArray().slice();\n if (options.reverse) lyrs = lyrs.reverse();\n for (var i = 0, l; i < lyrs.length; i++) {\n l = lyrs[i];\n if (l.get('title')) {\n elm.appendChild(LayerSwitcher.renderLayer_(map, l, i, options, render));\n }\n }\n }\n /**\n * **_[static]_** - Call the supplied function for each layer in the passed layer group\n * recursing nested groups.\n * @param lyr The layer group to start iterating from.\n * @param fn Callback which will be called for each layer\n * found under `lyr`.\n */\n\n }, {\n key: 'forEachRecursive',\n value: function forEachRecursive(lyr, fn) {\n lyr.getLayers().forEach(function (lyr, idx, a) {\n fn(lyr, idx, a);\n if (lyr instanceof LayerGroup) {\n LayerSwitcher.forEachRecursive(lyr, fn);\n }\n });\n }\n /**\n * **_[static]_** - Generate a UUID\n * Adapted from http://stackoverflow.com/a/2117523/526860\n * @returns {String} UUID\n */\n\n }, {\n key: 'uuid',\n value: function uuid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = Math.random() * 16 | 0,\n v = c == 'x' ? r : r & 0x3 | 0x8;\n return v.toString(16);\n });\n }\n /**\n * Apply workaround to enable scrolling of overflowing content within an\n * element. Adapted from https://gist.github.com/chrismbarr/4107472\n * @param elm Element on which to enable touch scrolling\n * @protected\n */\n\n }, {\n key: 'enableTouchScroll_',\n value: function enableTouchScroll_(elm) {\n if (LayerSwitcher.isTouchDevice_()) {\n var scrollStartPos = 0;\n elm.addEventListener('touchstart', function (event) {\n scrollStartPos = this.scrollTop + event.touches[0].pageY;\n }, false);\n elm.addEventListener('touchmove', function (event) {\n this.scrollTop = scrollStartPos - event.touches[0].pageY;\n }, false);\n }\n }\n /**\n * Determine if the current browser supports touch events. Adapted from\n * https://gist.github.com/chrismbarr/4107472\n * @returns {Boolean} True if client can have 'TouchEvent' event\n * @protected\n */\n\n }, {\n key: 'isTouchDevice_',\n value: function isTouchDevice_() {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (e) {\n return false;\n }\n }\n /**\n * Fold/unfold layer group\n * @param lyr Layer group to fold/unfold\n * @param li List item containing layer group\n * @protected\n */\n\n }, {\n key: 'toggleFold_',\n value: function toggleFold_(lyr, li) {\n li.classList.remove(CSS_PREFIX + lyr.get('fold'));\n lyr.set('fold', lyr.get('fold') === 'open' ? 'close' : 'open');\n li.classList.add(CSS_PREFIX + lyr.get('fold'));\n }\n /**\n * If a valid groupSelectStyle value is not provided then return the default\n * @param groupSelectStyle The string to check for validity\n * @returns The value groupSelectStyle, if valid, the default otherwise\n * @protected\n */\n\n }, {\n key: 'getGroupSelectStyle',\n value: function getGroupSelectStyle(groupSelectStyle) {\n return ['none', 'children', 'group'].indexOf(groupSelectStyle) >= 0 ? groupSelectStyle : 'children';\n }\n }]);\n return LayerSwitcher;\n}(Control);\nif (window['ol'] && window['ol']['control']) {\n window['ol']['control']['LayerSwitcher'] = LayerSwitcher;\n}\n\nreturn LayerSwitcher;\n\n})));\n","/**\n * @module ol/geom/GeometryCollection\n */\nimport EventType from '../events/EventType.js';\nimport Geometry from './Geometry.js';\nimport GeometryType from './GeometryType.js';\nimport {\n closestSquaredDistanceXY,\n createOrUpdateEmpty,\n extend,\n getCenter,\n} from '../extent.js';\nimport {listen, unlistenByKey} from '../events.js';\n\n/**\n * @classdesc\n * An array of {@link module:ol/geom/Geometry} objects.\n *\n * @api\n */\nclass GeometryCollection extends Geometry {\n /**\n * @param {Array<Geometry>=} opt_geometries Geometries.\n */\n constructor(opt_geometries) {\n super();\n\n /**\n * @private\n * @type {Array<Geometry>}\n */\n this.geometries_ = opt_geometries ? opt_geometries : null;\n\n /**\n * @type {Array<import(\"../events.js\").EventsKey>}\n */\n this.changeEventsKeys_ = [];\n\n this.listenGeometriesChange_();\n }\n\n /**\n * @private\n */\n unlistenGeometriesChange_() {\n this.changeEventsKeys_.forEach(unlistenByKey);\n this.changeEventsKeys_.length = 0;\n }\n\n /**\n * @private\n */\n listenGeometriesChange_() {\n if (!this.geometries_) {\n return;\n }\n for (let i = 0, ii = this.geometries_.length; i < ii; ++i) {\n this.changeEventsKeys_.push(\n listen(this.geometries_[i], EventType.CHANGE, this.changed, this)\n );\n }\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!GeometryCollection} Clone.\n * @api\n */\n clone() {\n const geometryCollection = new GeometryCollection(null);\n geometryCollection.setGeometries(this.geometries_);\n geometryCollection.applyProperties(this);\n return geometryCollection;\n }\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 closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n minSquaredDistance = geometries[i].closestPointXY(\n x,\n y,\n closestPoint,\n minSquaredDistance\n );\n }\n return minSquaredDistance;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\n containsXY(x, y) {\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n if (geometries[i].containsXY(x, y)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n */\n computeExtent(extent) {\n createOrUpdateEmpty(extent);\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n extend(extent, geometries[i].getExtent());\n }\n return extent;\n }\n\n /**\n * Return the geometries that make up this geometry collection.\n * @return {Array<Geometry>} Geometries.\n * @api\n */\n getGeometries() {\n return cloneGeometries(this.geometries_);\n }\n\n /**\n * @return {Array<Geometry>} Geometries.\n */\n getGeometriesArray() {\n return this.geometries_;\n }\n\n /**\n * @return {Array<Geometry>} Geometries.\n */\n getGeometriesArrayRecursive() {\n /** @type {Array<Geometry>} */\n let geometriesArray = [];\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n if (geometries[i].getType() === this.getType()) {\n geometriesArray = geometriesArray.concat(\n /** @type {GeometryCollection} */ (geometries[\n i\n ]).getGeometriesArrayRecursive()\n );\n } else {\n geometriesArray.push(geometries[i]);\n }\n }\n return geometriesArray;\n }\n\n /**\n * Create a simplified version of this geometry using the Douglas Peucker algorithm.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {GeometryCollection} Simplified GeometryCollection.\n */\n getSimplifiedGeometry(squaredTolerance) {\n if (this.simplifiedGeometryRevision !== this.getRevision()) {\n this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n this.simplifiedGeometryRevision = this.getRevision();\n }\n if (\n squaredTolerance < 0 ||\n (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n squaredTolerance < this.simplifiedGeometryMaxMinSquaredTolerance)\n ) {\n return this;\n }\n\n const simplifiedGeometries = [];\n const geometries = this.geometries_;\n let simplified = false;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n const geometry = geometries[i];\n const simplifiedGeometry = geometry.getSimplifiedGeometry(\n squaredTolerance\n );\n simplifiedGeometries.push(simplifiedGeometry);\n if (simplifiedGeometry !== geometry) {\n simplified = true;\n }\n }\n if (simplified) {\n const simplifiedGeometryCollection = new GeometryCollection(null);\n simplifiedGeometryCollection.setGeometriesArray(simplifiedGeometries);\n return simplifiedGeometryCollection;\n } else {\n this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;\n return this;\n }\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./GeometryType.js\").default} Geometry type.\n * @api\n */\n getType() {\n return GeometryType.GEOMETRY_COLLECTION;\n }\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 intersectsExtent(extent) {\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n if (geometries[i].intersectsExtent(extent)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * @return {boolean} Is empty.\n */\n isEmpty() {\n return this.geometries_.length === 0;\n }\n\n /**\n * Rotate the geometry around a given coordinate. This modifies the geometry\n * coordinates in place.\n * @param {number} angle Rotation angle in radians.\n * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n * @api\n */\n rotate(angle, anchor) {\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n geometries[i].rotate(angle, anchor);\n }\n this.changed();\n }\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 scale(sx, opt_sy, opt_anchor) {\n let anchor = opt_anchor;\n if (!anchor) {\n anchor = getCenter(this.getExtent());\n }\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n geometries[i].scale(sx, opt_sy, anchor);\n }\n this.changed();\n }\n\n /**\n * Set the geometries that make up this geometry collection.\n * @param {Array<Geometry>} geometries Geometries.\n * @api\n */\n setGeometries(geometries) {\n this.setGeometriesArray(cloneGeometries(geometries));\n }\n\n /**\n * @param {Array<Geometry>} geometries Geometries.\n */\n setGeometriesArray(geometries) {\n this.unlistenGeometriesChange_();\n this.geometries_ = geometries;\n this.listenGeometriesChange_();\n this.changed();\n }\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 applyTransform(transformFn) {\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n geometries[i].applyTransform(transformFn);\n }\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 translate(deltaX, deltaY) {\n const geometries = this.geometries_;\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n geometries[i].translate(deltaX, deltaY);\n }\n this.changed();\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n this.unlistenGeometriesChange_();\n super.disposeInternal();\n }\n}\n\n/**\n * @param {Array<Geometry>} geometries Geometries.\n * @return {Array<Geometry>} Cloned geometries.\n */\nfunction cloneGeometries(geometries) {\n const clonedGeometries = [];\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n clonedGeometries.push(geometries[i].clone());\n }\n return clonedGeometries;\n}\n\nexport default GeometryCollection;\n","/**\n * @module ol/format/Feature\n */\nimport Units from '../proj/Units.js';\nimport {abstract} from '../util.js';\nimport {assign} from '../obj.js';\nimport {\n equivalent as equivalentProjection,\n get as getProjection,\n transformExtent,\n} from '../proj.js';\n\n/**\n * @typedef {Object} ReadOptions\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection] Projection of the data we are reading.\n * If not provided, the projection will be derived from the data (where possible) or\n * the `dataProjection` of the format is assigned (where set). If the projection\n * can not be derived from the data and if no `dataProjection` is set for a format,\n * the features will not be reprojected.\n * @property {import(\"../extent.js\").Extent} [extent] Tile extent in map units of the tile being read.\n * This is only required when reading data with tile pixels as geometry units. When configured,\n * a `dataProjection` with `TILE_PIXELS` as `units` and the tile's pixel extent as `extent` needs to be\n * provided.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection of the feature geometries\n * created by the format reader. If not provided, features will be returned in the\n * `dataProjection`.\n */\n\n/**\n * @typedef {Object} WriteOptions\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection] Projection of the data we are writing.\n * If not provided, the `dataProjection` of the format is assigned (where set).\n * If no `dataProjection` is set for a format, the features will be returned\n * in the `featureProjection`.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection of the feature geometries\n * that will be serialized by the format writer. If not provided, geometries are assumed\n * to be in the `dataProjection` if that is set; in other words, they are not transformed.\n * @property {boolean} [rightHanded] When writing geometries, follow the right-hand\n * rule for linear ring orientation. This means that polygons will have counter-clockwise\n * exterior rings and clockwise interior rings. By default, coordinates are serialized\n * as they are provided at construction. If `true`, the right-hand rule will\n * be applied. If `false`, the left-hand rule will be applied (clockwise for\n * exterior and counter-clockwise for interior rings). Note that not all\n * formats support this. The GeoJSON format does use this property when writing\n * geometries.\n * @property {number} [decimals] Maximum number of decimal places for coordinates.\n * Coordinates are stored internally as floats, but floating-point arithmetic can create\n * coordinates with a large number of decimal places, not generally wanted on output.\n * Set a number here to round coordinates. Can also be used to ensure that\n * coordinates read in can be written back out with the same number of decimals.\n * Default is no rounding.\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for feature formats.\n * {@link module:ol/format/Feature~FeatureFormat} subclasses provide the ability to decode and encode\n * {@link module:ol/Feature~Feature} objects from a variety of commonly used geospatial\n * file formats. See the documentation for each format for more details.\n *\n * @abstract\n * @api\n */\nclass FeatureFormat {\n constructor() {\n /**\n * @protected\n * @type {import(\"../proj/Projection.js\").default}\n */\n this.dataProjection = null;\n\n /**\n * @protected\n * @type {import(\"../proj/Projection.js\").default}\n */\n this.defaultFeatureProjection = null;\n }\n\n /**\n * Adds the data projection to the read options.\n * @param {Document|Element|Object|string} source Source.\n * @param {ReadOptions=} opt_options Options.\n * @return {ReadOptions|undefined} Options.\n * @protected\n */\n getReadOptions(source, opt_options) {\n let options;\n if (opt_options) {\n let dataProjection = opt_options.dataProjection\n ? getProjection(opt_options.dataProjection)\n : this.readProjection(source);\n if (\n opt_options.extent &&\n dataProjection &&\n dataProjection.getUnits() === Units.TILE_PIXELS\n ) {\n dataProjection = getProjection(dataProjection);\n dataProjection.setWorldExtent(opt_options.extent);\n }\n options = {\n dataProjection: dataProjection,\n featureProjection: opt_options.featureProjection,\n };\n }\n return this.adaptOptions(options);\n }\n\n /**\n * Sets the `dataProjection` on the options, if no `dataProjection`\n * is set.\n * @param {WriteOptions|ReadOptions|undefined} options\n * Options.\n * @protected\n * @return {WriteOptions|ReadOptions|undefined}\n * Updated options.\n */\n adaptOptions(options) {\n return assign(\n {\n dataProjection: this.dataProjection,\n featureProjection: this.defaultFeatureProjection,\n },\n options\n );\n }\n\n /**\n * @abstract\n * @return {import(\"./FormatType.js\").default} Format.\n */\n getType() {\n return abstract();\n }\n\n /**\n * Read a single feature from a source.\n *\n * @abstract\n * @param {Document|Element|Object|string} source Source.\n * @param {ReadOptions=} opt_options Read options.\n * @return {import(\"../Feature.js\").FeatureLike} Feature.\n */\n readFeature(source, opt_options) {\n return abstract();\n }\n\n /**\n * Read all features from a source.\n *\n * @abstract\n * @param {Document|Element|ArrayBuffer|Object|string} source Source.\n * @param {ReadOptions=} opt_options Read options.\n * @return {Array<import(\"../Feature.js\").FeatureLike>} Features.\n */\n readFeatures(source, opt_options) {\n return abstract();\n }\n\n /**\n * Read a single geometry from a source.\n *\n * @abstract\n * @param {Document|Element|Object|string} source Source.\n * @param {ReadOptions=} opt_options Read options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\n readGeometry(source, opt_options) {\n return abstract();\n }\n\n /**\n * Read the projection from a source.\n *\n * @abstract\n * @param {Document|Element|Object|string} source Source.\n * @return {import(\"../proj/Projection.js\").default} Projection.\n */\n readProjection(source) {\n return abstract();\n }\n\n /**\n * Encode a feature in this format.\n *\n * @abstract\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {WriteOptions=} opt_options Write options.\n * @return {string} Result.\n */\n writeFeature(feature, opt_options) {\n return abstract();\n }\n\n /**\n * Encode an array of features in this format.\n *\n * @abstract\n * @param {Array<import(\"../Feature.js\").default>} features Features.\n * @param {WriteOptions=} opt_options Write options.\n * @return {string} Result.\n */\n writeFeatures(features, opt_options) {\n return abstract();\n }\n\n /**\n * Write a single geometry in this format.\n *\n * @abstract\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {WriteOptions=} opt_options Write options.\n * @return {string} Result.\n */\n writeGeometry(geometry, opt_options) {\n return abstract();\n }\n}\n\nexport default FeatureFormat;\n\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {boolean} write Set to true for writing, false for reading.\n * @param {(WriteOptions|ReadOptions)=} opt_options Options.\n * @return {import(\"../geom/Geometry.js\").default} Transformed geometry.\n */\nexport function transformGeometryWithOptions(geometry, write, opt_options) {\n const featureProjection = opt_options\n ? getProjection(opt_options.featureProjection)\n : null;\n const dataProjection = opt_options\n ? getProjection(opt_options.dataProjection)\n : null;\n\n let transformed;\n if (\n featureProjection &&\n dataProjection &&\n !equivalentProjection(featureProjection, dataProjection)\n ) {\n transformed = (write ? geometry.clone() : geometry).transform(\n write ? featureProjection : dataProjection,\n write ? dataProjection : featureProjection\n );\n } else {\n transformed = geometry;\n }\n if (\n write &&\n opt_options &&\n /** @type {WriteOptions} */ (opt_options).decimals !== undefined\n ) {\n const power = Math.pow(\n 10,\n /** @type {WriteOptions} */ (opt_options).decimals\n );\n // if decimals option on write, round each coordinate appropriately\n /**\n * @param {Array<number>} coordinates Coordinates.\n * @return {Array<number>} Transformed coordinates.\n */\n const transform = function (coordinates) {\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n coordinates[i] = Math.round(coordinates[i] * power) / power;\n }\n return coordinates;\n };\n if (transformed === geometry) {\n transformed = geometry.clone();\n }\n transformed.applyTransform(transform);\n }\n return transformed;\n}\n\n/**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {ReadOptions=} opt_options Read options.\n * @return {import(\"../extent.js\").Extent} Transformed extent.\n */\nexport function transformExtentWithOptions(extent, opt_options) {\n const featureProjection = opt_options\n ? getProjection(opt_options.featureProjection)\n : null;\n const dataProjection = opt_options\n ? getProjection(opt_options.dataProjection)\n : null;\n\n if (\n featureProjection &&\n dataProjection &&\n !equivalentProjection(featureProjection, dataProjection)\n ) {\n return transformExtent(extent, dataProjection, featureProjection);\n } else {\n return extent;\n }\n}\n","/**\n * @module ol/format/JSONFeature\n */\nimport FeatureFormat from './Feature.js';\nimport FormatType from './FormatType.js';\nimport {abstract} from '../util.js';\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for JSON feature formats.\n *\n * @abstract\n */\nclass JSONFeature extends FeatureFormat {\n constructor() {\n super();\n }\n\n /**\n * @return {import(\"./FormatType.js\").default} Format.\n */\n getType() {\n return FormatType.JSON;\n }\n\n /**\n * Read a feature. Only works for a single feature. Use `readFeatures` to\n * read a feature collection.\n *\n * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {import(\"../Feature.js\").default} Feature.\n * @api\n */\n readFeature(source, opt_options) {\n return this.readFeatureFromObject(\n getObject(source),\n this.getReadOptions(source, opt_options)\n );\n }\n\n /**\n * Read all features. Works with both a single feature and a feature\n * collection.\n *\n * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {Array<import(\"../Feature.js\").default>} Features.\n * @api\n */\n readFeatures(source, opt_options) {\n return this.readFeaturesFromObject(\n getObject(source),\n this.getReadOptions(source, opt_options)\n );\n }\n\n /**\n * @abstract\n * @param {Object} object Object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @protected\n * @return {import(\"../Feature.js\").default} Feature.\n */\n readFeatureFromObject(object, opt_options) {\n return abstract();\n }\n\n /**\n * @abstract\n * @param {Object} object Object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @protected\n * @return {Array<import(\"../Feature.js\").default>} Features.\n */\n readFeaturesFromObject(object, opt_options) {\n return abstract();\n }\n\n /**\n * Read a geometry.\n *\n * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n * @api\n */\n readGeometry(source, opt_options) {\n return this.readGeometryFromObject(\n getObject(source),\n this.getReadOptions(source, opt_options)\n );\n }\n\n /**\n * @abstract\n * @param {Object} object Object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @protected\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\n readGeometryFromObject(object, opt_options) {\n return abstract();\n }\n\n /**\n * Read the projection.\n *\n * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n * @return {import(\"../proj/Projection.js\").default} Projection.\n * @api\n */\n readProjection(source) {\n return this.readProjectionFromObject(getObject(source));\n }\n\n /**\n * @abstract\n * @param {Object} object Object.\n * @protected\n * @return {import(\"../proj/Projection.js\").default} Projection.\n */\n readProjectionFromObject(object) {\n return abstract();\n }\n\n /**\n * Encode a feature as string.\n *\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {string} Encoded feature.\n * @api\n */\n writeFeature(feature, opt_options) {\n return JSON.stringify(this.writeFeatureObject(feature, opt_options));\n }\n\n /**\n * @abstract\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {Object} Object.\n */\n writeFeatureObject(feature, opt_options) {\n return abstract();\n }\n\n /**\n * Encode an array of features as string.\n *\n * @param {Array<import(\"../Feature.js\").default>} features Features.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {string} Encoded features.\n * @api\n */\n writeFeatures(features, opt_options) {\n return JSON.stringify(this.writeFeaturesObject(features, opt_options));\n }\n\n /**\n * @abstract\n * @param {Array<import(\"../Feature.js\").default>} features Features.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {Object} Object.\n */\n writeFeaturesObject(features, opt_options) {\n return abstract();\n }\n\n /**\n * Encode a geometry as string.\n *\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {string} Encoded geometry.\n * @api\n */\n writeGeometry(geometry, opt_options) {\n return JSON.stringify(this.writeGeometryObject(geometry, opt_options));\n }\n\n /**\n * @abstract\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {Object} Object.\n */\n writeGeometryObject(geometry, opt_options) {\n return abstract();\n }\n}\n\n/**\n * @param {Document|Element|Object|string} source Source.\n * @return {Object} Object.\n */\nfunction getObject(source) {\n if (typeof source === 'string') {\n const object = JSON.parse(source);\n return object ? /** @type {Object} */ (object) : null;\n } else if (source !== null) {\n return source;\n } else {\n return null;\n }\n}\n\nexport default JSONFeature;\n","/**\n * @module ol/format/GeoJSON\n */\n\nimport Feature from '../Feature.js';\nimport GeometryCollection from '../geom/GeometryCollection.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport JSONFeature from './JSONFeature.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport {assert} from '../asserts.js';\nimport {assign, isEmpty} from '../obj.js';\nimport {get as getProjection} from '../proj.js';\nimport {transformGeometryWithOptions} from './Feature.js';\n\n/**\n * @typedef {import(\"geojson\").GeoJSON} GeoJSONObject\n * @typedef {import(\"geojson\").Feature} GeoJSONFeature\n * @typedef {import(\"geojson\").FeatureCollection} GeoJSONFeatureCollection\n * @typedef {import(\"geojson\").Geometry} GeoJSONGeometry\n * @typedef {import(\"geojson\").Point} GeoJSONPoint\n * @typedef {import(\"geojson\").LineString} GeoJSONLineString\n * @typedef {import(\"geojson\").Polygon} GeoJSONPolygon\n * @typedef {import(\"geojson\").MultiPoint} GeoJSONMultiPoint\n * @typedef {import(\"geojson\").MultiLineString} GeoJSONMultiLineString\n * @typedef {import(\"geojson\").MultiPolygon} GeoJSONMultiPolygon\n * @typedef {import(\"geojson\").GeometryCollection} GeoJSONGeometryCollection\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection='EPSG:4326'] Default data projection.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection for features read or\n * written by the format. Options passed to read or write methods will take precedence.\n * @property {string} [geometryName] Geometry name to use when creating features.\n * @property {boolean} [extractGeometryName=false] Certain GeoJSON providers include\n * the geometry_name field in the feature GeoJSON. If set to `true` the GeoJSON reader\n * will look for that field to set the geometry name. If both this field is set to `true`\n * and a `geometryName` is provided, the `geometryName` will take precedence.\n */\n\n/**\n * @classdesc\n * Feature format for reading and writing data in the GeoJSON format.\n *\n * @api\n */\nclass GeoJSON extends JSONFeature {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n super();\n\n /**\n * @type {import(\"../proj/Projection.js\").default}\n */\n this.dataProjection = getProjection(\n options.dataProjection ? options.dataProjection : 'EPSG:4326'\n );\n\n if (options.featureProjection) {\n this.defaultFeatureProjection = getProjection(options.featureProjection);\n }\n\n /**\n * Name of the geometry attribute for features.\n * @type {string|undefined}\n * @private\n */\n this.geometryName_ = options.geometryName;\n\n /**\n * Look for the geometry name in the feature GeoJSON\n * @type {boolean|undefined}\n * @private\n */\n this.extractGeometryName_ = options.extractGeometryName;\n }\n\n /**\n * @param {Object} object Object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @protected\n * @return {import(\"../Feature.js\").default} Feature.\n */\n readFeatureFromObject(object, opt_options) {\n /**\n * @type {GeoJSONFeature}\n */\n let geoJSONFeature = null;\n if (object['type'] === 'Feature') {\n geoJSONFeature = /** @type {GeoJSONFeature} */ (object);\n } else {\n geoJSONFeature = {\n 'type': 'Feature',\n 'geometry': /** @type {GeoJSONGeometry} */ (object),\n 'properties': null,\n };\n }\n\n const geometry = readGeometry(geoJSONFeature['geometry'], opt_options);\n const feature = new Feature();\n if (this.geometryName_) {\n feature.setGeometryName(this.geometryName_);\n } else if (\n this.extractGeometryName_ &&\n 'geometry_name' in geoJSONFeature !== undefined\n ) {\n feature.setGeometryName(geoJSONFeature['geometry_name']);\n }\n feature.setGeometry(geometry);\n\n if ('id' in geoJSONFeature) {\n feature.setId(geoJSONFeature['id']);\n }\n\n if (geoJSONFeature['properties']) {\n feature.setProperties(geoJSONFeature['properties'], true);\n }\n return feature;\n }\n\n /**\n * @param {Object} object Object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @protected\n * @return {Array<Feature>} Features.\n */\n readFeaturesFromObject(object, opt_options) {\n const geoJSONObject = /** @type {GeoJSONObject} */ (object);\n /** @type {Array<import(\"../Feature.js\").default>} */\n let features = null;\n if (geoJSONObject['type'] === 'FeatureCollection') {\n const geoJSONFeatureCollection = /** @type {GeoJSONFeatureCollection} */ (object);\n features = [];\n const geoJSONFeatures = geoJSONFeatureCollection['features'];\n for (let i = 0, ii = geoJSONFeatures.length; i < ii; ++i) {\n features.push(\n this.readFeatureFromObject(geoJSONFeatures[i], opt_options)\n );\n }\n } else {\n features = [this.readFeatureFromObject(object, opt_options)];\n }\n return features;\n }\n\n /**\n * @param {GeoJSONGeometry} object Object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @protected\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\n readGeometryFromObject(object, opt_options) {\n return readGeometry(object, opt_options);\n }\n\n /**\n * @param {Object} object Object.\n * @protected\n * @return {import(\"../proj/Projection.js\").default} Projection.\n */\n readProjectionFromObject(object) {\n const crs = object['crs'];\n let projection;\n if (crs) {\n if (crs['type'] == 'name') {\n projection = getProjection(crs['properties']['name']);\n } else if (crs['type'] === 'EPSG') {\n projection = getProjection('EPSG:' + crs['properties']['code']);\n } else {\n assert(false, 36); // Unknown SRS type\n }\n } else {\n projection = this.dataProjection;\n }\n return /** @type {import(\"../proj/Projection.js\").default} */ (projection);\n }\n\n /**\n * Encode a feature as a GeoJSON Feature object.\n *\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONFeature} Object.\n * @api\n */\n writeFeatureObject(feature, opt_options) {\n opt_options = this.adaptOptions(opt_options);\n\n /** @type {GeoJSONFeature} */\n const object = {\n 'type': 'Feature',\n geometry: null,\n properties: null,\n };\n\n const id = feature.getId();\n if (id !== undefined) {\n object.id = id;\n }\n\n if (!feature.hasProperties()) {\n return object;\n }\n\n const properties = feature.getProperties();\n const geometry = feature.getGeometry();\n if (geometry) {\n object.geometry = writeGeometry(geometry, opt_options);\n\n delete properties[feature.getGeometryName()];\n }\n\n if (!isEmpty(properties)) {\n object.properties = properties;\n }\n\n return object;\n }\n\n /**\n * Encode an array of features as a GeoJSON object.\n *\n * @param {Array<import(\"../Feature.js\").default>} features Features.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONFeatureCollection} GeoJSON Object.\n * @api\n */\n writeFeaturesObject(features, opt_options) {\n opt_options = this.adaptOptions(opt_options);\n const objects = [];\n for (let i = 0, ii = features.length; i < ii; ++i) {\n objects.push(this.writeFeatureObject(features[i], opt_options));\n }\n return {\n type: 'FeatureCollection',\n features: objects,\n };\n }\n\n /**\n * Encode a geometry as a GeoJSON object.\n *\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry|GeoJSONGeometryCollection} Object.\n * @api\n */\n writeGeometryObject(geometry, opt_options) {\n return writeGeometry(geometry, this.adaptOptions(opt_options));\n }\n}\n\n/**\n * @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\nfunction readGeometry(object, opt_options) {\n if (!object) {\n return null;\n }\n\n /**\n * @type {import(\"../geom/Geometry.js\").default}\n */\n let geometry;\n switch (object['type']) {\n case GeometryType.POINT: {\n geometry = readPointGeometry(/** @type {GeoJSONPoint} */ (object));\n break;\n }\n case GeometryType.LINE_STRING: {\n geometry = readLineStringGeometry(\n /** @type {GeoJSONLineString} */ (object)\n );\n break;\n }\n case GeometryType.POLYGON: {\n geometry = readPolygonGeometry(/** @type {GeoJSONPolygon} */ (object));\n break;\n }\n case GeometryType.MULTI_POINT: {\n geometry = readMultiPointGeometry(\n /** @type {GeoJSONMultiPoint} */ (object)\n );\n break;\n }\n case GeometryType.MULTI_LINE_STRING: {\n geometry = readMultiLineStringGeometry(\n /** @type {GeoJSONMultiLineString} */ (object)\n );\n break;\n }\n case GeometryType.MULTI_POLYGON: {\n geometry = readMultiPolygonGeometry(\n /** @type {GeoJSONMultiPolygon} */ (object)\n );\n break;\n }\n case GeometryType.GEOMETRY_COLLECTION: {\n geometry = readGeometryCollectionGeometry(\n /** @type {GeoJSONGeometryCollection} */ (object)\n );\n break;\n }\n default: {\n throw new Error('Unsupported GeoJSON type: ' + object.type);\n }\n }\n return transformGeometryWithOptions(geometry, false, opt_options);\n}\n\n/**\n * @param {GeoJSONGeometryCollection} object Object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {GeometryCollection} Geometry collection.\n */\nfunction readGeometryCollectionGeometry(object, opt_options) {\n const geometries = object['geometries'].map(\n /**\n * @param {GeoJSONGeometry} geometry Geometry.\n * @return {import(\"../geom/Geometry.js\").default} geometry Geometry.\n */\n function (geometry) {\n return readGeometry(geometry, opt_options);\n }\n );\n return new GeometryCollection(geometries);\n}\n\n/**\n * @param {GeoJSONPoint} object Object.\n * @return {Point} Point.\n */\nfunction readPointGeometry(object) {\n return new Point(object['coordinates']);\n}\n\n/**\n * @param {GeoJSONLineString} object Object.\n * @return {LineString} LineString.\n */\nfunction readLineStringGeometry(object) {\n return new LineString(object['coordinates']);\n}\n\n/**\n * @param {GeoJSONMultiLineString} object Object.\n * @return {MultiLineString} MultiLineString.\n */\nfunction readMultiLineStringGeometry(object) {\n return new MultiLineString(object['coordinates']);\n}\n\n/**\n * @param {GeoJSONMultiPoint} object Object.\n * @return {MultiPoint} MultiPoint.\n */\nfunction readMultiPointGeometry(object) {\n return new MultiPoint(object['coordinates']);\n}\n\n/**\n * @param {GeoJSONMultiPolygon} object Object.\n * @return {MultiPolygon} MultiPolygon.\n */\nfunction readMultiPolygonGeometry(object) {\n return new MultiPolygon(object['coordinates']);\n}\n\n/**\n * @param {GeoJSONPolygon} object Object.\n * @return {Polygon} Polygon.\n */\nfunction readPolygonGeometry(object) {\n return new Polygon(object['coordinates']);\n}\n\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeGeometry(geometry, opt_options) {\n geometry = transformGeometryWithOptions(geometry, true, opt_options);\n const type = geometry.getType();\n\n /** @type {GeoJSONGeometry} */\n let geoJSON;\n switch (type) {\n case GeometryType.POINT: {\n geoJSON = writePointGeometry(\n /** @type {Point} */ (geometry),\n opt_options\n );\n break;\n }\n case GeometryType.LINE_STRING: {\n geoJSON = writeLineStringGeometry(\n /** @type {LineString} */ (geometry),\n opt_options\n );\n break;\n }\n case GeometryType.POLYGON: {\n geoJSON = writePolygonGeometry(\n /** @type {Polygon} */ (geometry),\n opt_options\n );\n break;\n }\n case GeometryType.MULTI_POINT: {\n geoJSON = writeMultiPointGeometry(\n /** @type {MultiPoint} */ (geometry),\n opt_options\n );\n break;\n }\n case GeometryType.MULTI_LINE_STRING: {\n geoJSON = writeMultiLineStringGeometry(\n /** @type {MultiLineString} */ (geometry),\n opt_options\n );\n break;\n }\n case GeometryType.MULTI_POLYGON: {\n geoJSON = writeMultiPolygonGeometry(\n /** @type {MultiPolygon} */ (geometry),\n opt_options\n );\n break;\n }\n case GeometryType.GEOMETRY_COLLECTION: {\n geoJSON = writeGeometryCollectionGeometry(\n /** @type {GeometryCollection} */ (geometry),\n opt_options\n );\n break;\n }\n case GeometryType.CIRCLE: {\n geoJSON = {\n type: 'GeometryCollection',\n geometries: [],\n };\n break;\n }\n default: {\n throw new Error('Unsupported geometry type: ' + type);\n }\n }\n return geoJSON;\n}\n\n/**\n * @param {GeometryCollection} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometryCollection} GeoJSON geometry collection.\n */\nfunction writeGeometryCollectionGeometry(geometry, opt_options) {\n const geometries = geometry.getGeometriesArray().map(function (geometry) {\n const options = assign({}, opt_options);\n delete options.featureProjection;\n return writeGeometry(geometry, options);\n });\n return {\n type: 'GeometryCollection',\n geometries: geometries,\n };\n}\n\n/**\n * @param {LineString} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeLineStringGeometry(geometry, opt_options) {\n return {\n type: 'LineString',\n coordinates: geometry.getCoordinates(),\n };\n}\n\n/**\n * @param {MultiLineString} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiLineStringGeometry(geometry, opt_options) {\n return {\n type: 'MultiLineString',\n coordinates: geometry.getCoordinates(),\n };\n}\n\n/**\n * @param {MultiPoint} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiPointGeometry(geometry, opt_options) {\n return {\n type: 'MultiPoint',\n coordinates: geometry.getCoordinates(),\n };\n}\n\n/**\n * @param {MultiPolygon} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiPolygonGeometry(geometry, opt_options) {\n let right;\n if (opt_options) {\n right = opt_options.rightHanded;\n }\n return {\n type: 'MultiPolygon',\n coordinates: geometry.getCoordinates(right),\n };\n}\n\n/**\n * @param {Point} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writePointGeometry(geometry, opt_options) {\n return {\n type: 'Point',\n coordinates: geometry.getCoordinates(),\n };\n}\n\n/**\n * @param {Polygon} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writePolygonGeometry(geometry, opt_options) {\n let right;\n if (opt_options) {\n right = opt_options.rightHanded;\n }\n return {\n type: 'Polygon',\n coordinates: geometry.getCoordinates(right),\n };\n}\n\nexport default GeoJSON;\n","/**\n * @module ol/reproj/common\n */\n\n/**\n * Default maximum allowed threshold (in pixels) for reprojection\n * triangulation.\n * @type {number}\n */\nexport const ERROR_THRESHOLD = 0.5;\n\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 const ENABLE_RASTER_REPROJECTION = true;\n","/**\n * @module ol/reproj/Triangulation\n */\nimport {\n boundingExtent,\n createEmpty,\n extendCoordinate,\n getArea,\n getBottomLeft,\n getBottomRight,\n getTopLeft,\n getTopRight,\n getWidth,\n intersects,\n} from '../extent.js';\nimport {getTransform} from '../proj.js';\nimport {log2, modulo} from '../math.js';\n\n/**\n * Single triangle; consists of 3 source points and 3 target points.\n * @typedef {Object} Triangle\n * @property {Array<import(\"../coordinate.js\").Coordinate>} source\n * @property {Array<import(\"../coordinate.js\").Coordinate>} target\n */\n\n/**\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 */\nconst MAX_SUBDIVISION = 10;\n\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 */\nconst MAX_TRIANGLE_WIDTH = 0.25;\n\n/**\n * @classdesc\n * Class containing triangulation of the given target extent.\n * Used for determining source data and the reprojection itself.\n */\nclass Triangulation {\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 constructor(\n sourceProj,\n targetProj,\n targetExtent,\n maxSourceExtent,\n errorThreshold,\n opt_destinationResolution\n ) {\n /**\n * @type {import(\"../proj/Projection.js\").default}\n * @private\n */\n this.sourceProj_ = sourceProj;\n\n /**\n * @type {import(\"../proj/Projection.js\").default}\n * @private\n */\n this.targetProj_ = targetProj;\n\n /** @type {!Object<string, import(\"../coordinate.js\").Coordinate>} */\n let transformInvCache = {};\n const transformInv = getTransform(this.targetProj_, this.sourceProj_);\n\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 const key = c[0] + '/' + c[1];\n if (!transformInvCache[key]) {\n transformInvCache[key] = transformInv(c);\n }\n return transformInvCache[key];\n };\n\n /**\n * @type {import(\"../extent.js\").Extent}\n * @private\n */\n this.maxSourceExtent_ = maxSourceExtent;\n\n /**\n * @type {number}\n * @private\n */\n this.errorThresholdSquared_ = errorThreshold * errorThreshold;\n\n /**\n * @type {Array<Triangle>}\n * @private\n */\n this.triangles_ = [];\n\n /**\n * Indicates that the triangulation crosses edge of the source projection.\n * @type {boolean}\n * @private\n */\n this.wrapsXInSource_ = false;\n\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 /**\n * @type {?number}\n * @private\n */\n this.sourceWorldWidth_ = this.sourceProj_.getExtent()\n ? getWidth(this.sourceProj_.getExtent())\n : null;\n\n /**\n * @type {?number}\n * @private\n */\n this.targetWorldWidth_ = this.targetProj_.getExtent()\n ? getWidth(this.targetProj_.getExtent())\n : null;\n\n const destinationTopLeft = getTopLeft(targetExtent);\n const destinationTopRight = getTopRight(targetExtent);\n const destinationBottomRight = getBottomRight(targetExtent);\n const destinationBottomLeft = getBottomLeft(targetExtent);\n const sourceTopLeft = this.transformInv_(destinationTopLeft);\n const sourceTopRight = this.transformInv_(destinationTopRight);\n const sourceBottomRight = this.transformInv_(destinationBottomRight);\n const sourceBottomLeft = this.transformInv_(destinationBottomLeft);\n\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 const maxSubdivision =\n MAX_SUBDIVISION +\n (opt_destinationResolution\n ? Math.max(\n 0,\n Math.ceil(\n log2(\n getArea(targetExtent) /\n (opt_destinationResolution *\n opt_destinationResolution *\n 256 *\n 256)\n )\n )\n )\n : 0);\n\n this.addQuad_(\n destinationTopLeft,\n destinationTopRight,\n destinationBottomRight,\n destinationBottomLeft,\n sourceTopLeft,\n sourceTopRight,\n sourceBottomRight,\n sourceBottomLeft,\n maxSubdivision\n );\n\n if (this.wrapsXInSource_) {\n let leftBound = Infinity;\n this.triangles_.forEach(function (triangle, i, arr) {\n leftBound = Math.min(\n leftBound,\n triangle.source[0][0],\n triangle.source[1][0],\n triangle.source[2][0]\n );\n });\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(\n function (triangle) {\n if (\n Math.max(\n triangle.source[0][0],\n triangle.source[1][0],\n triangle.source[2][0]\n ) -\n leftBound >\n this.sourceWorldWidth_ / 2\n ) {\n const 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 > this.sourceWorldWidth_ / 2) {\n newTriangle[0][0] -= this.sourceWorldWidth_;\n }\n if (newTriangle[1][0] - leftBound > this.sourceWorldWidth_ / 2) {\n newTriangle[1][0] -= this.sourceWorldWidth_;\n }\n if (newTriangle[2][0] - leftBound > this.sourceWorldWidth_ / 2) {\n newTriangle[2][0] -= this.sourceWorldWidth_;\n }\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 const minX = Math.min(\n newTriangle[0][0],\n newTriangle[1][0],\n newTriangle[2][0]\n );\n const maxX = Math.max(\n newTriangle[0][0],\n newTriangle[1][0],\n newTriangle[2][0]\n );\n if (maxX - minX < this.sourceWorldWidth_ / 2) {\n triangle.source = newTriangle;\n }\n }\n }.bind(this)\n );\n }\n\n transformInvCache = {};\n }\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 addTriangle_(a, b, c, aSrc, bSrc, cSrc) {\n this.triangles_.push({\n source: [aSrc, bSrc, cSrc],\n target: [a, b, c],\n });\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 addQuad_(a, b, c, d, aSrc, bSrc, cSrc, dSrc, maxSubdivision) {\n const sourceQuadExtent = boundingExtent([aSrc, bSrc, cSrc, dSrc]);\n const sourceCoverageX = this.sourceWorldWidth_\n ? getWidth(sourceQuadExtent) / this.sourceWorldWidth_\n : null;\n const sourceWorldWidth = /** @type {number} */ (this.sourceWorldWidth_);\n\n // when the quad is wrapped in the source projection\n // it covers most of the projection extent, but not fully\n const wrapsX =\n this.sourceProj_.canWrapX() &&\n sourceCoverageX > 0.5 &&\n sourceCoverageX < 1;\n\n let needsSubdivision = false;\n\n if (maxSubdivision > 0) {\n if (this.targetProj_.isGlobal() && this.targetWorldWidth_) {\n const targetQuadExtent = boundingExtent([a, b, c, d]);\n const targetCoverageX =\n 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\n if (!needsSubdivision && this.maxSourceExtent_) {\n if (\n isFinite(sourceQuadExtent[0]) &&\n isFinite(sourceQuadExtent[1]) &&\n isFinite(sourceQuadExtent[2]) &&\n isFinite(sourceQuadExtent[3])\n ) {\n if (!intersects(sourceQuadExtent, this.maxSourceExtent_)) {\n // whole quad outside source projection extent -> ignore\n return;\n }\n }\n }\n\n let isNotFinite = 0;\n\n if (!needsSubdivision) {\n if (\n !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 ) {\n if (maxSubdivision > 0) {\n needsSubdivision = true;\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 (\n isNotFinite != 1 &&\n isNotFinite != 2 &&\n isNotFinite != 4 &&\n isNotFinite != 8\n ) {\n return;\n }\n }\n }\n }\n\n if (maxSubdivision > 0) {\n if (!needsSubdivision) {\n const center = [(a[0] + c[0]) / 2, (a[1] + c[1]) / 2];\n const centerSrc = this.transformInv_(center);\n\n let dx;\n if (wrapsX) {\n const centerSrcEstimX =\n (modulo(aSrc[0], sourceWorldWidth) +\n modulo(cSrc[0], sourceWorldWidth)) /\n 2;\n dx = centerSrcEstimX - modulo(centerSrc[0], sourceWorldWidth);\n } else {\n dx = (aSrc[0] + cSrc[0]) / 2 - centerSrc[0];\n }\n const dy = (aSrc[1] + cSrc[1]) / 2 - centerSrc[1];\n const 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 const bc = [(b[0] + c[0]) / 2, (b[1] + c[1]) / 2];\n const bcSrc = this.transformInv_(bc);\n const da = [(d[0] + a[0]) / 2, (d[1] + a[1]) / 2];\n const daSrc = this.transformInv_(da);\n\n this.addQuad_(\n a,\n b,\n bc,\n da,\n aSrc,\n bSrc,\n bcSrc,\n daSrc,\n maxSubdivision - 1\n );\n this.addQuad_(\n da,\n bc,\n c,\n d,\n daSrc,\n bcSrc,\n cSrc,\n dSrc,\n maxSubdivision - 1\n );\n } else {\n // split vertically (left & right)\n const ab = [(a[0] + b[0]) / 2, (a[1] + b[1]) / 2];\n const abSrc = this.transformInv_(ab);\n const cd = [(c[0] + d[0]) / 2, (c[1] + d[1]) / 2];\n const cdSrc = this.transformInv_(cd);\n\n this.addQuad_(\n a,\n ab,\n cd,\n d,\n aSrc,\n abSrc,\n cdSrc,\n dSrc,\n maxSubdivision - 1\n );\n this.addQuad_(\n ab,\n b,\n c,\n cd,\n abSrc,\n bSrc,\n cSrc,\n cdSrc,\n maxSubdivision - 1\n );\n }\n return;\n }\n }\n\n if (wrapsX) {\n if (!this.canWrapXInSource_) {\n return;\n }\n this.wrapsXInSource_ = true;\n }\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 /**\n * Calculates extent of the 'source' coordinates from all the triangles.\n *\n * @return {import(\"../extent.js\").Extent} Calculated extent.\n */\n calculateSourceExtent() {\n const extent = createEmpty();\n\n this.triangles_.forEach(function (triangle, i, arr) {\n const src = triangle.source;\n extendCoordinate(extent, src[0]);\n extendCoordinate(extent, src[1]);\n extendCoordinate(extent, src[2]);\n });\n\n return extent;\n }\n\n /**\n * @return {Array<Triangle>} Array of the calculated triangles.\n */\n getTriangles() {\n return this.triangles_;\n }\n}\n\nexport default Triangulation;\n","/**\n * @module ol/source/common\n */\n\n/**\n * Default WMS version.\n * @type {string}\n */\nexport const DEFAULT_WMS_VERSION = '1.3.0';\n\n/**\n * Context options to disable image smoothing.\n * @type {Object}\n */\nexport const IMAGE_SMOOTHING_DISABLED = {\n imageSmoothingEnabled: false,\n msImageSmoothingEnabled: false,\n};\n","/**\n * @module ol/reproj\n */\nimport {IMAGE_SMOOTHING_DISABLED} from './source/common.js';\nimport {assign} from './obj.js';\nimport {\n containsCoordinate,\n createEmpty,\n extend,\n forEachCorner,\n getCenter,\n getHeight,\n getTopLeft,\n getWidth,\n} from './extent.js';\nimport {createCanvasContext2D} from './dom.js';\nimport {getPointResolution, transform} from './proj.js';\nimport {solveLinearSystem} from './math.js';\n\nlet brokenDiagonalRendering_;\n\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/**\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 (\n Math.abs(data[offset * 4] - 210) > 2 ||\n Math.abs(data[offset * 4 + 3] - 0.75 * 255) > 2\n );\n}\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 const 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 const data = ctx.getImageData(0, 0, 3, 3).data;\n brokenDiagonalRendering_ =\n verifyBrokenDiagonalRendering(data, 0) ||\n verifyBrokenDiagonalRendering(data, 4) ||\n verifyBrokenDiagonalRendering(data, 8);\n }\n\n return brokenDiagonalRendering_;\n}\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(\n sourceProj,\n targetProj,\n targetCenter,\n targetResolution\n) {\n const sourceCenter = transform(targetCenter, targetProj, sourceProj);\n\n // calculate the ideal resolution of the source data\n let sourceResolution = getPointResolution(\n targetProj,\n targetResolution,\n targetCenter\n );\n\n const targetMetersPerUnit = targetProj.getMetersPerUnit();\n if (targetMetersPerUnit !== undefined) {\n sourceResolution *= targetMetersPerUnit;\n }\n const sourceMetersPerUnit = sourceProj.getMetersPerUnit();\n if (sourceMetersPerUnit !== undefined) {\n sourceResolution /= sourceMetersPerUnit;\n }\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\n const sourceExtent = sourceProj.getExtent();\n if (!sourceExtent || containsCoordinate(sourceExtent, sourceCenter)) {\n const compensationFactor =\n getPointResolution(sourceProj, sourceResolution, sourceCenter) /\n sourceResolution;\n if (isFinite(compensationFactor) && compensationFactor > 0) {\n sourceResolution /= compensationFactor;\n }\n }\n\n return sourceResolution;\n}\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(\n sourceProj,\n targetProj,\n targetExtent,\n targetResolution\n) {\n const targetCenter = getCenter(targetExtent);\n let sourceResolution = calculateSourceResolution(\n sourceProj,\n targetProj,\n targetCenter,\n targetResolution\n );\n\n if (!isFinite(sourceResolution) || sourceResolution <= 0) {\n forEachCorner(targetExtent, function (corner) {\n sourceResolution = calculateSourceResolution(\n sourceProj,\n targetProj,\n corner,\n targetResolution\n );\n return isFinite(sourceResolution) && sourceResolution > 0;\n });\n }\n\n return sourceResolution;\n}\n\n/**\n * Renders the source data into new canvas based on the triangulation.\n *\n * @param {number} width Width of the canvas.\n * @param {number} height Height of the canvas.\n * @param {number} pixelRatio Pixel ratio.\n * @param {number} sourceResolution Source resolution.\n * @param {import(\"./extent.js\").Extent} sourceExtent Extent of the data source.\n * @param {number} targetResolution Target resolution.\n * @param {import(\"./extent.js\").Extent} targetExtent Target extent.\n * @param {import(\"./reproj/Triangulation.js\").default} triangulation\n * Calculated triangulation.\n * @param {Array<{extent: import(\"./extent.js\").Extent,\n * image: (HTMLCanvasElement|HTMLImageElement|HTMLVideoElement)}>} sources\n * Array of sources.\n * @param {number} gutter Gutter of the sources.\n * @param {boolean=} opt_renderEdges Render reprojection edges.\n * @param {object=} opt_contextOptions Properties to set on the canvas context.\n * @return {HTMLCanvasElement} Canvas with reprojected data.\n */\nexport function render(\n width,\n height,\n pixelRatio,\n sourceResolution,\n sourceExtent,\n targetResolution,\n targetExtent,\n triangulation,\n sources,\n gutter,\n opt_renderEdges,\n opt_contextOptions\n) {\n const context = createCanvasContext2D(\n Math.round(pixelRatio * width),\n Math.round(pixelRatio * height)\n );\n assign(context, opt_contextOptions);\n\n if (sources.length === 0) {\n return context.canvas;\n }\n\n context.scale(pixelRatio, pixelRatio);\n\n function pixelRound(value) {\n return Math.round(value * pixelRatio) / pixelRatio;\n }\n\n context.globalCompositeOperation = 'lighter';\n\n const sourceDataExtent = createEmpty();\n sources.forEach(function (src, i, arr) {\n extend(sourceDataExtent, src.extent);\n });\n\n const canvasWidthInUnits = getWidth(sourceDataExtent);\n const canvasHeightInUnits = getHeight(sourceDataExtent);\n const stitchContext = createCanvasContext2D(\n Math.round((pixelRatio * canvasWidthInUnits) / sourceResolution),\n Math.round((pixelRatio * canvasHeightInUnits) / sourceResolution)\n );\n assign(stitchContext, opt_contextOptions);\n\n const stitchScale = pixelRatio / sourceResolution;\n\n sources.forEach(function (src, i, arr) {\n const xPos = src.extent[0] - sourceDataExtent[0];\n const yPos = -(src.extent[3] - sourceDataExtent[3]);\n const srcWidth = getWidth(src.extent);\n const srcHeight = getHeight(src.extent);\n\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(\n src.image,\n gutter,\n gutter,\n src.image.width - 2 * gutter,\n src.image.height - 2 * gutter,\n xPos * stitchScale,\n yPos * stitchScale,\n srcWidth * stitchScale,\n srcHeight * stitchScale\n );\n }\n });\n\n const targetTopLeft = getTopLeft(targetExtent);\n\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 const source = triangle.source;\n const target = triangle.target;\n let x0 = source[0][0],\n y0 = source[0][1];\n let x1 = source[1][0],\n y1 = source[1][1];\n let x2 = source[2][0],\n y2 = source[2][1];\n // Make sure that everything is on pixel boundaries\n const u0 = pixelRound((target[0][0] - targetTopLeft[0]) / targetResolution);\n const v0 = pixelRound(\n -(target[0][1] - targetTopLeft[1]) / targetResolution\n );\n const u1 = pixelRound((target[1][0] - targetTopLeft[0]) / targetResolution);\n const v1 = pixelRound(\n -(target[1][1] - targetTopLeft[1]) / targetResolution\n );\n const u2 = pixelRound((target[2][0] - targetTopLeft[0]) / targetResolution);\n const v2 = pixelRound(\n -(target[2][1] - targetTopLeft[1]) / targetResolution\n );\n\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 const sourceNumericalShiftX = x0;\n const sourceNumericalShiftY = y0;\n x0 = 0;\n y0 = 0;\n x1 -= sourceNumericalShiftX;\n y1 -= sourceNumericalShiftY;\n x2 -= sourceNumericalShiftX;\n y2 -= sourceNumericalShiftY;\n\n const 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 const affineCoefs = solveLinearSystem(augmentedMatrix);\n if (!affineCoefs) {\n return;\n }\n\n context.save();\n context.beginPath();\n\n if (\n isBrokenDiagonalRendering() ||\n opt_contextOptions === IMAGE_SMOOTHING_DISABLED\n ) {\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 const steps = 4;\n const ud = u0 - u1;\n const vd = v0 - v1;\n for (let step = 0; step < steps; step++) {\n // Go horizontally\n context.lineTo(\n u1 + pixelRound(((step + 1) * ud) / steps),\n v1 + pixelRound((step * vd) / (steps - 1))\n );\n // Go vertically\n if (step != steps - 1) {\n context.lineTo(\n u1 + pixelRound(((step + 1) * ud) / steps),\n v1 + pixelRound(((step + 1) * vd) / (steps - 1))\n );\n }\n }\n // We are almost at u0r, v0r\n context.lineTo(u2, v2);\n } else {\n context.moveTo(u1, v1);\n context.lineTo(u0, v0);\n context.lineTo(u2, v2);\n }\n\n context.clip();\n\n context.transform(\n affineCoefs[0],\n affineCoefs[2],\n affineCoefs[1],\n affineCoefs[3],\n u0,\n v0\n );\n\n context.translate(\n sourceDataExtent[0] - sourceNumericalShiftX,\n sourceDataExtent[3] - sourceNumericalShiftY\n );\n\n context.scale(\n sourceResolution / pixelRatio,\n -sourceResolution / pixelRatio\n );\n\n context.drawImage(stitchContext.canvas, 0, 0);\n context.restore();\n });\n\n if (opt_renderEdges) {\n context.save();\n\n context.globalCompositeOperation = 'source-over';\n context.strokeStyle = 'black';\n context.lineWidth = 1;\n\n triangulation.getTriangles().forEach(function (triangle, i, arr) {\n const target = triangle.target;\n const u0 = (target[0][0] - targetTopLeft[0]) / targetResolution;\n const v0 = -(target[0][1] - targetTopLeft[1]) / targetResolution;\n const u1 = (target[1][0] - targetTopLeft[0]) / targetResolution;\n const v1 = -(target[1][1] - targetTopLeft[1]) / targetResolution;\n const u2 = (target[2][0] - targetTopLeft[0]) / targetResolution;\n const v2 = -(target[2][1] - targetTopLeft[1]) / targetResolution;\n\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\n context.restore();\n }\n return context.canvas;\n}\n","/**\n * @module ol/reproj/Tile\n */\nimport {ERROR_THRESHOLD} from './common.js';\n\nimport EventType from '../events/EventType.js';\nimport Tile from '../Tile.js';\nimport TileState from '../TileState.js';\nimport Triangulation from './Triangulation.js';\nimport {\n calculateSourceExtentResolution,\n render as renderReprojected,\n} from '../reproj.js';\nimport {clamp} from '../math.js';\nimport {getArea, getIntersection} from '../extent.js';\nimport {listen, unlistenByKey} from '../events.js';\n\n/**\n * @typedef {function(number, number, number, number) : import(\"../Tile.js\").default} FunctionType\n */\n\n/**\n * @classdesc\n * Class encapsulating single reprojected tile.\n * See {@link module:ol/source/TileImage~TileImage}.\n *\n */\nclass ReprojTile extends Tile {\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 {object=} opt_contextOptions Properties to set on the canvas context.\n */\n constructor(\n sourceProj,\n sourceTileGrid,\n targetProj,\n targetTileGrid,\n tileCoord,\n wrappedTileCoord,\n pixelRatio,\n gutter,\n getTileFunction,\n opt_errorThreshold,\n opt_renderEdges,\n opt_contextOptions\n ) {\n super(tileCoord, TileState.IDLE);\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderEdges_ = opt_renderEdges !== undefined ? opt_renderEdges : false;\n\n /**\n * @private\n * @type {object}\n */\n this.contextOptions_ = opt_contextOptions;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @private\n * @type {number}\n */\n this.gutter_ = gutter;\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.canvas_ = null;\n\n /**\n * @private\n * @type {import(\"../tilegrid/TileGrid.js\").default}\n */\n this.sourceTileGrid_ = sourceTileGrid;\n\n /**\n * @private\n * @type {import(\"../tilegrid/TileGrid.js\").default}\n */\n this.targetTileGrid_ = targetTileGrid;\n\n /**\n * @private\n * @type {import(\"../tilecoord.js\").TileCoord}\n */\n this.wrappedTileCoord_ = wrappedTileCoord ? wrappedTileCoord : tileCoord;\n\n /**\n * @private\n * @type {!Array<import(\"../Tile.js\").default>}\n */\n this.sourceTiles_ = [];\n\n /**\n * @private\n * @type {?Array<import(\"../events.js\").EventsKey>}\n */\n this.sourcesListenerKeys_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.sourceZ_ = 0;\n\n const targetExtent = targetTileGrid.getTileCoordExtent(\n this.wrappedTileCoord_\n );\n const maxTargetExtent = this.targetTileGrid_.getExtent();\n let maxSourceExtent = this.sourceTileGrid_.getExtent();\n\n const limitedTargetExtent = maxTargetExtent\n ? getIntersection(targetExtent, maxTargetExtent)\n : targetExtent;\n\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;\n }\n\n const sourceProjExtent = sourceProj.getExtent();\n if (sourceProjExtent) {\n if (!maxSourceExtent) {\n maxSourceExtent = sourceProjExtent;\n } else {\n maxSourceExtent = getIntersection(maxSourceExtent, sourceProjExtent);\n }\n }\n\n const targetResolution = targetTileGrid.getResolution(\n this.wrappedTileCoord_[0]\n );\n\n const sourceResolution = calculateSourceExtentResolution(\n sourceProj,\n targetProj,\n limitedTargetExtent,\n targetResolution\n );\n\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;\n }\n\n const errorThresholdInPixels =\n opt_errorThreshold !== undefined ? opt_errorThreshold : ERROR_THRESHOLD;\n\n /**\n * @private\n * @type {!import(\"./Triangulation.js\").default}\n */\n this.triangulation_ = new Triangulation(\n sourceProj,\n targetProj,\n limitedTargetExtent,\n maxSourceExtent,\n sourceResolution * errorThresholdInPixels,\n targetResolution\n );\n\n if (this.triangulation_.getTriangles().length === 0) {\n // no valid triangles -> EMPTY\n this.state = TileState.EMPTY;\n return;\n }\n\n this.sourceZ_ = sourceTileGrid.getZForResolution(sourceResolution);\n let sourceExtent = this.triangulation_.calculateSourceExtent();\n\n if (maxSourceExtent) {\n if (sourceProj.canWrapX()) {\n sourceExtent[1] = clamp(\n sourceExtent[1],\n maxSourceExtent[1],\n maxSourceExtent[3]\n );\n sourceExtent[3] = clamp(\n sourceExtent[3],\n maxSourceExtent[1],\n maxSourceExtent[3]\n );\n } else {\n sourceExtent = getIntersection(sourceExtent, maxSourceExtent);\n }\n }\n\n if (!getArea(sourceExtent)) {\n this.state = TileState.EMPTY;\n } else {\n const sourceRange = sourceTileGrid.getTileRangeForExtentAndZ(\n sourceExtent,\n this.sourceZ_\n );\n\n for (let srcX = sourceRange.minX; srcX <= sourceRange.maxX; srcX++) {\n for (let srcY = sourceRange.minY; srcY <= sourceRange.maxY; srcY++) {\n const tile = getTileFunction(this.sourceZ_, srcX, srcY, pixelRatio);\n if (tile) {\n this.sourceTiles_.push(tile);\n }\n }\n }\n\n if (this.sourceTiles_.length === 0) {\n this.state = TileState.EMPTY;\n }\n }\n }\n\n /**\n * Get the HTML Canvas element for this tile.\n * @return {HTMLCanvasElement} Canvas.\n */\n getImage() {\n return this.canvas_;\n }\n\n /**\n * @private\n */\n reproject_() {\n const sources = [];\n this.sourceTiles_.forEach(\n 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 );\n this.sourceTiles_.length = 0;\n\n if (sources.length === 0) {\n this.state = TileState.ERROR;\n } else {\n const z = this.wrappedTileCoord_[0];\n const size = this.targetTileGrid_.getTileSize(z);\n const width = typeof size === 'number' ? size : size[0];\n const height = typeof size === 'number' ? size : size[1];\n const targetResolution = this.targetTileGrid_.getResolution(z);\n const sourceResolution = this.sourceTileGrid_.getResolution(\n this.sourceZ_\n );\n\n const targetExtent = this.targetTileGrid_.getTileCoordExtent(\n this.wrappedTileCoord_\n );\n this.canvas_ = renderReprojected(\n width,\n height,\n this.pixelRatio_,\n sourceResolution,\n this.sourceTileGrid_.getExtent(),\n targetResolution,\n targetExtent,\n this.triangulation_,\n sources,\n this.gutter_,\n this.renderEdges_,\n this.contextOptions_\n );\n\n this.state = TileState.LOADED;\n }\n this.changed();\n }\n\n /**\n * Load not yet loaded URI.\n */\n load() {\n if (this.state == TileState.IDLE) {\n this.state = TileState.LOADING;\n this.changed();\n\n let leftToLoad = 0;\n\n this.sourcesListenerKeys_ = [];\n this.sourceTiles_.forEach(\n function (tile, i, arr) {\n const state = tile.getState();\n if (state == TileState.IDLE || state == TileState.LOADING) {\n leftToLoad++;\n\n const sourceListenKey = listen(\n tile,\n EventType.CHANGE,\n function (e) {\n const state = tile.getState();\n if (\n state == TileState.LOADED ||\n state == TileState.ERROR ||\n state == TileState.EMPTY\n ) {\n unlistenByKey(sourceListenKey);\n leftToLoad--;\n if (leftToLoad === 0) {\n this.unlistenSources_();\n this.reproject_();\n }\n }\n },\n this\n );\n this.sourcesListenerKeys_.push(sourceListenKey);\n }\n }.bind(this)\n );\n\n this.sourceTiles_.forEach(function (tile, i, arr) {\n const state = tile.getState();\n if (state == TileState.IDLE) {\n tile.load();\n }\n });\n\n if (leftToLoad === 0) {\n setTimeout(this.reproject_.bind(this), 0);\n }\n }\n }\n\n /**\n * @private\n */\n unlistenSources_() {\n this.sourcesListenerKeys_.forEach(unlistenByKey);\n this.sourcesListenerKeys_ = null;\n }\n}\n\nexport default ReprojTile;\n","/**\n * @module ol/source/TileEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n /**\n * Triggered when a tile starts loading.\n * @event module:ol/source/Tile.TileSourceEvent#tileloadstart\n * @api\n */\n TILELOADSTART: 'tileloadstart',\n\n /**\n * Triggered when a tile finishes loading, either when its data is loaded,\n * or when loading was aborted because the tile is no longer needed.\n * @event module:ol/source/Tile.TileSourceEvent#tileloadend\n * @api\n */\n TILELOADEND: 'tileloadend',\n\n /**\n * Triggered if tile loading results in an error.\n * @event module:ol/source/Tile.TileSourceEvent#tileloaderror\n * @api\n */\n TILELOADERROR: 'tileloaderror',\n};\n","/**\n * @module ol/tilegrid/TileGrid\n */\nimport TileRange, {\n createOrUpdate as createOrUpdateTileRange,\n} from '../TileRange.js';\nimport {DEFAULT_TILE_SIZE} from './common.js';\nimport {assert} from '../asserts.js';\nimport {clamp} from '../math.js';\nimport {createOrUpdate, getTopLeft} from '../extent.js';\nimport {createOrUpdate as createOrUpdateTileCoord} from '../tilecoord.js';\nimport {isSorted, linearFindNearest} from '../array.js';\nimport {toSize} from '../size.js';\n\n/**\n * @private\n * @type {import(\"../tilecoord.js\").TileCoord}\n */\nconst tmpTileCoord = [0, 0, 0];\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the tile grid. No tiles outside this\n * extent will be requested by {@link module:ol/source/Tile} sources. When no `origin` or\n * `origins` are configured, the `origin` will be set to the top-left corner of the extent.\n * @property {number} [minZoom=0] Minimum zoom.\n * @property {import(\"../coordinate.js\").Coordinate} [origin] The tile grid origin, i.e. where the `x`\n * and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left to right and downwards. If not\n * specified, `extent` or `origins` must be provided.\n * @property {Array<import(\"../coordinate.js\").Coordinate>} [origins] Tile grid origins, i.e. where\n * the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If given, the array length\n * should match the length of the `resolutions` array, i.e. each resolution can have a different\n * origin. Tile coordinates increase left to right and downwards. If not specified, `extent` or\n * `origin` must be provided.\n * @property {!Array<number>} resolutions Resolutions. The array index of each resolution needs\n * to match the zoom level. This means that even if a `minZoom` is configured, the resolutions\n * array will have a length of `maxZoom + 1`.\n * @property {Array<import(\"../size.js\").Size>} [sizes] Number of tile rows and columns\n * of the grid for each zoom level. If specified the values\n * define each zoom level's extent together with the `origin` or `origins`.\n * A grid `extent` can be configured in addition, and will further limit the extent\n * for which tile requests are made by sources. If the bottom-left corner of\n * an extent is used as `origin` or `origins`, then the `y` value must be\n * negative because OpenLayers tile coordinates use the top left as the origin.\n * @property {number|import(\"../size.js\").Size} [tileSize] Tile size.\n * Default is `[256, 256]`.\n * @property {Array<import(\"../size.js\").Size>} [tileSizes] Tile sizes. If given, the array length\n * should match the length of the `resolutions` array, i.e. each resolution can have a different\n * tile size.\n */\n\n/**\n * @classdesc\n * Base class for setting the grid pattern for sources accessing tiled-image\n * servers.\n * @api\n */\nclass TileGrid {\n /**\n * @param {Options} options Tile grid options.\n */\n constructor(options) {\n /**\n * @protected\n * @type {number}\n */\n this.minZoom = options.minZoom !== undefined ? options.minZoom : 0;\n\n /**\n * @private\n * @type {!Array<number>}\n */\n this.resolutions_ = options.resolutions;\n assert(\n isSorted(\n this.resolutions_,\n function (a, b) {\n return b - a;\n },\n true\n ),\n 17\n ); // `resolutions` must be sorted in descending order\n\n // check if we've got a consistent zoom factor and origin\n let zoomFactor;\n if (!options.origins) {\n for (let i = 0, ii = this.resolutions_.length - 1; i < ii; ++i) {\n if (!zoomFactor) {\n zoomFactor = this.resolutions_[i] / this.resolutions_[i + 1];\n } else {\n if (this.resolutions_[i] / this.resolutions_[i + 1] !== zoomFactor) {\n zoomFactor = undefined;\n break;\n }\n }\n }\n }\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.zoomFactor_ = zoomFactor;\n\n /**\n * @protected\n * @type {number}\n */\n this.maxZoom = this.resolutions_.length - 1;\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n this.origin_ = options.origin !== undefined ? options.origin : null;\n\n /**\n * @private\n * @type {Array<import(\"../coordinate.js\").Coordinate>}\n */\n this.origins_ = null;\n if (options.origins !== undefined) {\n this.origins_ = options.origins;\n assert(this.origins_.length == this.resolutions_.length, 20); // Number of `origins` and `resolutions` must be equal\n }\n\n const extent = options.extent;\n\n if (extent !== undefined && !this.origin_ && !this.origins_) {\n this.origin_ = getTopLeft(extent);\n }\n\n assert(\n (!this.origin_ && this.origins_) || (this.origin_ && !this.origins_),\n 18\n ); // Either `origin` or `origins` must be configured, never both\n\n /**\n * @private\n * @type {Array<number|import(\"../size.js\").Size>}\n */\n this.tileSizes_ = null;\n if (options.tileSizes !== undefined) {\n this.tileSizes_ = options.tileSizes;\n assert(this.tileSizes_.length == this.resolutions_.length, 19); // Number of `tileSizes` and `resolutions` must be equal\n }\n\n /**\n * @private\n * @type {number|import(\"../size.js\").Size}\n */\n this.tileSize_ =\n options.tileSize !== undefined\n ? options.tileSize\n : !this.tileSizes_\n ? DEFAULT_TILE_SIZE\n : null;\n assert(\n (!this.tileSize_ && this.tileSizes_) ||\n (this.tileSize_ && !this.tileSizes_),\n 22\n ); // Either `tileSize` or `tileSizes` must be configured, never both\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.extent_ = extent !== undefined ? extent : null;\n\n /**\n * @private\n * @type {Array<import(\"../TileRange.js\").default>}\n */\n this.fullTileRanges_ = null;\n\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.tmpSize_ = [0, 0];\n\n if (options.sizes !== undefined) {\n this.fullTileRanges_ = options.sizes.map(function (size, z) {\n const tileRange = new TileRange(\n Math.min(0, size[0]),\n Math.max(size[0] - 1, -1),\n Math.min(0, size[1]),\n Math.max(size[1] - 1, -1)\n );\n if (extent) {\n const restrictedTileRange = this.getTileRangeForExtentAndZ(extent, z);\n tileRange.minX = Math.max(restrictedTileRange.minX, tileRange.minX);\n tileRange.maxX = Math.min(restrictedTileRange.maxX, tileRange.maxX);\n tileRange.minY = Math.max(restrictedTileRange.minY, tileRange.minY);\n tileRange.maxY = Math.min(restrictedTileRange.maxY, tileRange.maxY);\n }\n return tileRange;\n }, this);\n } else if (extent) {\n this.calculateTileRanges_(extent);\n }\n }\n\n /**\n * Call a function with each tile coordinate for a given extent and zoom level.\n *\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} zoom Integer zoom level.\n * @param {function(import(\"../tilecoord.js\").TileCoord): void} callback Function called with each tile coordinate.\n * @api\n */\n forEachTileCoord(extent, zoom, callback) {\n const tileRange = this.getTileRangeForExtentAndZ(extent, zoom);\n for (let i = tileRange.minX, ii = tileRange.maxX; i <= ii; ++i) {\n for (let j = tileRange.minY, jj = tileRange.maxY; j <= jj; ++j) {\n callback([zoom, i, j]);\n }\n }\n }\n\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {function(number, import(\"../TileRange.js\").default): boolean} callback Callback.\n * @param {import(\"../TileRange.js\").default=} opt_tileRange Temporary import(\"../TileRange.js\").default object.\n * @param {import(\"../extent.js\").Extent=} opt_extent Temporary import(\"../extent.js\").Extent object.\n * @return {boolean} Callback succeeded.\n */\n forEachTileCoordParentTileRange(\n tileCoord,\n callback,\n opt_tileRange,\n opt_extent\n ) {\n let tileRange, x, y;\n let tileCoordExtent = null;\n let z = tileCoord[0] - 1;\n if (this.zoomFactor_ === 2) {\n x = tileCoord[1];\n y = tileCoord[2];\n } else {\n tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent);\n }\n while (z >= this.minZoom) {\n if (this.zoomFactor_ === 2) {\n x = Math.floor(x / 2);\n y = Math.floor(y / 2);\n tileRange = createOrUpdateTileRange(x, x, y, y, opt_tileRange);\n } else {\n tileRange = this.getTileRangeForExtentAndZ(\n tileCoordExtent,\n z,\n opt_tileRange\n );\n }\n if (callback(z, tileRange)) {\n return true;\n }\n --z;\n }\n return false;\n }\n\n /**\n * Get the extent for this tile grid, if it was configured.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\n getExtent() {\n return this.extent_;\n }\n\n /**\n * Get the maximum zoom level for the grid.\n * @return {number} Max zoom.\n * @api\n */\n getMaxZoom() {\n return this.maxZoom;\n }\n\n /**\n * Get the minimum zoom level for the grid.\n * @return {number} Min zoom.\n * @api\n */\n getMinZoom() {\n return this.minZoom;\n }\n\n /**\n * Get the origin for the grid at the given zoom level.\n * @param {number} z Integer zoom level.\n * @return {import(\"../coordinate.js\").Coordinate} Origin.\n * @api\n */\n getOrigin(z) {\n if (this.origin_) {\n return this.origin_;\n } else {\n return this.origins_[z];\n }\n }\n\n /**\n * Get the resolution for the given zoom level.\n * @param {number} z Integer zoom level.\n * @return {number} Resolution.\n * @api\n */\n getResolution(z) {\n return this.resolutions_[z];\n }\n\n /**\n * Get the list of resolutions for the tile grid.\n * @return {Array<number>} Resolutions.\n * @api\n */\n getResolutions() {\n return this.resolutions_;\n }\n\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"../TileRange.js\").default=} opt_tileRange Temporary import(\"../TileRange.js\").default object.\n * @param {import(\"../extent.js\").Extent=} opt_extent Temporary import(\"../extent.js\").Extent object.\n * @return {import(\"../TileRange.js\").default} Tile range.\n */\n getTileCoordChildTileRange(tileCoord, opt_tileRange, opt_extent) {\n if (tileCoord[0] < this.maxZoom) {\n if (this.zoomFactor_ === 2) {\n const minX = tileCoord[1] * 2;\n const minY = tileCoord[2] * 2;\n return createOrUpdateTileRange(\n minX,\n minX + 1,\n minY,\n minY + 1,\n opt_tileRange\n );\n }\n const tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent);\n return this.getTileRangeForExtentAndZ(\n tileCoordExtent,\n tileCoord[0] + 1,\n opt_tileRange\n );\n }\n return null;\n }\n\n /**\n * Get the extent for a tile range.\n * @param {number} z Integer zoom level.\n * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n * @param {import(\"../extent.js\").Extent=} opt_extent Temporary import(\"../extent.js\").Extent object.\n * @return {import(\"../extent.js\").Extent} Extent.\n */\n getTileRangeExtent(z, tileRange, opt_extent) {\n const origin = this.getOrigin(z);\n const resolution = this.getResolution(z);\n const tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n const minX = origin[0] + tileRange.minX * tileSize[0] * resolution;\n const maxX = origin[0] + (tileRange.maxX + 1) * tileSize[0] * resolution;\n const minY = origin[1] + tileRange.minY * tileSize[1] * resolution;\n const maxY = origin[1] + (tileRange.maxY + 1) * tileSize[1] * resolution;\n return createOrUpdate(minX, minY, maxX, maxY, opt_extent);\n }\n\n /**\n * Get a tile range for the given extent and integer zoom level.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} z Integer zoom level.\n * @param {import(\"../TileRange.js\").default=} opt_tileRange Temporary tile range object.\n * @return {import(\"../TileRange.js\").default} Tile range.\n */\n getTileRangeForExtentAndZ(extent, z, opt_tileRange) {\n const tileCoord = tmpTileCoord;\n this.getTileCoordForXYAndZ_(extent[0], extent[3], z, false, tileCoord);\n const minX = tileCoord[1];\n const minY = tileCoord[2];\n this.getTileCoordForXYAndZ_(extent[2], extent[1], z, true, tileCoord);\n return createOrUpdateTileRange(\n minX,\n tileCoord[1],\n minY,\n tileCoord[2],\n opt_tileRange\n );\n }\n\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @return {import(\"../coordinate.js\").Coordinate} Tile center.\n */\n getTileCoordCenter(tileCoord) {\n const origin = this.getOrigin(tileCoord[0]);\n const resolution = this.getResolution(tileCoord[0]);\n const tileSize = toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);\n return [\n origin[0] + (tileCoord[1] + 0.5) * tileSize[0] * resolution,\n origin[1] - (tileCoord[2] + 0.5) * tileSize[1] * resolution,\n ];\n }\n\n /**\n * Get the extent of a tile coordinate.\n *\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"../extent.js\").Extent=} opt_extent Temporary extent object.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\n getTileCoordExtent(tileCoord, opt_extent) {\n const origin = this.getOrigin(tileCoord[0]);\n const resolution = this.getResolution(tileCoord[0]);\n const tileSize = toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);\n const minX = origin[0] + tileCoord[1] * tileSize[0] * resolution;\n const minY = origin[1] - (tileCoord[2] + 1) * tileSize[1] * resolution;\n const maxX = minX + tileSize[0] * resolution;\n const maxY = minY + tileSize[1] * resolution;\n return createOrUpdate(minX, minY, maxX, maxY, opt_extent);\n }\n\n /**\n * Get the tile coordinate for the given map coordinate and resolution. This\n * method considers that coordinates that intersect tile boundaries should be\n * assigned the higher tile coordinate.\n *\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} resolution Resolution.\n * @param {import(\"../tilecoord.js\").TileCoord=} opt_tileCoord Destination import(\"../tilecoord.js\").TileCoord object.\n * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n * @api\n */\n getTileCoordForCoordAndResolution(coordinate, resolution, opt_tileCoord) {\n return this.getTileCoordForXYAndResolution_(\n coordinate[0],\n coordinate[1],\n resolution,\n false,\n opt_tileCoord\n );\n }\n\n /**\n * Note that this method should not be called for resolutions that correspond\n * to an integer zoom level. Instead call the `getTileCoordForXYAndZ_` method.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {number} resolution Resolution (for a non-integer zoom level).\n * @param {boolean} reverseIntersectionPolicy Instead of letting edge\n * intersections go to the higher tile coordinate, let edge intersections\n * go to the lower tile coordinate.\n * @param {import(\"../tilecoord.js\").TileCoord=} opt_tileCoord Temporary import(\"../tilecoord.js\").TileCoord object.\n * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n * @private\n */\n getTileCoordForXYAndResolution_(\n x,\n y,\n resolution,\n reverseIntersectionPolicy,\n opt_tileCoord\n ) {\n const z = this.getZForResolution(resolution);\n const scale = resolution / this.getResolution(z);\n const origin = this.getOrigin(z);\n const tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n\n const adjustX = reverseIntersectionPolicy ? 0.5 : 0;\n const adjustY = reverseIntersectionPolicy ? 0.5 : 0;\n const xFromOrigin = Math.floor((x - origin[0]) / resolution + adjustX);\n const yFromOrigin = Math.floor((origin[1] - y) / resolution + adjustY);\n let tileCoordX = (scale * xFromOrigin) / tileSize[0];\n let tileCoordY = (scale * yFromOrigin) / tileSize[1];\n\n if (reverseIntersectionPolicy) {\n tileCoordX = Math.ceil(tileCoordX) - 1;\n tileCoordY = Math.ceil(tileCoordY) - 1;\n } else {\n tileCoordX = Math.floor(tileCoordX);\n tileCoordY = Math.floor(tileCoordY);\n }\n\n return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoord);\n }\n\n /**\n * Although there is repetition between this method and `getTileCoordForXYAndResolution_`,\n * they should have separate implementations. This method is for integer zoom\n * levels. The other method should only be called for resolutions corresponding\n * to non-integer zoom levels.\n * @param {number} x Map x coordinate.\n * @param {number} y Map y coordinate.\n * @param {number} z Integer zoom level.\n * @param {boolean} reverseIntersectionPolicy Instead of letting edge\n * intersections go to the higher tile coordinate, let edge intersections\n * go to the lower tile coordinate.\n * @param {import(\"../tilecoord.js\").TileCoord=} opt_tileCoord Temporary import(\"../tilecoord.js\").TileCoord object.\n * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n * @private\n */\n getTileCoordForXYAndZ_(x, y, z, reverseIntersectionPolicy, opt_tileCoord) {\n const origin = this.getOrigin(z);\n const resolution = this.getResolution(z);\n const tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n\n const adjustX = reverseIntersectionPolicy ? 0.5 : 0;\n const adjustY = reverseIntersectionPolicy ? 0.5 : 0;\n const xFromOrigin = Math.floor((x - origin[0]) / resolution + adjustX);\n const yFromOrigin = Math.floor((origin[1] - y) / resolution + adjustY);\n let tileCoordX = xFromOrigin / tileSize[0];\n let tileCoordY = yFromOrigin / tileSize[1];\n\n if (reverseIntersectionPolicy) {\n tileCoordX = Math.ceil(tileCoordX) - 1;\n tileCoordY = Math.ceil(tileCoordY) - 1;\n } else {\n tileCoordX = Math.floor(tileCoordX);\n tileCoordY = Math.floor(tileCoordY);\n }\n\n return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoord);\n }\n\n /**\n * Get a tile coordinate given a map coordinate and zoom level.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} z Zoom level.\n * @param {import(\"../tilecoord.js\").TileCoord=} opt_tileCoord Destination import(\"../tilecoord.js\").TileCoord object.\n * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n * @api\n */\n getTileCoordForCoordAndZ(coordinate, z, opt_tileCoord) {\n return this.getTileCoordForXYAndZ_(\n coordinate[0],\n coordinate[1],\n z,\n false,\n opt_tileCoord\n );\n }\n\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @return {number} Tile resolution.\n */\n getTileCoordResolution(tileCoord) {\n return this.resolutions_[tileCoord[0]];\n }\n\n /**\n * Get the tile size for a zoom level. The type of the return value matches the\n * `tileSize` or `tileSizes` that the tile grid was configured with. To always\n * get an `import(\"../size.js\").Size`, run the result through `import(\"../size.js\").Size.toSize()`.\n * @param {number} z Z.\n * @return {number|import(\"../size.js\").Size} Tile size.\n * @api\n */\n getTileSize(z) {\n if (this.tileSize_) {\n return this.tileSize_;\n } else {\n return this.tileSizes_[z];\n }\n }\n\n /**\n * @param {number} z Zoom level.\n * @return {import(\"../TileRange.js\").default} Extent tile range for the specified zoom level.\n */\n getFullTileRange(z) {\n if (!this.fullTileRanges_) {\n return this.extent_\n ? this.getTileRangeForExtentAndZ(this.extent_, z)\n : null;\n } else {\n return this.fullTileRanges_[z];\n }\n }\n\n /**\n * @param {number} resolution Resolution.\n * @param {number=} opt_direction If 0, the nearest resolution will be used.\n * If 1, the nearest lower resolution will be used. If -1, the nearest\n * higher resolution will be used. Default is 0.\n * @return {number} Z.\n * @api\n */\n getZForResolution(resolution, opt_direction) {\n const z = linearFindNearest(\n this.resolutions_,\n resolution,\n opt_direction || 0\n );\n return clamp(z, this.minZoom, this.maxZoom);\n }\n\n /**\n * @param {!import(\"../extent.js\").Extent} extent Extent for this tile grid.\n * @private\n */\n calculateTileRanges_(extent) {\n const length = this.resolutions_.length;\n const fullTileRanges = new Array(length);\n for (let z = this.minZoom; z < length; ++z) {\n fullTileRanges[z] = this.getTileRangeForExtentAndZ(extent, z);\n }\n this.fullTileRanges_ = fullTileRanges;\n }\n}\n\nexport default TileGrid;\n","/**\n * @module ol/tilegrid\n */\nimport Corner from './extent/Corner.js';\nimport TileGrid from './tilegrid/TileGrid.js';\nimport Units from './proj/Units.js';\nimport {DEFAULT_MAX_ZOOM, DEFAULT_TILE_SIZE} from './tilegrid/common.js';\nimport {METERS_PER_UNIT, get as getProjection} from './proj.js';\nimport {\n containsCoordinate,\n createOrUpdate,\n getCorner,\n getHeight,\n getWidth,\n} from './extent.js';\nimport {toSize} from './size.js';\n\n/**\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {!TileGrid} Default tile grid for the\n * passed projection.\n */\nexport function getForProjection(projection) {\n let tileGrid = projection.getDefaultTileGrid();\n if (!tileGrid) {\n tileGrid = createForProjection(projection);\n projection.setDefaultTileGrid(tileGrid);\n }\n return tileGrid;\n}\n\n/**\n * @param {TileGrid} tileGrid Tile grid.\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {import(\"./tilecoord.js\").TileCoord} Tile coordinate.\n */\nexport function wrapX(tileGrid, tileCoord, projection) {\n const z = tileCoord[0];\n const center = tileGrid.getTileCoordCenter(tileCoord);\n const projectionExtent = extentFromProjection(projection);\n if (!containsCoordinate(projectionExtent, center)) {\n const worldWidth = getWidth(projectionExtent);\n const worldsAway = Math.ceil(\n (projectionExtent[0] - center[0]) / worldWidth\n );\n center[0] += worldWidth * worldsAway;\n return tileGrid.getTileCoordForCoordAndZ(center, z);\n } else {\n return tileCoord;\n }\n}\n\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number=} opt_maxZoom Maximum zoom level (default is\n * DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size=} opt_tileSize Tile size (default uses\n * DEFAULT_TILE_SIZE).\n * @param {import(\"./extent/Corner.js\").default=} opt_corner Extent corner (default is `'top-left'`).\n * @return {!TileGrid} TileGrid instance.\n */\nexport function createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner) {\n const corner = opt_corner !== undefined ? opt_corner : Corner.TOP_LEFT;\n\n const resolutions = resolutionsFromExtent(extent, opt_maxZoom, opt_tileSize);\n\n return new TileGrid({\n extent: extent,\n origin: getCorner(extent, corner),\n resolutions: resolutions,\n tileSize: opt_tileSize,\n });\n}\n\n/**\n * @typedef {Object} XYZOptions\n * @property {import(\"./extent.js\").Extent} [extent] Extent for the tile grid. The origin for an XYZ tile grid is the\n * top-left corner of the extent. If `maxResolution` is not provided the zero level of the grid is defined by the resolution\n * at which one tile fits in the provided extent. If not provided, the extent of the EPSG:3857 projection is used.\n * @property {number} [maxResolution] Resolution at level zero.\n * @property {number} [maxZoom] Maximum zoom. The default is `42`. This determines the number of levels\n * in the grid set. For example, a `maxZoom` of 21 means there are 22 levels in the grid set.\n * @property {number} [minZoom=0] Minimum zoom.\n * @property {number|import(\"./size.js\").Size} [tileSize=[256, 256]] Tile size in pixels.\n */\n\n/**\n * Creates a tile grid with a standard XYZ tiling scheme.\n * @param {XYZOptions=} opt_options Tile grid options.\n * @return {!TileGrid} Tile grid instance.\n * @api\n */\nexport function createXYZ(opt_options) {\n const xyzOptions = opt_options || {};\n\n const extent = xyzOptions.extent || getProjection('EPSG:3857').getExtent();\n\n const gridOptions = {\n extent: extent,\n minZoom: xyzOptions.minZoom,\n tileSize: xyzOptions.tileSize,\n resolutions: resolutionsFromExtent(\n extent,\n xyzOptions.maxZoom,\n xyzOptions.tileSize,\n xyzOptions.maxResolution\n ),\n };\n return new TileGrid(gridOptions);\n}\n\n/**\n * Create a resolutions array from an extent. A zoom factor of 2 is assumed.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number=} opt_maxZoom Maximum zoom level (default is\n * DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size=} opt_tileSize Tile size (default uses\n * DEFAULT_TILE_SIZE).\n * @param {number=} opt_maxResolution Resolution at level zero.\n * @return {!Array<number>} Resolutions array.\n */\nfunction resolutionsFromExtent(\n extent,\n opt_maxZoom,\n opt_tileSize,\n opt_maxResolution\n) {\n const maxZoom = opt_maxZoom !== undefined ? opt_maxZoom : DEFAULT_MAX_ZOOM;\n\n const height = getHeight(extent);\n const width = getWidth(extent);\n\n const tileSize = toSize(\n opt_tileSize !== undefined ? opt_tileSize : DEFAULT_TILE_SIZE\n );\n const maxResolution =\n opt_maxResolution > 0\n ? opt_maxResolution\n : Math.max(width / tileSize[0], height / tileSize[1]);\n\n const length = maxZoom + 1;\n const resolutions = new Array(length);\n for (let z = 0; z < length; ++z) {\n resolutions[z] = maxResolution / Math.pow(2, z);\n }\n return resolutions;\n}\n\n/**\n * @param {import(\"./proj.js\").ProjectionLike} projection Projection.\n * @param {number=} opt_maxZoom Maximum zoom level (default is\n * DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size=} opt_tileSize Tile size (default uses\n * DEFAULT_TILE_SIZE).\n * @param {import(\"./extent/Corner.js\").default=} opt_corner Extent corner (default is `'top-left'`).\n * @return {!TileGrid} TileGrid instance.\n */\nexport function createForProjection(\n projection,\n opt_maxZoom,\n opt_tileSize,\n opt_corner\n) {\n const extent = extentFromProjection(projection);\n return createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner);\n}\n\n/**\n * Generate a tile grid extent from a projection. If the projection has an\n * extent, it is used. If not, a global extent is assumed.\n * @param {import(\"./proj.js\").ProjectionLike} projection Projection.\n * @return {import(\"./extent.js\").Extent} Extent.\n */\nexport function extentFromProjection(projection) {\n projection = getProjection(projection);\n let extent = projection.getExtent();\n if (!extent) {\n const half =\n (180 * METERS_PER_UNIT[Units.DEGREES]) / projection.getMetersPerUnit();\n extent = createOrUpdate(-half, -half, half, half);\n }\n return extent;\n}\n","/**\n * @module ol/source/Tile\n */\nimport Event from '../events/Event.js';\nimport Source from './Source.js';\nimport TileCache from '../TileCache.js';\nimport TileState from '../TileState.js';\nimport {abstract} from '../util.js';\nimport {assert} from '../asserts.js';\nimport {equivalent} from '../proj.js';\nimport {getKeyZXY, withinExtentAndZ} from '../tilecoord.js';\nimport {\n getForProjection as getTileGridForProjection,\n wrapX,\n} from '../tilegrid.js';\nimport {scale as scaleSize, toSize} from '../size.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions]\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize]\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {number} [tilePixelRatio]\n * @property {import(\"../proj.js\").ProjectionLike} [projection]\n * @property {import(\"./State.js\").default} [state]\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid]\n * @property {boolean} [wrapX=true]\n * @property {number} [transition]\n * @property {string} [key]\n * @property {number} [zDirection=0]\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for sources providing images divided into a tile grid.\n * @abstract\n * @api\n */\nclass TileSource extends Source {\n /**\n * @param {Options} options SourceTile source options.\n */\n constructor(options) {\n super({\n attributions: options.attributions,\n attributionsCollapsible: options.attributionsCollapsible,\n projection: options.projection,\n state: options.state,\n wrapX: options.wrapX,\n });\n\n /**\n * @private\n * @type {boolean}\n */\n this.opaque_ = options.opaque !== undefined ? options.opaque : false;\n\n /**\n * @private\n * @type {number}\n */\n this.tilePixelRatio_ =\n options.tilePixelRatio !== undefined ? options.tilePixelRatio : 1;\n\n /**\n * @protected\n * @type {import(\"../tilegrid/TileGrid.js\").default}\n */\n this.tileGrid = options.tileGrid !== undefined ? options.tileGrid : null;\n\n const tileSize = [256, 256];\n const tileGrid = options.tileGrid;\n if (tileGrid) {\n toSize(tileGrid.getTileSize(tileGrid.getMinZoom()), tileSize);\n }\n\n /**\n * @protected\n * @type {import(\"../TileCache.js\").default}\n */\n this.tileCache = new TileCache(options.cacheSize || 0);\n\n /**\n * @protected\n * @type {import(\"../size.js\").Size}\n */\n this.tmpSize = [0, 0];\n\n /**\n * @private\n * @type {string}\n */\n this.key_ = options.key || '';\n\n /**\n * @protected\n * @type {import(\"../Tile.js\").Options}\n */\n this.tileOptions = {transition: options.transition};\n\n /**\n * zDirection hint, read by the renderer. Indicates which resolution should be used\n * by a renderer if the views resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n * @type {number}\n */\n this.zDirection = options.zDirection ? options.zDirection : 0;\n }\n\n /**\n * @return {boolean} Can expire cache.\n */\n canExpireCache() {\n return this.tileCache.canExpireCache();\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {!Object<string, boolean>} usedTiles Used tiles.\n */\n expireCache(projection, usedTiles) {\n const tileCache = this.getTileCacheForProjection(projection);\n if (tileCache) {\n tileCache.expireCache(usedTiles);\n }\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {number} z Zoom level.\n * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n * @param {function(import(\"../Tile.js\").default):(boolean|void)} callback Called with each\n * loaded tile. If the callback returns `false`, the tile will not be\n * considered loaded.\n * @return {boolean} The tile range is fully covered with loaded tiles.\n */\n forEachLoadedTile(projection, z, tileRange, callback) {\n const tileCache = this.getTileCacheForProjection(projection);\n if (!tileCache) {\n return false;\n }\n\n let covered = true;\n let tile, tileCoordKey, loaded;\n for (let x = tileRange.minX; x <= tileRange.maxX; ++x) {\n for (let y = tileRange.minY; y <= tileRange.maxY; ++y) {\n tileCoordKey = getKeyZXY(z, x, y);\n loaded = false;\n if (tileCache.containsKey(tileCoordKey)) {\n tile = /** @type {!import(\"../Tile.js\").default} */ (tileCache.get(\n tileCoordKey\n ));\n loaded = tile.getState() === TileState.LOADED;\n if (loaded) {\n loaded = callback(tile) !== false;\n }\n }\n if (!loaded) {\n covered = false;\n }\n }\n }\n return covered;\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {number} Gutter.\n */\n getGutterForProjection(projection) {\n return 0;\n }\n\n /**\n * Return the key to be used for all tiles in the source.\n * @return {string} The key for all tiles.\n * @protected\n */\n getKey() {\n return this.key_;\n }\n\n /**\n * Set the value to be used as the key for all tiles in the source.\n * @param {string} key The key for tiles.\n * @protected\n */\n setKey(key) {\n if (this.key_ !== key) {\n this.key_ = key;\n this.changed();\n }\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {boolean} Opaque.\n */\n getOpaque(projection) {\n return this.opaque_;\n }\n\n /**\n * @return {Array<number>} Resolutions.\n */\n getResolutions() {\n return this.tileGrid.getResolutions();\n }\n\n /**\n * @abstract\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {!import(\"../Tile.js\").default} Tile.\n */\n getTile(z, x, y, pixelRatio, projection) {\n return abstract();\n }\n\n /**\n * Return the tile grid of the tile source.\n * @return {import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n * @api\n */\n getTileGrid() {\n return this.tileGrid;\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n */\n getTileGridForProjection(projection) {\n if (!this.tileGrid) {\n return getTileGridForProjection(projection);\n } else {\n return this.tileGrid;\n }\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../TileCache.js\").default} Tile cache.\n * @protected\n */\n getTileCacheForProjection(projection) {\n assert(\n equivalent(this.getProjection(), projection),\n 68 // A VectorTile source can only be rendered if it has a projection compatible with the view projection.\n );\n return this.tileCache;\n }\n\n /**\n * Get the tile pixel ratio for this source. Subclasses may override this\n * method, which is meant to return a supported pixel ratio that matches the\n * provided `pixelRatio` as close as possible.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Tile pixel ratio.\n */\n getTilePixelRatio(pixelRatio) {\n return this.tilePixelRatio_;\n }\n\n /**\n * @param {number} z Z.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../size.js\").Size} Tile size.\n */\n getTilePixelSize(z, pixelRatio, projection) {\n const tileGrid = this.getTileGridForProjection(projection);\n const tilePixelRatio = this.getTilePixelRatio(pixelRatio);\n const tileSize = toSize(tileGrid.getTileSize(z), this.tmpSize);\n if (tilePixelRatio == 1) {\n return tileSize;\n } else {\n return scaleSize(tileSize, tilePixelRatio, this.tmpSize);\n }\n }\n\n /**\n * Returns a tile coordinate wrapped around the x-axis. When the tile coordinate\n * is outside the resolution and extent range of the tile grid, `null` will be\n * returned.\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"../proj/Projection.js\").default=} opt_projection Projection.\n * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate to be passed to the tileUrlFunction or\n * null if no tile URL should be created for the passed `tileCoord`.\n */\n getTileCoordForTileUrlFunction(tileCoord, opt_projection) {\n const projection =\n opt_projection !== undefined ? opt_projection : this.getProjection();\n const tileGrid = this.getTileGridForProjection(projection);\n if (this.getWrapX() && projection.isGlobal()) {\n tileCoord = wrapX(tileGrid, tileCoord, projection);\n }\n return withinExtentAndZ(tileCoord, tileGrid) ? tileCoord : null;\n }\n\n /**\n * Remove all cached tiles from the source. The next render cycle will fetch new tiles.\n * @api\n */\n clear() {\n this.tileCache.clear();\n }\n\n refresh() {\n this.clear();\n super.refresh();\n }\n\n /**\n * Increases the cache size if needed\n * @param {number} tileCount Minimum number of tiles needed.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n */\n updateCacheSize(tileCount, projection) {\n const tileCache = this.getTileCacheForProjection(projection);\n if (tileCount > tileCache.highWaterMark) {\n tileCache.highWaterMark = tileCount;\n }\n }\n\n /**\n * Marks a tile coord as being used, without triggering a load.\n * @abstract\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n */\n useTile(z, x, y, projection) {}\n}\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Tile~TileSource} instances are instances of this\n * type.\n */\nexport class TileSourceEvent extends Event {\n /**\n * @param {string} type Type.\n * @param {import(\"../Tile.js\").default} tile The tile.\n */\n constructor(type, tile) {\n super(type);\n\n /**\n * The tile related to the event.\n * @type {import(\"../Tile.js\").default}\n * @api\n */\n this.tile = tile;\n }\n}\n\nexport default TileSource;\n","/**\n * @module ol/tileurlfunction\n */\nimport {assert} from './asserts.js';\nimport {modulo} from './math.js';\nimport {hash as tileCoordHash} from './tilecoord.js';\n\n/**\n * @param {string} template Template.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTemplate(template, tileGrid) {\n const zRegEx = /\\{z\\}/g;\n const xRegEx = /\\{x\\}/g;\n const yRegEx = /\\{y\\}/g;\n const dashYRegEx = /\\{-y\\}/g;\n return (\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {string|undefined} Tile URL.\n */\n function (tileCoord, pixelRatio, projection) {\n if (!tileCoord) {\n return undefined;\n } else {\n return template\n .replace(zRegEx, tileCoord[0].toString())\n .replace(xRegEx, tileCoord[1].toString())\n .replace(yRegEx, tileCoord[2].toString())\n .replace(dashYRegEx, function () {\n const z = tileCoord[0];\n const range = tileGrid.getFullTileRange(z);\n assert(range, 55); // The {-y} placeholder requires a tile grid with extent\n const y = range.getHeight() - tileCoord[2] - 1;\n return y.toString();\n });\n }\n }\n );\n}\n\n/**\n * @param {Array<string>} templates Templates.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTemplates(templates, tileGrid) {\n const len = templates.length;\n const tileUrlFunctions = new Array(len);\n for (let i = 0; i < len; ++i) {\n tileUrlFunctions[i] = createFromTemplate(templates[i], tileGrid);\n }\n return createFromTileUrlFunctions(tileUrlFunctions);\n}\n\n/**\n * @param {Array<import(\"./Tile.js\").UrlFunction>} tileUrlFunctions Tile URL Functions.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTileUrlFunctions(tileUrlFunctions) {\n if (tileUrlFunctions.length === 1) {\n return tileUrlFunctions[0];\n }\n return (\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {string|undefined} Tile URL.\n */\n function (tileCoord, pixelRatio, projection) {\n if (!tileCoord) {\n return undefined;\n } else {\n const h = tileCoordHash(tileCoord);\n const index = modulo(h, tileUrlFunctions.length);\n return tileUrlFunctions[index](tileCoord, pixelRatio, projection);\n }\n }\n );\n}\n\n/**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {string|undefined} Tile URL.\n */\nexport function nullTileUrlFunction(tileCoord, pixelRatio, projection) {\n return undefined;\n}\n\n/**\n * @param {string} url URL.\n * @return {Array<string>} Array of urls.\n */\nexport function expandUrl(url) {\n const urls = [];\n let match = /\\{([a-z])-([a-z])\\}/.exec(url);\n if (match) {\n // char range\n const startCharCode = match[1].charCodeAt(0);\n const stopCharCode = match[2].charCodeAt(0);\n let charCode;\n for (charCode = startCharCode; charCode <= stopCharCode; ++charCode) {\n urls.push(url.replace(match[0], String.fromCharCode(charCode)));\n }\n return urls;\n }\n match = /\\{(\\d+)-(\\d+)\\}/.exec(url);\n if (match) {\n // number range\n const stop = parseInt(match[2], 10);\n for (let i = parseInt(match[1], 10); i <= stop; i++) {\n urls.push(url.replace(match[0], i.toString()));\n }\n return urls;\n }\n urls.push(url);\n return urls;\n}\n","/**\n * @module ol/source/UrlTile\n */\nimport TileEventType from './TileEventType.js';\nimport TileSource, {TileSourceEvent} from './Tile.js';\nimport TileState from '../TileState.js';\nimport {createFromTemplates, expandUrl} from '../tileurlfunction.js';\nimport {getKeyZXY} from '../tilecoord.js';\nimport {getUid} from '../util.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions]\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize]\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {import(\"../proj.js\").ProjectionLike} [projection]\n * @property {import(\"./State.js\").default} [state]\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid]\n * @property {import(\"../Tile.js\").LoadFunction} tileLoadFunction\n * @property {number} [tilePixelRatio]\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction]\n * @property {string} [url]\n * @property {Array<string>} [urls]\n * @property {boolean} [wrapX=true]\n * @property {number} [transition]\n * @property {string} [key]\n * @property {number} [zDirection=0]\n */\n\n/**\n * @classdesc\n * Base class for sources providing tiles divided into a tile grid over http.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n */\nclass UrlTile extends TileSource {\n /**\n * @param {Options} options Image tile options.\n */\n constructor(options) {\n super({\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n opaque: options.opaque,\n projection: options.projection,\n state: options.state,\n tileGrid: options.tileGrid,\n tilePixelRatio: options.tilePixelRatio,\n wrapX: options.wrapX,\n transition: options.transition,\n key: options.key,\n attributionsCollapsible: options.attributionsCollapsible,\n zDirection: options.zDirection,\n });\n\n /**\n * @private\n * @type {boolean}\n */\n this.generateTileUrlFunction_ =\n this.tileUrlFunction === UrlTile.prototype.tileUrlFunction;\n\n /**\n * @protected\n * @type {import(\"../Tile.js\").LoadFunction}\n */\n this.tileLoadFunction = options.tileLoadFunction;\n\n if (options.tileUrlFunction) {\n this.tileUrlFunction = options.tileUrlFunction;\n }\n\n /**\n * @protected\n * @type {!Array<string>|null}\n */\n this.urls = null;\n\n if (options.urls) {\n this.setUrls(options.urls);\n } else if (options.url) {\n this.setUrl(options.url);\n }\n\n /**\n * @private\n * @type {!Object<string, boolean>}\n */\n this.tileLoadingKeys_ = {};\n }\n\n /**\n * Return the tile load function of the source.\n * @return {import(\"../Tile.js\").LoadFunction} TileLoadFunction\n * @api\n */\n getTileLoadFunction() {\n return this.tileLoadFunction;\n }\n\n /**\n * Return the tile URL function of the source.\n * @return {import(\"../Tile.js\").UrlFunction} TileUrlFunction\n * @api\n */\n getTileUrlFunction() {\n return Object.getPrototypeOf(this).tileUrlFunction === this.tileUrlFunction\n ? this.tileUrlFunction.bind(this)\n : this.tileUrlFunction;\n }\n\n /**\n * Return the URLs used for this source.\n * When a tileUrlFunction is used instead of url or urls,\n * null will be returned.\n * @return {!Array<string>|null} URLs.\n * @api\n */\n getUrls() {\n return this.urls;\n }\n\n /**\n * Handle tile change events.\n * @param {import(\"../events/Event.js\").default} event Event.\n * @protected\n */\n handleTileChange(event) {\n const tile = /** @type {import(\"../Tile.js\").default} */ (event.target);\n const uid = getUid(tile);\n const tileState = tile.getState();\n let type;\n if (tileState == TileState.LOADING) {\n this.tileLoadingKeys_[uid] = true;\n type = TileEventType.TILELOADSTART;\n } else if (uid in this.tileLoadingKeys_) {\n delete this.tileLoadingKeys_[uid];\n type =\n tileState == TileState.ERROR\n ? TileEventType.TILELOADERROR\n : tileState == TileState.LOADED\n ? TileEventType.TILELOADEND\n : undefined;\n }\n if (type != undefined) {\n this.dispatchEvent(new TileSourceEvent(type, tile));\n }\n }\n\n /**\n * Set the tile load function of the source.\n * @param {import(\"../Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n * @api\n */\n setTileLoadFunction(tileLoadFunction) {\n this.tileCache.clear();\n this.tileLoadFunction = tileLoadFunction;\n this.changed();\n }\n\n /**\n * Set the tile URL function of the source.\n * @param {import(\"../Tile.js\").UrlFunction} tileUrlFunction Tile URL function.\n * @param {string=} key Optional new tile key for the source.\n * @api\n */\n setTileUrlFunction(tileUrlFunction, key) {\n this.tileUrlFunction = tileUrlFunction;\n this.tileCache.pruneExceptNewestZ();\n if (typeof key !== 'undefined') {\n this.setKey(key);\n } else {\n this.changed();\n }\n }\n\n /**\n * Set the URL to use for requests.\n * @param {string} url URL.\n * @api\n */\n setUrl(url) {\n const urls = expandUrl(url);\n this.urls = urls;\n this.setUrls(urls);\n }\n\n /**\n * Set the URLs to use for requests.\n * @param {Array<string>} urls URLs.\n * @api\n */\n setUrls(urls) {\n this.urls = urls;\n const key = urls.join('\\n');\n if (this.generateTileUrlFunction_) {\n this.setTileUrlFunction(createFromTemplates(urls, this.tileGrid), key);\n } else {\n this.setKey(key);\n }\n }\n\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {string|undefined} Tile URL.\n */\n tileUrlFunction(tileCoord, pixelRatio, projection) {\n return undefined;\n }\n\n /**\n * Marks a tile coord as being used, without triggering a load.\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n */\n useTile(z, x, y) {\n const tileCoordKey = getKeyZXY(z, x, y);\n if (this.tileCache.containsKey(tileCoordKey)) {\n this.tileCache.get(tileCoordKey);\n }\n }\n}\n\nexport default UrlTile;\n","/**\n * @module ol/source/TileImage\n */\nimport EventType from '../events/EventType.js';\nimport ImageTile from '../ImageTile.js';\nimport ReprojTile from '../reproj/Tile.js';\nimport TileCache from '../TileCache.js';\nimport TileState from '../TileState.js';\nimport UrlTile from './UrlTile.js';\nimport {ENABLE_RASTER_REPROJECTION} from '../reproj/common.js';\nimport {IMAGE_SMOOTHING_DISABLED} from './common.js';\nimport {equivalent, get as getProjection} from '../proj.js';\nimport {getKey, getKeyZXY} from '../tilecoord.js';\nimport {getForProjection as getTileGridForProjection} from '../tilegrid.js';\nimport {getUid} from '../util.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"./State.js\").default} [state] Source state.\n * @property {typeof import(\"../ImageTile.js\").default} [tileClass] Class used to instantiate image tiles.\n * Default is {@link module:ol/ImageTile~ImageTile}.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service. For example, if the tile\n * service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be\n * used instead of defining each one separately in the `urls` option.\n * @property {Array<string>} [urls] An array of URL templates.\n * @property {boolean} [wrapX] Whether to wrap the world horizontally. The default, is to\n * request out-of-bounds tiles from the server. When set to `false`, only one\n * world will be rendered. When set to `true`, tiles will be requested for one\n * world only, but they will be wrapped horizontally to render multiple worlds.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {string} [key] Optional tile key for proper cache fetching\n * @property {number} [zDirection=0] Indicate which resolution should be used\n * by a renderer if the view resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n */\n\n/**\n * @classdesc\n * Base class for sources providing images divided into a tile grid.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n * @api\n */\nclass TileImage extends UrlTile {\n /**\n * @param {!Options} options Image tile options.\n */\n constructor(options) {\n super({\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n opaque: options.opaque,\n projection: options.projection,\n state: options.state,\n tileGrid: options.tileGrid,\n tileLoadFunction: options.tileLoadFunction\n ? options.tileLoadFunction\n : defaultTileLoadFunction,\n tilePixelRatio: options.tilePixelRatio,\n tileUrlFunction: options.tileUrlFunction,\n url: options.url,\n urls: options.urls,\n wrapX: options.wrapX,\n transition: options.transition,\n key: options.key,\n attributionsCollapsible: options.attributionsCollapsible,\n zDirection: options.zDirection,\n });\n\n /**\n * @protected\n * @type {?string}\n */\n this.crossOrigin =\n options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n /**\n * @protected\n * @type {typeof ImageTile}\n */\n this.tileClass =\n options.tileClass !== undefined ? options.tileClass : ImageTile;\n\n /**\n * @protected\n * @type {!Object<string, TileCache>}\n */\n this.tileCacheForProjection = {};\n\n /**\n * @protected\n * @type {!Object<string, import(\"../tilegrid/TileGrid.js\").default>}\n */\n this.tileGridForProjection = {};\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.reprojectionErrorThreshold_ = options.reprojectionErrorThreshold;\n\n /**\n * @private\n * @type {object|undefined}\n */\n this.contextOptions_ =\n options.imageSmoothing === false ? IMAGE_SMOOTHING_DISABLED : undefined;\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderReprojectionEdges_ = false;\n }\n\n /**\n * @return {boolean} Can expire cache.\n */\n canExpireCache() {\n if (!ENABLE_RASTER_REPROJECTION) {\n return super.canExpireCache();\n }\n if (this.tileCache.canExpireCache()) {\n return true;\n } else {\n for (const key in this.tileCacheForProjection) {\n if (this.tileCacheForProjection[key].canExpireCache()) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {!Object<string, boolean>} usedTiles Used tiles.\n */\n expireCache(projection, usedTiles) {\n if (!ENABLE_RASTER_REPROJECTION) {\n super.expireCache(projection, usedTiles);\n return;\n }\n const usedTileCache = this.getTileCacheForProjection(projection);\n\n this.tileCache.expireCache(\n this.tileCache == usedTileCache ? usedTiles : {}\n );\n for (const id in this.tileCacheForProjection) {\n const tileCache = this.tileCacheForProjection[id];\n tileCache.expireCache(tileCache == usedTileCache ? usedTiles : {});\n }\n }\n\n /**\n * @return {Object|undefined} Context options.\n */\n getContextOptions() {\n return this.contextOptions_;\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {number} Gutter.\n */\n getGutterForProjection(projection) {\n if (\n ENABLE_RASTER_REPROJECTION &&\n this.getProjection() &&\n projection &&\n !equivalent(this.getProjection(), projection)\n ) {\n return 0;\n } else {\n return this.getGutter();\n }\n }\n\n /**\n * @return {number} Gutter.\n */\n getGutter() {\n return 0;\n }\n\n /**\n * Return the key to be used for all tiles in the source.\n * @return {string} The key for all tiles.\n * @protected\n */\n getKey() {\n return (\n super.getKey() +\n (this.contextOptions_ ? '\\n' + JSON.stringify(this.contextOptions_) : '')\n );\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {boolean} Opaque.\n */\n getOpaque(projection) {\n if (\n ENABLE_RASTER_REPROJECTION &&\n this.getProjection() &&\n projection &&\n !equivalent(this.getProjection(), projection)\n ) {\n return false;\n } else {\n return super.getOpaque(projection);\n }\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n */\n getTileGridForProjection(projection) {\n if (!ENABLE_RASTER_REPROJECTION) {\n return super.getTileGridForProjection(projection);\n }\n const thisProj = this.getProjection();\n if (this.tileGrid && (!thisProj || equivalent(thisProj, projection))) {\n return this.tileGrid;\n } else {\n const projKey = getUid(projection);\n if (!(projKey in this.tileGridForProjection)) {\n this.tileGridForProjection[projKey] = getTileGridForProjection(\n projection\n );\n }\n return this.tileGridForProjection[projKey];\n }\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../TileCache.js\").default} Tile cache.\n */\n getTileCacheForProjection(projection) {\n if (!ENABLE_RASTER_REPROJECTION) {\n return super.getTileCacheForProjection(projection);\n }\n const thisProj = this.getProjection();\n if (!thisProj || equivalent(thisProj, projection)) {\n return this.tileCache;\n } else {\n const projKey = getUid(projection);\n if (!(projKey in this.tileCacheForProjection)) {\n this.tileCacheForProjection[projKey] = new TileCache(\n this.tileCache.highWaterMark\n );\n }\n return this.tileCacheForProjection[projKey];\n }\n }\n\n /**\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {string} key The key set on the tile.\n * @return {!import(\"../Tile.js\").default} Tile.\n * @private\n */\n createTile_(z, x, y, pixelRatio, projection, key) {\n const tileCoord = [z, x, y];\n const urlTileCoord = this.getTileCoordForTileUrlFunction(\n tileCoord,\n projection\n );\n const tileUrl = urlTileCoord\n ? this.tileUrlFunction(urlTileCoord, pixelRatio, projection)\n : undefined;\n const tile = new this.tileClass(\n tileCoord,\n tileUrl !== undefined ? TileState.IDLE : TileState.EMPTY,\n tileUrl !== undefined ? tileUrl : '',\n this.crossOrigin,\n this.tileLoadFunction,\n this.tileOptions\n );\n tile.key = key;\n tile.addEventListener(EventType.CHANGE, this.handleTileChange.bind(this));\n return tile;\n }\n\n /**\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {!import(\"../Tile.js\").default} Tile.\n */\n getTile(z, x, y, pixelRatio, projection) {\n const sourceProjection = this.getProjection();\n if (\n !ENABLE_RASTER_REPROJECTION ||\n !sourceProjection ||\n !projection ||\n equivalent(sourceProjection, projection)\n ) {\n return this.getTileInternal(\n z,\n x,\n y,\n pixelRatio,\n sourceProjection || projection\n );\n } else {\n const cache = this.getTileCacheForProjection(projection);\n const tileCoord = [z, x, y];\n let tile;\n const tileCoordKey = getKey(tileCoord);\n if (cache.containsKey(tileCoordKey)) {\n tile = cache.get(tileCoordKey);\n }\n const key = this.getKey();\n if (tile && tile.key == key) {\n return tile;\n } else {\n const sourceTileGrid = this.getTileGridForProjection(sourceProjection);\n const targetTileGrid = this.getTileGridForProjection(projection);\n const wrappedTileCoord = this.getTileCoordForTileUrlFunction(\n tileCoord,\n projection\n );\n const newTile = new ReprojTile(\n sourceProjection,\n sourceTileGrid,\n projection,\n targetTileGrid,\n tileCoord,\n wrappedTileCoord,\n this.getTilePixelRatio(pixelRatio),\n this.getGutter(),\n function (z, x, y, pixelRatio) {\n return this.getTileInternal(z, x, y, pixelRatio, sourceProjection);\n }.bind(this),\n this.reprojectionErrorThreshold_,\n this.renderReprojectionEdges_,\n this.contextOptions_\n );\n newTile.key = key;\n\n if (tile) {\n newTile.interimTile = tile;\n newTile.refreshInterimChain();\n cache.replace(tileCoordKey, newTile);\n } else {\n cache.set(tileCoordKey, newTile);\n }\n return newTile;\n }\n }\n }\n\n /**\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {number} pixelRatio Pixel ratio.\n * @param {!import(\"../proj/Projection.js\").default} projection Projection.\n * @return {!import(\"../Tile.js\").default} Tile.\n * @protected\n */\n getTileInternal(z, x, y, pixelRatio, projection) {\n let tile = null;\n const tileCoordKey = getKeyZXY(z, x, y);\n const key = this.getKey();\n if (!this.tileCache.containsKey(tileCoordKey)) {\n tile = this.createTile_(z, x, y, pixelRatio, projection, key);\n this.tileCache.set(tileCoordKey, tile);\n } else {\n tile = this.tileCache.get(tileCoordKey);\n if (tile.key != key) {\n // The source's params changed. If the tile has an interim tile and if we\n // can use it then we use it. Otherwise we create a new tile. In both\n // cases we attempt to assign an interim tile to the new tile.\n const interimTile = tile;\n tile = this.createTile_(z, x, y, pixelRatio, projection, key);\n\n //make the new tile the head of the list,\n if (interimTile.getState() == TileState.IDLE) {\n //the old tile hasn't begun loading yet, and is now outdated, so we can simply discard it\n tile.interimTile = interimTile.interimTile;\n } else {\n tile.interimTile = interimTile;\n }\n tile.refreshInterimChain();\n this.tileCache.replace(tileCoordKey, tile);\n }\n }\n return tile;\n }\n\n /**\n * Sets whether to render reprojection edges or not (usually for debugging).\n * @param {boolean} render Render the edges.\n * @api\n */\n setRenderReprojectionEdges(render) {\n if (\n !ENABLE_RASTER_REPROJECTION ||\n this.renderReprojectionEdges_ == render\n ) {\n return;\n }\n this.renderReprojectionEdges_ = render;\n for (const id in this.tileCacheForProjection) {\n this.tileCacheForProjection[id].clear();\n }\n this.changed();\n }\n\n /**\n * Sets the tile grid to use when reprojecting the tiles to the given\n * projection instead of the default tile grid for the projection.\n *\n * This can be useful when the default tile grid cannot be created\n * (e.g. projection has no extent defined) or\n * for optimization reasons (custom tile size, resolutions, ...).\n *\n * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n * @param {import(\"../tilegrid/TileGrid.js\").default} tilegrid Tile grid to use for the projection.\n * @api\n */\n setTileGridForProjection(projection, tilegrid) {\n if (ENABLE_RASTER_REPROJECTION) {\n const proj = getProjection(projection);\n if (proj) {\n const projKey = getUid(proj);\n if (!(projKey in this.tileGridForProjection)) {\n this.tileGridForProjection[projKey] = tilegrid;\n }\n }\n }\n }\n}\n\n/**\n * @param {ImageTile} imageTile Image tile.\n * @param {string} src Source.\n */\nfunction defaultTileLoadFunction(imageTile, src) {\n /** @type {HTMLImageElement|HTMLVideoElement} */ (imageTile.getImage()).src = src;\n}\n\nexport default TileImage;\n","/**\n * @module ol/net\n */\nimport {getUid} from './util.js';\n\n/**\n * Simple JSONP helper. Supports error callbacks and a custom callback param.\n * The error callback will be called when no JSONP is executed after 10 seconds.\n *\n * @param {string} url Request url. A 'callback' query parameter will be\n * appended.\n * @param {Function} callback Callback on success.\n * @param {function()=} opt_errback Callback on error.\n * @param {string=} opt_callbackParam Custom query parameter for the JSONP\n * callback. Default is 'callback'.\n */\nexport function jsonp(url, callback, opt_errback, opt_callbackParam) {\n const script = document.createElement('script');\n const key = 'olc_' + getUid(callback);\n function cleanup() {\n delete window[key];\n script.parentNode.removeChild(script);\n }\n script.async = true;\n script.src =\n url +\n (url.indexOf('?') == -1 ? '?' : '&') +\n (opt_callbackParam || 'callback') +\n '=' +\n key;\n const timer = setTimeout(function () {\n cleanup();\n if (opt_errback) {\n opt_errback();\n }\n }, 10000);\n window[key] = function (data) {\n clearTimeout(timer);\n cleanup();\n callback(data);\n };\n document.getElementsByTagName('head')[0].appendChild(script);\n}\n","/**\n * @module ol/source/BingMaps\n */\n\nimport SourceState from './State.js';\nimport TileImage from './TileImage.js';\nimport {applyTransform, intersects} from '../extent.js';\nimport {createFromTileUrlFunctions} from '../tileurlfunction.js';\nimport {createOrUpdate} from '../tilecoord.js';\nimport {createXYZ, extentFromProjection} from '../tilegrid.js';\nimport {get as getProjection, getTransformFromProjections} from '../proj.js';\nimport {jsonp as requestJSONP} from '../net.js';\n\n/**\n * @param {import('../tilecoord.js').TileCoord} tileCoord Tile coord.\n * @return {string} Quad key.\n */\nexport function quadKey(tileCoord) {\n const z = tileCoord[0];\n const digits = new Array(z);\n let mask = 1 << (z - 1);\n let i, charCode;\n for (i = 0; i < z; ++i) {\n // 48 is charCode for 0 - '0'.charCodeAt(0)\n charCode = 48;\n if (tileCoord[1] & mask) {\n charCode += 1;\n }\n if (tileCoord[2] & mask) {\n charCode += 2;\n }\n digits[i] = String.fromCharCode(charCode);\n mask >>= 1;\n }\n return digits.join('');\n}\n\n/**\n * The attribution containing a link to the Microsoft® Bing™ Maps Platform APIs’\n * Terms Of Use.\n * @const\n * @type {string}\n */\nconst TOS_ATTRIBUTION =\n '<a class=\"ol-attribution-bing-tos\" ' +\n 'href=\"https://www.microsoft.com/maps/product/terms.html\" target=\"_blank\">' +\n 'Terms of Use</a>';\n\n/**\n * @typedef {Object} Options\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {boolean} [hidpi=false] If `true` hidpi tiles will be requested.\n * @property {string} [culture='en-us'] Culture code.\n * @property {string} key Bing Maps API key. Get yours at http://www.bingmapsportal.com/.\n * @property {string} imagerySet Type of imagery.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {number} [maxZoom=21] Max zoom. Default is what's advertized by the BingMaps service.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n */\n\n/**\n * @typedef {Object} BingMapsImageryMetadataResponse\n * @property {number} statusCode The response status code\n * @property {string} statusDescription The response status description\n * @property {string} authenticationResultCode The authentication result code\n * @property {Array<ResourceSet>} resourceSets The array of resource sets\n */\n\n/**\n * @typedef {Object} ResourceSet\n * @property {Array<Resource>} resources\n */\n\n/**\n * @typedef {Object} Resource\n * @property {number} imageHeight The image height\n * @property {number} imageWidth The image width\n * @property {number} zoomMin The minimum zoom level\n * @property {number} zoomMax The maximum zoom level\n * @property {string} imageUrl The image URL\n * @property {Array<string>} imageUrlSubdomains The image URL subdomains for rotation\n * @property {Array<ImageryProvider>} [imageryProviders] The array of ImageryProviders\n */\n\n/**\n * @typedef {Object} ImageryProvider\n * @property {Array<CoverageArea>} coverageAreas The coverage areas\n * @property {string} [attribution] The attribution\n */\n\n/**\n * @typedef {Object} CoverageArea\n * @property {number} zoomMin The minimum zoom\n * @property {number} zoomMax The maximum zoom\n * @property {Array<number>} bbox The coverage bounding box\n */\n\n/**\n * @classdesc\n * Layer source for Bing Maps tile data.\n * @api\n */\nclass BingMaps extends TileImage {\n /**\n * @param {Options} options Bing Maps options.\n */\n constructor(options) {\n const hidpi = options.hidpi !== undefined ? options.hidpi : false;\n\n super({\n cacheSize: options.cacheSize,\n crossOrigin: 'anonymous',\n imageSmoothing: options.imageSmoothing,\n opaque: true,\n projection: getProjection('EPSG:3857'),\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n state: SourceState.LOADING,\n tileLoadFunction: options.tileLoadFunction,\n tilePixelRatio: hidpi ? 2 : 1,\n wrapX: options.wrapX !== undefined ? options.wrapX : true,\n transition: options.transition,\n });\n\n /**\n * @private\n * @type {boolean}\n */\n this.hidpi_ = hidpi;\n\n /**\n * @private\n * @type {string}\n */\n this.culture_ = options.culture !== undefined ? options.culture : 'en-us';\n\n /**\n * @private\n * @type {number}\n */\n this.maxZoom_ = options.maxZoom !== undefined ? options.maxZoom : -1;\n\n /**\n * @private\n * @type {string}\n */\n this.apiKey_ = options.key;\n\n /**\n * @private\n * @type {string}\n */\n this.imagerySet_ = options.imagerySet;\n\n const url =\n 'https://dev.virtualearth.net/REST/v1/Imagery/Metadata/' +\n this.imagerySet_ +\n '?uriScheme=https&include=ImageryProviders&key=' +\n this.apiKey_ +\n '&c=' +\n this.culture_;\n\n requestJSONP(\n url,\n this.handleImageryMetadataResponse.bind(this),\n undefined,\n 'jsonp'\n );\n }\n\n /**\n * Get the api key used for this source.\n *\n * @return {string} The api key.\n * @api\n */\n getApiKey() {\n return this.apiKey_;\n }\n\n /**\n * Get the imagery set associated with this source.\n *\n * @return {string} The imagery set.\n * @api\n */\n getImagerySet() {\n return this.imagerySet_;\n }\n\n /**\n * @param {BingMapsImageryMetadataResponse} response Response.\n */\n handleImageryMetadataResponse(response) {\n if (\n response.statusCode != 200 ||\n response.statusDescription != 'OK' ||\n response.authenticationResultCode != 'ValidCredentials' ||\n response.resourceSets.length != 1 ||\n response.resourceSets[0].resources.length != 1\n ) {\n this.setState(SourceState.ERROR);\n return;\n }\n\n const resource = response.resourceSets[0].resources[0];\n const maxZoom = this.maxZoom_ == -1 ? resource.zoomMax : this.maxZoom_;\n\n const sourceProjection = this.getProjection();\n const extent = extentFromProjection(sourceProjection);\n const scale = this.hidpi_ ? 2 : 1;\n const tileSize =\n resource.imageWidth == resource.imageHeight\n ? resource.imageWidth / scale\n : [resource.imageWidth / scale, resource.imageHeight / scale];\n\n const tileGrid = createXYZ({\n extent: extent,\n minZoom: resource.zoomMin,\n maxZoom: maxZoom,\n tileSize: tileSize,\n });\n this.tileGrid = tileGrid;\n\n const culture = this.culture_;\n const hidpi = this.hidpi_;\n this.tileUrlFunction = createFromTileUrlFunctions(\n resource.imageUrlSubdomains.map(function (subdomain) {\n /** @type {import('../tilecoord.js').TileCoord} */\n const quadKeyTileCoord = [0, 0, 0];\n const imageUrl = resource.imageUrl\n .replace('{subdomain}', subdomain)\n .replace('{culture}', culture);\n return (\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {string|undefined} Tile URL.\n */\n function (tileCoord, pixelRatio, projection) {\n if (!tileCoord) {\n return undefined;\n } else {\n createOrUpdate(\n tileCoord[0],\n tileCoord[1],\n tileCoord[2],\n quadKeyTileCoord\n );\n let url = imageUrl;\n if (hidpi) {\n url += '&dpi=d1&device=mobile';\n }\n return url.replace('{quadkey}', quadKey(quadKeyTileCoord));\n }\n }\n );\n })\n );\n\n if (resource.imageryProviders) {\n const transform = getTransformFromProjections(\n getProjection('EPSG:4326'),\n this.getProjection()\n );\n\n this.setAttributions(\n function (frameState) {\n const attributions = [];\n const viewState = frameState.viewState;\n const tileGrid = this.getTileGrid();\n const z = tileGrid.getZForResolution(\n viewState.resolution,\n this.zDirection\n );\n const tileCoord = tileGrid.getTileCoordForCoordAndZ(\n viewState.center,\n z\n );\n const zoom = tileCoord[0];\n resource.imageryProviders.map(function (imageryProvider) {\n let intersecting = false;\n const coverageAreas = imageryProvider.coverageAreas;\n for (let i = 0, ii = coverageAreas.length; i < ii; ++i) {\n const coverageArea = coverageAreas[i];\n if (\n zoom >= coverageArea.zoomMin &&\n zoom <= coverageArea.zoomMax\n ) {\n const bbox = coverageArea.bbox;\n const epsg4326Extent = [bbox[1], bbox[0], bbox[3], bbox[2]];\n const extent = applyTransform(epsg4326Extent, transform);\n if (intersects(extent, frameState.extent)) {\n intersecting = true;\n break;\n }\n }\n }\n if (intersecting) {\n attributions.push(imageryProvider.attribution);\n }\n });\n\n attributions.push(TOS_ATTRIBUTION);\n return attributions;\n }.bind(this)\n );\n }\n\n this.setState(SourceState.READY);\n }\n}\n\nexport default BingMaps;\n","/**\n * @module ol/source/XYZ\n */\n\nimport TileImage from './TileImage.js';\nimport {createXYZ, extentFromProjection} from '../tilegrid.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {number} [maxZoom=42] Optional max zoom level. Not used if `tileGrid` is provided.\n * @property {number} [minZoom=0] Optional min zoom level. Not used if `tileGrid` is provided.\n * @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service.\n * For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {number|import(\"../size.js\").Size} [tileSize=[256, 256]] The tile size used by the tile service.\n * Not used if `tileGrid` is provided.\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Optional function to get\n * tile URL given a tile coordinate and the projection.\n * Required if `url` or `urls` are not provided.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`,\n * and `{z}` placeholders. A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`,\n * may be used instead of defining each one separately in the `urls` option.\n * @property {Array<string>} [urls] An array of URL templates.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition=250] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number} [zDirection=0] Indicate which resolution should be used\n * by a renderer if the view resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n */\n\n/**\n * @classdesc\n * Layer source for tile data with URLs in a set XYZ format that are\n * defined in a URL template. By default, this follows the widely-used\n * Google grid where `x` 0 and `y` 0 are in the top left. Grids like\n * TMS where `x` 0 and `y` 0 are in the bottom left can be used by\n * using the `{-y}` placeholder in the URL template, so long as the\n * source does not have a custom tile grid. In this case\n * a `tileUrlFunction` can be used, such as:\n * ```js\n * tileUrlFunction: function(coordinate) {\n * return 'http://mapserver.com/' + coordinate[0] + '/' +\n * coordinate[1] + '/' + (-coordinate[2] - 1) + '.png';\n * }\n * ```\n * @api\n */\nclass XYZ extends TileImage {\n /**\n * @param {Options=} opt_options XYZ options.\n */\n constructor(opt_options) {\n const options = opt_options || {};\n const projection =\n options.projection !== undefined ? options.projection : 'EPSG:3857';\n\n const tileGrid =\n options.tileGrid !== undefined\n ? options.tileGrid\n : createXYZ({\n extent: extentFromProjection(projection),\n maxResolution: options.maxResolution,\n maxZoom: options.maxZoom,\n minZoom: options.minZoom,\n tileSize: options.tileSize,\n });\n\n super({\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n crossOrigin: options.crossOrigin,\n imageSmoothing: options.imageSmoothing,\n opaque: options.opaque,\n projection: projection,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n tileGrid: tileGrid,\n tileLoadFunction: options.tileLoadFunction,\n tilePixelRatio: options.tilePixelRatio,\n tileUrlFunction: options.tileUrlFunction,\n url: options.url,\n urls: options.urls,\n wrapX: options.wrapX !== undefined ? options.wrapX : true,\n transition: options.transition,\n attributionsCollapsible: options.attributionsCollapsible,\n zDirection: options.zDirection,\n });\n }\n}\n\nexport default XYZ;\n","/**\n * @module ol/source/CartoDB\n */\n\nimport SourceState from './State.js';\nimport XYZ from './XYZ.js';\nimport {assign} from '../obj.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Projection.\n * @property {number} [maxZoom=18] Max zoom.\n * @property {number} [minZoom] Minimum zoom.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {Object} [config] If using anonymous maps, the CartoDB config to use. See\n * http://docs.cartodb.com/cartodb-platform/maps-api/anonymous-maps/\n * for more detail.\n * If using named maps, a key-value lookup with the template parameters.\n * See http://docs.cartodb.com/cartodb-platform/maps-api/named-maps/\n * for more detail.\n * @property {string} [map] If using named maps, this will be the name of the template to load.\n * See http://docs.cartodb.com/cartodb-platform/maps-api/named-maps/\n * for more detail.\n * @property {string} account If using named maps, this will be the name of the template to load.\n * @property {number} [transition=250] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n */\n\n/**\n * @typedef {Object} CartoDBLayerInfo\n * @property {string} layergroupid The layer group ID\n * @property {{https: string}} cdn_url The CDN URL\n */\n\n/**\n * @classdesc\n * Layer source for the CartoDB Maps API.\n * @api\n */\nclass CartoDB extends XYZ {\n /**\n * @param {Options} options CartoDB options.\n */\n constructor(options) {\n super({\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n crossOrigin: options.crossOrigin,\n maxZoom: options.maxZoom !== undefined ? options.maxZoom : 18,\n minZoom: options.minZoom,\n projection: options.projection,\n transition: options.transition,\n wrapX: options.wrapX,\n });\n\n /**\n * @type {string}\n * @private\n */\n this.account_ = options.account;\n\n /**\n * @type {string}\n * @private\n */\n this.mapId_ = options.map || '';\n\n /**\n * @type {!Object}\n * @private\n */\n this.config_ = options.config || {};\n\n /**\n * @type {!Object<string, CartoDBLayerInfo>}\n * @private\n */\n this.templateCache_ = {};\n\n this.initializeMap_();\n }\n\n /**\n * Returns the current config.\n * @return {!Object} The current configuration.\n * @api\n */\n getConfig() {\n return this.config_;\n }\n\n /**\n * Updates the carto db config.\n * @param {Object} config a key-value lookup. Values will replace current values\n * in the config.\n * @api\n */\n updateConfig(config) {\n assign(this.config_, config);\n this.initializeMap_();\n }\n\n /**\n * Sets the CartoDB config\n * @param {Object} config In the case of anonymous maps, a CartoDB configuration\n * object.\n * If using named maps, a key-value lookup with the template parameters.\n * @api\n */\n setConfig(config) {\n this.config_ = config || {};\n this.initializeMap_();\n }\n\n /**\n * Issue a request to initialize the CartoDB map.\n * @private\n */\n initializeMap_() {\n const paramHash = JSON.stringify(this.config_);\n if (this.templateCache_[paramHash]) {\n this.applyTemplate_(this.templateCache_[paramHash]);\n return;\n }\n let mapUrl = 'https://' + this.account_ + '.carto.com/api/v1/map';\n\n if (this.mapId_) {\n mapUrl += '/named/' + this.mapId_;\n }\n\n const client = new XMLHttpRequest();\n client.addEventListener(\n 'load',\n this.handleInitResponse_.bind(this, paramHash)\n );\n client.addEventListener('error', this.handleInitError_.bind(this));\n client.open('POST', mapUrl);\n client.setRequestHeader('Content-type', 'application/json');\n client.send(JSON.stringify(this.config_));\n }\n\n /**\n * Handle map initialization response.\n * @param {string} paramHash a hash representing the parameter set that was used\n * for the request\n * @param {Event} event Event.\n * @private\n */\n handleInitResponse_(paramHash, event) {\n const client = /** @type {XMLHttpRequest} */ (event.target);\n // status will be 0 for file:// urls\n if (!client.status || (client.status >= 200 && client.status < 300)) {\n let response;\n try {\n response = /** @type {CartoDBLayerInfo} */ (JSON.parse(\n client.responseText\n ));\n } catch (err) {\n this.setState(SourceState.ERROR);\n return;\n }\n this.applyTemplate_(response);\n this.templateCache_[paramHash] = response;\n this.setState(SourceState.READY);\n } else {\n this.setState(SourceState.ERROR);\n }\n }\n\n /**\n * @private\n * @param {Event} event Event.\n */\n handleInitError_(event) {\n this.setState(SourceState.ERROR);\n }\n\n /**\n * Apply the new tile urls returned by carto db\n * @param {CartoDBLayerInfo} data Result of carto db call.\n * @private\n */\n applyTemplate_(data) {\n const tilesUrl =\n 'https://' +\n data.cdn_url.https +\n '/' +\n this.account_ +\n '/api/v1/map/' +\n data.layergroupid +\n '/{z}/{x}/{y}.png';\n this.setUrl(tilesUrl);\n }\n}\n\nexport default CartoDB;\n","/**\n * @module ol/source/Cluster\n */\n\nimport EventType from '../events/EventType.js';\nimport Feature from '../Feature.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport Point from '../geom/Point.js';\nimport VectorSource from './Vector.js';\nimport {add as addCoordinate, scale as scaleCoordinate} from '../coordinate.js';\nimport {assert} from '../asserts.js';\nimport {buffer, createEmpty, createOrUpdateFromCoordinate} from '../extent.js';\nimport {getUid} from '../util.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [distance=20] Minimum distance in pixels between clusters.\n * @property {function(Feature):Point} [geometryFunction]\n * Function that takes an {@link module:ol/Feature} as argument and returns an\n * {@link module:ol/geom/Point} as cluster calculation point for the feature. When a\n * feature should not be considered for clustering, the function should return\n * `null`. The default, which works when the underyling source contains point\n * features only, is\n * ```js\n * function(feature) {\n * return feature.getGeometry();\n * }\n * ```\n * See {@link module:ol/geom/Polygon~Polygon#getInteriorPoint} for a way to get a cluster\n * calculation point for polygons.\n * @property {VectorSource} [source] Source.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n */\n\n/**\n * @classdesc\n * Layer source to cluster vector data. Works out of the box with point\n * geometries. For other geometry types, or if not all geometries should be\n * considered for clustering, a custom `geometryFunction` can be defined.\n *\n * If the instance is disposed without also disposing the underlying\n * source `setSource(null)` has to be called to remove the listener reference\n * from the wrapped source.\n * @api\n */\nclass Cluster extends VectorSource {\n /**\n * @param {Options} options Cluster options.\n */\n constructor(options) {\n super({\n attributions: options.attributions,\n wrapX: options.wrapX,\n });\n\n /**\n * @type {number|undefined}\n * @protected\n */\n this.resolution = undefined;\n\n /**\n * @type {number}\n * @protected\n */\n this.distance = options.distance !== undefined ? options.distance : 20;\n\n /**\n * @type {Array<Feature>}\n * @protected\n */\n this.features = [];\n\n /**\n * @param {Feature} feature Feature.\n * @return {Point} Cluster calculation point.\n * @protected\n */\n this.geometryFunction =\n options.geometryFunction ||\n function (feature) {\n const geometry = feature.getGeometry();\n assert(geometry.getType() == GeometryType.POINT, 10); // The default `geometryFunction` can only handle `Point` geometries\n return geometry;\n };\n\n this.boundRefresh_ = this.refresh.bind(this);\n\n this.setSource(options.source || null);\n }\n\n /**\n * Remove all features from the source.\n * @param {boolean=} opt_fast Skip dispatching of {@link module:ol/source/Vector.VectorSourceEvent#removefeature} events.\n * @api\n */\n clear(opt_fast) {\n this.features.length = 0;\n super.clear(opt_fast);\n }\n\n /**\n * Get the distance in pixels between clusters.\n * @return {number} Distance.\n * @api\n */\n getDistance() {\n return this.distance;\n }\n\n /**\n * Get a reference to the wrapped source.\n * @return {VectorSource} Source.\n * @api\n */\n getSource() {\n return this.source;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n */\n loadFeatures(extent, resolution, projection) {\n this.source.loadFeatures(extent, resolution, projection);\n if (resolution !== this.resolution) {\n this.clear();\n this.resolution = resolution;\n this.cluster();\n this.addFeatures(this.features);\n }\n }\n\n /**\n * Set the distance in pixels between clusters.\n * @param {number} distance The distance in pixels.\n * @api\n */\n setDistance(distance) {\n this.distance = distance;\n this.refresh();\n }\n\n /**\n * Replace the wrapped source.\n * @param {VectorSource} source The new source for this instance.\n * @api\n */\n setSource(source) {\n if (this.source) {\n this.source.removeEventListener(EventType.CHANGE, this.boundRefresh_);\n }\n this.source = source;\n if (source) {\n source.addEventListener(EventType.CHANGE, this.boundRefresh_);\n }\n this.refresh();\n }\n\n /**\n * Handle the source changing.\n */\n refresh() {\n this.clear();\n this.cluster();\n this.addFeatures(this.features);\n }\n\n /**\n * @protected\n */\n cluster() {\n if (this.resolution === undefined || !this.source) {\n return;\n }\n const extent = createEmpty();\n const mapDistance = this.distance * this.resolution;\n const features = this.source.getFeatures();\n\n /**\n * @type {!Object<string, boolean>}\n */\n const clustered = {};\n\n for (let i = 0, ii = features.length; i < ii; i++) {\n const feature = features[i];\n if (!(getUid(feature) in clustered)) {\n const geometry = this.geometryFunction(feature);\n if (geometry) {\n const coordinates = geometry.getCoordinates();\n createOrUpdateFromCoordinate(coordinates, extent);\n buffer(extent, mapDistance, extent);\n\n let neighbors = this.source.getFeaturesInExtent(extent);\n neighbors = neighbors.filter(function (neighbor) {\n const uid = getUid(neighbor);\n if (!(uid in clustered)) {\n clustered[uid] = true;\n return true;\n } else {\n return false;\n }\n });\n this.features.push(this.createCluster(neighbors));\n }\n }\n }\n }\n\n /**\n * @param {Array<Feature>} features Features\n * @return {Feature} The cluster feature.\n * @protected\n */\n createCluster(features) {\n const centroid = [0, 0];\n for (let i = features.length - 1; i >= 0; --i) {\n const geometry = this.geometryFunction(features[i]);\n if (geometry) {\n addCoordinate(centroid, geometry.getCoordinates());\n } else {\n features.splice(i, 1);\n }\n }\n scaleCoordinate(centroid, 1 / features.length);\n\n const cluster = new Feature(new Point(centroid));\n cluster.set('features', features);\n return cluster;\n }\n}\n\nexport default Cluster;\n","/**\n * @module ol/source/Zoomify\n */\nimport {DEFAULT_TILE_SIZE} from '../tilegrid/common.js';\n\nimport ImageTile from '../ImageTile.js';\nimport TileGrid from '../tilegrid/TileGrid.js';\nimport TileImage from './TileImage.js';\nimport TileState from '../TileState.js';\nimport {assert} from '../asserts.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {createFromTileUrlFunctions, expandUrl} from '../tileurlfunction.js';\nimport {getCenter} from '../extent.js';\nimport {toSize} from '../size.js';\n\n/**\n * @enum {string}\n */\nconst TierSizeCalculation = {\n DEFAULT: 'default',\n TRUNCATED: 'truncated',\n};\n\nexport class CustomTile extends ImageTile {\n /**\n * @param {import(\"../size.js\").Size} tileSize Full tile size.\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"../TileState.js\").default} state State.\n * @param {string} src Image source URI.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n * @param {import(\"../Tile.js\").Options=} opt_options Tile options.\n */\n constructor(\n tileSize,\n tileCoord,\n state,\n src,\n crossOrigin,\n tileLoadFunction,\n opt_options\n ) {\n super(tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options);\n\n /**\n * @private\n * @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement}\n */\n this.zoomifyImage_ = null;\n\n /**\n * @type {import(\"../size.js\").Size}\n */\n this.tileSize_ = tileSize;\n }\n\n /**\n * Get the image element for this tile.\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n */\n getImage() {\n if (this.zoomifyImage_) {\n return this.zoomifyImage_;\n }\n const image = super.getImage();\n if (this.state == TileState.LOADED) {\n const tileSize = this.tileSize_;\n if (image.width == tileSize[0] && image.height == tileSize[1]) {\n this.zoomifyImage_ = image;\n return image;\n } else {\n const context = createCanvasContext2D(tileSize[0], tileSize[1]);\n context.drawImage(image, 0, 0);\n this.zoomifyImage_ = context.canvas;\n return context.canvas;\n }\n } else {\n return image;\n }\n }\n}\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection.\n * @property {number} [tilePixelRatio] The pixel ratio used by the tile service. For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px by 512px images (for retina/hidpi devices) then `tilePixelRatio` should be set to `2`\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {string} url URL template or base URL of the Zoomify service.\n * A base URL is the fixed part\n * of the URL, excluding the tile group, z, x, and y folder structure, e.g.\n * `http://my.zoomify.info/IMAGE.TIF/`. A URL template must include\n * `{TileGroup}`, `{x}`, `{y}`, and `{z}` placeholders, e.g.\n * `http://my.zoomify.info/IMAGE.TIF/{TileGroup}/{z}-{x}-{y}.jpg`.\n * Internet Imaging Protocol (IIP) with JTL extension can be also used with\n * `{tileIndex}` and `{z}` placeholders, e.g.\n * `http://my.zoomify.info?FIF=IMAGE.TIF&JTL={z},{tileIndex}`.\n * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be\n * used instead of defining each one separately in the `urls` option.\n * @property {string} [tierSizeCalculation] Tier size calculation method: `default` or `truncated`.\n * @property {import(\"../size.js\").Size} size\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the TileGrid that is created.\n * Default sets the TileGrid in the\n * fourth quadrant, meaning extent is `[0, -height, width, 0]`. To change the\n * extent to the first quadrant (the default for OpenLayers 2) set the extent\n * as `[0, 0, width, height]`.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number} [tileSize=256] Tile size. Same tile size is used for all zoom levels.\n * @property {number} [zDirection] Indicate which resolution should be used\n * by a renderer if the views resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n */\n\n/**\n * @classdesc\n * Layer source for tile data in Zoomify format (both Zoomify and Internet\n * Imaging Protocol are supported).\n * @api\n */\nclass Zoomify extends TileImage {\n /**\n * @param {Options} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options;\n\n const size = options.size;\n const tierSizeCalculation =\n options.tierSizeCalculation !== undefined\n ? options.tierSizeCalculation\n : TierSizeCalculation.DEFAULT;\n\n const tilePixelRatio = options.tilePixelRatio || 1;\n const imageWidth = size[0];\n const imageHeight = size[1];\n const tierSizeInTiles = [];\n const tileSize = options.tileSize || DEFAULT_TILE_SIZE;\n let tileSizeForTierSizeCalculation = tileSize * tilePixelRatio;\n\n switch (tierSizeCalculation) {\n case TierSizeCalculation.DEFAULT:\n while (\n imageWidth > tileSizeForTierSizeCalculation ||\n imageHeight > tileSizeForTierSizeCalculation\n ) {\n tierSizeInTiles.push([\n Math.ceil(imageWidth / tileSizeForTierSizeCalculation),\n Math.ceil(imageHeight / tileSizeForTierSizeCalculation),\n ]);\n tileSizeForTierSizeCalculation += tileSizeForTierSizeCalculation;\n }\n break;\n case TierSizeCalculation.TRUNCATED:\n let width = imageWidth;\n let height = imageHeight;\n while (\n width > tileSizeForTierSizeCalculation ||\n height > tileSizeForTierSizeCalculation\n ) {\n tierSizeInTiles.push([\n Math.ceil(width / tileSizeForTierSizeCalculation),\n Math.ceil(height / tileSizeForTierSizeCalculation),\n ]);\n width >>= 1;\n height >>= 1;\n }\n break;\n default:\n assert(false, 53); // Unknown `tierSizeCalculation` configured\n break;\n }\n\n tierSizeInTiles.push([1, 1]);\n tierSizeInTiles.reverse();\n\n const resolutions = [tilePixelRatio];\n const tileCountUpToTier = [0];\n for (let i = 1, ii = tierSizeInTiles.length; i < ii; i++) {\n resolutions.push(tilePixelRatio << i);\n tileCountUpToTier.push(\n tierSizeInTiles[i - 1][0] * tierSizeInTiles[i - 1][1] +\n tileCountUpToTier[i - 1]\n );\n }\n resolutions.reverse();\n\n const tileGrid = new TileGrid({\n tileSize: tileSize,\n extent: options.extent || [0, -imageHeight, imageWidth, 0],\n resolutions: resolutions,\n });\n\n let url = options.url;\n if (\n url &&\n url.indexOf('{TileGroup}') == -1 &&\n url.indexOf('{tileIndex}') == -1\n ) {\n url += '{TileGroup}/{z}-{x}-{y}.jpg';\n }\n const urls = expandUrl(url);\n\n let tileWidth = tileSize * tilePixelRatio;\n\n /**\n * @param {string} template Template.\n * @return {import(\"../Tile.js\").UrlFunction} Tile URL function.\n */\n function createFromTemplate(template) {\n return (\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {string|undefined} Tile URL.\n */\n function (tileCoord, pixelRatio, projection) {\n if (!tileCoord) {\n return undefined;\n } else {\n const tileCoordZ = tileCoord[0];\n const tileCoordX = tileCoord[1];\n const tileCoordY = tileCoord[2];\n const tileIndex =\n tileCoordX + tileCoordY * tierSizeInTiles[tileCoordZ][0];\n const tileGroup =\n ((tileIndex + tileCountUpToTier[tileCoordZ]) / tileWidth) | 0;\n const localContext = {\n 'z': tileCoordZ,\n 'x': tileCoordX,\n 'y': tileCoordY,\n 'tileIndex': tileIndex,\n 'TileGroup': 'TileGroup' + tileGroup,\n };\n return template.replace(/\\{(\\w+?)\\}/g, function (m, p) {\n return localContext[p];\n });\n }\n }\n );\n }\n\n const tileUrlFunction = createFromTileUrlFunctions(\n urls.map(createFromTemplate)\n );\n\n const ZoomifyTileClass = CustomTile.bind(\n null,\n toSize(tileSize * tilePixelRatio)\n );\n\n super({\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n crossOrigin: options.crossOrigin,\n imageSmoothing: options.imageSmoothing,\n projection: options.projection,\n tilePixelRatio: tilePixelRatio,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n tileClass: ZoomifyTileClass,\n tileGrid: tileGrid,\n tileUrlFunction: tileUrlFunction,\n transition: options.transition,\n });\n\n /**\n * @type {number}\n */\n this.zDirection = options.zDirection;\n\n // Server retina tile detection (non-standard):\n // Try loading the center tile for the highest resolution. If it is not\n // available, we are dealing with retina tiles, and need to adjust the\n // tile url calculation.\n const tileUrl = tileGrid.getTileCoordForCoordAndResolution(\n getCenter(tileGrid.getExtent()),\n resolutions[resolutions.length - 1]\n );\n const testTileUrl = tileUrlFunction(tileUrl, 1, null);\n const image = new Image();\n image.addEventListener(\n 'error',\n function () {\n tileWidth = tileSize;\n this.changed();\n }.bind(this)\n );\n image.src = testTileUrl;\n }\n}\n\nexport default Zoomify;\n","/**\n * @module ol/format/IIIFInfo\n */\n\nimport {assert} from '../asserts.js';\n\n/**\n * @typedef {Object} PreferredOptions\n * @property {string} [format] Preferred image format. Will be used if the image information\n * indicates support for that format.\n * @property {string} [quality] IIIF image qualitiy. Will be used if the image information\n * indicates support for that quality.\n */\n\n/**\n * @typedef {Object} SupportedFeatures\n * @property {Array<string>} [supports] Supported IIIF image size and region\n * calculation features.\n * @property {Array<string>} [formats] Supported image formats.\n * @property {Array<string>} [qualities] Supported IIIF image qualities.\n */\n\n/**\n * @typedef {Object} TileInfo\n * @property {Array<number>} scaleFactors Supported resolution scaling factors.\n * @property {number} width Tile width in pixels.\n * @property {number} [height] Tile height in pixels. Same as tile width if height is\n * not given.\n */\n\n/**\n * @typedef {Object} IiifProfile\n * @property {Array<string>} [formats] Supported image formats for the image service.\n * @property {Array<string>} [qualities] Supported IIIF image qualities.\n * @property {Array<string>} [supports] Supported features.\n * @property {number} [maxArea] Maximum area (pixels) available for this image service.\n * @property {number} [maxHeight] Maximum height.\n * @property {number} [maxWidth] Maximum width.\n */\n\n/**\n * @typedef {Object<string,string|number|Array<number|string|IiifProfile>|Object<string, number>|TileInfo>}\n * ImageInformationResponse\n */\n\n/**\n * Enum representing the major IIIF Image API versions\n * @enum {string}\n */\nexport const Versions = {\n VERSION1: 'version1',\n VERSION2: 'version2',\n VERSION3: 'version3',\n};\n\n/**\n * Supported image formats, qualities and supported region / size calculation features\n * for different image API versions and compliance levels\n * @const\n * @type {Object<string, Object<string, SupportedFeatures>>}\n */\nconst IIIF_PROFILE_VALUES = {};\nIIIF_PROFILE_VALUES[Versions.VERSION1] = {\n 'level0': {\n supports: [],\n formats: [],\n qualities: ['native'],\n },\n 'level1': {\n supports: ['regionByPx', 'sizeByW', 'sizeByH', 'sizeByPct'],\n formats: ['jpg'],\n qualities: ['native'],\n },\n 'level2': {\n supports: [\n 'regionByPx',\n 'regionByPct',\n 'sizeByW',\n 'sizeByH',\n 'sizeByPct',\n 'sizeByConfinedWh',\n 'sizeByWh',\n ],\n formats: ['jpg', 'png'],\n qualities: ['native', 'color', 'grey', 'bitonal'],\n },\n};\nIIIF_PROFILE_VALUES[Versions.VERSION2] = {\n 'level0': {\n supports: [],\n formats: ['jpg'],\n qualities: ['default'],\n },\n 'level1': {\n supports: ['regionByPx', 'sizeByW', 'sizeByH', 'sizeByPct'],\n formats: ['jpg'],\n qualities: ['default'],\n },\n 'level2': {\n supports: [\n 'regionByPx',\n 'regionByPct',\n 'sizeByW',\n 'sizeByH',\n 'sizeByPct',\n 'sizeByConfinedWh',\n 'sizeByDistortedWh',\n 'sizeByWh',\n ],\n formats: ['jpg', 'png'],\n qualities: ['default', 'bitonal'],\n },\n};\nIIIF_PROFILE_VALUES[Versions.VERSION3] = {\n 'level0': {\n supports: [],\n formats: ['jpg'],\n qualities: ['default'],\n },\n 'level1': {\n supports: ['regionByPx', 'regionSquare', 'sizeByW', 'sizeByH', 'sizeByWh'],\n formats: ['jpg'],\n qualities: ['default'],\n },\n 'level2': {\n supports: [\n 'regionByPx',\n 'regionSquare',\n 'regionByPct',\n 'sizeByW',\n 'sizeByH',\n 'sizeByPct',\n 'sizeByConfinedWh',\n 'sizeByWh',\n ],\n formats: ['jpg', 'png'],\n qualities: ['default'],\n },\n};\nIIIF_PROFILE_VALUES['none'] = {\n 'none': {\n supports: [],\n formats: [],\n qualities: [],\n },\n};\n\nconst COMPLIANCE_VERSION1 = /^https?:\\/\\/library\\.stanford\\.edu\\/iiif\\/image-api\\/(?:1\\.1\\/)?compliance\\.html#level[0-2]$/;\nconst COMPLIANCE_VERSION2 = /^https?:\\/\\/iiif\\.io\\/api\\/image\\/2\\/level[0-2](?:\\.json)?$/;\nconst COMPLIANCE_VERSION3 = /(^https?:\\/\\/iiif\\.io\\/api\\/image\\/3\\/level[0-2](?:\\.json)?$)|(^level[0-2]$)/;\n\nfunction generateVersion1Options(iiifInfo) {\n let levelProfile = iiifInfo.getComplianceLevelSupportedFeatures();\n // Version 1.0 and 1.1 do not require a profile.\n if (levelProfile === undefined) {\n levelProfile = IIIF_PROFILE_VALUES[Versions.VERSION1]['level0'];\n }\n return {\n url:\n iiifInfo.imageInfo['@id'] === undefined\n ? undefined\n : iiifInfo.imageInfo['@id'].replace(/\\/?(?:info\\.json)?$/g, ''),\n supports: levelProfile.supports,\n formats: [\n ...levelProfile.formats,\n iiifInfo.imageInfo.formats === undefined\n ? []\n : iiifInfo.imageInfo.formats,\n ],\n qualities: [\n ...levelProfile.qualities,\n iiifInfo.imageInfo.qualities === undefined\n ? []\n : iiifInfo.imageInfo.qualities,\n ],\n resolutions: iiifInfo.imageInfo.scale_factors,\n tileSize:\n iiifInfo.imageInfo.tile_width !== undefined\n ? iiifInfo.imageInfo.tile_height !== undefined\n ? [iiifInfo.imageInfo.tile_width, iiifInfo.imageInfo.tile_height]\n : [iiifInfo.imageInfo.tile_width, iiifInfo.imageInfo.tile_width]\n : iiifInfo.imageInfo.tile_height != undefined\n ? [iiifInfo.imageInfo.tile_height, iiifInfo.imageInfo.tile_height]\n : undefined,\n };\n}\n\nfunction generateVersion2Options(iiifInfo) {\n const levelProfile = iiifInfo.getComplianceLevelSupportedFeatures(),\n additionalProfile =\n Array.isArray(iiifInfo.imageInfo.profile) &&\n iiifInfo.imageInfo.profile.length > 1,\n profileSupports =\n additionalProfile && iiifInfo.imageInfo.profile[1].supports\n ? iiifInfo.imageInfo.profile[1].supports\n : [],\n profileFormats =\n additionalProfile && iiifInfo.imageInfo.profile[1].formats\n ? iiifInfo.imageInfo.profile[1].formats\n : [],\n profileQualities =\n additionalProfile && iiifInfo.imageInfo.profile[1].qualities\n ? iiifInfo.imageInfo.profile[1].qualities\n : [];\n return {\n url: iiifInfo.imageInfo['@id'].replace(/\\/?(?:info\\.json)?$/g, ''),\n sizes:\n iiifInfo.imageInfo.sizes === undefined\n ? undefined\n : iiifInfo.imageInfo.sizes.map(function (size) {\n return [size.width, size.height];\n }),\n tileSize:\n iiifInfo.imageInfo.tiles === undefined\n ? undefined\n : [\n iiifInfo.imageInfo.tiles.map(function (tile) {\n return tile.width;\n })[0],\n iiifInfo.imageInfo.tiles.map(function (tile) {\n return tile.height === undefined ? tile.width : tile.height;\n })[0],\n ],\n resolutions:\n iiifInfo.imageInfo.tiles === undefined\n ? undefined\n : iiifInfo.imageInfo.tiles.map(function (tile) {\n return tile.scaleFactors;\n })[0],\n supports: [...levelProfile.supports, ...profileSupports],\n formats: [...levelProfile.formats, ...profileFormats],\n qualities: [...levelProfile.qualities, ...profileQualities],\n };\n}\n\nfunction generateVersion3Options(iiifInfo) {\n const levelProfile = iiifInfo.getComplianceLevelSupportedFeatures(),\n formats =\n iiifInfo.imageInfo.extraFormats === undefined\n ? levelProfile.formats\n : [...levelProfile.formats, ...iiifInfo.imageInfo.extraFormats],\n preferredFormat =\n iiifInfo.imageInfo.preferredFormats !== undefined &&\n Array.isArray(iiifInfo.imageInfo.preferredFormats) &&\n iiifInfo.imageInfo.preferredFormats.length > 0\n ? iiifInfo.imageInfo.preferredFormats\n .filter(function (format) {\n return ['jpg', 'png', 'gif'].includes(format);\n })\n .reduce(function (acc, format) {\n return acc === undefined && formats.includes(format)\n ? format\n : acc;\n }, undefined)\n : undefined;\n return {\n url: iiifInfo.imageInfo['id'],\n sizes:\n iiifInfo.imageInfo.sizes === undefined\n ? undefined\n : iiifInfo.imageInfo.sizes.map(function (size) {\n return [size.width, size.height];\n }),\n tileSize:\n iiifInfo.imageInfo.tiles === undefined\n ? undefined\n : [\n iiifInfo.imageInfo.tiles.map(function (tile) {\n return tile.width;\n })[0],\n iiifInfo.imageInfo.tiles.map(function (tile) {\n return tile.height;\n })[0],\n ],\n resolutions:\n iiifInfo.imageInfo.tiles === undefined\n ? undefined\n : iiifInfo.imageInfo.tiles.map(function (tile) {\n return tile.scaleFactors;\n })[0],\n supports:\n iiifInfo.imageInfo.extraFeatures === undefined\n ? levelProfile.supports\n : [...levelProfile.supports, ...iiifInfo.imageInfo.extraFeatures],\n formats: formats,\n qualities:\n iiifInfo.imageInfo.extraQualities === undefined\n ? levelProfile.qualities\n : [...levelProfile.qualities, ...iiifInfo.imageInfo.extraQualities],\n preferredFormat: preferredFormat,\n };\n}\n\nconst versionFunctions = {};\nversionFunctions[Versions.VERSION1] = generateVersion1Options;\nversionFunctions[Versions.VERSION2] = generateVersion2Options;\nversionFunctions[Versions.VERSION3] = generateVersion3Options;\n\n/**\n * @classdesc\n * Format for transforming IIIF Image API image information responses into\n * IIIF tile source ready options\n *\n * @api\n */\nclass IIIFInfo {\n /**\n * @param {string|ImageInformationResponse} imageInfo\n * Deserialized image information JSON response object or JSON response as string\n */\n constructor(imageInfo) {\n this.setImageInfo(imageInfo);\n }\n\n /**\n * @param {string|ImageInformationResponse} imageInfo\n * Deserialized image information JSON response object or JSON response as string\n * @api\n */\n setImageInfo(imageInfo) {\n if (typeof imageInfo == 'string') {\n this.imageInfo = JSON.parse(imageInfo);\n } else {\n this.imageInfo = imageInfo;\n }\n }\n\n /**\n * @returns {Versions} Major IIIF version.\n * @api\n */\n getImageApiVersion() {\n if (this.imageInfo === undefined) {\n return;\n }\n let context = this.imageInfo['@context'] || 'ol-no-context';\n if (typeof context == 'string') {\n context = [context];\n }\n for (let i = 0; i < context.length; i++) {\n switch (context[i]) {\n case 'http://library.stanford.edu/iiif/image-api/1.1/context.json':\n case 'http://iiif.io/api/image/1/context.json':\n return Versions.VERSION1;\n case 'http://iiif.io/api/image/2/context.json':\n return Versions.VERSION2;\n case 'http://iiif.io/api/image/3/context.json':\n return Versions.VERSION3;\n case 'ol-no-context':\n // Image API 1.0 has no '@context'\n if (\n this.getComplianceLevelEntryFromProfile(Versions.VERSION1) &&\n this.imageInfo.identifier\n ) {\n return Versions.VERSION1;\n }\n break;\n default:\n }\n }\n assert(false, 61);\n }\n\n /**\n * @param {Versions} version Optional IIIF image API version\n * @returns {string} Compliance level as it appears in the IIIF image information\n * response.\n */\n getComplianceLevelEntryFromProfile(version) {\n if (this.imageInfo === undefined || this.imageInfo.profile === undefined) {\n return;\n }\n if (version === undefined) {\n version = this.getImageApiVersion();\n }\n switch (version) {\n case Versions.VERSION1:\n if (COMPLIANCE_VERSION1.test(this.imageInfo.profile)) {\n return this.imageInfo.profile;\n }\n break;\n case Versions.VERSION3:\n if (COMPLIANCE_VERSION3.test(this.imageInfo.profile)) {\n return this.imageInfo.profile;\n }\n break;\n case Versions.VERSION2:\n if (\n typeof this.imageInfo.profile === 'string' &&\n COMPLIANCE_VERSION2.test(this.imageInfo.profile)\n ) {\n return this.imageInfo.profile;\n }\n if (\n Array.isArray(this.imageInfo.profile) &&\n this.imageInfo.profile.length > 0 &&\n typeof this.imageInfo.profile[0] === 'string' &&\n COMPLIANCE_VERSION2.test(this.imageInfo.profile[0])\n ) {\n return this.imageInfo.profile[0];\n }\n break;\n default:\n }\n }\n\n /**\n * @param {Versions} version Optional IIIF image API version\n * @returns {string} Compliance level, on of 'level0', 'level1' or 'level2' or undefined\n */\n getComplianceLevelFromProfile(version) {\n const complianceLevel = this.getComplianceLevelEntryFromProfile(version);\n if (complianceLevel === undefined) {\n return undefined;\n }\n const level = complianceLevel.match(/level[0-2](?:\\.json)?$/g);\n return Array.isArray(level) ? level[0].replace('.json', '') : undefined;\n }\n\n /**\n * @returns {SupportedFeatures} Image formats, qualities and region / size calculation\n * methods that are supported by the IIIF service.\n */\n getComplianceLevelSupportedFeatures() {\n if (this.imageInfo === undefined) {\n return;\n }\n const version = this.getImageApiVersion();\n const level = this.getComplianceLevelFromProfile(version);\n if (level === undefined) {\n return IIIF_PROFILE_VALUES['none']['none'];\n }\n return IIIF_PROFILE_VALUES[version][level];\n }\n\n /**\n * @param {PreferredOptions=} opt_preferredOptions Optional options for preferred format and quality.\n * @returns {import(\"../source/IIIF.js\").Options} IIIF tile source ready constructor options.\n * @api\n */\n getTileSourceOptions(opt_preferredOptions) {\n const options = opt_preferredOptions || {},\n version = this.getImageApiVersion();\n if (version === undefined) {\n return;\n }\n const imageOptions =\n version === undefined ? undefined : versionFunctions[version](this);\n if (imageOptions === undefined) {\n return;\n }\n return {\n url: imageOptions.url,\n version: version,\n size: [this.imageInfo.width, this.imageInfo.height],\n sizes: imageOptions.sizes,\n format:\n options.format !== undefined &&\n imageOptions.formats.includes(options.format)\n ? options.format\n : imageOptions.preferredFormat !== undefined\n ? imageOptions.preferredFormat\n : 'jpg',\n supports: imageOptions.supports,\n quality:\n options.quality && imageOptions.qualities.includes(options.quality)\n ? options.quality\n : imageOptions.qualities.includes('native')\n ? 'native'\n : 'default',\n resolutions: Array.isArray(imageOptions.resolutions)\n ? imageOptions.resolutions.sort(function (a, b) {\n return b - a;\n })\n : undefined,\n tileSize: imageOptions.tileSize,\n };\n }\n}\n\nexport default IIIFInfo;\n","/**\n * @module ol/source/IIIF\n */\n\nimport TileGrid from '../tilegrid/TileGrid.js';\nimport TileImage from './TileImage.js';\nimport {CustomTile} from './Zoomify.js';\nimport {DEFAULT_TILE_SIZE} from '../tilegrid/common.js';\nimport {Versions} from '../format/IIIFInfo.js';\nimport {assert} from '../asserts.js';\nimport {getTopLeft} from '../extent.js';\nimport {toSize} from '../size.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize]\n * @property {null|string} [crossOrigin]\n * @property {import(\"../extent.js\").Extent} [extent=[0, -height, width, 0]]\n * @property {string} [format='jpg'] Requested image format.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../proj.js\").ProjectionLike} [projection]\n * @property {string} [quality] Requested IIIF image quality. Default is 'native'\n * for version 1, 'default' for versions 2 and 3.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {Array<number>} [resolutions] Supported resolutions as given in IIIF 'scaleFactors'\n * @property {import(\"../size.js\").Size} size Size of the image [width, height].\n * @property {Array<import(\"../size.js\").Size>} [sizes] Supported scaled image sizes.\n * Content of the IIIF info.json 'sizes' property, but as array of Size objects.\n * @property {import(\"./State.js\").default} [state] Source state.\n * @property {Array<string>} [supports=[]] Supported IIIF region and size calculation\n * features.\n * @property {number} [tilePixelRatio]\n * @property {number|import(\"../size.js\").Size} [tileSize] Tile size.\n * Same tile size is used for all zoom levels. If tile size is a number,\n * a square tile is assumed. If the IIIF image service supports arbitrary\n * tiling (sizeByH, sizeByW, sizeByWh or sizeByPct as well as regionByPx or regionByPct\n * are supported), the default tilesize is 256.\n * @property {number} [transition]\n * @property {string} [url] Base URL of the IIIF Image service.\n * This should be the same as the IIIF Image ID.\n * @property {import(\"../format/IIIFInfo.js\").Versions} [version=Versions.VERSION2] Service's IIIF Image API version.\n * @property {number} [zDirection=0] Indicate which resolution should be used\n * by a renderer if the view resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n */\n\nfunction formatPercentage(percentage) {\n return percentage.toLocaleString('en', {maximumFractionDigits: 10});\n}\n\n/**\n * @classdesc\n * Layer source for IIIF Image API services.\n * @api\n */\nclass IIIF extends TileImage {\n /**\n * @param {Options=} opt_options Tile source options. Use {@link import(\"../format/IIIFInfo.js\").IIIFInfo}\n * to parse Image API service information responses into constructor options.\n * @api\n */\n constructor(opt_options) {\n /**\n * @type {Partial<Options>}\n */\n const options = opt_options || {};\n\n let baseUrl = options.url || '';\n baseUrl =\n baseUrl +\n (baseUrl.lastIndexOf('/') === baseUrl.length - 1 || baseUrl === ''\n ? ''\n : '/');\n const version = options.version || Versions.VERSION2;\n const sizes = options.sizes || [];\n const size = options.size;\n assert(\n size != undefined &&\n Array.isArray(size) &&\n size.length == 2 &&\n !isNaN(size[0]) &&\n size[0] > 0 &&\n !isNaN(size[1]) &&\n size[1] > 0,\n 60\n );\n const width = size[0];\n const height = size[1];\n const tileSize = options.tileSize;\n const tilePixelRatio = options.tilePixelRatio || 1;\n const format = options.format || 'jpg';\n const quality =\n options.quality ||\n (options.version == Versions.VERSION1 ? 'native' : 'default');\n let resolutions = options.resolutions || [];\n const supports = options.supports || [];\n const extent = options.extent || [0, -height, width, 0];\n\n const supportsListedSizes =\n sizes != undefined && Array.isArray(sizes) && sizes.length > 0;\n const supportsListedTiles =\n tileSize !== undefined &&\n ((typeof tileSize === 'number' &&\n Number.isInteger(tileSize) &&\n tileSize > 0) ||\n (Array.isArray(tileSize) && tileSize.length > 0));\n const supportsArbitraryTiling =\n supports != undefined &&\n Array.isArray(supports) &&\n (supports.includes('regionByPx') || supports.includes('regionByPct')) &&\n (supports.includes('sizeByWh') ||\n supports.includes('sizeByH') ||\n supports.includes('sizeByW') ||\n supports.includes('sizeByPct'));\n\n let tileWidth, tileHeight, maxZoom;\n\n resolutions.sort(function (a, b) {\n return b - a;\n });\n\n if (supportsListedTiles || supportsArbitraryTiling) {\n if (tileSize != undefined) {\n if (\n typeof tileSize === 'number' &&\n Number.isInteger(tileSize) &&\n tileSize > 0\n ) {\n tileWidth = tileSize;\n tileHeight = tileSize;\n } else if (Array.isArray(tileSize) && tileSize.length > 0) {\n if (\n tileSize.length == 1 ||\n (tileSize[1] == undefined && Number.isInteger(tileSize[0]))\n ) {\n tileWidth = tileSize[0];\n tileHeight = tileSize[0];\n }\n if (tileSize.length == 2) {\n if (\n Number.isInteger(tileSize[0]) &&\n Number.isInteger(tileSize[1])\n ) {\n tileWidth = tileSize[0];\n tileHeight = tileSize[1];\n } else if (\n tileSize[0] == undefined &&\n Number.isInteger(tileSize[1])\n ) {\n tileWidth = tileSize[1];\n tileHeight = tileSize[1];\n }\n }\n }\n }\n if (tileWidth === undefined || tileHeight === undefined) {\n tileWidth = DEFAULT_TILE_SIZE;\n tileHeight = DEFAULT_TILE_SIZE;\n }\n if (resolutions.length == 0) {\n maxZoom = Math.max(\n Math.ceil(Math.log(width / tileWidth) / Math.LN2),\n Math.ceil(Math.log(height / tileHeight) / Math.LN2)\n );\n for (let i = maxZoom; i >= 0; i--) {\n resolutions.push(Math.pow(2, i));\n }\n } else {\n const maxScaleFactor = Math.max(...resolutions);\n // TODO maxScaleFactor might not be a power to 2\n maxZoom = Math.round(Math.log(maxScaleFactor) / Math.LN2);\n }\n } else {\n // No tile support.\n tileWidth = width;\n tileHeight = height;\n resolutions = [];\n if (supportsListedSizes) {\n /*\n * 'sizes' provided. Use full region in different resolutions. Every\n * resolution has only one tile.\n */\n sizes.sort(function (a, b) {\n return a[0] - b[0];\n });\n maxZoom = -1;\n const ignoredSizesIndex = [];\n for (let i = 0; i < sizes.length; i++) {\n const resolution = width / sizes[i][0];\n if (\n resolutions.length > 0 &&\n resolutions[resolutions.length - 1] == resolution\n ) {\n ignoredSizesIndex.push(i);\n continue;\n }\n resolutions.push(resolution);\n maxZoom++;\n }\n if (ignoredSizesIndex.length > 0) {\n for (let i = 0; i < ignoredSizesIndex.length; i++) {\n sizes.splice(ignoredSizesIndex[i] - i, 1);\n }\n }\n } else {\n // No useful image information at all. Try pseudo tile with full image.\n resolutions.push(1);\n sizes.push([width, height]);\n maxZoom = 0;\n }\n }\n\n const tileGrid = new TileGrid({\n tileSize: [tileWidth, tileHeight],\n extent: extent,\n origin: getTopLeft(extent),\n resolutions: resolutions,\n });\n\n const tileUrlFunction = function (tileCoord, pixelRatio, projection) {\n let regionParam, sizeParam;\n const zoom = tileCoord[0];\n if (zoom > maxZoom) {\n return;\n }\n const tileX = tileCoord[1],\n tileY = tileCoord[2],\n scale = resolutions[zoom];\n if (\n tileX === undefined ||\n tileY === undefined ||\n scale === undefined ||\n tileX < 0 ||\n Math.ceil(width / scale / tileWidth) <= tileX ||\n tileY < 0 ||\n Math.ceil(height / scale / tileHeight) <= tileY\n ) {\n return;\n }\n if (supportsArbitraryTiling || supportsListedTiles) {\n const regionX = tileX * tileWidth * scale,\n regionY = tileY * tileHeight * scale;\n let regionW = tileWidth * scale,\n regionH = tileHeight * scale,\n sizeW = tileWidth,\n sizeH = tileHeight;\n if (regionX + regionW > width) {\n regionW = width - regionX;\n }\n if (regionY + regionH > height) {\n regionH = height - regionY;\n }\n if (regionX + tileWidth * scale > width) {\n sizeW = Math.floor((width - regionX + scale - 1) / scale);\n }\n if (regionY + tileHeight * scale > height) {\n sizeH = Math.floor((height - regionY + scale - 1) / scale);\n }\n if (\n regionX == 0 &&\n regionW == width &&\n regionY == 0 &&\n regionH == height\n ) {\n // canonical full image region parameter is 'full', not 'x,y,w,h'\n regionParam = 'full';\n } else if (\n !supportsArbitraryTiling ||\n supports.includes('regionByPx')\n ) {\n regionParam = regionX + ',' + regionY + ',' + regionW + ',' + regionH;\n } else if (supports.includes('regionByPct')) {\n const pctX = formatPercentage((regionX / width) * 100),\n pctY = formatPercentage((regionY / height) * 100),\n pctW = formatPercentage((regionW / width) * 100),\n pctH = formatPercentage((regionH / height) * 100);\n regionParam = 'pct:' + pctX + ',' + pctY + ',' + pctW + ',' + pctH;\n }\n if (\n version == Versions.VERSION3 &&\n (!supportsArbitraryTiling || supports.includes('sizeByWh'))\n ) {\n sizeParam = sizeW + ',' + sizeH;\n } else if (!supportsArbitraryTiling || supports.includes('sizeByW')) {\n sizeParam = sizeW + ',';\n } else if (supports.includes('sizeByH')) {\n sizeParam = ',' + sizeH;\n } else if (supports.includes('sizeByWh')) {\n sizeParam = sizeW + ',' + sizeH;\n } else if (supports.includes('sizeByPct')) {\n sizeParam = 'pct:' + formatPercentage(100 / scale);\n }\n } else {\n regionParam = 'full';\n if (supportsListedSizes) {\n const regionWidth = sizes[zoom][0],\n regionHeight = sizes[zoom][1];\n if (version == Versions.VERSION3) {\n if (regionWidth == width && regionHeight == height) {\n sizeParam = 'max';\n } else {\n sizeParam = regionWidth + ',' + regionHeight;\n }\n } else {\n if (regionWidth == width) {\n sizeParam = 'full';\n } else {\n sizeParam = regionWidth + ',';\n }\n }\n } else {\n sizeParam = version == Versions.VERSION3 ? 'max' : 'full';\n }\n }\n return (\n baseUrl + regionParam + '/' + sizeParam + '/0/' + quality + '.' + format\n );\n };\n\n const IiifTileClass = CustomTile.bind(\n null,\n toSize(tileSize || 256).map(function (size) {\n return size * tilePixelRatio;\n })\n );\n\n super({\n attributions: options.attributions,\n attributionsCollapsible: options.attributionsCollapsible,\n cacheSize: options.cacheSize,\n crossOrigin: options.crossOrigin,\n imageSmoothing: options.imageSmoothing,\n projection: options.projection,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n state: options.state,\n tileClass: IiifTileClass,\n tileGrid: tileGrid,\n tilePixelRatio: options.tilePixelRatio,\n tileUrlFunction: tileUrlFunction,\n transition: options.transition,\n });\n\n /**\n * @type {number}\n */\n this.zDirection = options.zDirection;\n }\n}\n\nexport default IIIF;\n","/**\n * @module ol/reproj/Image\n */\nimport {ERROR_THRESHOLD} from './common.js';\n\nimport EventType from '../events/EventType.js';\nimport ImageBase from '../ImageBase.js';\nimport ImageState from '../ImageState.js';\nimport Triangulation from './Triangulation.js';\nimport {\n calculateSourceResolution,\n render as renderReprojected,\n} from '../reproj.js';\nimport {getCenter, getHeight, getIntersection, getWidth} from '../extent.js';\nimport {listen, unlistenByKey} from '../events.js';\n\n/**\n * @typedef {function(import(\"../extent.js\").Extent, number, number) : import(\"../ImageBase.js\").default} FunctionType\n */\n\n/**\n * @classdesc\n * Class encapsulating single reprojected image.\n * See {@link module:ol/source/Image~ImageSource}.\n */\nclass ReprojImage extends ImageBase {\n /**\n * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection (of the data).\n * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"../extent.js\").Extent} targetExtent Target extent.\n * @param {number} targetResolution Target resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {FunctionType} getImageFunction\n * Function returning source images (extent, resolution, pixelRatio).\n * @param {object=} opt_contextOptions Properties to set on the canvas context.\n */\n constructor(\n sourceProj,\n targetProj,\n targetExtent,\n targetResolution,\n pixelRatio,\n getImageFunction,\n opt_contextOptions\n ) {\n const maxSourceExtent = sourceProj.getExtent();\n const maxTargetExtent = targetProj.getExtent();\n\n const limitedTargetExtent = maxTargetExtent\n ? getIntersection(targetExtent, maxTargetExtent)\n : targetExtent;\n\n const targetCenter = getCenter(limitedTargetExtent);\n const sourceResolution = calculateSourceResolution(\n sourceProj,\n targetProj,\n targetCenter,\n targetResolution\n );\n\n const errorThresholdInPixels = ERROR_THRESHOLD;\n\n const triangulation = new Triangulation(\n sourceProj,\n targetProj,\n limitedTargetExtent,\n maxSourceExtent,\n sourceResolution * errorThresholdInPixels,\n targetResolution\n );\n\n const sourceExtent = triangulation.calculateSourceExtent();\n const sourceImage = getImageFunction(\n sourceExtent,\n sourceResolution,\n pixelRatio\n );\n const state = sourceImage ? ImageState.IDLE : ImageState.EMPTY;\n const sourcePixelRatio = sourceImage ? sourceImage.getPixelRatio() : 1;\n\n super(targetExtent, targetResolution, sourcePixelRatio, state);\n\n /**\n * @private\n * @type {import(\"../proj/Projection.js\").default}\n */\n this.targetProj_ = targetProj;\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.maxSourceExtent_ = maxSourceExtent;\n\n /**\n * @private\n * @type {!import(\"./Triangulation.js\").default}\n */\n this.triangulation_ = triangulation;\n\n /**\n * @private\n * @type {number}\n */\n this.targetResolution_ = targetResolution;\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.targetExtent_ = targetExtent;\n\n /**\n * @private\n * @type {import(\"../ImageBase.js\").default}\n */\n this.sourceImage_ = sourceImage;\n\n /**\n * @private\n * @type {number}\n */\n this.sourcePixelRatio_ = sourcePixelRatio;\n\n /**\n * @private\n * @type {object}\n */\n this.contextOptions_ = opt_contextOptions;\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.canvas_ = null;\n\n /**\n * @private\n * @type {?import(\"../events.js\").EventsKey}\n */\n this.sourceListenerKey_ = null;\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n if (this.state == ImageState.LOADING) {\n this.unlistenSource_();\n }\n super.disposeInternal();\n }\n\n /**\n * @return {HTMLCanvasElement} Image.\n */\n getImage() {\n return this.canvas_;\n }\n\n /**\n * @return {import(\"../proj/Projection.js\").default} Projection.\n */\n getProjection() {\n return this.targetProj_;\n }\n\n /**\n * @private\n */\n reproject_() {\n const sourceState = this.sourceImage_.getState();\n if (sourceState == ImageState.LOADED) {\n const width = getWidth(this.targetExtent_) / this.targetResolution_;\n const height = getHeight(this.targetExtent_) / this.targetResolution_;\n\n this.canvas_ = renderReprojected(\n width,\n height,\n this.sourcePixelRatio_,\n this.sourceImage_.getResolution(),\n this.maxSourceExtent_,\n this.targetResolution_,\n this.targetExtent_,\n this.triangulation_,\n [\n {\n extent: this.sourceImage_.getExtent(),\n image: this.sourceImage_.getImage(),\n },\n ],\n 0,\n undefined,\n this.contextOptions_\n );\n }\n this.state = sourceState;\n this.changed();\n }\n\n /**\n * Load not yet loaded URI.\n */\n load() {\n if (this.state == ImageState.IDLE) {\n this.state = ImageState.LOADING;\n this.changed();\n\n const sourceState = this.sourceImage_.getState();\n if (sourceState == ImageState.LOADED || sourceState == ImageState.ERROR) {\n this.reproject_();\n } else {\n this.sourceListenerKey_ = listen(\n this.sourceImage_,\n EventType.CHANGE,\n function (e) {\n const sourceState = this.sourceImage_.getState();\n if (\n sourceState == ImageState.LOADED ||\n sourceState == ImageState.ERROR\n ) {\n this.unlistenSource_();\n this.reproject_();\n }\n },\n this\n );\n this.sourceImage_.load();\n }\n }\n }\n\n /**\n * @private\n */\n unlistenSource_() {\n unlistenByKey(\n /** @type {!import(\"../events.js\").EventsKey} */ (this.sourceListenerKey_)\n );\n this.sourceListenerKey_ = null;\n }\n}\n\nexport default ReprojImage;\n","/**\n * @module ol/source/Image\n */\nimport Event from '../events/Event.js';\nimport ImageState from '../ImageState.js';\nimport ReprojImage from '../reproj/Image.js';\nimport Source from './Source.js';\nimport {ENABLE_RASTER_REPROJECTION} from '../reproj/common.js';\nimport {IMAGE_SMOOTHING_DISABLED} from './common.js';\nimport {abstract} from '../util.js';\nimport {equals} from '../extent.js';\nimport {equivalent} from '../proj.js';\nimport {linearFindNearest} from '../array.js';\n\n/**\n * @enum {string}\n */\nexport const ImageSourceEventType = {\n /**\n * Triggered when an image starts loading.\n * @event module:ol/source/Image.ImageSourceEvent#imageloadstart\n * @api\n */\n IMAGELOADSTART: 'imageloadstart',\n\n /**\n * Triggered when an image finishes loading.\n * @event module:ol/source/Image.ImageSourceEvent#imageloadend\n * @api\n */\n IMAGELOADEND: 'imageloadend',\n\n /**\n * Triggered if image loading results in an error.\n * @event module:ol/source/Image.ImageSourceEvent#imageloaderror\n * @api\n */\n IMAGELOADERROR: 'imageloaderror',\n};\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Image~ImageSource} instances are instances of this\n * type.\n */\nexport class ImageSourceEvent extends Event {\n /**\n * @param {string} type Type.\n * @param {import(\"../Image.js\").default} image The image.\n */\n constructor(type, image) {\n super(type);\n\n /**\n * The image related to the event.\n * @type {import(\"../Image.js\").default}\n * @api\n */\n this.image = image;\n }\n}\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions]\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../proj.js\").ProjectionLike} [projection]\n * @property {Array<number>} [resolutions]\n * @property {import(\"./State.js\").default} [state]\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for sources providing a single image.\n * @abstract\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nclass ImageSource extends Source {\n /**\n * @param {Options} options Single image source options.\n */\n constructor(options) {\n super({\n attributions: options.attributions,\n projection: options.projection,\n state: options.state,\n });\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.resolutions_ =\n options.resolutions !== undefined ? options.resolutions : null;\n\n /**\n * @private\n * @type {import(\"../reproj/Image.js\").default}\n */\n this.reprojectedImage_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.reprojectedRevision_ = 0;\n\n /**\n * @private\n * @type {object|undefined}\n */\n this.contextOptions_ =\n options.imageSmoothing === false ? IMAGE_SMOOTHING_DISABLED : undefined;\n }\n\n /**\n * @return {Array<number>} Resolutions.\n */\n getResolutions() {\n return this.resolutions_;\n }\n\n /**\n * @return {Object|undefined} Context options.\n */\n getContextOptions() {\n return this.contextOptions_;\n }\n\n /**\n * @protected\n * @param {number} resolution Resolution.\n * @return {number} Resolution.\n */\n findNearestResolution(resolution) {\n if (this.resolutions_) {\n const idx = linearFindNearest(this.resolutions_, resolution, 0);\n resolution = this.resolutions_[idx];\n }\n return resolution;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../ImageBase.js\").default} Single image.\n */\n getImage(extent, resolution, pixelRatio, projection) {\n const sourceProjection = this.getProjection();\n if (\n !ENABLE_RASTER_REPROJECTION ||\n !sourceProjection ||\n !projection ||\n equivalent(sourceProjection, projection)\n ) {\n if (sourceProjection) {\n projection = sourceProjection;\n }\n return this.getImageInternal(extent, resolution, pixelRatio, projection);\n } else {\n if (this.reprojectedImage_) {\n if (\n this.reprojectedRevision_ == this.getRevision() &&\n equivalent(this.reprojectedImage_.getProjection(), projection) &&\n this.reprojectedImage_.getResolution() == resolution &&\n equals(this.reprojectedImage_.getExtent(), extent)\n ) {\n return this.reprojectedImage_;\n }\n this.reprojectedImage_.dispose();\n this.reprojectedImage_ = null;\n }\n\n this.reprojectedImage_ = new ReprojImage(\n sourceProjection,\n projection,\n extent,\n resolution,\n pixelRatio,\n function (extent, resolution, pixelRatio) {\n return this.getImageInternal(\n extent,\n resolution,\n pixelRatio,\n sourceProjection\n );\n }.bind(this),\n this.contextOptions_\n );\n this.reprojectedRevision_ = this.getRevision();\n\n return this.reprojectedImage_;\n }\n }\n\n /**\n * @abstract\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../ImageBase.js\").default} Single image.\n * @protected\n */\n getImageInternal(extent, resolution, pixelRatio, projection) {\n return abstract();\n }\n\n /**\n * Handle image change events.\n * @param {import(\"../events/Event.js\").default} event Event.\n * @protected\n */\n handleImageChange(event) {\n const image = /** @type {import(\"../Image.js\").default} */ (event.target);\n switch (image.getState()) {\n case ImageState.LOADING:\n this.loading = true;\n this.dispatchEvent(\n new ImageSourceEvent(ImageSourceEventType.IMAGELOADSTART, image)\n );\n break;\n case ImageState.LOADED:\n this.loading = false;\n this.dispatchEvent(\n new ImageSourceEvent(ImageSourceEventType.IMAGELOADEND, image)\n );\n break;\n case ImageState.ERROR:\n this.loading = false;\n this.dispatchEvent(\n new ImageSourceEvent(ImageSourceEventType.IMAGELOADERROR, image)\n );\n break;\n default:\n // pass\n }\n }\n}\n\n/**\n * Default image load function for image sources that use import(\"../Image.js\").Image image\n * instances.\n * @param {import(\"../Image.js\").default} image Image.\n * @param {string} src Source.\n */\nexport function defaultImageLoadFunction(image, src) {\n /** @type {HTMLImageElement|HTMLVideoElement} */ (image.getImage()).src = src;\n}\n\nexport default ImageSource;\n","/**\n * @module ol/uri\n */\n\n/**\n * Appends query parameters to a URI.\n *\n * @param {string} uri The original URI, which may already have query data.\n * @param {!Object} params An object where keys are URI-encoded parameter keys,\n * and the values are arbitrary types or arrays.\n * @return {string} The new URI.\n */\nexport function appendParams(uri, params) {\n const keyParams = [];\n // Skip any null or undefined parameter values\n Object.keys(params).forEach(function (k) {\n if (params[k] !== null && params[k] !== undefined) {\n keyParams.push(k + '=' + encodeURIComponent(params[k]));\n }\n });\n const qs = keyParams.join('&');\n // remove any trailing ? or &\n uri = uri.replace(/[?&]$/, '');\n // append ? or & depending on whether uri has existing parameters\n uri = uri.indexOf('?') === -1 ? uri + '?' : uri + '&';\n return uri + qs;\n}\n","/**\n * @module ol/source/ImageArcGISRest\n */\n\nimport EventType from '../events/EventType.js';\nimport ImageSource, {defaultImageLoadFunction} from './Image.js';\nimport ImageWrapper from '../Image.js';\nimport {appendParams} from '../uri.js';\nimport {assert} from '../asserts.js';\nimport {assign} from '../obj.js';\nimport {containsExtent, getHeight, getWidth} from '../extent.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting the image from\n * the remote server.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given\n * a URL.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {Object<string,*>} [params] ArcGIS Rest parameters. This field is optional. Service\n * defaults will be used for any fields not specified. `FORMAT` is `PNG32` by default. `F` is\n * `IMAGE` by default. `TRANSPARENT` is `true` by default. `BBOX`, `SIZE`, `BBOXSR`, and `IMAGESR`\n * will be set dynamically. Set `LAYERS` to override the default service layer visibility. See\n * {@link http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Map/02r3000000v7000000/}\n * for further reference.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [ratio=1.5] Ratio. `1` means image requests are the size of the map viewport,\n * `2` means twice the size of the map viewport, and so on.\n * @property {Array<number>} [resolutions] Resolutions. If specified, requests will be made for\n * these resolutions only.\n * @property {string} [url] ArcGIS Rest service URL for a Map Service or Image Service. The url\n * should include /MapServer or /ImageServer.\n */\n\n/**\n * @classdesc\n * Source for data from ArcGIS Rest services providing single, untiled images.\n * Useful when underlying map service has labels.\n *\n * If underlying map service is not using labels,\n * take advantage of ol image caching and use\n * {@link module:ol/source/TileArcGISRest} data source.\n *\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nclass ImageArcGISRest extends ImageSource {\n /**\n * @param {Options=} opt_options Image ArcGIS Rest Options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n super({\n attributions: options.attributions,\n imageSmoothing: options.imageSmoothing,\n projection: options.projection,\n resolutions: options.resolutions,\n });\n\n /**\n * @private\n * @type {?string}\n */\n this.crossOrigin_ =\n options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n /**\n * @private\n * @type {boolean}\n */\n this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n\n /**\n * @private\n * @type {string|undefined}\n */\n this.url_ = options.url;\n\n /**\n * @private\n * @type {import(\"../Image.js\").LoadFunction}\n */\n this.imageLoadFunction_ =\n options.imageLoadFunction !== undefined\n ? options.imageLoadFunction\n : defaultImageLoadFunction;\n\n /**\n * @private\n * @type {!Object}\n */\n this.params_ = options.params || {};\n\n /**\n * @private\n * @type {import(\"../Image.js\").default}\n */\n this.image_ = null;\n\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.imageSize_ = [0, 0];\n\n /**\n * @private\n * @type {number}\n */\n this.renderedRevision_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;\n }\n\n /**\n * Get the user-provided params, i.e. those passed to the constructor through\n * the \"params\" option, and possibly updated using the updateParams method.\n * @return {Object} Params.\n * @api\n */\n getParams() {\n return this.params_;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../Image.js\").default} Single image.\n */\n getImageInternal(extent, resolution, pixelRatio, projection) {\n if (this.url_ === undefined) {\n return null;\n }\n\n resolution = this.findNearestResolution(resolution);\n pixelRatio = this.hidpi_ ? pixelRatio : 1;\n\n const image = this.image_;\n if (\n image &&\n this.renderedRevision_ == this.getRevision() &&\n image.getResolution() == resolution &&\n image.getPixelRatio() == pixelRatio &&\n containsExtent(image.getExtent(), extent)\n ) {\n return image;\n }\n\n const params = {\n 'F': 'image',\n 'FORMAT': 'PNG32',\n 'TRANSPARENT': true,\n };\n assign(params, this.params_);\n\n extent = extent.slice();\n const centerX = (extent[0] + extent[2]) / 2;\n const centerY = (extent[1] + extent[3]) / 2;\n if (this.ratio_ != 1) {\n const halfWidth = (this.ratio_ * getWidth(extent)) / 2;\n const halfHeight = (this.ratio_ * getHeight(extent)) / 2;\n extent[0] = centerX - halfWidth;\n extent[1] = centerY - halfHeight;\n extent[2] = centerX + halfWidth;\n extent[3] = centerY + halfHeight;\n }\n\n const imageResolution = resolution / pixelRatio;\n\n // Compute an integer width and height.\n const width = Math.ceil(getWidth(extent) / imageResolution);\n const height = Math.ceil(getHeight(extent) / imageResolution);\n\n // Modify the extent to match the integer width and height.\n extent[0] = centerX - (imageResolution * width) / 2;\n extent[2] = centerX + (imageResolution * width) / 2;\n extent[1] = centerY - (imageResolution * height) / 2;\n extent[3] = centerY + (imageResolution * height) / 2;\n\n this.imageSize_[0] = width;\n this.imageSize_[1] = height;\n\n const url = this.getRequestUrl_(\n extent,\n this.imageSize_,\n pixelRatio,\n projection,\n params\n );\n\n this.image_ = new ImageWrapper(\n extent,\n resolution,\n pixelRatio,\n url,\n this.crossOrigin_,\n this.imageLoadFunction_\n );\n\n this.renderedRevision_ = this.getRevision();\n\n this.image_.addEventListener(\n EventType.CHANGE,\n this.handleImageChange.bind(this)\n );\n\n return this.image_;\n }\n\n /**\n * Return the image load function of the source.\n * @return {import(\"../Image.js\").LoadFunction} The image load function.\n * @api\n */\n getImageLoadFunction() {\n return this.imageLoadFunction_;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {import(\"../size.js\").Size} size Size.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {Object} params Params.\n * @return {string} Request URL.\n * @private\n */\n getRequestUrl_(extent, size, pixelRatio, projection, params) {\n // ArcGIS Server only wants the numeric portion of the projection ID.\n const srid = projection.getCode().split(':').pop();\n\n params['SIZE'] = size[0] + ',' + size[1];\n params['BBOX'] = extent.join(',');\n params['BBOXSR'] = srid;\n params['IMAGESR'] = srid;\n params['DPI'] = Math.round(90 * pixelRatio);\n\n const url = this.url_;\n\n const modifiedUrl = url\n .replace(/MapServer\\/?$/, 'MapServer/export')\n .replace(/ImageServer\\/?$/, 'ImageServer/exportImage');\n if (modifiedUrl == url) {\n assert(false, 50); // `options.featureTypes` should be an Array\n }\n return appendParams(modifiedUrl, params);\n }\n\n /**\n * Return the URL used for this ArcGIS source.\n * @return {string|undefined} URL.\n * @api\n */\n getUrl() {\n return this.url_;\n }\n\n /**\n * Set the image load function of the source.\n * @param {import(\"../Image.js\").LoadFunction} imageLoadFunction Image load function.\n * @api\n */\n setImageLoadFunction(imageLoadFunction) {\n this.image_ = null;\n this.imageLoadFunction_ = imageLoadFunction;\n this.changed();\n }\n\n /**\n * Set the URL to use for requests.\n * @param {string|undefined} url URL.\n * @api\n */\n setUrl(url) {\n if (url != this.url_) {\n this.url_ = url;\n this.image_ = null;\n this.changed();\n }\n }\n\n /**\n * Update the user-provided params.\n * @param {Object} params Params.\n * @api\n */\n updateParams(params) {\n assign(this.params_, params);\n this.image_ = null;\n this.changed();\n }\n}\n\nexport default ImageArcGISRest;\n","/**\n * @module ol/source/ImageCanvas\n */\n\nimport ImageCanvas from '../ImageCanvas.js';\nimport ImageSource from './Image.js';\nimport {\n containsExtent,\n getHeight,\n getWidth,\n scaleFromCenter,\n} from '../extent.js';\n\n/**\n * A function returning the canvas element (`{HTMLCanvasElement}`)\n * used by the source as an image. The arguments passed to the function are:\n * {@link module:ol/extent~Extent} the image extent, `{number}` the image resolution,\n * `{number}` the device pixel ratio, {@link module:ol/size~Size} the image size, and\n * {@link module:ol/proj/Projection} the image projection. The canvas returned by\n * this function is cached by the source. The this keyword inside the function\n * references the {@link module:ol/source/ImageCanvas}.\n *\n * @typedef {function(this:import(\"../ImageCanvas.js\").default, import(\"../extent.js\").Extent, number,\n * number, import(\"../size.js\").Size, import(\"../proj/Projection.js\").default): HTMLCanvasElement} FunctionType\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {FunctionType} [canvasFunction] Canvas function.\n * The function returning the canvas element used by the source\n * as an image. The arguments passed to the function are: `{import(\"../extent.js\").Extent}` the\n * image extent, `{number}` the image resolution, `{number}` the device pixel\n * ratio, `{import(\"../size.js\").Size}` the image size, and `{import(\"../proj/Projection.js\").Projection}` the image\n * projection. The canvas returned by this function is cached by the source. If\n * the value returned by the function is later changed then\n * `changed` should be called on the source for the source to\n * invalidate the current cached image. See: {@link module:ol/Observable~Observable#changed}\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [ratio=1.5] Ratio. 1 means canvases are the size of the map viewport, 2 means twice the\n * width and height of the map viewport, and so on. Must be `1` or higher.\n * @property {Array<number>} [resolutions] Resolutions.\n * If specified, new canvases will be created for these resolutions\n * @property {import(\"./State.js\").default} [state] Source state.\n */\n\n/**\n * @classdesc\n * Base class for image sources where a canvas element is the image.\n * @api\n */\nclass ImageCanvasSource extends ImageSource {\n /**\n * @param {Options=} opt_options ImageCanvas options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n super({\n attributions: options.attributions,\n imageSmoothing: options.imageSmoothing,\n projection: options.projection,\n resolutions: options.resolutions,\n state: options.state,\n });\n\n /**\n * @private\n * @type {FunctionType}\n */\n this.canvasFunction_ = options.canvasFunction;\n\n /**\n * @private\n * @type {import(\"../ImageCanvas.js\").default}\n */\n this.canvas_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedRevision_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../ImageCanvas.js\").default} Single image.\n */\n getImageInternal(extent, resolution, pixelRatio, projection) {\n resolution = this.findNearestResolution(resolution);\n\n let canvas = this.canvas_;\n if (\n canvas &&\n this.renderedRevision_ == this.getRevision() &&\n canvas.getResolution() == resolution &&\n canvas.getPixelRatio() == pixelRatio &&\n containsExtent(canvas.getExtent(), extent)\n ) {\n return canvas;\n }\n\n extent = extent.slice();\n scaleFromCenter(extent, this.ratio_);\n const width = getWidth(extent) / resolution;\n const height = getHeight(extent) / resolution;\n const size = [width * pixelRatio, height * pixelRatio];\n\n const canvasElement = this.canvasFunction_.call(\n this,\n extent,\n resolution,\n pixelRatio,\n size,\n projection\n );\n if (canvasElement) {\n canvas = new ImageCanvas(extent, resolution, pixelRatio, canvasElement);\n }\n this.canvas_ = canvas;\n this.renderedRevision_ = this.getRevision();\n\n return canvas;\n }\n}\n\nexport default ImageCanvasSource;\n","/**\n * @module ol/source/ImageMapGuide\n */\n\nimport EventType from '../events/EventType.js';\nimport ImageSource, {defaultImageLoadFunction} from './Image.js';\nimport ImageWrapper from '../Image.js';\nimport {appendParams} from '../uri.js';\nimport {assign} from '../obj.js';\nimport {\n containsExtent,\n getCenter,\n getHeight,\n getWidth,\n scaleFromCenter,\n} from '../extent.js';\n\n/**\n * @typedef {Object} Options\n * @property {string} [url] The mapagent url.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {number} [displayDpi=96] The display resolution.\n * @property {number} [metersPerUnit=1] The meters-per-unit value.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {boolean} [useOverlay] If `true`, will use `GETDYNAMICMAPOVERLAYIMAGE`.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [ratio=1] Ratio. `1` means image requests are the size of the map viewport, `2` means\n * twice the width and height of the map viewport, and so on. Must be `1` or higher.\n * @property {Array<number>} [resolutions] Resolutions.\n * If specified, requests will be made for these resolutions only.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {Object} [params] Additional parameters.\n */\n\n/**\n * @classdesc\n * Source for images from Mapguide servers\n *\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nclass ImageMapGuide extends ImageSource {\n /**\n * @param {Options} options ImageMapGuide options.\n */\n constructor(options) {\n super({\n imageSmoothing: options.imageSmoothing,\n projection: options.projection,\n resolutions: options.resolutions,\n });\n\n /**\n * @private\n * @type {?string}\n */\n this.crossOrigin_ =\n options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n /**\n * @private\n * @type {number}\n */\n this.displayDpi_ =\n options.displayDpi !== undefined ? options.displayDpi : 96;\n\n /**\n * @private\n * @type {!Object}\n */\n this.params_ = options.params || {};\n\n /**\n * @private\n * @type {string|undefined}\n */\n this.url_ = options.url;\n\n /**\n * @private\n * @type {import(\"../Image.js\").LoadFunction}\n */\n this.imageLoadFunction_ =\n options.imageLoadFunction !== undefined\n ? options.imageLoadFunction\n : defaultImageLoadFunction;\n\n /**\n * @private\n * @type {boolean}\n */\n this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n\n /**\n * @private\n * @type {number}\n */\n this.metersPerUnit_ =\n options.metersPerUnit !== undefined ? options.metersPerUnit : 1;\n\n /**\n * @private\n * @type {number}\n */\n this.ratio_ = options.ratio !== undefined ? options.ratio : 1;\n\n /**\n * @private\n * @type {boolean}\n */\n this.useOverlay_ =\n options.useOverlay !== undefined ? options.useOverlay : false;\n\n /**\n * @private\n * @type {import(\"../Image.js\").default}\n */\n this.image_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedRevision_ = 0;\n }\n\n /**\n * Get the user-provided params, i.e. those passed to the constructor through\n * the \"params\" option, and possibly updated using the updateParams method.\n * @return {Object} Params.\n * @api\n */\n getParams() {\n return this.params_;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../Image.js\").default} Single image.\n */\n getImageInternal(extent, resolution, pixelRatio, projection) {\n resolution = this.findNearestResolution(resolution);\n pixelRatio = this.hidpi_ ? pixelRatio : 1;\n\n let image = this.image_;\n if (\n image &&\n this.renderedRevision_ == this.getRevision() &&\n image.getResolution() == resolution &&\n image.getPixelRatio() == pixelRatio &&\n containsExtent(image.getExtent(), extent)\n ) {\n return image;\n }\n\n if (this.ratio_ != 1) {\n extent = extent.slice();\n scaleFromCenter(extent, this.ratio_);\n }\n const width = getWidth(extent) / resolution;\n const height = getHeight(extent) / resolution;\n const size = [width * pixelRatio, height * pixelRatio];\n\n if (this.url_ !== undefined) {\n const imageUrl = this.getUrl(\n this.url_,\n this.params_,\n extent,\n size,\n projection\n );\n image = new ImageWrapper(\n extent,\n resolution,\n pixelRatio,\n imageUrl,\n this.crossOrigin_,\n this.imageLoadFunction_\n );\n image.addEventListener(\n EventType.CHANGE,\n this.handleImageChange.bind(this)\n );\n } else {\n image = null;\n }\n this.image_ = image;\n this.renderedRevision_ = this.getRevision();\n\n return image;\n }\n\n /**\n * Return the image load function of the source.\n * @return {import(\"../Image.js\").LoadFunction} The image load function.\n * @api\n */\n getImageLoadFunction() {\n return this.imageLoadFunction_;\n }\n\n /**\n * Update the user-provided params.\n * @param {Object} params Params.\n * @api\n */\n updateParams(params) {\n assign(this.params_, params);\n this.changed();\n }\n\n /**\n * @param {string} baseUrl The mapagent url.\n * @param {Object<string, string|number>} params Request parameters.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {import(\"../size.js\").Size} size Size.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {string} The mapagent map image request URL.\n */\n getUrl(baseUrl, params, extent, size, projection) {\n const scale = getScale(extent, size, this.metersPerUnit_, this.displayDpi_);\n const center = getCenter(extent);\n const baseParams = {\n 'OPERATION': this.useOverlay_\n ? 'GETDYNAMICMAPOVERLAYIMAGE'\n : 'GETMAPIMAGE',\n 'VERSION': '2.0.0',\n 'LOCALE': 'en',\n 'CLIENTAGENT': 'ol/source/ImageMapGuide source',\n 'CLIP': '1',\n 'SETDISPLAYDPI': this.displayDpi_,\n 'SETDISPLAYWIDTH': Math.round(size[0]),\n 'SETDISPLAYHEIGHT': Math.round(size[1]),\n 'SETVIEWSCALE': scale,\n 'SETVIEWCENTERX': center[0],\n 'SETVIEWCENTERY': center[1],\n };\n assign(baseParams, params);\n return appendParams(baseUrl, baseParams);\n }\n\n /**\n * Set the image load function of the MapGuide source.\n * @param {import(\"../Image.js\").LoadFunction} imageLoadFunction Image load function.\n * @api\n */\n setImageLoadFunction(imageLoadFunction) {\n this.image_ = null;\n this.imageLoadFunction_ = imageLoadFunction;\n this.changed();\n }\n}\n\n/**\n * @param {import(\"../extent.js\").Extent} extent The map extents.\n * @param {import(\"../size.js\").Size} size The viewport size.\n * @param {number} metersPerUnit The meters-per-unit value.\n * @param {number} dpi The display resolution.\n * @return {number} The computed map scale.\n */\nfunction getScale(extent, size, metersPerUnit, dpi) {\n const mcsW = getWidth(extent);\n const mcsH = getHeight(extent);\n const devW = size[0];\n const devH = size[1];\n const mpp = 0.0254 / dpi;\n if (devH * mcsW > devW * mcsH) {\n return (mcsW * metersPerUnit) / (devW * mpp); // width limited\n } else {\n return (mcsH * metersPerUnit) / (devH * mpp); // height limited\n }\n}\n\nexport default ImageMapGuide;\n","/**\n * @module ol/source/ImageStatic\n */\n\nimport EventType from '../events/EventType.js';\nimport ImageSource, {defaultImageLoadFunction} from './Image.js';\nimport ImageState from '../ImageState.js';\nimport ImageWrapper from '../Image.js';\nimport {assign} from '../obj.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {getHeight, getWidth, intersects} from '../extent.js';\nimport {get as getProjection} from '../proj.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {import(\"../extent.js\").Extent} [imageExtent] Extent of the image in map coordinates.\n * This is the [left, bottom, right, top] map coordinates of your image.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {import(\"../size.js\").Size} [imageSize] Size of the image in pixels. Usually the image size is auto-detected, so this\n * only needs to be set if auto-detection fails for some reason.\n * @property {string} url Image URL.\n */\n\n/**\n * @classdesc\n * A layer source for displaying a single, static image.\n * @api\n */\nclass Static extends ImageSource {\n /**\n * @param {Options} options ImageStatic options.\n */\n constructor(options) {\n const crossOrigin =\n options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n const /** @type {import(\"../Image.js\").LoadFunction} */ imageLoadFunction =\n options.imageLoadFunction !== undefined\n ? options.imageLoadFunction\n : defaultImageLoadFunction;\n\n super({\n attributions: options.attributions,\n imageSmoothing: options.imageSmoothing,\n projection: getProjection(options.projection),\n });\n\n /**\n * @private\n * @type {string}\n */\n this.url_ = options.url;\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.imageExtent_ = options.imageExtent;\n\n /**\n * @private\n * @type {import(\"../Image.js\").default}\n */\n this.image_ = new ImageWrapper(\n this.imageExtent_,\n undefined,\n 1,\n this.url_,\n crossOrigin,\n imageLoadFunction\n );\n\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.imageSize_ = options.imageSize ? options.imageSize : null;\n\n this.image_.addEventListener(\n EventType.CHANGE,\n this.handleImageChange.bind(this)\n );\n }\n\n /**\n * Returns the image extent\n * @return {import(\"../extent.js\").Extent} image extent.\n * @api\n */\n getImageExtent() {\n return this.imageExtent_;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../Image.js\").default} Single image.\n */\n getImageInternal(extent, resolution, pixelRatio, projection) {\n if (intersects(extent, this.image_.getExtent())) {\n return this.image_;\n }\n return null;\n }\n\n /**\n * Return the URL used for this image source.\n * @return {string} URL.\n * @api\n */\n getUrl() {\n return this.url_;\n }\n\n /**\n * @param {import(\"../events/Event.js\").default} evt Event.\n */\n handleImageChange(evt) {\n if (this.image_.getState() == ImageState.LOADED) {\n const imageExtent = this.image_.getExtent();\n const image = this.image_.getImage();\n let imageWidth, imageHeight;\n if (this.imageSize_) {\n imageWidth = this.imageSize_[0];\n imageHeight = this.imageSize_[1];\n } else {\n imageWidth = image.width;\n imageHeight = image.height;\n }\n const resolution = getHeight(imageExtent) / imageHeight;\n const targetWidth = Math.ceil(getWidth(imageExtent) / resolution);\n if (targetWidth != imageWidth) {\n const context = createCanvasContext2D(targetWidth, imageHeight);\n assign(context, this.getContextOptions());\n const canvas = context.canvas;\n context.drawImage(\n image,\n 0,\n 0,\n imageWidth,\n imageHeight,\n 0,\n 0,\n canvas.width,\n canvas.height\n );\n this.image_.setImage(canvas);\n }\n }\n super.handleImageChange(evt);\n }\n}\n\nexport default Static;\n","/**\n * @module ol/source/WMSServerType\n */\n\n/**\n * Available server types: `'carmentaserver'`, `'geoserver'`, `'mapserver'`,\n * `'qgis'`. These are servers that have vendor parameters beyond the WMS\n * specification that OpenLayers can make use of.\n * @enum {string}\n */\nexport default {\n /**\n * HiDPI support for [Carmenta Server](https://www.carmenta.com/en/products/carmenta-server)\n * @api\n */\n CARMENTA_SERVER: 'carmentaserver',\n /**\n * HiDPI support for [GeoServer](https://geoserver.org/)\n * @api\n */\n GEOSERVER: 'geoserver',\n /**\n * HiDPI support for [MapServer](https://mapserver.org/)\n * @api\n */\n MAPSERVER: 'mapserver',\n /**\n * HiDPI support for [QGIS](https://qgis.org/)\n * @api\n */\n QGIS: 'qgis',\n};\n","/**\n * @module ol/source/ImageWMS\n */\n\nimport {DEFAULT_WMS_VERSION} from './common.js';\n\nimport EventType from '../events/EventType.js';\nimport ImageSource, {defaultImageLoadFunction} from './Image.js';\nimport ImageWrapper from '../Image.js';\nimport WMSServerType from './WMSServerType.js';\nimport {appendParams} from '../uri.js';\nimport {assert} from '../asserts.js';\nimport {assign} from '../obj.js';\nimport {calculateSourceResolution} from '../reproj.js';\nimport {compareVersions} from '../string.js';\nimport {\n containsExtent,\n getCenter,\n getForViewAndSize,\n getHeight,\n getWidth,\n} from '../extent.js';\nimport {get as getProjection, transform} from '../proj.js';\n\n/**\n * @const\n * @type {import(\"../size.js\").Size}\n */\nconst GETFEATUREINFO_IMAGE_SIZE = [101, 101];\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {import(\"./WMSServerType.js\").default|string} [serverType] The type of\n * the remote WMS server: `mapserver`, `geoserver` or `qgis`. Only needed if `hidpi` is `true`.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {Object<string,*>} params WMS request parameters.\n * At least a `LAYERS` param is required. `STYLES` is\n * `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`\n * and `CRS` (`SRS` for WMS version < 1.3.0) will be set dynamically.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [ratio=1.5] Ratio. `1` means image requests are the size of the map viewport, `2` means\n * twice the width and height of the map viewport, and so on. Must be `1` or\n * higher.\n * @property {Array<number>} [resolutions] Resolutions.\n * If specified, requests will be made for these resolutions only.\n * @property {string} url WMS service URL.\n */\n\n/**\n * @classdesc\n * Source for WMS servers providing single, untiled images.\n *\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nclass ImageWMS extends ImageSource {\n /**\n * @param {Options=} [opt_options] ImageWMS options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n super({\n attributions: options.attributions,\n imageSmoothing: options.imageSmoothing,\n projection: options.projection,\n resolutions: options.resolutions,\n });\n\n /**\n * @private\n * @type {?string}\n */\n this.crossOrigin_ =\n options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n /**\n * @private\n * @type {string|undefined}\n */\n this.url_ = options.url;\n\n /**\n * @private\n * @type {import(\"../Image.js\").LoadFunction}\n */\n this.imageLoadFunction_ =\n options.imageLoadFunction !== undefined\n ? options.imageLoadFunction\n : defaultImageLoadFunction;\n\n /**\n * @private\n * @type {!Object}\n */\n this.params_ = options.params || {};\n\n /**\n * @private\n * @type {boolean}\n */\n this.v13_ = true;\n this.updateV13_();\n\n /**\n * @private\n * @type {import(\"./WMSServerType.js\").default|undefined}\n */\n this.serverType_ = /** @type {import(\"./WMSServerType.js\").default|undefined} */ (options.serverType);\n\n /**\n * @private\n * @type {boolean}\n */\n this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n\n /**\n * @private\n * @type {import(\"../Image.js\").default}\n */\n this.image_ = null;\n\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.imageSize_ = [0, 0];\n\n /**\n * @private\n * @type {number}\n */\n this.renderedRevision_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;\n }\n\n /**\n * Return the GetFeatureInfo URL for the passed coordinate, resolution, and\n * projection. Return `undefined` if the GetFeatureInfo URL cannot be\n * constructed.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} resolution Resolution.\n * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n * @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should\n * be provided. If `QUERY_LAYERS` is not provided then the layers specified\n * in the `LAYERS` parameter will be used. `VERSION` should not be\n * specified here.\n * @return {string|undefined} GetFeatureInfo URL.\n * @api\n */\n getFeatureInfoUrl(coordinate, resolution, projection, params) {\n if (this.url_ === undefined) {\n return undefined;\n }\n const projectionObj = getProjection(projection);\n const sourceProjectionObj = this.getProjection();\n\n if (sourceProjectionObj && sourceProjectionObj !== projectionObj) {\n resolution = calculateSourceResolution(\n sourceProjectionObj,\n projectionObj,\n coordinate,\n resolution\n );\n coordinate = transform(coordinate, projectionObj, sourceProjectionObj);\n }\n\n const extent = getForViewAndSize(\n coordinate,\n resolution,\n 0,\n GETFEATUREINFO_IMAGE_SIZE\n );\n\n const baseParams = {\n 'SERVICE': 'WMS',\n 'VERSION': DEFAULT_WMS_VERSION,\n 'REQUEST': 'GetFeatureInfo',\n 'FORMAT': 'image/png',\n 'TRANSPARENT': true,\n 'QUERY_LAYERS': this.params_['LAYERS'],\n };\n assign(baseParams, this.params_, params);\n\n const x = Math.floor((coordinate[0] - extent[0]) / resolution);\n const y = Math.floor((extent[3] - coordinate[1]) / resolution);\n baseParams[this.v13_ ? 'I' : 'X'] = x;\n baseParams[this.v13_ ? 'J' : 'Y'] = y;\n\n return this.getRequestUrl_(\n extent,\n GETFEATUREINFO_IMAGE_SIZE,\n 1,\n sourceProjectionObj || projectionObj,\n baseParams\n );\n }\n\n /**\n * Return the GetLegendGraphic URL, optionally optimized for the passed\n * resolution and possibly including any passed specific parameters. Returns\n * `undefined` if the GetLegendGraphic URL cannot be constructed.\n *\n * @param {number} [resolution] Resolution. If set to undefined, `SCALE`\n * will not be calculated and included in URL.\n * @param {Object} [params] GetLegendGraphic params. If `LAYER` is set, the\n * request is generated for this wms layer, else it will try to use the\n * configured wms layer. Default `FORMAT` is `image/png`.\n * `VERSION` should not be specified here.\n * @return {string|undefined} GetLegendGraphic URL.\n * @api\n */\n getLegendUrl(resolution, params) {\n if (this.url_ === undefined) {\n return undefined;\n }\n\n const baseParams = {\n 'SERVICE': 'WMS',\n 'VERSION': DEFAULT_WMS_VERSION,\n 'REQUEST': 'GetLegendGraphic',\n 'FORMAT': 'image/png',\n };\n\n if (params === undefined || params['LAYER'] === undefined) {\n const layers = this.params_.LAYERS;\n const isSingleLayer = !Array.isArray(layers) || layers.length === 1;\n if (!isSingleLayer) {\n return undefined;\n }\n baseParams['LAYER'] = layers;\n }\n\n if (resolution !== undefined) {\n const mpu = this.getProjection()\n ? this.getProjection().getMetersPerUnit()\n : 1;\n const pixelSize = 0.00028;\n baseParams['SCALE'] = (resolution * mpu) / pixelSize;\n }\n\n assign(baseParams, params);\n\n return appendParams(/** @type {string} */ (this.url_), baseParams);\n }\n\n /**\n * Get the user-provided params, i.e. those passed to the constructor through\n * the \"params\" option, and possibly updated using the updateParams method.\n * @return {Object} Params.\n * @api\n */\n getParams() {\n return this.params_;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../Image.js\").default} Single image.\n */\n getImageInternal(extent, resolution, pixelRatio, projection) {\n if (this.url_ === undefined) {\n return null;\n }\n\n resolution = this.findNearestResolution(resolution);\n\n if (pixelRatio != 1 && (!this.hidpi_ || this.serverType_ === undefined)) {\n pixelRatio = 1;\n }\n\n const imageResolution = resolution / pixelRatio;\n\n const center = getCenter(extent);\n const viewWidth = Math.ceil(getWidth(extent) / imageResolution);\n const viewHeight = Math.ceil(getHeight(extent) / imageResolution);\n const viewExtent = getForViewAndSize(center, imageResolution, 0, [\n viewWidth,\n viewHeight,\n ]);\n const requestWidth = Math.ceil(\n (this.ratio_ * getWidth(extent)) / imageResolution\n );\n const requestHeight = Math.ceil(\n (this.ratio_ * getHeight(extent)) / imageResolution\n );\n const requestExtent = getForViewAndSize(center, imageResolution, 0, [\n requestWidth,\n requestHeight,\n ]);\n\n const image = this.image_;\n if (\n image &&\n this.renderedRevision_ == this.getRevision() &&\n image.getResolution() == resolution &&\n image.getPixelRatio() == pixelRatio &&\n containsExtent(image.getExtent(), viewExtent)\n ) {\n return image;\n }\n\n const params = {\n 'SERVICE': 'WMS',\n 'VERSION': DEFAULT_WMS_VERSION,\n 'REQUEST': 'GetMap',\n 'FORMAT': 'image/png',\n 'TRANSPARENT': true,\n };\n assign(params, this.params_);\n\n this.imageSize_[0] = Math.round(getWidth(requestExtent) / imageResolution);\n this.imageSize_[1] = Math.round(getHeight(requestExtent) / imageResolution);\n\n const url = this.getRequestUrl_(\n requestExtent,\n this.imageSize_,\n pixelRatio,\n projection,\n params\n );\n\n this.image_ = new ImageWrapper(\n requestExtent,\n resolution,\n pixelRatio,\n url,\n this.crossOrigin_,\n this.imageLoadFunction_\n );\n\n this.renderedRevision_ = this.getRevision();\n\n this.image_.addEventListener(\n EventType.CHANGE,\n this.handleImageChange.bind(this)\n );\n\n return this.image_;\n }\n\n /**\n * Return the image load function of the source.\n * @return {import(\"../Image.js\").LoadFunction} The image load function.\n * @api\n */\n getImageLoadFunction() {\n return this.imageLoadFunction_;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {import(\"../size.js\").Size} size Size.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {Object} params Params.\n * @return {string} Request URL.\n * @private\n */\n getRequestUrl_(extent, size, pixelRatio, projection, params) {\n assert(this.url_ !== undefined, 9); // `url` must be configured or set using `#setUrl()`\n\n params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode();\n\n if (!('STYLES' in this.params_)) {\n params['STYLES'] = '';\n }\n\n if (pixelRatio != 1) {\n switch (this.serverType_) {\n case WMSServerType.GEOSERVER:\n const dpi = (90 * pixelRatio + 0.5) | 0;\n if ('FORMAT_OPTIONS' in params) {\n params['FORMAT_OPTIONS'] += ';dpi:' + dpi;\n } else {\n params['FORMAT_OPTIONS'] = 'dpi:' + dpi;\n }\n break;\n case WMSServerType.MAPSERVER:\n params['MAP_RESOLUTION'] = 90 * pixelRatio;\n break;\n case WMSServerType.CARMENTA_SERVER:\n case WMSServerType.QGIS:\n params['DPI'] = 90 * pixelRatio;\n break;\n default:\n assert(false, 8); // Unknown `serverType` configured\n break;\n }\n }\n\n params['WIDTH'] = size[0];\n params['HEIGHT'] = size[1];\n\n const axisOrientation = projection.getAxisOrientation();\n let bbox;\n if (this.v13_ && axisOrientation.substr(0, 2) == 'ne') {\n bbox = [extent[1], extent[0], extent[3], extent[2]];\n } else {\n bbox = extent;\n }\n params['BBOX'] = bbox.join(',');\n\n return appendParams(/** @type {string} */ (this.url_), params);\n }\n\n /**\n * Return the URL used for this WMS source.\n * @return {string|undefined} URL.\n * @api\n */\n getUrl() {\n return this.url_;\n }\n\n /**\n * Set the image load function of the source.\n * @param {import(\"../Image.js\").LoadFunction} imageLoadFunction Image load function.\n * @api\n */\n setImageLoadFunction(imageLoadFunction) {\n this.image_ = null;\n this.imageLoadFunction_ = imageLoadFunction;\n this.changed();\n }\n\n /**\n * Set the URL to use for requests.\n * @param {string|undefined} url URL.\n * @api\n */\n setUrl(url) {\n if (url != this.url_) {\n this.url_ = url;\n this.image_ = null;\n this.changed();\n }\n }\n\n /**\n * Update the user-provided params.\n * @param {Object} params Params.\n * @api\n */\n updateParams(params) {\n assign(this.params_, params);\n this.updateV13_();\n this.image_ = null;\n this.changed();\n }\n\n /**\n * @private\n */\n updateV13_() {\n const version = this.params_['VERSION'] || DEFAULT_WMS_VERSION;\n this.v13_ = compareVersions(version, '1.3') >= 0;\n }\n}\n\nexport default ImageWMS;\n","/**\n * @module ol/source/OSM\n */\n\nimport XYZ from './XYZ.js';\n\n/**\n * The attribution containing a link to the OpenStreetMap Copyright and License\n * page.\n * @const\n * @type {string}\n * @api\n */\nexport const ATTRIBUTION =\n '© ' +\n '<a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">OpenStreetMap</a> ' +\n 'contributors.';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin='anonymous'] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {number} [maxZoom=19] Max zoom.\n * @property {boolean} [opaque=true] Whether the layer is opaque.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [transition=250] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {string} [url='https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png'] URL template.\n * Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n */\n\n/**\n * @classdesc\n * Layer source for the OpenStreetMap tile server.\n * @api\n */\nclass OSM extends XYZ {\n /**\n * @param {Options=} [opt_options] Open Street Map options.\n */\n constructor(opt_options) {\n const options = opt_options || {};\n\n let attributions;\n if (options.attributions !== undefined) {\n attributions = options.attributions;\n } else {\n attributions = [ATTRIBUTION];\n }\n\n const crossOrigin =\n options.crossOrigin !== undefined ? options.crossOrigin : 'anonymous';\n\n const url =\n options.url !== undefined\n ? options.url\n : 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png';\n\n super({\n attributions: attributions,\n attributionsCollapsible: false,\n cacheSize: options.cacheSize,\n crossOrigin: crossOrigin,\n imageSmoothing: options.imageSmoothing,\n maxZoom: options.maxZoom !== undefined ? options.maxZoom : 19,\n opaque: options.opaque !== undefined ? options.opaque : true,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n tileLoadFunction: options.tileLoadFunction,\n transition: options.transition,\n url: url,\n wrapX: options.wrapX,\n });\n }\n}\n\nexport default OSM;\n","/**\n * @module ol/layer/BaseImage\n */\nimport Layer from './Layer.js';\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 {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {import(\"../source/Image.js\").default} [source] Source for this layer.\n */\n\n/**\n * @classdesc\n * Server-rendered images that are available for arbitrary extents and\n * resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @extends {Layer<import(\"../source/Image.js\").default>}\n * @api\n */\nclass BaseImageLayer extends Layer {\n /**\n * @param {Options=} opt_options Layer options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n super(options);\n }\n}\n\nexport default BaseImageLayer;\n","/**\n * @module ol/renderer/canvas/ImageLayer\n */\nimport CanvasLayerRenderer from './Layer.js';\nimport ViewHint from '../../ViewHint.js';\nimport {ENABLE_RASTER_REPROJECTION} from '../../reproj/common.js';\nimport {assign} from '../../obj.js';\nimport {compose as composeTransform, makeInverse} from '../../transform.js';\nimport {containsExtent, intersects} from '../../extent.js';\nimport {createTransformString} from '../../render/canvas.js';\nimport {fromUserExtent} from '../../proj.js';\nimport {getIntersection, isEmpty} from '../../extent.js';\n\n/**\n * @classdesc\n * Canvas renderer for image layers.\n * @api\n */\nclass CanvasImageLayerRenderer extends CanvasLayerRenderer {\n /**\n * @param {import(\"../../layer/Image.js\").default} imageLayer Image layer.\n */\n constructor(imageLayer) {\n super(imageLayer);\n\n /**\n * @protected\n * @type {?import(\"../../ImageBase.js\").default}\n */\n this.image_ = null;\n }\n\n /**\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n */\n getImage() {\n return !this.image_ ? null : this.image_.getImage();\n }\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 prepareFrame(frameState) {\n const layerState = frameState.layerStatesArray[frameState.layerIndex];\n const pixelRatio = frameState.pixelRatio;\n const viewState = frameState.viewState;\n const viewResolution = viewState.resolution;\n\n const imageSource = this.getLayer().getSource();\n\n const hints = frameState.viewHints;\n\n let renderedExtent = frameState.extent;\n if (layerState.extent !== undefined) {\n renderedExtent = getIntersection(\n renderedExtent,\n fromUserExtent(layerState.extent, viewState.projection)\n );\n }\n\n if (\n !hints[ViewHint.ANIMATING] &&\n !hints[ViewHint.INTERACTING] &&\n !isEmpty(renderedExtent)\n ) {\n if (imageSource) {\n let projection = viewState.projection;\n if (!ENABLE_RASTER_REPROJECTION) {\n const sourceProjection = imageSource.getProjection();\n if (sourceProjection) {\n projection = sourceProjection;\n }\n }\n const image = imageSource.getImage(\n renderedExtent,\n viewResolution,\n pixelRatio,\n projection\n );\n if (image && this.loadImage(image)) {\n this.image_ = image;\n }\n } else {\n this.image_ = null;\n }\n }\n\n return !!this.image_;\n }\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 renderFrame(frameState, target) {\n const image = this.image_;\n const imageExtent = image.getExtent();\n const imageResolution = image.getResolution();\n const imagePixelRatio = image.getPixelRatio();\n const layerState = frameState.layerStatesArray[frameState.layerIndex];\n const pixelRatio = frameState.pixelRatio;\n const viewState = frameState.viewState;\n const viewCenter = viewState.center;\n const viewResolution = viewState.resolution;\n const size = frameState.size;\n const scale =\n (pixelRatio * imageResolution) / (viewResolution * imagePixelRatio);\n\n let width = Math.round(size[0] * pixelRatio);\n let height = Math.round(size[1] * pixelRatio);\n const rotation = viewState.rotation;\n if (rotation) {\n const size = Math.round(Math.sqrt(width * width + height * height));\n width = size;\n height = size;\n }\n\n // set forward and inverse pixel transforms\n composeTransform(\n this.pixelTransform,\n frameState.size[0] / 2,\n frameState.size[1] / 2,\n 1 / pixelRatio,\n 1 / pixelRatio,\n rotation,\n -width / 2,\n -height / 2\n );\n makeInverse(this.inversePixelTransform, this.pixelTransform);\n\n const canvasTransform = createTransformString(this.pixelTransform);\n\n this.useContainer(target, canvasTransform, layerState.opacity);\n\n const context = this.context;\n const canvas = context.canvas;\n\n if (canvas.width != width || canvas.height != height) {\n canvas.width = width;\n canvas.height = height;\n } else if (!this.containerReused) {\n context.clearRect(0, 0, width, height);\n }\n\n // clipped rendering if layer extent is set\n let clipped = false;\n if (layerState.extent) {\n const layerExtent = fromUserExtent(\n layerState.extent,\n viewState.projection\n );\n clipped =\n !containsExtent(layerExtent, frameState.extent) &&\n intersects(layerExtent, frameState.extent);\n if (clipped) {\n this.clipUnrotated(context, frameState, layerExtent);\n }\n }\n\n const img = image.getImage();\n\n const transform = composeTransform(\n this.tempTransform,\n width / 2,\n height / 2,\n scale,\n scale,\n 0,\n (imagePixelRatio * (imageExtent[0] - viewCenter[0])) / imageResolution,\n (imagePixelRatio * (viewCenter[1] - imageExtent[3])) / imageResolution\n );\n\n this.renderedResolution = (imageResolution * pixelRatio) / imagePixelRatio;\n\n const dx = transform[4];\n const dy = transform[5];\n const dw = img.width * transform[0];\n const dh = img.height * transform[3];\n\n assign(context, this.getLayer().getSource().getContextOptions());\n this.preRender(context, frameState);\n if (dw >= 0.5 && dh >= 0.5) {\n const opacity = layerState.opacity;\n let previousAlpha;\n if (opacity !== 1) {\n previousAlpha = this.context.globalAlpha;\n this.context.globalAlpha = opacity;\n }\n this.context.drawImage(\n img,\n 0,\n 0,\n +img.width,\n +img.height,\n Math.round(dx),\n Math.round(dy),\n Math.round(dw),\n Math.round(dh)\n );\n if (opacity !== 1) {\n this.context.globalAlpha = previousAlpha;\n }\n }\n this.postRender(context, frameState);\n\n if (clipped) {\n context.restore();\n }\n\n if (canvasTransform !== canvas.style.transform) {\n canvas.style.transform = canvasTransform;\n }\n\n return this.container;\n }\n}\n\nexport default CanvasImageLayerRenderer;\n","/**\n * @module ol/layer/Image\n */\nimport BaseImageLayer from './BaseImage.js';\nimport CanvasImageLayerRenderer from '../renderer/canvas/ImageLayer.js';\n\n/**\n * @classdesc\n * Server-rendered images that are available for arbitrary extents and\n * resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @api\n */\nclass ImageLayer extends BaseImageLayer {\n /**\n * @param {import(\"./BaseImage.js\").Options=} opt_options Layer options.\n */\n constructor(opt_options) {\n super(opt_options);\n }\n\n /**\n * Create a renderer for this layer.\n * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n */\n createRenderer() {\n return new CanvasImageLayerRenderer(this);\n }\n}\n\nexport default ImageLayer;\n","/**\n * @module ol/layer/TileProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n PRELOAD: 'preload',\n USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError',\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/**\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 {import(\"../source/Tile.js\").default} [source] Source for this layer.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.\n */\n\n/**\n * @classdesc\n * For layer sources that provide pre-rendered, tiled images in grids that are\n * organized by zoom levels for specific resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @extends {Layer<import(\"../source/Tile.js\").default>}\n * @api\n */\nclass BaseTileLayer extends Layer {\n /**\n * @param {Options=} opt_options Tile layer options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n const baseOptions = assign({}, options);\n\n delete baseOptions.preload;\n delete baseOptions.useInterimTilesOnError;\n super(baseOptions);\n\n this.setPreload(options.preload !== undefined ? options.preload : 0);\n this.setUseInterimTilesOnError(\n options.useInterimTilesOnError !== undefined\n ? options.useInterimTilesOnError\n : true\n );\n }\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 getPreload() {\n return /** @type {number} */ (this.get(TileProperty.PRELOAD));\n }\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 setPreload(preload) {\n this.set(TileProperty.PRELOAD, preload);\n }\n\n /**\n * Whether we use interim tiles on error.\n * @return {boolean} Use interim tiles on error.\n * @observable\n * @api\n */\n getUseInterimTilesOnError() {\n return /** @type {boolean} */ (this.get(\n TileProperty.USE_INTERIM_TILES_ON_ERROR\n ));\n }\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 setUseInterimTilesOnError(useInterimTilesOnError) {\n this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n }\n}\n\nexport default BaseTileLayer;\n","/**\n * @module ol/renderer/canvas/TileLayer\n */\nimport CanvasLayerRenderer from './Layer.js';\nimport TileRange from '../../TileRange.js';\nimport TileState from '../../TileState.js';\nimport {\n apply as applyTransform,\n compose as composeTransform,\n makeInverse,\n} from '../../transform.js';\nimport {assign} from '../../obj.js';\nimport {\n createEmpty,\n equals,\n getIntersection,\n getTopLeft,\n} from '../../extent.js';\nimport {createTransformString} from '../../render/canvas.js';\nimport {fromUserExtent} from '../../proj.js';\nimport {getUid} from '../../util.js';\nimport {numberSafeCompareFunction} from '../../array.js';\n\n/**\n * @classdesc\n * Canvas renderer for tile layers.\n * @api\n */\nclass CanvasTileLayerRenderer extends CanvasLayerRenderer {\n /**\n * @param {import(\"../../layer/Tile.js\").default|import(\"../../layer/VectorTile.js\").default} tileLayer Tile layer.\n */\n constructor(tileLayer) {\n super(tileLayer);\n\n /**\n * Rendered extent has changed since the previous `renderFrame()` call\n * @type {boolean}\n */\n this.extentChanged = true;\n\n /**\n * @private\n * @type {?import(\"../../extent.js\").Extent}\n */\n this.renderedExtent_ = null;\n\n /**\n * @protected\n * @type {number}\n */\n this.renderedPixelRatio;\n\n /**\n * @protected\n * @type {import(\"../../proj/Projection.js\").default}\n */\n this.renderedProjection = null;\n\n /**\n * @protected\n * @type {number}\n */\n this.renderedRevision;\n\n /**\n * @protected\n * @type {!Array<import(\"../../Tile.js\").default>}\n */\n this.renderedTiles = [];\n\n /**\n * @private\n * @type {boolean}\n */\n this.newTiles_ = false;\n\n /**\n * @protected\n * @type {import(\"../../extent.js\").Extent}\n */\n this.tmpExtent = createEmpty();\n\n /**\n * @private\n * @type {import(\"../../TileRange.js\").default}\n */\n this.tmpTileRange_ = new TileRange(0, 0, 0, 0);\n }\n\n /**\n * @protected\n * @param {import(\"../../Tile.js\").default} tile Tile.\n * @return {boolean} Tile is drawable.\n */\n isDrawableTile(tile) {\n const tileLayer = this.getLayer();\n const tileState = tile.getState();\n const useInterimTilesOnError = tileLayer.getUseInterimTilesOnError();\n return (\n tileState == TileState.LOADED ||\n tileState == TileState.EMPTY ||\n (tileState == TileState.ERROR && !useInterimTilesOnError)\n );\n }\n\n /**\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @return {!import(\"../../Tile.js\").default} Tile.\n */\n getTile(z, x, y, frameState) {\n const pixelRatio = frameState.pixelRatio;\n const projection = frameState.viewState.projection;\n const tileLayer = this.getLayer();\n const tileSource = tileLayer.getSource();\n let 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 } 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 /**\n * @param {Object<number, Object<string, import(\"../../Tile.js\").default>>} tiles Lookup of loaded tiles by zoom level.\n * @param {number} zoom Zoom level.\n * @param {import(\"../../Tile.js\").default} tile Tile.\n * @return {boolean|void} If `false`, the tile will not be considered loaded.\n */\n loadedTileCallback(tiles, zoom, tile) {\n if (this.isDrawableTile(tile)) {\n return super.loadedTileCallback(tiles, zoom, tile);\n }\n return false;\n }\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 prepareFrame(frameState) {\n return !!this.getLayer().getSource();\n }\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 renderFrame(frameState, target) {\n const layerState = frameState.layerStatesArray[frameState.layerIndex];\n const viewState = frameState.viewState;\n const projection = viewState.projection;\n const viewResolution = viewState.resolution;\n const viewCenter = viewState.center;\n const rotation = viewState.rotation;\n const pixelRatio = frameState.pixelRatio;\n\n const tileLayer = this.getLayer();\n const tileSource = tileLayer.getSource();\n const sourceRevision = tileSource.getRevision();\n const tileGrid = tileSource.getTileGridForProjection(projection);\n const z = tileGrid.getZForResolution(viewResolution, tileSource.zDirection);\n const tileResolution = tileGrid.getResolution(z);\n\n let extent = frameState.extent;\n const layerExtent =\n layerState.extent && fromUserExtent(layerState.extent, projection);\n if (layerExtent) {\n extent = getIntersection(\n extent,\n fromUserExtent(layerState.extent, projection)\n );\n }\n\n const tilePixelRatio = tileSource.getTilePixelRatio(pixelRatio);\n\n // desired dimensions of the canvas in pixels\n let width = Math.round(frameState.size[0] * tilePixelRatio);\n let height = Math.round(frameState.size[1] * tilePixelRatio);\n\n if (rotation) {\n const size = Math.round(Math.sqrt(width * width + height * height));\n width = size;\n height = size;\n }\n\n const dx = (tileResolution * width) / 2 / tilePixelRatio;\n const dy = (tileResolution * height) / 2 / tilePixelRatio;\n const canvasExtent = [\n viewCenter[0] - dx,\n viewCenter[1] - dy,\n viewCenter[0] + dx,\n viewCenter[1] + dy,\n ];\n\n const tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n\n /**\n * @type {Object<number, Object<string, import(\"../../Tile.js\").default>>}\n */\n const tilesToDrawByZ = {};\n tilesToDrawByZ[z] = {};\n\n const findLoadedTiles = this.createLoadedTileFinder(\n tileSource,\n projection,\n tilesToDrawByZ\n );\n\n const tmpExtent = this.tmpExtent;\n const tmpTileRange = this.tmpTileRange_;\n this.newTiles_ = false;\n for (let x = tileRange.minX; x <= tileRange.maxX; ++x) {\n for (let y = tileRange.minY; y <= tileRange.maxY; ++y) {\n const tile = this.getTile(z, x, y, frameState);\n if (this.isDrawableTile(tile)) {\n const uid = getUid(this);\n if (tile.getState() == TileState.LOADED) {\n tilesToDrawByZ[z][tile.tileCoord.toString()] = tile;\n const inTransition = tile.inTransition(uid);\n if (\n !this.newTiles_ &&\n (inTransition || this.renderedTiles.indexOf(tile) === -1)\n ) {\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\n const childTileRange = tileGrid.getTileCoordChildTileRange(\n tile.tileCoord,\n tmpTileRange,\n tmpExtent\n );\n\n let covered = false;\n if (childTileRange) {\n covered = findLoadedTiles(z + 1, childTileRange);\n }\n if (!covered) {\n tileGrid.forEachTileCoordParentTileRange(\n tile.tileCoord,\n findLoadedTiles,\n tmpTileRange,\n tmpExtent\n );\n }\n }\n }\n\n const canvasScale = tileResolution / viewResolution;\n\n // set forward and inverse pixel transforms\n composeTransform(\n this.pixelTransform,\n frameState.size[0] / 2,\n frameState.size[1] / 2,\n 1 / tilePixelRatio,\n 1 / tilePixelRatio,\n rotation,\n -width / 2,\n -height / 2\n );\n\n const canvasTransform = createTransformString(this.pixelTransform);\n\n this.useContainer(target, canvasTransform, layerState.opacity);\n const context = this.context;\n const canvas = context.canvas;\n\n makeInverse(this.inversePixelTransform, this.pixelTransform);\n\n // set scale transform for calculating tile positions on the canvas\n composeTransform(\n this.tempTransform,\n width / 2,\n height / 2,\n canvasScale,\n canvasScale,\n 0,\n -width / 2,\n -height / 2\n );\n\n if (canvas.width != width || canvas.height != height) {\n canvas.width = width;\n canvas.height = height;\n } else if (!this.containerReused) {\n context.clearRect(0, 0, width, height);\n }\n\n if (layerExtent) {\n this.clipUnrotated(context, frameState, layerExtent);\n }\n\n assign(context, tileSource.getContextOptions());\n this.preRender(context, frameState);\n\n this.renderedTiles.length = 0;\n /** @type {Array<number>} */\n let zs = Object.keys(tilesToDrawByZ).map(Number);\n zs.sort(numberSafeCompareFunction);\n\n let clips, clipZs, currentClip;\n if (\n layerState.opacity === 1 &&\n (!this.containerReused ||\n tileSource.getOpaque(frameState.viewState.projection))\n ) {\n zs = zs.reverse();\n } else {\n clips = [];\n clipZs = [];\n }\n for (let i = zs.length - 1; i >= 0; --i) {\n const currentZ = zs[i];\n const currentTilePixelSize = tileSource.getTilePixelSize(\n currentZ,\n pixelRatio,\n projection\n );\n const currentResolution = tileGrid.getResolution(currentZ);\n const currentScale = currentResolution / tileResolution;\n const dx = currentTilePixelSize[0] * currentScale * canvasScale;\n const dy = currentTilePixelSize[1] * currentScale * canvasScale;\n const originTileCoord = tileGrid.getTileCoordForCoordAndZ(\n getTopLeft(canvasExtent),\n currentZ\n );\n const originTileExtent = tileGrid.getTileCoordExtent(originTileCoord);\n const origin = applyTransform(this.tempTransform, [\n (tilePixelRatio * (originTileExtent[0] - canvasExtent[0])) /\n tileResolution,\n (tilePixelRatio * (canvasExtent[3] - originTileExtent[3])) /\n tileResolution,\n ]);\n const tileGutter =\n tilePixelRatio * tileSource.getGutterForProjection(projection);\n const tilesToDraw = tilesToDrawByZ[currentZ];\n for (const tileCoordKey in tilesToDraw) {\n const tile = /** @type {import(\"../../ImageTile.js\").default} */ (tilesToDraw[\n tileCoordKey\n ]);\n const tileCoord = tile.tileCoord;\n\n // Calculate integer positions and sizes so that tiles align\n const floatX = origin[0] - (originTileCoord[1] - tileCoord[1]) * dx;\n const nextX = Math.round(floatX + dx);\n const floatY = origin[1] - (originTileCoord[2] - tileCoord[2]) * dy;\n const nextY = Math.round(floatY + dy);\n const x = Math.round(floatX);\n const y = Math.round(floatY);\n const w = nextX - x;\n const h = nextY - y;\n const transition = z === currentZ;\n\n const inTransition =\n transition && tile.getAlpha(getUid(this), frameState.time) !== 1;\n if (!inTransition) {\n if (clips) {\n // Clip mask for regions in this tile that already filled by a higher z tile\n context.save();\n currentClip = [x, y, x + w, y, x + w, y + h, x, y + h];\n for (let i = 0, ii = clips.length; i < ii; ++i) {\n if (z !== currentZ && currentZ < clipZs[i]) {\n const clip = clips[i];\n context.beginPath();\n // counter-clockwise (outer ring) for current tile\n context.moveTo(currentClip[0], currentClip[1]);\n context.lineTo(currentClip[2], currentClip[3]);\n context.lineTo(currentClip[4], currentClip[5]);\n context.lineTo(currentClip[6], currentClip[7]);\n // clockwise (inner ring) for higher z tile\n context.moveTo(clip[6], clip[7]);\n context.lineTo(clip[4], clip[5]);\n context.lineTo(clip[2], clip[3]);\n context.lineTo(clip[0], clip[1]);\n context.clip();\n }\n }\n clips.push(currentClip);\n clipZs.push(currentZ);\n } else {\n context.clearRect(x, y, w, h);\n }\n }\n this.drawTileImage(\n tile,\n frameState,\n x,\n y,\n w,\n h,\n tileGutter,\n transition,\n layerState.opacity\n );\n if (clips && !inTransition) {\n context.restore();\n }\n this.renderedTiles.push(tile);\n this.updateUsedTiles(frameState.usedTiles, tileSource, tile);\n }\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\n this.manageTilePyramid(\n frameState,\n tileSource,\n tileGrid,\n pixelRatio,\n projection,\n extent,\n z,\n tileLayer.getPreload()\n );\n this.scheduleExpireCache(frameState, tileSource);\n\n this.postRender(context, frameState);\n\n if (layerState.extent) {\n context.restore();\n }\n\n if (canvasTransform !== canvas.style.transform) {\n canvas.style.transform = canvasTransform;\n }\n\n return this.container;\n }\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 * @param {number} opacity Opacity.\n */\n drawTileImage(tile, frameState, x, y, w, h, gutter, transition, opacity) {\n const image = this.getTileImage(tile);\n if (!image) {\n return;\n }\n const uid = getUid(this);\n const tileAlpha = transition ? tile.getAlpha(uid, frameState.time) : 1;\n const alpha = opacity * tileAlpha;\n const alphaChanged = alpha !== this.context.globalAlpha;\n if (alphaChanged) {\n this.context.save();\n this.context.globalAlpha = alpha;\n }\n this.context.drawImage(\n image,\n gutter,\n gutter,\n image.width - 2 * gutter,\n image.height - 2 * gutter,\n x,\n y,\n w,\n h\n );\n\n if (alphaChanged) {\n this.context.restore();\n }\n if (tileAlpha !== 1) {\n frameState.animate = true;\n } else if (transition) {\n tile.endTransition(uid);\n }\n }\n\n /**\n * @return {HTMLCanvasElement} Image\n */\n getImage() {\n const context = this.context;\n return context ? context.canvas : null;\n }\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 getTileImage(tile) {\n return tile.getImage();\n }\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 scheduleExpireCache(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 const postRenderFunction = function (tileSource, map, frameState) {\n const tileSourceKey = getUid(tileSource);\n if (tileSourceKey in frameState.usedTiles) {\n tileSource.expireCache(\n frameState.viewState.projection,\n frameState.usedTiles[tileSourceKey]\n );\n }\n }.bind(null, tileSource);\n\n frameState.postRenderFunctions.push(\n /** @type {import(\"../../PluggableMap.js\").PostRenderFunction} */ (postRenderFunction)\n );\n }\n }\n\n /**\n * @param {!Object<string, !Object<string, boolean>>} usedTiles Used tiles.\n * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n * @param {import('../../Tile.js').default} tile Tile.\n * @protected\n */\n updateUsedTiles(usedTiles, tileSource, tile) {\n // FIXME should we use tilesToDrawByZ instead?\n const tileSourceKey = getUid(tileSource);\n if (!(tileSourceKey in usedTiles)) {\n usedTiles[tileSourceKey] = {};\n }\n usedTiles[tileSourceKey][tile.getKey()] = true;\n }\n\n /**\n * Manage tile pyramid.\n * This function performs a number of functions related to the tiles at the\n * current zoom and lower zoom levels:\n * - registers idle tiles in frameState.wantedTiles so that they are not\n * discarded by the tile queue\n * - enqueues missing tiles\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n * @param {import(\"../../tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @param {number} currentZ Current Z.\n * @param {number} preload Load low resolution tiles up to 'preload' levels.\n * @param {function(import(\"../../Tile.js\").default)=} opt_tileCallback Tile callback.\n * @protected\n */\n manageTilePyramid(\n frameState,\n tileSource,\n tileGrid,\n pixelRatio,\n projection,\n extent,\n currentZ,\n preload,\n opt_tileCallback\n ) {\n const tileSourceKey = getUid(tileSource);\n if (!(tileSourceKey in frameState.wantedTiles)) {\n frameState.wantedTiles[tileSourceKey] = {};\n }\n const wantedTiles = frameState.wantedTiles[tileSourceKey];\n const tileQueue = frameState.tileQueue;\n const minZoom = tileGrid.getMinZoom();\n let tileCount = 0;\n let tile, tileRange, tileResolution, x, y, z;\n for (z = minZoom; z <= currentZ; ++z) {\n tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z, tileRange);\n tileResolution = tileGrid.getResolution(z);\n for (x = tileRange.minX; x <= tileRange.maxX; ++x) {\n for (y = tileRange.minY; y <= tileRange.maxY; ++y) {\n if (currentZ - z <= preload) {\n ++tileCount;\n tile = tileSource.getTile(z, x, y, pixelRatio, projection);\n if (tile.getState() == TileState.IDLE) {\n wantedTiles[tile.getKey()] = true;\n if (!tileQueue.isKeyQueued(tile.getKey())) {\n tileQueue.enqueue([\n tile,\n tileSourceKey,\n tileGrid.getTileCoordCenter(tile.tileCoord),\n tileResolution,\n ]);\n }\n }\n if (opt_tileCallback !== undefined) {\n opt_tileCallback(tile);\n }\n } else {\n tileSource.useTile(z, x, y, projection);\n }\n }\n }\n }\n tileSource.updateCacheSize(tileCount, projection);\n }\n}\n\n/**\n * @function\n * @return {import(\"../../layer/Tile.js\").default|import(\"../../layer/VectorTile.js\").default}\n */\nCanvasTileLayerRenderer.prototype.getLayer;\n\nexport default CanvasTileLayerRenderer;\n","/**\n * @module ol/layer/Tile\n */\nimport BaseTileLayer from './BaseTile.js';\nimport CanvasTileLayerRenderer from '../renderer/canvas/TileLayer.js';\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 * @api\n */\nclass TileLayer extends BaseTileLayer {\n /**\n * @param {import(\"./BaseTile.js\").Options=} opt_options Tile layer options.\n */\n constructor(opt_options) {\n super(opt_options);\n }\n\n /**\n * Create a renderer for this layer.\n * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n * @protected\n */\n createRenderer() {\n return new CanvasTileLayerRenderer(this);\n }\n}\n\nexport default TileLayer;\n","/**\n * @module ol/source/Raster\n */\nimport Disposable from '../Disposable.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport ImageCanvas from '../ImageCanvas.js';\nimport ImageLayer from '../layer/Image.js';\nimport ImageSource from './Image.js';\nimport Source from './Source.js';\nimport SourceState from './State.js';\nimport TileLayer from '../layer/Tile.js';\nimport TileQueue from '../TileQueue.js';\nimport TileSource from './Tile.js';\nimport {assign} from '../obj.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {create as createTransform} from '../transform.js';\nimport {equals, getCenter, getHeight, getWidth} from '../extent.js';\n\nlet hasImageData = true;\ntry {\n new ImageData(10, 10);\n} catch (_) {\n hasImageData = false;\n}\n\nconst context = document.createElement('canvas').getContext('2d');\n\n/**\n * @param {Uint8ClampedArray} data Image data.\n * @param {number} width Number of columns.\n * @param {number} height Number of rows.\n * @return {ImageData} Image data.\n */\nexport function newImageData(data, width, height) {\n if (hasImageData) {\n return new ImageData(data, width, height);\n } else {\n const imageData = context.createImageData(width, height);\n imageData.data.set(data);\n return imageData;\n }\n}\n\n/* istanbul ignore next */\n/**\n * Create a function for running operations. This function is serialized for\n * use in a worker.\n * @param {function(Array, Object):*} operation The operation.\n * @return {function(Object):ArrayBuffer} A function that takes an object with\n * buffers, meta, imageOps, width, and height properties and returns an array\n * buffer.\n */\nfunction createMinion(operation) {\n let workerHasImageData = true;\n try {\n new ImageData(10, 10);\n } catch (_) {\n workerHasImageData = false;\n }\n\n function newWorkerImageData(data, width, height) {\n if (workerHasImageData) {\n return new ImageData(data, width, height);\n } else {\n return {data: data, width: width, height: height};\n }\n }\n\n return function (data) {\n // bracket notation for minification support\n const buffers = data['buffers'];\n const meta = data['meta'];\n const imageOps = data['imageOps'];\n const width = data['width'];\n const height = data['height'];\n\n const numBuffers = buffers.length;\n const numBytes = buffers[0].byteLength;\n let output, b;\n\n if (imageOps) {\n const images = new Array(numBuffers);\n for (b = 0; b < numBuffers; ++b) {\n images[b] = newWorkerImageData(\n new Uint8ClampedArray(buffers[b]),\n width,\n height\n );\n }\n output = operation(images, meta).data;\n } else {\n output = new Uint8ClampedArray(numBytes);\n const arrays = new Array(numBuffers);\n const pixels = new Array(numBuffers);\n for (b = 0; b < numBuffers; ++b) {\n arrays[b] = new Uint8ClampedArray(buffers[b]);\n pixels[b] = [0, 0, 0, 0];\n }\n for (let i = 0; i < numBytes; i += 4) {\n for (let j = 0; j < numBuffers; ++j) {\n const array = arrays[j];\n pixels[j][0] = array[i];\n pixels[j][1] = array[i + 1];\n pixels[j][2] = array[i + 2];\n pixels[j][3] = array[i + 3];\n }\n const pixel = operation(pixels, meta);\n output[i] = pixel[0];\n output[i + 1] = pixel[1];\n output[i + 2] = pixel[2];\n output[i + 3] = pixel[3];\n }\n }\n return output.buffer;\n };\n}\n\n/**\n * Create a worker for running operations.\n * @param {Object} config Configuration.\n * @param {function(MessageEvent): void} onMessage Called with a message event.\n * @return {Worker} The worker.\n */\nfunction createWorker(config, onMessage) {\n const lib = Object.keys(config.lib || {}).map(function (name) {\n return 'var ' + name + ' = ' + config.lib[name].toString() + ';';\n });\n\n const lines = lib.concat([\n 'var __minion__ = (' + createMinion.toString() + ')(',\n config.operation.toString(),\n ');',\n 'self.addEventListener(\"message\", function(event) {',\n ' var buffer = __minion__(event.data);',\n ' self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);',\n '});',\n ]);\n\n const blob = new Blob(lines, {type: 'text/javascript'});\n const source = URL.createObjectURL(blob);\n const worker = new Worker(source);\n worker.addEventListener('message', onMessage);\n return worker;\n}\n\n/**\n * @typedef {Object} FauxMessageEvent\n * @property {Object} data Message data.\n */\n\n/**\n * Create a faux worker for running operations.\n * @param {ProcessorOptions} config Configuration.\n * @param {function(FauxMessageEvent): void} onMessage Called with a message event.\n * @return {Object} The faux worker.\n */\nfunction createFauxWorker(config, onMessage) {\n const minion = createMinion(config.operation);\n let terminated = false;\n return {\n postMessage: function (data) {\n setTimeout(function () {\n if (terminated) {\n return;\n }\n onMessage({data: {buffer: minion(data), meta: data['meta']}});\n }, 0);\n },\n terminate: function () {\n terminated = true;\n },\n };\n}\n\n/**\n * @typedef {Object} ProcessorOptions\n * @property {number} threads Number of workers to spawn.\n * @property {function(Array, Object):*} operation The operation.\n * @property {Object} [lib] Functions that will be made available to operations run in a worker.\n * @property {number} queue The number of queued jobs to allow.\n * @property {boolean} [imageOps=false] Pass all the image data to the operation instead of a single pixel.\n */\n\n/**\n * @classdesc\n * A processor runs pixel or image operations in workers.\n */\nexport class Processor extends Disposable {\n /**\n * @param {ProcessorOptions} config Configuration.\n */\n constructor(config) {\n super();\n\n this._imageOps = !!config.imageOps;\n let threads;\n if (config.threads === 0) {\n threads = 0;\n } else if (this._imageOps) {\n threads = 1;\n } else {\n threads = config.threads || 1;\n }\n const workers = [];\n if (threads) {\n for (let i = 0; i < threads; ++i) {\n workers[i] = createWorker(config, this._onWorkerMessage.bind(this, i));\n }\n } else {\n workers[0] = createFauxWorker(\n config,\n this._onWorkerMessage.bind(this, 0)\n );\n }\n this._workers = workers;\n this._queue = [];\n this._maxQueueLength = config.queue || Infinity;\n this._running = 0;\n this._dataLookup = {};\n this._job = null;\n }\n\n /**\n * Run operation on input data.\n * @param {Array.<Array|ImageData>} inputs Array of pixels or image data\n * (depending on the operation type).\n * @param {Object} meta A user data object. This is passed to all operations\n * and must be serializable.\n * @param {function(Error, ImageData, Object): void} callback Called when work\n * completes. The first argument is any error. The second is the ImageData\n * generated by operations. The third is the user data object.\n */\n process(inputs, meta, callback) {\n this._enqueue({\n inputs: inputs,\n meta: meta,\n callback: callback,\n });\n this._dispatch();\n }\n\n /**\n * Add a job to the queue.\n * @param {Object} job The job.\n */\n _enqueue(job) {\n this._queue.push(job);\n while (this._queue.length > this._maxQueueLength) {\n this._queue.shift().callback(null, null);\n }\n }\n\n /**\n * Dispatch a job.\n */\n _dispatch() {\n if (this._running === 0 && this._queue.length > 0) {\n const job = this._queue.shift();\n this._job = job;\n const width = job.inputs[0].width;\n const height = job.inputs[0].height;\n const buffers = job.inputs.map(function (input) {\n return input.data.buffer;\n });\n const threads = this._workers.length;\n this._running = threads;\n if (threads === 1) {\n this._workers[0].postMessage(\n {\n buffers: buffers,\n meta: job.meta,\n imageOps: this._imageOps,\n width: width,\n height: height,\n },\n buffers\n );\n } else {\n const length = job.inputs[0].data.length;\n const segmentLength = 4 * Math.ceil(length / 4 / threads);\n for (let i = 0; i < threads; ++i) {\n const offset = i * segmentLength;\n const slices = [];\n for (let j = 0, jj = buffers.length; j < jj; ++j) {\n slices.push(buffers[j].slice(offset, offset + segmentLength));\n }\n this._workers[i].postMessage(\n {\n buffers: slices,\n meta: job.meta,\n imageOps: this._imageOps,\n width: width,\n height: height,\n },\n slices\n );\n }\n }\n }\n }\n\n /**\n * Handle messages from the worker.\n * @param {number} index The worker index.\n * @param {MessageEvent} event The message event.\n */\n _onWorkerMessage(index, event) {\n if (this.disposed) {\n return;\n }\n this._dataLookup[index] = event.data;\n --this._running;\n if (this._running === 0) {\n this._resolveJob();\n }\n }\n\n /**\n * Resolve a job. If there are no more worker threads, the processor callback\n * will be called.\n */\n _resolveJob() {\n const job = this._job;\n const threads = this._workers.length;\n let data, meta;\n if (threads === 1) {\n data = new Uint8ClampedArray(this._dataLookup[0]['buffer']);\n meta = this._dataLookup[0]['meta'];\n } else {\n const length = job.inputs[0].data.length;\n data = new Uint8ClampedArray(length);\n meta = new Array(length);\n const segmentLength = 4 * Math.ceil(length / 4 / threads);\n for (let i = 0; i < threads; ++i) {\n const buffer = this._dataLookup[i]['buffer'];\n const offset = i * segmentLength;\n data.set(new Uint8ClampedArray(buffer), offset);\n meta[i] = this._dataLookup[i]['meta'];\n }\n }\n this._job = null;\n this._dataLookup = {};\n job.callback(\n null,\n newImageData(data, job.inputs[0].width, job.inputs[0].height),\n meta\n );\n this._dispatch();\n }\n\n /**\n * Terminate all workers associated with the processor.\n */\n disposeInternal() {\n for (let i = 0; i < this._workers.length; ++i) {\n this._workers[i].terminate();\n }\n this._workers.length = 0;\n }\n}\n\n/**\n * A function that takes an array of input data, performs some operation, and\n * returns an array of output data.\n * For `pixel` type operations, the function will be called with an array of\n * pixels, where each pixel is an array of four numbers (`[r, g, b, a]`) in the\n * range of 0 - 255. It should return a single pixel array.\n * For `'image'` type operations, functions will be called with an array of\n * {@link ImageData https://developer.mozilla.org/en-US/docs/Web/API/ImageData}\n * and should return a single {@link ImageData\n * https://developer.mozilla.org/en-US/docs/Web/API/ImageData}. The operations\n * are called with a second \"data\" argument, which can be used for storage. The\n * data object is accessible from raster events, where it can be initialized in\n * \"beforeoperations\" and accessed again in \"afteroperations\".\n *\n * @typedef {function((Array<Array<number>>|Array<ImageData>), Object):\n * (Array<number>|ImageData)} Operation\n */\n\n/**\n * @enum {string}\n */\nconst RasterEventType = {\n /**\n * Triggered before operations are run.\n * @event module:ol/source/Raster.RasterSourceEvent#beforeoperations\n * @api\n */\n BEFOREOPERATIONS: 'beforeoperations',\n\n /**\n * Triggered after operations are run.\n * @event module:ol/source/Raster.RasterSourceEvent#afteroperations\n * @api\n */\n AFTEROPERATIONS: 'afteroperations',\n};\n\n/**\n * Raster operation type. Supported values are `'pixel'` and `'image'`.\n * @enum {string}\n */\nconst RasterOperationType = {\n PIXEL: 'pixel',\n IMAGE: 'image',\n};\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Raster} instances are instances of this\n * type.\n */\nexport class RasterSourceEvent extends Event {\n /**\n * @param {string} type Type.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState The frame state.\n * @param {Object} data An object made available to operations.\n */\n constructor(type, frameState, data) {\n super(type);\n\n /**\n * The raster extent.\n * @type {import(\"../extent.js\").Extent}\n * @api\n */\n this.extent = frameState.extent;\n\n /**\n * The pixel resolution (map units per pixel).\n * @type {number}\n * @api\n */\n this.resolution = frameState.viewState.resolution / frameState.pixelRatio;\n\n /**\n * An object made available to all operations. This can be used by operations\n * as a storage object (e.g. for calculating statistics).\n * @type {Object}\n * @api\n */\n this.data = data;\n }\n}\n\n/**\n * @typedef {Object} Options\n * @property {Array<import(\"./Source.js\").default|import(\"../layer/Layer.js\").default>} sources Input\n * sources or layers. For vector data, use an VectorImage layer.\n * @property {Operation} [operation] Raster operation.\n * The operation will be called with data from input sources\n * and the output will be assigned to the raster source.\n * @property {Object} [lib] Functions that will be made available to operations run in a worker.\n * @property {number} [threads] By default, operations will be run in a single worker thread.\n * To avoid using workers altogether, set `threads: 0`. For pixel operations, operations can\n * be run in multiple worker threads. Note that there is additional overhead in\n * transferring data to multiple workers, and that depending on the user's\n * system, it may not be possible to parallelize the work.\n * @property {RasterOperationType} [operationType='pixel'] Operation type.\n * Supported values are `'pixel'` and `'image'`. By default,\n * `'pixel'` operations are assumed, and operations will be called with an\n * array of pixels from input sources. If set to `'image'`, operations will\n * be called with an array of ImageData objects from input sources.\n */\n\n/**\n * @classdesc\n * A source that transforms data from any number of input sources using an\n * {@link module:ol/source/Raster~Operation} function to transform input pixel values into\n * output pixel values.\n *\n * @fires module:ol/source/Raster.RasterSourceEvent\n * @api\n */\nclass RasterSource extends ImageSource {\n /**\n * @param {Options} options Options.\n */\n constructor(options) {\n super({\n projection: null,\n });\n\n /**\n * @private\n * @type {Processor}\n */\n this.processor_ = null;\n\n /**\n * @private\n * @type {RasterOperationType}\n */\n this.operationType_ =\n options.operationType !== undefined\n ? options.operationType\n : RasterOperationType.PIXEL;\n\n /**\n * @private\n * @type {number}\n */\n this.threads_ = options.threads !== undefined ? options.threads : 1;\n\n /**\n * @private\n * @type {Array<import(\"../layer/Layer.js\").default>}\n */\n this.layers_ = createLayers(options.sources);\n\n const changed = this.changed.bind(this);\n for (let i = 0, ii = this.layers_.length; i < ii; ++i) {\n this.layers_[i].addEventListener(EventType.CHANGE, changed);\n }\n\n /**\n * @private\n * @type {import(\"../TileQueue.js\").default}\n */\n this.tileQueue_ = new TileQueue(function () {\n return 1;\n }, this.changed.bind(this));\n\n /**\n * The most recently requested frame state.\n * @type {import(\"../PluggableMap.js\").FrameState}\n * @private\n */\n this.requestedFrameState_;\n\n /**\n * The most recently rendered image canvas.\n * @type {import(\"../ImageCanvas.js\").default}\n * @private\n */\n this.renderedImageCanvas_ = null;\n\n /**\n * The most recently rendered revision.\n * @type {number}\n */\n this.renderedRevision_;\n\n /**\n * @private\n * @type {import(\"../PluggableMap.js\").FrameState}\n */\n this.frameState_ = {\n animate: false,\n coordinateToPixelTransform: createTransform(),\n declutterTree: null,\n extent: null,\n index: 0,\n layerIndex: 0,\n layerStatesArray: getLayerStatesArray(this.layers_),\n pixelRatio: 1,\n pixelToCoordinateTransform: createTransform(),\n postRenderFunctions: [],\n size: [0, 0],\n tileQueue: this.tileQueue_,\n time: Date.now(),\n usedTiles: {},\n viewState: /** @type {import(\"../View.js\").State} */ ({\n rotation: 0,\n }),\n viewHints: [],\n wantedTiles: {},\n };\n\n this.setAttributions(function (frameState) {\n const attributions = [];\n for (\n let index = 0, iMax = options.sources.length;\n index < iMax;\n ++index\n ) {\n const sourceOrLayer = options.sources[index];\n const source =\n sourceOrLayer instanceof Source\n ? sourceOrLayer\n : sourceOrLayer.getSource();\n const attributionGetter = source.getAttributions();\n if (typeof attributionGetter === 'function') {\n const sourceAttribution = attributionGetter(frameState);\n attributions.push.apply(attributions, sourceAttribution);\n }\n }\n return attributions.length !== 0 ? attributions : null;\n });\n\n if (options.operation !== undefined) {\n this.setOperation(options.operation, options.lib);\n }\n }\n\n /**\n * Set the operation.\n * @param {Operation} operation New operation.\n * @param {Object=} opt_lib Functions that will be available to operations run\n * in a worker.\n * @api\n */\n setOperation(operation, opt_lib) {\n if (this.processor_) {\n this.processor_.dispose();\n }\n\n this.processor_ = new Processor({\n operation: operation,\n imageOps: this.operationType_ === RasterOperationType.IMAGE,\n queue: 1,\n lib: opt_lib,\n threads: this.threads_,\n });\n this.changed();\n }\n\n /**\n * Update the stored frame state.\n * @param {import(\"../extent.js\").Extent} extent The view extent (in map units).\n * @param {number} resolution The view resolution.\n * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n * @return {import(\"../PluggableMap.js\").FrameState} The updated frame state.\n * @private\n */\n updateFrameState_(extent, resolution, projection) {\n const frameState = /** @type {import(\"../PluggableMap.js\").FrameState} */ (assign(\n {},\n this.frameState_\n ));\n\n frameState.viewState = /** @type {import(\"../View.js\").State} */ (assign(\n {},\n frameState.viewState\n ));\n\n const center = getCenter(extent);\n\n frameState.extent = extent.slice();\n frameState.size[0] = Math.round(getWidth(extent) / resolution);\n frameState.size[1] = Math.round(getHeight(extent) / resolution);\n frameState.time = Infinity;\n\n const viewState = frameState.viewState;\n viewState.center = center;\n viewState.projection = projection;\n viewState.resolution = resolution;\n return frameState;\n }\n\n /**\n * Determine if all sources are ready.\n * @return {boolean} All sources are ready.\n * @private\n */\n allSourcesReady_() {\n let ready = true;\n let source;\n for (let i = 0, ii = this.layers_.length; i < ii; ++i) {\n source = this.layers_[i].getSource();\n if (source.getState() !== SourceState.READY) {\n ready = false;\n break;\n }\n }\n return ready;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../ImageCanvas.js\").default} Single image.\n */\n getImage(extent, resolution, pixelRatio, projection) {\n if (!this.allSourcesReady_()) {\n return null;\n }\n\n const frameState = this.updateFrameState_(extent, resolution, projection);\n this.requestedFrameState_ = frameState;\n\n // check if we can't reuse the existing ol/ImageCanvas\n if (this.renderedImageCanvas_) {\n const renderedResolution = this.renderedImageCanvas_.getResolution();\n const renderedExtent = this.renderedImageCanvas_.getExtent();\n if (\n resolution !== renderedResolution ||\n !equals(extent, renderedExtent)\n ) {\n this.renderedImageCanvas_ = null;\n }\n }\n\n if (\n !this.renderedImageCanvas_ ||\n this.getRevision() !== this.renderedRevision_\n ) {\n this.processSources_();\n }\n\n frameState.tileQueue.loadMoreTiles(16, 16);\n\n if (frameState.animate) {\n requestAnimationFrame(this.changed.bind(this));\n }\n\n return this.renderedImageCanvas_;\n }\n\n /**\n * Start processing source data.\n * @private\n */\n processSources_() {\n const frameState = this.requestedFrameState_;\n const len = this.layers_.length;\n const imageDatas = new Array(len);\n for (let i = 0; i < len; ++i) {\n frameState.layerIndex = i;\n const imageData = getImageData(this.layers_[i], frameState);\n if (imageData) {\n imageDatas[i] = imageData;\n } else {\n return;\n }\n }\n\n const data = {};\n this.dispatchEvent(\n new RasterSourceEvent(RasterEventType.BEFOREOPERATIONS, frameState, data)\n );\n this.processor_.process(\n imageDatas,\n data,\n this.onWorkerComplete_.bind(this, frameState)\n );\n }\n\n /**\n * Called when pixel processing is complete.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState The frame state.\n * @param {Error} err Any error during processing.\n * @param {ImageData} output The output image data.\n * @param {Object} data The user data.\n * @private\n */\n onWorkerComplete_(frameState, err, output, data) {\n if (err || !output) {\n return;\n }\n\n // do nothing if extent or resolution changed\n const extent = frameState.extent;\n const resolution = frameState.viewState.resolution;\n if (\n resolution !== this.requestedFrameState_.viewState.resolution ||\n !equals(extent, this.requestedFrameState_.extent)\n ) {\n return;\n }\n\n let context;\n if (this.renderedImageCanvas_) {\n context = this.renderedImageCanvas_.getImage().getContext('2d');\n } else {\n const width = Math.round(getWidth(extent) / resolution);\n const height = Math.round(getHeight(extent) / resolution);\n context = createCanvasContext2D(width, height);\n this.renderedImageCanvas_ = new ImageCanvas(\n extent,\n resolution,\n 1,\n context.canvas\n );\n }\n context.putImageData(output, 0, 0);\n\n this.changed();\n this.renderedRevision_ = this.getRevision();\n\n this.dispatchEvent(\n new RasterSourceEvent(RasterEventType.AFTEROPERATIONS, frameState, data)\n );\n }\n\n /**\n * @return {null} not implemented\n */\n getImageInternal() {\n return null; // not implemented\n }\n\n disposeInternal() {\n if (this.processor_) {\n this.processor_.dispose();\n }\n super.disposeInternal();\n }\n}\n\n/**\n * Clean up and unregister the worker.\n * @function\n * @api\n */\nRasterSource.prototype.dispose;\n\n/**\n * A reusable canvas context.\n * @type {CanvasRenderingContext2D}\n * @private\n */\nlet sharedContext = null;\n\n/**\n * Get image data from a layer.\n * @param {import(\"../layer/Layer.js\").default} layer Layer to render.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState The frame state.\n * @return {ImageData} The image data.\n */\nfunction getImageData(layer, frameState) {\n const renderer = layer.getRenderer();\n if (!renderer) {\n throw new Error('Unsupported layer type: ' + layer);\n }\n\n if (!renderer.prepareFrame(frameState)) {\n return null;\n }\n const width = frameState.size[0];\n const height = frameState.size[1];\n if (width === 0 || height === 0) {\n return null;\n }\n const container = renderer.renderFrame(frameState, null);\n let element;\n if (container) {\n element = container.firstElementChild;\n }\n if (!(element instanceof HTMLCanvasElement)) {\n throw new Error('Unsupported rendered element: ' + element);\n }\n if (element.width === width && element.height === height) {\n const context = element.getContext('2d');\n return context.getImageData(0, 0, width, height);\n }\n\n if (!sharedContext) {\n sharedContext = createCanvasContext2D(width, height);\n } else {\n const canvas = sharedContext.canvas;\n if (canvas.width !== width || canvas.height !== height) {\n sharedContext = createCanvasContext2D(width, height);\n } else {\n sharedContext.clearRect(0, 0, width, height);\n }\n }\n sharedContext.drawImage(element, 0, 0, width, height);\n return sharedContext.getImageData(0, 0, width, height);\n}\n\n/**\n * Get a list of layer states from a list of layers.\n * @param {Array<import(\"../layer/Layer.js\").default>} layers Layers.\n * @return {Array<import(\"../layer/Layer.js\").State>} The layer states.\n */\nfunction getLayerStatesArray(layers) {\n return layers.map(function (layer) {\n return layer.getLayerState();\n });\n}\n\n/**\n * Create layers for all sources.\n * @param {Array<import(\"./Source.js\").default|import(\"../layer/Layer.js\").default>} sources The sources.\n * @return {Array<import(\"../layer/Layer.js\").default>} Array of layers.\n */\nfunction createLayers(sources) {\n const len = sources.length;\n const layers = new Array(len);\n for (let i = 0; i < len; ++i) {\n layers[i] = createLayer(sources[i]);\n }\n return layers;\n}\n\n/**\n * Create a layer for the provided source.\n * @param {import(\"./Source.js\").default|import(\"../layer/Layer.js\").default} layerOrSource The layer or source.\n * @return {import(\"../layer/Layer.js\").default} The layer.\n */\nfunction createLayer(layerOrSource) {\n // @type {import(\"../layer/Layer.js\").default}\n let layer;\n if (layerOrSource instanceof Source) {\n if (layerOrSource instanceof TileSource) {\n layer = new TileLayer({source: layerOrSource});\n } else if (layerOrSource instanceof ImageSource) {\n layer = new ImageLayer({source: layerOrSource});\n }\n } else {\n layer = layerOrSource;\n }\n return layer;\n}\n\nexport default RasterSource;\n","/**\n * @module ol/source/Stamen\n */\n\nimport XYZ from './XYZ.js';\nimport {ATTRIBUTION as OSM_ATTRIBUTION} from './OSM.js';\n\n/**\n * @const\n * @type {Array<string>}\n */\nconst ATTRIBUTIONS = [\n 'Map tiles by <a href=\"https://stamen.com/\" target=\"_blank\">Stamen Design</a>, ' +\n 'under <a href=\"https://creativecommons.org/licenses/by/3.0/\" target=\"_blank\">CC BY' +\n ' 3.0</a>.',\n OSM_ATTRIBUTION,\n];\n\n/**\n * @type {Object<string, {extension: string, opaque: boolean}>}\n */\nconst LayerConfig = {\n 'terrain': {\n extension: 'jpg',\n opaque: true,\n },\n 'terrain-background': {\n extension: 'jpg',\n opaque: true,\n },\n 'terrain-labels': {\n extension: 'png',\n opaque: false,\n },\n 'terrain-lines': {\n extension: 'png',\n opaque: false,\n },\n 'toner-background': {\n extension: 'png',\n opaque: true,\n },\n 'toner': {\n extension: 'png',\n opaque: true,\n },\n 'toner-hybrid': {\n extension: 'png',\n opaque: false,\n },\n 'toner-labels': {\n extension: 'png',\n opaque: false,\n },\n 'toner-lines': {\n extension: 'png',\n opaque: false,\n },\n 'toner-lite': {\n extension: 'png',\n opaque: true,\n },\n 'watercolor': {\n extension: 'jpg',\n opaque: true,\n },\n};\n\n/**\n * @type {Object<string, {minZoom: number, maxZoom: number}>}\n */\nconst ProviderConfig = {\n 'terrain': {\n minZoom: 0,\n maxZoom: 18,\n },\n 'toner': {\n minZoom: 0,\n maxZoom: 20,\n },\n 'watercolor': {\n minZoom: 0,\n maxZoom: 18,\n },\n};\n\n/**\n * @typedef {Object} Options\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {string} layer Layer name.\n * @property {number} [minZoom] Minimum zoom.\n * @property {number} [maxZoom] Maximum zoom.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction]\n * Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [transition=250] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n */\n\n/**\n * @classdesc\n * Layer source for the Stamen tile server.\n * @api\n */\nclass Stamen extends XYZ {\n /**\n * @param {Options} options Stamen options.\n */\n constructor(options) {\n const i = options.layer.indexOf('-');\n const provider = i == -1 ? options.layer : options.layer.slice(0, i);\n const providerConfig = ProviderConfig[provider];\n\n const layerConfig = LayerConfig[options.layer];\n\n const url =\n options.url !== undefined\n ? options.url\n : 'https://stamen-tiles-{a-d}.a.ssl.fastly.net/' +\n options.layer +\n '/{z}/{x}/{y}.' +\n layerConfig.extension;\n\n super({\n attributions: ATTRIBUTIONS,\n cacheSize: options.cacheSize,\n crossOrigin: 'anonymous',\n imageSmoothing: options.imageSmoothing,\n maxZoom:\n options.maxZoom != undefined ? options.maxZoom : providerConfig.maxZoom,\n minZoom:\n options.minZoom != undefined ? options.minZoom : providerConfig.minZoom,\n opaque: layerConfig.opaque,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n tileLoadFunction: options.tileLoadFunction,\n transition: options.transition,\n url: url,\n wrapX: options.wrapX,\n });\n }\n}\n\nexport default Stamen;\n","/**\n * @module ol/source/TileArcGISRest\n */\n\nimport TileImage from './TileImage.js';\nimport {appendParams} from '../uri.js';\nimport {assign} from '../obj.js';\nimport {createEmpty} from '../extent.js';\nimport {modulo} from '../math.js';\nimport {scale as scaleSize, toSize} from '../size.js';\nimport {hash as tileCoordHash} from '../tilecoord.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {Object<string,*>} [params] ArcGIS Rest parameters. This field is optional. Service defaults will be\n * used for any fields not specified. `FORMAT` is `PNG32` by default. `F` is `IMAGE` by\n * default. `TRANSPARENT` is `true` by default. `BBOX`, `SIZE`, `BBOXSR`,\n * and `IMAGESR` will be set dynamically. Set `LAYERS` to\n * override the default service layer visibility. See\n * http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Map/02r3000000v7000000/\n * for further reference.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid. Base this on the resolutions,\n * tilesize and extent supported by the server.\n * If this is not defined, a default grid will be used: if there is a projection\n * extent, the grid will be based on that; if not, a grid based on a global\n * extent with origin at 0,0 will be used.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL.\n * The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {string} [url] ArcGIS Rest service URL for a Map Service or Image Service. The\n * url should include /MapServer or /ImageServer.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering. To disable the opacity\n * transition, pass `transition: 0`.\n * @property {Array<string>} [urls] ArcGIS Rest service urls. Use this instead of `url` when the ArcGIS\n * Service supports multiple urls for export requests.\n */\n\n/**\n * @classdesc\n * Layer source for tile data from ArcGIS Rest services. Map and Image\n * Services are supported.\n *\n * For cached ArcGIS services, better performance is available using the\n * {@link module:ol/source/XYZ~XYZ} data source.\n * @api\n */\nclass TileArcGISRest extends TileImage {\n /**\n * @param {Options=} opt_options Tile ArcGIS Rest options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n super({\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n crossOrigin: options.crossOrigin,\n imageSmoothing: options.imageSmoothing,\n projection: options.projection,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n tileGrid: options.tileGrid,\n tileLoadFunction: options.tileLoadFunction,\n url: options.url,\n urls: options.urls,\n wrapX: options.wrapX !== undefined ? options.wrapX : true,\n transition: options.transition,\n });\n\n /**\n * @private\n * @type {!Object}\n */\n this.params_ = options.params || {};\n\n /**\n * @private\n * @type {boolean}\n */\n this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.tmpExtent_ = createEmpty();\n\n this.setKey(this.getKeyForParams_());\n }\n\n /**\n * @private\n * @return {string} The key for the current params.\n */\n getKeyForParams_() {\n let i = 0;\n const res = [];\n for (const key in this.params_) {\n res[i++] = key + '-' + this.params_[key];\n }\n return res.join('/');\n }\n\n /**\n * Get the user-provided params, i.e. those passed to the constructor through\n * the \"params\" option, and possibly updated using the updateParams method.\n * @return {Object} Params.\n * @api\n */\n getParams() {\n return this.params_;\n }\n\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"../size.js\").Size} tileSize Tile size.\n * @param {import(\"../extent.js\").Extent} tileExtent Tile extent.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {Object} params Params.\n * @return {string|undefined} Request URL.\n * @private\n */\n getRequestUrl_(\n tileCoord,\n tileSize,\n tileExtent,\n pixelRatio,\n projection,\n params\n ) {\n const urls = this.urls;\n if (!urls) {\n return undefined;\n }\n\n // ArcGIS Server only wants the numeric portion of the projection ID.\n const srid = projection.getCode().split(':').pop();\n\n params['SIZE'] = tileSize[0] + ',' + tileSize[1];\n params['BBOX'] = tileExtent.join(',');\n params['BBOXSR'] = srid;\n params['IMAGESR'] = srid;\n params['DPI'] = Math.round(\n params['DPI'] ? params['DPI'] * pixelRatio : 90 * pixelRatio\n );\n\n let url;\n if (urls.length == 1) {\n url = urls[0];\n } else {\n const index = modulo(tileCoordHash(tileCoord), urls.length);\n url = urls[index];\n }\n\n const modifiedUrl = url\n .replace(/MapServer\\/?$/, 'MapServer/export')\n .replace(/ImageServer\\/?$/, 'ImageServer/exportImage');\n return appendParams(modifiedUrl, params);\n }\n\n /**\n * Get the tile pixel ratio for this source.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Tile pixel ratio.\n */\n getTilePixelRatio(pixelRatio) {\n return this.hidpi_ ? pixelRatio : 1;\n }\n\n /**\n * Update the user-provided params.\n * @param {Object} params Params.\n * @api\n */\n updateParams(params) {\n assign(this.params_, params);\n this.setKey(this.getKeyForParams_());\n }\n\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord The tile coordinate\n * @param {number} pixelRatio The pixel ratio\n * @param {import(\"../proj/Projection.js\").default} projection The projection\n * @return {string|undefined} The tile URL\n * @override\n */\n tileUrlFunction(tileCoord, pixelRatio, projection) {\n let tileGrid = this.getTileGrid();\n if (!tileGrid) {\n tileGrid = this.getTileGridForProjection(projection);\n }\n\n if (tileGrid.getResolutions().length <= tileCoord[0]) {\n return undefined;\n }\n\n if (pixelRatio != 1 && !this.hidpi_) {\n pixelRatio = 1;\n }\n\n const tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);\n let tileSize = toSize(tileGrid.getTileSize(tileCoord[0]), this.tmpSize);\n\n if (pixelRatio != 1) {\n tileSize = scaleSize(tileSize, pixelRatio, this.tmpSize);\n }\n\n // Apply default params and override with user specified values.\n const baseParams = {\n 'F': 'image',\n 'FORMAT': 'PNG32',\n 'TRANSPARENT': true,\n };\n assign(baseParams, this.params_);\n\n return this.getRequestUrl_(\n tileCoord,\n tileSize,\n tileExtent,\n pixelRatio,\n projection,\n baseParams\n );\n }\n}\n\nexport default TileArcGISRest;\n","/**\n * @module ol/source/TileDebug\n */\n\nimport Tile from '../Tile.js';\nimport TileState from '../TileState.js';\nimport XYZ from './XYZ.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {getKeyZXY} from '../tilecoord.js';\nimport {toSize} from '../size.js';\n\nclass LabeledTile extends Tile {\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"../size.js\").Size} tileSize Tile size.\n * @param {string} text Text.\n */\n constructor(tileCoord, tileSize, text) {\n super(tileCoord, TileState.LOADED);\n\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.tileSize_ = tileSize;\n\n /**\n * @private\n * @type {string}\n */\n this.text_ = text;\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.canvas_ = null;\n }\n\n /**\n * Get the image element for this tile.\n * @return {HTMLCanvasElement} Image.\n */\n getImage() {\n if (this.canvas_) {\n return this.canvas_;\n } else {\n const tileSize = this.tileSize_;\n const context = createCanvasContext2D(tileSize[0], tileSize[1]);\n\n context.strokeStyle = 'grey';\n context.strokeRect(0.5, 0.5, tileSize[0] + 0.5, tileSize[1] + 0.5);\n\n context.fillStyle = 'grey';\n context.strokeStyle = 'white';\n context.textAlign = 'center';\n context.textBaseline = 'middle';\n context.font = '24px sans-serif';\n context.lineWidth = 4;\n context.strokeText(\n this.text_,\n tileSize[0] / 2,\n tileSize[1] / 2,\n tileSize[0]\n );\n context.fillText(\n this.text_,\n tileSize[0] / 2,\n tileSize[1] / 2,\n tileSize[0]\n );\n\n this.canvas_ = context.canvas;\n return context.canvas;\n }\n }\n\n load() {}\n}\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Optional projection.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [zDirection=0] Set to `1` when debugging `VectorTile` sources with\n * a default configuration. Indicates which resolution should be used by a renderer if\n * the view resolution does not match any resolution of the tile source. If 0, the nearest\n * resolution will be used. If 1, the nearest lower resolution will be used. If -1, the\n * nearest higher resolution will be used.\n */\n\n/**\n * @classdesc\n * A pseudo tile source, which does not fetch tiles from a server, but renders\n * a grid outline for the tile grid/projection along with the coordinates for\n * each tile. See examples/canvas-tiles for an example.\n *\n * Uses Canvas context2d, so requires Canvas support.\n * @api\n */\nclass TileDebug extends XYZ {\n /**\n * @param {Options=} opt_options Debug tile options.\n */\n constructor(opt_options) {\n /**\n * @type {Options}\n */\n const options = opt_options || {};\n\n super({\n opaque: false,\n projection: options.projection,\n tileGrid: options.tileGrid,\n wrapX: options.wrapX !== undefined ? options.wrapX : true,\n zDirection: options.zDirection,\n });\n }\n\n /**\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @return {!LabeledTile} Tile.\n */\n getTile(z, x, y) {\n const tileCoordKey = getKeyZXY(z, x, y);\n if (this.tileCache.containsKey(tileCoordKey)) {\n return /** @type {!LabeledTile} */ (this.tileCache.get(tileCoordKey));\n } else {\n const tileSize = toSize(this.tileGrid.getTileSize(z));\n const tileCoord = [z, x, y];\n const textTileCoord = this.getTileCoordForTileUrlFunction(tileCoord);\n let text;\n if (textTileCoord) {\n text =\n 'z:' +\n textTileCoord[0] +\n ' x:' +\n textTileCoord[1] +\n ' y:' +\n textTileCoord[2];\n } else {\n text = 'none';\n }\n const tile = new LabeledTile(tileCoord, tileSize, text);\n this.tileCache.set(tileCoordKey, tile);\n return tile;\n }\n }\n}\n\nexport default TileDebug;\n","/**\n * @module ol/source/TileJSON\n */\n// FIXME check order of async callbacks\n\n/**\n * See https://mapbox.com/developers/api/.\n */\n\nimport SourceState from './State.js';\nimport TileImage from './TileImage.js';\nimport {applyTransform, intersects} from '../extent.js';\nimport {assert} from '../asserts.js';\nimport {createFromTemplates} from '../tileurlfunction.js';\nimport {createXYZ, extentFromProjection} from '../tilegrid.js';\nimport {get as getProjection, getTransformFromProjections} from '../proj.js';\nimport {jsonp as requestJSONP} from '../net.js';\n\n/**\n * @typedef {Object} Config\n * @property {string} [name] The name.\n * @property {string} [description] The description.\n * @property {string} [version] The version.\n * @property {string} [attribution] The attribution.\n * @property {string} [template] The template.\n * @property {string} [legend] The legend.\n * @property {string} [scheme] The scheme.\n * @property {Array<string>} tiles The tile URL templates.\n * @property {Array<string>} [grids] Optional grids.\n * @property {number} [minzoom] Minimum zoom level.\n * @property {number} [maxzoom] Maximum zoom level.\n * @property {Array<number>} [bounds] Optional bounds.\n * @property {Array<number>} [center] Optional center.\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {boolean} [jsonp=false] Use JSONP with callback to load the TileJSON.\n * Useful when the server does not support CORS..\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {Config} [tileJSON] TileJSON configuration for this source.\n * If not provided, `url` must be configured.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {number|import(\"../size.js\").Size} [tileSize=[256, 256]] The tile size used by the tile service.\n * Note: `tileSize` and other non-standard TileJSON properties are currently ignored.\n * @property {string} [url] URL to the TileJSON file. If not provided, `tileJSON` must be configured.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n */\n\n/**\n * @classdesc\n * Layer source for tile data in TileJSON format.\n * @api\n */\nclass TileJSON extends TileImage {\n /**\n * @param {Options} options TileJSON options.\n */\n constructor(options) {\n super({\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n crossOrigin: options.crossOrigin,\n imageSmoothing: options.imageSmoothing,\n projection: getProjection('EPSG:3857'),\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n state: SourceState.LOADING,\n tileLoadFunction: options.tileLoadFunction,\n wrapX: options.wrapX !== undefined ? options.wrapX : true,\n transition: options.transition,\n });\n\n /**\n * @type {Config}\n * @private\n */\n this.tileJSON_ = null;\n\n /**\n * @type {number|import(\"../size.js\").Size}\n * @private\n */\n this.tileSize_ = options.tileSize;\n\n if (options.url) {\n if (options.jsonp) {\n requestJSONP(\n options.url,\n this.handleTileJSONResponse.bind(this),\n this.handleTileJSONError.bind(this)\n );\n } else {\n const client = new XMLHttpRequest();\n client.addEventListener('load', this.onXHRLoad_.bind(this));\n client.addEventListener('error', this.onXHRError_.bind(this));\n client.open('GET', options.url);\n client.send();\n }\n } else if (options.tileJSON) {\n this.handleTileJSONResponse(options.tileJSON);\n } else {\n assert(false, 51); // Either `url` or `tileJSON` options must be provided\n }\n }\n\n /**\n * @private\n * @param {Event} event The load event.\n */\n onXHRLoad_(event) {\n const client = /** @type {XMLHttpRequest} */ (event.target);\n // status will be 0 for file:// urls\n if (!client.status || (client.status >= 200 && client.status < 300)) {\n let response;\n try {\n response = /** @type {TileJSON} */ (JSON.parse(client.responseText));\n } catch (err) {\n this.handleTileJSONError();\n return;\n }\n this.handleTileJSONResponse(response);\n } else {\n this.handleTileJSONError();\n }\n }\n\n /**\n * @private\n * @param {Event} event The error event.\n */\n onXHRError_(event) {\n this.handleTileJSONError();\n }\n\n /**\n * @return {Config} The tilejson object.\n * @api\n */\n getTileJSON() {\n return this.tileJSON_;\n }\n\n /**\n * @protected\n * @param {Config} tileJSON Tile JSON.\n */\n handleTileJSONResponse(tileJSON) {\n const epsg4326Projection = getProjection('EPSG:4326');\n\n const sourceProjection = this.getProjection();\n let extent;\n if (tileJSON['bounds'] !== undefined) {\n const transform = getTransformFromProjections(\n epsg4326Projection,\n sourceProjection\n );\n extent = applyTransform(tileJSON['bounds'], transform);\n }\n\n const minZoom = tileJSON['minzoom'] || 0;\n const maxZoom = tileJSON['maxzoom'] || 22;\n const tileGrid = createXYZ({\n extent: extentFromProjection(sourceProjection),\n maxZoom: maxZoom,\n minZoom: minZoom,\n tileSize: this.tileSize_,\n });\n this.tileGrid = tileGrid;\n\n this.tileUrlFunction = createFromTemplates(tileJSON['tiles'], tileGrid);\n\n if (tileJSON['attribution'] !== undefined && !this.getAttributions()) {\n const attributionExtent =\n extent !== undefined ? extent : epsg4326Projection.getExtent();\n\n this.setAttributions(function (frameState) {\n if (intersects(attributionExtent, frameState.extent)) {\n return [tileJSON['attribution']];\n }\n return null;\n });\n }\n this.tileJSON_ = tileJSON;\n this.setState(SourceState.READY);\n }\n\n /**\n * @protected\n */\n handleTileJSONError() {\n this.setState(SourceState.ERROR);\n }\n}\n\nexport default TileJSON;\n","/**\n * @module ol/source/TileWMS\n */\n\nimport {DEFAULT_WMS_VERSION} from './common.js';\n\nimport TileImage from './TileImage.js';\nimport WMSServerType from './WMSServerType.js';\nimport {appendParams} from '../uri.js';\nimport {assert} from '../asserts.js';\nimport {assign} from '../obj.js';\nimport {buffer, createEmpty} from '../extent.js';\nimport {buffer as bufferSize, scale as scaleSize, toSize} from '../size.js';\nimport {calculateSourceResolution} from '../reproj.js';\nimport {compareVersions} from '../string.js';\nimport {get as getProjection, transform, transformExtent} from '../proj.js';\nimport {modulo} from '../math.js';\nimport {hash as tileCoordHash} from '../tilecoord.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {Object<string,*>} params WMS request parameters.\n * At least a `LAYERS` param is required. `STYLES` is\n * `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`\n * and `CRS` (`SRS` for WMS version < 1.3.0) will be set dynamically.\n * @property {number} [gutter=0]\n * The size in pixels of the gutter around image tiles to ignore. By setting\n * this property to a non-zero value, images will be requested that are wider\n * and taller than the tile size by a value of `2 x gutter`.\n * Using a non-zero value allows artifacts of rendering at tile edges to be\n * ignored. If you control the WMS service it is recommended to address\n * \"artifacts at tile edges\" issues by properly configuring the WMS service. For\n * example, MapServer has a `tile_map_edge_buffer` configuration parameter for\n * this. See http://mapserver.org/output/tile_mode.html.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {typeof import(\"../ImageTile.js\").default} [tileClass] Class used to instantiate image tiles.\n * Default is {@link module:ol/ImageTile~ImageTile}.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid. Base this on the resolutions,\n * tilesize and extent supported by the server.\n * If this is not defined, a default grid will be used: if there is a projection\n * extent, the grid will be based on that; if not, a grid based on a global\n * extent with origin at 0,0 will be used..\n * @property {import(\"./WMSServerType.js\").default|string} [serverType]\n * The type of the remote WMS server. Currently only used when `hidpi` is\n * `true`.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {string} [url] WMS service URL.\n * @property {Array<string>} [urls] WMS service urls.\n * Use this instead of `url` when the WMS supports multiple urls for GetMap requests.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * When set to `false`, only one world\n * will be rendered. When `true`, tiles will be requested for one world only,\n * but they will be wrapped horizontally to render multiple worlds.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n */\n\n/**\n * @classdesc\n * Layer source for tile data from WMS servers.\n * @api\n */\nclass TileWMS extends TileImage {\n /**\n * @param {Options=} [opt_options] Tile WMS options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : /** @type {Options} */ ({});\n\n const params = options.params || {};\n\n const transparent = 'TRANSPARENT' in params ? params['TRANSPARENT'] : true;\n\n super({\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n crossOrigin: options.crossOrigin,\n imageSmoothing: options.imageSmoothing,\n opaque: !transparent,\n projection: options.projection,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n tileClass: options.tileClass,\n tileGrid: options.tileGrid,\n tileLoadFunction: options.tileLoadFunction,\n url: options.url,\n urls: options.urls,\n wrapX: options.wrapX !== undefined ? options.wrapX : true,\n transition: options.transition,\n });\n\n /**\n * @private\n * @type {number}\n */\n this.gutter_ = options.gutter !== undefined ? options.gutter : 0;\n\n /**\n * @private\n * @type {!Object}\n */\n this.params_ = params;\n\n /**\n * @private\n * @type {boolean}\n */\n this.v13_ = true;\n\n /**\n * @private\n * @type {import(\"./WMSServerType.js\").default|undefined}\n */\n this.serverType_ = /** @type {import(\"./WMSServerType.js\").default|undefined} */ (options.serverType);\n\n /**\n * @private\n * @type {boolean}\n */\n this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.tmpExtent_ = createEmpty();\n\n this.updateV13_();\n this.setKey(this.getKeyForParams_());\n }\n\n /**\n * Return the GetFeatureInfo URL for the passed coordinate, resolution, and\n * projection. Return `undefined` if the GetFeatureInfo URL cannot be\n * constructed.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} resolution Resolution.\n * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n * @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should\n * be provided. If `QUERY_LAYERS` is not provided then the layers specified\n * in the `LAYERS` parameter will be used. `VERSION` should not be\n * specified here.\n * @return {string|undefined} GetFeatureInfo URL.\n * @api\n */\n getFeatureInfoUrl(coordinate, resolution, projection, params) {\n const projectionObj = getProjection(projection);\n const sourceProjectionObj = this.getProjection();\n\n let tileGrid = this.getTileGrid();\n if (!tileGrid) {\n tileGrid = this.getTileGridForProjection(projectionObj);\n }\n\n const z = tileGrid.getZForResolution(resolution, this.zDirection);\n const tileCoord = tileGrid.getTileCoordForCoordAndZ(coordinate, z);\n\n if (tileGrid.getResolutions().length <= tileCoord[0]) {\n return undefined;\n }\n\n let tileResolution = tileGrid.getResolution(tileCoord[0]);\n let tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);\n let tileSize = toSize(tileGrid.getTileSize(tileCoord[0]), this.tmpSize);\n\n const gutter = this.gutter_;\n if (gutter !== 0) {\n tileSize = bufferSize(tileSize, gutter, this.tmpSize);\n tileExtent = buffer(tileExtent, tileResolution * gutter, tileExtent);\n }\n\n if (sourceProjectionObj && sourceProjectionObj !== projectionObj) {\n tileResolution = calculateSourceResolution(\n sourceProjectionObj,\n projectionObj,\n coordinate,\n tileResolution\n );\n tileExtent = transformExtent(\n tileExtent,\n projectionObj,\n sourceProjectionObj\n );\n coordinate = transform(coordinate, projectionObj, sourceProjectionObj);\n }\n\n const baseParams = {\n 'SERVICE': 'WMS',\n 'VERSION': DEFAULT_WMS_VERSION,\n 'REQUEST': 'GetFeatureInfo',\n 'FORMAT': 'image/png',\n 'TRANSPARENT': true,\n 'QUERY_LAYERS': this.params_['LAYERS'],\n };\n assign(baseParams, this.params_, params);\n\n const x = Math.floor((coordinate[0] - tileExtent[0]) / tileResolution);\n const y = Math.floor((tileExtent[3] - coordinate[1]) / tileResolution);\n\n baseParams[this.v13_ ? 'I' : 'X'] = x;\n baseParams[this.v13_ ? 'J' : 'Y'] = y;\n\n return this.getRequestUrl_(\n tileCoord,\n tileSize,\n tileExtent,\n 1,\n sourceProjectionObj || projectionObj,\n baseParams\n );\n }\n\n /**\n * Return the GetLegendGraphic URL, optionally optimized for the passed\n * resolution and possibly including any passed specific parameters. Returns\n * `undefined` if the GetLegendGraphic URL cannot be constructed.\n *\n * @param {number} [resolution] Resolution. If set to undefined, `SCALE`\n * will not be calculated and included in URL.\n * @param {Object} [params] GetLegendGraphic params. If `LAYER` is set, the\n * request is generated for this wms layer, else it will try to use the\n * configured wms layer. Default `FORMAT` is `image/png`.\n * `VERSION` should not be specified here.\n * @return {string|undefined} GetLegendGraphic URL.\n * @api\n */\n getLegendUrl(resolution, params) {\n if (this.urls[0] === undefined) {\n return undefined;\n }\n\n const baseParams = {\n 'SERVICE': 'WMS',\n 'VERSION': DEFAULT_WMS_VERSION,\n 'REQUEST': 'GetLegendGraphic',\n 'FORMAT': 'image/png',\n };\n\n if (params === undefined || params['LAYER'] === undefined) {\n const layers = this.params_.LAYERS;\n const isSingleLayer = !Array.isArray(layers) || layers.length === 1;\n if (!isSingleLayer) {\n return undefined;\n }\n baseParams['LAYER'] = layers;\n }\n\n if (resolution !== undefined) {\n const mpu = this.getProjection()\n ? this.getProjection().getMetersPerUnit()\n : 1;\n const pixelSize = 0.00028;\n baseParams['SCALE'] = (resolution * mpu) / pixelSize;\n }\n\n assign(baseParams, params);\n\n return appendParams(/** @type {string} */ (this.urls[0]), baseParams);\n }\n\n /**\n * @return {number} Gutter.\n */\n getGutter() {\n return this.gutter_;\n }\n\n /**\n * Get the user-provided params, i.e. those passed to the constructor through\n * the \"params\" option, and possibly updated using the updateParams method.\n * @return {Object} Params.\n * @api\n */\n getParams() {\n return this.params_;\n }\n\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"../size.js\").Size} tileSize Tile size.\n * @param {import(\"../extent.js\").Extent} tileExtent Tile extent.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {Object} params Params.\n * @return {string|undefined} Request URL.\n * @private\n */\n getRequestUrl_(\n tileCoord,\n tileSize,\n tileExtent,\n pixelRatio,\n projection,\n params\n ) {\n const urls = this.urls;\n if (!urls) {\n return undefined;\n }\n\n params['WIDTH'] = tileSize[0];\n params['HEIGHT'] = tileSize[1];\n\n params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode();\n\n if (!('STYLES' in this.params_)) {\n params['STYLES'] = '';\n }\n\n if (pixelRatio != 1) {\n switch (this.serverType_) {\n case WMSServerType.GEOSERVER:\n const dpi = (90 * pixelRatio + 0.5) | 0;\n if ('FORMAT_OPTIONS' in params) {\n params['FORMAT_OPTIONS'] += ';dpi:' + dpi;\n } else {\n params['FORMAT_OPTIONS'] = 'dpi:' + dpi;\n }\n break;\n case WMSServerType.MAPSERVER:\n params['MAP_RESOLUTION'] = 90 * pixelRatio;\n break;\n case WMSServerType.CARMENTA_SERVER:\n case WMSServerType.QGIS:\n params['DPI'] = 90 * pixelRatio;\n break;\n default:\n assert(false, 52); // Unknown `serverType` configured\n break;\n }\n }\n\n const axisOrientation = projection.getAxisOrientation();\n const bbox = tileExtent;\n if (this.v13_ && axisOrientation.substr(0, 2) == 'ne') {\n let tmp;\n tmp = tileExtent[0];\n bbox[0] = tileExtent[1];\n bbox[1] = tmp;\n tmp = tileExtent[2];\n bbox[2] = tileExtent[3];\n bbox[3] = tmp;\n }\n params['BBOX'] = bbox.join(',');\n\n let url;\n if (urls.length == 1) {\n url = urls[0];\n } else {\n const index = modulo(tileCoordHash(tileCoord), urls.length);\n url = urls[index];\n }\n return appendParams(url, params);\n }\n\n /**\n * Get the tile pixel ratio for this source.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Tile pixel ratio.\n */\n getTilePixelRatio(pixelRatio) {\n return !this.hidpi_ || this.serverType_ === undefined ? 1 : pixelRatio;\n }\n\n /**\n * @private\n * @return {string} The key for the current params.\n */\n getKeyForParams_() {\n let i = 0;\n const res = [];\n for (const key in this.params_) {\n res[i++] = key + '-' + this.params_[key];\n }\n return res.join('/');\n }\n\n /**\n * Update the user-provided params.\n * @param {Object} params Params.\n * @api\n */\n updateParams(params) {\n assign(this.params_, params);\n this.updateV13_();\n this.setKey(this.getKeyForParams_());\n }\n\n /**\n * @private\n */\n updateV13_() {\n const version = this.params_['VERSION'] || DEFAULT_WMS_VERSION;\n this.v13_ = compareVersions(version, '1.3') >= 0;\n }\n\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord The tile coordinate\n * @param {number} pixelRatio The pixel ratio\n * @param {import(\"../proj/Projection.js\").default} projection The projection\n * @return {string|undefined} The tile URL\n * @override\n */\n tileUrlFunction(tileCoord, pixelRatio, projection) {\n let tileGrid = this.getTileGrid();\n if (!tileGrid) {\n tileGrid = this.getTileGridForProjection(projection);\n }\n\n if (tileGrid.getResolutions().length <= tileCoord[0]) {\n return undefined;\n }\n\n if (pixelRatio != 1 && (!this.hidpi_ || this.serverType_ === undefined)) {\n pixelRatio = 1;\n }\n\n const tileResolution = tileGrid.getResolution(tileCoord[0]);\n let tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);\n let tileSize = toSize(tileGrid.getTileSize(tileCoord[0]), this.tmpSize);\n\n const gutter = this.gutter_;\n if (gutter !== 0) {\n tileSize = bufferSize(tileSize, gutter, this.tmpSize);\n tileExtent = buffer(tileExtent, tileResolution * gutter, tileExtent);\n }\n\n if (pixelRatio != 1) {\n tileSize = scaleSize(tileSize, pixelRatio, this.tmpSize);\n }\n\n const baseParams = {\n 'SERVICE': 'WMS',\n 'VERSION': DEFAULT_WMS_VERSION,\n 'REQUEST': 'GetMap',\n 'FORMAT': 'image/png',\n 'TRANSPARENT': true,\n };\n assign(baseParams, this.params_);\n\n return this.getRequestUrl_(\n tileCoord,\n tileSize,\n tileExtent,\n pixelRatio,\n projection,\n baseParams\n );\n }\n}\n\nexport default TileWMS;\n","/**\n * @module ol/source/UTFGrid\n */\n\nimport EventType from '../events/EventType.js';\nimport SourceState from './State.js';\nimport Tile from '../Tile.js';\nimport TileSource from './Tile.js';\nimport TileState from '../TileState.js';\nimport {applyTransform, intersects} from '../extent.js';\nimport {assert} from '../asserts.js';\nimport {createFromTemplates, nullTileUrlFunction} from '../tileurlfunction.js';\nimport {createXYZ, extentFromProjection} from '../tilegrid.js';\nimport {getKeyZXY} from '../tilecoord.js';\nimport {get as getProjection, getTransformFromProjections} from '../proj.js';\nimport {listenOnce} from '../events.js';\nimport {jsonp as requestJSONP} from '../net.js';\n\n/**\n * @typedef {Object} UTFGridJSON\n * @property {Array<string>} grid The grid.\n * @property {Array<string>} keys The keys.\n * @property {Object<string, Object>} [data] Optional data.\n */\n\nexport class CustomTile extends Tile {\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"../TileState.js\").default} state State.\n * @param {string} src Image source URI.\n * @param {import(\"../extent.js\").Extent} extent Extent of the tile.\n * @param {boolean} preemptive Load the tile when visible (before it's needed).\n * @param {boolean} jsonp Load the tile as a script.\n */\n constructor(tileCoord, state, src, extent, preemptive, jsonp) {\n super(tileCoord, state);\n\n /**\n * @private\n * @type {string}\n */\n this.src_ = src;\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.extent_ = extent;\n\n /**\n * @private\n * @type {boolean}\n */\n this.preemptive_ = preemptive;\n\n /**\n * @private\n * @type {Array<string>}\n */\n this.grid_ = null;\n\n /**\n * @private\n * @type {Array<string>}\n */\n this.keys_ = null;\n\n /**\n * @private\n * @type {Object<string, Object>|undefined}\n */\n this.data_ = null;\n\n /**\n * @private\n * @type {boolean}\n */\n this.jsonp_ = jsonp;\n }\n\n /**\n * Get the image element for this tile.\n * @return {HTMLImageElement} Image.\n */\n getImage() {\n return null;\n }\n\n /**\n * Synchronously returns data at given coordinate (if available).\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {*} The data.\n */\n getData(coordinate) {\n if (!this.grid_ || !this.keys_) {\n return null;\n }\n const xRelative =\n (coordinate[0] - this.extent_[0]) / (this.extent_[2] - this.extent_[0]);\n const yRelative =\n (coordinate[1] - this.extent_[1]) / (this.extent_[3] - this.extent_[1]);\n\n const row = this.grid_[Math.floor((1 - yRelative) * this.grid_.length)];\n\n if (typeof row !== 'string') {\n return null;\n }\n\n let code = row.charCodeAt(Math.floor(xRelative * row.length));\n if (code >= 93) {\n code--;\n }\n if (code >= 35) {\n code--;\n }\n code -= 32;\n\n let data = null;\n if (code in this.keys_) {\n const id = this.keys_[code];\n if (this.data_ && id in this.data_) {\n data = this.data_[id];\n } else {\n data = id;\n }\n }\n return data;\n }\n\n /**\n * Calls the callback (synchronously by default) with the available data\n * for given coordinate (or `null` if not yet loaded).\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {function(*): void} callback Callback.\n * @param {boolean=} opt_request If `true` the callback is always async.\n * The tile data is requested if not yet loaded.\n */\n forDataAtCoordinate(coordinate, callback, opt_request) {\n if (this.state == TileState.EMPTY && opt_request === true) {\n this.state = TileState.IDLE;\n listenOnce(\n this,\n EventType.CHANGE,\n function (e) {\n callback(this.getData(coordinate));\n },\n this\n );\n this.loadInternal_();\n } else {\n if (opt_request === true) {\n setTimeout(\n function () {\n callback(this.getData(coordinate));\n }.bind(this),\n 0\n );\n } else {\n callback(this.getData(coordinate));\n }\n }\n }\n\n /**\n * Return the key to be used for all tiles in the source.\n * @return {string} The key for all tiles.\n */\n getKey() {\n return this.src_;\n }\n\n /**\n * @private\n */\n handleError_() {\n this.state = TileState.ERROR;\n this.changed();\n }\n\n /**\n * @param {!UTFGridJSON} json UTFGrid data.\n * @private\n */\n handleLoad_(json) {\n this.grid_ = json['grid'];\n this.keys_ = json['keys'];\n this.data_ = json['data'];\n\n this.state = TileState.LOADED;\n this.changed();\n }\n\n /**\n * @private\n */\n loadInternal_() {\n if (this.state == TileState.IDLE) {\n this.state = TileState.LOADING;\n if (this.jsonp_) {\n requestJSONP(\n this.src_,\n this.handleLoad_.bind(this),\n this.handleError_.bind(this)\n );\n } else {\n const client = new XMLHttpRequest();\n client.addEventListener('load', this.onXHRLoad_.bind(this));\n client.addEventListener('error', this.onXHRError_.bind(this));\n client.open('GET', this.src_);\n client.send();\n }\n }\n }\n\n /**\n * @private\n * @param {Event} event The load event.\n */\n onXHRLoad_(event) {\n const client = /** @type {XMLHttpRequest} */ (event.target);\n // status will be 0 for file:// urls\n if (!client.status || (client.status >= 200 && client.status < 300)) {\n let response;\n try {\n response = /** @type {!UTFGridJSON} */ (JSON.parse(\n client.responseText\n ));\n } catch (err) {\n this.handleError_();\n return;\n }\n this.handleLoad_(response);\n } else {\n this.handleError_();\n }\n }\n\n /**\n * @private\n * @param {Event} event The error event.\n */\n onXHRError_(event) {\n this.handleError_();\n }\n\n /**\n */\n load() {\n if (this.preemptive_) {\n this.loadInternal_();\n } else {\n this.setState(TileState.EMPTY);\n }\n }\n}\n\n/**\n * @typedef {Object} Options\n * @property {boolean} [preemptive=true]\n * If `true` the UTFGrid source loads the tiles based on their \"visibility\".\n * This improves the speed of response, but increases traffic.\n * Note that if set to `false` (lazy loading), you need to pass `true` as\n * `opt_request` to the `forDataAtCoordinateAndResolution` method otherwise no\n * data will ever be loaded.\n * @property {boolean} [jsonp=false] Use JSONP with callback to load the TileJSON.\n * Useful when the server does not support CORS..\n * @property {import(\"./TileJSON.js\").Config} [tileJSON] TileJSON configuration for this source.\n * If not provided, `url` must be configured.\n * @property {string} [url] TileJSON endpoint that provides the configuration for this source.\n * Request will be made through JSONP. If not provided, `tileJSON` must be configured.\n */\n\n/**\n * @classdesc\n * Layer source for UTFGrid interaction data loaded from TileJSON format.\n * @api\n */\nclass UTFGrid extends TileSource {\n /**\n * @param {Options} options Source options.\n */\n constructor(options) {\n super({\n projection: getProjection('EPSG:3857'),\n state: SourceState.LOADING,\n });\n\n /**\n * @private\n * @type {boolean}\n */\n this.preemptive_ =\n options.preemptive !== undefined ? options.preemptive : true;\n\n /**\n * @private\n * @type {!import(\"../Tile.js\").UrlFunction}\n */\n this.tileUrlFunction_ = nullTileUrlFunction;\n\n /**\n * @private\n * @type {string|undefined}\n */\n this.template_ = undefined;\n\n /**\n * @private\n * @type {boolean}\n */\n this.jsonp_ = options.jsonp || false;\n\n if (options.url) {\n if (this.jsonp_) {\n requestJSONP(\n options.url,\n this.handleTileJSONResponse.bind(this),\n this.handleTileJSONError.bind(this)\n );\n } else {\n const client = new XMLHttpRequest();\n client.addEventListener('load', this.onXHRLoad_.bind(this));\n client.addEventListener('error', this.onXHRError_.bind(this));\n client.open('GET', options.url);\n client.send();\n }\n } else if (options.tileJSON) {\n this.handleTileJSONResponse(options.tileJSON);\n } else {\n assert(false, 51); // Either `url` or `tileJSON` options must be provided\n }\n }\n\n /**\n * @private\n * @param {Event} event The load event.\n */\n onXHRLoad_(event) {\n const client = /** @type {XMLHttpRequest} */ (event.target);\n // status will be 0 for file:// urls\n if (!client.status || (client.status >= 200 && client.status < 300)) {\n let response;\n try {\n response = /** @type {import(\"./TileJSON.js\").Config} */ (JSON.parse(\n client.responseText\n ));\n } catch (err) {\n this.handleTileJSONError();\n return;\n }\n this.handleTileJSONResponse(response);\n } else {\n this.handleTileJSONError();\n }\n }\n\n /**\n * @private\n * @param {Event} event The error event.\n */\n onXHRError_(event) {\n this.handleTileJSONError();\n }\n\n /**\n * Return the template from TileJSON.\n * @return {string|undefined} The template from TileJSON.\n * @api\n */\n getTemplate() {\n return this.template_;\n }\n\n /**\n * Calls the callback (synchronously by default) with the available data\n * for given coordinate and resolution (or `null` if not yet loaded or\n * in case of an error).\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} resolution Resolution.\n * @param {function(*): void} callback Callback.\n * @param {boolean=} opt_request If `true` the callback is always async.\n * The tile data is requested if not yet loaded.\n * @api\n */\n forDataAtCoordinateAndResolution(\n coordinate,\n resolution,\n callback,\n opt_request\n ) {\n if (this.tileGrid) {\n const z = this.tileGrid.getZForResolution(resolution, this.zDirection);\n const tileCoord = this.tileGrid.getTileCoordForCoordAndZ(coordinate, z);\n const tile = /** @type {!CustomTile} */ (this.getTile(\n tileCoord[0],\n tileCoord[1],\n tileCoord[2],\n 1,\n this.getProjection()\n ));\n tile.forDataAtCoordinate(coordinate, callback, opt_request);\n } else {\n if (opt_request === true) {\n setTimeout(function () {\n callback(null);\n }, 0);\n } else {\n callback(null);\n }\n }\n }\n\n /**\n * @protected\n */\n handleTileJSONError() {\n this.setState(SourceState.ERROR);\n }\n\n /**\n * TODO: very similar to ol/source/TileJSON#handleTileJSONResponse\n * @protected\n * @param {import(\"./TileJSON.js\").Config} tileJSON Tile JSON.\n */\n handleTileJSONResponse(tileJSON) {\n const epsg4326Projection = getProjection('EPSG:4326');\n\n const sourceProjection = this.getProjection();\n let extent;\n if (tileJSON['bounds'] !== undefined) {\n const transform = getTransformFromProjections(\n epsg4326Projection,\n sourceProjection\n );\n extent = applyTransform(tileJSON['bounds'], transform);\n }\n\n const minZoom = tileJSON['minzoom'] || 0;\n const maxZoom = tileJSON['maxzoom'] || 22;\n const tileGrid = createXYZ({\n extent: extentFromProjection(sourceProjection),\n maxZoom: maxZoom,\n minZoom: minZoom,\n });\n this.tileGrid = tileGrid;\n\n this.template_ = tileJSON['template'];\n\n const grids = tileJSON['grids'];\n if (!grids) {\n this.setState(SourceState.ERROR);\n return;\n }\n\n this.tileUrlFunction_ = createFromTemplates(grids, tileGrid);\n\n if (tileJSON['attribution'] !== undefined) {\n const attributionExtent =\n extent !== undefined ? extent : epsg4326Projection.getExtent();\n\n this.setAttributions(function (frameState) {\n if (intersects(attributionExtent, frameState.extent)) {\n return [tileJSON['attribution']];\n }\n return null;\n });\n }\n\n this.setState(SourceState.READY);\n }\n\n /**\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {!CustomTile} Tile.\n */\n getTile(z, x, y, pixelRatio, projection) {\n const tileCoordKey = getKeyZXY(z, x, y);\n if (this.tileCache.containsKey(tileCoordKey)) {\n return this.tileCache.get(tileCoordKey);\n } else {\n const tileCoord = [z, x, y];\n const urlTileCoord = this.getTileCoordForTileUrlFunction(\n tileCoord,\n projection\n );\n const tileUrl = this.tileUrlFunction_(\n urlTileCoord,\n pixelRatio,\n projection\n );\n const tile = new CustomTile(\n tileCoord,\n tileUrl !== undefined ? TileState.IDLE : TileState.EMPTY,\n tileUrl !== undefined ? tileUrl : '',\n this.tileGrid.getTileCoordExtent(tileCoord),\n this.preemptive_,\n this.jsonp_\n );\n this.tileCache.set(tileCoordKey, tile);\n return tile;\n }\n }\n\n /**\n * Marks a tile coord as being used, without triggering a load.\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n */\n useTile(z, x, y) {\n const tileCoordKey = getKeyZXY(z, x, y);\n if (this.tileCache.containsKey(tileCoordKey)) {\n this.tileCache.get(tileCoordKey);\n }\n }\n}\n\nexport default UTFGrid;\n","/**\n * @module ol/source/VectorTile\n */\n\nimport EventType from '../events/EventType.js';\nimport Tile from '../VectorTile.js';\nimport TileCache from '../TileCache.js';\nimport TileState from '../TileState.js';\nimport UrlTile from './UrlTile.js';\nimport VectorRenderTile from '../VectorRenderTile.js';\nimport {\n buffer as bufferExtent,\n getIntersection,\n intersects,\n} from '../extent.js';\nimport {\n createForProjection,\n createXYZ,\n extentFromProjection,\n} from '../tilegrid.js';\nimport {equals} from '../array.js';\nimport {fromKey, getKeyZXY} from '../tilecoord.js';\nimport {loadFeaturesXhr} from '../featureloader.js';\nimport {toSize} from '../size.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least twice the number of tiles in the viewport.\n * @property {import(\"../extent.js\").Extent} [extent]\n * @property {import(\"../format/Feature.js\").default} [format] Feature format for tiles. Used and required by the default.\n * @property {boolean} [overlaps=true] This source may have overlapping geometries. Setting this\n * to `false` (e.g. for sources with polygons that represent administrative\n * boundaries or TopoJSON sources) allows the renderer to optimise fill and\n * stroke operations.\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Projection of the tile grid.\n * @property {import(\"./State.js\").default} [state] Source state.\n * @property {typeof import(\"../VectorTile.js\").default} [tileClass] Class used to instantiate image tiles.\n * Default is {@link module:ol/VectorTile}.\n * @property {number} [maxZoom=22] Optional max zoom level. Not used if `tileGrid` is provided.\n * @property {number} [minZoom] Optional min zoom level. Not used if `tileGrid` is provided.\n * @property {number|import(\"../size.js\").Size} [tileSize=512] Optional tile size. Not used if `tileGrid` is provided.\n * @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction]\n * Optional function to load a tile given a URL. Could look like this for pbf tiles:\n * ```js\n * function(tile, url) {\n * tile.setLoader(function(extent, resolution, projection) {\n * fetch(url).then(function(response) {\n * response.arrayBuffer().then(function(data) {\n * const format = tile.getFormat() // ol/format/MVT configured as source format\n * const features = format.readFeatures(data, {\n * extent: extent,\n * featureProjection: projection\n * });\n * tile.setFeatures(features);\n * });\n * });\n * });\n * }\n * ```\n * If you do not need extent, resolution and projection to get the features for a tile (e.g.\n * for GeoJSON tiles), your `tileLoadFunction` does not need a `setLoader()` call. Only make sure\n * to call `setFeatures()` on the tile:\n * ```js\n * const format = new GeoJSON({featureProjection: map.getView().getProjection()});\n * async function tileLoadFunction(tile, url) {\n * const response = await fetch(url);\n * const data = await response.json();\n * tile.setFeatures(format.readFeatures(data));\n * }\n * ```\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be\n * used instead of defining each one separately in the `urls` option.\n * @property {number} [transition] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @property {Array<string>} [urls] An array of URL templates.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * When set to `false`, only one world\n * will be rendered. When set to `true`, tiles will be wrapped horizontally to\n * render multiple worlds.\n * @property {number} [zDirection=1] Indicate which resolution should be used\n * by a renderer if the view resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n */\n\n/**\n * @classdesc\n * Class for layer sources providing vector data divided into a tile grid, to be\n * used with {@link module:ol/layer/VectorTile~VectorTile}. Although this source receives tiles\n * with vector features from the server, it is not meant for feature editing.\n * Features are optimized for rendering, their geometries are clipped at or near\n * tile boundaries and simplified for a view resolution. See\n * {@link module:ol/source/Vector} for vector sources that are suitable for feature\n * editing.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n * @api\n */\nclass VectorTile extends UrlTile {\n /**\n * @param {!Options} options Vector tile options.\n */\n constructor(options) {\n const projection = options.projection || 'EPSG:3857';\n\n const extent = options.extent || extentFromProjection(projection);\n\n const tileGrid =\n options.tileGrid ||\n createXYZ({\n extent: extent,\n maxResolution: options.maxResolution,\n maxZoom: options.maxZoom !== undefined ? options.maxZoom : 22,\n minZoom: options.minZoom,\n tileSize: options.tileSize || 512,\n });\n\n super({\n attributions: options.attributions,\n attributionsCollapsible: options.attributionsCollapsible,\n cacheSize: options.cacheSize,\n opaque: false,\n projection: projection,\n state: options.state,\n tileGrid: tileGrid,\n tileLoadFunction: options.tileLoadFunction\n ? options.tileLoadFunction\n : defaultLoadFunction,\n tileUrlFunction: options.tileUrlFunction,\n url: options.url,\n urls: options.urls,\n wrapX: options.wrapX === undefined ? true : options.wrapX,\n transition: options.transition,\n zDirection: options.zDirection === undefined ? 1 : options.zDirection,\n });\n\n /**\n * @private\n * @type {import(\"../format/Feature.js\").default}\n */\n this.format_ = options.format ? options.format : null;\n\n /**\n * @type {Object<string, import(\"./VectorTile\").default>}\n */\n this.loadingTiles_ = {};\n\n /**\n * @private\n * @type {TileCache}\n */\n this.sourceTileCache = new TileCache(this.tileCache.highWaterMark);\n\n /**\n * @private\n * @type {boolean}\n */\n this.overlaps_ = options.overlaps == undefined ? true : options.overlaps;\n\n /**\n * @protected\n * @type {typeof import(\"../VectorTile.js\").default}\n */\n this.tileClass = options.tileClass ? options.tileClass : Tile;\n\n /**\n * @private\n * @type {Object<string, import(\"../tilegrid/TileGrid.js\").default>}\n */\n this.tileGrids_ = {};\n }\n\n /**\n * Get features whose bounding box intersects the provided extent. Only features for cached\n * tiles for the last rendered zoom level are available in the source. So this method is only\n * suitable for requesting tiles for extents that are currently rendered.\n *\n * Features are returned in random tile order and as they are included in the tiles. This means\n * they can be clipped, duplicated across tiles, and simplified to the render resolution.\n *\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {Array<import(\"../Feature.js\").FeatureLike>} Features.\n * @api\n */\n getFeaturesInExtent(extent) {\n const features = [];\n const tileCache = this.tileCache;\n if (tileCache.getCount() === 0) {\n return features;\n }\n const z = fromKey(tileCache.peekFirstKey())[0];\n const tileGrid = this.tileGrid;\n tileCache.forEach(function (tile) {\n if (tile.tileCoord[0] !== z || tile.getState() !== TileState.LOADED) {\n return;\n }\n const sourceTiles = tile.getSourceTiles();\n for (let i = 0, ii = sourceTiles.length; i < ii; ++i) {\n const sourceTile = sourceTiles[i];\n const tileCoord = sourceTile.tileCoord;\n if (intersects(extent, tileGrid.getTileCoordExtent(tileCoord))) {\n const tileFeatures = sourceTile.getFeatures();\n if (tileFeatures) {\n for (let j = 0, jj = tileFeatures.length; j < jj; ++j) {\n const candidate = tileFeatures[j];\n const geometry = candidate.getGeometry();\n if (intersects(extent, geometry.getExtent())) {\n features.push(candidate);\n }\n }\n }\n }\n }\n });\n return features;\n }\n\n /**\n * @return {boolean} The source can have overlapping geometries.\n */\n getOverlaps() {\n return this.overlaps_;\n }\n\n /**\n * clear {@link module:ol/TileCache~TileCache} and delete all source tiles\n * @api\n */\n clear() {\n this.tileCache.clear();\n this.sourceTileCache.clear();\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {!Object<string, boolean>} usedTiles Used tiles.\n */\n expireCache(projection, usedTiles) {\n super.expireCache(projection, usedTiles);\n this.sourceTileCache.expireCache({});\n }\n\n /**\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection\").default} projection Projection.\n * @param {VectorRenderTile} tile Vector image tile.\n * @return {Array<import(\"../VectorTile\").default>} Tile keys.\n */\n getSourceTiles(pixelRatio, projection, tile) {\n const urlTileCoord = tile.wrappedTileCoord;\n const tileGrid = this.getTileGridForProjection(projection);\n const extent = tileGrid.getTileCoordExtent(urlTileCoord);\n const z = urlTileCoord[0];\n const resolution = tileGrid.getResolution(z);\n // make extent 1 pixel smaller so we don't load tiles for < 0.5 pixel render space\n bufferExtent(extent, -resolution, extent);\n const sourceTileGrid = this.tileGrid;\n const sourceExtent = sourceTileGrid.getExtent();\n if (sourceExtent) {\n getIntersection(extent, sourceExtent, extent);\n }\n const sourceZ = sourceTileGrid.getZForResolution(resolution, 1);\n const minZoom = sourceTileGrid.getMinZoom();\n\n const previousSourceTiles = tile.sourceTiles;\n let sourceTiles, covered, loadedZ;\n if (\n previousSourceTiles &&\n previousSourceTiles.length > 0 &&\n previousSourceTiles[0].tileCoord[0] === sourceZ\n ) {\n sourceTiles = previousSourceTiles;\n covered = true;\n loadedZ = sourceZ;\n } else {\n sourceTiles = [];\n loadedZ = sourceZ + 1;\n do {\n --loadedZ;\n covered = true;\n sourceTileGrid.forEachTileCoord(\n extent,\n loadedZ,\n function (sourceTileCoord) {\n const tileUrl = this.tileUrlFunction(\n sourceTileCoord,\n pixelRatio,\n projection\n );\n let sourceTile;\n if (tileUrl !== undefined) {\n if (this.sourceTileCache.containsKey(tileUrl)) {\n sourceTile = this.sourceTileCache.get(tileUrl);\n const state = sourceTile.getState();\n if (\n state === TileState.LOADED ||\n state === TileState.ERROR ||\n state === TileState.EMPTY\n ) {\n sourceTiles.push(sourceTile);\n return;\n }\n } else if (loadedZ === sourceZ) {\n sourceTile = new this.tileClass(\n sourceTileCoord,\n TileState.IDLE,\n tileUrl,\n this.format_,\n this.tileLoadFunction\n );\n sourceTile.extent = sourceTileGrid.getTileCoordExtent(\n sourceTileCoord\n );\n sourceTile.projection = projection;\n sourceTile.resolution = sourceTileGrid.getResolution(\n sourceTileCoord[0]\n );\n this.sourceTileCache.set(tileUrl, sourceTile);\n sourceTile.addEventListener(\n EventType.CHANGE,\n this.handleTileChange.bind(this)\n );\n sourceTile.load();\n }\n }\n covered =\n covered &&\n sourceTile &&\n sourceTile.getState() === TileState.LOADED;\n if (!sourceTile) {\n return;\n }\n if (\n sourceTile.getState() !== TileState.EMPTY &&\n tile.getState() === TileState.IDLE\n ) {\n tile.loadingSourceTiles++;\n sourceTile.addEventListener(\n EventType.CHANGE,\n function listenChange() {\n const state = sourceTile.getState();\n const sourceTileKey = sourceTile.getKey();\n if (state === TileState.LOADED || state === TileState.ERROR) {\n if (state === TileState.LOADED) {\n sourceTile.removeEventListener(\n EventType.CHANGE,\n listenChange\n );\n tile.loadingSourceTiles--;\n delete tile.errorSourceTileKeys[sourceTileKey];\n } else if (state === TileState.ERROR) {\n tile.errorSourceTileKeys[sourceTileKey] = true;\n }\n const errorTileCount = Object.keys(tile.errorSourceTileKeys)\n .length;\n if (tile.loadingSourceTiles - errorTileCount === 0) {\n tile.hifi = errorTileCount === 0;\n tile.sourceZ = sourceZ;\n tile.setState(TileState.LOADED);\n }\n }\n }\n );\n }\n }.bind(this)\n );\n if (!covered) {\n sourceTiles.length = 0;\n }\n } while (!covered && loadedZ > minZoom);\n }\n\n if (tile.getState() === TileState.IDLE) {\n tile.setState(TileState.LOADING);\n }\n if (covered) {\n tile.hifi = sourceZ === loadedZ;\n tile.sourceZ = loadedZ;\n if (tile.getState() < TileState.LOADED) {\n tile.setState(TileState.LOADED);\n } else if (\n !previousSourceTiles ||\n !equals(sourceTiles, previousSourceTiles)\n ) {\n tile.sourceTiles = sourceTiles;\n }\n }\n return sourceTiles;\n }\n\n /**\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {!VectorRenderTile} Tile.\n */\n getTile(z, x, y, pixelRatio, projection) {\n const coordKey = getKeyZXY(z, x, y);\n const key = this.getKey();\n let tile;\n if (this.tileCache.containsKey(coordKey)) {\n tile = this.tileCache.get(coordKey);\n if (tile.key === key) {\n return tile;\n }\n }\n const tileCoord = [z, x, y];\n let urlTileCoord = this.getTileCoordForTileUrlFunction(\n tileCoord,\n projection\n );\n const sourceExtent = this.getTileGrid().getExtent();\n const tileGrid = this.getTileGridForProjection(projection);\n if (urlTileCoord && sourceExtent) {\n const tileExtent = tileGrid.getTileCoordExtent(urlTileCoord);\n // make extent 1 pixel smaller so we don't load tiles for < 0.5 pixel render space\n bufferExtent(tileExtent, -tileGrid.getResolution(z), tileExtent);\n if (!intersects(sourceExtent, tileExtent)) {\n urlTileCoord = null;\n }\n }\n let empty = true;\n if (urlTileCoord !== null) {\n const sourceTileGrid = this.tileGrid;\n const resolution = tileGrid.getResolution(z);\n const sourceZ = sourceTileGrid.getZForResolution(resolution, 1);\n // make extent 1 pixel smaller so we don't load tiles for < 0.5 pixel render space\n const extent = tileGrid.getTileCoordExtent(urlTileCoord);\n bufferExtent(extent, -resolution, extent);\n sourceTileGrid.forEachTileCoord(\n extent,\n sourceZ,\n function (sourceTileCoord) {\n empty =\n empty &&\n !this.tileUrlFunction(sourceTileCoord, pixelRatio, projection);\n }.bind(this)\n );\n }\n const newTile = new VectorRenderTile(\n tileCoord,\n empty ? TileState.EMPTY : TileState.IDLE,\n urlTileCoord,\n this.getSourceTiles.bind(this, pixelRatio, projection)\n );\n\n newTile.key = key;\n if (tile) {\n newTile.interimTile = tile;\n newTile.refreshInterimChain();\n this.tileCache.replace(coordKey, newTile);\n } else {\n this.tileCache.set(coordKey, newTile);\n }\n return newTile;\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n */\n getTileGridForProjection(projection) {\n const code = projection.getCode();\n let tileGrid = this.tileGrids_[code];\n if (!tileGrid) {\n // A tile grid that matches the tile size of the source tile grid is more\n // likely to have 1:1 relationships between source tiles and rendered tiles.\n const sourceTileGrid = this.tileGrid;\n tileGrid = createForProjection(\n projection,\n undefined,\n sourceTileGrid\n ? sourceTileGrid.getTileSize(sourceTileGrid.getMinZoom())\n : undefined\n );\n this.tileGrids_[code] = tileGrid;\n }\n return tileGrid;\n }\n\n /**\n * Get the tile pixel ratio for this source.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Tile pixel ratio.\n */\n getTilePixelRatio(pixelRatio) {\n return pixelRatio;\n }\n\n /**\n * @param {number} z Z.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../size.js\").Size} Tile size.\n */\n getTilePixelSize(z, pixelRatio, projection) {\n const tileGrid = this.getTileGridForProjection(projection);\n const tileSize = toSize(tileGrid.getTileSize(z), this.tmpSize);\n return [\n Math.round(tileSize[0] * pixelRatio),\n Math.round(tileSize[1] * pixelRatio),\n ];\n }\n\n /**\n * Increases the cache size if needed\n * @param {number} tileCount Minimum number of tiles needed.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n */\n updateCacheSize(tileCount, projection) {\n super.updateCacheSize(tileCount * 2, projection);\n }\n}\n\nexport default VectorTile;\n\n/**\n * Sets the loader for a tile.\n * @param {import(\"../VectorTile.js\").default} tile Vector tile.\n * @param {string} url URL.\n */\nexport function defaultLoadFunction(tile, url) {\n tile.setLoader(\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n */\n function (extent, resolution, projection) {\n loadFeaturesXhr(\n url,\n tile.getFormat(),\n extent,\n resolution,\n projection,\n tile.onLoad.bind(tile),\n tile.onError.bind(tile)\n );\n }\n );\n}\n","/**\n * @module ol/source/WMTSRequestEncoding\n */\n\n/**\n * Request encoding. One of 'KVP', 'REST'.\n * @enum {string}\n */\nexport default {\n KVP: 'KVP', // see spec §8\n REST: 'REST', // see spec §10\n};\n","/**\n * @module ol/tilegrid/WMTS\n */\n\nimport TileGrid from './TileGrid.js';\nimport {find} from '../array.js';\nimport {get as getProjection} from '../proj.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the tile grid. No tiles\n * outside this extent will be requested by {@link module:ol/source/Tile} sources.\n * When no `origin` or `origins` are configured, the `origin` will be set to the\n * top-left corner of the extent.\n * @property {import(\"../coordinate.js\").Coordinate} [origin] The tile grid origin, i.e.\n * where the `x` and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left\n * to right and downwards. If not specified, `extent` or `origins` must be provided.\n * @property {Array<import(\"../coordinate.js\").Coordinate>} [origins] Tile grid origins,\n * i.e. where the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If\n * given, the array length should match the length of the `resolutions` array, i.e.\n * each resolution can have a different origin. Tile coordinates increase left to\n * right and downwards. If not specified, `extent` or `origin` must be provided.\n * @property {!Array<number>} resolutions Resolutions. The array index of each\n * resolution needs to match the zoom level. This means that even if a `minZoom`\n * is configured, the resolutions array will have a length of `maxZoom + 1`\n * @property {!Array<string>} matrixIds matrix IDs. The length of this array needs\n * to match the length of the `resolutions` array.\n * @property {Array<import(\"../size.js\").Size>} [sizes] Number of tile rows and columns\n * of the grid for each zoom level. The values here are the `TileMatrixWidth` and\n * `TileMatrixHeight` advertised in the GetCapabilities response of the WMTS, and\n * define each zoom level's extent together with the `origin` or `origins`.\n * A grid `extent` can be configured in addition, and will further limit the extent for\n * which tile requests are made by sources. If the bottom-left corner of\n * an extent is used as `origin` or `origins`, then the `y` value must be\n * negative because OpenLayers tile coordinates use the top left as the origin.\n * @property {number|import(\"../size.js\").Size} [tileSize] Tile size.\n * @property {Array<import(\"../size.js\").Size>} [tileSizes] Tile sizes. The length of\n * this array needs to match the length of the `resolutions` array.\n */\n\n/**\n * @classdesc\n * Set the grid pattern for sources accessing WMTS tiled-image servers.\n * @api\n */\nclass WMTSTileGrid extends TileGrid {\n /**\n * @param {Options} options WMTS options.\n */\n constructor(options) {\n super({\n extent: options.extent,\n origin: options.origin,\n origins: options.origins,\n resolutions: options.resolutions,\n tileSize: options.tileSize,\n tileSizes: options.tileSizes,\n sizes: options.sizes,\n });\n\n /**\n * @private\n * @type {!Array<string>}\n */\n this.matrixIds_ = options.matrixIds;\n }\n\n /**\n * @param {number} z Z.\n * @return {string} MatrixId..\n */\n getMatrixId(z) {\n return this.matrixIds_[z];\n }\n\n /**\n * Get the list of matrix identifiers.\n * @return {Array<string>} MatrixIds.\n * @api\n */\n getMatrixIds() {\n return this.matrixIds_;\n }\n}\n\nexport default WMTSTileGrid;\n\n/**\n * Create a tile grid from a WMTS capabilities matrix set and an\n * optional TileMatrixSetLimits.\n * @param {Object} matrixSet An object representing a matrixSet in the\n * capabilities document.\n * @param {import(\"../extent.js\").Extent=} opt_extent An optional extent to restrict the tile\n * ranges the server provides.\n * @param {Array<Object>=} opt_matrixLimits An optional object representing\n * the available matrices for tileGrid.\n * @return {WMTSTileGrid} WMTS tileGrid instance.\n * @api\n */\nexport function createFromCapabilitiesMatrixSet(\n matrixSet,\n opt_extent,\n opt_matrixLimits\n) {\n /** @type {!Array<number>} */\n const resolutions = [];\n /** @type {!Array<string>} */\n const matrixIds = [];\n /** @type {!Array<import(\"../coordinate.js\").Coordinate>} */\n const origins = [];\n /** @type {!Array<import(\"../size.js\").Size>} */\n const tileSizes = [];\n /** @type {!Array<import(\"../size.js\").Size>} */\n const sizes = [];\n\n const matrixLimits = opt_matrixLimits !== undefined ? opt_matrixLimits : [];\n\n const supportedCRSPropName = 'SupportedCRS';\n const matrixIdsPropName = 'TileMatrix';\n const identifierPropName = 'Identifier';\n const scaleDenominatorPropName = 'ScaleDenominator';\n const topLeftCornerPropName = 'TopLeftCorner';\n const tileWidthPropName = 'TileWidth';\n const tileHeightPropName = 'TileHeight';\n\n const code = matrixSet[supportedCRSPropName];\n const projection = getProjection(code);\n const metersPerUnit = projection.getMetersPerUnit();\n // swap origin x and y coordinates if axis orientation is lat/long\n const switchOriginXY = projection.getAxisOrientation().substr(0, 2) == 'ne';\n\n matrixSet[matrixIdsPropName].sort(function (a, b) {\n return b[scaleDenominatorPropName] - a[scaleDenominatorPropName];\n });\n\n matrixSet[matrixIdsPropName].forEach(function (elt) {\n let matrixAvailable;\n // use of matrixLimits to filter TileMatrices from GetCapabilities\n // TileMatrixSet from unavailable matrix levels.\n if (matrixLimits.length > 0) {\n matrixAvailable = find(matrixLimits, function (elt_ml) {\n if (elt[identifierPropName] == elt_ml[matrixIdsPropName]) {\n return true;\n }\n // Fallback for tileMatrix identifiers that don't get prefixed\n // by their tileMatrixSet identifiers.\n if (elt[identifierPropName].indexOf(':') === -1) {\n return (\n matrixSet[identifierPropName] + ':' + elt[identifierPropName] ===\n elt_ml[matrixIdsPropName]\n );\n }\n return false;\n });\n } else {\n matrixAvailable = true;\n }\n\n if (matrixAvailable) {\n matrixIds.push(elt[identifierPropName]);\n const resolution =\n (elt[scaleDenominatorPropName] * 0.28e-3) / metersPerUnit;\n const tileWidth = elt[tileWidthPropName];\n const tileHeight = elt[tileHeightPropName];\n if (switchOriginXY) {\n origins.push([\n elt[topLeftCornerPropName][1],\n elt[topLeftCornerPropName][0],\n ]);\n } else {\n origins.push(elt[topLeftCornerPropName]);\n }\n resolutions.push(resolution);\n tileSizes.push(\n tileWidth == tileHeight ? tileWidth : [tileWidth, tileHeight]\n );\n sizes.push([elt['MatrixWidth'], elt['MatrixHeight']]);\n }\n });\n\n return new WMTSTileGrid({\n extent: opt_extent,\n origins: origins,\n resolutions: resolutions,\n matrixIds: matrixIds,\n tileSizes: tileSizes,\n sizes: sizes,\n });\n}\n","/**\n * @module ol/source/WMTS\n */\n\nimport TileImage from './TileImage.js';\nimport WMTSRequestEncoding from './WMTSRequestEncoding.js';\nimport {appendParams} from '../uri.js';\nimport {assign} from '../obj.js';\nimport {createFromCapabilitiesMatrixSet} from '../tilegrid/WMTS.js';\nimport {createFromTileUrlFunctions, expandUrl} from '../tileurlfunction.js';\nimport {equivalent, get as getProjection} from '../proj.js';\nimport {find, findIndex, includes} from '../array.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../tilegrid/WMTS.js\").default} tileGrid Tile grid.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"./WMTSRequestEncoding.js\").default|string} [requestEncoding='KVP'] Request encoding.\n * @property {string} layer Layer name as advertised in the WMTS capabilities.\n * @property {string} style Style name as advertised in the WMTS capabilities.\n * @property {typeof import(\"../ImageTile.js\").default} [tileClass] Class used to instantiate image tiles. Default is {@link module:ol/ImageTile~ImageTile}.\n * @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service.\n * For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {string} [format='image/jpeg'] Image format. Only used when `requestEncoding` is `'KVP'`.\n * @property {string} [version='1.0.0'] WMTS version.\n * @property {string} matrixSet Matrix set.\n * @property {!Object} [dimensions] Additional \"dimensions\" for tile requests.\n * This is an object with properties named like the advertised WMTS dimensions.\n * @property {string} [url] A URL for the service.\n * For the RESTful request encoding, this is a URL\n * template. For KVP encoding, it is normal URL. A `{?-?}` template pattern,\n * for example `subdomain{a-f}.domain.com`, may be used instead of defining\n * each one separately in the `urls` option.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {Array<string>} [urls] An array of URLs.\n * Requests will be distributed among the URLs in this array.\n * @property {boolean} [wrapX=false] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n */\n\n/**\n * @classdesc\n * Layer source for tile data from WMTS servers.\n * @api\n */\nclass WMTS extends TileImage {\n /**\n * @param {Options} options WMTS options.\n */\n constructor(options) {\n // TODO: add support for TileMatrixLimits\n\n const requestEncoding =\n options.requestEncoding !== undefined\n ? /** @type {import(\"./WMTSRequestEncoding.js\").default} */ (options.requestEncoding)\n : WMTSRequestEncoding.KVP;\n\n // FIXME: should we create a default tileGrid?\n // we could issue a getCapabilities xhr to retrieve missing configuration\n const tileGrid = options.tileGrid;\n\n let urls = options.urls;\n if (urls === undefined && options.url !== undefined) {\n urls = expandUrl(options.url);\n }\n\n super({\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n crossOrigin: options.crossOrigin,\n imageSmoothing: options.imageSmoothing,\n projection: options.projection,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n tileClass: options.tileClass,\n tileGrid: tileGrid,\n tileLoadFunction: options.tileLoadFunction,\n tilePixelRatio: options.tilePixelRatio,\n urls: urls,\n wrapX: options.wrapX !== undefined ? options.wrapX : false,\n transition: options.transition,\n });\n\n /**\n * @private\n * @type {string}\n */\n this.version_ = options.version !== undefined ? options.version : '1.0.0';\n\n /**\n * @private\n * @type {string}\n */\n this.format_ = options.format !== undefined ? options.format : 'image/jpeg';\n\n /**\n * @private\n * @type {!Object}\n */\n this.dimensions_ =\n options.dimensions !== undefined ? options.dimensions : {};\n\n /**\n * @private\n * @type {string}\n */\n this.layer_ = options.layer;\n\n /**\n * @private\n * @type {string}\n */\n this.matrixSet_ = options.matrixSet;\n\n /**\n * @private\n * @type {string}\n */\n this.style_ = options.style;\n\n // FIXME: should we guess this requestEncoding from options.url(s)\n // structure? that would mean KVP only if a template is not provided.\n\n /**\n * @private\n * @type {import(\"./WMTSRequestEncoding.js\").default}\n */\n this.requestEncoding_ = requestEncoding;\n\n this.setKey(this.getKeyForDimensions_());\n\n if (urls && urls.length > 0) {\n this.tileUrlFunction = createFromTileUrlFunctions(\n urls.map(this.createFromWMTSTemplate.bind(this))\n );\n }\n }\n\n /**\n * Set the URLs to use for requests.\n * URLs may contain OGC conform URL Template Variables: {TileMatrix}, {TileRow}, {TileCol}.\n * @param {Array<string>} urls URLs.\n */\n setUrls(urls) {\n this.urls = urls;\n const key = urls.join('\\n');\n this.setTileUrlFunction(\n createFromTileUrlFunctions(\n urls.map(this.createFromWMTSTemplate.bind(this))\n ),\n key\n );\n }\n\n /**\n * Get the dimensions, i.e. those passed to the constructor through the\n * \"dimensions\" option, and possibly updated using the updateDimensions\n * method.\n * @return {!Object} Dimensions.\n * @api\n */\n getDimensions() {\n return this.dimensions_;\n }\n\n /**\n * Return the image format of the WMTS source.\n * @return {string} Format.\n * @api\n */\n getFormat() {\n return this.format_;\n }\n\n /**\n * Return the layer of the WMTS source.\n * @return {string} Layer.\n * @api\n */\n getLayer() {\n return this.layer_;\n }\n\n /**\n * Return the matrix set of the WMTS source.\n * @return {string} MatrixSet.\n * @api\n */\n getMatrixSet() {\n return this.matrixSet_;\n }\n\n /**\n * Return the request encoding, either \"KVP\" or \"REST\".\n * @return {import(\"./WMTSRequestEncoding.js\").default} Request encoding.\n * @api\n */\n getRequestEncoding() {\n return this.requestEncoding_;\n }\n\n /**\n * Return the style of the WMTS source.\n * @return {string} Style.\n * @api\n */\n getStyle() {\n return this.style_;\n }\n\n /**\n * Return the version of the WMTS source.\n * @return {string} Version.\n * @api\n */\n getVersion() {\n return this.version_;\n }\n\n /**\n * @private\n * @return {string} The key for the current dimensions.\n */\n getKeyForDimensions_() {\n let i = 0;\n const res = [];\n for (const key in this.dimensions_) {\n res[i++] = key + '-' + this.dimensions_[key];\n }\n return res.join('/');\n }\n\n /**\n * Update the dimensions.\n * @param {Object} dimensions Dimensions.\n * @api\n */\n updateDimensions(dimensions) {\n assign(this.dimensions_, dimensions);\n this.setKey(this.getKeyForDimensions_());\n }\n\n /**\n * @param {string} template Template.\n * @return {import(\"../Tile.js\").UrlFunction} Tile URL function.\n */\n createFromWMTSTemplate(template) {\n const requestEncoding = this.requestEncoding_;\n\n // context property names are lower case to allow for a case insensitive\n // replacement as some services use different naming conventions\n const context = {\n 'layer': this.layer_,\n 'style': this.style_,\n 'tilematrixset': this.matrixSet_,\n };\n\n if (requestEncoding == WMTSRequestEncoding.KVP) {\n assign(context, {\n 'Service': 'WMTS',\n 'Request': 'GetTile',\n 'Version': this.version_,\n 'Format': this.format_,\n });\n }\n\n // TODO: we may want to create our own appendParams function so that params\n // order conforms to wmts spec guidance, and so that we can avoid to escape\n // special template params\n\n template =\n requestEncoding == WMTSRequestEncoding.KVP\n ? appendParams(template, context)\n : template.replace(/\\{(\\w+?)\\}/g, function (m, p) {\n return p.toLowerCase() in context ? context[p.toLowerCase()] : m;\n });\n\n const tileGrid = /** @type {import(\"../tilegrid/WMTS.js\").default} */ (this\n .tileGrid);\n const dimensions = this.dimensions_;\n\n return (\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {string|undefined} Tile URL.\n */\n function (tileCoord, pixelRatio, projection) {\n if (!tileCoord) {\n return undefined;\n } else {\n const localContext = {\n 'TileMatrix': tileGrid.getMatrixId(tileCoord[0]),\n 'TileCol': tileCoord[1],\n 'TileRow': tileCoord[2],\n };\n assign(localContext, dimensions);\n let url = template;\n if (requestEncoding == WMTSRequestEncoding.KVP) {\n url = appendParams(url, localContext);\n } else {\n url = url.replace(/\\{(\\w+?)\\}/g, function (m, p) {\n return localContext[p];\n });\n }\n return url;\n }\n }\n );\n }\n}\n\nexport default WMTS;\n\n/**\n * Generate source options from a capabilities object.\n * @param {Object} wmtsCap An object representing the capabilities document.\n * @param {!Object} config Configuration properties for the layer. Defaults for\n * the layer will apply if not provided.\n *\n * Required config properties:\n * - layer - {string} The layer identifier.\n *\n * Optional config properties:\n * - matrixSet - {string} The matrix set identifier, required if there is\n * more than one matrix set in the layer capabilities.\n * - projection - {string} The desired CRS when no matrixSet is specified.\n * eg: \"EPSG:3857\". If the desired projection is not available,\n * an error is thrown.\n * - requestEncoding - {string} url encoding format for the layer. Default is\n * the first tile url format found in the GetCapabilities response.\n * - style - {string} The name of the style\n * - format - {string} Image format for the layer. Default is the first\n * format returned in the GetCapabilities response.\n * - crossOrigin - {string|null|undefined} Cross origin. Default is `undefined`.\n * @return {?Options} WMTS source options object or `null` if the layer was not found.\n * @api\n */\nexport function optionsFromCapabilities(wmtsCap, config) {\n const layers = wmtsCap['Contents']['Layer'];\n const l = find(layers, function (elt, index, array) {\n return elt['Identifier'] == config['layer'];\n });\n if (l === null) {\n return null;\n }\n const tileMatrixSets = wmtsCap['Contents']['TileMatrixSet'];\n let idx;\n if (l['TileMatrixSetLink'].length > 1) {\n if ('projection' in config) {\n idx = findIndex(l['TileMatrixSetLink'], function (elt, index, array) {\n const tileMatrixSet = find(tileMatrixSets, function (el) {\n return el['Identifier'] == elt['TileMatrixSet'];\n });\n const supportedCRS = tileMatrixSet['SupportedCRS'];\n const proj1 = getProjection(supportedCRS);\n const proj2 = getProjection(config['projection']);\n if (proj1 && proj2) {\n return equivalent(proj1, proj2);\n } else {\n return supportedCRS == config['projection'];\n }\n });\n } else {\n idx = findIndex(l['TileMatrixSetLink'], function (elt, index, array) {\n return elt['TileMatrixSet'] == config['matrixSet'];\n });\n }\n } else {\n idx = 0;\n }\n if (idx < 0) {\n idx = 0;\n }\n const matrixSet =\n /** @type {string} */\n (l['TileMatrixSetLink'][idx]['TileMatrixSet']);\n const matrixLimits =\n /** @type {Array<Object>} */\n (l['TileMatrixSetLink'][idx]['TileMatrixSetLimits']);\n\n let format = /** @type {string} */ (l['Format'][0]);\n if ('format' in config) {\n format = config['format'];\n }\n idx = findIndex(l['Style'], function (elt, index, array) {\n if ('style' in config) {\n return elt['Title'] == config['style'];\n } else {\n return elt['isDefault'];\n }\n });\n if (idx < 0) {\n idx = 0;\n }\n const style = /** @type {string} */ (l['Style'][idx]['Identifier']);\n\n const dimensions = {};\n if ('Dimension' in l) {\n l['Dimension'].forEach(function (elt, index, array) {\n const key = elt['Identifier'];\n let value = elt['Default'];\n if (value === undefined) {\n value = elt['Value'][0];\n }\n dimensions[key] = value;\n });\n }\n\n const matrixSets = wmtsCap['Contents']['TileMatrixSet'];\n const matrixSetObj = find(matrixSets, function (elt, index, array) {\n return elt['Identifier'] == matrixSet;\n });\n\n let projection;\n const code = matrixSetObj['SupportedCRS'];\n if (code) {\n projection = getProjection(code);\n }\n if ('projection' in config) {\n const projConfig = getProjection(config['projection']);\n if (projConfig) {\n if (!projection || equivalent(projConfig, projection)) {\n projection = projConfig;\n }\n }\n }\n\n const wrapX = false;\n const switchOriginXY = projection.getAxisOrientation().substr(0, 2) == 'ne';\n\n let matrix = matrixSetObj.TileMatrix[0];\n\n // create default matrixLimit\n let selectedMatrixLimit = {\n MinTileCol: 0,\n MinTileRow: 0,\n // substract one to end up at tile top left\n MaxTileCol: matrix.MatrixWidth - 1,\n MaxTileRow: matrix.MatrixHeight - 1,\n };\n\n //in case of matrix limits, use matrix limits to calculate extent\n if (matrixLimits) {\n selectedMatrixLimit = matrixLimits[matrixLimits.length - 1];\n const m = find(\n matrixSetObj.TileMatrix,\n (tileMatrixValue) =>\n tileMatrixValue.Identifier === selectedMatrixLimit.TileMatrix ||\n matrixSetObj.Identifier + ':' + tileMatrixValue.Identifier ===\n selectedMatrixLimit.TileMatrix\n );\n if (m) {\n matrix = m;\n }\n }\n\n const resolution =\n (matrix.ScaleDenominator * 0.00028) / projection.getMetersPerUnit(); // WMTS 1.0.0: standardized rendering pixel size\n const origin = switchOriginXY\n ? [matrix.TopLeftCorner[1], matrix.TopLeftCorner[0]]\n : matrix.TopLeftCorner;\n const tileSpanX = matrix.TileWidth * resolution;\n const tileSpanY = matrix.TileHeight * resolution;\n\n const extent = [\n origin[0] + tileSpanX * selectedMatrixLimit.MinTileCol,\n // add one to get proper bottom/right coordinate\n origin[1] - tileSpanY * (1 + selectedMatrixLimit.MaxTileRow),\n origin[0] + tileSpanX * (1 + selectedMatrixLimit.MaxTileCol),\n origin[1] - tileSpanY * selectedMatrixLimit.MinTileRow,\n ];\n\n if (projection.getExtent() === null) {\n projection.setExtent(extent);\n }\n\n const tileGrid = createFromCapabilitiesMatrixSet(\n matrixSetObj,\n extent,\n matrixLimits\n );\n\n /** @type {!Array<string>} */\n const urls = [];\n let requestEncoding = config['requestEncoding'];\n requestEncoding = requestEncoding !== undefined ? requestEncoding : '';\n\n if (\n 'OperationsMetadata' in wmtsCap &&\n 'GetTile' in wmtsCap['OperationsMetadata']\n ) {\n const gets = wmtsCap['OperationsMetadata']['GetTile']['DCP']['HTTP']['Get'];\n\n for (let i = 0, ii = gets.length; i < ii; ++i) {\n if (gets[i]['Constraint']) {\n const constraint = find(gets[i]['Constraint'], function (element) {\n return element['name'] == 'GetEncoding';\n });\n const encodings = constraint['AllowedValues']['Value'];\n\n if (requestEncoding === '') {\n // requestEncoding not provided, use the first encoding from the list\n requestEncoding = encodings[0];\n }\n if (requestEncoding === WMTSRequestEncoding.KVP) {\n if (includes(encodings, WMTSRequestEncoding.KVP)) {\n urls.push(/** @type {string} */ (gets[i]['href']));\n }\n } else {\n break;\n }\n } else if (gets[i]['href']) {\n requestEncoding = WMTSRequestEncoding.KVP;\n urls.push(/** @type {string} */ (gets[i]['href']));\n }\n }\n }\n if (urls.length === 0) {\n requestEncoding = WMTSRequestEncoding.REST;\n l['ResourceURL'].forEach(function (element) {\n if (element['resourceType'] === 'tile') {\n format = element['format'];\n urls.push(/** @type {string} */ (element['template']));\n }\n });\n }\n\n return {\n urls: urls,\n layer: config['layer'],\n matrixSet: matrixSet,\n format: format,\n projection: projection,\n requestEncoding: requestEncoding,\n tileGrid: tileGrid,\n style: style,\n dimensions: dimensions,\n wrapX: wrapX,\n crossOrigin: config['crossOrigin'],\n };\n}\n","/**\n * @module ol/source\n */\n\nexport {default as BingMaps} from './source/BingMaps.js';\nexport {default as CartoDB} from './source/CartoDB.js';\nexport {default as Cluster} from './source/Cluster.js';\nexport {default as IIIF} from './source/IIIF.js';\nexport {default as Image} from './source/Image.js';\nexport {default as ImageArcGISRest} from './source/ImageArcGISRest.js';\nexport {default as ImageCanvas} from './source/ImageCanvas.js';\nexport {default as ImageMapGuide} from './source/ImageMapGuide.js';\nexport {default as ImageStatic} from './source/ImageStatic.js';\nexport {default as ImageWMS} from './source/ImageWMS.js';\nexport {default as OSM} from './source/OSM.js';\nexport {default as Raster} from './source/Raster.js';\nexport {default as Source} from './source/Source.js';\nexport {default as Stamen} from './source/Stamen.js';\nexport {default as Tile} from './source/Tile.js';\nexport {default as TileArcGISRest} from './source/TileArcGISRest.js';\nexport {default as TileDebug} from './source/TileDebug.js';\nexport {default as TileImage} from './source/TileImage.js';\nexport {default as TileJSON} from './source/TileJSON.js';\nexport {default as TileWMS} from './source/TileWMS.js';\nexport {default as UrlTile} from './source/UrlTile.js';\nexport {default as UTFGrid} from './source/UTFGrid.js';\nexport {default as Vector} from './source/Vector.js';\nexport {default as VectorTile} from './source/VectorTile.js';\nexport {default as WMTS} from './source/WMTS.js';\nexport {default as XYZ} from './source/XYZ.js';\nexport {default as Zoomify} from './source/Zoomify.js';\n","/**\n * @module ol/webgl\n */\n\n/**\n * Constants taken from goog.webgl\n */\n\n/**\n * Used by {@link module:ol/webgl/Helper~WebGLHelper} for buffers containing vertices data, such as\n * position, color, texture coordinate, etc. These vertices are then referenced by an index buffer\n * to be drawn on screen (see {@link module:ol/webgl.ELEMENT_ARRAY_BUFFER}).\n * @const\n * @type {number}\n * @api\n */\nexport const ARRAY_BUFFER = 0x8892;\n\n/**\n * Used by {@link module:ol/webgl/Helper~WebGLHelper} for buffers containing indices data.\n * Index buffers are essentially lists of references to vertices defined in a vertex buffer\n * (see {@link module:ol/webgl.ARRAY_BUFFER}), and define the primitives (triangles) to be drawn.\n * @const\n * @type {number}\n * @api\n */\nexport const ELEMENT_ARRAY_BUFFER = 0x8893;\n\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport const STREAM_DRAW = 0x88e0;\n\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport const STATIC_DRAW = 0x88e4;\n\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport const DYNAMIC_DRAW = 0x88e8;\n\n/**\n * @const\n * @type {number}\n */\nexport const UNSIGNED_BYTE = 0x1401;\n\n/**\n * @const\n * @type {number}\n */\nexport const UNSIGNED_SHORT = 0x1403;\n\n/**\n * @const\n * @type {number}\n */\nexport const UNSIGNED_INT = 0x1405;\n\n/**\n * @const\n * @type {number}\n */\nexport const FLOAT = 0x1406;\n\n/** end of goog.webgl constants\n */\n\n/**\n * @const\n * @type {Array<string>}\n */\nconst CONTEXT_IDS = ['experimental-webgl', 'webgl', 'webkit-3d', 'moz-webgl'];\n\n/**\n * @param {HTMLCanvasElement} canvas Canvas.\n * @param {Object=} opt_attributes Attributes.\n * @return {WebGLRenderingContext} WebGL rendering context.\n */\nexport function getContext(canvas, opt_attributes) {\n const ii = CONTEXT_IDS.length;\n for (let i = 0; i < ii; ++i) {\n try {\n const context = canvas.getContext(CONTEXT_IDS[i], opt_attributes);\n if (context) {\n return /** @type {!WebGLRenderingContext} */ (context);\n }\n } catch (e) {\n // pass\n }\n }\n return null;\n}\n\n/**\n * @type {Array<string>}\n */\nlet supportedExtensions;\n\n/**\n * @return {Array<string>} List of supported WebGL extensions.\n */\nexport function getSupportedExtensions() {\n if (!supportedExtensions) {\n const canvas = document.createElement('canvas');\n const gl = getContext(canvas);\n if (gl) {\n supportedExtensions = gl.getSupportedExtensions();\n }\n }\n return supportedExtensions;\n}\n","/**\n * @module ol/webgl/Buffer\n */\nimport {ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER} from '../webgl.js';\nimport {DYNAMIC_DRAW, STATIC_DRAW, STREAM_DRAW} from '../webgl.js';\nimport {assert} from '../asserts.js';\n\n/**\n * Used to describe the intended usage for the data: `STATIC_DRAW`, `STREAM_DRAW`\n * or `DYNAMIC_DRAW`.\n * @enum {number}\n */\nexport const BufferUsage = {\n STATIC_DRAW: STATIC_DRAW,\n STREAM_DRAW: STREAM_DRAW,\n DYNAMIC_DRAW: DYNAMIC_DRAW,\n};\n\n/**\n * @classdesc\n * Object used to store an array of data as well as usage information for that data.\n * Stores typed arrays internally, either Float32Array or Uint16/32Array depending on\n * the buffer type (ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER) and available extensions.\n *\n * To populate the array, you can either use:\n * * A size using `#ofSize(buffer)`\n * * An `ArrayBuffer` object using `#fromArrayBuffer(buffer)`\n * * A plain array using `#fromArray(array)`\n *\n * Note:\n * See the documentation of [WebGLRenderingContext.bufferData](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bufferData)\n * for more info on buffer usage.\n * @api\n */\nclass WebGLArrayBuffer {\n /**\n * @param {number} type Buffer type, either ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.\n * @param {number=} opt_usage Intended usage, either `STATIC_DRAW`, `STREAM_DRAW` or `DYNAMIC_DRAW`.\n * Default is `DYNAMIC_DRAW`.\n */\n constructor(type, opt_usage) {\n /**\n * @private\n * @type {Float32Array|Uint32Array}\n */\n this.array = null;\n\n /**\n * @private\n * @type {number}\n */\n this.type = type;\n\n assert(type === ARRAY_BUFFER || type === ELEMENT_ARRAY_BUFFER, 62);\n\n /**\n * @private\n * @type {number}\n */\n this.usage = opt_usage !== undefined ? opt_usage : BufferUsage.STATIC_DRAW;\n }\n\n /**\n * Populates the buffer with an array of the given size (all values will be zeroes).\n * @param {number} size Array size\n */\n ofSize(size) {\n this.array = new (getArrayClassForType(this.type))(size);\n }\n\n /**\n * Populates the buffer with an array of the given size (all values will be zeroes).\n * @param {Array<number>} array Numerical array\n */\n fromArray(array) {\n this.array = getArrayClassForType(this.type).from(array);\n }\n\n /**\n * Populates the buffer with a raw binary array buffer.\n * @param {ArrayBuffer} buffer Raw binary buffer to populate the array with. Note that this buffer must have been\n * initialized for the same typed array class.\n */\n fromArrayBuffer(buffer) {\n this.array = new (getArrayClassForType(this.type))(buffer);\n }\n\n /**\n * @return {number} Buffer type.\n */\n getType() {\n return this.type;\n }\n\n /**\n * Will return null if the buffer was not initialized\n * @return {Float32Array|Uint32Array} Array.\n */\n getArray() {\n return this.array;\n }\n\n /**\n * @return {number} Usage.\n */\n getUsage() {\n return this.usage;\n }\n\n /**\n * Will return 0 if the buffer is not initialized\n * @return {number} Array size\n */\n getSize() {\n return this.array ? this.array.length : 0;\n }\n}\n\n/**\n * Returns a typed array constructor based on the given buffer type\n * @param {number} type Buffer type, either ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.\n * @returns {Float32ArrayConstructor|Uint32ArrayConstructor} The typed array class to use for this buffer.\n */\nexport function getArrayClassForType(type) {\n switch (type) {\n case ARRAY_BUFFER:\n return Float32Array;\n case ELEMENT_ARRAY_BUFFER:\n return Uint32Array;\n default:\n return Float32Array;\n }\n}\n\nexport default WebGLArrayBuffer;\n","/**\n * @module ol/webgl/ContextEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n LOST: 'webglcontextlost',\n RESTORED: 'webglcontextrestored',\n};\n","/**\n * @module ol/webgl/PostProcessingPass\n */\n\nconst DEFAULT_VERTEX_SHADER = `\n precision mediump float;\n \n attribute vec2 a_position;\n varying vec2 v_texCoord;\n varying vec2 v_screenCoord;\n \n uniform vec2 u_screenSize;\n \n void main() {\n v_texCoord = a_position * 0.5 + 0.5;\n v_screenCoord = v_texCoord * u_screenSize;\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n`;\n\nconst DEFAULT_FRAGMENT_SHADER = `\n precision mediump float;\n \n uniform sampler2D u_image;\n \n varying vec2 v_texCoord;\n \n void main() {\n gl_FragColor = texture2D(u_image, v_texCoord);\n }\n`;\n\n/**\n * @typedef {Object} Options\n * @property {WebGLRenderingContext} webGlContext WebGL context; mandatory.\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas that will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object.<string,import(\"./Helper\").UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n\n/**\n * @typedef {Object} UniformInternalDescription\n * @property {import(\"./Helper\").UniformValue} value Value\n * @property {number} location Location\n * @property {WebGLTexture} [texture] Texture\n * @private\n */\n\n/**\n * @classdesc\n * This class is used to define Post Processing passes with custom shaders and uniforms.\n * This is used internally by {@link module:ol/webgl/Helper~WebGLHelper}.\n *\n * Please note that the final output on the DOM canvas is expected to have premultiplied alpha, which means that\n * a pixel which is 100% red with an opacity of 50% must have a color of (r=0.5, g=0, b=0, a=0.5).\n * Failing to provide pixel colors with premultiplied alpha will result in render anomalies.\n *\n * The default post-processing pass does *not* multiply color values with alpha value, it expects color values to be\n * premultiplied.\n *\n * Default shaders are shown hereafter:\n *\n * * Vertex shader:\n *\n * ```\n * precision mediump float;\n *\n * attribute vec2 a_position;\n * varying vec2 v_texCoord;\n * varying vec2 v_screenCoord;\n *\n * uniform vec2 u_screenSize;\n *\n * void main() {\n * v_texCoord = a_position * 0.5 + 0.5;\n * v_screenCoord = v_texCoord * u_screenSize;\n * gl_Position = vec4(a_position, 0.0, 1.0);\n * }\n * ```\n *\n * * Fragment shader:\n *\n * ```\n * precision mediump float;\n *\n * uniform sampler2D u_image;\n *\n * varying vec2 v_texCoord;\n *\n * void main() {\n * gl_FragColor = texture2D(u_image, v_texCoord);\n * }\n * ```\n *\n * @api\n */\nclass WebGLPostProcessingPass {\n /**\n * @param {Options} options Options.\n */\n constructor(options) {\n this.gl_ = options.webGlContext;\n const gl = this.gl_;\n\n this.scaleRatio_ = options.scaleRatio || 1;\n\n this.renderTargetTexture_ = gl.createTexture();\n this.renderTargetTextureSize_ = null;\n\n this.frameBuffer_ = gl.createFramebuffer();\n\n // compile the program for the frame buffer\n // TODO: make compilation errors show up\n const vertexShader = gl.createShader(gl.VERTEX_SHADER);\n gl.shaderSource(\n vertexShader,\n options.vertexShader || DEFAULT_VERTEX_SHADER\n );\n gl.compileShader(vertexShader);\n const fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);\n gl.shaderSource(\n fragmentShader,\n options.fragmentShader || DEFAULT_FRAGMENT_SHADER\n );\n gl.compileShader(fragmentShader);\n this.renderTargetProgram_ = gl.createProgram();\n gl.attachShader(this.renderTargetProgram_, vertexShader);\n gl.attachShader(this.renderTargetProgram_, fragmentShader);\n gl.linkProgram(this.renderTargetProgram_);\n\n // bind the vertices buffer for the frame buffer\n this.renderTargetVerticesBuffer_ = gl.createBuffer();\n const verticesArray = [-1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1];\n gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);\n gl.bufferData(\n gl.ARRAY_BUFFER,\n new Float32Array(verticesArray),\n gl.STATIC_DRAW\n );\n\n this.renderTargetAttribLocation_ = gl.getAttribLocation(\n this.renderTargetProgram_,\n 'a_position'\n );\n this.renderTargetUniformLocation_ = gl.getUniformLocation(\n this.renderTargetProgram_,\n 'u_screenSize'\n );\n this.renderTargetTextureLocation_ = gl.getUniformLocation(\n this.renderTargetProgram_,\n 'u_image'\n );\n\n /**\n * Holds info about custom uniforms used in the post processing pass\n * @type {Array<UniformInternalDescription>}\n * @private\n */\n this.uniforms_ = [];\n options.uniforms &&\n Object.keys(options.uniforms).forEach(\n function (name) {\n this.uniforms_.push({\n value: options.uniforms[name],\n location: gl.getUniformLocation(this.renderTargetProgram_, name),\n });\n }.bind(this)\n );\n }\n\n /**\n * Get the WebGL rendering context\n * @return {WebGLRenderingContext} The rendering context.\n * @api\n */\n getGL() {\n return this.gl_;\n }\n\n /**\n * Initialize the render target texture of the post process, make sure it is at the\n * right size and bind it as a render target for the next draw calls.\n * The last step to be initialized will be the one where the primitives are rendered.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState current frame state\n * @api\n */\n init(frameState) {\n const gl = this.getGL();\n const textureSize = [\n gl.drawingBufferWidth * this.scaleRatio_,\n gl.drawingBufferHeight * this.scaleRatio_,\n ];\n\n // rendering goes to my buffer\n gl.bindFramebuffer(gl.FRAMEBUFFER, this.getFrameBuffer());\n gl.viewport(0, 0, textureSize[0], textureSize[1]);\n\n // if size has changed: adjust canvas & render target texture\n if (\n !this.renderTargetTextureSize_ ||\n this.renderTargetTextureSize_[0] !== textureSize[0] ||\n this.renderTargetTextureSize_[1] !== textureSize[1]\n ) {\n this.renderTargetTextureSize_ = textureSize;\n\n // create a new texture\n const level = 0;\n const internalFormat = gl.RGBA;\n const border = 0;\n const format = gl.RGBA;\n const type = gl.UNSIGNED_BYTE;\n const data = null;\n gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);\n gl.texImage2D(\n gl.TEXTURE_2D,\n level,\n internalFormat,\n textureSize[0],\n textureSize[1],\n border,\n format,\n type,\n data\n );\n\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n // bind the texture to the framebuffer\n gl.framebufferTexture2D(\n gl.FRAMEBUFFER,\n gl.COLOR_ATTACHMENT0,\n gl.TEXTURE_2D,\n this.renderTargetTexture_,\n 0\n );\n }\n }\n\n /**\n * Render to the next postprocessing pass (or to the canvas if final pass).\n * @param {import(\"../PluggableMap.js\").FrameState} frameState current frame state\n * @param {WebGLPostProcessingPass} [nextPass] Next pass, optional\n * @api\n */\n apply(frameState, nextPass) {\n const gl = this.getGL();\n const size = frameState.size;\n\n gl.bindFramebuffer(\n gl.FRAMEBUFFER,\n nextPass ? nextPass.getFrameBuffer() : null\n );\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);\n\n // render the frame buffer to the canvas\n gl.clearColor(0.0, 0.0, 0.0, 0.0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n\n gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);\n\n gl.useProgram(this.renderTargetProgram_);\n gl.enableVertexAttribArray(this.renderTargetAttribLocation_);\n gl.vertexAttribPointer(\n this.renderTargetAttribLocation_,\n 2,\n gl.FLOAT,\n false,\n 0,\n 0\n );\n gl.uniform2f(this.renderTargetUniformLocation_, size[0], size[1]);\n gl.uniform1i(this.renderTargetTextureLocation_, 0);\n\n this.applyUniforms(frameState);\n\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n }\n\n /**\n * @returns {WebGLFramebuffer} Frame buffer\n * @api\n */\n getFrameBuffer() {\n return this.frameBuffer_;\n }\n\n /**\n * Sets the custom uniforms based on what was given in the constructor.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @private\n */\n applyUniforms(frameState) {\n const gl = this.getGL();\n\n let value;\n let textureSlot = 1;\n this.uniforms_.forEach(function (uniform) {\n value =\n typeof uniform.value === 'function'\n ? uniform.value(frameState)\n : uniform.value;\n\n // apply value based on type\n if (value instanceof HTMLCanvasElement || value instanceof ImageData) {\n // create a texture & put data\n if (!uniform.texture) {\n uniform.texture = gl.createTexture();\n }\n gl.activeTexture(gl[`TEXTURE${textureSlot}`]);\n gl.bindTexture(gl.TEXTURE_2D, uniform.texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n if (value instanceof ImageData) {\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n value.width,\n value.height,\n 0,\n gl.UNSIGNED_BYTE,\n new Uint8Array(value.data)\n );\n } else {\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n value\n );\n }\n\n // fill texture slots\n gl.uniform1i(uniform.location, textureSlot++);\n } else if (Array.isArray(value)) {\n switch (value.length) {\n case 2:\n gl.uniform2f(uniform.location, value[0], value[1]);\n return;\n case 3:\n gl.uniform3f(uniform.location, value[0], value[1], value[2]);\n return;\n case 4:\n gl.uniform4f(\n uniform.location,\n value[0],\n value[1],\n value[2],\n value[3]\n );\n return;\n default:\n return;\n }\n } else if (typeof value === 'number') {\n gl.uniform1f(uniform.location, value);\n }\n });\n }\n}\n\nexport default WebGLPostProcessingPass;\n","/**\n * @module ol/vec/mat4\n */\n\n/**\n * @return {Array<number>} \"4x4 matrix representing a 3D identity transform.\"\n */\nexport function create() {\n return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n}\n\n/**\n * @param {Array<number>} mat4 Flattened 4x4 matrix receiving the result.\n * @param {import(\"../transform.js\").Transform} transform Transformation matrix.\n * @return {Array<number>} \"2D transformation matrix as flattened 4x4 matrix.\"\n */\nexport function fromTransform(mat4, transform) {\n mat4[0] = transform[0];\n mat4[1] = transform[1];\n mat4[4] = transform[2];\n mat4[5] = transform[3];\n mat4[12] = transform[4];\n mat4[13] = transform[5];\n return mat4;\n}\n","/**\n * @module ol/webgl/Helper\n */\nimport ContextEventType from '../webgl/ContextEventType.js';\nimport Disposable from '../Disposable.js';\nimport WebGLPostProcessingPass from './PostProcessingPass.js';\nimport {\n FLOAT,\n UNSIGNED_BYTE,\n UNSIGNED_INT,\n UNSIGNED_SHORT,\n getContext,\n getSupportedExtensions,\n} from '../webgl.js';\nimport {assert} from '../asserts.js';\nimport {clear} from '../obj.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n reset as resetTransform,\n rotate as rotateTransform,\n scale as scaleTransform,\n} from '../transform.js';\nimport {create, fromTransform} from '../vec/mat4.js';\nimport {getUid} from '../util.js';\nimport {includes} from '../array.js';\n\n/**\n * @typedef {Object} BufferCacheEntry\n * @property {import(\"./Buffer.js\").default} buffer\n * @property {WebGLBuffer} webGlBuffer\n */\n\n/**\n * Shader types, either `FRAGMENT_SHADER` or `VERTEX_SHADER`.\n * @enum {number}\n */\nexport const ShaderType = {\n FRAGMENT_SHADER: 0x8b30,\n VERTEX_SHADER: 0x8b31,\n};\n\n/**\n * Uniform names used in the default shaders: `PROJECTION_MATRIX`, `OFFSET_SCALE_MATRIX`.\n * and `OFFSET_ROTATION_MATRIX`.\n * @enum {string}\n */\nexport const DefaultUniform = {\n PROJECTION_MATRIX: 'u_projectionMatrix',\n OFFSET_SCALE_MATRIX: 'u_offsetScaleMatrix',\n OFFSET_ROTATION_MATRIX: 'u_offsetRotateMatrix',\n TIME: 'u_time',\n ZOOM: 'u_zoom',\n RESOLUTION: 'u_resolution',\n};\n\n/**\n * Attribute types, either `UNSIGNED_BYTE`, `UNSIGNED_SHORT`, `UNSIGNED_INT` or `FLOAT`\n * Note: an attribute stored in a `Float32Array` should be of type `FLOAT`.\n * @enum {number}\n */\nexport const AttributeType = {\n UNSIGNED_BYTE: UNSIGNED_BYTE,\n UNSIGNED_SHORT: UNSIGNED_SHORT,\n UNSIGNED_INT: UNSIGNED_INT,\n FLOAT: FLOAT,\n};\n\n/**\n * Description of an attribute in a buffer\n * @typedef {Object} AttributeDescription\n * @property {string} name Attribute name to use in shaders\n * @property {number} size Number of components per attributes\n * @property {AttributeType} [type] Attribute type, i.e. number of bytes used to store the value. This is\n * determined by the class of typed array which the buffer uses (eg. `Float32Array` for a `FLOAT` attribute).\n * Default is `FLOAT`.\n */\n\n/**\n * @typedef {number|Array<number>|HTMLCanvasElement|HTMLImageElement|ImageData|import(\"../transform\").Transform} UniformLiteralValue\n */\n\n/**\n * Uniform value can be a number, array of numbers (2 to 4), canvas element or a callback returning\n * one of the previous types.\n * @typedef {UniformLiteralValue|function(import(\"../PluggableMap.js\").FrameState):UniformLiteralValue} UniformValue\n */\n\n/**\n * @typedef {Object} PostProcessesOptions\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas which will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object.<string,UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n\n/**\n * @typedef {Object} Options\n * @property {Object.<string,UniformValue>} [uniforms] Uniform definitions; property names must match the uniform\n * names in the provided or default shaders.\n * @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions\n */\n\n/**\n * @typedef {Object} UniformInternalDescription\n * @property {string} name Name\n * @property {UniformValue=} value Value\n * @property {WebGLTexture} [texture] Texture\n * @private\n */\n\n/**\n * @classdesc\n * This class is intended to provide low-level functions related to WebGL rendering, so that accessing\n * directly the WebGL API should not be required anymore.\n *\n * Several operations are handled by the `WebGLHelper` class:\n *\n * ### Define custom shaders and uniforms\n *\n * *Shaders* are low-level programs executed on the GPU and written in GLSL. There are two types of shaders:\n *\n * Vertex shaders are used to manipulate the position and attribute of *vertices* of rendered primitives (ie. corners of a square).\n * Outputs are:\n *\n * * `gl_Position`: position of the vertex in screen space\n *\n * * Varyings usually prefixed with `v_` are passed on to the fragment shader\n *\n * Fragment shaders are used to control the actual color of the pixels drawn on screen. Their only output is `gl_FragColor`.\n *\n * Both shaders can take *uniforms* or *attributes* as input. Attributes are explained later. Uniforms are common, read-only values that\n * can be changed at every frame and can be of type float, arrays of float or images.\n *\n * Shaders must be compiled and assembled into a program like so:\n * ```js\n * // here we simply create two shaders and assemble them in a program which is then used\n * // for subsequent rendering calls\n * const vertexShader = new WebGLVertex(VERTEX_SHADER);\n * const fragmentShader = new WebGLFragment(FRAGMENT_SHADER);\n * const program = this.context.getProgram(fragmentShader, vertexShader);\n * helper.useProgram(this.program);\n * ```\n *\n * Uniforms are defined using the `uniforms` option and can either be explicit values or callbacks taking the frame state as argument.\n * You can also change their value along the way like so:\n * ```js\n * helper.setUniformFloatValue('u_value', valueAsNumber);\n * ```\n *\n * ### Defining post processing passes\n *\n * *Post processing* describes the act of rendering primitives to a texture, and then rendering this texture to the final canvas\n * while applying special effects in screen space.\n * Typical uses are: blurring, color manipulation, depth of field, filtering...\n *\n * The `WebGLHelper` class offers the possibility to define post processes at creation time using the `postProcesses` option.\n * A post process step accepts the following options:\n *\n * * `fragmentShader` and `vertexShader`: text literals in GLSL language that will be compiled and used in the post processing step.\n * * `uniforms`: uniforms can be defined for the post processing steps just like for the main render.\n * * `scaleRatio`: allows using an intermediate texture smaller or higher than the final canvas in the post processing step.\n * This is typically used in blur steps to reduce the performance overhead by using an already downsampled texture as input.\n *\n * The {@link module:ol/webgl/PostProcessingPass~WebGLPostProcessingPass} class is used internally, refer to its documentation for more info.\n *\n * ### Binding WebGL buffers and flushing data into them\n *\n * Data that must be passed to the GPU has to be transferred using {@link module:ol/webgl/Buffer~WebGLArrayBuffer} objects.\n * A buffer has to be created only once, but must be bound every time the buffer content will be used for rendering.\n * This is done using {@link bindBuffer}.\n * When the buffer's array content has changed, the new data has to be flushed to the GPU memory; this is done using\n * {@link flushBufferData}. Note: this operation is expensive and should be done as infrequently as possible.\n *\n * When binding an array buffer, a `target` parameter must be given: it should be either {@link module:ol/webgl.ARRAY_BUFFER}\n * (if the buffer contains vertices data) or {@link module:ol/webgl.ELEMENT_ARRAY_BUFFER} (if the buffer contains indices data).\n *\n * Examples below:\n * ```js\n * // at initialization phase\n * const verticesBuffer = new WebGLArrayBuffer([], DYNAMIC_DRAW);\n * const indicesBuffer = new WebGLArrayBuffer([], DYNAMIC_DRAW);\n *\n * // when array values have changed\n * helper.flushBufferData(ARRAY_BUFFER, this.verticesBuffer);\n * helper.flushBufferData(ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n *\n * // at rendering phase\n * helper.bindBuffer(ARRAY_BUFFER, this.verticesBuffer);\n * helper.bindBuffer(ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n * ```\n *\n * ### Specifying attributes\n *\n * The GPU only receives the data as arrays of numbers. These numbers must be handled differently depending on what it describes (position, texture coordinate...).\n * Attributes are used to specify these uses. Use {@link enableAttributeArray_} and either\n * the default attribute names in {@link module:ol/webgl/Helper.DefaultAttrib} or custom ones.\n *\n * Please note that you will have to specify the type and offset of the attributes in the data array. You can refer to the documentation of [WebGLRenderingContext.vertexAttribPointer](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer) for more explanation.\n * ```js\n * // here we indicate that the data array has the following structure:\n * // [posX, posY, offsetX, offsetY, texCoordU, texCoordV, posX, posY, ...]\n * helper.enableAttributes([\n * {\n * name: 'a_position',\n * size: 2\n * },\n * {\n * name: 'a_offset',\n * size: 2\n * },\n * {\n * name: 'a_texCoord',\n * size: 2\n * }\n * ])\n * ```\n *\n * ### Rendering primitives\n *\n * Once all the steps above have been achieved, rendering primitives to the screen is done using {@link prepareDraw}, {@link drawElements} and {@link finalizeDraw}.\n * ```js\n * // frame preparation step\n * helper.prepareDraw(frameState);\n *\n * // call this for every data array that has to be rendered on screen\n * helper.drawElements(0, this.indicesBuffer.getArray().length);\n *\n * // finalize the rendering by applying post processes\n * helper.finalizeDraw(frameState);\n * ```\n *\n * For an example usage of this class, refer to {@link module:ol/renderer/webgl/PointsLayer~WebGLPointsLayerRenderer}.\n *\n *\n * @api\n */\nclass WebGLHelper extends Disposable {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n super();\n const options = opt_options || {};\n\n /** @private */\n this.boundHandleWebGLContextLost_ = this.handleWebGLContextLost.bind(this);\n\n /** @private */\n this.boundHandleWebGLContextRestored_ = this.handleWebGLContextRestored.bind(\n this\n );\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.canvas_ = document.createElement('canvas');\n this.canvas_.style.position = 'absolute';\n this.canvas_.style.left = '0';\n\n /**\n * @private\n * @type {WebGLRenderingContext}\n */\n this.gl_ = getContext(this.canvas_);\n const gl = this.getGL();\n\n /**\n * @private\n * @type {!Object<string, BufferCacheEntry>}\n */\n this.bufferCache_ = {};\n\n /**\n * @private\n * @type {WebGLProgram}\n */\n this.currentProgram_ = null;\n\n assert(includes(getSupportedExtensions(), 'OES_element_index_uint'), 63);\n gl.getExtension('OES_element_index_uint');\n\n this.canvas_.addEventListener(\n ContextEventType.LOST,\n this.boundHandleWebGLContextLost_\n );\n this.canvas_.addEventListener(\n ContextEventType.RESTORED,\n this.boundHandleWebGLContextRestored_\n );\n\n /**\n * @private\n * @type {import(\"../transform.js\").Transform}\n */\n this.offsetRotateMatrix_ = createTransform();\n\n /**\n * @private\n * @type {import(\"../transform.js\").Transform}\n */\n this.offsetScaleMatrix_ = createTransform();\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.tmpMat4_ = create();\n\n /**\n * @private\n * @type {Object.<string, WebGLUniformLocation>}\n */\n this.uniformLocations_ = {};\n\n /**\n * @private\n * @type {Object.<string, number>}\n */\n this.attribLocations_ = {};\n\n /**\n * Holds info about custom uniforms used in the post processing pass.\n * If the uniform is a texture, the WebGL Texture object will be stored here.\n * @type {Array<UniformInternalDescription>}\n * @private\n */\n this.uniforms_ = [];\n if (options.uniforms) {\n for (const name in options.uniforms) {\n this.uniforms_.push({\n name: name,\n value: options.uniforms[name],\n });\n }\n }\n\n /**\n * An array of PostProcessingPass objects is kept in this variable, built from the steps provided in the\n * options. If no post process was given, a default one is used (so as not to have to make an exception to\n * the frame buffer logic).\n * @type {Array<WebGLPostProcessingPass>}\n * @private\n */\n this.postProcessPasses_ = options.postProcesses\n ? options.postProcesses.map(function (options) {\n return new WebGLPostProcessingPass({\n webGlContext: gl,\n scaleRatio: options.scaleRatio,\n vertexShader: options.vertexShader,\n fragmentShader: options.fragmentShader,\n uniforms: options.uniforms,\n });\n })\n : [new WebGLPostProcessingPass({webGlContext: gl})];\n\n /**\n * @type {string|null}\n * @private\n */\n this.shaderCompileErrors_ = null;\n\n /**\n * @type {number}\n * @private\n */\n this.startTime_ = Date.now();\n }\n\n /**\n * Just bind the buffer if it's in the cache. Otherwise create\n * the WebGL buffer, bind it, populate it, and add an entry to\n * the cache.\n * @param {import(\"./Buffer\").default} buffer Buffer.\n * @api\n */\n bindBuffer(buffer) {\n const gl = this.getGL();\n const bufferKey = getUid(buffer);\n let bufferCache = this.bufferCache_[bufferKey];\n if (!bufferCache) {\n const webGlBuffer = gl.createBuffer();\n bufferCache = {\n buffer: buffer,\n webGlBuffer: webGlBuffer,\n };\n this.bufferCache_[bufferKey] = bufferCache;\n }\n gl.bindBuffer(buffer.getType(), bufferCache.webGlBuffer);\n }\n\n /**\n * Update the data contained in the buffer array; this is required for the\n * new data to be rendered\n * @param {import(\"./Buffer\").default} buffer Buffer.\n * @api\n */\n flushBufferData(buffer) {\n const gl = this.getGL();\n this.bindBuffer(buffer);\n gl.bufferData(buffer.getType(), buffer.getArray(), buffer.getUsage());\n }\n\n /**\n * @param {import(\"./Buffer.js\").default} buf Buffer.\n */\n deleteBuffer(buf) {\n const gl = this.getGL();\n const bufferKey = getUid(buf);\n const bufferCacheEntry = this.bufferCache_[bufferKey];\n if (!gl.isContextLost()) {\n gl.deleteBuffer(bufferCacheEntry.buffer);\n }\n delete this.bufferCache_[bufferKey];\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n this.canvas_.removeEventListener(\n ContextEventType.LOST,\n this.boundHandleWebGLContextLost_\n );\n this.canvas_.removeEventListener(\n ContextEventType.RESTORED,\n this.boundHandleWebGLContextRestored_\n );\n }\n\n /**\n * Clear the buffer & set the viewport to draw.\n * Post process passes will be initialized here, the first one being bound as a render target for\n * subsequent draw calls.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState current frame state\n * @api\n */\n prepareDraw(frameState) {\n const gl = this.getGL();\n const canvas = this.getCanvas();\n const size = frameState.size;\n const pixelRatio = frameState.pixelRatio;\n\n canvas.width = size[0] * pixelRatio;\n canvas.height = size[1] * pixelRatio;\n canvas.style.width = size[0] + 'px';\n canvas.style.height = size[1] + 'px';\n\n gl.useProgram(this.currentProgram_);\n\n // loop backwards in post processes list\n for (let i = this.postProcessPasses_.length - 1; i >= 0; i--) {\n this.postProcessPasses_[i].init(frameState);\n }\n\n gl.bindTexture(gl.TEXTURE_2D, null);\n\n gl.clearColor(0.0, 0.0, 0.0, 0.0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n\n gl.useProgram(this.currentProgram_);\n this.applyFrameState(frameState);\n this.applyUniforms(frameState);\n }\n\n /**\n * Clear the render target & bind it for future draw operations.\n * This is similar to `prepareDraw`, only post processes will not be applied.\n * Note: the whole viewport will be drawn to the render target, regardless of its size.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState current frame state\n * @param {import(\"./RenderTarget.js\").default} renderTarget Render target to draw to\n * @param {boolean} [opt_disableAlphaBlend] If true, no alpha blending will happen.\n */\n prepareDrawToRenderTarget(frameState, renderTarget, opt_disableAlphaBlend) {\n const gl = this.getGL();\n const size = renderTarget.getSize();\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, renderTarget.getFramebuffer());\n gl.viewport(0, 0, size[0], size[1]);\n gl.bindTexture(gl.TEXTURE_2D, renderTarget.getTexture());\n gl.clearColor(0.0, 0.0, 0.0, 0.0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n gl.enable(gl.BLEND);\n gl.blendFunc(\n gl.ONE,\n opt_disableAlphaBlend ? gl.ZERO : gl.ONE_MINUS_SRC_ALPHA\n );\n\n gl.useProgram(this.currentProgram_);\n this.applyFrameState(frameState);\n this.applyUniforms(frameState);\n }\n\n /**\n * Execute a draw call based on the currently bound program, texture, buffers, attributes.\n * @param {number} start Start index.\n * @param {number} end End index.\n * @api\n */\n drawElements(start, end) {\n const gl = this.getGL();\n const elementType = gl.UNSIGNED_INT;\n const elementSize = 4;\n\n const numItems = end - start;\n const offsetInBytes = start * elementSize;\n gl.drawElements(gl.TRIANGLES, numItems, elementType, offsetInBytes);\n }\n\n /**\n * Apply the successive post process passes which will eventually render to the actual canvas.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState current frame state\n * @api\n */\n finalizeDraw(frameState) {\n // apply post processes using the next one as target\n for (let i = 0; i < this.postProcessPasses_.length; i++) {\n this.postProcessPasses_[i].apply(\n frameState,\n this.postProcessPasses_[i + 1] || null\n );\n }\n }\n\n /**\n * @return {HTMLCanvasElement} Canvas.\n * @api\n */\n getCanvas() {\n return this.canvas_;\n }\n\n /**\n * Get the WebGL rendering context\n * @return {WebGLRenderingContext} The rendering context.\n * @api\n */\n getGL() {\n return this.gl_;\n }\n\n /**\n * Sets the default matrix uniforms for a given frame state. This is called internally in `prepareDraw`.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @private\n */\n applyFrameState(frameState) {\n const size = frameState.size;\n const rotation = frameState.viewState.rotation;\n\n const offsetScaleMatrix = resetTransform(this.offsetScaleMatrix_);\n scaleTransform(offsetScaleMatrix, 2 / size[0], 2 / size[1]);\n\n const offsetRotateMatrix = resetTransform(this.offsetRotateMatrix_);\n if (rotation !== 0) {\n rotateTransform(offsetRotateMatrix, -rotation);\n }\n\n this.setUniformMatrixValue(\n DefaultUniform.OFFSET_SCALE_MATRIX,\n fromTransform(this.tmpMat4_, offsetScaleMatrix)\n );\n this.setUniformMatrixValue(\n DefaultUniform.OFFSET_ROTATION_MATRIX,\n fromTransform(this.tmpMat4_, offsetRotateMatrix)\n );\n\n this.setUniformFloatValue(\n DefaultUniform.TIME,\n (Date.now() - this.startTime_) * 0.001\n );\n this.setUniformFloatValue(DefaultUniform.ZOOM, frameState.viewState.zoom);\n this.setUniformFloatValue(\n DefaultUniform.RESOLUTION,\n frameState.viewState.resolution\n );\n }\n\n /**\n * Sets the custom uniforms based on what was given in the constructor. This is called internally in `prepareDraw`.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @private\n */\n applyUniforms(frameState) {\n const gl = this.getGL();\n\n let value;\n let textureSlot = 0;\n this.uniforms_.forEach(\n function (uniform) {\n value =\n typeof uniform.value === 'function'\n ? uniform.value(frameState)\n : uniform.value;\n\n // apply value based on type\n if (\n value instanceof HTMLCanvasElement ||\n value instanceof HTMLImageElement ||\n value instanceof ImageData\n ) {\n // create a texture & put data\n if (!uniform.texture) {\n uniform.prevValue = undefined;\n uniform.texture = gl.createTexture();\n }\n gl.activeTexture(gl[`TEXTURE${textureSlot}`]);\n gl.bindTexture(gl.TEXTURE_2D, uniform.texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n const imageReady =\n !(value instanceof HTMLImageElement) ||\n /** @type {HTMLImageElement} */ (value).complete;\n if (imageReady && uniform.prevValue !== value) {\n uniform.prevValue = value;\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n value\n );\n }\n\n // fill texture slots by increasing index\n gl.uniform1i(this.getUniformLocation(uniform.name), textureSlot++);\n } else if (Array.isArray(value) && value.length === 6) {\n this.setUniformMatrixValue(\n uniform.name,\n fromTransform(this.tmpMat4_, value)\n );\n } else if (Array.isArray(value) && value.length <= 4) {\n switch (value.length) {\n case 2:\n gl.uniform2f(\n this.getUniformLocation(uniform.name),\n value[0],\n value[1]\n );\n return;\n case 3:\n gl.uniform3f(\n this.getUniformLocation(uniform.name),\n value[0],\n value[1],\n value[2]\n );\n return;\n case 4:\n gl.uniform4f(\n this.getUniformLocation(uniform.name),\n value[0],\n value[1],\n value[2],\n value[3]\n );\n return;\n default:\n return;\n }\n } else if (typeof value === 'number') {\n gl.uniform1f(this.getUniformLocation(uniform.name), value);\n }\n }.bind(this)\n );\n }\n\n /**\n * Use a program. If the program is already in use, this will return `false`.\n * @param {WebGLProgram} program Program.\n * @return {boolean} Changed.\n * @api\n */\n useProgram(program) {\n if (program == this.currentProgram_) {\n return false;\n } else {\n const gl = this.getGL();\n gl.useProgram(program);\n this.currentProgram_ = program;\n this.uniformLocations_ = {};\n this.attribLocations_ = {};\n return true;\n }\n }\n\n /**\n * Will attempt to compile a vertex or fragment shader based on source\n * On error, the shader will be returned but\n * `gl.getShaderParameter(shader, gl.COMPILE_STATUS)` will return `true`\n * Use `gl.getShaderInfoLog(shader)` to have details\n * @param {string} source Shader source\n * @param {ShaderType} type VERTEX_SHADER or FRAGMENT_SHADER\n * @return {WebGLShader} Shader object\n */\n compileShader(source, type) {\n const gl = this.getGL();\n const shader = gl.createShader(type);\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n return shader;\n }\n\n /**\n * Create a program for a vertex and fragment shader. The shaders compilation may have failed:\n * use `WebGLHelper.getShaderCompileErrors()`to have details if any.\n * @param {string} fragmentShaderSource Fragment shader source.\n * @param {string} vertexShaderSource Vertex shader source.\n * @return {WebGLProgram} Program\n * @api\n */\n getProgram(fragmentShaderSource, vertexShaderSource) {\n const gl = this.getGL();\n\n const fragmentShader = this.compileShader(\n fragmentShaderSource,\n gl.FRAGMENT_SHADER\n );\n const vertexShader = this.compileShader(\n vertexShaderSource,\n gl.VERTEX_SHADER\n );\n this.shaderCompileErrors_ = null;\n\n if (gl.getShaderInfoLog(fragmentShader)) {\n this.shaderCompileErrors_ = `Fragment shader compilation failed:\\n${gl.getShaderInfoLog(\n fragmentShader\n )}`;\n }\n if (gl.getShaderInfoLog(vertexShader)) {\n this.shaderCompileErrors_ =\n (this.shaderCompileErrors_ || '') +\n `Vertex shader compilation failed:\\n${gl.getShaderInfoLog(\n vertexShader\n )}`;\n }\n\n const program = gl.createProgram();\n gl.attachShader(program, fragmentShader);\n gl.attachShader(program, vertexShader);\n gl.linkProgram(program);\n return program;\n }\n\n /**\n * Will return the last shader compilation errors. If no error happened, will return null;\n * @return {string|null} Errors description, or null if last compilation was successful\n * @api\n */\n getShaderCompileErrors() {\n return this.shaderCompileErrors_;\n }\n\n /**\n * Will get the location from the shader or the cache\n * @param {string} name Uniform name\n * @return {WebGLUniformLocation} uniformLocation\n * @api\n */\n getUniformLocation(name) {\n if (this.uniformLocations_[name] === undefined) {\n this.uniformLocations_[name] = this.getGL().getUniformLocation(\n this.currentProgram_,\n name\n );\n }\n return this.uniformLocations_[name];\n }\n\n /**\n * Will get the location from the shader or the cache\n * @param {string} name Attribute name\n * @return {number} attribLocation\n * @api\n */\n getAttributeLocation(name) {\n if (this.attribLocations_[name] === undefined) {\n this.attribLocations_[name] = this.getGL().getAttribLocation(\n this.currentProgram_,\n name\n );\n }\n return this.attribLocations_[name];\n }\n\n /**\n * Modifies the given transform to apply the rotation/translation/scaling of the given frame state.\n * The resulting transform can be used to convert world space coordinates to view coordinates.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../transform\").Transform} transform Transform to update.\n * @return {import(\"../transform\").Transform} The updated transform object.\n * @api\n */\n makeProjectionTransform(frameState, transform) {\n const size = frameState.size;\n const rotation = frameState.viewState.rotation;\n const resolution = frameState.viewState.resolution;\n const center = frameState.viewState.center;\n\n resetTransform(transform);\n composeTransform(\n transform,\n 0,\n 0,\n 2 / (resolution * size[0]),\n 2 / (resolution * size[1]),\n -rotation,\n -center[0],\n -center[1]\n );\n return transform;\n }\n\n /**\n * Give a value for a standard float uniform\n * @param {string} uniform Uniform name\n * @param {number} value Value\n * @api\n */\n setUniformFloatValue(uniform, value) {\n this.getGL().uniform1f(this.getUniformLocation(uniform), value);\n }\n\n /**\n * Give a value for a standard matrix4 uniform\n * @param {string} uniform Uniform name\n * @param {Array<number>} value Matrix value\n * @api\n */\n setUniformMatrixValue(uniform, value) {\n this.getGL().uniformMatrix4fv(\n this.getUniformLocation(uniform),\n false,\n value\n );\n }\n\n /**\n * Will set the currently bound buffer to an attribute of the shader program. Used by `#enableAttributes`\n * internally.\n * @param {string} attribName Attribute name\n * @param {number} size Number of components per attributes\n * @param {number} type UNSIGNED_INT, UNSIGNED_BYTE, UNSIGNED_SHORT or FLOAT\n * @param {number} stride Stride in bytes (0 means attribs are packed)\n * @param {number} offset Offset in bytes\n * @private\n */\n enableAttributeArray_(attribName, size, type, stride, offset) {\n const location = this.getAttributeLocation(attribName);\n // the attribute has not been found in the shaders; do not enable it\n if (location < 0) {\n return;\n }\n this.getGL().enableVertexAttribArray(location);\n this.getGL().vertexAttribPointer(\n location,\n size,\n type,\n false,\n stride,\n offset\n );\n }\n\n /**\n * Will enable the following attributes to be read from the currently bound buffer,\n * i.e. tell the GPU where to read the different attributes in the buffer. An error in the\n * size/type/order of attributes will most likely break the rendering and throw a WebGL exception.\n * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer\n * @api\n */\n enableAttributes(attributes) {\n const stride = computeAttributesStride(attributes);\n let offset = 0;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes[i];\n this.enableAttributeArray_(\n attr.name,\n attr.size,\n attr.type || FLOAT,\n stride,\n offset\n );\n offset += attr.size * getByteSizeFromType(attr.type);\n }\n }\n\n /**\n * WebGL context was lost\n * @private\n */\n handleWebGLContextLost() {\n clear(this.bufferCache_);\n this.currentProgram_ = null;\n }\n\n /**\n * WebGL context was restored\n * @private\n */\n handleWebGLContextRestored() {}\n\n /**\n * Will create or reuse a given webgl texture and apply the given size. If no image data\n * specified, the texture will be empty, otherwise image data will be used and the `size`\n * parameter will be ignored.\n * Note: wrap parameters are set to clamp to edge, min filter is set to linear.\n * @param {Array<number>} size Expected size of the texture\n * @param {ImageData|HTMLImageElement|HTMLCanvasElement} [opt_data] Image data/object to bind to the texture\n * @param {WebGLTexture} [opt_texture] Existing texture to reuse\n * @return {WebGLTexture} The generated texture\n * @api\n */\n createTexture(size, opt_data, opt_texture) {\n const gl = this.getGL();\n const texture = opt_texture || gl.createTexture();\n\n // set params & size\n const level = 0;\n const internalFormat = gl.RGBA;\n const border = 0;\n const format = gl.RGBA;\n const type = gl.UNSIGNED_BYTE;\n gl.bindTexture(gl.TEXTURE_2D, texture);\n if (opt_data) {\n gl.texImage2D(\n gl.TEXTURE_2D,\n level,\n internalFormat,\n format,\n type,\n opt_data\n );\n } else {\n gl.texImage2D(\n gl.TEXTURE_2D,\n level,\n internalFormat,\n size[0],\n size[1],\n border,\n format,\n type,\n null\n );\n }\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n return texture;\n }\n}\n\n/**\n * Compute a stride in bytes based on a list of attributes\n * @param {Array<AttributeDescription>} attributes Ordered list of attributes\n * @returns {number} Stride, ie amount of values for each vertex in the vertex buffer\n * @api\n */\nexport function computeAttributesStride(attributes) {\n let stride = 0;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes[i];\n stride += attr.size * getByteSizeFromType(attr.type);\n }\n return stride;\n}\n\n/**\n * Computes the size in byte of an attribute type.\n * @param {AttributeType} type Attribute type\n * @returns {number} The size in bytes\n */\nfunction getByteSizeFromType(type) {\n switch (type) {\n case AttributeType.UNSIGNED_BYTE:\n return Uint8Array.BYTES_PER_ELEMENT;\n case AttributeType.UNSIGNED_SHORT:\n return Uint16Array.BYTES_PER_ELEMENT;\n case AttributeType.UNSIGNED_INT:\n return Uint32Array.BYTES_PER_ELEMENT;\n case AttributeType.FLOAT:\n default:\n return Float32Array.BYTES_PER_ELEMENT;\n }\n}\n\nexport default WebGLHelper;\n","/**\n * @module ol/renderer/webgl/Layer\n */\nimport LayerRenderer from '../Layer.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport WebGLHelper from '../../webgl/Helper.js';\n\n/**\n * @enum {string}\n */\nexport const WebGLWorkerMessageType = {\n GENERATE_BUFFERS: 'GENERATE_BUFFERS',\n};\n\n/**\n * @typedef {Object} WebGLWorkerGenerateBuffersMessage\n * This message will trigger the generation of a vertex and an index buffer based on the given render instructions.\n * When the buffers are generated, the worked will send a message of the same type to the main thread, with\n * the generated buffers in it.\n * Note that any addition properties present in the message *will* be sent back to the main thread.\n * @property {WebGLWorkerMessageType} type Message type\n * @property {ArrayBuffer} renderInstructions Render instructions raw binary buffer.\n * @property {ArrayBuffer} [vertexBuffer] Vertices array raw binary buffer (sent by the worker).\n * @property {ArrayBuffer} [indexBuffer] Indices array raw binary buffer (sent by the worker).\n * @property {number} [customAttributesCount] Amount of custom attributes count in the render instructions.\n */\n\n/**\n * @typedef {Object} PostProcessesOptions\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas that will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object.<string,import(\"../../webgl/Helper\").UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the canvas element.\n * @property {Object.<string,import(\"../../webgl/Helper\").UniformValue>} [uniforms] Uniform definitions for the post process steps\n * @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions\n */\n\n/**\n * @classdesc\n * Base WebGL renderer class.\n * Holds all logic related to data manipulation & some common rendering logic\n * @template {import(\"../../layer/Layer.js\").default} LayerType\n */\nclass WebGLLayerRenderer extends LayerRenderer {\n /**\n * @param {LayerType} layer Layer.\n * @param {Options=} [opt_options] Options.\n */\n constructor(layer, opt_options) {\n super(layer);\n\n const options = opt_options || {};\n\n /**\n * @type {WebGLHelper}\n * @protected\n */\n this.helper = new WebGLHelper({\n postProcesses: options.postProcesses,\n uniforms: options.uniforms,\n });\n\n if (options.className !== undefined) {\n this.helper.getCanvas().className = options.className;\n }\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n this.helper.dispose();\n super.disposeInternal();\n }\n\n /**\n * Will return the last shader compilation errors. If no error happened, will return null;\n * @return {string|null} Errors, or null if last compilation was successful\n * @api\n */\n getShaderCompileErrors() {\n return this.helper.getShaderCompileErrors();\n }\n\n /**\n * @param {import(\"../../render/EventType.js\").default} type Event type.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @private\n */\n dispatchRenderEvent_(type, frameState) {\n const layer = this.getLayer();\n if (layer.hasListener(type)) {\n // RenderEvent does not get a context or an inversePixelTransform, because WebGL allows much less direct editing than Canvas2d does.\n const event = new RenderEvent(type, null, frameState, null);\n layer.dispatchEvent(event);\n }\n }\n\n /**\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @protected\n */\n preRender(frameState) {\n this.dispatchRenderEvent_(RenderEventType.PRERENDER, frameState);\n }\n\n /**\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @protected\n */\n postRender(frameState) {\n this.dispatchRenderEvent_(RenderEventType.POSTRENDER, frameState);\n }\n}\n\nconst tmpArray_ = [];\nconst bufferPositions_ = {vertexPosition: 0, indexPosition: 0};\n\nfunction writePointVertex(buffer, pos, x, y, index) {\n buffer[pos + 0] = x;\n buffer[pos + 1] = y;\n buffer[pos + 2] = index;\n}\n\n/**\n * An object holding positions both in an index and a vertex buffer.\n * @typedef {Object} BufferPositions\n * @property {number} vertexPosition Position in the vertex buffer\n * @property {number} indexPosition Position in the index buffer\n */\n\n/**\n * Pushes a quad (two triangles) based on a point geometry\n * @param {Float32Array} instructions Array of render instructions for points.\n * @param {number} elementIndex Index from which render instructions will be read.\n * @param {Float32Array} vertexBuffer Buffer in the form of a typed array.\n * @param {Uint32Array} indexBuffer Buffer in the form of a typed array.\n * @param {number} customAttributesCount Amount of custom attributes for each element.\n * @param {BufferPositions} [bufferPositions] Buffer write positions; if not specified, positions will be set at 0.\n * @return {BufferPositions} New buffer positions where to write next\n * @property {number} vertexPosition New position in the vertex buffer where future writes should start.\n * @property {number} indexPosition New position in the index buffer where future writes should start.\n * @private\n */\nexport function writePointFeatureToBuffers(\n instructions,\n elementIndex,\n vertexBuffer,\n indexBuffer,\n customAttributesCount,\n bufferPositions\n) {\n // This is for x, y and index\n const baseVertexAttrsCount = 3;\n const baseInstructionsCount = 2;\n const stride = baseVertexAttrsCount + customAttributesCount;\n\n const x = instructions[elementIndex + 0];\n const y = instructions[elementIndex + 1];\n\n // read custom numerical attributes on the feature\n const customAttrs = tmpArray_;\n customAttrs.length = customAttributesCount;\n for (let i = 0; i < customAttrs.length; i++) {\n customAttrs[i] = instructions[elementIndex + baseInstructionsCount + i];\n }\n\n let vPos = bufferPositions ? bufferPositions.vertexPosition : 0;\n let iPos = bufferPositions ? bufferPositions.indexPosition : 0;\n const baseIndex = vPos / stride;\n\n // push vertices for each of the four quad corners (first standard then custom attributes)\n writePointVertex(vertexBuffer, vPos, x, y, 0);\n customAttrs.length &&\n vertexBuffer.set(customAttrs, vPos + baseVertexAttrsCount);\n vPos += stride;\n\n writePointVertex(vertexBuffer, vPos, x, y, 1);\n customAttrs.length &&\n vertexBuffer.set(customAttrs, vPos + baseVertexAttrsCount);\n vPos += stride;\n\n writePointVertex(vertexBuffer, vPos, x, y, 2);\n customAttrs.length &&\n vertexBuffer.set(customAttrs, vPos + baseVertexAttrsCount);\n vPos += stride;\n\n writePointVertex(vertexBuffer, vPos, x, y, 3);\n customAttrs.length &&\n vertexBuffer.set(customAttrs, vPos + baseVertexAttrsCount);\n vPos += stride;\n\n indexBuffer[iPos++] = baseIndex;\n indexBuffer[iPos++] = baseIndex + 1;\n indexBuffer[iPos++] = baseIndex + 3;\n indexBuffer[iPos++] = baseIndex + 1;\n indexBuffer[iPos++] = baseIndex + 2;\n indexBuffer[iPos++] = baseIndex + 3;\n\n bufferPositions_.vertexPosition = vPos;\n bufferPositions_.indexPosition = iPos;\n\n return bufferPositions_;\n}\n\n/**\n * Returns a texture of 1x1 pixel, white\n * @private\n * @return {ImageData} Image data.\n */\nexport function getBlankImageData() {\n const canvas = document.createElement('canvas');\n const image = canvas.getContext('2d').createImageData(1, 1);\n image.data[0] = 255;\n image.data[1] = 255;\n image.data[2] = 255;\n image.data[3] = 255;\n return image;\n}\n\n/**\n * Generates a color array based on a numerical id\n * Note: the range for each component is 0 to 1 with 256 steps\n * @param {number} id Id\n * @param {Array<number>} [opt_array] Reusable array\n * @return {Array<number>} Color array containing the encoded id\n */\nexport function colorEncodeId(id, opt_array) {\n const array = opt_array || [];\n const radix = 256;\n const divide = radix - 1;\n array[0] = Math.floor(id / radix / radix / radix) / divide;\n array[1] = (Math.floor(id / radix / radix) % radix) / divide;\n array[2] = (Math.floor(id / radix) % radix) / divide;\n array[3] = (id % radix) / divide;\n return array;\n}\n\n/**\n * Reads an id from a color-encoded array\n * Note: the expected range for each component is 0 to 1 with 256 steps.\n * @param {Array<number>} color Color array containing the encoded id\n * @return {number} Decoded id\n */\nexport function colorDecodeId(color) {\n let id = 0;\n const radix = 256;\n const mult = radix - 1;\n id += Math.round(color[0] * radix * radix * radix * mult);\n id += Math.round(color[1] * radix * radix * mult);\n id += Math.round(color[2] * radix * mult);\n id += Math.round(color[3] * mult);\n return id;\n}\n\nexport default WebGLLayerRenderer;\n","/**\n * A wrapper class to simplify rendering to a texture instead of the final canvas\n * @module ol/webgl/RenderTarget\n */\nimport {equals} from '../array.js';\n\n// for pixel color reading\nconst tmpArray4 = new Uint8Array(4);\n\n/**\n * @classdesc\n * This class is a wrapper around the association of both a `WebGLTexture` and a `WebGLFramebuffer` instances,\n * simplifying initialization and binding for rendering.\n * @api\n */\nclass WebGLRenderTarget {\n /**\n * @param {import(\"./Helper.js\").default} helper WebGL helper; mandatory.\n * @param {Array<number>} [opt_size] Expected size of the render target texture; note: this can be changed later on.\n */\n constructor(helper, opt_size) {\n /**\n * @private\n * @type {import(\"./Helper.js\").default}\n */\n this.helper_ = helper;\n const gl = helper.getGL();\n\n /**\n * @private\n * @type {WebGLTexture}\n */\n this.texture_ = gl.createTexture();\n\n /**\n * @private\n * @type {WebGLFramebuffer}\n */\n this.framebuffer_ = gl.createFramebuffer();\n\n /**\n * @type {Array<number>}\n * @private\n */\n this.size_ = opt_size || [1, 1];\n\n /**\n * @type {Uint8Array}\n * @private\n */\n this.data_ = new Uint8Array(0);\n\n /**\n * @type {boolean}\n * @private\n */\n this.dataCacheDirty_ = true;\n\n this.updateSize_();\n }\n\n /**\n * Changes the size of the render target texture. Note: will do nothing if the size\n * is already the same.\n * @param {Array<number>} size Expected size of the render target texture\n * @api\n */\n setSize(size) {\n if (equals(size, this.size_)) {\n return;\n }\n this.size_[0] = size[0];\n this.size_[1] = size[1];\n this.updateSize_();\n }\n\n /**\n * Returns the size of the render target texture\n * @return {Array<number>} Size of the render target texture\n * @api\n */\n getSize() {\n return this.size_;\n }\n\n /**\n * This will cause following calls to `#readAll` or `#readPixel` to download the content of the\n * render target into memory, which is an expensive operation.\n * This content will be kept in cache but should be cleared after each new render.\n * @api\n */\n clearCachedData() {\n this.dataCacheDirty_ = true;\n }\n\n /**\n * Returns the full content of the frame buffer as a series of r, g, b, a components\n * in the 0-255 range (unsigned byte).\n * @return {Uint8Array} Integer array of color values\n * @api\n */\n readAll() {\n if (this.dataCacheDirty_) {\n const size = this.size_;\n const gl = this.helper_.getGL();\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer_);\n gl.readPixels(\n 0,\n 0,\n size[0],\n size[1],\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n this.data_\n );\n this.dataCacheDirty_ = false;\n }\n return this.data_;\n }\n\n /**\n * Reads one pixel of the frame buffer as an array of r, g, b, a components\n * in the 0-255 range (unsigned byte).\n * If x and/or y are outside of existing data, an array filled with 0 is returned.\n * @param {number} x Pixel coordinate\n * @param {number} y Pixel coordinate\n * @returns {Uint8Array} Integer array with one color value (4 components)\n * @api\n */\n readPixel(x, y) {\n if (x < 0 || y < 0 || x > this.size_[0] || y >= this.size_[1]) {\n tmpArray4[0] = 0;\n tmpArray4[1] = 0;\n tmpArray4[2] = 0;\n tmpArray4[3] = 0;\n return tmpArray4;\n }\n\n this.readAll();\n const index =\n Math.floor(x) + (this.size_[1] - Math.floor(y) - 1) * this.size_[0];\n tmpArray4[0] = this.data_[index * 4];\n tmpArray4[1] = this.data_[index * 4 + 1];\n tmpArray4[2] = this.data_[index * 4 + 2];\n tmpArray4[3] = this.data_[index * 4 + 3];\n return tmpArray4;\n }\n\n /**\n * @return {WebGLTexture} Texture to render to\n */\n getTexture() {\n return this.texture_;\n }\n\n /**\n * @return {WebGLFramebuffer} Frame buffer of the render target\n */\n getFramebuffer() {\n return this.framebuffer_;\n }\n\n /**\n * @private\n */\n updateSize_() {\n const size = this.size_;\n const gl = this.helper_.getGL();\n\n this.texture_ = this.helper_.createTexture(size, null, this.texture_);\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer_);\n gl.viewport(0, 0, size[0], size[1]);\n gl.framebufferTexture2D(\n gl.FRAMEBUFFER,\n gl.COLOR_ATTACHMENT0,\n gl.TEXTURE_2D,\n this.texture_,\n 0\n );\n\n this.data_ = new Uint8Array(size[0] * size[1] * 4);\n }\n}\n\nexport default WebGLRenderTarget;\n","\n const source = \"var e=\\\"function\\\"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError(\\\"Cannot convert undefined or null to object\\\");for(var t=Object(e),r=1,o=arguments.length;r<o;++r){var i=arguments[r];if(null!=i)for(var f in i)i.hasOwnProperty(f)&&(t[f]=i[f])}return t},n=\\\"GENERATE_BUFFERS\\\",t=[],r={vertexPosition:0,indexPosition:0};function o(e,n,t,r,o){e[n+0]=t,e[n+1]=r,e[n+2]=o}function i(e,n,i,f,s,u){var a=3+s,l=e[n+0],v=e[n+1],c=t;c.length=s;for(var g=0;g<c.length;g++)c[g]=e[n+2+g];var b=u?u.vertexPosition:0,h=u?u.indexPosition:0,d=b/a;return o(i,b,l,v,0),c.length&&i.set(c,b+3),o(i,b+=a,l,v,1),c.length&&i.set(c,b+3),o(i,b+=a,l,v,2),c.length&&i.set(c,b+3),o(i,b+=a,l,v,3),c.length&&i.set(c,b+3),b+=a,f[h++]=d,f[h++]=d+1,f[h++]=d+3,f[h++]=d+1,f[h++]=d+2,f[h++]=d+3,r.vertexPosition=b,r.indexPosition=h,r}var f=self;f.onmessage=function(t){var r=t.data;if(r.type===n){for(var o=r.customAttributesCount,s=2+o,u=new Float32Array(r.renderInstructions),a=u.length/s,l=4*a*(o+3),v=new Uint32Array(6*a),c=new Float32Array(l),g=null,b=0;b<u.length;b+=s)g=i(u,b,c,v,o,g);var h=e({vertexBuffer:c.buffer,indexBuffer:v.buffer,renderInstructions:u.buffer},r);f.postMessage(h,[c.buffer,v.buffer,u.buffer])}};\";\n const blob = new Blob([source], {type: 'application/javascript'});\n const url = URL.createObjectURL(blob);\n export function create() {\n return new Worker(url);\n }\n \n","/**\n * @module ol/renderer/webgl/PointsLayer\n */\nimport BaseVector from '../../layer/BaseVector.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport VectorEventType from '../../source/VectorEventType.js';\nimport ViewHint from '../../ViewHint.js';\nimport WebGLArrayBuffer from '../../webgl/Buffer.js';\nimport WebGLLayerRenderer, {\n WebGLWorkerMessageType,\n colorDecodeId,\n colorEncodeId,\n} from './Layer.js';\nimport WebGLRenderTarget from '../../webgl/RenderTarget.js';\nimport {ARRAY_BUFFER, DYNAMIC_DRAW, ELEMENT_ARRAY_BUFFER} from '../../webgl.js';\nimport {AttributeType, DefaultUniform} from '../../webgl/Helper.js';\nimport {\n apply as applyTransform,\n create as createTransform,\n makeInverse as makeInverseTransform,\n multiply as multiplyTransform,\n} from '../../transform.js';\nimport {assert} from '../../asserts.js';\nimport {buffer, createEmpty, equals} from '../../extent.js';\nimport {create as createWebGLWorker} from '../../worker/webgl.js';\nimport {getUid} from '../../util.js';\nimport {listen, unlistenByKey} from '../../events.js';\n\n/**\n * @typedef {Object} CustomAttribute A description of a custom attribute to be passed on to the GPU, with a value different\n * for each feature.\n * @property {string} name Attribute name.\n * @property {function(import(\"../../Feature\").default, Object<string, *>):number} callback This callback computes the numerical value of the\n * attribute for a given feature (properties are available as 2nd arg for quicker access).\n */\n\n/**\n * @typedef {Object} FeatureCacheItem Object that holds a reference to a feature, its geometry and properties. Used to optimize\n * rebuildBuffers by accessing these objects quicker.\n * @property {import(\"../../Feature\").default} feature Feature\n * @property {Object<string, *>} properties Feature properties\n * @property {import(\"../../geom\").Geometry} geometry Feature geometry\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the canvas element.\n * @property {Array<CustomAttribute>} [attributes] These attributes will be read from the features in the source and then\n * passed to the GPU. The `name` property of each attribute will serve as its identifier:\n * * In the vertex shader as an `attribute` by prefixing it with `a_`\n * * In the fragment shader as a `varying` by prefixing it with `v_`\n * Please note that these can only be numerical values.\n * @property {string} vertexShader Vertex shader source, mandatory.\n * @property {string} fragmentShader Fragment shader source, mandatory.\n * @property {string} [hitVertexShader] Vertex shader source for hit detection rendering.\n * @property {string} [hitFragmentShader] Fragment shader source for hit detection rendering.\n * @property {Object.<string,import(\"../../webgl/Helper\").UniformValue>} [uniforms] Uniform definitions for the post process steps\n * Please note that `u_texture` is reserved for the main texture slot.\n * @property {Array<import(\"./Layer\").PostProcessesOptions>} [postProcesses] Post-processes definitions\n */\n\n/**\n * @classdesc\n * WebGL vector renderer optimized for points.\n * All features will be rendered as quads (two triangles forming a square). New data will be flushed to the GPU\n * every time the vector source changes.\n *\n * You need to provide vertex and fragment shaders for rendering. This can be done using\n * {@link module:ol/webgl/ShaderBuilder} utilities. These shaders shall expect a `a_position` attribute\n * containing the screen-space projected center of the quad, as well as a `a_index` attribute\n * whose value (0, 1, 2 or 3) indicates which quad vertex is currently getting processed (see structure below).\n *\n * To include variable attributes in the shaders, you need to declare them using the `attributes` property of\n * the options object like so:\n * ```js\n * new WebGLPointsLayerRenderer(layer, {\n * attributes: [\n * {\n * name: 'size',\n * callback: function(feature) {\n * // compute something with the feature\n * }\n * },\n * {\n * name: 'weight',\n * callback: function(feature) {\n * // compute something with the feature\n * }\n * },\n * ],\n * vertexShader:\n * // shader using attribute a_weight and a_size\n * fragmentShader:\n * // shader using varying v_weight and v_size\n * ```\n *\n * To enable hit detection, you must as well provide dedicated shaders using the `hitVertexShader`\n * and `hitFragmentShader` properties. These shall expect the `a_hitColor` attribute to contain\n * the final color that will have to be output for hit detection to work.\n *\n * The following uniform is used for the main texture: `u_texture`.\n *\n * Please note that the main shader output should have premultiplied alpha, otherwise visual anomalies may occur.\n *\n * Points are rendered as quads with the following structure:\n *\n * ```\n * (u0, v1) (u1, v1)\n * [3]----------[2]\n * |` |\n * | ` |\n * | ` |\n * | ` |\n * | ` |\n * | ` |\n * [0]----------[1]\n * (u0, v0) (u1, v0)\n * ```\n *\n * This uses {@link module:ol/webgl/Helper~WebGLHelper} internally.\n *\n * @api\n */\nclass WebGLPointsLayerRenderer extends WebGLLayerRenderer {\n /**\n * @param {import(\"../../layer/Layer.js\").default} layer Layer.\n * @param {Options} options Options.\n */\n constructor(layer, options) {\n const uniforms = options.uniforms || {};\n const projectionMatrixTransform = createTransform();\n uniforms[DefaultUniform.PROJECTION_MATRIX] = projectionMatrixTransform;\n\n super(layer, {\n className: options.className,\n uniforms: uniforms,\n postProcesses: options.postProcesses,\n });\n\n this.sourceRevision_ = -1;\n\n this.verticesBuffer_ = new WebGLArrayBuffer(ARRAY_BUFFER, DYNAMIC_DRAW);\n this.hitVerticesBuffer_ = new WebGLArrayBuffer(ARRAY_BUFFER, DYNAMIC_DRAW);\n this.indicesBuffer_ = new WebGLArrayBuffer(\n ELEMENT_ARRAY_BUFFER,\n DYNAMIC_DRAW\n );\n\n this.program_ = this.helper.getProgram(\n options.fragmentShader,\n options.vertexShader\n );\n\n /**\n * @type {boolean}\n * @private\n */\n this.hitDetectionEnabled_ =\n options.hitFragmentShader && options.hitVertexShader ? true : false;\n\n this.hitProgram_ =\n this.hitDetectionEnabled_ &&\n this.helper.getProgram(\n options.hitFragmentShader,\n options.hitVertexShader\n );\n\n const customAttributes = options.attributes\n ? options.attributes.map(function (attribute) {\n return {\n name: 'a_' + attribute.name,\n size: 1,\n type: AttributeType.FLOAT,\n };\n })\n : [];\n\n /**\n * A list of attributes used by the renderer. By default only the position and\n * index of the vertex (0 to 3) are required.\n * @type {Array<import('../../webgl/Helper.js').AttributeDescription>}\n */\n this.attributes = [\n {\n name: 'a_position',\n size: 2,\n type: AttributeType.FLOAT,\n },\n {\n name: 'a_index',\n size: 1,\n type: AttributeType.FLOAT,\n },\n ].concat(customAttributes);\n\n /**\n * A list of attributes used for hit detection.\n * @type {Array<import('../../webgl/Helper.js').AttributeDescription>}\n */\n this.hitDetectionAttributes = [\n {\n name: 'a_position',\n size: 2,\n type: AttributeType.FLOAT,\n },\n {\n name: 'a_index',\n size: 1,\n type: AttributeType.FLOAT,\n },\n {\n name: 'a_hitColor',\n size: 4,\n type: AttributeType.FLOAT,\n },\n {\n name: 'a_featureUid',\n size: 1,\n type: AttributeType.FLOAT,\n },\n ].concat(customAttributes);\n\n this.customAttributes = options.attributes ? options.attributes : [];\n\n this.previousExtent_ = createEmpty();\n\n /**\n * This transform is updated on every frame and is the composition of:\n * - invert of the world->screen transform that was used when rebuilding buffers (see `this.renderTransform_`)\n * - current world->screen transform\n * @type {import(\"../../transform.js\").Transform}\n * @private\n */\n this.currentTransform_ = projectionMatrixTransform;\n\n /**\n * This transform is updated when buffers are rebuilt and converts world space coordinates to screen space\n * @type {import(\"../../transform.js\").Transform}\n * @private\n */\n this.renderTransform_ = createTransform();\n\n /**\n * @type {import(\"../../transform.js\").Transform}\n * @private\n */\n this.invertRenderTransform_ = createTransform();\n\n /**\n * @type {Float32Array}\n * @private\n */\n this.renderInstructions_ = new Float32Array(0);\n\n /**\n * These instructions are used for hit detection\n * @type {Float32Array}\n * @private\n */\n this.hitRenderInstructions_ = new Float32Array(0);\n\n /**\n * @type {WebGLRenderTarget}\n * @private\n */\n this.hitRenderTarget_ =\n this.hitDetectionEnabled_ && new WebGLRenderTarget(this.helper);\n\n this.worker_ = createWebGLWorker();\n this.worker_.addEventListener(\n 'message',\n /**\n * @param {*} event Event.\n * @this {WebGLPointsLayerRenderer}\n */\n function (event) {\n const received = event.data;\n if (received.type === WebGLWorkerMessageType.GENERATE_BUFFERS) {\n const projectionTransform = received.projectionTransform;\n if (received.hitDetection) {\n this.hitVerticesBuffer_.fromArrayBuffer(received.vertexBuffer);\n this.helper.flushBufferData(this.hitVerticesBuffer_);\n } else {\n this.verticesBuffer_.fromArrayBuffer(received.vertexBuffer);\n this.helper.flushBufferData(this.verticesBuffer_);\n }\n this.indicesBuffer_.fromArrayBuffer(received.indexBuffer);\n this.helper.flushBufferData(this.indicesBuffer_);\n\n this.renderTransform_ = projectionTransform;\n makeInverseTransform(\n this.invertRenderTransform_,\n this.renderTransform_\n );\n if (received.hitDetection) {\n this.hitRenderInstructions_ = new Float32Array(\n event.data.renderInstructions\n );\n } else {\n this.renderInstructions_ = new Float32Array(\n event.data.renderInstructions\n );\n }\n\n this.getLayer().changed();\n }\n }.bind(this)\n );\n\n /**\n * This object will be updated when the source changes. Key is uid.\n * @type {Object<string, FeatureCacheItem>}\n * @private\n */\n this.featureCache_ = {};\n\n /**\n * Amount of features in the cache.\n * @type {number}\n * @private\n */\n this.featureCount_ = 0;\n\n const source = this.getLayer().getSource();\n this.sourceListenKeys_ = [\n listen(\n source,\n VectorEventType.ADDFEATURE,\n this.handleSourceFeatureAdded_,\n this\n ),\n listen(\n source,\n VectorEventType.CHANGEFEATURE,\n this.handleSourceFeatureChanged_,\n this\n ),\n listen(\n source,\n VectorEventType.REMOVEFEATURE,\n this.handleSourceFeatureDelete_,\n this\n ),\n listen(\n source,\n VectorEventType.CLEAR,\n this.handleSourceFeatureClear_,\n this\n ),\n ];\n source.forEachFeature(\n function (feature) {\n this.featureCache_[getUid(feature)] = {\n feature: feature,\n properties: feature.getProperties(),\n geometry: feature.getGeometry(),\n };\n this.featureCount_++;\n }.bind(this)\n );\n }\n\n /**\n * @param {import(\"../../source/Vector.js\").VectorSourceEvent} event Event.\n * @private\n */\n handleSourceFeatureAdded_(event) {\n const feature = event.feature;\n this.featureCache_[getUid(feature)] = {\n feature: feature,\n properties: feature.getProperties(),\n geometry: feature.getGeometry(),\n };\n this.featureCount_++;\n }\n\n /**\n * @param {import(\"../../source/Vector.js\").VectorSourceEvent} event Event.\n * @private\n */\n handleSourceFeatureChanged_(event) {\n const feature = event.feature;\n this.featureCache_[getUid(feature)] = {\n feature: feature,\n properties: feature.getProperties(),\n geometry: feature.getGeometry(),\n };\n }\n\n /**\n * @param {import(\"../../source/Vector.js\").VectorSourceEvent} event Event.\n * @private\n */\n handleSourceFeatureDelete_(event) {\n const feature = event.feature;\n delete this.featureCache_[getUid(feature)];\n this.featureCount_--;\n }\n\n /**\n * @private\n */\n handleSourceFeatureClear_() {\n this.featureCache_ = {};\n this.featureCount_ = 0;\n }\n\n /**\n * Render the layer.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @return {HTMLElement} The rendered element.\n */\n renderFrame(frameState) {\n this.preRender(frameState);\n\n const renderCount = this.indicesBuffer_.getSize();\n this.helper.drawElements(0, renderCount);\n this.helper.finalizeDraw(frameState);\n const canvas = this.helper.getCanvas();\n\n const layerState = frameState.layerStatesArray[frameState.layerIndex];\n const opacity = layerState.opacity;\n if (opacity !== parseFloat(canvas.style.opacity)) {\n canvas.style.opacity = String(opacity);\n }\n\n if (this.hitDetectionEnabled_) {\n this.renderHitDetection(frameState);\n this.hitRenderTarget_.clearCachedData();\n }\n\n this.postRender(frameState);\n\n return canvas;\n }\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 prepareFrame(frameState) {\n const layer = this.getLayer();\n const vectorSource = layer.getSource();\n const viewState = frameState.viewState;\n const viewNotMoving =\n !frameState.viewHints[ViewHint.ANIMATING] &&\n !frameState.viewHints[ViewHint.INTERACTING];\n const extentChanged = !equals(this.previousExtent_, frameState.extent);\n const sourceChanged = this.sourceRevision_ < vectorSource.getRevision();\n\n if (sourceChanged) {\n this.sourceRevision_ = vectorSource.getRevision();\n }\n\n if (viewNotMoving && (extentChanged || sourceChanged)) {\n const projection = viewState.projection;\n const resolution = viewState.resolution;\n\n const renderBuffer =\n layer instanceof BaseVector ? layer.getRenderBuffer() : 0;\n const extent = buffer(frameState.extent, renderBuffer * resolution);\n vectorSource.loadFeatures(extent, resolution, projection);\n\n this.rebuildBuffers_(frameState);\n this.previousExtent_ = frameState.extent.slice();\n }\n\n // apply the current projection transform with the invert of the one used to fill buffers\n this.helper.makeProjectionTransform(frameState, this.currentTransform_);\n multiplyTransform(this.currentTransform_, this.invertRenderTransform_);\n\n this.helper.useProgram(this.program_);\n this.helper.prepareDraw(frameState);\n\n // write new data\n this.helper.bindBuffer(this.verticesBuffer_);\n this.helper.bindBuffer(this.indicesBuffer_);\n\n this.helper.enableAttributes(this.attributes);\n\n return true;\n }\n\n /**\n * Rebuild internal webgl buffers based on current view extent; costly, should not be called too much\n * @param {import(\"../../PluggableMap\").FrameState} frameState Frame state.\n * @private\n */\n rebuildBuffers_(frameState) {\n // saves the projection transform for the current frame state\n const projectionTransform = createTransform();\n this.helper.makeProjectionTransform(frameState, projectionTransform);\n\n // here we anticipate the amount of render instructions that we well generate\n // this can be done since we know that for normal render we only have x, y as base instructions,\n // and x, y, r, g, b, a and featureUid for hit render instructions\n // and we also know the amount of custom attributes to append to these\n const totalInstructionsCount =\n (2 + this.customAttributes.length) * this.featureCount_;\n if (\n !this.renderInstructions_ ||\n this.renderInstructions_.length !== totalInstructionsCount\n ) {\n this.renderInstructions_ = new Float32Array(totalInstructionsCount);\n }\n if (this.hitDetectionEnabled_) {\n const totalHitInstructionsCount =\n (7 + this.customAttributes.length) * this.featureCount_;\n if (\n !this.hitRenderInstructions_ ||\n this.hitRenderInstructions_.length !== totalHitInstructionsCount\n ) {\n this.hitRenderInstructions_ = new Float32Array(\n totalHitInstructionsCount\n );\n }\n }\n\n // loop on features to fill the buffer\n let featureCache, geometry;\n const tmpCoords = [];\n const tmpColor = [];\n let renderIndex = 0;\n let hitIndex = 0;\n let hitColor;\n for (const featureUid in this.featureCache_) {\n featureCache = this.featureCache_[featureUid];\n geometry = /** @type {import(\"../../geom\").Point} */ (featureCache.geometry);\n if (!geometry || geometry.getType() !== GeometryType.POINT) {\n continue;\n }\n\n tmpCoords[0] = geometry.getFlatCoordinates()[0];\n tmpCoords[1] = geometry.getFlatCoordinates()[1];\n applyTransform(projectionTransform, tmpCoords);\n\n hitColor = colorEncodeId(hitIndex + 6, tmpColor);\n\n this.renderInstructions_[renderIndex++] = tmpCoords[0];\n this.renderInstructions_[renderIndex++] = tmpCoords[1];\n\n // for hit detection, the feature uid is saved in the opacity value\n // and the index of the opacity value is encoded in the color values\n if (this.hitDetectionEnabled_) {\n this.hitRenderInstructions_[hitIndex++] = tmpCoords[0];\n this.hitRenderInstructions_[hitIndex++] = tmpCoords[1];\n this.hitRenderInstructions_[hitIndex++] = hitColor[0];\n this.hitRenderInstructions_[hitIndex++] = hitColor[1];\n this.hitRenderInstructions_[hitIndex++] = hitColor[2];\n this.hitRenderInstructions_[hitIndex++] = hitColor[3];\n this.hitRenderInstructions_[hitIndex++] = Number(featureUid);\n }\n\n // pushing custom attributes\n let value;\n for (let j = 0; j < this.customAttributes.length; j++) {\n value = this.customAttributes[j].callback(\n featureCache.feature,\n featureCache.properties\n );\n this.renderInstructions_[renderIndex++] = value;\n if (this.hitDetectionEnabled_) {\n this.hitRenderInstructions_[hitIndex++] = value;\n }\n }\n }\n\n /** @type {import('./Layer').WebGLWorkerGenerateBuffersMessage} */\n const message = {\n type: WebGLWorkerMessageType.GENERATE_BUFFERS,\n renderInstructions: this.renderInstructions_.buffer,\n customAttributesCount: this.customAttributes.length,\n };\n // additional properties will be sent back as-is by the worker\n message['projectionTransform'] = projectionTransform;\n this.worker_.postMessage(message, [this.renderInstructions_.buffer]);\n this.renderInstructions_ = null;\n\n /** @type {import('./Layer').WebGLWorkerGenerateBuffersMessage} */\n if (this.hitDetectionEnabled_) {\n const hitMessage = {\n type: WebGLWorkerMessageType.GENERATE_BUFFERS,\n renderInstructions: this.hitRenderInstructions_.buffer,\n customAttributesCount: 5 + this.customAttributes.length,\n };\n hitMessage['projectionTransform'] = projectionTransform;\n hitMessage['hitDetection'] = true;\n this.worker_.postMessage(hitMessage, [\n this.hitRenderInstructions_.buffer,\n ]);\n this.hitRenderInstructions_ = null;\n }\n }\n\n /**\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<T>} callback Feature callback.\n * @param {Array<import(\"../Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n * @return {T|undefined} Callback result.\n * @template T\n */\n forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n callback,\n matches\n ) {\n assert(this.hitDetectionEnabled_, 66);\n if (!this.hitRenderInstructions_) {\n return undefined;\n }\n\n const pixel = applyTransform(\n frameState.coordinateToPixelTransform,\n coordinate.slice()\n );\n\n const data = this.hitRenderTarget_.readPixel(pixel[0] / 2, pixel[1] / 2);\n const color = [data[0] / 255, data[1] / 255, data[2] / 255, data[3] / 255];\n const index = colorDecodeId(color);\n const opacity = this.hitRenderInstructions_[index];\n const uid = Math.floor(opacity).toString();\n\n const source = this.getLayer().getSource();\n const feature = source.getFeatureByUid(uid);\n if (feature) {\n return callback(feature, this.getLayer(), null);\n }\n return undefined;\n }\n\n /**\n * Render the hit detection data to the corresponding render target\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState current frame state\n */\n renderHitDetection(frameState) {\n // skip render entirely if vertex buffers not ready/generated yet\n if (!this.hitVerticesBuffer_.getSize()) {\n return;\n }\n\n this.hitRenderTarget_.setSize([\n Math.floor(frameState.size[0] / 2),\n Math.floor(frameState.size[1] / 2),\n ]);\n\n this.helper.useProgram(this.hitProgram_);\n this.helper.prepareDrawToRenderTarget(\n frameState,\n this.hitRenderTarget_,\n true\n );\n\n this.helper.bindBuffer(this.hitVerticesBuffer_);\n this.helper.bindBuffer(this.indicesBuffer_);\n\n this.helper.enableAttributes(this.hitDetectionAttributes);\n\n const renderCount = this.indicesBuffer_.getSize();\n this.helper.drawElements(0, renderCount);\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n this.worker_.terminate();\n this.layer_ = null;\n this.sourceListenKeys_.forEach(function (key) {\n unlistenByKey(key);\n });\n this.sourceListenKeys_ = null;\n super.disposeInternal();\n }\n}\n\nexport default WebGLPointsLayerRenderer;\n","/**\n * @module ol/layer/Heatmap\n */\nimport VectorLayer from './Vector.js';\nimport WebGLPointsLayerRenderer from '../renderer/webgl/PointsLayer.js';\nimport {assign} from '../obj.js';\nimport {clamp} from '../math.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {getChangeEventType} from '../Object.js';\n\n/**\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 {Array<string>} [gradient=['#00f', '#0ff', '#0f0', '#ff0', '#f00']] The color gradient\n * of the heatmap, specified as an array of CSS color strings.\n * @property {number} [radius=8] Radius size in pixels.\n * @property {number} [blur=15] Blur size in pixels.\n * @property {string|function(import(\"../Feature.js\").default):number} [weight='weight'] The feature\n * attribute to use for the weight or a function that returns a weight from a feature. Weight values\n * should range from 0 to 1 (and values outside will be clamped to that range).\n * @property {import(\"../source/Vector.js\").default} [source] Source.\n */\n\n/**\n * @enum {string}\n * @private\n */\nconst Property = {\n BLUR: 'blur',\n GRADIENT: 'gradient',\n RADIUS: 'radius',\n};\n\n/**\n * @const\n * @type {Array<string>}\n */\nconst DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00'];\n\n/**\n * @classdesc\n * Layer for rendering vector data as a heatmap.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @fires import(\"../render/Event.js\").RenderEvent\n * @api\n */\nclass Heatmap extends VectorLayer {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n const baseOptions = assign({}, options);\n\n delete baseOptions.gradient;\n delete baseOptions.radius;\n delete baseOptions.blur;\n delete baseOptions.weight;\n super(baseOptions);\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.gradient_ = null;\n\n this.addEventListener(\n getChangeEventType(Property.GRADIENT),\n this.handleGradientChanged_\n );\n\n this.setGradient(options.gradient ? options.gradient : DEFAULT_GRADIENT);\n\n this.setBlur(options.blur !== undefined ? options.blur : 15);\n\n this.setRadius(options.radius !== undefined ? options.radius : 8);\n\n const weight = options.weight ? options.weight : 'weight';\n if (typeof weight === 'string') {\n this.weightFunction_ = function (feature) {\n return feature.get(weight);\n };\n } else {\n this.weightFunction_ = weight;\n }\n\n // For performance reasons, don't sort the features before rendering.\n // The render order is not relevant for a heatmap representation.\n this.setRenderOrder(null);\n }\n\n /**\n * Return the blur size in pixels.\n * @return {number} Blur size in pixels.\n * @api\n * @observable\n */\n getBlur() {\n return /** @type {number} */ (this.get(Property.BLUR));\n }\n\n /**\n * Return the gradient colors as array of strings.\n * @return {Array<string>} Colors.\n * @api\n * @observable\n */\n getGradient() {\n return /** @type {Array<string>} */ (this.get(Property.GRADIENT));\n }\n\n /**\n * Return the size of the radius in pixels.\n * @return {number} Radius size in pixel.\n * @api\n * @observable\n */\n getRadius() {\n return /** @type {number} */ (this.get(Property.RADIUS));\n }\n\n /**\n * @private\n */\n handleGradientChanged_() {\n this.gradient_ = createGradient(this.getGradient());\n }\n\n /**\n * Set the blur size in pixels.\n * @param {number} blur Blur size in pixels.\n * @api\n * @observable\n */\n setBlur(blur) {\n this.set(Property.BLUR, blur);\n }\n\n /**\n * Set the gradient colors as array of strings.\n * @param {Array<string>} colors Gradient.\n * @api\n * @observable\n */\n setGradient(colors) {\n this.set(Property.GRADIENT, colors);\n }\n\n /**\n * Set the size of the radius in pixels.\n * @param {number} radius Radius size in pixel.\n * @api\n * @observable\n */\n setRadius(radius) {\n this.set(Property.RADIUS, radius);\n }\n\n /**\n * Create a renderer for this layer.\n * @return {WebGLPointsLayerRenderer} A layer renderer.\n */\n createRenderer() {\n return new WebGLPointsLayerRenderer(this, {\n className: this.getClassName(),\n attributes: [\n {\n name: 'weight',\n callback: function (feature) {\n const weight = this.weightFunction_(feature);\n return weight !== undefined ? clamp(weight, 0, 1) : 1;\n }.bind(this),\n },\n ],\n vertexShader: `\n precision mediump float;\n uniform mat4 u_projectionMatrix;\n uniform mat4 u_offsetScaleMatrix;\n uniform float u_size;\n attribute vec2 a_position;\n attribute float a_index;\n attribute float a_weight;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n\n void main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix;\n float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n v_texCoord = vec2(u, v);\n v_weight = a_weight;\n }`,\n fragmentShader: `\n precision mediump float;\n uniform float u_blurSlope;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n\n void main(void) {\n vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n gl_FragColor = vec4(alpha, alpha, alpha, alpha);\n }`,\n hitVertexShader: `\n precision mediump float;\n uniform mat4 u_projectionMatrix;\n uniform mat4 u_offsetScaleMatrix;\n uniform float u_size;\n attribute vec2 a_position;\n attribute float a_index;\n attribute float a_weight;\n attribute vec4 a_hitColor;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n varying vec4 v_hitColor;\n\n void main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix;\n float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n v_texCoord = vec2(u, v);\n v_hitColor = a_hitColor;\n v_weight = a_weight;\n }`,\n hitFragmentShader: `\n precision mediump float;\n uniform float u_blurSlope;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n varying vec4 v_hitColor;\n\n void main(void) {\n vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n if (alpha < 0.05) {\n discard;\n }\n\n gl_FragColor = v_hitColor;\n }`,\n uniforms: {\n u_size: function () {\n return (this.get(Property.RADIUS) + this.get(Property.BLUR)) * 2;\n }.bind(this),\n u_blurSlope: function () {\n return (\n this.get(Property.RADIUS) / Math.max(1, this.get(Property.BLUR))\n );\n }.bind(this),\n },\n postProcesses: [\n {\n fragmentShader: `\n precision mediump float;\n\n uniform sampler2D u_image;\n uniform sampler2D u_gradientTexture;\n\n varying vec2 v_texCoord;\n\n void main() {\n vec4 color = texture2D(u_image, v_texCoord);\n gl_FragColor.a = color.a;\n gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n gl_FragColor.rgb *= gl_FragColor.a;\n }`,\n uniforms: {\n u_gradientTexture: function () {\n return this.gradient_;\n }.bind(this),\n },\n },\n ],\n });\n }\n\n renderDeclutter() {}\n}\n\n/**\n * @param {Array<string>} colors A list of colored.\n * @return {HTMLCanvasElement} canvas with gradient texture.\n */\nfunction createGradient(colors) {\n const width = 1;\n const height = 256;\n const context = createCanvasContext2D(width, height);\n\n const gradient = context.createLinearGradient(0, 0, width, height);\n const step = 1 / (colors.length - 1);\n for (let i = 0, ii = colors.length; i < ii; ++i) {\n gradient.addColorStop(i * step, colors[i]);\n }\n\n context.fillStyle = gradient;\n context.fillRect(0, 0, width, height);\n\n return context.canvas;\n}\n\nexport default Heatmap;\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","'use strict';\n\nmodule.exports = Pbf;\n\nvar ieee754 = require('ieee754');\n\nfunction Pbf(buf) {\n this.buf = ArrayBuffer.isView && ArrayBuffer.isView(buf) ? buf : new Uint8Array(buf || 0);\n this.pos = 0;\n this.type = 0;\n this.length = this.buf.length;\n}\n\nPbf.Varint = 0; // varint: int32, int64, uint32, uint64, sint32, sint64, bool, enum\nPbf.Fixed64 = 1; // 64-bit: double, fixed64, sfixed64\nPbf.Bytes = 2; // length-delimited: string, bytes, embedded messages, packed repeated fields\nPbf.Fixed32 = 5; // 32-bit: float, fixed32, sfixed32\n\nvar SHIFT_LEFT_32 = (1 << 16) * (1 << 16),\n SHIFT_RIGHT_32 = 1 / SHIFT_LEFT_32;\n\n// Threshold chosen based on both benchmarking and knowledge about browser string\n// data structures (which currently switch structure types at 12 bytes or more)\nvar TEXT_DECODER_MIN_LENGTH = 12;\nvar utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf8');\n\nPbf.prototype = {\n\n destroy: function() {\n this.buf = null;\n },\n\n // === READING =================================================================\n\n readFields: function(readField, result, end) {\n end = end || this.length;\n\n while (this.pos < end) {\n var val = this.readVarint(),\n tag = val >> 3,\n startPos = this.pos;\n\n this.type = val & 0x7;\n readField(tag, result, this);\n\n if (this.pos === startPos) this.skip(val);\n }\n return result;\n },\n\n readMessage: function(readField, result) {\n return this.readFields(readField, result, this.readVarint() + this.pos);\n },\n\n readFixed32: function() {\n var val = readUInt32(this.buf, this.pos);\n this.pos += 4;\n return val;\n },\n\n readSFixed32: function() {\n var val = readInt32(this.buf, this.pos);\n this.pos += 4;\n return val;\n },\n\n // 64-bit int handling is based on github.com/dpw/node-buffer-more-ints (MIT-licensed)\n\n readFixed64: function() {\n var val = readUInt32(this.buf, this.pos) + readUInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n this.pos += 8;\n return val;\n },\n\n readSFixed64: function() {\n var val = readUInt32(this.buf, this.pos) + readInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n this.pos += 8;\n return val;\n },\n\n readFloat: function() {\n var val = ieee754.read(this.buf, this.pos, true, 23, 4);\n this.pos += 4;\n return val;\n },\n\n readDouble: function() {\n var val = ieee754.read(this.buf, this.pos, true, 52, 8);\n this.pos += 8;\n return val;\n },\n\n readVarint: function(isSigned) {\n var buf = this.buf,\n val, b;\n\n b = buf[this.pos++]; val = b & 0x7f; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 7; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 14; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 21; if (b < 0x80) return val;\n b = buf[this.pos]; val |= (b & 0x0f) << 28;\n\n return readVarintRemainder(val, isSigned, this);\n },\n\n readVarint64: function() { // for compatibility with v2.0.1\n return this.readVarint(true);\n },\n\n readSVarint: function() {\n var num = this.readVarint();\n return num % 2 === 1 ? (num + 1) / -2 : num / 2; // zigzag encoding\n },\n\n readBoolean: function() {\n return Boolean(this.readVarint());\n },\n\n readString: function() {\n var end = this.readVarint() + this.pos;\n var pos = this.pos;\n this.pos = end;\n\n if (end - pos >= TEXT_DECODER_MIN_LENGTH && utf8TextDecoder) {\n // longer strings are fast with the built-in browser TextDecoder API\n return readUtf8TextDecoder(this.buf, pos, end);\n }\n // short strings are fast with our custom implementation\n return readUtf8(this.buf, pos, end);\n },\n\n readBytes: function() {\n var end = this.readVarint() + this.pos,\n buffer = this.buf.subarray(this.pos, end);\n this.pos = end;\n return buffer;\n },\n\n // verbose for performance reasons; doesn't affect gzipped size\n\n readPackedVarint: function(arr, isSigned) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readVarint(isSigned));\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readVarint(isSigned));\n return arr;\n },\n readPackedSVarint: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readSVarint());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSVarint());\n return arr;\n },\n readPackedBoolean: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readBoolean());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readBoolean());\n return arr;\n },\n readPackedFloat: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readFloat());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFloat());\n return arr;\n },\n readPackedDouble: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readDouble());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readDouble());\n return arr;\n },\n readPackedFixed32: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readFixed32());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFixed32());\n return arr;\n },\n readPackedSFixed32: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed32());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSFixed32());\n return arr;\n },\n readPackedFixed64: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readFixed64());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFixed64());\n return arr;\n },\n readPackedSFixed64: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed64());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSFixed64());\n return arr;\n },\n\n skip: function(val) {\n var type = val & 0x7;\n if (type === Pbf.Varint) while (this.buf[this.pos++] > 0x7f) {}\n else if (type === Pbf.Bytes) this.pos = this.readVarint() + this.pos;\n else if (type === Pbf.Fixed32) this.pos += 4;\n else if (type === Pbf.Fixed64) this.pos += 8;\n else throw new Error('Unimplemented type: ' + type);\n },\n\n // === WRITING =================================================================\n\n writeTag: function(tag, type) {\n this.writeVarint((tag << 3) | type);\n },\n\n realloc: function(min) {\n var length = this.length || 16;\n\n while (length < this.pos + min) length *= 2;\n\n if (length !== this.length) {\n var buf = new Uint8Array(length);\n buf.set(this.buf);\n this.buf = buf;\n this.length = length;\n }\n },\n\n finish: function() {\n this.length = this.pos;\n this.pos = 0;\n return this.buf.subarray(0, this.length);\n },\n\n writeFixed32: function(val) {\n this.realloc(4);\n writeInt32(this.buf, val, this.pos);\n this.pos += 4;\n },\n\n writeSFixed32: function(val) {\n this.realloc(4);\n writeInt32(this.buf, val, this.pos);\n this.pos += 4;\n },\n\n writeFixed64: function(val) {\n this.realloc(8);\n writeInt32(this.buf, val & -1, this.pos);\n writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n this.pos += 8;\n },\n\n writeSFixed64: function(val) {\n this.realloc(8);\n writeInt32(this.buf, val & -1, this.pos);\n writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n this.pos += 8;\n },\n\n writeVarint: function(val) {\n val = +val || 0;\n\n if (val > 0xfffffff || val < 0) {\n writeBigVarint(val, this);\n return;\n }\n\n this.realloc(4);\n\n this.buf[this.pos++] = val & 0x7f | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = (val >>> 7) & 0x7f;\n },\n\n writeSVarint: function(val) {\n this.writeVarint(val < 0 ? -val * 2 - 1 : val * 2);\n },\n\n writeBoolean: function(val) {\n this.writeVarint(Boolean(val));\n },\n\n writeString: function(str) {\n str = String(str);\n this.realloc(str.length * 4);\n\n this.pos++; // reserve 1 byte for short string length\n\n var startPos = this.pos;\n // write the string directly to the buffer and see how much was written\n this.pos = writeUtf8(this.buf, str, this.pos);\n var len = this.pos - startPos;\n\n if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n // finally, write the message length in the reserved place and restore the position\n this.pos = startPos - 1;\n this.writeVarint(len);\n this.pos += len;\n },\n\n writeFloat: function(val) {\n this.realloc(4);\n ieee754.write(this.buf, val, this.pos, true, 23, 4);\n this.pos += 4;\n },\n\n writeDouble: function(val) {\n this.realloc(8);\n ieee754.write(this.buf, val, this.pos, true, 52, 8);\n this.pos += 8;\n },\n\n writeBytes: function(buffer) {\n var len = buffer.length;\n this.writeVarint(len);\n this.realloc(len);\n for (var i = 0; i < len; i++) this.buf[this.pos++] = buffer[i];\n },\n\n writeRawMessage: function(fn, obj) {\n this.pos++; // reserve 1 byte for short message length\n\n // write the message directly to the buffer and see how much was written\n var startPos = this.pos;\n fn(obj, this);\n var len = this.pos - startPos;\n\n if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n // finally, write the message length in the reserved place and restore the position\n this.pos = startPos - 1;\n this.writeVarint(len);\n this.pos += len;\n },\n\n writeMessage: function(tag, fn, obj) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeRawMessage(fn, obj);\n },\n\n writePackedVarint: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedVarint, arr); },\n writePackedSVarint: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSVarint, arr); },\n writePackedBoolean: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedBoolean, arr); },\n writePackedFloat: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFloat, arr); },\n writePackedDouble: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedDouble, arr); },\n writePackedFixed32: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFixed32, arr); },\n writePackedSFixed32: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSFixed32, arr); },\n writePackedFixed64: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFixed64, arr); },\n writePackedSFixed64: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSFixed64, arr); },\n\n writeBytesField: function(tag, buffer) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeBytes(buffer);\n },\n writeFixed32Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeFixed32(val);\n },\n writeSFixed32Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeSFixed32(val);\n },\n writeFixed64Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeFixed64(val);\n },\n writeSFixed64Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeSFixed64(val);\n },\n writeVarintField: function(tag, val) {\n this.writeTag(tag, Pbf.Varint);\n this.writeVarint(val);\n },\n writeSVarintField: function(tag, val) {\n this.writeTag(tag, Pbf.Varint);\n this.writeSVarint(val);\n },\n writeStringField: function(tag, str) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeString(str);\n },\n writeFloatField: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeFloat(val);\n },\n writeDoubleField: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeDouble(val);\n },\n writeBooleanField: function(tag, val) {\n this.writeVarintField(tag, Boolean(val));\n }\n};\n\nfunction readVarintRemainder(l, s, p) {\n var buf = p.buf,\n h, b;\n\n b = buf[p.pos++]; h = (b & 0x70) >> 4; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 3; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 10; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 17; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 24; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x01) << 31; if (b < 0x80) return toNum(l, h, s);\n\n throw new Error('Expected varint not more than 10 bytes');\n}\n\nfunction readPackedEnd(pbf) {\n return pbf.type === Pbf.Bytes ?\n pbf.readVarint() + pbf.pos : pbf.pos + 1;\n}\n\nfunction toNum(low, high, isSigned) {\n if (isSigned) {\n return high * 0x100000000 + (low >>> 0);\n }\n\n return ((high >>> 0) * 0x100000000) + (low >>> 0);\n}\n\nfunction writeBigVarint(val, pbf) {\n var low, high;\n\n if (val >= 0) {\n low = (val % 0x100000000) | 0;\n high = (val / 0x100000000) | 0;\n } else {\n low = ~(-val % 0x100000000);\n high = ~(-val / 0x100000000);\n\n if (low ^ 0xffffffff) {\n low = (low + 1) | 0;\n } else {\n low = 0;\n high = (high + 1) | 0;\n }\n }\n\n if (val >= 0x10000000000000000 || val < -0x10000000000000000) {\n throw new Error('Given varint doesn\\'t fit into 10 bytes');\n }\n\n pbf.realloc(10);\n\n writeBigVarintLow(low, high, pbf);\n writeBigVarintHigh(high, pbf);\n}\n\nfunction writeBigVarintLow(low, high, pbf) {\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos] = low & 0x7f;\n}\n\nfunction writeBigVarintHigh(high, pbf) {\n var lsb = (high & 0x07) << 4;\n\n pbf.buf[pbf.pos++] |= lsb | ((high >>>= 3) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f;\n}\n\nfunction makeRoomForExtraLength(startPos, len, pbf) {\n var extraLen =\n len <= 0x3fff ? 1 :\n len <= 0x1fffff ? 2 :\n len <= 0xfffffff ? 3 : Math.floor(Math.log(len) / (Math.LN2 * 7));\n\n // if 1 byte isn't enough for encoding message length, shift the data to the right\n pbf.realloc(extraLen);\n for (var i = pbf.pos - 1; i >= startPos; i--) pbf.buf[i + extraLen] = pbf.buf[i];\n}\n\nfunction writePackedVarint(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeVarint(arr[i]); }\nfunction writePackedSVarint(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSVarint(arr[i]); }\nfunction writePackedFloat(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFloat(arr[i]); }\nfunction writePackedDouble(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeDouble(arr[i]); }\nfunction writePackedBoolean(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeBoolean(arr[i]); }\nfunction writePackedFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFixed32(arr[i]); }\nfunction writePackedSFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed32(arr[i]); }\nfunction writePackedFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFixed64(arr[i]); }\nfunction writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]); }\n\n// Buffer code below from https://github.com/feross/buffer, MIT-licensed\n\nfunction readUInt32(buf, pos) {\n return ((buf[pos]) |\n (buf[pos + 1] << 8) |\n (buf[pos + 2] << 16)) +\n (buf[pos + 3] * 0x1000000);\n}\n\nfunction writeInt32(buf, val, pos) {\n buf[pos] = val;\n buf[pos + 1] = (val >>> 8);\n buf[pos + 2] = (val >>> 16);\n buf[pos + 3] = (val >>> 24);\n}\n\nfunction readInt32(buf, pos) {\n return ((buf[pos]) |\n (buf[pos + 1] << 8) |\n (buf[pos + 2] << 16)) +\n (buf[pos + 3] << 24);\n}\n\nfunction readUtf8(buf, pos, end) {\n var str = '';\n var i = pos;\n\n while (i < end) {\n var b0 = buf[i];\n var c = null; // codepoint\n var bytesPerSequence =\n b0 > 0xEF ? 4 :\n b0 > 0xDF ? 3 :\n b0 > 0xBF ? 2 : 1;\n\n if (i + bytesPerSequence > end) break;\n\n var b1, b2, b3;\n\n if (bytesPerSequence === 1) {\n if (b0 < 0x80) {\n c = b0;\n }\n } else if (bytesPerSequence === 2) {\n b1 = buf[i + 1];\n if ((b1 & 0xC0) === 0x80) {\n c = (b0 & 0x1F) << 0x6 | (b1 & 0x3F);\n if (c <= 0x7F) {\n c = null;\n }\n }\n } else if (bytesPerSequence === 3) {\n b1 = buf[i + 1];\n b2 = buf[i + 2];\n if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80) {\n c = (b0 & 0xF) << 0xC | (b1 & 0x3F) << 0x6 | (b2 & 0x3F);\n if (c <= 0x7FF || (c >= 0xD800 && c <= 0xDFFF)) {\n c = null;\n }\n }\n } else if (bytesPerSequence === 4) {\n b1 = buf[i + 1];\n b2 = buf[i + 2];\n b3 = buf[i + 3];\n if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n c = (b0 & 0xF) << 0x12 | (b1 & 0x3F) << 0xC | (b2 & 0x3F) << 0x6 | (b3 & 0x3F);\n if (c <= 0xFFFF || c >= 0x110000) {\n c = null;\n }\n }\n }\n\n if (c === null) {\n c = 0xFFFD;\n bytesPerSequence = 1;\n\n } else if (c > 0xFFFF) {\n c -= 0x10000;\n str += String.fromCharCode(c >>> 10 & 0x3FF | 0xD800);\n c = 0xDC00 | c & 0x3FF;\n }\n\n str += String.fromCharCode(c);\n i += bytesPerSequence;\n }\n\n return str;\n}\n\nfunction readUtf8TextDecoder(buf, pos, end) {\n return utf8TextDecoder.decode(buf.subarray(pos, end));\n}\n\nfunction writeUtf8(buf, str, pos) {\n for (var i = 0, c, lead; i < str.length; i++) {\n c = str.charCodeAt(i); // code point\n\n if (c > 0xD7FF && c < 0xE000) {\n if (lead) {\n if (c < 0xDC00) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n lead = c;\n continue;\n } else {\n c = lead - 0xD800 << 10 | c - 0xDC00 | 0x10000;\n lead = null;\n }\n } else {\n if (c > 0xDBFF || (i + 1 === str.length)) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n } else {\n lead = c;\n }\n continue;\n }\n } else if (lead) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n lead = null;\n }\n\n if (c < 0x80) {\n buf[pos++] = c;\n } else {\n if (c < 0x800) {\n buf[pos++] = c >> 0x6 | 0xC0;\n } else {\n if (c < 0x10000) {\n buf[pos++] = c >> 0xC | 0xE0;\n } else {\n buf[pos++] = c >> 0x12 | 0xF0;\n buf[pos++] = c >> 0xC & 0x3F | 0x80;\n }\n buf[pos++] = c >> 0x6 & 0x3F | 0x80;\n }\n buf[pos++] = c & 0x3F | 0x80;\n }\n }\n return pos;\n}\n","/**\n * @module ol/render/Feature\n */\nimport GeometryType from '../geom/GeometryType.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n} from '../transform.js';\nimport {\n createOrUpdateFromCoordinate,\n createOrUpdateFromFlatCoordinates,\n getCenter,\n getHeight,\n} from '../extent.js';\nimport {extend} from '../array.js';\nimport {\n getInteriorPointOfArray,\n getInteriorPointsOfMultiArray,\n} from '../geom/flat/interiorpoint.js';\nimport {get as getProjection} from '../proj.js';\nimport {interpolatePoint} from '../geom/flat/interpolate.js';\nimport {linearRingss as linearRingssCenter} from '../geom/flat/center.js';\nimport {transform2D} from '../geom/flat/transform.js';\n\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nconst tmpTransform = createTransform();\n\n/**\n * Lightweight, read-only, {@link module:ol/Feature~Feature} and {@link module:ol/geom/Geometry~Geometry} like\n * structure, optimized for vector tile rendering and styling. Geometry access\n * through the API is limited to getting the type and extent of the geometry.\n */\nclass RenderFeature {\n /**\n * @param {import(\"../geom/GeometryType.js\").default} type Geometry type.\n * @param {Array<number>} flatCoordinates Flat coordinates. These always need\n * to be right-handed for polygons.\n * @param {Array<number>|Array<Array<number>>} ends Ends or Endss.\n * @param {Object<string, *>} properties Properties.\n * @param {number|string|undefined} id Feature id.\n */\n constructor(type, flatCoordinates, ends, properties, id) {\n /**\n * @private\n * @type {import(\"../extent.js\").Extent|undefined}\n */\n this.extent_;\n\n /**\n * @private\n * @type {number|string|undefined}\n */\n this.id_ = id;\n\n /**\n * @private\n * @type {import(\"../geom/GeometryType.js\").default}\n */\n this.type_ = type;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.flatCoordinates_ = flatCoordinates;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.flatInteriorPoints_ = null;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.flatMidpoints_ = null;\n\n /**\n * @private\n * @type {Array<number>|Array<Array<number>>}\n */\n this.ends_ = ends;\n\n /**\n * @private\n * @type {Object<string, *>}\n */\n this.properties_ = properties;\n }\n\n /**\n * Get a feature property by its key.\n * @param {string} key Key\n * @return {*} Value for the requested key.\n * @api\n */\n get(key) {\n return this.properties_[key];\n }\n\n /**\n * Get the extent of this feature's geometry.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\n getExtent() {\n if (!this.extent_) {\n this.extent_ =\n this.type_ === GeometryType.POINT\n ? createOrUpdateFromCoordinate(this.flatCoordinates_)\n : createOrUpdateFromFlatCoordinates(\n this.flatCoordinates_,\n 0,\n this.flatCoordinates_.length,\n 2\n );\n }\n return this.extent_;\n }\n\n /**\n * @return {Array<number>} Flat interior points.\n */\n getFlatInteriorPoint() {\n if (!this.flatInteriorPoints_) {\n const flatCenter = getCenter(this.getExtent());\n this.flatInteriorPoints_ = getInteriorPointOfArray(\n this.flatCoordinates_,\n 0,\n /** @type {Array<number>} */ (this.ends_),\n 2,\n flatCenter,\n 0\n );\n }\n return this.flatInteriorPoints_;\n }\n\n /**\n * @return {Array<number>} Flat interior points.\n */\n getFlatInteriorPoints() {\n if (!this.flatInteriorPoints_) {\n const flatCenters = linearRingssCenter(\n this.flatCoordinates_,\n 0,\n /** @type {Array<Array<number>>} */ (this.ends_),\n 2\n );\n this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(\n this.flatCoordinates_,\n 0,\n /** @type {Array<Array<number>>} */ (this.ends_),\n 2,\n flatCenters\n );\n }\n return this.flatInteriorPoints_;\n }\n\n /**\n * @return {Array<number>} Flat midpoint.\n */\n getFlatMidpoint() {\n if (!this.flatMidpoints_) {\n this.flatMidpoints_ = interpolatePoint(\n this.flatCoordinates_,\n 0,\n this.flatCoordinates_.length,\n 2,\n 0.5\n );\n }\n return this.flatMidpoints_;\n }\n\n /**\n * @return {Array<number>} Flat midpoints.\n */\n getFlatMidpoints() {\n if (!this.flatMidpoints_) {\n this.flatMidpoints_ = [];\n const flatCoordinates = this.flatCoordinates_;\n let offset = 0;\n const ends = /** @type {Array<number>} */ (this.ends_);\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const midpoint = interpolatePoint(flatCoordinates, offset, end, 2, 0.5);\n extend(this.flatMidpoints_, midpoint);\n offset = end;\n }\n }\n return this.flatMidpoints_;\n }\n\n /**\n * Get the feature identifier. This is a stable identifier for the feature and\n * is set when reading data from a remote source.\n * @return {number|string|undefined} Id.\n * @api\n */\n getId() {\n return this.id_;\n }\n\n /**\n * @return {Array<number>} Flat coordinates.\n */\n getOrientedFlatCoordinates() {\n return this.flatCoordinates_;\n }\n\n /**\n * For API compatibility with {@link module:ol/Feature~Feature}, this method is useful when\n * determining the geometry type in style function (see {@link #getType}).\n * @return {RenderFeature} Feature.\n * @api\n */\n getGeometry() {\n return this;\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {RenderFeature} Simplified geometry.\n */\n getSimplifiedGeometry(squaredTolerance) {\n return this;\n }\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 {RenderFeature} Simplified geometry.\n */\n simplifyTransformed(squaredTolerance, opt_transform) {\n return this;\n }\n\n /**\n * Get the feature properties.\n * @return {Object<string, *>} Feature properties.\n * @api\n */\n getProperties() {\n return this.properties_;\n }\n\n /**\n * @return {number} Stride.\n */\n getStride() {\n return 2;\n }\n\n /**\n * @return {undefined}\n */\n getStyleFunction() {\n return undefined;\n }\n\n /**\n * Get the type of this feature's geometry.\n * @return {import(\"../geom/GeometryType.js\").default} Geometry type.\n * @api\n */\n getType() {\n return this.type_;\n }\n\n /**\n * Transform geometry coordinates from tile pixel space to projected.\n *\n * @param {import(\"../proj.js\").ProjectionLike} projection The data projection\n */\n transform(projection) {\n projection = getProjection(projection);\n const pixelExtent = projection.getExtent();\n const projectedExtent = projection.getWorldExtent();\n if (pixelExtent && projectedExtent) {\n const scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n composeTransform(\n tmpTransform,\n projectedExtent[0],\n projectedExtent[3],\n scale,\n -scale,\n 0,\n 0,\n 0\n );\n transform2D(\n this.flatCoordinates_,\n 0,\n this.flatCoordinates_.length,\n 2,\n tmpTransform,\n this.flatCoordinates_\n );\n }\n }\n /**\n * @return {Array<number>|Array<Array<number>>} Ends or endss.\n */\n getEnds() {\n return this.ends_;\n }\n}\n\nRenderFeature.prototype.getEndss = RenderFeature.prototype.getEnds;\n\n/**\n * @return {Array<number>} Flat coordinates.\n */\nRenderFeature.prototype.getFlatCoordinates =\n RenderFeature.prototype.getOrientedFlatCoordinates;\n\nexport default RenderFeature;\n","/**\n * @module ol/format/MVT\n */\n//FIXME Implement projection handling\n\nimport FeatureFormat, {transformGeometryWithOptions} from './Feature.js';\nimport FormatType from './FormatType.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport PBF from 'pbf';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport Projection from '../proj/Projection.js';\nimport RenderFeature from '../render/Feature.js';\nimport Units from '../proj/Units.js';\nimport {assert} from '../asserts.js';\nimport {get} from '../proj.js';\nimport {linearRingIsClockwise} from '../geom/flat/orient.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../Feature.js\").FeatureClass} [featureClass] Class for features returned by\n * {@link module:ol/format/MVT#readFeatures}. Set to {@link module:ol/Feature~Feature} to get full editing and geometry\n * support at the cost of decreased rendering performance. The default is\n * {@link module:ol/render/Feature~RenderFeature}, which is optimized for rendering and hit detection.\n * @property {string} [geometryName='geometry'] Geometry name to use when creating features.\n * @property {string} [layerName='layer'] Name of the feature attribute that holds the layer name.\n * @property {Array<string>} [layers] Layers to read features from. If not provided, features will be read from all\n * @property {string} [idProperty] Optional property that will be assigned as the feature id and removed from the properties.\n * layers.\n */\n\n/**\n * @classdesc\n * Feature format for reading data in the Mapbox MVT format.\n *\n * @param {Options=} opt_options Options.\n * @api\n */\nclass MVT extends FeatureFormat {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n super();\n\n const options = opt_options ? opt_options : {};\n\n /**\n * @type {Projection}\n */\n this.dataProjection = new Projection({\n code: '',\n units: Units.TILE_PIXELS,\n });\n\n /**\n * @private\n * @type {import(\"../Feature.js\").FeatureClass}\n */\n this.featureClass_ = options.featureClass\n ? options.featureClass\n : RenderFeature;\n\n /**\n * @private\n * @type {string|undefined}\n */\n this.geometryName_ = options.geometryName;\n\n /**\n * @private\n * @type {string}\n */\n this.layerName_ = options.layerName ? options.layerName : 'layer';\n\n /**\n * @private\n * @type {Array<string>}\n */\n this.layers_ = options.layers ? options.layers : null;\n\n /**\n * @private\n * @type {string}\n */\n this.idProperty_ = options.idProperty;\n }\n\n /**\n * Read the raw geometry from the pbf offset stored in a raw feature's geometry\n * property.\n * @param {PBF} pbf PBF.\n * @param {Object} feature Raw feature.\n * @param {Array<number>} flatCoordinates Array to store flat coordinates in.\n * @param {Array<number>} ends Array to store ends in.\n * @private\n */\n readRawGeometry_(pbf, feature, flatCoordinates, ends) {\n pbf.pos = feature.geometry;\n\n const end = pbf.readVarint() + pbf.pos;\n let cmd = 1;\n let length = 0;\n let x = 0;\n let y = 0;\n let coordsLen = 0;\n let currentEnd = 0;\n\n while (pbf.pos < end) {\n if (!length) {\n const cmdLen = pbf.readVarint();\n cmd = cmdLen & 0x7;\n length = cmdLen >> 3;\n }\n\n length--;\n\n if (cmd === 1 || cmd === 2) {\n x += pbf.readSVarint();\n y += pbf.readSVarint();\n\n if (cmd === 1) {\n // moveTo\n if (coordsLen > currentEnd) {\n ends.push(coordsLen);\n currentEnd = coordsLen;\n }\n }\n\n flatCoordinates.push(x, y);\n coordsLen += 2;\n } else if (cmd === 7) {\n if (coordsLen > currentEnd) {\n // close polygon\n flatCoordinates.push(\n flatCoordinates[currentEnd],\n flatCoordinates[currentEnd + 1]\n );\n coordsLen += 2;\n }\n } else {\n assert(false, 59); // Invalid command found in the PBF\n }\n }\n\n if (coordsLen > currentEnd) {\n ends.push(coordsLen);\n currentEnd = coordsLen;\n }\n }\n\n /**\n * @private\n * @param {PBF} pbf PBF\n * @param {Object} rawFeature Raw Mapbox feature.\n * @param {import(\"./Feature.js\").ReadOptions} options Read options.\n * @return {import(\"../Feature.js\").FeatureLike} Feature.\n */\n createFeature_(pbf, rawFeature, options) {\n const type = rawFeature.type;\n if (type === 0) {\n return null;\n }\n\n let feature;\n const values = rawFeature.properties;\n\n let id;\n if (!this.idProperty_) {\n id = rawFeature.id;\n } else {\n id = values[this.idProperty_];\n delete values[this.idProperty_];\n }\n\n values[this.layerName_] = rawFeature.layer.name;\n\n const flatCoordinates = [];\n const ends = [];\n this.readRawGeometry_(pbf, rawFeature, flatCoordinates, ends);\n\n const geometryType = getGeometryType(type, ends.length);\n\n if (this.featureClass_ === RenderFeature) {\n feature = new this.featureClass_(\n geometryType,\n flatCoordinates,\n ends,\n values,\n id\n );\n feature.transform(options.dataProjection);\n } else {\n let geom;\n if (geometryType == GeometryType.POLYGON) {\n const endss = [];\n let offset = 0;\n let prevEndIndex = 0;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const 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 } else {\n if (endss.length === 0) {\n continue;\n }\n endss[endss.length - 1].push(ends[prevEndIndex]);\n }\n prevEndIndex = i + 1;\n offset = end;\n }\n if (endss.length > 1) {\n geom = new MultiPolygon(flatCoordinates, GeometryLayout.XY, endss);\n } else {\n geom = new Polygon(flatCoordinates, GeometryLayout.XY, ends);\n }\n } else {\n geom =\n geometryType === GeometryType.POINT\n ? new Point(flatCoordinates, GeometryLayout.XY)\n : geometryType === GeometryType.LINE_STRING\n ? new LineString(flatCoordinates, GeometryLayout.XY)\n : geometryType === GeometryType.POLYGON\n ? new Polygon(flatCoordinates, GeometryLayout.XY, ends)\n : geometryType === GeometryType.MULTI_POINT\n ? new MultiPoint(flatCoordinates, GeometryLayout.XY)\n : geometryType === GeometryType.MULTI_LINE_STRING\n ? new MultiLineString(flatCoordinates, GeometryLayout.XY, ends)\n : null;\n }\n const ctor = /** @type {typeof import(\"../Feature.js\").default} */ (this\n .featureClass_);\n feature = new ctor();\n if (this.geometryName_) {\n feature.setGeometryName(this.geometryName_);\n }\n const geometry = transformGeometryWithOptions(geom, false, options);\n feature.setGeometry(geometry);\n feature.setId(id);\n feature.setProperties(values, true);\n }\n\n return feature;\n }\n\n /**\n * @return {import(\"./FormatType.js\").default} Format.\n */\n getType() {\n return FormatType.ARRAY_BUFFER;\n }\n\n /**\n * Read all features.\n *\n * @param {ArrayBuffer} source Source.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {Array<import(\"../Feature.js\").FeatureLike>} Features.\n * @api\n */\n readFeatures(source, opt_options) {\n const layers = this.layers_;\n const options = /** @type {import(\"./Feature.js\").ReadOptions} */ (this.adaptOptions(\n opt_options\n ));\n const dataProjection = get(options.dataProjection);\n dataProjection.setWorldExtent(options.extent);\n options.dataProjection = dataProjection;\n\n const pbf = new PBF(/** @type {ArrayBuffer} */ (source));\n const pbfLayers = pbf.readFields(layersPBFReader, {});\n const features = [];\n for (const name in pbfLayers) {\n if (layers && layers.indexOf(name) == -1) {\n continue;\n }\n const pbfLayer = pbfLayers[name];\n\n const extent = pbfLayer ? [0, 0, pbfLayer.extent, pbfLayer.extent] : null;\n dataProjection.setExtent(extent);\n\n for (let i = 0, ii = pbfLayer.length; i < ii; ++i) {\n const rawFeature = readRawFeature(pbf, pbfLayer, i);\n features.push(this.createFeature_(pbf, rawFeature, options));\n }\n }\n\n return features;\n }\n\n /**\n * Read the projection from the source.\n *\n * @param {Document|Element|Object|string} source Source.\n * @return {import(\"../proj/Projection.js\").default} Projection.\n * @api\n */\n readProjection(source) {\n return this.dataProjection;\n }\n\n /**\n * Sets the layers that features will be read from.\n * @param {Array<string>} layers Layers.\n * @api\n */\n setLayers(layers) {\n this.layers_ = layers;\n }\n}\n\n/**\n * Reader callback for parsing layers.\n * @param {number} tag The tag.\n * @param {Object} layers The layers object.\n * @param {PBF} pbf The PBF.\n */\nfunction layersPBFReader(tag, layers, pbf) {\n if (tag === 3) {\n const layer = {\n keys: [],\n values: [],\n features: [],\n };\n const end = pbf.readVarint() + pbf.pos;\n pbf.readFields(layerPBFReader, layer, end);\n layer.length = layer.features.length;\n if (layer.length) {\n layers[layer.name] = layer;\n }\n }\n}\n\n/**\n * Reader callback for parsing layer.\n * @param {number} tag The tag.\n * @param {Object} layer The layer object.\n * @param {PBF} pbf The PBF.\n */\nfunction layerPBFReader(tag, layer, pbf) {\n if (tag === 15) {\n layer.version = pbf.readVarint();\n } else if (tag === 1) {\n layer.name = pbf.readString();\n } else if (tag === 5) {\n layer.extent = pbf.readVarint();\n } else if (tag === 2) {\n layer.features.push(pbf.pos);\n } else if (tag === 3) {\n layer.keys.push(pbf.readString());\n } else if (tag === 4) {\n let value = null;\n const end = pbf.readVarint() + pbf.pos;\n while (pbf.pos < end) {\n tag = pbf.readVarint() >> 3;\n value =\n tag === 1\n ? pbf.readString()\n : tag === 2\n ? pbf.readFloat()\n : tag === 3\n ? pbf.readDouble()\n : tag === 4\n ? pbf.readVarint64()\n : tag === 5\n ? pbf.readVarint()\n : tag === 6\n ? pbf.readSVarint()\n : tag === 7\n ? pbf.readBoolean()\n : null;\n }\n layer.values.push(value);\n }\n}\n\n/**\n * Reader callback for parsing feature.\n * @param {number} tag The tag.\n * @param {Object} feature The feature object.\n * @param {PBF} pbf The PBF.\n */\nfunction featurePBFReader(tag, feature, pbf) {\n if (tag == 1) {\n feature.id = pbf.readVarint();\n } else if (tag == 2) {\n const end = pbf.readVarint() + pbf.pos;\n while (pbf.pos < end) {\n const key = feature.layer.keys[pbf.readVarint()];\n const value = feature.layer.values[pbf.readVarint()];\n feature.properties[key] = value;\n }\n } else if (tag == 3) {\n feature.type = pbf.readVarint();\n } else if (tag == 4) {\n feature.geometry = pbf.pos;\n }\n}\n\n/**\n * Read a raw feature from the pbf offset stored at index `i` in the raw layer.\n * @param {PBF} pbf PBF.\n * @param {Object} layer Raw layer.\n * @param {number} i Index of the feature in the raw layer's `features` array.\n * @return {Object} Raw feature.\n */\nfunction readRawFeature(pbf, layer, i) {\n pbf.pos = layer.features[i];\n const end = pbf.readVarint() + pbf.pos;\n\n const feature = {\n layer: layer,\n type: 0,\n properties: {},\n };\n pbf.readFields(featurePBFReader, feature, end);\n return feature;\n}\n\n/**\n * @param {number} type The raw feature's geometry type\n * @param {number} numEnds Number of ends of the flat coordinates of the\n * geometry.\n * @return {import(\"../geom/GeometryType.js\").default} The geometry type.\n */\nfunction getGeometryType(type, numEnds) {\n /** @type {import(\"../geom/GeometryType.js\").default} */\n let geometryType;\n if (type === 1) {\n geometryType =\n numEnds === 1 ? GeometryType.POINT : GeometryType.MULTI_POINT;\n } else if (type === 2) {\n geometryType =\n numEnds === 1 ? GeometryType.LINE_STRING : GeometryType.MULTI_LINE_STRING;\n } else if (type === 3) {\n geometryType = GeometryType.POLYGON;\n // MultiPolygon not relevant for rendering - winding order determines\n // outer rings of polygons.\n }\n return geometryType;\n}\n\nexport default MVT;\n","/**\n * @module ol/layer/VectorTileRenderType\n */\n\n/**\n * @enum {string}\n * Render mode for vector tiles:\n * * `'image'`: Vector tiles are rendered as images. Great performance, but\n * point symbols and texts are always rotated with the view and pixels are\n * scaled during zoom animations.\n * * `'hybrid'`: Polygon and line elements are rendered as images, so pixels\n * are scaled during zoom animations. Point symbols and texts are accurately\n * rendered as vectors and can stay upright on rotated views.\n * * `'vector'`: Everything is rendered as vectors. Use this mode for improved\n * performance on vector tile layers with only a few rendered features (e.g.\n * for highlighting a subset of features of another layer with the same\n * source).\n * @api\n */\nexport default {\n IMAGE: 'image',\n HYBRID: 'hybrid',\n VECTOR: 'vector',\n};\n","/**\n * @module ol/renderer/canvas/VectorTileLayer\n */\nimport CanvasBuilderGroup from '../../render/canvas/BuilderGroup.js';\nimport CanvasExecutorGroup from '../../render/canvas/ExecutorGroup.js';\nimport CanvasTileLayerRenderer from './TileLayer.js';\nimport EventType from '../../events/EventType.js';\nimport ReplayType from '../../render/canvas/BuilderType.js';\nimport TileState from '../../TileState.js';\nimport VectorTileRenderType from '../../layer/VectorTileRenderType.js';\nimport ViewHint from '../../ViewHint.js';\nimport {\n apply as applyTransform,\n create as createTransform,\n multiply,\n reset as resetTransform,\n scale,\n scale as scaleTransform,\n translate as translateTransform,\n} from '../../transform.js';\nimport {\n boundingExtent,\n buffer,\n containsExtent,\n equals,\n getIntersection,\n getTopLeft,\n intersects,\n} from '../../extent.js';\nimport {clear} from '../../obj.js';\nimport {\n createHitDetectionImageData,\n hitDetect,\n} from '../../render/canvas/hitdetect.js';\nimport {\n getSquaredTolerance as getSquaredRenderTolerance,\n renderFeature,\n} from '../vector.js';\nimport {getUid} from '../../util.js';\nimport {listen, unlistenByKey} from '../../events.js';\nimport {toSize} from '../../size.js';\nimport {wrapX} from '../../coordinate.js';\n\n/**\n * @type {!Object<string, Array<import(\"../../render/canvas/BuilderType.js\").default>>}\n */\nconst IMAGE_REPLAYS = {\n 'image': [\n ReplayType.POLYGON,\n ReplayType.CIRCLE,\n ReplayType.LINE_STRING,\n ReplayType.IMAGE,\n ReplayType.TEXT,\n ],\n 'hybrid': [ReplayType.POLYGON, ReplayType.LINE_STRING],\n 'vector': [],\n};\n\n/**\n * @type {!Object<string, Array<import(\"../../render/canvas/BuilderType.js\").default>>}\n */\nconst VECTOR_REPLAYS = {\n 'image': [ReplayType.DEFAULT],\n 'hybrid': [ReplayType.IMAGE, ReplayType.TEXT, ReplayType.DEFAULT],\n 'vector': [\n ReplayType.POLYGON,\n ReplayType.CIRCLE,\n ReplayType.LINE_STRING,\n ReplayType.IMAGE,\n ReplayType.TEXT,\n ReplayType.DEFAULT,\n ],\n};\n\n/**\n * @classdesc\n * Canvas renderer for vector tile layers.\n * @api\n */\nclass CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {\n /**\n * @param {import(\"../../layer/VectorTile.js\").default} layer VectorTile layer.\n */\n constructor(layer) {\n super(layer);\n\n /** @private */\n this.boundHandleStyleImageChange_ = this.handleStyleImageChange_.bind(this);\n\n /**\n * @private\n * @type {boolean}\n */\n this.dirty_ = false;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedLayerRevision_;\n\n /**\n * @private\n * @type {import(\"../../transform\").Transform}\n */\n this.renderedPixelToCoordinateTransform_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedRotation_;\n\n /**\n * @private\n * @type {!Object<string, import(\"../../VectorRenderTile.js\").default>}\n */\n this.renderTileImageQueue_ = {};\n\n /**\n * @type {Object<string, import(\"../../events.js\").EventsKey>}\n */\n this.tileListenerKeys_ = {};\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.tmpTransform_ = createTransform();\n }\n\n /**\n * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../../proj/Projection\").default} projection Projection.\n * @param {boolean} queue Queue tile for rendering.\n * @return {boolean|undefined} Tile needs to be rendered.\n */\n prepareTile(tile, pixelRatio, projection, queue) {\n let render;\n const tileUid = getUid(tile);\n const state = tile.getState();\n if (\n ((state === TileState.LOADED && tile.hifi) ||\n state === TileState.ERROR) &&\n tileUid in this.tileListenerKeys_\n ) {\n unlistenByKey(this.tileListenerKeys_[tileUid]);\n delete this.tileListenerKeys_[tileUid];\n }\n if (state === TileState.LOADED || state === TileState.ERROR) {\n this.updateExecutorGroup_(tile, pixelRatio, projection);\n if (this.tileImageNeedsRender_(tile, pixelRatio, projection)) {\n render = true;\n if (queue) {\n this.renderTileImageQueue_[tileUid] = tile;\n }\n }\n }\n return render;\n }\n\n /**\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @return {!import(\"../../Tile.js\").default} Tile.\n */\n getTile(z, x, y, frameState) {\n const pixelRatio = frameState.pixelRatio;\n const viewState = frameState.viewState;\n const resolution = viewState.resolution;\n const projection = viewState.projection;\n const layer = this.getLayer();\n const tile = layer.getSource().getTile(z, x, y, pixelRatio, projection);\n if (tile.getState() < TileState.LOADED) {\n tile.wantedResolution = resolution;\n const tileUid = getUid(tile);\n if (!(tileUid in this.tileListenerKeys_)) {\n const listenerKey = listen(\n tile,\n EventType.CHANGE,\n this.prepareTile.bind(this, tile, pixelRatio, projection, true)\n );\n this.tileListenerKeys_[tileUid] = listenerKey;\n }\n } else {\n const viewHints = frameState.viewHints;\n const hifi = !(\n viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]\n );\n if (hifi || !tile.wantedResolution) {\n tile.wantedResolution = resolution;\n }\n const render = this.prepareTile(tile, pixelRatio, projection, false);\n if (render && layer.getRenderMode() !== VectorTileRenderType.VECTOR) {\n this.renderTileImage_(tile, frameState);\n }\n }\n return super.getTile(z, x, y, frameState);\n }\n\n /**\n * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n * @return {boolean} Tile is drawable.\n */\n isDrawableTile(tile) {\n const layer = this.getLayer();\n return (\n super.isDrawableTile(tile) &&\n (layer.getRenderMode() === VectorTileRenderType.VECTOR\n ? getUid(layer) in tile.executorGroups\n : tile.hasContext(layer))\n );\n }\n\n /**\n * @inheritDoc\n */\n getTileImage(tile) {\n return tile.getImage(this.getLayer());\n }\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 prepareFrame(frameState) {\n const layerRevision = this.getLayer().getRevision();\n if (this.renderedLayerRevision_ != layerRevision) {\n this.renderedTiles.length = 0;\n }\n this.renderedLayerRevision_ = layerRevision;\n return super.prepareFrame(frameState);\n }\n\n /**\n * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @private\n */\n updateExecutorGroup_(tile, pixelRatio, projection) {\n const layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n const revision = layer.getRevision();\n const renderOrder = layer.getRenderOrder() || null;\n\n const resolution = tile.wantedResolution;\n const builderState = tile.getReplayState(layer);\n if (\n !builderState.dirty &&\n builderState.renderedResolution === resolution &&\n builderState.renderedRevision == revision &&\n builderState.renderedRenderOrder == renderOrder &&\n builderState.renderedZ === tile.sourceZ\n ) {\n return;\n }\n\n const source = layer.getSource();\n const declutter = layer.getDeclutter();\n const sourceTileGrid = source.getTileGrid();\n const tileGrid = source.getTileGridForProjection(projection);\n const tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n\n const sourceTiles = source.getSourceTiles(pixelRatio, projection, tile);\n const layerUid = getUid(layer);\n delete tile.hitDetectionImageData[layerUid];\n tile.executorGroups[layerUid] = [];\n if (declutter) {\n tile.declutterExecutorGroups[layerUid] = [];\n }\n for (let t = 0, tt = sourceTiles.length; t < tt; ++t) {\n const sourceTile = sourceTiles[t];\n if (sourceTile.getState() != TileState.LOADED) {\n continue;\n }\n const sourceTileCoord = sourceTile.tileCoord;\n const sourceTileExtent = sourceTileGrid.getTileCoordExtent(\n sourceTileCoord\n );\n const sharedExtent = getIntersection(tileExtent, sourceTileExtent);\n const bufferedExtent = equals(sourceTileExtent, sharedExtent)\n ? null\n : buffer(\n sharedExtent,\n layer.getRenderBuffer() * resolution,\n this.tmpExtent\n );\n builderState.dirty = false;\n const builderGroup = new CanvasBuilderGroup(\n 0,\n sharedExtent,\n resolution,\n pixelRatio\n );\n const declutterBuilderGroup = declutter\n ? new CanvasBuilderGroup(0, sharedExtent, resolution, pixelRatio)\n : undefined;\n const squaredTolerance = getSquaredRenderTolerance(\n resolution,\n pixelRatio\n );\n\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @this {CanvasVectorTileLayerRenderer}\n */\n const render = function (feature) {\n let styles;\n const styleFunction =\n feature.getStyleFunction() || layer.getStyleFunction();\n if (styleFunction) {\n styles = styleFunction(feature, resolution);\n }\n if (styles) {\n const dirty = this.renderFeature(\n feature,\n squaredTolerance,\n styles,\n builderGroup,\n declutterBuilderGroup\n );\n this.dirty_ = this.dirty_ || dirty;\n builderState.dirty = builderState.dirty || dirty;\n }\n };\n\n const features = sourceTile.getFeatures();\n if (renderOrder && renderOrder !== builderState.renderedRenderOrder) {\n features.sort(renderOrder);\n }\n for (let i = 0, ii = features.length; i < ii; ++i) {\n const feature = features[i];\n if (\n !bufferedExtent ||\n intersects(bufferedExtent, feature.getGeometry().getExtent())\n ) {\n render.call(this, feature);\n }\n }\n const executorGroupInstructions = builderGroup.finish();\n // no need to clip when the render tile is covered by a single source tile\n const replayExtent =\n layer.getRenderMode() !== VectorTileRenderType.VECTOR &&\n declutter &&\n sourceTiles.length === 1\n ? null\n : sharedExtent;\n const renderingReplayGroup = new CanvasExecutorGroup(\n replayExtent,\n resolution,\n pixelRatio,\n source.getOverlaps(),\n executorGroupInstructions,\n layer.getRenderBuffer()\n );\n tile.executorGroups[layerUid].push(renderingReplayGroup);\n if (declutterBuilderGroup) {\n const declutterExecutorGroup = new CanvasExecutorGroup(\n replayExtent,\n resolution,\n pixelRatio,\n source.getOverlaps(),\n declutterBuilderGroup.finish(),\n layer.getRenderBuffer()\n );\n tile.declutterExecutorGroups[layerUid].push(declutterExecutorGroup);\n }\n }\n builderState.renderedRevision = revision;\n builderState.renderedZ = tile.sourceZ;\n builderState.renderedRenderOrder = renderOrder;\n builderState.renderedResolution = resolution;\n }\n\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {import(\"../vector.js\").FeatureCallback<T>} callback Feature callback.\n * @param {Array<import(\"../Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n * @return {T|undefined} Callback result.\n * @template T\n */\n forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n callback,\n matches\n ) {\n const resolution = frameState.viewState.resolution;\n const rotation = frameState.viewState.rotation;\n hitTolerance = hitTolerance == undefined ? 0 : hitTolerance;\n const layer = this.getLayer();\n const source = layer.getSource();\n const tileGrid = source.getTileGridForProjection(\n frameState.viewState.projection\n );\n\n const hitExtent = boundingExtent([coordinate]);\n buffer(hitExtent, resolution * hitTolerance, hitExtent);\n\n /** @type {!Object<string, import(\"../Map.js\").HitMatch<T>|true>} */\n const features = {};\n\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @param {number} distanceSq The squared distance to the click position.\n * @return {T|undefined} Callback result.\n */\n const featureCallback = function (feature, geometry, distanceSq) {\n let key = feature.getId();\n if (key === undefined) {\n key = getUid(feature);\n }\n const match = features[key];\n if (!match) {\n if (distanceSq === 0) {\n features[key] = true;\n return callback(feature, layer, geometry);\n }\n matches.push(\n (features[key] = {\n feature: feature,\n layer: layer,\n geometry: geometry,\n distanceSq: distanceSq,\n callback: callback,\n })\n );\n } else if (match !== true && distanceSq < match.distanceSq) {\n if (distanceSq === 0) {\n features[key] = true;\n matches.splice(matches.lastIndexOf(match), 1);\n return callback(feature, layer, geometry);\n }\n match.geometry = geometry;\n match.distanceSq = distanceSq;\n }\n return undefined;\n };\n\n const renderedTiles = /** @type {Array<import(\"../../VectorRenderTile.js\").default>} */ (this\n .renderedTiles);\n\n let found;\n for (let i = 0, ii = renderedTiles.length; !found && i < ii; ++i) {\n const tile = renderedTiles[i];\n const tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n if (!intersects(tileExtent, hitExtent)) {\n continue;\n }\n\n const layerUid = getUid(layer);\n const executorGroups = [tile.executorGroups[layerUid]];\n const declutterExecutorGroups = tile.declutterExecutorGroups[layerUid];\n if (declutterExecutorGroups) {\n executorGroups.push(declutterExecutorGroups);\n }\n executorGroups.some((executorGroups) => {\n const declutteredFeatures =\n executorGroups === declutterExecutorGroups\n ? frameState.declutterTree.all().map((item) => item.value)\n : null;\n for (let t = 0, tt = executorGroups.length; t < tt; ++t) {\n const executorGroup = executorGroups[t];\n found = executorGroup.forEachFeatureAtCoordinate(\n coordinate,\n resolution,\n rotation,\n hitTolerance,\n featureCallback,\n declutteredFeatures\n );\n if (found) {\n return true;\n }\n }\n });\n }\n return found;\n }\n\n /**\n * Asynchronous layer level hit detection.\n * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n * @return {Promise<Array<import(\"../../Feature\").default>>} Promise that resolves with an array of features.\n */\n getFeatures(pixel) {\n return new Promise(\n function (resolve, reject) {\n const layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n const layerUid = getUid(layer);\n const source = layer.getSource();\n const projection = this.renderedProjection;\n const projectionExtent = projection.getExtent();\n const resolution = this.renderedResolution;\n const tileGrid = source.getTileGridForProjection(projection);\n const coordinate = applyTransform(\n this.renderedPixelToCoordinateTransform_,\n pixel.slice()\n );\n const tileCoord = tileGrid.getTileCoordForCoordAndResolution(\n coordinate,\n resolution\n );\n let tile;\n for (let i = 0, ii = this.renderedTiles.length; i < ii; ++i) {\n if (\n tileCoord.toString() === this.renderedTiles[i].tileCoord.toString()\n ) {\n tile = this.renderedTiles[i];\n if (tile.getState() === TileState.LOADED && tile.hifi) {\n const extent = tileGrid.getTileCoordExtent(tile.tileCoord);\n if (\n source.getWrapX() &&\n projection.canWrapX() &&\n !containsExtent(projectionExtent, extent)\n ) {\n wrapX(coordinate, projection);\n }\n break;\n }\n tile = undefined;\n }\n }\n if (!tile || tile.loadingSourceTiles > 0) {\n resolve([]);\n return;\n }\n const extent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n const corner = getTopLeft(extent);\n const tilePixel = [\n (coordinate[0] - corner[0]) / resolution,\n (corner[1] - coordinate[1]) / resolution,\n ];\n const features = tile\n .getSourceTiles()\n .reduce(function (accumulator, sourceTile) {\n return accumulator.concat(sourceTile.getFeatures());\n }, []);\n let hitDetectionImageData = tile.hitDetectionImageData[layerUid];\n if (!hitDetectionImageData && !this.animatingOrInteracting_) {\n const tileSize = toSize(\n tileGrid.getTileSize(tileGrid.getZForResolution(resolution))\n );\n const size = [tileSize[0] / 2, tileSize[1] / 2];\n const rotation = this.renderedRotation_;\n const transforms = [\n this.getRenderTransform(\n tileGrid.getTileCoordCenter(tile.wrappedTileCoord),\n resolution,\n 0,\n 0.5,\n size[0],\n size[1],\n 0\n ),\n ];\n hitDetectionImageData = createHitDetectionImageData(\n tileSize,\n transforms,\n features,\n layer.getStyleFunction(),\n tileGrid.getTileCoordExtent(tile.wrappedTileCoord),\n tile.getReplayState(layer).renderedResolution,\n rotation\n );\n tile.hitDetectionImageData[layerUid] = hitDetectionImageData;\n }\n resolve(hitDetect(tilePixel, features, hitDetectionImageData));\n }.bind(this)\n );\n }\n\n /**\n * Perform action necessary to get the layer rendered after new fonts have loaded\n */\n handleFontsChanged() {\n clear(this.renderTileImageQueue_);\n const layer = this.getLayer();\n if (layer.getVisible() && this.renderedLayerRevision_ !== undefined) {\n layer.changed();\n }\n }\n\n /**\n * Handle changes in image style state.\n * @param {import(\"../../events/Event.js\").default} event Image style change event.\n * @private\n */\n handleStyleImageChange_(event) {\n this.renderIfReadyAndVisible();\n }\n\n /**\n * Render declutter items for this layer\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n */\n renderDeclutter(frameState) {\n const viewHints = frameState.viewHints;\n const hifi = !(\n viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]\n );\n const tiles = /** @type {Array<import(\"../../VectorRenderTile.js\").default>} */ (this\n .renderedTiles);\n for (let i = 0, ii = tiles.length; i < ii; ++i) {\n const tile = tiles[i];\n const declutterExecutorGroups =\n tile.declutterExecutorGroups[getUid(this.getLayer())];\n if (declutterExecutorGroups) {\n for (let j = declutterExecutorGroups.length - 1; j >= 0; --j) {\n declutterExecutorGroups[j].execute(\n this.context,\n 1,\n this.getTileRenderTransform(tile, frameState),\n frameState.viewState.rotation,\n hifi,\n undefined,\n frameState.declutterTree\n );\n }\n }\n }\n }\n\n getTileRenderTransform(tile, frameState) {\n const pixelRatio = frameState.pixelRatio;\n const viewState = frameState.viewState;\n const center = viewState.center;\n const resolution = viewState.resolution;\n const rotation = viewState.rotation;\n const size = frameState.size;\n const width = Math.round(size[0] * pixelRatio);\n const height = Math.round(size[1] * pixelRatio);\n\n const source = this.getLayer().getSource();\n const tileGrid = source.getTileGridForProjection(\n frameState.viewState.projection\n );\n const tileCoord = tile.tileCoord;\n const tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n const worldOffset =\n tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent)[0] - tileExtent[0];\n const transform = multiply(\n scale(this.inversePixelTransform.slice(), 1 / pixelRatio, 1 / pixelRatio),\n this.getRenderTransform(\n center,\n resolution,\n rotation,\n pixelRatio,\n width,\n height,\n worldOffset\n )\n );\n return transform;\n }\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 renderFrame(frameState, target) {\n const viewHints = frameState.viewHints;\n const hifi = !(\n viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]\n );\n this.renderQueuedTileImages_(hifi, frameState);\n\n super.renderFrame(frameState, target);\n this.renderedPixelToCoordinateTransform_ = frameState.pixelToCoordinateTransform.slice();\n this.renderedRotation_ = frameState.viewState.rotation;\n\n const layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n const renderMode = layer.getRenderMode();\n if (renderMode === VectorTileRenderType.IMAGE) {\n return this.container;\n }\n\n const source = layer.getSource();\n // Unqueue tiles from the image queue when we don't need any more\n const usedTiles = frameState.usedTiles[getUid(source)];\n for (const tileUid in this.renderTileImageQueue_) {\n if (!usedTiles || !(tileUid in usedTiles)) {\n delete this.renderTileImageQueue_[tileUid];\n }\n }\n\n const context = this.context;\n const replayTypes = VECTOR_REPLAYS[renderMode];\n const viewState = frameState.viewState;\n const rotation = viewState.rotation;\n\n const tiles = this.renderedTiles;\n const clips = [];\n const clipZs = [];\n for (let i = tiles.length - 1; i >= 0; --i) {\n const tile = /** @type {import(\"../../VectorRenderTile.js\").default} */ (tiles[\n i\n ]);\n const transform = this.getTileRenderTransform(tile, frameState);\n const executorGroups = tile.executorGroups[getUid(layer)];\n let clipped = false;\n for (let t = 0, tt = executorGroups.length; t < tt; ++t) {\n const executorGroup = executorGroups[t];\n if (!executorGroup.hasExecutors(replayTypes)) {\n // sourceTile has no instructions of the types we want to render\n continue;\n }\n const currentZ = tile.tileCoord[0];\n let currentClip;\n if (!clipped) {\n currentClip = executorGroup.getClipCoords(transform);\n if (currentClip) {\n context.save();\n\n // Create a clip mask for regions in this low resolution tile that are\n // already filled by a higher resolution tile\n for (let j = 0, jj = clips.length; j < jj; ++j) {\n const clip = clips[j];\n if (currentZ < clipZs[j]) {\n context.beginPath();\n // counter-clockwise (outer ring) for current tile\n context.moveTo(currentClip[0], currentClip[1]);\n context.lineTo(currentClip[2], currentClip[3]);\n context.lineTo(currentClip[4], currentClip[5]);\n context.lineTo(currentClip[6], currentClip[7]);\n // clockwise (inner ring) for higher resolution tile\n context.moveTo(clip[6], clip[7]);\n context.lineTo(clip[4], clip[5]);\n context.lineTo(clip[2], clip[3]);\n context.lineTo(clip[0], clip[1]);\n context.clip();\n }\n }\n }\n }\n executorGroup.execute(\n context,\n 1,\n transform,\n rotation,\n hifi,\n replayTypes\n );\n if (!clipped && currentClip) {\n context.restore();\n clips.push(currentClip);\n clipZs.push(currentZ);\n clipped = true;\n }\n }\n }\n\n return this.container;\n }\n\n /**\n * @param {boolean} hifi We have time to render a high fidelity map image.\n * @param {import('../../PluggableMap.js').FrameState} frameState Frame state.\n */\n renderQueuedTileImages_(hifi, frameState) {\n // When we don't have time to render hifi, only render tiles until we have used up\n // half of the frame budget of 16 ms\n for (const uid in this.renderTileImageQueue_) {\n if (!hifi && Date.now() - frameState.time > 8) {\n frameState.animate = true;\n break;\n }\n const tile = this.renderTileImageQueue_[uid];\n delete this.renderTileImageQueue_[uid];\n this.renderTileImage_(tile, frameState);\n }\n }\n\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../../style/Style.js\").default|Array<import(\"../../style/Style.js\").default>} styles The style or array of styles.\n * @param {import(\"../../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../../render/canvas/BuilderGroup.js\").default=} opt_declutterBuilderGroup Builder group for decluttering.\n * @return {boolean} `true` if an image is loading.\n */\n renderFeature(\n feature,\n squaredTolerance,\n styles,\n builderGroup,\n opt_declutterBuilderGroup\n ) {\n if (!styles) {\n return false;\n }\n let loading = false;\n if (Array.isArray(styles)) {\n for (let i = 0, ii = styles.length; i < ii; ++i) {\n loading =\n renderFeature(\n builderGroup,\n feature,\n styles[i],\n squaredTolerance,\n this.boundHandleStyleImageChange_,\n undefined,\n opt_declutterBuilderGroup\n ) || loading;\n }\n } else {\n loading = renderFeature(\n builderGroup,\n feature,\n styles,\n squaredTolerance,\n this.boundHandleStyleImageChange_,\n undefined,\n opt_declutterBuilderGroup\n );\n }\n return loading;\n }\n\n /**\n * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @return {boolean} A new tile image was rendered.\n * @private\n */\n tileImageNeedsRender_(tile, pixelRatio, projection) {\n const layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n const replayState = tile.getReplayState(layer);\n const revision = layer.getRevision();\n const sourceZ = tile.sourceZ;\n const resolution = tile.wantedResolution;\n return (\n replayState.renderedTileResolution !== resolution ||\n replayState.renderedTileRevision !== revision ||\n replayState.renderedTileZ !== sourceZ\n );\n }\n\n /**\n * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n * @param {import(\"../../PluggableMap\").FrameState} frameState Frame state.\n * @private\n */\n renderTileImage_(tile, frameState) {\n const layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n const replayState = tile.getReplayState(layer);\n const revision = layer.getRevision();\n const executorGroups = tile.executorGroups[getUid(layer)];\n replayState.renderedTileRevision = revision;\n replayState.renderedTileZ = tile.sourceZ;\n\n const tileCoord = tile.wrappedTileCoord;\n const z = tileCoord[0];\n const source = layer.getSource();\n let pixelRatio = frameState.pixelRatio;\n const viewState = frameState.viewState;\n const projection = viewState.projection;\n const tileGrid = source.getTileGridForProjection(projection);\n const tileResolution = tileGrid.getResolution(tile.tileCoord[0]);\n const renderPixelRatio =\n (frameState.pixelRatio / tile.wantedResolution) * tileResolution;\n const resolution = tileGrid.getResolution(z);\n const context = tile.getContext(layer);\n\n // Increase tile size when overzooming for low pixel ratio, to avoid blurry tiles\n pixelRatio = Math.round(\n Math.max(pixelRatio, renderPixelRatio / pixelRatio)\n );\n const size = source.getTilePixelSize(z, pixelRatio, projection);\n context.canvas.width = size[0];\n context.canvas.height = size[1];\n const renderScale = pixelRatio / renderPixelRatio;\n if (renderScale !== 1) {\n const canvasTransform = resetTransform(this.tmpTransform_);\n scaleTransform(canvasTransform, renderScale, renderScale);\n context.setTransform.apply(context, canvasTransform);\n }\n const tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent);\n const pixelScale = renderPixelRatio / resolution;\n const transform = resetTransform(this.tmpTransform_);\n scaleTransform(transform, pixelScale, -pixelScale);\n translateTransform(transform, -tileExtent[0], -tileExtent[3]);\n for (let i = 0, ii = executorGroups.length; i < ii; ++i) {\n const executorGroup = executorGroups[i];\n executorGroup.execute(\n context,\n renderScale,\n transform,\n 0,\n true,\n IMAGE_REPLAYS[layer.getRenderMode()]\n );\n }\n replayState.renderedTileResolution = tile.wantedResolution;\n }\n}\n\nexport default CanvasVectorTileLayerRenderer;\n","/**\n * @module ol/layer/VectorTile\n */\nimport BaseVectorLayer from './BaseVector.js';\nimport CanvasVectorTileLayerRenderer from '../renderer/canvas/VectorTileLayer.js';\nimport TileProperty from './TileProperty.js';\nimport VectorTileRenderType from './VectorTileRenderType.js';\nimport {assert} from '../asserts.js';\nimport {assign} from '../obj.js';\n\n/**\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 {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the tile extent used by the\n * renderer when getting features from the vector tile for the rendering or hit-detection.\n * Recommended value: Vector tiles are usually generated with a buffer, so this value should match\n * the largest possible buffer of the used tiles. It should be at least the size of the largest\n * point symbol or line width.\n * @property {import(\"./VectorTileRenderType.js\").default|string} [renderMode='hybrid'] Render mode for vector tiles:\n * * `'image'`: Vector tiles are rendered as images. Only available when `declutter` is set to `false` (default).\n * Otherwise, `'hybrid'` mode will used instead. Great performance, but point symbols and texts\n * are always rotated with the view and pixels are scaled during zoom animations. Labels and point symbols will\n * get cut off at tile boundaries.\n * * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom\n * animations. Point symbols and texts are accurately rendered as vectors and can stay upright on\n * rotated views.\n * * `'vector'`: Everything is rendered as vectors. Use this mode for improved performance on vector\n * tile layers with only a few rendered features (e.g. for highlighting a subset of features of\n * another layer with the same source).\n * @property {import(\"../source/VectorTile.js\").default} [source] Source.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {boolean} [declutter=false] Declutter images and text. Decluttering is applied to all\n * image and text styles of all Vector and VectorTile layers that have set this to `true`. The priority\n * is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.\n * Higher z-index means higher priority. Within the same z-index, a feature rendered before another has\n * higher priority.\n * @property {import(\"../style/Style.js\").StyleLike} [style] Layer style. See\n * {@link module:ol/style} for default style which will be used if this is not defined.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be\n * recreated during animations. This means that no vectors will be shown clipped, but the setting\n * will have a performance impact for large amounts of vector data. When set to `false`, batches\n * will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will be\n * recreated during interactions. See also `updateWhileAnimating`.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.\n */\n\n/**\n * @classdesc\n * Layer for vector tile data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @param {Options=} opt_options Options.\n * @extends {BaseVectorLayer<import(\"../source/VectorTile.js\").default>}\n * @api\n */\nclass VectorTileLayer extends BaseVectorLayer {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n const baseOptions = /** @type {Object} */ (assign({}, options));\n delete baseOptions.preload;\n delete baseOptions.useInterimTilesOnError;\n\n super(/** @type {import(\"./BaseVector.js\").Options} */ (baseOptions));\n\n const renderMode = options.renderMode || VectorTileRenderType.HYBRID;\n assert(\n renderMode == undefined ||\n renderMode == VectorTileRenderType.IMAGE ||\n renderMode == VectorTileRenderType.HYBRID ||\n renderMode == VectorTileRenderType.VECTOR,\n 28\n ); // `renderMode` must be `'image'`, `'hybrid'` or `'vector'`.\n\n /**\n * @private\n * @type {import(\"./VectorTileRenderType.js\").default}\n */\n this.renderMode_ = renderMode;\n\n this.setPreload(options.preload ? options.preload : 0);\n this.setUseInterimTilesOnError(\n options.useInterimTilesOnError !== undefined\n ? options.useInterimTilesOnError\n : true\n );\n }\n\n /**\n * Create a renderer for this layer.\n * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n * @protected\n */\n createRenderer() {\n return new CanvasVectorTileLayerRenderer(this);\n }\n\n /**\n * Get the topmost feature that intersects the given pixel on the viewport. Returns a promise\n * that resolves with an array of features. The array will either contain the topmost feature\n * when a hit was detected, or it will be empty.\n *\n * The hit detection algorithm used for this method is optimized for performance, but is less\n * accurate than the one used in {@link import(\"../PluggableMap.js\").default#getFeaturesAtPixel}: Text\n * is not considered, and icons are only represented by their bounding box instead of the exact\n * image.\n *\n * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with an array of features.\n * @api\n */\n getFeatures(pixel) {\n return super.getFeatures(pixel);\n }\n\n /**\n * @return {import(\"./VectorTileRenderType.js\").default} The render mode.\n */\n getRenderMode() {\n return this.renderMode_;\n }\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 getPreload() {\n return /** @type {number} */ (this.get(TileProperty.PRELOAD));\n }\n\n /**\n * Whether we use interim tiles on error.\n * @return {boolean} Use interim tiles on error.\n * @observable\n * @api\n */\n getUseInterimTilesOnError() {\n return /** @type {boolean} */ (this.get(\n TileProperty.USE_INTERIM_TILES_ON_ERROR\n ));\n }\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 setPreload(preload) {\n this.set(TileProperty.PRELOAD, preload);\n }\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 setUseInterimTilesOnError(useInterimTilesOnError) {\n this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n }\n}\n\nexport default VectorTileLayer;\n","var fontWeights = {\n thin: 100,\n hairline: 100,\n 'ultra-light': 100,\n 'extra-light': 100,\n light: 200,\n book: 300,\n regular: 400,\n normal: 400,\n plain: 400,\n roman: 400,\n standard: 400,\n medium: 500,\n 'semi-bold': 600,\n 'demi-bold': 600,\n bold: 700,\n heavy: 800,\n black: 800,\n 'extra-bold': 800,\n 'ultra-black': 900,\n 'extra-black': 900,\n 'ultra-bold': 900,\n 'heavy-black': 900,\n fat: 900,\n poster: 900\n};\nvar sp = ' ';\nvar italicRE = /(italic|oblique)$/i;\n\nvar fontCache = {};\n\nmodule.exports = function(fonts, size, lineHeight) {\n var cssData = fontCache[fonts];\n if (!cssData) {\n if (!Array.isArray(fonts)) {\n fonts = [fonts];\n }\n var weight = 400;\n var style = 'normal';\n var fontFamilies = [];\n var haveWeight, haveStyle;\n for (var i = 0, ii = fonts.length; i < ii; ++i) {\n var font = fonts[i];\n var parts = font.split(' ');\n var maybeWeight = parts[parts.length - 1].toLowerCase();\n if (maybeWeight == 'normal' || maybeWeight == 'italic' || maybeWeight == 'oblique') {\n style = haveStyle ? style : maybeWeight;\n parts.pop();\n maybeWeight = parts[parts.length - 1].toLowerCase();\n } else if (italicRE.test(maybeWeight)) {\n maybeWeight = maybeWeight.replace(italicRE, '');\n style = haveStyle ? style : parts[parts.length - 1].replace(maybeWeight, '');\n }\n for (var w in fontWeights) {\n if (maybeWeight == w || maybeWeight == w.replace('-', '') || maybeWeight == w.replace('-', sp)) {\n weight = haveWeight ? weight : fontWeights[w];\n parts.pop();\n break;\n }\n }\n if (!haveWeight && typeof maybeWeight == 'number') {\n weight = maybeWeight;\n }\n var fontFamily = parts.join(sp)\n .replace('Klokantech Noto Sans', 'Noto Sans');\n if (fontFamily.indexOf(sp) !== -1) {\n fontFamily = '\"' + fontFamily + '\"';\n }\n fontFamilies.push(fontFamily);\n }\n // CSS font property: font-style font-weight font-size/line-height font-family\n cssData = fontCache[fonts] = [style, weight, fontFamilies];\n }\n return cssData[0] + sp + cssData[1] + sp + size + 'px' + (lineHeight ? '/' + lineHeight : '') + sp + cssData[2];\n};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <http://feross.org>\n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","// @flow\n\ntype ExpressionType = 'data-driven' | 'cross-faded' | 'cross-faded-data-driven' | 'color-ramp' | 'data-constant' | 'constant';\ntype ExpressionParameters = Array<'zoom' | 'feature' | 'feature-state' | 'heatmap-density' | 'line-progress' | 'sky-radial-progress'>;\n\ntype ExpressionSpecification = {\n interpolated: boolean,\n parameters: ExpressionParameters\n}\n\nexport type StylePropertySpecification = {\n type: 'number',\n 'property-type': ExpressionType,\n expression?: ExpressionSpecification,\n transition: boolean,\n default?: number\n} | {\n type: 'string',\n 'property-type': ExpressionType,\n expression?: ExpressionSpecification,\n transition: boolean,\n default?: string,\n tokens?: boolean\n} | {\n type: 'boolean',\n 'property-type': ExpressionType,\n expression?: ExpressionSpecification,\n transition: boolean,\n default?: boolean\n} | {\n type: 'enum',\n 'property-type': ExpressionType,\n expression?: ExpressionSpecification,\n values: {[_: string]: {}},\n transition: boolean,\n default?: string\n} | {\n type: 'color',\n 'property-type': ExpressionType,\n expression?: ExpressionSpecification,\n transition: boolean,\n default?: string,\n overridable: boolean\n} | {\n type: 'array',\n value: 'number',\n 'property-type': ExpressionType,\n expression?: ExpressionSpecification,\n length?: number,\n transition: boolean,\n default?: Array<number>\n} | {\n type: 'array',\n value: 'string',\n 'property-type': ExpressionType,\n expression?: ExpressionSpecification,\n length?: number,\n transition: boolean,\n default?: Array<string>\n};\n\nimport v8 from './reference/v8.json';\nimport latest from './reference/latest';\nimport format from './format';\nimport migrate from './migrate';\nimport composite from './composite';\nimport derefLayers from './deref';\nimport diff from './diff';\nimport ValidationError from './error/validation_error';\nimport ParsingError from './error/parsing_error';\nimport {StyleExpression, isExpression, createExpression, createPropertyExpression, normalizePropertyExpression, ZoomConstantExpression, ZoomDependentExpression, StylePropertyFunction} from './expression';\nimport featureFilter, {isExpressionFilter} from './feature_filter';\n\nimport convertFilter from './feature_filter/convert';\nimport Color from './util/color';\nimport {createFunction, isFunction} from './function';\nimport convertFunction from './function/convert';\nimport {eachSource, eachLayer, eachProperty} from './visit';\n\nimport validate from './validate_style';\nimport validateMapboxApiSupported from './validate_mapbox_api_supported';\n\nconst expression = {\n StyleExpression,\n isExpression,\n isExpressionFilter,\n createExpression,\n createPropertyExpression,\n normalizePropertyExpression,\n ZoomConstantExpression,\n ZoomDependentExpression,\n StylePropertyFunction\n};\n\nconst styleFunction = {\n convertFunction,\n createFunction,\n isFunction\n};\n\nconst visit = {eachSource, eachLayer, eachProperty};\n\nexport {\n v8,\n latest,\n format,\n migrate,\n composite,\n derefLayers,\n diff,\n ValidationError,\n ParsingError,\n expression,\n featureFilter,\n convertFilter,\n Color,\n styleFunction as function,\n validate,\n validateMapboxApiSupported,\n visit\n};\n\nvalidate.parsed = validate;\nvalidate.latest = validate;\n","\"use strict\";\n\n// Note: This regex matches even invalid JSON strings, but since we’re\n// working on the output of `JSON.stringify` we know that only valid strings\n// are present (unless the user supplied a weird `options.indent` but in\n// that case we don’t care since the output would be invalid anyway).\nvar stringOrChar = /(\"(?:[^\\\\\"]|\\\\.)*\")|[:,]/g;\n\nmodule.exports = function stringify(passedObj, options) {\n var indent, maxLength, replacer;\n\n options = options || {};\n indent = JSON.stringify(\n [1],\n undefined,\n options.indent === undefined ? 2 : options.indent\n ).slice(2, -3);\n maxLength =\n indent === \"\"\n ? Infinity\n : options.maxLength === undefined\n ? 80\n : options.maxLength;\n replacer = options.replacer;\n\n return (function _stringify(obj, currentIndent, reserved) {\n // prettier-ignore\n var end, index, items, key, keyPart, keys, length, nextIndent, prettified, start, string, value;\n\n if (obj && typeof obj.toJSON === \"function\") {\n obj = obj.toJSON();\n }\n\n string = JSON.stringify(obj, replacer);\n\n if (string === undefined) {\n return string;\n }\n\n length = maxLength - currentIndent.length - reserved;\n\n if (string.length <= length) {\n prettified = string.replace(stringOrChar, function(match, stringLiteral) {\n return stringLiteral || match + \" \";\n });\n if (prettified.length <= length) {\n return prettified;\n }\n }\n\n if (replacer != null) {\n obj = JSON.parse(string);\n replacer = undefined;\n }\n\n if (typeof obj === \"object\" && obj !== null) {\n nextIndent = currentIndent + indent;\n items = [];\n index = 0;\n\n if (Array.isArray(obj)) {\n start = \"[\";\n end = \"]\";\n length = obj.length;\n for (; index < length; index++) {\n items.push(\n _stringify(obj[index], nextIndent, index === length - 1 ? 0 : 1) ||\n \"null\"\n );\n }\n } else {\n start = \"{\";\n end = \"}\";\n keys = Object.keys(obj);\n length = keys.length;\n for (; index < length; index++) {\n key = keys[index];\n keyPart = JSON.stringify(key) + \": \";\n value = _stringify(\n obj[key],\n nextIndent,\n keyPart.length + (index === length - 1 ? 0 : 1)\n );\n if (value !== undefined) {\n items.push(keyPart + value);\n }\n }\n }\n\n if (items.length > 0) {\n return [start, indent + items.join(\",\\n\" + nextIndent), end].join(\n \"\\n\" + currentIndent\n );\n }\n }\n\n return string;\n })(passedObj, \"\", 0);\n};\n","\nimport reference from './reference/latest.js';\nimport stringifyPretty from 'json-stringify-pretty-compact';\n\nfunction sortKeysBy(obj, reference) {\n const result = {};\n for (const key in reference) {\n if (obj[key] !== undefined) {\n result[key] = obj[key];\n }\n }\n for (const key in obj) {\n if (result[key] === undefined) {\n result[key] = obj[key];\n }\n }\n return result;\n}\n\n/**\n * Format a Mapbox GL Style. Returns a stringified style with its keys\n * sorted in the same order as the reference style.\n *\n * The optional `space` argument is passed to\n * [`JSON.stringify`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)\n * to generate formatted output.\n *\n * If `space` is unspecified, a default of `2` spaces will be used.\n *\n * @private\n * @param {Object} style a Mapbox GL Style\n * @param {number} [space] space argument to pass to `JSON.stringify`\n * @returns {string} stringified formatted JSON\n * @example\n * var fs = require('fs');\n * var format = require('mapbox-gl-style-spec').format;\n * var style = fs.readFileSync('./source.json', 'utf8');\n * fs.writeFileSync('./dest.json', format(style));\n * fs.writeFileSync('./dest.min.json', format(style, 0));\n */\nfunction format(style, space = 2) {\n style = sortKeysBy(style, reference.$root);\n\n if (style.layers) {\n style.layers = style.layers.map((layer) => sortKeysBy(layer, reference.layer));\n }\n\n return stringifyPretty(style, {indent: space});\n}\n\nexport default format;\n","/*! https://mths.be/punycode v1.3.2 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * http://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.3.2',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n","'use strict';\n\nmodule.exports = {\n isString: function(arg) {\n return typeof(arg) === 'string';\n },\n isObject: function(arg) {\n return typeof(arg) === 'object' && arg !== null;\n },\n isNull: function(arg) {\n return arg === null;\n },\n isNullOrUndefined: function(arg) {\n return arg == null;\n }\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (Array.isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return Object.keys(obj).map(function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (Array.isArray(obj[k])) {\n return obj[k].map(function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar punycode = require('punycode');\nvar util = require('./util');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && util.isObject(url) && url instanceof Url) return url;\n\n var u = new Url;\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n if (!util.isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n var queryIndex = url.indexOf('?'),\n splitter =\n (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1)\n hostEnd = rest.length;\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a punycoded representation of \"domain\".\n // It only converts parts of the domain name that\n // have non-ASCII characters, i.e. it doesn't matter if\n // you call it with a domain that already is ASCII-only.\n this.hostname = punycode.toASCII(this.hostname);\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1)\n continue;\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) this.pathname = rest;\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (util.isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\n\nUrl.prototype.format = function() {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ?\n this.hostname :\n '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query &&\n util.isObject(this.query) &&\n Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes ||\n (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n\n pathname = pathname.replace(/[?#]/g, function(match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n if (util.isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol')\n result[rkey] = relative[rkey];\n }\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] &&\n result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift()));\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n isRelAbs = (\n relative.host ||\n relative.pathname && relative.pathname.charAt(0) === '/'\n ),\n mustEndAbs = (isRelAbs || isSourceAbs ||\n (result.host && relative.pathname)),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;\n else srcPath.unshift(result.host);\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;\n else relPath.unshift(relative.host);\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = (relative.host || relative.host === '') ?\n relative.host : result.host;\n result.hostname = (relative.hostname || relative.hostname === '') ?\n relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!util.isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (\n (result.host || relative.host || srcPath.length > 1) &&\n (last === '.' || last === '..') || last === '');\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' &&\n (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' ||\n (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' :\n srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function() {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) this.hostname = host;\n};\n","// @flow\n\nimport Reference from './reference/v8.json';\nimport type {StylePropertySpecification} from './style-spec';\nimport type {\n StyleSpecification,\n SourceSpecification,\n LayerSpecification,\n PropertyValueSpecification,\n DataDrivenPropertyValueSpecification\n} from './types';\n\nfunction getPropertyReference(propertyName): StylePropertySpecification {\n for (let i = 0; i < Reference.layout.length; i++) {\n for (const key in Reference[Reference.layout[i]]) {\n if (key === propertyName) return (Reference[Reference.layout[i]][key]: any);\n }\n }\n for (let i = 0; i < Reference.paint.length; i++) {\n for (const key in Reference[Reference.paint[i]]) {\n if (key === propertyName) return (Reference[Reference.paint[i]][key]: any);\n }\n }\n\n return (null: any);\n}\n\nexport function eachSource(style: StyleSpecification, callback: (_: SourceSpecification) => void) {\n for (const k in style.sources) {\n callback(style.sources[k]);\n }\n}\n\nexport function eachLayer(style: StyleSpecification, callback: (_: LayerSpecification) => void) {\n for (const layer of style.layers) {\n callback(layer);\n }\n}\n\ntype PropertyCallback = ({\n path: [string, 'paint' | 'layout', string], // [layerid, paint/layout, property key]\n key: string,\n value: PropertyValueSpecification<mixed> | DataDrivenPropertyValueSpecification<mixed>,\n reference: StylePropertySpecification,\n set: (PropertyValueSpecification<mixed> | DataDrivenPropertyValueSpecification<mixed>) => void\n}) => void;\n\nexport function eachProperty(\n style: StyleSpecification,\n options: {paint?: boolean, layout?: boolean},\n callback: PropertyCallback\n) {\n function inner(layer, propertyType: 'paint' | 'layout') {\n const properties = (layer[propertyType]: any);\n if (!properties) return;\n Object.keys(properties).forEach((key) => {\n callback({\n path: [layer.id, propertyType, key],\n key,\n value: properties[key],\n reference: getPropertyReference(key),\n set(x) {\n properties[key] = x;\n }\n });\n });\n }\n\n eachLayer(style, (layer) => {\n if (options.paint) {\n inner(layer, 'paint');\n }\n if (options.layout) {\n inner(layer, 'layout');\n }\n });\n}\n","\nimport URL from 'url';\nimport {eachSource, eachLayer, eachProperty} from '../visit';\n\nfunction eachLayout(layer, callback) {\n for (const k in layer) {\n if (k.indexOf('layout') === 0) {\n callback(layer[k], k);\n }\n }\n}\n\nfunction eachPaint(layer, callback) {\n for (const k in layer) {\n if (k.indexOf('paint') === 0) {\n callback(layer[k], k);\n }\n }\n}\n\nfunction resolveConstant(style, value) {\n if (typeof value === 'string' && value[0] === '@') {\n return resolveConstant(style, style.constants[value]);\n } else {\n return value;\n }\n}\n\nfunction isFunction(value) {\n return Array.isArray(value.stops);\n}\n\nfunction renameProperty(obj, from, to) {\n obj[to] = obj[from]; delete obj[from];\n}\n\nexport default function(style) {\n style.version = 8;\n\n // Rename properties, reverse coordinates in source and layers\n eachSource(style, (source) => {\n if (source.type === 'video' && source.url !== undefined) {\n renameProperty(source, 'url', 'urls');\n }\n if (source.type === 'video') {\n source.coordinates.forEach((coord) => {\n return coord.reverse();\n });\n }\n });\n\n eachLayer(style, (layer) => {\n eachLayout(layer, (layout) => {\n if (layout['symbol-min-distance'] !== undefined) {\n renameProperty(layout, 'symbol-min-distance', 'symbol-spacing');\n }\n });\n\n eachPaint(layer, (paint) => {\n if (paint['background-image'] !== undefined) {\n renameProperty(paint, 'background-image', 'background-pattern');\n }\n if (paint['line-image'] !== undefined) {\n renameProperty(paint, 'line-image', 'line-pattern');\n }\n if (paint['fill-image'] !== undefined) {\n renameProperty(paint, 'fill-image', 'fill-pattern');\n }\n });\n });\n\n // Inline Constants\n eachProperty(style, {paint: true, layout: true}, (property) => {\n const value = resolveConstant(style, property.value);\n\n if (isFunction(value)) {\n value.stops.forEach((stop) => {\n stop[1] = resolveConstant(style, stop[1]);\n });\n }\n\n property.set(value);\n });\n delete style.constants;\n\n eachLayer(style, (layer) => {\n // get rid of text-max-size, icon-max-size\n // turn text-size, icon-size into layout properties\n // https://github.com/mapbox/mapbox-gl-style-spec/issues/255\n\n eachLayout(layer, (layout) => {\n delete layout['text-max-size'];\n delete layout['icon-max-size'];\n });\n\n eachPaint(layer, (paint) => {\n if (paint['text-size']) {\n if (!layer.layout) layer.layout = {};\n layer.layout['text-size'] = paint['text-size'];\n delete paint['text-size'];\n }\n\n if (paint['icon-size']) {\n if (!layer.layout) layer.layout = {};\n layer.layout['icon-size'] = paint['icon-size'];\n delete paint['icon-size'];\n }\n });\n });\n\n function migrateFontstackURL(input) {\n const inputParsed = URL.parse(input);\n const inputPathnameParts = inputParsed.pathname.split('/');\n\n if (inputParsed.protocol !== 'mapbox:') {\n return input;\n\n } else if (inputParsed.hostname === 'fontstack') {\n assert(decodeURI(inputParsed.pathname) === '/{fontstack}/{range}.pbf');\n return 'mapbox://fonts/mapbox/{fontstack}/{range}.pbf';\n\n } else if (inputParsed.hostname === 'fonts') {\n assert(inputPathnameParts[1] === 'v1');\n assert(decodeURI(inputPathnameParts[3]) === '{fontstack}');\n assert(decodeURI(inputPathnameParts[4]) === '{range}.pbf');\n return `mapbox://fonts/${inputPathnameParts[2]}/{fontstack}/{range}.pbf`;\n\n } else {\n assert(false);\n }\n\n function assert(predicate) {\n if (!predicate) {\n throw new Error(`Invalid font url: \"${input}\"`);\n }\n }\n }\n\n if (style.glyphs) {\n style.glyphs = migrateFontstackURL(style.glyphs);\n }\n\n function migrateFontStack(font) {\n function splitAndTrim(string) {\n return string.split(',').map((s) => {\n return s.trim();\n });\n }\n\n if (Array.isArray(font)) {\n // Assume it's a previously migrated font-array.\n return font;\n\n } else if (typeof font === 'string') {\n return splitAndTrim(font);\n\n } else if (typeof font === 'object') {\n font.stops.forEach((stop) => {\n stop[1] = splitAndTrim(stop[1]);\n });\n return font;\n\n } else {\n throw new Error(\"unexpected font value\");\n }\n }\n\n eachLayer(style, (layer) => {\n eachLayout(layer, (layout) => {\n if (layout['text-font']) {\n layout['text-font'] = migrateFontStack(layout['text-font']);\n }\n });\n });\n\n // Reverse order of symbol layers. This is an imperfect migration.\n //\n // The order of a symbol layer in the layers list affects two things:\n // - how it is drawn relative to other layers (like oneway arrows below bridges)\n // - the placement priority compared to other layers\n //\n // It's impossible to reverse the placement priority without breaking the draw order\n // in some cases. This migration only reverses the order of symbol layers that\n // are above all other types of layers.\n //\n // Symbol layers that are at the top of the map preserve their priority.\n // Symbol layers that are below another type (line, fill) of layer preserve their draw order.\n\n let firstSymbolLayer = 0;\n for (let i = style.layers.length - 1; i >= 0; i--) {\n const layer = style.layers[i];\n if (layer.type !== 'symbol') {\n firstSymbolLayer = i + 1;\n break;\n }\n }\n\n const symbolLayers = style.layers.splice(firstSymbolLayer);\n symbolLayers.reverse();\n style.layers = style.layers.concat(symbolLayers);\n\n return style;\n}\n","// @flow\n\nexport default function (output: any, ...inputs: Array<any>) {\n for (const input of inputs) {\n for (const k in input) {\n output[k] = input[k];\n }\n }\n return output;\n}\n","// @flow\n\nclass ParsingError extends Error {\n key: string;\n message: string;\n constructor(key: string, message: string) {\n super(message);\n this.message = message;\n this.key = key;\n }\n}\n\nexport default ParsingError;\n","// @flow\n\nimport type {Expression} from './expression';\n\n/**\n * Tracks `let` bindings during expression parsing.\n * @private\n */\nclass Scope {\n parent: ?Scope;\n bindings: {[_: string]: Expression};\n constructor(parent?: Scope, bindings: Array<[string, Expression]> = []) {\n this.parent = parent;\n this.bindings = {};\n for (const [name, expression] of bindings) {\n this.bindings[name] = expression;\n }\n }\n\n concat(bindings: Array<[string, Expression]>) {\n return new Scope(this, bindings);\n }\n\n get(name: string): Expression {\n if (this.bindings[name]) { return this.bindings[name]; }\n if (this.parent) { return this.parent.get(name); }\n throw new Error(`${name} not found in scope.`);\n }\n\n has(name: string): boolean {\n if (this.bindings[name]) return true;\n return this.parent ? this.parent.has(name) : false;\n }\n}\n\nexport default Scope;\n","// @flow\n\nexport type NullTypeT = { kind: 'null' };\nexport type NumberTypeT = { kind: 'number' };\nexport type StringTypeT = { kind: 'string' };\nexport type BooleanTypeT = { kind: 'boolean' };\nexport type ColorTypeT = { kind: 'color' };\nexport type ObjectTypeT = { kind: 'object' };\nexport type ValueTypeT = { kind: 'value' };\nexport type ErrorTypeT = { kind: 'error' };\nexport type CollatorTypeT = { kind: 'collator' };\nexport type FormattedTypeT = { kind: 'formatted' };\nexport type ResolvedImageTypeT = { kind: 'resolvedImage' };\n\nexport type EvaluationKind = 'constant' | 'source' | 'camera' | 'composite';\n\nexport type Type =\n NullTypeT |\n NumberTypeT |\n StringTypeT |\n BooleanTypeT |\n ColorTypeT |\n ObjectTypeT |\n ValueTypeT |\n ArrayType | // eslint-disable-line no-use-before-define\n ErrorTypeT |\n CollatorTypeT |\n FormattedTypeT |\n ResolvedImageTypeT\n\nexport type ArrayType = {\n kind: 'array',\n itemType: Type,\n N: ?number\n}\n\nexport type NativeType = 'number' | 'string' | 'boolean' | 'null' | 'array' | 'object'\n\nexport const NullType = {kind: 'null'};\nexport const NumberType = {kind: 'number'};\nexport const StringType = {kind: 'string'};\nexport const BooleanType = {kind: 'boolean'};\nexport const ColorType = {kind: 'color'};\nexport const ObjectType = {kind: 'object'};\nexport const ValueType = {kind: 'value'};\nexport const ErrorType = {kind: 'error'};\nexport const CollatorType = {kind: 'collator'};\nexport const FormattedType = {kind: 'formatted'};\nexport const ResolvedImageType = {kind: 'resolvedImage'};\n\nexport function array(itemType: Type, N: ?number): ArrayType {\n return {\n kind: 'array',\n itemType,\n N\n };\n}\n\nexport function toString(type: Type): string {\n if (type.kind === 'array') {\n const itemType = toString(type.itemType);\n return typeof type.N === 'number' ?\n `array<${itemType}, ${type.N}>` :\n type.itemType.kind === 'value' ? 'array' : `array<${itemType}>`;\n } else {\n return type.kind;\n }\n}\n\nconst valueMemberTypes = [\n NullType,\n NumberType,\n StringType,\n BooleanType,\n ColorType,\n FormattedType,\n ObjectType,\n array(ValueType),\n ResolvedImageType\n];\n\n/**\n * Returns null if `t` is a subtype of `expected`; otherwise returns an\n * error message.\n * @private\n */\nexport function checkSubtype(expected: Type, t: Type): ?string {\n if (t.kind === 'error') {\n // Error is a subtype of every type\n return null;\n } else if (expected.kind === 'array') {\n if (t.kind === 'array' &&\n ((t.N === 0 && t.itemType.kind === 'value') || !checkSubtype(expected.itemType, t.itemType)) &&\n (typeof expected.N !== 'number' || expected.N === t.N)) {\n return null;\n }\n } else if (expected.kind === t.kind) {\n return null;\n } else if (expected.kind === 'value') {\n for (const memberType of valueMemberTypes) {\n if (!checkSubtype(memberType, t)) {\n return null;\n }\n }\n }\n\n return `Expected ${toString(expected)} but found ${toString(t)} instead.`;\n}\n\nexport function isValidType(provided: Type, allowedTypes: Array<Type>): boolean {\n return allowedTypes.some(t => t.kind === provided.kind);\n}\n\nexport function isValidNativeType(provided: any, allowedTypes: Array<NativeType>): boolean {\n return allowedTypes.some(t => {\n if (t === 'null') {\n return provided === null;\n } else if (t === 'array') {\n return Array.isArray(provided);\n } else if (t === 'object') {\n return provided && !Array.isArray(provided) && typeof provided === 'object';\n } else {\n return t === typeof provided;\n }\n });\n}\n","// (c) Dean McNamee <dean@gmail.com>, 2012.\n//\n// https://github.com/deanm/css-color-parser-js\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n// IN THE SOFTWARE.\n\n// http://www.w3.org/TR/css3-color/\nvar kCSSColorTable = {\n \"transparent\": [0,0,0,0], \"aliceblue\": [240,248,255,1],\n \"antiquewhite\": [250,235,215,1], \"aqua\": [0,255,255,1],\n \"aquamarine\": [127,255,212,1], \"azure\": [240,255,255,1],\n \"beige\": [245,245,220,1], \"bisque\": [255,228,196,1],\n \"black\": [0,0,0,1], \"blanchedalmond\": [255,235,205,1],\n \"blue\": [0,0,255,1], \"blueviolet\": [138,43,226,1],\n \"brown\": [165,42,42,1], \"burlywood\": [222,184,135,1],\n \"cadetblue\": [95,158,160,1], \"chartreuse\": [127,255,0,1],\n \"chocolate\": [210,105,30,1], \"coral\": [255,127,80,1],\n \"cornflowerblue\": [100,149,237,1], \"cornsilk\": [255,248,220,1],\n \"crimson\": [220,20,60,1], \"cyan\": [0,255,255,1],\n \"darkblue\": [0,0,139,1], \"darkcyan\": [0,139,139,1],\n \"darkgoldenrod\": [184,134,11,1], \"darkgray\": [169,169,169,1],\n \"darkgreen\": [0,100,0,1], \"darkgrey\": [169,169,169,1],\n \"darkkhaki\": [189,183,107,1], \"darkmagenta\": [139,0,139,1],\n \"darkolivegreen\": [85,107,47,1], \"darkorange\": [255,140,0,1],\n \"darkorchid\": [153,50,204,1], \"darkred\": [139,0,0,1],\n \"darksalmon\": [233,150,122,1], \"darkseagreen\": [143,188,143,1],\n \"darkslateblue\": [72,61,139,1], \"darkslategray\": [47,79,79,1],\n \"darkslategrey\": [47,79,79,1], \"darkturquoise\": [0,206,209,1],\n \"darkviolet\": [148,0,211,1], \"deeppink\": [255,20,147,1],\n \"deepskyblue\": [0,191,255,1], \"dimgray\": [105,105,105,1],\n \"dimgrey\": [105,105,105,1], \"dodgerblue\": [30,144,255,1],\n \"firebrick\": [178,34,34,1], \"floralwhite\": [255,250,240,1],\n \"forestgreen\": [34,139,34,1], \"fuchsia\": [255,0,255,1],\n \"gainsboro\": [220,220,220,1], \"ghostwhite\": [248,248,255,1],\n \"gold\": [255,215,0,1], \"goldenrod\": [218,165,32,1],\n \"gray\": [128,128,128,1], \"green\": [0,128,0,1],\n \"greenyellow\": [173,255,47,1], \"grey\": [128,128,128,1],\n \"honeydew\": [240,255,240,1], \"hotpink\": [255,105,180,1],\n \"indianred\": [205,92,92,1], \"indigo\": [75,0,130,1],\n \"ivory\": [255,255,240,1], \"khaki\": [240,230,140,1],\n \"lavender\": [230,230,250,1], \"lavenderblush\": [255,240,245,1],\n \"lawngreen\": [124,252,0,1], \"lemonchiffon\": [255,250,205,1],\n \"lightblue\": [173,216,230,1], \"lightcoral\": [240,128,128,1],\n \"lightcyan\": [224,255,255,1], \"lightgoldenrodyellow\": [250,250,210,1],\n \"lightgray\": [211,211,211,1], \"lightgreen\": [144,238,144,1],\n \"lightgrey\": [211,211,211,1], \"lightpink\": [255,182,193,1],\n \"lightsalmon\": [255,160,122,1], \"lightseagreen\": [32,178,170,1],\n \"lightskyblue\": [135,206,250,1], \"lightslategray\": [119,136,153,1],\n \"lightslategrey\": [119,136,153,1], \"lightsteelblue\": [176,196,222,1],\n \"lightyellow\": [255,255,224,1], \"lime\": [0,255,0,1],\n \"limegreen\": [50,205,50,1], \"linen\": [250,240,230,1],\n \"magenta\": [255,0,255,1], \"maroon\": [128,0,0,1],\n \"mediumaquamarine\": [102,205,170,1], \"mediumblue\": [0,0,205,1],\n \"mediumorchid\": [186,85,211,1], \"mediumpurple\": [147,112,219,1],\n \"mediumseagreen\": [60,179,113,1], \"mediumslateblue\": [123,104,238,1],\n \"mediumspringgreen\": [0,250,154,1], \"mediumturquoise\": [72,209,204,1],\n \"mediumvioletred\": [199,21,133,1], \"midnightblue\": [25,25,112,1],\n \"mintcream\": [245,255,250,1], \"mistyrose\": [255,228,225,1],\n \"moccasin\": [255,228,181,1], \"navajowhite\": [255,222,173,1],\n \"navy\": [0,0,128,1], \"oldlace\": [253,245,230,1],\n \"olive\": [128,128,0,1], \"olivedrab\": [107,142,35,1],\n \"orange\": [255,165,0,1], \"orangered\": [255,69,0,1],\n \"orchid\": [218,112,214,1], \"palegoldenrod\": [238,232,170,1],\n \"palegreen\": [152,251,152,1], \"paleturquoise\": [175,238,238,1],\n \"palevioletred\": [219,112,147,1], \"papayawhip\": [255,239,213,1],\n \"peachpuff\": [255,218,185,1], \"peru\": [205,133,63,1],\n \"pink\": [255,192,203,1], \"plum\": [221,160,221,1],\n \"powderblue\": [176,224,230,1], \"purple\": [128,0,128,1],\n \"rebeccapurple\": [102,51,153,1],\n \"red\": [255,0,0,1], \"rosybrown\": [188,143,143,1],\n \"royalblue\": [65,105,225,1], \"saddlebrown\": [139,69,19,1],\n \"salmon\": [250,128,114,1], \"sandybrown\": [244,164,96,1],\n \"seagreen\": [46,139,87,1], \"seashell\": [255,245,238,1],\n \"sienna\": [160,82,45,1], \"silver\": [192,192,192,1],\n \"skyblue\": [135,206,235,1], \"slateblue\": [106,90,205,1],\n \"slategray\": [112,128,144,1], \"slategrey\": [112,128,144,1],\n \"snow\": [255,250,250,1], \"springgreen\": [0,255,127,1],\n \"steelblue\": [70,130,180,1], \"tan\": [210,180,140,1],\n \"teal\": [0,128,128,1], \"thistle\": [216,191,216,1],\n \"tomato\": [255,99,71,1], \"turquoise\": [64,224,208,1],\n \"violet\": [238,130,238,1], \"wheat\": [245,222,179,1],\n \"white\": [255,255,255,1], \"whitesmoke\": [245,245,245,1],\n \"yellow\": [255,255,0,1], \"yellowgreen\": [154,205,50,1]}\n\nfunction clamp_css_byte(i) { // Clamp to integer 0 .. 255.\n i = Math.round(i); // Seems to be what Chrome does (vs truncation).\n return i < 0 ? 0 : i > 255 ? 255 : i;\n}\n\nfunction clamp_css_float(f) { // Clamp to float 0.0 .. 1.0.\n return f < 0 ? 0 : f > 1 ? 1 : f;\n}\n\nfunction parse_css_int(str) { // int or percentage.\n if (str[str.length - 1] === '%')\n return clamp_css_byte(parseFloat(str) / 100 * 255);\n return clamp_css_byte(parseInt(str));\n}\n\nfunction parse_css_float(str) { // float or percentage.\n if (str[str.length - 1] === '%')\n return clamp_css_float(parseFloat(str) / 100);\n return clamp_css_float(parseFloat(str));\n}\n\nfunction css_hue_to_rgb(m1, m2, h) {\n if (h < 0) h += 1;\n else if (h > 1) h -= 1;\n\n if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;\n if (h * 2 < 1) return m2;\n if (h * 3 < 2) return m1 + (m2 - m1) * (2/3 - h) * 6;\n return m1;\n}\n\nfunction parseCSSColor(css_str) {\n // Remove all whitespace, not compliant, but should just be more accepting.\n var str = css_str.replace(/ /g, '').toLowerCase();\n\n // Color keywords (and transparent) lookup.\n if (str in kCSSColorTable) return kCSSColorTable[str].slice(); // dup.\n\n // #abc and #abc123 syntax.\n if (str[0] === '#') {\n if (str.length === 4) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xfff)) return null; // Covers NaN.\n return [((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),\n (iv & 0xf0) | ((iv & 0xf0) >> 4),\n (iv & 0xf) | ((iv & 0xf) << 4),\n 1];\n } else if (str.length === 7) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xffffff)) return null; // Covers NaN.\n return [(iv & 0xff0000) >> 16,\n (iv & 0xff00) >> 8,\n iv & 0xff,\n 1];\n }\n\n return null;\n }\n\n var op = str.indexOf('('), ep = str.indexOf(')');\n if (op !== -1 && ep + 1 === str.length) {\n var fname = str.substr(0, op);\n var params = str.substr(op+1, ep-(op+1)).split(',');\n var alpha = 1; // To allow case fallthrough.\n switch (fname) {\n case 'rgba':\n if (params.length !== 4) return null;\n alpha = parse_css_float(params.pop());\n // Fall through.\n case 'rgb':\n if (params.length !== 3) return null;\n return [parse_css_int(params[0]),\n parse_css_int(params[1]),\n parse_css_int(params[2]),\n alpha];\n case 'hsla':\n if (params.length !== 4) return null;\n alpha = parse_css_float(params.pop());\n // Fall through.\n case 'hsl':\n if (params.length !== 3) return null;\n var h = (((parseFloat(params[0]) % 360) + 360) % 360) / 360; // 0 .. 1\n // NOTE(deanm): According to the CSS spec s/l should only be\n // percentages, but we don't bother and let float or percentage.\n var s = parse_css_float(params[1]);\n var l = parse_css_float(params[2]);\n var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n var m1 = l * 2 - m2;\n return [clamp_css_byte(css_hue_to_rgb(m1, m2, h+1/3) * 255),\n clamp_css_byte(css_hue_to_rgb(m1, m2, h) * 255),\n clamp_css_byte(css_hue_to_rgb(m1, m2, h-1/3) * 255),\n alpha];\n default:\n return null;\n }\n }\n\n return null;\n}\n\ntry { exports.parseCSSColor = parseCSSColor } catch(e) { }\n","// @flow\n\nimport {parseCSSColor} from 'csscolorparser';\n\n/**\n * An RGBA color value. Create instances from color strings using the static\n * method `Color.parse`. The constructor accepts RGB channel values in the range\n * `[0, 1]`, premultiplied by A.\n *\n * @param {number} r The red channel.\n * @param {number} g The green channel.\n * @param {number} b The blue channel.\n * @param {number} a The alpha channel.\n * @private\n */\nclass Color {\n r: number;\n g: number;\n b: number;\n a: number;\n\n constructor(r: number, g: number, b: number, a: number = 1) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n\n static black: Color;\n static white: Color;\n static transparent: Color;\n static red: Color;\n static blue: Color;\n\n /**\n * Parses valid CSS color strings and returns a `Color` instance.\n * @returns A `Color` instance, or `undefined` if the input is not a valid color string.\n */\n static parse(input?: string | Color | null): Color | void {\n if (!input) {\n return undefined;\n }\n\n if (input instanceof Color) {\n return input;\n }\n\n if (typeof input !== 'string') {\n return undefined;\n }\n\n const rgba = parseCSSColor(input);\n if (!rgba) {\n return undefined;\n }\n\n return new Color(\n rgba[0] / 255 * rgba[3],\n rgba[1] / 255 * rgba[3],\n rgba[2] / 255 * rgba[3],\n rgba[3]\n );\n }\n\n /**\n * Returns an RGBA string representing the color value.\n *\n * @returns An RGBA string.\n * @example\n * var purple = new Color.parse('purple');\n * purple.toString; // = \"rgba(128,0,128,1)\"\n * var translucentGreen = new Color.parse('rgba(26, 207, 26, .73)');\n * translucentGreen.toString(); // = \"rgba(26,207,26,0.73)\"\n */\n toString(): string {\n const [r, g, b, a] = this.toArray();\n return `rgba(${Math.round(r)},${Math.round(g)},${Math.round(b)},${a})`;\n }\n\n toArray(): [number, number, number, number] {\n const {r, g, b, a} = this;\n return a === 0 ? [0, 0, 0, 0] : [\n r * 255 / a,\n g * 255 / a,\n b * 255 / a,\n a\n ];\n }\n}\n\nColor.black = new Color(0, 0, 0, 1);\nColor.white = new Color(1, 1, 1, 1);\nColor.transparent = new Color(0, 0, 0, 0);\nColor.red = new Color(1, 0, 0, 1);\nColor.blue = new Color(0, 0, 1, 1);\n\nexport default Color;\n","// @flow\n\n// Flow type declarations for Intl cribbed from\n// https://github.com/facebook/flow/issues/1270\n\ndeclare var Intl: {\n Collator: Class<Intl$Collator>\n};\n\ndeclare class Intl$Collator {\n constructor (\n locales?: string | string[],\n options?: CollatorOptions\n ): Intl$Collator;\n\n static (\n locales?: string | string[],\n options?: CollatorOptions\n ): Intl$Collator;\n\n compare (a: string, b: string): number;\n\n resolvedOptions(): any;\n}\n\ntype CollatorOptions = {\n localeMatcher?: 'lookup' | 'best fit',\n usage?: 'sort' | 'search',\n sensitivity?: 'base' | 'accent' | 'case' | 'variant',\n ignorePunctuation?: boolean,\n numeric?: boolean,\n caseFirst?: 'upper' | 'lower' | 'false'\n}\n\nexport default class Collator {\n locale: string | null;\n sensitivity: 'base' | 'accent' | 'case' | 'variant';\n collator: Intl$Collator;\n\n constructor(caseSensitive: boolean, diacriticSensitive: boolean, locale: string | null) {\n if (caseSensitive)\n this.sensitivity = diacriticSensitive ? 'variant' : 'case';\n else\n this.sensitivity = diacriticSensitive ? 'accent' : 'base';\n\n this.locale = locale;\n this.collator = new Intl.Collator(this.locale ? this.locale : [],\n {sensitivity: this.sensitivity, usage: 'search'});\n }\n\n compare(lhs: string, rhs: string): number {\n return this.collator.compare(lhs, rhs);\n }\n\n resolvedLocale(): string {\n // We create a Collator without \"usage: search\" because we don't want\n // the search options encoded in our result (e.g. \"en-u-co-search\")\n return new Intl.Collator(this.locale ? this.locale : [])\n .resolvedOptions().locale;\n }\n}\n","// @flow\nimport type Color from '../../util/color';\nimport type ResolvedImage from '../types/resolved_image';\n\nexport class FormattedSection {\n text: string;\n image: ResolvedImage | null;\n scale: number | null;\n fontStack: string | null;\n textColor: Color | null;\n\n constructor(text: string, image: ResolvedImage | null, scale: number | null, fontStack: string | null, textColor: Color | null) {\n this.text = text;\n this.image = image;\n this.scale = scale;\n this.fontStack = fontStack;\n this.textColor = textColor;\n }\n}\n\nexport default class Formatted {\n sections: Array<FormattedSection>;\n\n constructor(sections: Array<FormattedSection>) {\n this.sections = sections;\n }\n\n static fromString(unformatted: string): Formatted {\n return new Formatted([new FormattedSection(unformatted, null, null, null, null)]);\n }\n\n isEmpty(): boolean {\n if (this.sections.length === 0) return true;\n return !this.sections.some(section => section.text.length !== 0 ||\n (section.image && section.image.name.length !== 0));\n }\n\n static factory(text: Formatted | string): Formatted {\n if (text instanceof Formatted) {\n return text;\n } else {\n return Formatted.fromString(text);\n }\n }\n\n toString(): string {\n if (this.sections.length === 0) return '';\n return this.sections.map(section => section.text).join('');\n }\n\n serialize(): Array<mixed> {\n const serialized: Array<mixed> = [\"format\"];\n for (const section of this.sections) {\n if (section.image) {\n serialized.push([\"image\", section.image.name]);\n continue;\n }\n serialized.push(section.text);\n const options: { [key: string]: mixed } = {};\n if (section.fontStack) {\n options[\"text-font\"] = [\"literal\", section.fontStack.split(',')];\n }\n if (section.scale) {\n options[\"font-scale\"] = section.scale;\n }\n if (section.textColor) {\n options[\"text-color\"] = ([\"rgba\"]: Array<mixed>).concat(section.textColor.toArray());\n }\n serialized.push(options);\n }\n return serialized;\n }\n}\n","// @flow\n\nexport type ResolvedImageOptions = {\n name: string,\n available: boolean\n};\n\nexport default class ResolvedImage {\n name: string;\n available: boolean;\n\n constructor(options: ResolvedImageOptions) {\n this.name = options.name;\n this.available = options.available;\n }\n\n toString(): string {\n return this.name;\n }\n\n static fromString(name: string): ResolvedImage | null {\n if (!name) return null; // treat empty values as no image\n return new ResolvedImage({name, available: false});\n }\n\n serialize(): Array<string> {\n return [\"image\", this.name];\n }\n}\n","// @flow\n\nimport assert from 'assert';\n\nimport Color from '../util/color';\nimport Collator from './types/collator';\nimport Formatted from './types/formatted';\nimport ResolvedImage from './types/resolved_image';\nimport {NullType, NumberType, StringType, BooleanType, ColorType, ObjectType, ValueType, CollatorType, FormattedType, ResolvedImageType, array} from './types';\n\nimport type {Type} from './types';\n\nexport function validateRGBA(r: mixed, g: mixed, b: mixed, a?: mixed): string | null {\n if (!(\n typeof r === 'number' && r >= 0 && r <= 255 &&\n typeof g === 'number' && g >= 0 && g <= 255 &&\n typeof b === 'number' && b >= 0 && b <= 255\n )) {\n const value = typeof a === 'number' ? [r, g, b, a] : [r, g, b];\n return `Invalid rgba value [${value.join(', ')}]: 'r', 'g', and 'b' must be between 0 and 255.`;\n }\n\n if (!(\n typeof a === 'undefined' || (typeof a === 'number' && a >= 0 && a <= 1)\n )) {\n return `Invalid rgba value [${[r, g, b, a].join(', ')}]: 'a' must be between 0 and 1.`;\n }\n\n return null;\n}\n\nexport type Value = null | string | boolean | number | Color | Collator | Formatted | ResolvedImage | $ReadOnlyArray<Value> | { +[string]: Value }\n\nexport function isValue(mixed: mixed): boolean {\n if (mixed === null) {\n return true;\n } else if (typeof mixed === 'string') {\n return true;\n } else if (typeof mixed === 'boolean') {\n return true;\n } else if (typeof mixed === 'number') {\n return true;\n } else if (mixed instanceof Color) {\n return true;\n } else if (mixed instanceof Collator) {\n return true;\n } else if (mixed instanceof Formatted) {\n return true;\n } else if (mixed instanceof ResolvedImage) {\n return true;\n } else if (Array.isArray(mixed)) {\n for (const item of mixed) {\n if (!isValue(item)) {\n return false;\n }\n }\n return true;\n } else if (typeof mixed === 'object') {\n for (const key in mixed) {\n if (!isValue(mixed[key])) {\n return false;\n }\n }\n return true;\n } else {\n return false;\n }\n}\n\nexport function typeOf(value: Value): Type {\n if (value === null) {\n return NullType;\n } else if (typeof value === 'string') {\n return StringType;\n } else if (typeof value === 'boolean') {\n return BooleanType;\n } else if (typeof value === 'number') {\n return NumberType;\n } else if (value instanceof Color) {\n return ColorType;\n } else if (value instanceof Collator) {\n return CollatorType;\n } else if (value instanceof Formatted) {\n return FormattedType;\n } else if (value instanceof ResolvedImage) {\n return ResolvedImageType;\n } else if (Array.isArray(value)) {\n const length = value.length;\n let itemType: Type | typeof undefined;\n\n for (const item of value) {\n const t = typeOf(item);\n if (!itemType) {\n itemType = t;\n } else if (itemType === t) {\n continue;\n } else {\n itemType = ValueType;\n break;\n }\n }\n\n return array(itemType || ValueType, length);\n } else {\n assert(typeof value === 'object');\n return ObjectType;\n }\n}\n\nexport function toString(value: Value) {\n const type = typeof value;\n if (value === null) {\n return '';\n } else if (type === 'string' || type === 'number' || type === 'boolean') {\n return String(value);\n } else if (value instanceof Color || value instanceof Formatted || value instanceof ResolvedImage) {\n return value.toString();\n } else {\n return JSON.stringify(value);\n }\n}\n\nexport {Color, Collator};\n","// @flow\n\nimport assert from 'assert';\nimport {isValue, typeOf, Color} from '../values';\nimport Formatted from '../types/formatted';\n\nimport type {Type} from '../types';\nimport type {Value} from '../values';\nimport type {Expression} from '../expression';\nimport type ParsingContext from '../parsing_context';\n\nclass Literal implements Expression {\n type: Type;\n value: Value;\n\n constructor(type: Type, value: Value) {\n this.type = type;\n this.value = value;\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext) {\n if (args.length !== 2)\n return context.error(`'literal' expression requires exactly one argument, but found ${args.length - 1} instead.`);\n\n if (!isValue(args[1]))\n return context.error(`invalid value`);\n\n const value = (args[1]: any);\n let type = typeOf(value);\n\n // special case: infer the item type if possible for zero-length arrays\n const expected = context.expectedType;\n if (\n type.kind === 'array' &&\n type.N === 0 &&\n expected &&\n expected.kind === 'array' &&\n (typeof expected.N !== 'number' || expected.N === 0)\n ) {\n type = expected;\n }\n\n return new Literal(type, value);\n }\n\n evaluate() {\n return this.value;\n }\n\n eachChild() {}\n\n outputDefined() {\n return true;\n }\n\n serialize(): Array<mixed> {\n if (this.type.kind === 'array' || this.type.kind === 'object') {\n return [\"literal\", this.value];\n } else if (this.value instanceof Color) {\n // Constant-folding can generate Literal expressions that you\n // couldn't actually generate with a \"literal\" expression,\n // so we have to implement an equivalent serialization here\n return [\"rgba\"].concat(this.value.toArray());\n } else if (this.value instanceof Formatted) {\n // Same as Color\n return this.value.serialize();\n } else {\n assert(this.value === null ||\n typeof this.value === 'string' ||\n typeof this.value === 'number' ||\n typeof this.value === 'boolean');\n return (this.value: any);\n }\n }\n}\n\nexport default Literal;\n","// @flow\n\nclass RuntimeError {\n name: string;\n message: string;\n\n constructor(message: string) {\n this.name = 'ExpressionEvaluationError';\n this.message = message;\n }\n\n toJSON() {\n return this.message;\n }\n}\n\nexport default RuntimeError;\n","// @flow\n\nimport assert from 'assert';\n\nimport {\n ObjectType,\n ValueType,\n StringType,\n NumberType,\n BooleanType,\n checkSubtype,\n toString,\n array\n} from '../types';\nimport RuntimeError from '../runtime_error';\nimport {typeOf} from '../values';\n\nimport type {Expression} from '../expression';\nimport type ParsingContext from '../parsing_context';\nimport type EvaluationContext from '../evaluation_context';\nimport type {Type} from '../types';\n\nconst types = {\n string: StringType,\n number: NumberType,\n boolean: BooleanType,\n object: ObjectType\n};\n\nclass Assertion implements Expression {\n type: Type;\n args: Array<Expression>;\n\n constructor(type: Type, args: Array<Expression>) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Expression {\n if (args.length < 2)\n return context.error(`Expected at least one argument.`);\n\n let i = 1;\n let type;\n\n const name: string = (args[0]: any);\n if (name === 'array') {\n let itemType;\n if (args.length > 2) {\n const type = args[1];\n if (typeof type !== 'string' || !(type in types) || type === 'object')\n return context.error('The item type argument of \"array\" must be one of string, number, boolean', 1);\n itemType = types[type];\n i++;\n } else {\n itemType = ValueType;\n }\n\n let N;\n if (args.length > 3) {\n if (args[2] !== null &&\n (typeof args[2] !== 'number' ||\n args[2] < 0 ||\n args[2] !== Math.floor(args[2]))\n ) {\n return context.error('The length argument to \"array\" must be a positive integer literal', 2);\n }\n N = args[2];\n i++;\n }\n\n type = array(itemType, N);\n } else {\n assert(types[name], name);\n type = types[name];\n }\n\n const parsed = [];\n for (; i < args.length; i++) {\n const input = context.parse(args[i], i, ValueType);\n if (!input) return null;\n parsed.push(input);\n }\n\n return new Assertion(type, parsed);\n }\n\n evaluate(ctx: EvaluationContext) {\n for (let i = 0; i < this.args.length; i++) {\n const value = this.args[i].evaluate(ctx);\n const error = checkSubtype(this.type, typeOf(value));\n if (!error) {\n return value;\n } else if (i === this.args.length - 1) {\n throw new RuntimeError(`Expected value to be of type ${toString(this.type)}, but found ${toString(typeOf(value))} instead.`);\n }\n }\n\n assert(false);\n return null;\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return this.args.every(arg => arg.outputDefined());\n }\n\n serialize(): Array<mixed> {\n const type = this.type;\n const serialized = [type.kind];\n if (type.kind === 'array') {\n const itemType = type.itemType;\n if (itemType.kind === 'string' ||\n itemType.kind === 'number' ||\n itemType.kind === 'boolean') {\n serialized.push(itemType.kind);\n const N = type.N;\n if (typeof N === 'number' || this.args.length > 1) {\n serialized.push(N);\n }\n }\n }\n return serialized.concat(this.args.map(arg => arg.serialize()));\n }\n}\n\nexport default Assertion;\n","// @flow\n\nimport {NumberType, ValueType, FormattedType, array, StringType, ColorType, ResolvedImageType} from '../types';\nimport Formatted, {FormattedSection} from '../types/formatted';\nimport {toString, typeOf} from '../values';\n\nimport type {Expression} from '../expression';\nimport type EvaluationContext from '../evaluation_context';\nimport type ParsingContext from '../parsing_context';\nimport type {Type} from '../types';\n\ntype FormattedSectionExpression = {\n // Content of a section may be Image expression or other\n // type of expression that is coercable to 'string'.\n content: Expression,\n scale: Expression | null;\n font: Expression | null;\n textColor: Expression | null;\n}\n\nexport default class FormatExpression implements Expression {\n type: Type;\n sections: Array<FormattedSectionExpression>;\n\n constructor(sections: Array<FormattedSectionExpression>) {\n this.type = FormattedType;\n this.sections = sections;\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Expression {\n if (args.length < 2) {\n return context.error(`Expected at least one argument.`);\n }\n\n const firstArg = args[1];\n if (!Array.isArray(firstArg) && typeof firstArg === 'object') {\n return context.error(`First argument must be an image or text section.`);\n }\n\n const sections: Array<FormattedSectionExpression> = [];\n let nextTokenMayBeObject = false;\n for (let i = 1; i <= args.length - 1; ++i) {\n const arg = (args[i]: any);\n\n if (nextTokenMayBeObject && typeof arg === \"object\" && !Array.isArray(arg)) {\n nextTokenMayBeObject = false;\n\n let scale = null;\n if (arg['font-scale']) {\n scale = context.parse(arg['font-scale'], 1, NumberType);\n if (!scale) return null;\n }\n\n let font = null;\n if (arg['text-font']) {\n font = context.parse(arg['text-font'], 1, array(StringType));\n if (!font) return null;\n }\n\n let textColor = null;\n if (arg['text-color']) {\n textColor = context.parse(arg['text-color'], 1, ColorType);\n if (!textColor) return null;\n }\n\n const lastExpression = sections[sections.length - 1];\n lastExpression.scale = scale;\n lastExpression.font = font;\n lastExpression.textColor = textColor;\n } else {\n const content = context.parse(args[i], 1, ValueType);\n if (!content) return null;\n\n const kind = content.type.kind;\n if (kind !== 'string' && kind !== 'value' && kind !== 'null' && kind !== 'resolvedImage')\n return context.error(`Formatted text type must be 'string', 'value', 'image' or 'null'.`);\n\n nextTokenMayBeObject = true;\n sections.push({content, scale: null, font: null, textColor: null});\n }\n }\n\n return new FormatExpression(sections);\n }\n\n evaluate(ctx: EvaluationContext) {\n const evaluateSection = section => {\n const evaluatedContent = section.content.evaluate(ctx);\n if (typeOf(evaluatedContent) === ResolvedImageType) {\n return new FormattedSection('', evaluatedContent, null, null, null);\n }\n\n return new FormattedSection(\n toString(evaluatedContent),\n null,\n section.scale ? section.scale.evaluate(ctx) : null,\n section.font ? section.font.evaluate(ctx).join(',') : null,\n section.textColor ? section.textColor.evaluate(ctx) : null\n );\n };\n\n return new Formatted(this.sections.map(evaluateSection));\n }\n\n eachChild(fn: (_: Expression) => void) {\n for (const section of this.sections) {\n fn(section.content);\n if (section.scale) {\n fn(section.scale);\n }\n if (section.font) {\n fn(section.font);\n }\n if (section.textColor) {\n fn(section.textColor);\n }\n }\n }\n\n outputDefined() {\n // Technically the combinatoric set of all children\n // Usually, this.text will be undefined anyway\n return false;\n }\n\n serialize() {\n const serialized = [\"format\"];\n for (const section of this.sections) {\n serialized.push(section.content.serialize());\n const options = {};\n if (section.scale) {\n options['font-scale'] = section.scale.serialize();\n }\n if (section.font) {\n options['text-font'] = section.font.serialize();\n }\n if (section.textColor) {\n options['text-color'] = section.textColor.serialize();\n }\n serialized.push(options);\n }\n return serialized;\n }\n}\n","// @flow\n\nimport {ResolvedImageType, StringType} from '../types';\nimport ResolvedImage from '../types/resolved_image';\n\nimport type {Expression} from '../expression';\nimport type EvaluationContext from '../evaluation_context';\nimport type ParsingContext from '../parsing_context';\nimport type {Type} from '../types';\n\nexport default class ImageExpression implements Expression {\n type: Type;\n input: Expression;\n\n constructor(input: Expression) {\n this.type = ResolvedImageType;\n this.input = input;\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Expression {\n if (args.length !== 2) {\n return context.error(`Expected two arguments.`);\n }\n\n const name = context.parse(args[1], 1, StringType);\n if (!name) return context.error(`No image name provided.`);\n\n return new ImageExpression(name);\n }\n\n evaluate(ctx: EvaluationContext) {\n const evaluatedImageName = this.input.evaluate(ctx);\n\n const value = ResolvedImage.fromString(evaluatedImageName);\n if (value && ctx.availableImages) value.available = ctx.availableImages.indexOf(evaluatedImageName) > -1;\n\n return value;\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n }\n\n outputDefined() {\n // The output of image is determined by the list of available images in the evaluation context\n return false;\n }\n\n serialize() {\n return [\"image\", this.input.serialize()];\n }\n}\n","// @flow\n\nimport assert from 'assert';\n\nimport {BooleanType, ColorType, NumberType, StringType, ValueType} from '../types';\nimport {Color, toString as valueToString, validateRGBA} from '../values';\nimport RuntimeError from '../runtime_error';\nimport Formatted from '../types/formatted';\nimport FormatExpression from '../definitions/format';\nimport ImageExpression from '../definitions/image';\nimport ResolvedImage from '../types/resolved_image';\n\nimport type {Expression} from '../expression';\nimport type ParsingContext from '../parsing_context';\nimport type EvaluationContext from '../evaluation_context';\nimport type {Type} from '../types';\n\nconst types = {\n 'to-boolean': BooleanType,\n 'to-color': ColorType,\n 'to-number': NumberType,\n 'to-string': StringType\n};\n\n/**\n * Special form for error-coalescing coercion expressions \"to-number\",\n * \"to-color\". Since these coercions can fail at runtime, they accept multiple\n * arguments, only evaluating one at a time until one succeeds.\n *\n * @private\n */\nclass Coercion implements Expression {\n type: Type;\n args: Array<Expression>;\n\n constructor(type: Type, args: Array<Expression>) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Expression {\n if (args.length < 2)\n return context.error(`Expected at least one argument.`);\n\n const name: string = (args[0]: any);\n assert(types[name], name);\n\n if ((name === 'to-boolean' || name === 'to-string') && args.length !== 2)\n return context.error(`Expected one argument.`);\n\n const type = types[name];\n\n const parsed = [];\n for (let i = 1; i < args.length; i++) {\n const input = context.parse(args[i], i, ValueType);\n if (!input) return null;\n parsed.push(input);\n }\n\n return new Coercion(type, parsed);\n }\n\n evaluate(ctx: EvaluationContext) {\n if (this.type.kind === 'boolean') {\n return Boolean(this.args[0].evaluate(ctx));\n } else if (this.type.kind === 'color') {\n let input;\n let error;\n for (const arg of this.args) {\n input = arg.evaluate(ctx);\n error = null;\n if (input instanceof Color) {\n return input;\n } else if (typeof input === 'string') {\n const c = ctx.parseColor(input);\n if (c) return c;\n } else if (Array.isArray(input)) {\n if (input.length < 3 || input.length > 4) {\n error = `Invalid rbga value ${JSON.stringify(input)}: expected an array containing either three or four numeric values.`;\n } else {\n error = validateRGBA(input[0], input[1], input[2], input[3]);\n }\n if (!error) {\n return new Color((input[0]: any) / 255, (input[1]: any) / 255, (input[2]: any) / 255, (input[3]: any));\n }\n }\n }\n throw new RuntimeError(error || `Could not parse color from value '${typeof input === 'string' ? input : String(JSON.stringify(input))}'`);\n } else if (this.type.kind === 'number') {\n let value = null;\n for (const arg of this.args) {\n value = arg.evaluate(ctx);\n if (value === null) return 0;\n const num = Number(value);\n if (isNaN(num)) continue;\n return num;\n }\n throw new RuntimeError(`Could not convert ${JSON.stringify(value)} to number.`);\n } else if (this.type.kind === 'formatted') {\n // There is no explicit 'to-formatted' but this coercion can be implicitly\n // created by properties that expect the 'formatted' type.\n return Formatted.fromString(valueToString(this.args[0].evaluate(ctx)));\n } else if (this.type.kind === 'resolvedImage') {\n return ResolvedImage.fromString(valueToString(this.args[0].evaluate(ctx)));\n } else {\n return valueToString(this.args[0].evaluate(ctx));\n }\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return this.args.every(arg => arg.outputDefined());\n }\n\n serialize() {\n if (this.type.kind === 'formatted') {\n return new FormatExpression([{content: this.args[0], scale: null, font: null, textColor: null}]).serialize();\n }\n\n if (this.type.kind === 'resolvedImage') {\n return new ImageExpression(this.args[0]).serialize();\n }\n\n const serialized = [`to-${this.type.kind}`];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Coercion;\n","// @flow\n\nimport {Color} from './values';\nimport type {FormattedSection} from './types/formatted';\nimport type {GlobalProperties, Feature, FeatureState} from './index';\nimport type {CanonicalTileID} from '../../source/tile_id';\n\nconst geometryTypes = ['Unknown', 'Point', 'LineString', 'Polygon'];\n\nclass EvaluationContext {\n globals: GlobalProperties;\n feature: ?Feature;\n featureState: ?FeatureState;\n formattedSection: ?FormattedSection;\n availableImages: ?Array<string>;\n canonical: ?CanonicalTileID;\n\n _parseColorCache: {[_: string]: ?Color};\n\n constructor() {\n this.globals = (null: any);\n this.feature = null;\n this.featureState = null;\n this.formattedSection = null;\n this._parseColorCache = {};\n this.availableImages = null;\n this.canonical = null;\n }\n\n id() {\n return this.feature && 'id' in this.feature ? this.feature.id : null;\n }\n\n geometryType() {\n return this.feature ? typeof this.feature.type === 'number' ? geometryTypes[this.feature.type] : this.feature.type : null;\n }\n\n geometry() {\n return this.feature && 'geometry' in this.feature ? this.feature.geometry : null;\n }\n\n canonicalID() {\n return this.canonical;\n }\n\n properties() {\n return this.feature && this.feature.properties || {};\n }\n\n parseColor(input: string): ?Color {\n let cached = this._parseColorCache[input];\n if (!cached) {\n cached = this._parseColorCache[input] = Color.parse(input);\n }\n return cached;\n }\n}\n\nexport default EvaluationContext;\n","// @flow\n\nimport {toString} from './types';\n\nimport ParsingContext from './parsing_context';\nimport EvaluationContext from './evaluation_context';\nimport assert from 'assert';\n\nimport type {Expression, ExpressionRegistry} from './expression';\nimport type {Type} from './types';\nimport type {Value} from './values';\n\nexport type Varargs = {| type: Type |};\ntype Signature = Array<Type> | Varargs;\ntype Evaluate = (EvaluationContext, Array<Expression>) => Value;\ntype Definition = [Type, Signature, Evaluate] |\n {|type: Type, overloads: Array<[Signature, Evaluate]>|};\n\nclass CompoundExpression implements Expression {\n name: string;\n type: Type;\n _evaluate: Evaluate;\n args: Array<Expression>;\n\n static definitions: {[_: string]: Definition };\n\n constructor(name: string, type: Type, evaluate: Evaluate, args: Array<Expression>) {\n this.name = name;\n this.type = type;\n this._evaluate = evaluate;\n this.args = args;\n }\n\n evaluate(ctx: EvaluationContext) {\n return this._evaluate(ctx, this.args);\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined() {\n return false;\n }\n\n serialize(): Array<mixed> {\n return [this.name].concat(this.args.map(arg => arg.serialize()));\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Expression {\n const op: string = (args[0]: any);\n const definition = CompoundExpression.definitions[op];\n if (!definition) {\n return context.error(`Unknown expression \"${op}\". If you wanted a literal array, use [\"literal\", [...]].`, 0);\n }\n\n // Now check argument types against each signature\n const type = Array.isArray(definition) ?\n definition[0] : definition.type;\n\n const availableOverloads = Array.isArray(definition) ?\n [[definition[1], definition[2]]] :\n definition.overloads;\n\n const overloads = availableOverloads.filter(([signature]) => (\n !Array.isArray(signature) || // varags\n signature.length === args.length - 1 // correct param count\n ));\n\n let signatureContext: ParsingContext = (null: any);\n\n for (const [params, evaluate] of overloads) {\n // Use a fresh context for each attempted signature so that, if\n // we eventually succeed, we haven't polluted `context.errors`.\n signatureContext = new ParsingContext(context.registry, context.path, null, context.scope);\n\n // First parse all the args, potentially coercing to the\n // types expected by this overload.\n const parsedArgs: Array<Expression> = [];\n let argParseFailed = false;\n for (let i = 1; i < args.length; i++) {\n const arg = args[i];\n const expectedType = Array.isArray(params) ?\n params[i - 1] :\n params.type;\n\n const parsed = signatureContext.parse(arg, 1 + parsedArgs.length, expectedType);\n if (!parsed) {\n argParseFailed = true;\n break;\n }\n parsedArgs.push(parsed);\n }\n if (argParseFailed) {\n // Couldn't coerce args of this overload to expected type, move\n // on to next one.\n continue;\n }\n\n if (Array.isArray(params)) {\n if (params.length !== parsedArgs.length) {\n signatureContext.error(`Expected ${params.length} arguments, but found ${parsedArgs.length} instead.`);\n continue;\n }\n }\n\n for (let i = 0; i < parsedArgs.length; i++) {\n const expected = Array.isArray(params) ? params[i] : params.type;\n const arg = parsedArgs[i];\n signatureContext.concat(i + 1).checkSubtype(expected, arg.type);\n }\n\n if (signatureContext.errors.length === 0) {\n return new CompoundExpression(op, type, evaluate, parsedArgs);\n }\n }\n\n assert(!signatureContext || signatureContext.errors.length > 0);\n\n if (overloads.length === 1) {\n context.errors.push(...signatureContext.errors);\n } else {\n const expected = overloads.length ? overloads : availableOverloads;\n const signatures = expected\n .map(([params]) => stringifySignature(params))\n .join(' | ');\n\n const actualTypes = [];\n // For error message, re-parse arguments without trying to\n // apply any coercions\n for (let i = 1; i < args.length; i++) {\n const parsed = context.parse(args[i], 1 + actualTypes.length);\n if (!parsed) return null;\n actualTypes.push(toString(parsed.type));\n }\n context.error(`Expected arguments of type ${signatures}, but found (${actualTypes.join(', ')}) instead.`);\n }\n\n return null;\n }\n\n static register(\n registry: ExpressionRegistry,\n definitions: {[_: string]: Definition }\n ) {\n assert(!CompoundExpression.definitions);\n CompoundExpression.definitions = definitions;\n for (const name in definitions) {\n registry[name] = CompoundExpression;\n }\n }\n}\n\nfunction stringifySignature(signature: Signature): string {\n if (Array.isArray(signature)) {\n return `(${signature.map(toString).join(', ')})`;\n } else {\n return `(${toString(signature.type)}...)`;\n }\n}\n\nexport default CompoundExpression;\n","// @flow\n\nimport {StringType, BooleanType, CollatorType} from '../types';\nimport Collator from '../types/collator';\n\nimport type {Expression} from '../expression';\nimport type EvaluationContext from '../evaluation_context';\nimport type ParsingContext from '../parsing_context';\nimport type {Type} from '../types';\n\nexport default class CollatorExpression implements Expression {\n type: Type;\n caseSensitive: Expression;\n diacriticSensitive: Expression;\n locale: Expression | null;\n\n constructor(caseSensitive: Expression, diacriticSensitive: Expression, locale: Expression | null) {\n this.type = CollatorType;\n this.locale = locale;\n this.caseSensitive = caseSensitive;\n this.diacriticSensitive = diacriticSensitive;\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Expression {\n if (args.length !== 2)\n return context.error(`Expected one argument.`);\n\n const options = (args[1]: any);\n if (typeof options !== \"object\" || Array.isArray(options))\n return context.error(`Collator options argument must be an object.`);\n\n const caseSensitive = context.parse(\n options['case-sensitive'] === undefined ? false : options['case-sensitive'], 1, BooleanType);\n if (!caseSensitive) return null;\n\n const diacriticSensitive = context.parse(\n options['diacritic-sensitive'] === undefined ? false : options['diacritic-sensitive'], 1, BooleanType);\n if (!diacriticSensitive) return null;\n\n let locale = null;\n if (options['locale']) {\n locale = context.parse(options['locale'], 1, StringType);\n if (!locale) return null;\n }\n\n return new CollatorExpression(caseSensitive, diacriticSensitive, locale);\n }\n\n evaluate(ctx: EvaluationContext) {\n return new Collator(this.caseSensitive.evaluate(ctx), this.diacriticSensitive.evaluate(ctx), this.locale ? this.locale.evaluate(ctx) : null);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.caseSensitive);\n fn(this.diacriticSensitive);\n if (this.locale) {\n fn(this.locale);\n }\n }\n\n outputDefined() {\n // Technically the set of possible outputs is the combinatoric set of Collators produced\n // by all possible outputs of locale/caseSensitive/diacriticSensitive\n // But for the primary use of Collators in comparison operators, we ignore the Collator's\n // possible outputs anyway, so we can get away with leaving this false for now.\n return false;\n }\n\n serialize() {\n const options = {};\n options['case-sensitive'] = this.caseSensitive.serialize();\n options['diacritic-sensitive'] = this.diacriticSensitive.serialize();\n if (this.locale) {\n options['locale'] = this.locale.serialize();\n }\n return [\"collator\", options];\n }\n}\n","// @flow\n\nimport {isValue} from '../values';\nimport type {Type} from '../types';\nimport {BooleanType} from '../types';\nimport type {Expression} from '../expression';\nimport type ParsingContext from '../parsing_context';\nimport type EvaluationContext from '../evaluation_context';\nimport type {GeoJSON, GeoJSONPolygon, GeoJSONMultiPolygon} from '@mapbox/geojson-types';\nimport Point from '@mapbox/point-geometry';\nimport type {CanonicalTileID} from '../../../source/tile_id';\n\ntype GeoJSONPolygons =| GeoJSONPolygon | GeoJSONMultiPolygon;\n\n// minX, minY, maxX, maxY\ntype BBox = [number, number, number, number];\nconst EXTENT = 8192;\n\nfunction updateBBox(bbox: BBox, coord: Point) {\n bbox[0] = Math.min(bbox[0], coord[0]);\n bbox[1] = Math.min(bbox[1], coord[1]);\n bbox[2] = Math.max(bbox[2], coord[0]);\n bbox[3] = Math.max(bbox[3], coord[1]);\n}\n\nfunction mercatorXfromLng(lng: number) {\n return (180 + lng) / 360;\n}\n\nfunction mercatorYfromLat(lat: number) {\n return (180 - (180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + lat * Math.PI / 360)))) / 360;\n}\n\nfunction boxWithinBox(bbox1: BBox, bbox2: BBox) {\n if (bbox1[0] <= bbox2[0]) return false;\n if (bbox1[2] >= bbox2[2]) return false;\n if (bbox1[1] <= bbox2[1]) return false;\n if (bbox1[3] >= bbox2[3]) return false;\n return true;\n}\n\nfunction getTileCoordinates(p, canonical: CanonicalTileID) {\n const x = mercatorXfromLng(p[0]);\n const y = mercatorYfromLat(p[1]);\n const tilesAtZoom = Math.pow(2, canonical.z);\n return [Math.round(x * tilesAtZoom * EXTENT), Math.round(y * tilesAtZoom * EXTENT)];\n}\n\nfunction onBoundary(p, p1, p2) {\n const x1 = p[0] - p1[0];\n const y1 = p[1] - p1[1];\n const x2 = p[0] - p2[0];\n const y2 = p[1] - p2[1];\n return (x1 * y2 - x2 * y1 === 0) && (x1 * x2 <= 0) && (y1 * y2 <= 0);\n}\n\nfunction rayIntersect(p, p1, p2) {\n return ((p1[1] > p[1]) !== (p2[1] > p[1])) && (p[0] < (p2[0] - p1[0]) * (p[1] - p1[1]) / (p2[1] - p1[1]) + p1[0]);\n}\n\n// ray casting algorithm for detecting if point is in polygon\nfunction pointWithinPolygon(point, rings) {\n let inside = false;\n for (let i = 0, len = rings.length; i < len; i++) {\n const ring = rings[i];\n for (let j = 0, len2 = ring.length; j < len2 - 1; j++) {\n if (onBoundary(point, ring[j], ring[j + 1])) return false;\n if (rayIntersect(point, ring[j], ring[j + 1])) inside = !inside;\n }\n }\n return inside;\n}\n\nfunction pointWithinPolygons(point, polygons) {\n for (let i = 0; i < polygons.length; i++) {\n if (pointWithinPolygon(point, polygons[i])) return true;\n }\n return false;\n}\n\nfunction perp(v1, v2) {\n return (v1[0] * v2[1] - v1[1] * v2[0]);\n}\n\n// check if p1 and p2 are in different sides of line segment q1->q2\nfunction twoSided(p1, p2, q1, q2) {\n // q1->p1 (x1, y1), q1->p2 (x2, y2), q1->q2 (x3, y3)\n const x1 = p1[0] - q1[0];\n const y1 = p1[1] - q1[1];\n const x2 = p2[0] - q1[0];\n const y2 = p2[1] - q1[1];\n const x3 = q2[0] - q1[0];\n const y3 = q2[1] - q1[1];\n const det1 = (x1 * y3 - x3 * y1);\n const det2 = (x2 * y3 - x3 * y2);\n if ((det1 > 0 && det2 < 0) || (det1 < 0 && det2 > 0)) return true;\n return false;\n}\n// a, b are end points for line segment1, c and d are end points for line segment2\nfunction lineIntersectLine(a, b, c, d) {\n // check if two segments are parallel or not\n // precondition is end point a, b is inside polygon, if line a->b is\n // parallel to polygon edge c->d, then a->b won't intersect with c->d\n const vectorP = [b[0] - a[0], b[1] - a[1]];\n const vectorQ = [d[0] - c[0], d[1] - c[1]];\n if (perp(vectorQ, vectorP) === 0) return false;\n\n // If lines are intersecting with each other, the relative location should be:\n // a and b lie in different sides of segment c->d\n // c and d lie in different sides of segment a->b\n if (twoSided(a, b, c, d) && twoSided(c, d, a, b)) return true;\n return false;\n}\n\nfunction lineIntersectPolygon(p1, p2, polygon) {\n for (const ring of polygon) {\n // loop through every edge of the ring\n for (let j = 0; j < ring.length - 1; ++j) {\n if (lineIntersectLine(p1, p2, ring[j], ring[j + 1])) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction lineStringWithinPolygon(line, polygon) {\n // First, check if geometry points of line segments are all inside polygon\n for (let i = 0; i < line.length; ++i) {\n if (!pointWithinPolygon(line[i], polygon)) {\n return false;\n }\n }\n\n // Second, check if there is line segment intersecting polygon edge\n for (let i = 0; i < line.length - 1; ++i) {\n if (lineIntersectPolygon(line[i], line[i + 1], polygon)) {\n return false;\n }\n }\n return true;\n}\n\nfunction lineStringWithinPolygons(line, polygons) {\n for (let i = 0; i < polygons.length; i++) {\n if (lineStringWithinPolygon(line, polygons[i])) return true;\n }\n return false;\n}\n\nfunction getTilePolygon(coordinates, bbox, canonical) {\n const polygon = [];\n for (let i = 0; i < coordinates.length; i++) {\n const ring = [];\n for (let j = 0; j < coordinates[i].length; j++) {\n const coord = getTileCoordinates(coordinates[i][j], canonical);\n updateBBox(bbox, coord);\n ring.push(coord);\n }\n polygon.push(ring);\n }\n return polygon;\n}\n\nfunction getTilePolygons(coordinates, bbox, canonical) {\n const polygons = [];\n for (let i = 0; i < coordinates.length; i++) {\n const polygon = getTilePolygon(coordinates[i], bbox, canonical);\n polygons.push(polygon);\n }\n return polygons;\n}\n\nfunction updatePoint(p, bbox, polyBBox, worldSize) {\n if (p[0] < polyBBox[0] || p[0] > polyBBox[2]) {\n const halfWorldSize = worldSize * 0.5;\n let shift = (p[0] - polyBBox[0] > halfWorldSize) ? -worldSize : (polyBBox[0] - p[0] > halfWorldSize) ? worldSize : 0;\n if (shift === 0) {\n shift = (p[0] - polyBBox[2] > halfWorldSize) ? -worldSize : (polyBBox[2] - p[0] > halfWorldSize) ? worldSize : 0;\n }\n p[0] += shift;\n }\n updateBBox(bbox, p);\n}\n\nfunction resetBBox(bbox) {\n bbox[0] = bbox[1] = Infinity;\n bbox[2] = bbox[3] = -Infinity;\n}\n\nfunction getTilePoints(geometry, pointBBox, polyBBox, canonical) {\n const worldSize = Math.pow(2, canonical.z) * EXTENT;\n const shifts = [canonical.x * EXTENT, canonical.y * EXTENT];\n const tilePoints = [];\n for (const points of geometry) {\n for (const point of points) {\n const p = [point.x + shifts[0], point.y + shifts[1]];\n updatePoint(p, pointBBox, polyBBox, worldSize);\n tilePoints.push(p);\n }\n }\n return tilePoints;\n}\n\nfunction getTileLines(geometry, lineBBox, polyBBox, canonical) {\n const worldSize = Math.pow(2, canonical.z) * EXTENT;\n const shifts = [canonical.x * EXTENT, canonical.y * EXTENT];\n const tileLines = [];\n for (const line of geometry) {\n const tileLine = [];\n for (const point of line) {\n const p = [point.x + shifts[0], point.y + shifts[1]];\n updateBBox(lineBBox, p);\n tileLine.push(p);\n }\n tileLines.push(tileLine);\n }\n if (lineBBox[2] - lineBBox[0] <= worldSize / 2) {\n resetBBox(lineBBox);\n for (const line of tileLines) {\n for (const p of line) {\n updatePoint(p, lineBBox, polyBBox, worldSize);\n }\n }\n }\n return tileLines;\n}\n\nfunction pointsWithinPolygons(ctx: EvaluationContext, polygonGeometry: GeoJSONPolygons) {\n const pointBBox = [Infinity, Infinity, -Infinity, -Infinity];\n const polyBBox = [Infinity, Infinity, -Infinity, -Infinity];\n\n const canonical = ctx.canonicalID();\n\n if (polygonGeometry.type === 'Polygon') {\n const tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n const tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n if (!boxWithinBox(pointBBox, polyBBox)) return false;\n\n for (const point of tilePoints) {\n if (!pointWithinPolygon(point, tilePolygon)) return false;\n }\n }\n if (polygonGeometry.type === 'MultiPolygon') {\n const tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n const tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n if (!boxWithinBox(pointBBox, polyBBox)) return false;\n\n for (const point of tilePoints) {\n if (!pointWithinPolygons(point, tilePolygons)) return false;\n }\n }\n\n return true;\n}\n\nfunction linesWithinPolygons(ctx: EvaluationContext, polygonGeometry: GeoJSONPolygons) {\n const lineBBox = [Infinity, Infinity, -Infinity, -Infinity];\n const polyBBox = [Infinity, Infinity, -Infinity, -Infinity];\n\n const canonical = ctx.canonicalID();\n\n if (polygonGeometry.type === 'Polygon') {\n const tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n const tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n if (!boxWithinBox(lineBBox, polyBBox)) return false;\n\n for (const line of tileLines) {\n if (!lineStringWithinPolygon(line, tilePolygon)) return false;\n }\n }\n if (polygonGeometry.type === 'MultiPolygon') {\n const tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n const tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n if (!boxWithinBox(lineBBox, polyBBox)) return false;\n\n for (const line of tileLines) {\n if (!lineStringWithinPolygons(line, tilePolygons)) return false;\n }\n }\n return true;\n}\n\nclass Within implements Expression {\n type: Type;\n geojson: GeoJSON\n geometries: GeoJSONPolygons;\n\n constructor(geojson: GeoJSON, geometries: GeoJSONPolygons) {\n this.type = BooleanType;\n this.geojson = geojson;\n this.geometries = geometries;\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext) {\n if (args.length !== 2)\n return context.error(`'within' expression requires exactly one argument, but found ${args.length - 1} instead.`);\n if (isValue(args[1])) {\n const geojson = (args[1]: Object);\n if (geojson.type === 'FeatureCollection') {\n for (let i = 0; i < geojson.features.length; ++i) {\n const type = geojson.features[i].geometry.type;\n if (type === 'Polygon' || type === 'MultiPolygon') {\n return new Within(geojson, geojson.features[i].geometry);\n }\n }\n } else if (geojson.type === 'Feature') {\n const type = geojson.geometry.type;\n if (type === 'Polygon' || type === 'MultiPolygon') {\n return new Within(geojson, geojson.geometry);\n }\n } else if (geojson.type === 'Polygon' || geojson.type === 'MultiPolygon') {\n return new Within(geojson, geojson);\n }\n }\n return context.error(`'within' expression requires valid geojson object that contains polygon geometry type.`);\n }\n\n evaluate(ctx: EvaluationContext) {\n if (ctx.geometry() != null && ctx.canonicalID() != null) {\n if (ctx.geometryType() === 'Point') {\n return pointsWithinPolygons(ctx, this.geometries);\n } else if (ctx.geometryType() === 'LineString') {\n return linesWithinPolygons(ctx, this.geometries);\n }\n }\n return false;\n }\n\n eachChild() {}\n\n outputDefined(): boolean {\n return true;\n }\n\n serialize(): Array<mixed> {\n return [\"within\", this.geojson];\n }\n\n}\n\nexport default Within;\n","// @flow\n\nimport CompoundExpression from './compound_expression';\nimport Within from './definitions/within';\nimport type {Expression} from './expression.js';\n\nfunction isFeatureConstant(e: Expression) {\n if (e instanceof CompoundExpression) {\n if (e.name === 'get' && e.args.length === 1) {\n return false;\n } else if (e.name === 'feature-state') {\n return false;\n } else if (e.name === 'has' && e.args.length === 1) {\n return false;\n } else if (\n e.name === 'properties' ||\n e.name === 'geometry-type' ||\n e.name === 'id'\n ) {\n return false;\n } else if (/^filter-/.test(e.name)) {\n return false;\n }\n }\n\n if (e instanceof Within) {\n return false;\n }\n\n let result = true;\n e.eachChild(arg => {\n if (result && !isFeatureConstant(arg)) { result = false; }\n });\n return result;\n}\n\nfunction isStateConstant(e: Expression) {\n if (e instanceof CompoundExpression) {\n if (e.name === 'feature-state') {\n return false;\n }\n }\n let result = true;\n e.eachChild(arg => {\n if (result && !isStateConstant(arg)) { result = false; }\n });\n return result;\n}\n\nfunction isGlobalPropertyConstant(e: Expression, properties: Array<string>) {\n if (e instanceof CompoundExpression && properties.indexOf(e.name) >= 0) { return false; }\n let result = true;\n e.eachChild((arg) => {\n if (result && !isGlobalPropertyConstant(arg, properties)) { result = false; }\n });\n return result;\n}\n\nexport {isFeatureConstant, isGlobalPropertyConstant, isStateConstant};\n","// @flow\n\nimport type {Type} from '../types';\nimport type {Expression} from '../expression';\nimport type ParsingContext from '../parsing_context';\nimport type EvaluationContext from '../evaluation_context';\n\nclass Var implements Expression {\n type: Type;\n name: string;\n boundExpression: Expression;\n\n constructor(name: string, boundExpression: Expression) {\n this.type = boundExpression.type;\n this.name = name;\n this.boundExpression = boundExpression;\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext) {\n if (args.length !== 2 || typeof args[1] !== 'string')\n return context.error(`'var' expression requires exactly one string literal argument.`);\n\n const name = args[1];\n if (!context.scope.has(name)) {\n return context.error(`Unknown variable \"${name}\". Make sure \"${name}\" has been bound in an enclosing \"let\" expression before using it.`, 1);\n }\n\n return new Var(name, context.scope.get(name));\n }\n\n evaluate(ctx: EvaluationContext) {\n return this.boundExpression.evaluate(ctx);\n }\n\n eachChild() {}\n\n outputDefined() {\n return false;\n }\n\n serialize() {\n return [\"var\", this.name];\n }\n}\n\nexport default Var;\n","// @flow\n\nimport Scope from './scope';\nimport {checkSubtype} from './types';\nimport ParsingError from './parsing_error';\nimport Literal from './definitions/literal';\nimport Assertion from './definitions/assertion';\nimport Coercion from './definitions/coercion';\nimport EvaluationContext from './evaluation_context';\nimport CompoundExpression from './compound_expression';\nimport CollatorExpression from './definitions/collator';\nimport Within from './definitions/within';\nimport {isGlobalPropertyConstant, isFeatureConstant} from './is_constant';\nimport Var from './definitions/var';\n\nimport type {Expression, ExpressionRegistry} from './expression';\nimport type {Type} from './types';\n\n/**\n * State associated parsing at a given point in an expression tree.\n * @private\n */\nclass ParsingContext {\n registry: ExpressionRegistry;\n path: Array<number>;\n key: string;\n scope: Scope;\n errors: Array<ParsingError>;\n\n // The expected type of this expression. Provided only to allow Expression\n // implementations to infer argument types: Expression#parse() need not\n // check that the output type of the parsed expression matches\n // `expectedType`.\n expectedType: ?Type;\n\n constructor(\n registry: ExpressionRegistry,\n path: Array<number> = [],\n expectedType: ?Type,\n scope: Scope = new Scope(),\n errors: Array<ParsingError> = []\n ) {\n this.registry = registry;\n this.path = path;\n this.key = path.map(part => `[${part}]`).join('');\n this.scope = scope;\n this.errors = errors;\n this.expectedType = expectedType;\n }\n\n /**\n * @param expr the JSON expression to parse\n * @param index the optional argument index if this expression is an argument of a parent expression that's being parsed\n * @param options\n * @param options.omitTypeAnnotations set true to omit inferred type annotations. Caller beware: with this option set, the parsed expression's type will NOT satisfy `expectedType` if it would normally be wrapped in an inferred annotation.\n * @private\n */\n parse(\n expr: mixed,\n index?: number,\n expectedType?: ?Type,\n bindings?: Array<[string, Expression]>,\n options: {typeAnnotation?: 'assert' | 'coerce' | 'omit'} = {}\n ): ?Expression {\n if (index) {\n return this.concat(index, expectedType, bindings)._parse(expr, options);\n }\n return this._parse(expr, options);\n }\n\n _parse(expr: mixed, options: {typeAnnotation?: 'assert' | 'coerce' | 'omit'}): ?Expression {\n if (expr === null || typeof expr === 'string' || typeof expr === 'boolean' || typeof expr === 'number') {\n expr = ['literal', expr];\n }\n\n function annotate(parsed, type, typeAnnotation: 'assert' | 'coerce' | 'omit') {\n if (typeAnnotation === 'assert') {\n return new Assertion(type, [parsed]);\n } else if (typeAnnotation === 'coerce') {\n return new Coercion(type, [parsed]);\n } else {\n return parsed;\n }\n }\n\n if (Array.isArray(expr)) {\n if (expr.length === 0) {\n return this.error(`Expected an array with at least one element. If you wanted a literal array, use [\"literal\", []].`);\n }\n\n const op = expr[0];\n if (typeof op !== 'string') {\n this.error(`Expression name must be a string, but found ${typeof op} instead. If you wanted a literal array, use [\"literal\", [...]].`, 0);\n return null;\n }\n\n const Expr = this.registry[op];\n if (Expr) {\n let parsed = Expr.parse(expr, this);\n if (!parsed) return null;\n\n if (this.expectedType) {\n const expected = this.expectedType;\n const actual = parsed.type;\n\n // When we expect a number, string, boolean, or array but have a value, wrap it in an assertion.\n // When we expect a color or formatted string, but have a string or value, wrap it in a coercion.\n // Otherwise, we do static type-checking.\n //\n // These behaviors are overridable for:\n // * The \"coalesce\" operator, which needs to omit type annotations.\n // * String-valued properties (e.g. `text-field`), where coercion is more convenient than assertion.\n //\n if ((expected.kind === 'string' || expected.kind === 'number' || expected.kind === 'boolean' || expected.kind === 'object' || expected.kind === 'array') && actual.kind === 'value') {\n parsed = annotate(parsed, expected, options.typeAnnotation || 'assert');\n } else if ((expected.kind === 'color' || expected.kind === 'formatted' || expected.kind === 'resolvedImage') && (actual.kind === 'value' || actual.kind === 'string')) {\n parsed = annotate(parsed, expected, options.typeAnnotation || 'coerce');\n } else if (this.checkSubtype(expected, actual)) {\n return null;\n }\n }\n\n // If an expression's arguments are all literals, we can evaluate\n // it immediately and replace it with a literal value in the\n // parsed/compiled result. Expressions that expect an image should\n // not be resolved here so we can later get the available images.\n if (!(parsed instanceof Literal) && (parsed.type.kind !== 'resolvedImage') && isConstant(parsed)) {\n const ec = new EvaluationContext();\n try {\n parsed = new Literal(parsed.type, parsed.evaluate(ec));\n } catch (e) {\n this.error(e.message);\n return null;\n }\n }\n\n return parsed;\n }\n\n return this.error(`Unknown expression \"${op}\". If you wanted a literal array, use [\"literal\", [...]].`, 0);\n } else if (typeof expr === 'undefined') {\n return this.error(`'undefined' value invalid. Use null instead.`);\n } else if (typeof expr === 'object') {\n return this.error(`Bare objects invalid. Use [\"literal\", {...}] instead.`);\n } else {\n return this.error(`Expected an array, but found ${typeof expr} instead.`);\n }\n }\n\n /**\n * Returns a copy of this context suitable for parsing the subexpression at\n * index `index`, optionally appending to 'let' binding map.\n *\n * Note that `errors` property, intended for collecting errors while\n * parsing, is copied by reference rather than cloned.\n * @private\n */\n concat(index: number, expectedType?: ?Type, bindings?: Array<[string, Expression]>) {\n const path = typeof index === 'number' ? this.path.concat(index) : this.path;\n const scope = bindings ? this.scope.concat(bindings) : this.scope;\n return new ParsingContext(\n this.registry,\n path,\n expectedType || null,\n scope,\n this.errors\n );\n }\n\n /**\n * Push a parsing (or type checking) error into the `this.errors`\n * @param error The message\n * @param keys Optionally specify the source of the error at a child\n * of the current expression at `this.key`.\n * @private\n */\n error(error: string, ...keys: Array<number>) {\n const key = `${this.key}${keys.map(k => `[${k}]`).join('')}`;\n this.errors.push(new ParsingError(key, error));\n }\n\n /**\n * Returns null if `t` is a subtype of `expected`; otherwise returns an\n * error message and also pushes it to `this.errors`.\n */\n checkSubtype(expected: Type, t: Type): ?string {\n const error = checkSubtype(expected, t);\n if (error) this.error(error);\n return error;\n }\n}\n\nexport default ParsingContext;\n\nfunction isConstant(expression: Expression) {\n if (expression instanceof Var) {\n return isConstant(expression.boundExpression);\n } else if (expression instanceof CompoundExpression && expression.name === 'error') {\n return false;\n } else if (expression instanceof CollatorExpression) {\n // Although the results of a Collator expression with fixed arguments\n // generally shouldn't change between executions, we can't serialize them\n // as constant expressions because results change based on environment.\n return false;\n } else if (expression instanceof Within) {\n return false;\n }\n\n const isTypeAnnotation = expression instanceof Coercion ||\n expression instanceof Assertion;\n\n let childrenConstant = true;\n expression.eachChild(child => {\n // We can _almost_ assume that if `expressions` children are constant,\n // they would already have been evaluated to Literal values when they\n // were parsed. Type annotations are the exception, because they might\n // have been inferred and added after a child was parsed.\n\n // So we recurse into isConstant() for the children of type annotations,\n // but otherwise simply check whether they are Literals.\n if (isTypeAnnotation) {\n childrenConstant = childrenConstant && isConstant(child);\n } else {\n childrenConstant = childrenConstant && child instanceof Literal;\n }\n });\n if (!childrenConstant) {\n return false;\n }\n\n return isFeatureConstant(expression) &&\n isGlobalPropertyConstant(expression, ['zoom', 'heatmap-density', 'line-progress', 'sky-radial-progress', 'accumulated', 'is-supported-script']);\n}\n","// @flow\n\nimport RuntimeError from './runtime_error';\n\nimport type {Expression} from './expression';\n\nexport type Stops = Array<[number, Expression]>;\n\n/**\n * Returns the index of the last stop <= input, or 0 if it doesn't exist.\n * @private\n */\nexport function findStopLessThanOrEqualTo(stops: Array<number>, input: number) {\n const lastIndex = stops.length - 1;\n let lowerIndex = 0;\n let upperIndex = lastIndex;\n let currentIndex = 0;\n let currentValue, nextValue;\n\n while (lowerIndex <= upperIndex) {\n currentIndex = Math.floor((lowerIndex + upperIndex) / 2);\n currentValue = stops[currentIndex];\n nextValue = stops[currentIndex + 1];\n\n if (currentValue <= input) {\n if (currentIndex === lastIndex || input < nextValue) { // Search complete\n return currentIndex;\n }\n\n lowerIndex = currentIndex + 1;\n } else if (currentValue > input) {\n upperIndex = currentIndex - 1;\n } else {\n throw new RuntimeError('Input is not a number.');\n }\n }\n\n return 0;\n}\n","// @flow\n\nimport {NumberType} from '../types';\n\nimport {findStopLessThanOrEqualTo} from '../stops';\n\nimport type {Stops} from '../stops';\nimport type {Expression} from '../expression';\nimport type ParsingContext from '../parsing_context';\nimport type EvaluationContext from '../evaluation_context';\nimport type {Type} from '../types';\n\nclass Step implements Expression {\n type: Type;\n\n input: Expression;\n labels: Array<number>;\n outputs: Array<Expression>;\n\n constructor(type: Type, input: Expression, stops: Stops) {\n this.type = type;\n this.input = input;\n\n this.labels = [];\n this.outputs = [];\n for (const [label, expression] of stops) {\n this.labels.push(label);\n this.outputs.push(expression);\n }\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext) {\n if (args.length - 1 < 4) {\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n }\n\n if ((args.length - 1) % 2 !== 0) {\n return context.error(`Expected an even number of arguments.`);\n }\n\n const input = context.parse(args[1], 1, NumberType);\n if (!input) return null;\n\n const stops: Stops = [];\n\n let outputType: Type = (null: any);\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n\n for (let i = 1; i < args.length; i += 2) {\n const label = i === 1 ? -Infinity : args[i];\n const value = args[i + 1];\n\n const labelKey = i;\n const valueKey = i + 1;\n\n if (typeof label !== 'number') {\n return context.error('Input/output pairs for \"step\" expressions must be defined using literal numeric values (not computed expressions) for the input values.', labelKey);\n }\n\n if (stops.length && stops[stops.length - 1][0] >= label) {\n return context.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.', labelKey);\n }\n\n const parsed = context.parse(value, valueKey, outputType);\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n stops.push([label, parsed]);\n }\n\n return new Step(outputType, input, stops);\n }\n\n evaluate(ctx: EvaluationContext) {\n const labels = this.labels;\n const outputs = this.outputs;\n\n if (labels.length === 1) {\n return outputs[0].evaluate(ctx);\n }\n\n const value = ((this.input.evaluate(ctx): any): number);\n if (value <= labels[0]) {\n return outputs[0].evaluate(ctx);\n }\n\n const stopCount = labels.length;\n if (value >= labels[stopCount - 1]) {\n return outputs[stopCount - 1].evaluate(ctx);\n }\n\n const index = findStopLessThanOrEqualTo(labels, value);\n return outputs[index].evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n for (const expression of this.outputs) {\n fn(expression);\n }\n }\n\n outputDefined(): boolean {\n return this.outputs.every(out => out.outputDefined());\n }\n\n serialize() {\n const serialized = [\"step\", this.input.serialize()];\n for (let i = 0; i < this.labels.length; i++) {\n if (i > 0) {\n serialized.push(this.labels[i]);\n }\n serialized.push(this.outputs[i].serialize());\n }\n return serialized;\n }\n}\n\nexport default Step;\n","/*\n * Copyright (C) 2008 Apple Inc. All Rights Reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * Ported from Webkit\n * http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/platform/graphics/UnitBezier.h\n */\n\nmodule.exports = UnitBezier;\n\nfunction UnitBezier(p1x, p1y, p2x, p2y) {\n // Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1).\n this.cx = 3.0 * p1x;\n this.bx = 3.0 * (p2x - p1x) - this.cx;\n this.ax = 1.0 - this.cx - this.bx;\n\n this.cy = 3.0 * p1y;\n this.by = 3.0 * (p2y - p1y) - this.cy;\n this.ay = 1.0 - this.cy - this.by;\n\n this.p1x = p1x;\n this.p1y = p2y;\n this.p2x = p2x;\n this.p2y = p2y;\n}\n\nUnitBezier.prototype.sampleCurveX = function(t) {\n // `ax t^3 + bx t^2 + cx t' expanded using Horner's rule.\n return ((this.ax * t + this.bx) * t + this.cx) * t;\n};\n\nUnitBezier.prototype.sampleCurveY = function(t) {\n return ((this.ay * t + this.by) * t + this.cy) * t;\n};\n\nUnitBezier.prototype.sampleCurveDerivativeX = function(t) {\n return (3.0 * this.ax * t + 2.0 * this.bx) * t + this.cx;\n};\n\nUnitBezier.prototype.solveCurveX = function(x, epsilon) {\n if (typeof epsilon === 'undefined') epsilon = 1e-6;\n\n var t0, t1, t2, x2, i;\n\n // First try a few iterations of Newton's method -- normally very fast.\n for (t2 = x, i = 0; i < 8; i++) {\n\n x2 = this.sampleCurveX(t2) - x;\n if (Math.abs(x2) < epsilon) return t2;\n\n var d2 = this.sampleCurveDerivativeX(t2);\n if (Math.abs(d2) < 1e-6) break;\n\n t2 = t2 - x2 / d2;\n }\n\n // Fall back to the bisection method for reliability.\n t0 = 0.0;\n t1 = 1.0;\n t2 = x;\n\n if (t2 < t0) return t0;\n if (t2 > t1) return t1;\n\n while (t0 < t1) {\n\n x2 = this.sampleCurveX(t2);\n if (Math.abs(x2 - x) < epsilon) return t2;\n\n if (x > x2) {\n t0 = t2;\n } else {\n t1 = t2;\n }\n\n t2 = (t1 - t0) * 0.5 + t0;\n }\n\n // Failure.\n return t2;\n};\n\nUnitBezier.prototype.solve = function(x, epsilon) {\n return this.sampleCurveY(this.solveCurveX(x, epsilon));\n};\n","// @flow\n\nimport Color from './color';\n\nexport function number(a: number, b: number, t: number) {\n return (a * (1 - t)) + (b * t);\n}\n\nexport function color(from: Color, to: Color, t: number) {\n return new Color(\n number(from.r, to.r, t),\n number(from.g, to.g, t),\n number(from.b, to.b, t),\n number(from.a, to.a, t)\n );\n}\n\nexport function array(from: Array<number>, to: Array<number>, t: number): Array<number> {\n return from.map((d, i) => {\n return number(d, to[i], t);\n });\n}\n","// @flow\n\nimport Color from './color';\n\nimport {number as interpolateNumber} from './interpolate';\n\ntype LABColor = {\n l: number,\n a: number,\n b: number,\n alpha: number\n};\n\ntype HCLColor = {\n h: number,\n c: number,\n l: number,\n alpha: number\n};\n\n// Constants\nconst Xn = 0.950470, // D65 standard referent\n Yn = 1,\n Zn = 1.088830,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1,\n deg2rad = Math.PI / 180,\n rad2deg = 180 / Math.PI;\n\n// Utilities\nfunction xyz2lab(t: number) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t: number) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction xyz2rgb(x: number) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2xyz(x: number) {\n x /= 255;\n return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\n// LAB\nfunction rgbToLab(rgbColor: Color): LABColor {\n const b = rgb2xyz(rgbColor.r),\n a = rgb2xyz(rgbColor.g),\n l = rgb2xyz(rgbColor.b),\n x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn),\n y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.0721750 * l) / Yn),\n z = xyz2lab((0.0193339 * b + 0.1191920 * a + 0.9503041 * l) / Zn);\n\n return {\n l: 116 * y - 16,\n a: 500 * (x - y),\n b: 200 * (y - z),\n alpha: rgbColor.a\n };\n}\n\nfunction labToRgb(labColor: LABColor): Color {\n let y = (labColor.l + 16) / 116,\n x = isNaN(labColor.a) ? y : y + labColor.a / 500,\n z = isNaN(labColor.b) ? y : y - labColor.b / 200;\n y = Yn * lab2xyz(y);\n x = Xn * lab2xyz(x);\n z = Zn * lab2xyz(z);\n return new Color(\n xyz2rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB\n xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),\n xyz2rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z),\n labColor.alpha\n );\n}\n\nfunction interpolateLab(from: LABColor, to: LABColor, t: number) {\n return {\n l: interpolateNumber(from.l, to.l, t),\n a: interpolateNumber(from.a, to.a, t),\n b: interpolateNumber(from.b, to.b, t),\n alpha: interpolateNumber(from.alpha, to.alpha, t)\n };\n}\n\n// HCL\nfunction rgbToHcl(rgbColor: Color): HCLColor {\n const {l, a, b} = rgbToLab(rgbColor);\n const h = Math.atan2(b, a) * rad2deg;\n return {\n h: h < 0 ? h + 360 : h,\n c: Math.sqrt(a * a + b * b),\n l,\n alpha: rgbColor.a\n };\n}\n\nfunction hclToRgb(hclColor: HCLColor): Color {\n const h = hclColor.h * deg2rad,\n c = hclColor.c,\n l = hclColor.l;\n return labToRgb({\n l,\n a: Math.cos(h) * c,\n b: Math.sin(h) * c,\n alpha: hclColor.alpha\n });\n}\n\nfunction interpolateHue(a: number, b: number, t: number) {\n const d = b - a;\n return a + t * (d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d);\n}\n\nfunction interpolateHcl(from: HCLColor, to: HCLColor, t: number) {\n return {\n h: interpolateHue(from.h, to.h, t),\n c: interpolateNumber(from.c, to.c, t),\n l: interpolateNumber(from.l, to.l, t),\n alpha: interpolateNumber(from.alpha, to.alpha, t)\n };\n}\n\nexport const lab = {\n forward: rgbToLab,\n reverse: labToRgb,\n interpolate: interpolateLab\n};\n\nexport const hcl = {\n forward: rgbToHcl,\n reverse: hclToRgb,\n interpolate: interpolateHcl\n};\n","// @flow\n\nimport UnitBezier from '@mapbox/unitbezier';\n\nimport * as interpolate from '../../util/interpolate';\nimport {toString, NumberType, ColorType} from '../types';\nimport {findStopLessThanOrEqualTo} from '../stops';\nimport {hcl, lab} from '../../util/color_spaces';\n\nimport type {Stops} from '../stops';\nimport type {Expression} from '../expression';\nimport type ParsingContext from '../parsing_context';\nimport type EvaluationContext from '../evaluation_context';\nimport type {Type} from '../types';\n\nexport type InterpolationType =\n { name: 'linear' } |\n { name: 'exponential', base: number } |\n { name: 'cubic-bezier', controlPoints: [number, number, number, number] };\n\nclass Interpolate implements Expression {\n type: Type;\n\n operator: 'interpolate' | 'interpolate-hcl' | 'interpolate-lab';\n interpolation: InterpolationType;\n input: Expression;\n labels: Array<number>;\n outputs: Array<Expression>;\n\n constructor(type: Type, operator: 'interpolate' | 'interpolate-hcl' | 'interpolate-lab', interpolation: InterpolationType, input: Expression, stops: Stops) {\n this.type = type;\n this.operator = operator;\n this.interpolation = interpolation;\n this.input = input;\n\n this.labels = [];\n this.outputs = [];\n for (const [label, expression] of stops) {\n this.labels.push(label);\n this.outputs.push(expression);\n }\n }\n\n static interpolationFactor(interpolation: InterpolationType, input: number, lower: number, upper: number) {\n let t = 0;\n if (interpolation.name === 'exponential') {\n t = exponentialInterpolation(input, interpolation.base, lower, upper);\n } else if (interpolation.name === 'linear') {\n t = exponentialInterpolation(input, 1, lower, upper);\n } else if (interpolation.name === 'cubic-bezier') {\n const c = interpolation.controlPoints;\n const ub = new UnitBezier(c[0], c[1], c[2], c[3]);\n t = ub.solve(exponentialInterpolation(input, 1, lower, upper));\n }\n return t;\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext) {\n let [operator, interpolation, input, ...rest] = args;\n\n if (!Array.isArray(interpolation) || interpolation.length === 0) {\n return context.error(`Expected an interpolation type expression.`, 1);\n }\n\n if (interpolation[0] === 'linear') {\n interpolation = {name: 'linear'};\n } else if (interpolation[0] === 'exponential') {\n const base = interpolation[1];\n if (typeof base !== 'number')\n return context.error(`Exponential interpolation requires a numeric base.`, 1, 1);\n interpolation = {\n name: 'exponential',\n base\n };\n } else if (interpolation[0] === 'cubic-bezier') {\n const controlPoints = interpolation.slice(1);\n if (\n controlPoints.length !== 4 ||\n controlPoints.some(t => typeof t !== 'number' || t < 0 || t > 1)\n ) {\n return context.error('Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.', 1);\n }\n\n interpolation = {\n name: 'cubic-bezier',\n controlPoints: (controlPoints: any)\n };\n } else {\n return context.error(`Unknown interpolation type ${String(interpolation[0])}`, 1, 0);\n }\n\n if (args.length - 1 < 4) {\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n }\n\n if ((args.length - 1) % 2 !== 0) {\n return context.error(`Expected an even number of arguments.`);\n }\n\n input = context.parse(input, 2, NumberType);\n if (!input) return null;\n\n const stops: Stops = [];\n\n let outputType: Type = (null: any);\n if (operator === 'interpolate-hcl' || operator === 'interpolate-lab') {\n outputType = ColorType;\n } else if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n\n for (let i = 0; i < rest.length; i += 2) {\n const label = rest[i];\n const value = rest[i + 1];\n\n const labelKey = i + 3;\n const valueKey = i + 4;\n\n if (typeof label !== 'number') {\n return context.error('Input/output pairs for \"interpolate\" expressions must be defined using literal numeric values (not computed expressions) for the input values.', labelKey);\n }\n\n if (stops.length && stops[stops.length - 1][0] >= label) {\n return context.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.', labelKey);\n }\n\n const parsed = context.parse(value, valueKey, outputType);\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n stops.push([label, parsed]);\n }\n\n if (outputType.kind !== 'number' &&\n outputType.kind !== 'color' &&\n !(\n outputType.kind === 'array' &&\n outputType.itemType.kind === 'number' &&\n typeof outputType.N === 'number'\n )\n ) {\n return context.error(`Type ${toString(outputType)} is not interpolatable.`);\n }\n\n return new Interpolate(outputType, (operator: any), interpolation, input, stops);\n }\n\n evaluate(ctx: EvaluationContext) {\n const labels = this.labels;\n const outputs = this.outputs;\n\n if (labels.length === 1) {\n return outputs[0].evaluate(ctx);\n }\n\n const value = ((this.input.evaluate(ctx): any): number);\n if (value <= labels[0]) {\n return outputs[0].evaluate(ctx);\n }\n\n const stopCount = labels.length;\n if (value >= labels[stopCount - 1]) {\n return outputs[stopCount - 1].evaluate(ctx);\n }\n\n const index = findStopLessThanOrEqualTo(labels, value);\n const lower = labels[index];\n const upper = labels[index + 1];\n const t = Interpolate.interpolationFactor(this.interpolation, value, lower, upper);\n\n const outputLower = outputs[index].evaluate(ctx);\n const outputUpper = outputs[index + 1].evaluate(ctx);\n\n if (this.operator === 'interpolate') {\n return (interpolate[this.type.kind.toLowerCase()]: any)(outputLower, outputUpper, t); // eslint-disable-line import/namespace\n } else if (this.operator === 'interpolate-hcl') {\n return hcl.reverse(hcl.interpolate(hcl.forward(outputLower), hcl.forward(outputUpper), t));\n } else {\n return lab.reverse(lab.interpolate(lab.forward(outputLower), lab.forward(outputUpper), t));\n }\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n for (const expression of this.outputs) {\n fn(expression);\n }\n }\n\n outputDefined(): boolean {\n return this.outputs.every(out => out.outputDefined());\n }\n\n serialize(): Array<mixed> {\n let interpolation;\n if (this.interpolation.name === 'linear') {\n interpolation = [\"linear\"];\n } else if (this.interpolation.name === 'exponential') {\n if (this.interpolation.base === 1) {\n interpolation = [\"linear\"];\n } else {\n interpolation = [\"exponential\", this.interpolation.base];\n }\n } else {\n interpolation = [\"cubic-bezier\" ].concat(this.interpolation.controlPoints);\n }\n\n const serialized = [this.operator, interpolation, this.input.serialize()];\n\n for (let i = 0; i < this.labels.length; i++) {\n serialized.push(\n this.labels[i],\n this.outputs[i].serialize()\n );\n }\n return serialized;\n }\n}\n\n/**\n * Returns a ratio that can be used to interpolate between exponential function\n * stops.\n * How it works: Two consecutive stop values define a (scaled and shifted) exponential function `f(x) = a * base^x + b`, where `base` is the user-specified base,\n * and `a` and `b` are constants affording sufficient degrees of freedom to fit\n * the function to the given stops.\n *\n * Here's a bit of algebra that lets us compute `f(x)` directly from the stop\n * values without explicitly solving for `a` and `b`:\n *\n * First stop value: `f(x0) = y0 = a * base^x0 + b`\n * Second stop value: `f(x1) = y1 = a * base^x1 + b`\n * => `y1 - y0 = a(base^x1 - base^x0)`\n * => `a = (y1 - y0)/(base^x1 - base^x0)`\n *\n * Desired value: `f(x) = y = a * base^x + b`\n * => `f(x) = y0 + a * (base^x - base^x0)`\n *\n * From the above, we can replace the `a` in `a * (base^x - base^x0)` and do a\n * little algebra:\n * ```\n * a * (base^x - base^x0) = (y1 - y0)/(base^x1 - base^x0) * (base^x - base^x0)\n * = (y1 - y0) * (base^x - base^x0) / (base^x1 - base^x0)\n * ```\n *\n * If we let `(base^x - base^x0) / (base^x1 base^x0)`, then we have\n * `f(x) = y0 + (y1 - y0) * ratio`. In other words, `ratio` may be treated as\n * an interpolation factor between the two stops' output values.\n *\n * (Note: a slightly different form for `ratio`,\n * `(base^(x-x0) - 1) / (base^(x1-x0) - 1) `, is equivalent, but requires fewer\n * expensive `Math.pow()` operations.)\n *\n * @private\n*/\nfunction exponentialInterpolation(input, base, lowerValue, upperValue) {\n const difference = upperValue - lowerValue;\n const progress = input - lowerValue;\n\n if (difference === 0) {\n return 0;\n } else if (base === 1) {\n return progress / difference;\n } else {\n return (Math.pow(base, progress) - 1) / (Math.pow(base, difference) - 1);\n }\n}\n\nexport default Interpolate;\n","// @flow\n\nimport assert from 'assert';\n\nimport {checkSubtype, ValueType} from '../types';\nimport ResolvedImage from '../types/resolved_image';\n\nimport type {Expression} from '../expression';\nimport type ParsingContext from '../parsing_context';\nimport type EvaluationContext from '../evaluation_context';\nimport type {Type} from '../types';\n\nclass Coalesce implements Expression {\n type: Type;\n args: Array<Expression>;\n\n constructor(type: Type, args: Array<Expression>) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext) {\n if (args.length < 2) {\n return context.error(\"Expectected at least one argument.\");\n }\n let outputType: Type = (null: any);\n const expectedType = context.expectedType;\n if (expectedType && expectedType.kind !== 'value') {\n outputType = expectedType;\n }\n const parsedArgs = [];\n\n for (const arg of args.slice(1)) {\n const parsed = context.parse(arg, 1 + parsedArgs.length, outputType, undefined, {typeAnnotation: 'omit'});\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n parsedArgs.push(parsed);\n }\n assert(outputType);\n\n // Above, we parse arguments without inferred type annotation so that\n // they don't produce a runtime error for `null` input, which would\n // preempt the desired null-coalescing behavior.\n // Thus, if any of our arguments would have needed an annotation, we\n // need to wrap the enclosing coalesce expression with it instead.\n const needsAnnotation = expectedType &&\n parsedArgs.some(arg => checkSubtype(expectedType, arg.type));\n\n return needsAnnotation ?\n new Coalesce(ValueType, parsedArgs) :\n new Coalesce((outputType: any), parsedArgs);\n }\n\n evaluate(ctx: EvaluationContext) {\n let result = null;\n let argCount = 0;\n let requestedImageName;\n for (const arg of this.args) {\n argCount++;\n result = arg.evaluate(ctx);\n // we need to keep track of the first requested image in a coalesce statement\n // if coalesce can't find a valid image, we return the first image name so styleimagemissing can fire\n if (result && result instanceof ResolvedImage && !result.available) {\n if (!requestedImageName) {\n requestedImageName = result.name;\n }\n result = null;\n if (argCount === this.args.length) {\n result = requestedImageName;\n }\n }\n\n if (result !== null) break;\n }\n return result;\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return this.args.every(arg => arg.outputDefined());\n }\n\n serialize() {\n const serialized = [\"coalesce\"];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Coalesce;\n","// @flow\n\nimport type {Type} from '../types';\nimport type {Expression} from '../expression';\nimport type ParsingContext from '../parsing_context';\nimport type EvaluationContext from '../evaluation_context';\n\nclass Let implements Expression {\n type: Type;\n bindings: Array<[string, Expression]>;\n result: Expression;\n\n constructor(bindings: Array<[string, Expression]>, result: Expression) {\n this.type = result.type;\n this.bindings = [].concat(bindings);\n this.result = result;\n }\n\n evaluate(ctx: EvaluationContext) {\n return this.result.evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n for (const binding of this.bindings) {\n fn(binding[1]);\n }\n fn(this.result);\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext) {\n if (args.length < 4)\n return context.error(`Expected at least 3 arguments, but found ${args.length - 1} instead.`);\n\n const bindings: Array<[string, Expression]> = [];\n for (let i = 1; i < args.length - 1; i += 2) {\n const name = args[i];\n\n if (typeof name !== 'string') {\n return context.error(`Expected string, but found ${typeof name} instead.`, i);\n }\n\n if (/[^a-zA-Z0-9_]/.test(name)) {\n return context.error(`Variable names must contain only alphanumeric characters or '_'.`, i);\n }\n\n const value = context.parse(args[i + 1], i + 1);\n if (!value) return null;\n\n bindings.push([name, value]);\n }\n\n const result = context.parse(args[args.length - 1], args.length - 1, context.expectedType, bindings);\n if (!result) return null;\n\n return new Let(bindings, result);\n }\n\n outputDefined() {\n return this.result.outputDefined();\n }\n\n serialize() {\n const serialized = [\"let\"];\n for (const [name, expr] of this.bindings) {\n serialized.push(name, expr.serialize());\n }\n serialized.push(this.result.serialize());\n return serialized;\n }\n}\n\nexport default Let;\n","// @flow\n\nimport {array, ValueType, NumberType} from '../types';\n\nimport RuntimeError from '../runtime_error';\n\nimport type {Expression} from '../expression';\nimport type ParsingContext from '../parsing_context';\nimport type EvaluationContext from '../evaluation_context';\nimport type {Type, ArrayType} from '../types';\nimport type {Value} from '../values';\n\nclass At implements Expression {\n type: Type;\n index: Expression;\n input: Expression;\n\n constructor(type: Type, index: Expression, input: Expression) {\n this.type = type;\n this.index = index;\n this.input = input;\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext) {\n if (args.length !== 3)\n return context.error(`Expected 2 arguments, but found ${args.length - 1} instead.`);\n\n const index = context.parse(args[1], 1, NumberType);\n const input = context.parse(args[2], 2, array(context.expectedType || ValueType));\n\n if (!index || !input) return null;\n\n const t: ArrayType = (input.type: any);\n return new At(t.itemType, index, input);\n }\n\n evaluate(ctx: EvaluationContext) {\n const index = ((this.index.evaluate(ctx): any): number);\n const array = ((this.input.evaluate(ctx): any): Array<Value>);\n\n if (index < 0) {\n throw new RuntimeError(`Array index out of bounds: ${index} < 0.`);\n }\n\n if (index >= array.length) {\n throw new RuntimeError(`Array index out of bounds: ${index} > ${array.length - 1}.`);\n }\n\n if (index !== Math.floor(index)) {\n throw new RuntimeError(`Array index must be an integer, but found ${index} instead.`);\n }\n\n return array[index];\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.index);\n fn(this.input);\n }\n\n outputDefined() {\n return false;\n }\n\n serialize() {\n return [\"at\", this.index.serialize(), this.input.serialize()];\n }\n}\n\nexport default At;\n","// @flow\n\nimport {BooleanType, StringType, ValueType, NullType, toString, NumberType, isValidType, isValidNativeType} from '../types';\nimport RuntimeError from '../runtime_error';\nimport {typeOf} from '../values';\n\nimport type {Expression} from '../expression';\nimport type ParsingContext from '../parsing_context';\nimport type EvaluationContext from '../evaluation_context';\nimport type {Type} from '../types';\n\nclass In implements Expression {\n type: Type;\n needle: Expression;\n haystack: Expression;\n\n constructor(needle: Expression, haystack: Expression) {\n this.type = BooleanType;\n this.needle = needle;\n this.haystack = haystack;\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext) {\n if (args.length !== 3) {\n return context.error(`Expected 2 arguments, but found ${args.length - 1} instead.`);\n }\n\n const needle = context.parse(args[1], 1, ValueType);\n\n const haystack = context.parse(args[2], 2, ValueType);\n\n if (!needle || !haystack) return null;\n\n if (!isValidType(needle.type, [BooleanType, StringType, NumberType, NullType, ValueType])) {\n return context.error(`Expected first argument to be of type boolean, string, number or null, but found ${toString(needle.type)} instead`);\n }\n\n return new In(needle, haystack);\n }\n\n evaluate(ctx: EvaluationContext) {\n const needle = (this.needle.evaluate(ctx): any);\n const haystack = (this.haystack.evaluate(ctx): any);\n\n if (!haystack) return false;\n\n if (!isValidNativeType(needle, ['boolean', 'string', 'number', 'null'])) {\n throw new RuntimeError(`Expected first argument to be of type boolean, string, number or null, but found ${toString(typeOf(needle))} instead.`);\n }\n\n if (!isValidNativeType(haystack, ['string', 'array'])) {\n throw new RuntimeError(`Expected second argument to be of type array or string, but found ${toString(typeOf(haystack))} instead.`);\n }\n\n return haystack.indexOf(needle) >= 0;\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.needle);\n fn(this.haystack);\n }\n\n outputDefined() {\n return true;\n }\n\n serialize() {\n return [\"in\", this.needle.serialize(), this.haystack.serialize()];\n }\n}\n\nexport default In;\n","// @flow\n\nimport {BooleanType, StringType, ValueType, NullType, toString, NumberType, isValidType, isValidNativeType} from '../types';\nimport RuntimeError from '../runtime_error';\nimport {typeOf} from '../values';\n\nimport type {Expression} from '../expression';\nimport type ParsingContext from '../parsing_context';\nimport type EvaluationContext from '../evaluation_context';\nimport type {Type} from '../types';\n\nclass IndexOf implements Expression {\n type: Type;\n needle: Expression;\n haystack: Expression;\n fromIndex: ?Expression;\n\n constructor(needle: Expression, haystack: Expression, fromIndex?: Expression) {\n this.type = NumberType;\n this.needle = needle;\n this.haystack = haystack;\n this.fromIndex = fromIndex;\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext) {\n if (args.length <= 2 || args.length >= 5) {\n return context.error(`Expected 3 or 4 arguments, but found ${args.length - 1} instead.`);\n }\n\n const needle = context.parse(args[1], 1, ValueType);\n\n const haystack = context.parse(args[2], 2, ValueType);\n\n if (!needle || !haystack) return null;\n if (!isValidType(needle.type, [BooleanType, StringType, NumberType, NullType, ValueType])) {\n return context.error(`Expected first argument to be of type boolean, string, number or null, but found ${toString(needle.type)} instead`);\n }\n\n if (args.length === 4) {\n const fromIndex = context.parse(args[3], 3, NumberType);\n if (!fromIndex) return null;\n return new IndexOf(needle, haystack, fromIndex);\n } else {\n return new IndexOf(needle, haystack);\n }\n }\n\n evaluate(ctx: EvaluationContext) {\n const needle = (this.needle.evaluate(ctx): any);\n const haystack = (this.haystack.evaluate(ctx): any);\n\n if (!isValidNativeType(needle, ['boolean', 'string', 'number', 'null'])) {\n throw new RuntimeError(`Expected first argument to be of type boolean, string, number or null, but found ${toString(typeOf(needle))} instead.`);\n }\n\n if (!isValidNativeType(haystack, ['string', 'array'])) {\n throw new RuntimeError(`Expected second argument to be of type array or string, but found ${toString(typeOf(haystack))} instead.`);\n }\n\n if (this.fromIndex) {\n const fromIndex = (this.fromIndex.evaluate(ctx): number);\n return haystack.indexOf(needle, fromIndex);\n }\n\n return haystack.indexOf(needle);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.needle);\n fn(this.haystack);\n if (this.fromIndex) {\n fn(this.fromIndex);\n }\n }\n\n outputDefined() {\n return false;\n }\n\n serialize() {\n if (this.fromIndex != null && this.fromIndex !== undefined) {\n const fromIndex = this.fromIndex.serialize();\n return [\"index-of\", this.needle.serialize(), this.haystack.serialize(), fromIndex];\n }\n return [\"index-of\", this.needle.serialize(), this.haystack.serialize()];\n }\n}\n\nexport default IndexOf;\n","// @flow\n\nimport assert from 'assert';\n\nimport {typeOf} from '../values';\nimport {ValueType, type Type} from '../types';\n\nimport type {Expression} from '../expression';\nimport type ParsingContext from '../parsing_context';\nimport type EvaluationContext from '../evaluation_context';\n\n// Map input label values to output expression index\ntype Cases = {[number | string]: number};\n\nclass Match implements Expression {\n type: Type;\n inputType: Type;\n\n input: Expression;\n cases: Cases;\n outputs: Array<Expression>;\n otherwise: Expression;\n\n constructor(inputType: Type, outputType: Type, input: Expression, cases: Cases, outputs: Array<Expression>, otherwise: Expression) {\n this.inputType = inputType;\n this.type = outputType;\n this.input = input;\n this.cases = cases;\n this.outputs = outputs;\n this.otherwise = otherwise;\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext) {\n if (args.length < 5)\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n if (args.length % 2 !== 1)\n return context.error(`Expected an even number of arguments.`);\n\n let inputType;\n let outputType;\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n const cases = {};\n const outputs = [];\n for (let i = 2; i < args.length - 1; i += 2) {\n let labels = args[i];\n const value = args[i + 1];\n\n if (!Array.isArray(labels)) {\n labels = [labels];\n }\n\n const labelContext = context.concat(i);\n if (labels.length === 0) {\n return labelContext.error('Expected at least one branch label.');\n }\n\n for (const label of labels) {\n if (typeof label !== 'number' && typeof label !== 'string') {\n return labelContext.error(`Branch labels must be numbers or strings.`);\n } else if (typeof label === 'number' && Math.abs(label) > Number.MAX_SAFE_INTEGER) {\n return labelContext.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);\n\n } else if (typeof label === 'number' && Math.floor(label) !== label) {\n return labelContext.error(`Numeric branch labels must be integer values.`);\n\n } else if (!inputType) {\n inputType = typeOf(label);\n } else if (labelContext.checkSubtype(inputType, typeOf(label))) {\n return null;\n }\n\n if (typeof cases[String(label)] !== 'undefined') {\n return labelContext.error('Branch labels must be unique.');\n }\n\n cases[String(label)] = outputs.length;\n }\n\n const result = context.parse(value, i, outputType);\n if (!result) return null;\n outputType = outputType || result.type;\n outputs.push(result);\n }\n\n const input = context.parse(args[1], 1, ValueType);\n if (!input) return null;\n\n const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n if (!otherwise) return null;\n\n assert(inputType && outputType);\n\n if (input.type.kind !== 'value' && context.concat(1).checkSubtype((inputType: any), input.type)) {\n return null;\n }\n\n return new Match((inputType: any), (outputType: any), input, cases, outputs, otherwise);\n }\n\n evaluate(ctx: EvaluationContext) {\n const input = (this.input.evaluate(ctx): any);\n const output = (typeOf(input) === this.inputType && this.outputs[this.cases[input]]) || this.otherwise;\n return output.evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n this.outputs.forEach(fn);\n fn(this.otherwise);\n }\n\n outputDefined(): boolean {\n return this.outputs.every(out => out.outputDefined()) && this.otherwise.outputDefined();\n }\n\n serialize(): Array<mixed> {\n const serialized = [\"match\", this.input.serialize()];\n\n // Sort so serialization has an arbitrary defined order, even though\n // branch order doesn't affect evaluation\n const sortedLabels = Object.keys(this.cases).sort();\n\n // Group branches by unique match expression to support condensed\n // serializations of the form [case1, case2, ...] -> matchExpression\n const groupedByOutput: Array<[number, Array<number | string>]> = [];\n const outputLookup: {[index: number]: number} = {}; // lookup index into groupedByOutput for a given output expression\n for (const label of sortedLabels) {\n const outputIndex = outputLookup[this.cases[label]];\n if (outputIndex === undefined) {\n // First time seeing this output, add it to the end of the grouped list\n outputLookup[this.cases[label]] = groupedByOutput.length;\n groupedByOutput.push([this.cases[label], [label]]);\n } else {\n // We've seen this expression before, add the label to that output's group\n groupedByOutput[outputIndex][1].push(label);\n }\n }\n\n const coerceLabel = (label) => this.inputType.kind === 'number' ? Number(label) : label;\n\n for (const [outputIndex, labels] of groupedByOutput) {\n if (labels.length === 1) {\n // Only a single label matches this output expression\n serialized.push(coerceLabel(labels[0]));\n } else {\n // Array of literal labels pointing to this output expression\n serialized.push(labels.map(coerceLabel));\n }\n serialized.push(this.outputs[outputIndex].serialize());\n }\n serialized.push(this.otherwise.serialize());\n return serialized;\n }\n}\n\nexport default Match;\n","// @flow\n\nimport assert from 'assert';\n\nimport {BooleanType} from '../types';\n\nimport type {Expression} from '../expression';\nimport type ParsingContext from '../parsing_context';\nimport type EvaluationContext from '../evaluation_context';\nimport type {Type} from '../types';\n\ntype Branches = Array<[Expression, Expression]>;\n\nclass Case implements Expression {\n type: Type;\n\n branches: Branches;\n otherwise: Expression;\n\n constructor(type: Type, branches: Branches, otherwise: Expression) {\n this.type = type;\n this.branches = branches;\n this.otherwise = otherwise;\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext) {\n if (args.length < 4)\n return context.error(`Expected at least 3 arguments, but found only ${args.length - 1}.`);\n if (args.length % 2 !== 0)\n return context.error(`Expected an odd number of arguments.`);\n\n let outputType: ?Type;\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n\n const branches = [];\n for (let i = 1; i < args.length - 1; i += 2) {\n const test = context.parse(args[i], i, BooleanType);\n if (!test) return null;\n\n const result = context.parse(args[i + 1], i + 1, outputType);\n if (!result) return null;\n\n branches.push([test, result]);\n\n outputType = outputType || result.type;\n }\n\n const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n if (!otherwise) return null;\n\n assert(outputType);\n return new Case((outputType: any), branches, otherwise);\n }\n\n evaluate(ctx: EvaluationContext) {\n for (const [test, expression] of this.branches) {\n if (test.evaluate(ctx)) {\n return expression.evaluate(ctx);\n }\n }\n return this.otherwise.evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n for (const [test, expression] of this.branches) {\n fn(test);\n fn(expression);\n }\n fn(this.otherwise);\n }\n\n outputDefined(): boolean {\n return this.branches.every(([_, out]) => out.outputDefined()) && this.otherwise.outputDefined();\n }\n\n serialize() {\n const serialized = [\"case\"];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Case;\n","// @flow\n\nimport {ValueType, NumberType, StringType, array, toString, isValidType, isValidNativeType} from '../types';\nimport RuntimeError from '../runtime_error';\nimport {typeOf} from '../values';\n\nimport type {Expression} from '../expression';\nimport type ParsingContext from '../parsing_context';\nimport type EvaluationContext from '../evaluation_context';\nimport type {Type} from '../types';\n\nclass Slice implements Expression {\n type: Type;\n input: Expression;\n beginIndex: Expression;\n endIndex: ?Expression;\n\n constructor(type: Type, input: Expression, beginIndex: Expression, endIndex?: Expression) {\n this.type = type;\n this.input = input;\n this.beginIndex = beginIndex;\n this.endIndex = endIndex;\n\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext) {\n if (args.length <= 2 || args.length >= 5) {\n return context.error(`Expected 3 or 4 arguments, but found ${args.length - 1} instead.`);\n }\n\n const input = context.parse(args[1], 1, ValueType);\n const beginIndex = context.parse(args[2], 2, NumberType);\n\n if (!input || !beginIndex) return null;\n\n if (!isValidType(input.type, [array(ValueType), StringType, ValueType])) {\n return context.error(`Expected first argument to be of type array or string, but found ${toString(input.type)} instead`);\n }\n\n if (args.length === 4) {\n const endIndex = context.parse(args[3], 3, NumberType);\n if (!endIndex) return null;\n return new Slice(input.type, input, beginIndex, endIndex);\n } else {\n return new Slice(input.type, input, beginIndex);\n }\n }\n\n evaluate(ctx: EvaluationContext) {\n const input = (this.input.evaluate(ctx): any);\n const beginIndex = (this.beginIndex.evaluate(ctx): number);\n\n if (!isValidNativeType(input, ['string', 'array'])) {\n throw new RuntimeError(`Expected first argument to be of type array or string, but found ${toString(typeOf(input))} instead.`);\n }\n\n if (this.endIndex) {\n const endIndex = (this.endIndex.evaluate(ctx): number);\n return input.slice(beginIndex, endIndex);\n }\n\n return input.slice(beginIndex);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n fn(this.beginIndex);\n if (this.endIndex) {\n fn(this.endIndex);\n }\n }\n\n outputDefined() {\n return false;\n }\n\n serialize() {\n if (this.endIndex != null && this.endIndex !== undefined) {\n const endIndex = this.endIndex.serialize();\n return [\"slice\", this.input.serialize(), this.beginIndex.serialize(), endIndex];\n }\n return [\"slice\", this.input.serialize(), this.beginIndex.serialize()];\n }\n}\n\nexport default Slice;\n","// @flow\n\nimport {toString, ValueType, BooleanType, CollatorType} from '../types';\nimport Assertion from './assertion';\nimport {typeOf} from '../values';\nimport RuntimeError from '../runtime_error';\n\nimport type {Expression} from '../expression';\nimport type EvaluationContext from '../evaluation_context';\nimport type ParsingContext from '../parsing_context';\nimport type {Type} from '../types';\n\ntype ComparisonOperator = '==' | '!=' | '<' | '>' | '<=' | '>=' ;\n\nfunction isComparableType(op: ComparisonOperator, type: Type) {\n if (op === '==' || op === '!=') {\n // equality operator\n return type.kind === 'boolean' ||\n type.kind === 'string' ||\n type.kind === 'number' ||\n type.kind === 'null' ||\n type.kind === 'value';\n } else {\n // ordering operator\n return type.kind === 'string' ||\n type.kind === 'number' ||\n type.kind === 'value';\n }\n}\n\nfunction eq(ctx, a, b) { return a === b; }\nfunction neq(ctx, a, b) { return a !== b; }\nfunction lt(ctx, a, b) { return a < b; }\nfunction gt(ctx, a, b) { return a > b; }\nfunction lteq(ctx, a, b) { return a <= b; }\nfunction gteq(ctx, a, b) { return a >= b; }\n\nfunction eqCollate(ctx, a, b, c) { return c.compare(a, b) === 0; }\nfunction neqCollate(ctx, a, b, c) { return !eqCollate(ctx, a, b, c); }\nfunction ltCollate(ctx, a, b, c) { return c.compare(a, b) < 0; }\nfunction gtCollate(ctx, a, b, c) { return c.compare(a, b) > 0; }\nfunction lteqCollate(ctx, a, b, c) { return c.compare(a, b) <= 0; }\nfunction gteqCollate(ctx, a, b, c) { return c.compare(a, b) >= 0; }\n\n/**\n * Special form for comparison operators, implementing the signatures:\n * - (T, T, ?Collator) => boolean\n * - (T, value, ?Collator) => boolean\n * - (value, T, ?Collator) => boolean\n *\n * For inequalities, T must be either value, string, or number. For ==/!=, it\n * can also be boolean or null.\n *\n * Equality semantics are equivalent to Javascript's strict equality (===/!==)\n * -- i.e., when the arguments' types don't match, == evaluates to false, != to\n * true.\n *\n * When types don't match in an ordering comparison, a runtime error is thrown.\n *\n * @private\n */\nfunction makeComparison(op: ComparisonOperator, compareBasic, compareWithCollator) {\n const isOrderComparison = op !== '==' && op !== '!=';\n\n return class Comparison implements Expression {\n type: Type;\n lhs: Expression;\n rhs: Expression;\n collator: ?Expression;\n hasUntypedArgument: boolean;\n\n constructor(lhs: Expression, rhs: Expression, collator: ?Expression) {\n this.type = BooleanType;\n this.lhs = lhs;\n this.rhs = rhs;\n this.collator = collator;\n this.hasUntypedArgument = lhs.type.kind === 'value' || rhs.type.kind === 'value';\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Expression {\n if (args.length !== 3 && args.length !== 4)\n return context.error(`Expected two or three arguments.`);\n\n const op: ComparisonOperator = (args[0]: any);\n\n let lhs = context.parse(args[1], 1, ValueType);\n if (!lhs) return null;\n if (!isComparableType(op, lhs.type)) {\n return context.concat(1).error(`\"${op}\" comparisons are not supported for type '${toString(lhs.type)}'.`);\n }\n let rhs = context.parse(args[2], 2, ValueType);\n if (!rhs) return null;\n if (!isComparableType(op, rhs.type)) {\n return context.concat(2).error(`\"${op}\" comparisons are not supported for type '${toString(rhs.type)}'.`);\n }\n\n if (\n lhs.type.kind !== rhs.type.kind &&\n lhs.type.kind !== 'value' &&\n rhs.type.kind !== 'value'\n ) {\n return context.error(`Cannot compare types '${toString(lhs.type)}' and '${toString(rhs.type)}'.`);\n }\n\n if (isOrderComparison) {\n // typing rules specific to less/greater than operators\n if (lhs.type.kind === 'value' && rhs.type.kind !== 'value') {\n // (value, T)\n lhs = new Assertion(rhs.type, [lhs]);\n } else if (lhs.type.kind !== 'value' && rhs.type.kind === 'value') {\n // (T, value)\n rhs = new Assertion(lhs.type, [rhs]);\n }\n }\n\n let collator = null;\n if (args.length === 4) {\n if (\n lhs.type.kind !== 'string' &&\n rhs.type.kind !== 'string' &&\n lhs.type.kind !== 'value' &&\n rhs.type.kind !== 'value'\n ) {\n return context.error(`Cannot use collator to compare non-string types.`);\n }\n collator = context.parse(args[3], 3, CollatorType);\n if (!collator) return null;\n }\n\n return new Comparison(lhs, rhs, collator);\n }\n\n evaluate(ctx: EvaluationContext) {\n const lhs = this.lhs.evaluate(ctx);\n const rhs = this.rhs.evaluate(ctx);\n\n if (isOrderComparison && this.hasUntypedArgument) {\n const lt = typeOf(lhs);\n const rt = typeOf(rhs);\n // check that type is string or number, and equal\n if (lt.kind !== rt.kind || !(lt.kind === 'string' || lt.kind === 'number')) {\n throw new RuntimeError(`Expected arguments for \"${op}\" to be (string, string) or (number, number), but found (${lt.kind}, ${rt.kind}) instead.`);\n }\n }\n\n if (this.collator && !isOrderComparison && this.hasUntypedArgument) {\n const lt = typeOf(lhs);\n const rt = typeOf(rhs);\n if (lt.kind !== 'string' || rt.kind !== 'string') {\n return compareBasic(ctx, lhs, rhs);\n }\n }\n\n return this.collator ?\n compareWithCollator(ctx, lhs, rhs, this.collator.evaluate(ctx)) :\n compareBasic(ctx, lhs, rhs);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.lhs);\n fn(this.rhs);\n if (this.collator) {\n fn(this.collator);\n }\n }\n\n outputDefined(): boolean {\n return true;\n }\n\n serialize() {\n const serialized = [op];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n };\n}\n\nexport const Equals = makeComparison('==', eq, eqCollate);\nexport const NotEquals = makeComparison('!=', neq, neqCollate);\nexport const LessThan = makeComparison('<', lt, ltCollate);\nexport const GreaterThan = makeComparison('>', gt, gtCollate);\nexport const LessThanOrEqual = makeComparison('<=', lteq, lteqCollate);\nexport const GreaterThanOrEqual = makeComparison('>=', gteq, gteqCollate);\n","// @flow\n\nimport {StringType, NumberType} from '../types';\n\nimport type {Expression} from '../expression';\nimport type EvaluationContext from '../evaluation_context';\nimport type ParsingContext from '../parsing_context';\nimport type {Type} from '../types';\n\ndeclare var Intl: {\n NumberFormat: Class<Intl$NumberFormat>\n};\n\ndeclare class Intl$NumberFormat {\n constructor (\n locales?: string | string[],\n options?: NumberFormatOptions\n ): Intl$NumberFormat;\n\n static (\n locales?: string | string[],\n options?: NumberFormatOptions\n ): Intl$NumberFormat;\n\n format(a: number): string;\n\n resolvedOptions(): any;\n}\n\ntype NumberFormatOptions = {\n style?: 'decimal' | 'currency' | 'percent';\n currency?: null | string;\n minimumFractionDigits?: null | string;\n maximumFractionDigits?: null | string;\n};\n\nexport default class NumberFormat implements Expression {\n type: Type;\n number: Expression;\n locale: Expression | null; // BCP 47 language tag\n currency: Expression | null; // ISO 4217 currency code, required if style=currency\n minFractionDigits: Expression | null; // Default 0\n maxFractionDigits: Expression | null; // Default 3\n\n constructor(number: Expression,\n locale: Expression | null,\n currency: Expression | null,\n minFractionDigits: Expression | null,\n maxFractionDigits: Expression | null) {\n this.type = StringType;\n this.number = number;\n this.locale = locale;\n this.currency = currency;\n this.minFractionDigits = minFractionDigits;\n this.maxFractionDigits = maxFractionDigits;\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Expression {\n if (args.length !== 3)\n return context.error(`Expected two arguments.`);\n\n const number = context.parse(args[1], 1, NumberType);\n if (!number) return null;\n\n const options = (args[2]: any);\n if (typeof options !== \"object\" || Array.isArray(options))\n return context.error(`NumberFormat options argument must be an object.`);\n\n let locale = null;\n if (options['locale']) {\n locale = context.parse(options['locale'], 1, StringType);\n if (!locale) return null;\n }\n\n let currency = null;\n if (options['currency']) {\n currency = context.parse(options['currency'], 1, StringType);\n if (!currency) return null;\n }\n\n let minFractionDigits = null;\n if (options['min-fraction-digits']) {\n minFractionDigits = context.parse(options['min-fraction-digits'], 1, NumberType);\n if (!minFractionDigits) return null;\n }\n\n let maxFractionDigits = null;\n if (options['max-fraction-digits']) {\n maxFractionDigits = context.parse(options['max-fraction-digits'], 1, NumberType);\n if (!maxFractionDigits) return null;\n }\n\n return new NumberFormat(number, locale, currency, minFractionDigits, maxFractionDigits);\n }\n\n evaluate(ctx: EvaluationContext) {\n return new Intl.NumberFormat(this.locale ? this.locale.evaluate(ctx) : [],\n {\n style: this.currency ? \"currency\" : \"decimal\",\n currency: this.currency ? this.currency.evaluate(ctx) : undefined,\n minimumFractionDigits: this.minFractionDigits ? this.minFractionDigits.evaluate(ctx) : undefined,\n maximumFractionDigits: this.maxFractionDigits ? this.maxFractionDigits.evaluate(ctx) : undefined,\n }).format(this.number.evaluate(ctx));\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.number);\n if (this.locale) {\n fn(this.locale);\n }\n if (this.currency) {\n fn(this.currency);\n }\n if (this.minFractionDigits) {\n fn(this.minFractionDigits);\n }\n if (this.maxFractionDigits) {\n fn(this.maxFractionDigits);\n }\n }\n\n outputDefined() {\n return false;\n }\n\n serialize() {\n const options = {};\n if (this.locale) {\n options['locale'] = this.locale.serialize();\n }\n if (this.currency) {\n options['currency'] = this.currency.serialize();\n }\n if (this.minFractionDigits) {\n options['min-fraction-digits'] = this.minFractionDigits.serialize();\n }\n if (this.maxFractionDigits) {\n options['max-fraction-digits'] = this.maxFractionDigits.serialize();\n }\n return [\"number-format\", this.number.serialize(), options];\n }\n}\n","// @flow\n\nimport {NumberType, toString} from '../types';\n\nimport {typeOf} from '../values';\nimport RuntimeError from '../runtime_error';\n\nimport type {Expression} from '../expression';\nimport type ParsingContext from '../parsing_context';\nimport type EvaluationContext from '../evaluation_context';\nimport type {Type} from '../types';\n\nclass Length implements Expression {\n type: Type;\n input: Expression;\n\n constructor(input: Expression) {\n this.type = NumberType;\n this.input = input;\n }\n\n static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext) {\n if (args.length !== 2)\n return context.error(`Expected 1 argument, but found ${args.length - 1} instead.`);\n\n const input = context.parse(args[1], 1);\n if (!input) return null;\n\n if (input.type.kind !== 'array' && input.type.kind !== 'string' && input.type.kind !== 'value')\n return context.error(`Expected argument of type string or array, but found ${toString(input.type)} instead.`);\n\n return new Length(input);\n }\n\n evaluate(ctx: EvaluationContext) {\n const input = this.input.evaluate(ctx);\n if (typeof input === 'string') {\n return input.length;\n } else if (Array.isArray(input)) {\n return input.length;\n } else {\n throw new RuntimeError(`Expected value to be of type string or array, but found ${toString(typeOf(input))} instead.`);\n }\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n }\n\n outputDefined() {\n return false;\n }\n\n serialize() {\n const serialized = [\"length\"];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Length;\n","// @flow\n\nimport {\n type Type,\n NumberType,\n StringType,\n BooleanType,\n ColorType,\n ObjectType,\n ValueType,\n ErrorType,\n CollatorType,\n array,\n toString as typeToString\n} from '../types';\n\nimport {typeOf, Color, validateRGBA, toString as valueToString} from '../values';\nimport CompoundExpression from '../compound_expression';\nimport RuntimeError from '../runtime_error';\nimport Let from './let';\nimport Var from './var';\nimport Literal from './literal';\nimport Assertion from './assertion';\nimport Coercion from './coercion';\nimport At from './at';\nimport In from './in';\nimport IndexOf from './index_of';\nimport Match from './match';\nimport Case from './case';\nimport Slice from './slice';\nimport Step from './step';\nimport Interpolate from './interpolate';\nimport Coalesce from './coalesce';\nimport {\n Equals,\n NotEquals,\n LessThan,\n GreaterThan,\n LessThanOrEqual,\n GreaterThanOrEqual\n} from './comparison';\nimport CollatorExpression from './collator';\nimport NumberFormat from './number_format';\nimport FormatExpression from './format';\nimport ImageExpression from './image';\nimport Length from './length';\nimport Within from './within';\n\nimport type {Varargs} from '../compound_expression';\nimport type {ExpressionRegistry} from '../expression';\n\nconst expressions: ExpressionRegistry = {\n // special forms\n '==': Equals,\n '!=': NotEquals,\n '>': GreaterThan,\n '<': LessThan,\n '>=': GreaterThanOrEqual,\n '<=': LessThanOrEqual,\n 'array': Assertion,\n 'at': At,\n 'boolean': Assertion,\n 'case': Case,\n 'coalesce': Coalesce,\n 'collator': CollatorExpression,\n 'format': FormatExpression,\n 'image': ImageExpression,\n 'in': In,\n 'index-of': IndexOf,\n 'interpolate': Interpolate,\n 'interpolate-hcl': Interpolate,\n 'interpolate-lab': Interpolate,\n 'length': Length,\n 'let': Let,\n 'literal': Literal,\n 'match': Match,\n 'number': Assertion,\n 'number-format': NumberFormat,\n 'object': Assertion,\n 'slice': Slice,\n 'step': Step,\n 'string': Assertion,\n 'to-boolean': Coercion,\n 'to-color': Coercion,\n 'to-number': Coercion,\n 'to-string': Coercion,\n 'var': Var,\n 'within': Within\n};\n\nfunction rgba(ctx, [r, g, b, a]) {\n r = r.evaluate(ctx);\n g = g.evaluate(ctx);\n b = b.evaluate(ctx);\n const alpha = a ? a.evaluate(ctx) : 1;\n const error = validateRGBA(r, g, b, alpha);\n if (error) throw new RuntimeError(error);\n return new Color(r / 255 * alpha, g / 255 * alpha, b / 255 * alpha, alpha);\n}\n\nfunction has(key, obj) {\n return key in obj;\n}\n\nfunction get(key, obj) {\n const v = obj[key];\n return typeof v === 'undefined' ? null : v;\n}\n\nfunction binarySearch(v, a, i, j) {\n while (i <= j) {\n const m = (i + j) >> 1;\n if (a[m] === v)\n return true;\n if (a[m] > v)\n j = m - 1;\n else\n i = m + 1;\n }\n return false;\n}\n\nfunction varargs(type: Type): Varargs {\n return {type};\n}\n\nCompoundExpression.register(expressions, {\n 'error': [\n ErrorType,\n [StringType],\n (ctx, [v]) => { throw new RuntimeError(v.evaluate(ctx)); }\n ],\n 'typeof': [\n StringType,\n [ValueType],\n (ctx, [v]) => typeToString(typeOf(v.evaluate(ctx)))\n ],\n 'to-rgba': [\n array(NumberType, 4),\n [ColorType],\n (ctx, [v]) => {\n return v.evaluate(ctx).toArray();\n }\n ],\n 'rgb': [\n ColorType,\n [NumberType, NumberType, NumberType],\n rgba\n ],\n 'rgba': [\n ColorType,\n [NumberType, NumberType, NumberType, NumberType],\n rgba\n ],\n 'has': {\n type: BooleanType,\n overloads: [\n [\n [StringType],\n (ctx, [key]) => has(key.evaluate(ctx), ctx.properties())\n ], [\n [StringType, ObjectType],\n (ctx, [key, obj]) => has(key.evaluate(ctx), obj.evaluate(ctx))\n ]\n ]\n },\n 'get': {\n type: ValueType,\n overloads: [\n [\n [StringType],\n (ctx, [key]) => get(key.evaluate(ctx), ctx.properties())\n ], [\n [StringType, ObjectType],\n (ctx, [key, obj]) => get(key.evaluate(ctx), obj.evaluate(ctx))\n ]\n ]\n },\n 'feature-state': [\n ValueType,\n [StringType],\n (ctx, [key]) => get(key.evaluate(ctx), ctx.featureState || {})\n ],\n 'properties': [\n ObjectType,\n [],\n (ctx) => ctx.properties()\n ],\n 'geometry-type': [\n StringType,\n [],\n (ctx) => ctx.geometryType()\n ],\n 'id': [\n ValueType,\n [],\n (ctx) => ctx.id()\n ],\n 'zoom': [\n NumberType,\n [],\n (ctx) => ctx.globals.zoom\n ],\n 'heatmap-density': [\n NumberType,\n [],\n (ctx) => ctx.globals.heatmapDensity || 0\n ],\n 'line-progress': [\n NumberType,\n [],\n (ctx) => ctx.globals.lineProgress || 0\n ],\n 'sky-radial-progress': [\n NumberType,\n [],\n (ctx) => ctx.globals.skyRadialProgress || 0\n ],\n 'accumulated': [\n ValueType,\n [],\n (ctx) => ctx.globals.accumulated === undefined ? null : ctx.globals.accumulated\n ],\n '+': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => {\n let result = 0;\n for (const arg of args) {\n result += arg.evaluate(ctx);\n }\n return result;\n }\n ],\n '*': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => {\n let result = 1;\n for (const arg of args) {\n result *= arg.evaluate(ctx);\n }\n return result;\n }\n ],\n '-': {\n type: NumberType,\n overloads: [\n [\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) - b.evaluate(ctx)\n ], [\n [NumberType],\n (ctx, [a]) => -a.evaluate(ctx)\n ]\n ]\n },\n '/': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) / b.evaluate(ctx)\n ],\n '%': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) % b.evaluate(ctx)\n ],\n 'ln2': [\n NumberType,\n [],\n () => Math.LN2\n ],\n 'pi': [\n NumberType,\n [],\n () => Math.PI\n ],\n 'e': [\n NumberType,\n [],\n () => Math.E\n ],\n '^': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [b, e]) => Math.pow(b.evaluate(ctx), e.evaluate(ctx))\n ],\n 'sqrt': [\n NumberType,\n [NumberType],\n (ctx, [x]) => Math.sqrt(x.evaluate(ctx))\n ],\n 'log10': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN10\n ],\n 'ln': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log(n.evaluate(ctx))\n ],\n 'log2': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN2\n ],\n 'sin': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.sin(n.evaluate(ctx))\n ],\n 'cos': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.cos(n.evaluate(ctx))\n ],\n 'tan': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.tan(n.evaluate(ctx))\n ],\n 'asin': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.asin(n.evaluate(ctx))\n ],\n 'acos': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.acos(n.evaluate(ctx))\n ],\n 'atan': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.atan(n.evaluate(ctx))\n ],\n 'min': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => Math.min(...args.map(arg => arg.evaluate(ctx)))\n ],\n 'max': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => Math.max(...args.map(arg => arg.evaluate(ctx)))\n ],\n 'abs': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.abs(n.evaluate(ctx))\n ],\n 'round': [\n NumberType,\n [NumberType],\n (ctx, [n]) => {\n const v = n.evaluate(ctx);\n // Javascript's Math.round() rounds towards +Infinity for halfway\n // values, even when they're negative. It's more common to round\n // away from 0 (e.g., this is what python and C++ do)\n return v < 0 ? -Math.round(-v) : Math.round(v);\n }\n ],\n 'floor': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.floor(n.evaluate(ctx))\n ],\n 'ceil': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.ceil(n.evaluate(ctx))\n ],\n 'filter-==': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => ctx.properties()[(k: any).value] === (v: any).value\n ],\n 'filter-id-==': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => ctx.id() === (v: any).value\n ],\n 'filter-type-==': [\n BooleanType,\n [StringType],\n (ctx, [v]) => ctx.geometryType() === (v: any).value\n ],\n 'filter-<': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a < b;\n }\n ],\n 'filter-id-<': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a < b;\n }\n ],\n 'filter->': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a > b;\n }\n ],\n 'filter-id->': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a > b;\n }\n ],\n 'filter-<=': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a <= b;\n }\n ],\n 'filter-id-<=': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a <= b;\n }\n ],\n 'filter->=': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a >= b;\n }\n ],\n 'filter-id->=': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a >= b;\n }\n ],\n 'filter-has': [\n BooleanType,\n [ValueType],\n (ctx, [k]) => (k: any).value in ctx.properties()\n ],\n 'filter-has-id': [\n BooleanType,\n [],\n (ctx) => (ctx.id() !== null && ctx.id() !== undefined)\n ],\n 'filter-type-in': [\n BooleanType,\n [array(StringType)],\n (ctx, [v]) => (v: any).value.indexOf(ctx.geometryType()) >= 0\n ],\n 'filter-id-in': [\n BooleanType,\n [array(ValueType)],\n (ctx, [v]) => (v: any).value.indexOf(ctx.id()) >= 0\n ],\n 'filter-in-small': [\n BooleanType,\n [StringType, array(ValueType)],\n // assumes v is an array literal\n (ctx, [k, v]) => (v: any).value.indexOf(ctx.properties()[(k: any).value]) >= 0\n ],\n 'filter-in-large': [\n BooleanType,\n [StringType, array(ValueType)],\n // assumes v is a array literal with values sorted in ascending order and of a single type\n (ctx, [k, v]) => binarySearch(ctx.properties()[(k: any).value], (v: any).value, 0, (v: any).value.length - 1)\n ],\n 'all': {\n type: BooleanType,\n overloads: [\n [\n [BooleanType, BooleanType],\n (ctx, [a, b]) => a.evaluate(ctx) && b.evaluate(ctx)\n ],\n [\n varargs(BooleanType),\n (ctx, args) => {\n for (const arg of args) {\n if (!arg.evaluate(ctx))\n return false;\n }\n return true;\n }\n ]\n ]\n },\n 'any': {\n type: BooleanType,\n overloads: [\n [\n [BooleanType, BooleanType],\n (ctx, [a, b]) => a.evaluate(ctx) || b.evaluate(ctx)\n ],\n [\n varargs(BooleanType),\n (ctx, args) => {\n for (const arg of args) {\n if (arg.evaluate(ctx))\n return true;\n }\n return false;\n }\n ]\n ]\n },\n '!': [\n BooleanType,\n [BooleanType],\n (ctx, [b]) => !b.evaluate(ctx)\n ],\n 'is-supported-script': [\n BooleanType,\n [StringType],\n // At parse time this will always return true, so we need to exclude this expression with isGlobalPropertyConstant\n (ctx, [s]) => {\n const isSupportedScript = ctx.globals && ctx.globals.isSupportedScript;\n if (isSupportedScript) {\n return isSupportedScript(s.evaluate(ctx));\n }\n return true;\n }\n ],\n 'upcase': [\n StringType,\n [StringType],\n (ctx, [s]) => s.evaluate(ctx).toUpperCase()\n ],\n 'downcase': [\n StringType,\n [StringType],\n (ctx, [s]) => s.evaluate(ctx).toLowerCase()\n ],\n 'concat': [\n StringType,\n varargs(ValueType),\n (ctx, args) => args.map(arg => valueToString(arg.evaluate(ctx))).join('')\n ],\n 'resolved-locale': [\n StringType,\n [CollatorType],\n (ctx, [collator]) => collator.evaluate(ctx).resolvedLocale()\n ]\n});\n\nexport default expressions;\n","// @flow\n\n/**\n * A type used for returning and propagating errors. The first element of the union\n * represents success and contains a value, and the second represents an error and\n * contains an error value.\n * @private\n */\nexport type Result<T, E> =\n | {| result: 'success', value: T |}\n | {| result: 'error', value: E |};\n\nexport function success<T, E>(value: T): Result<T, E> {\n return {result: 'success', value};\n}\n\nexport function error<T, E>(value: E): Result<T, E> {\n return {result: 'error', value};\n}\n","// @flow\n\nimport type {StylePropertySpecification} from '../style-spec';\n\nexport function supportsPropertyExpression(spec: StylePropertySpecification): boolean {\n return spec['property-type'] === 'data-driven' || spec['property-type'] === 'cross-faded-data-driven';\n}\n\nexport function supportsZoomExpression(spec: StylePropertySpecification): boolean {\n return !!spec.expression && spec.expression.parameters.indexOf('zoom') > -1;\n}\n\nexport function supportsInterpolation(spec: StylePropertySpecification): boolean {\n return !!spec.expression && spec.expression.interpolated;\n}\n","// @flow\n\nexport default function getType(val: mixed): string {\n if (val instanceof Number) {\n return 'number';\n } else if (val instanceof String) {\n return 'string';\n } else if (val instanceof Boolean) {\n return 'boolean';\n } else if (Array.isArray(val)) {\n return 'array';\n } else if (val === null) {\n return 'null';\n } else {\n return typeof val;\n }\n}\n","\nimport * as colorSpaces from '../util/color_spaces';\nimport Color from '../util/color';\nimport extend from '../util/extend';\nimport getType from '../util/get_type';\nimport * as interpolate from '../util/interpolate';\nimport Interpolate from '../expression/definitions/interpolate';\nimport Formatted from '../expression/types/formatted';\nimport ResolvedImage from '../expression/types/resolved_image';\nimport {supportsInterpolation} from '../util/properties';\nimport {findStopLessThanOrEqualTo} from '../expression/stops';\n\nexport function isFunction(value) {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction identityFunction(x) {\n return x;\n}\n\nexport function createFunction(parameters, propertySpec) {\n const isColor = propertySpec.type === 'color';\n const zoomAndFeatureDependent = parameters.stops && typeof parameters.stops[0][0] === 'object';\n const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n const zoomDependent = zoomAndFeatureDependent || !featureDependent;\n const type = parameters.type || (supportsInterpolation(propertySpec) ? 'exponential' : 'interval');\n\n if (isColor) {\n parameters = extend({}, parameters);\n\n if (parameters.stops) {\n parameters.stops = parameters.stops.map((stop) => {\n return [stop[0], Color.parse(stop[1])];\n });\n }\n\n if (parameters.default) {\n parameters.default = Color.parse(parameters.default);\n } else {\n parameters.default = Color.parse(propertySpec.default);\n }\n }\n\n if (parameters.colorSpace && parameters.colorSpace !== 'rgb' && !colorSpaces[parameters.colorSpace]) { // eslint-disable-line import/namespace\n throw new Error(`Unknown color space: ${parameters.colorSpace}`);\n }\n\n let innerFun;\n let hashedStops;\n let categoricalKeyType;\n if (type === 'exponential') {\n innerFun = evaluateExponentialFunction;\n } else if (type === 'interval') {\n innerFun = evaluateIntervalFunction;\n } else if (type === 'categorical') {\n innerFun = evaluateCategoricalFunction;\n\n // For categorical functions, generate an Object as a hashmap of the stops for fast searching\n hashedStops = Object.create(null);\n for (const stop of parameters.stops) {\n hashedStops[stop[0]] = stop[1];\n }\n\n // Infer key type based on first stop key-- used to encforce strict type checking later\n categoricalKeyType = typeof parameters.stops[0][0];\n\n } else if (type === 'identity') {\n innerFun = evaluateIdentityFunction;\n } else {\n throw new Error(`Unknown function type \"${type}\"`);\n }\n\n if (zoomAndFeatureDependent) {\n const featureFunctions = {};\n const zoomStops = [];\n for (let s = 0; s < parameters.stops.length; s++) {\n const stop = parameters.stops[s];\n const zoom = stop[0].zoom;\n if (featureFunctions[zoom] === undefined) {\n featureFunctions[zoom] = {\n zoom,\n type: parameters.type,\n property: parameters.property,\n default: parameters.default,\n stops: []\n };\n zoomStops.push(zoom);\n }\n featureFunctions[zoom].stops.push([stop[0].value, stop[1]]);\n }\n\n const featureFunctionStops = [];\n for (const z of zoomStops) {\n featureFunctionStops.push([featureFunctions[z].zoom, createFunction(featureFunctions[z], propertySpec)]);\n }\n\n const interpolationType = {name: 'linear'};\n return {\n kind: 'composite',\n interpolationType,\n interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n zoomStops: featureFunctionStops.map(s => s[0]),\n evaluate({zoom}, properties) {\n return evaluateExponentialFunction({\n stops: featureFunctionStops,\n base: parameters.base\n }, propertySpec, zoom).evaluate(zoom, properties);\n }\n };\n } else if (zoomDependent) {\n const interpolationType = type === 'exponential' ?\n {name: 'exponential', base: parameters.base !== undefined ? parameters.base : 1} : null;\n return {\n kind: 'camera',\n interpolationType,\n interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n zoomStops: parameters.stops.map(s => s[0]),\n evaluate: ({zoom}) => innerFun(parameters, propertySpec, zoom, hashedStops, categoricalKeyType)\n };\n } else {\n return {\n kind: 'source',\n evaluate(_, feature) {\n const value = feature && feature.properties ? feature.properties[parameters.property] : undefined;\n if (value === undefined) {\n return coalesce(parameters.default, propertySpec.default);\n }\n return innerFun(parameters, propertySpec, value, hashedStops, categoricalKeyType);\n }\n };\n }\n}\n\nfunction coalesce(a, b, c) {\n if (a !== undefined) return a;\n if (b !== undefined) return b;\n if (c !== undefined) return c;\n}\n\nfunction evaluateCategoricalFunction(parameters, propertySpec, input, hashedStops, keyType) {\n const evaluated = typeof input === keyType ? hashedStops[input] : undefined; // Enforce strict typing on input\n return coalesce(evaluated, parameters.default, propertySpec.default);\n}\n\nfunction evaluateIntervalFunction(parameters, propertySpec, input) {\n // Edge cases\n if (getType(input) !== 'number') return coalesce(parameters.default, propertySpec.default);\n const n = parameters.stops.length;\n if (n === 1) return parameters.stops[0][1];\n if (input <= parameters.stops[0][0]) return parameters.stops[0][1];\n if (input >= parameters.stops[n - 1][0]) return parameters.stops[n - 1][1];\n\n const index = findStopLessThanOrEqualTo(parameters.stops.map((stop) => stop[0]), input);\n\n return parameters.stops[index][1];\n}\n\nfunction evaluateExponentialFunction(parameters, propertySpec, input) {\n const base = parameters.base !== undefined ? parameters.base : 1;\n\n // Edge cases\n if (getType(input) !== 'number') return coalesce(parameters.default, propertySpec.default);\n const n = parameters.stops.length;\n if (n === 1) return parameters.stops[0][1];\n if (input <= parameters.stops[0][0]) return parameters.stops[0][1];\n if (input >= parameters.stops[n - 1][0]) return parameters.stops[n - 1][1];\n\n const index = findStopLessThanOrEqualTo(parameters.stops.map((stop) => stop[0]), input);\n const t = interpolationFactor(\n input, base,\n parameters.stops[index][0],\n parameters.stops[index + 1][0]);\n\n const outputLower = parameters.stops[index][1];\n const outputUpper = parameters.stops[index + 1][1];\n let interp = interpolate[propertySpec.type] || identityFunction; // eslint-disable-line import/namespace\n\n if (parameters.colorSpace && parameters.colorSpace !== 'rgb') {\n const colorspace = colorSpaces[parameters.colorSpace]; // eslint-disable-line import/namespace\n interp = (a, b) => colorspace.reverse(colorspace.interpolate(colorspace.forward(a), colorspace.forward(b), t));\n }\n\n if (typeof outputLower.evaluate === 'function') {\n return {\n evaluate(...args) {\n const evaluatedLower = outputLower.evaluate.apply(undefined, args);\n const evaluatedUpper = outputUpper.evaluate.apply(undefined, args);\n // Special case for fill-outline-color, which has no spec default.\n if (evaluatedLower === undefined || evaluatedUpper === undefined) {\n return undefined;\n }\n return interp(evaluatedLower, evaluatedUpper, t);\n }\n };\n }\n\n return interp(outputLower, outputUpper, t);\n}\n\nfunction evaluateIdentityFunction(parameters, propertySpec, input) {\n if (propertySpec.type === 'color') {\n input = Color.parse(input);\n } else if (propertySpec.type === 'formatted') {\n input = Formatted.fromString(input.toString());\n } else if (propertySpec.type === 'resolvedImage') {\n input = ResolvedImage.fromString(input.toString());\n } else if (getType(input) !== propertySpec.type && (propertySpec.type !== 'enum' || !propertySpec.values[input])) {\n input = undefined;\n }\n return coalesce(input, parameters.default, propertySpec.default);\n}\n\n/**\n * Returns a ratio that can be used to interpolate between exponential function\n * stops.\n *\n * How it works:\n * Two consecutive stop values define a (scaled and shifted) exponential\n * function `f(x) = a * base^x + b`, where `base` is the user-specified base,\n * and `a` and `b` are constants affording sufficient degrees of freedom to fit\n * the function to the given stops.\n *\n * Here's a bit of algebra that lets us compute `f(x)` directly from the stop\n * values without explicitly solving for `a` and `b`:\n *\n * First stop value: `f(x0) = y0 = a * base^x0 + b`\n * Second stop value: `f(x1) = y1 = a * base^x1 + b`\n * => `y1 - y0 = a(base^x1 - base^x0)`\n * => `a = (y1 - y0)/(base^x1 - base^x0)`\n *\n * Desired value: `f(x) = y = a * base^x + b`\n * => `f(x) = y0 + a * (base^x - base^x0)`\n *\n * From the above, we can replace the `a` in `a * (base^x - base^x0)` and do a\n * little algebra:\n * ```\n * a * (base^x - base^x0) = (y1 - y0)/(base^x1 - base^x0) * (base^x - base^x0)\n * = (y1 - y0) * (base^x - base^x0) / (base^x1 - base^x0)\n * ```\n *\n * If we let `(base^x - base^x0) / (base^x1 base^x0)`, then we have\n * `f(x) = y0 + (y1 - y0) * ratio`. In other words, `ratio` may be treated as\n * an interpolation factor between the two stops' output values.\n *\n * (Note: a slightly different form for `ratio`,\n * `(base^(x-x0) - 1) / (base^(x1-x0) - 1) `, is equivalent, but requires fewer\n * expensive `Math.pow()` operations.)\n *\n * @private\n */\nfunction interpolationFactor(input, base, lowerValue, upperValue) {\n const difference = upperValue - lowerValue;\n const progress = input - lowerValue;\n\n if (difference === 0) {\n return 0;\n } else if (base === 1) {\n return progress / difference;\n } else {\n return (Math.pow(base, progress) - 1) / (Math.pow(base, difference) - 1);\n }\n}\n","// @flow\n\nimport assert from 'assert';\n\nimport extend from '../util/extend';\nimport ParsingError from './parsing_error';\nimport ParsingContext from './parsing_context';\nimport EvaluationContext from './evaluation_context';\nimport CompoundExpression from './compound_expression';\nimport Step from './definitions/step';\nimport Interpolate from './definitions/interpolate';\nimport Coalesce from './definitions/coalesce';\nimport Let from './definitions/let';\nimport definitions from './definitions';\nimport * as isConstant from './is_constant';\nimport RuntimeError from './runtime_error';\nimport {success, error} from '../util/result';\nimport {supportsPropertyExpression, supportsZoomExpression, supportsInterpolation} from '../util/properties';\n\nimport type {Type, EvaluationKind} from './types';\nimport type {Value} from './values';\nimport type {Expression} from './expression';\nimport type {StylePropertySpecification} from '../style-spec';\nimport type {Result} from '../util/result';\nimport type {InterpolationType} from './definitions/interpolate';\nimport type {PropertyValueSpecification} from '../types';\nimport type {FormattedSection} from './types/formatted';\nimport type Point from '@mapbox/point-geometry';\nimport type {CanonicalTileID} from '../../source/tile_id';\n\nexport type Feature = {\n +type: 1 | 2 | 3 | 'Unknown' | 'Point' | 'MultiPoint' | 'LineString' | 'MultiLineString' | 'Polygon' | 'MultiPolygon',\n +id?: any,\n +properties: {[_: string]: any},\n +patterns?: {[_: string]: {\"min\": string, \"mid\": string, \"max\": string}},\n +geometry?: Array<Array<Point>>\n};\n\nexport type FeatureState = {[_: string]: any};\n\nexport type GlobalProperties = $ReadOnly<{\n zoom: number,\n heatmapDensity?: number,\n lineProgress?: number,\n skyRadialProgress?: number,\n isSupportedScript?: (_: string) => boolean,\n accumulated?: Value\n}>;\n\nexport class StyleExpression {\n expression: Expression;\n\n _evaluator: EvaluationContext;\n _defaultValue: Value;\n _warningHistory: {[key: string]: boolean};\n _enumValues: ?{[_: string]: any};\n\n constructor(expression: Expression, propertySpec: ?StylePropertySpecification) {\n this.expression = expression;\n this._warningHistory = {};\n this._evaluator = new EvaluationContext();\n this._defaultValue = propertySpec ? getDefaultValue(propertySpec) : null;\n this._enumValues = propertySpec && propertySpec.type === 'enum' ? propertySpec.values : null;\n }\n\n evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any {\n this._evaluator.globals = globals;\n this._evaluator.feature = feature;\n this._evaluator.featureState = featureState;\n this._evaluator.canonical = canonical;\n this._evaluator.availableImages = availableImages || null;\n this._evaluator.formattedSection = formattedSection;\n\n return this.expression.evaluate(this._evaluator);\n }\n\n evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any {\n this._evaluator.globals = globals;\n this._evaluator.feature = feature || null;\n this._evaluator.featureState = featureState || null;\n this._evaluator.canonical = canonical;\n this._evaluator.availableImages = availableImages || null;\n this._evaluator.formattedSection = formattedSection || null;\n\n try {\n const val = this.expression.evaluate(this._evaluator);\n // eslint-disable-next-line no-self-compare\n if (val === null || val === undefined || (typeof val === 'number' && val !== val)) {\n return this._defaultValue;\n }\n if (this._enumValues && !(val in this._enumValues)) {\n throw new RuntimeError(`Expected value to be one of ${Object.keys(this._enumValues).map(v => JSON.stringify(v)).join(', ')}, but found ${JSON.stringify(val)} instead.`);\n }\n return val;\n } catch (e) {\n if (!this._warningHistory[e.message]) {\n this._warningHistory[e.message] = true;\n if (typeof console !== 'undefined') {\n console.warn(e.message);\n }\n }\n return this._defaultValue;\n }\n }\n}\n\nexport function isExpression(expression: mixed) {\n return Array.isArray(expression) && expression.length > 0 &&\n typeof expression[0] === 'string' && expression[0] in definitions;\n}\n\n/**\n * Parse and typecheck the given style spec JSON expression. If\n * options.defaultValue is provided, then the resulting StyleExpression's\n * `evaluate()` method will handle errors by logging a warning (once per\n * message) and returning the default value. Otherwise, it will throw\n * evaluation errors.\n *\n * @private\n */\nexport function createExpression(expression: mixed, propertySpec: ?StylePropertySpecification): Result<StyleExpression, Array<ParsingError>> {\n const parser = new ParsingContext(definitions, [], propertySpec ? getExpectedType(propertySpec) : undefined);\n\n // For string-valued properties, coerce to string at the top level rather than asserting.\n const parsed = parser.parse(expression, undefined, undefined, undefined,\n propertySpec && propertySpec.type === 'string' ? {typeAnnotation: 'coerce'} : undefined);\n\n if (!parsed) {\n assert(parser.errors.length > 0);\n return error(parser.errors);\n }\n\n return success(new StyleExpression(parsed, propertySpec));\n}\n\nexport class ZoomConstantExpression<Kind: EvaluationKind> {\n kind: Kind;\n isStateDependent: boolean;\n _styleExpression: StyleExpression;\n\n constructor(kind: Kind, expression: StyleExpression) {\n this.kind = kind;\n this._styleExpression = expression;\n this.isStateDependent = kind !== ('constant': EvaluationKind) && !isConstant.isStateConstant(expression.expression);\n }\n\n evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n\n evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n}\n\nexport class ZoomDependentExpression<Kind: EvaluationKind> {\n kind: Kind;\n zoomStops: Array<number>;\n isStateDependent: boolean;\n\n _styleExpression: StyleExpression;\n interpolationType: ?InterpolationType;\n\n constructor(kind: Kind, expression: StyleExpression, zoomStops: Array<number>, interpolationType?: InterpolationType) {\n this.kind = kind;\n this.zoomStops = zoomStops;\n this._styleExpression = expression;\n this.isStateDependent = kind !== ('camera': EvaluationKind) && !isConstant.isStateConstant(expression.expression);\n this.interpolationType = interpolationType;\n }\n\n evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n\n evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n\n interpolationFactor(input: number, lower: number, upper: number): number {\n if (this.interpolationType) {\n return Interpolate.interpolationFactor(this.interpolationType, input, lower, upper);\n } else {\n return 0;\n }\n }\n}\n\nexport type ConstantExpression = {\n kind: 'constant',\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>) => any,\n}\n\nexport type SourceExpression = {\n kind: 'source',\n isStateDependent: boolean,\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection) => any,\n};\n\nexport type CameraExpression = {\n kind: 'camera',\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>) => any,\n +interpolationFactor: (input: number, lower: number, upper: number) => number,\n zoomStops: Array<number>,\n interpolationType: ?InterpolationType\n};\n\nexport type CompositeExpression = {\n kind: 'composite',\n isStateDependent: boolean,\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection) => any,\n +interpolationFactor: (input: number, lower: number, upper: number) => number,\n zoomStops: Array<number>,\n interpolationType: ?InterpolationType\n};\n\nexport type StylePropertyExpression =\n | ConstantExpression\n | SourceExpression\n | CameraExpression\n | CompositeExpression;\n\nexport function createPropertyExpression(expression: mixed, propertySpec: StylePropertySpecification): Result<StylePropertyExpression, Array<ParsingError>> {\n expression = createExpression(expression, propertySpec);\n if (expression.result === 'error') {\n return expression;\n }\n\n const parsed = expression.value.expression;\n\n const isFeatureConstant = isConstant.isFeatureConstant(parsed);\n if (!isFeatureConstant && !supportsPropertyExpression(propertySpec)) {\n return error([new ParsingError('', 'data expressions not supported')]);\n }\n\n const isZoomConstant = isConstant.isGlobalPropertyConstant(parsed, ['zoom']);\n if (!isZoomConstant && !supportsZoomExpression(propertySpec)) {\n return error([new ParsingError('', 'zoom expressions not supported')]);\n }\n\n const zoomCurve = findZoomCurve(parsed);\n if (!zoomCurve && !isZoomConstant) {\n return error([new ParsingError('', '\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.')]);\n } else if (zoomCurve instanceof ParsingError) {\n return error([zoomCurve]);\n } else if (zoomCurve instanceof Interpolate && !supportsInterpolation(propertySpec)) {\n return error([new ParsingError('', '\"interpolate\" expressions cannot be used with this property')]);\n }\n\n if (!zoomCurve) {\n return success(isFeatureConstant ?\n (new ZoomConstantExpression('constant', expression.value): ConstantExpression) :\n (new ZoomConstantExpression('source', expression.value): SourceExpression));\n }\n\n const interpolationType = zoomCurve instanceof Interpolate ? zoomCurve.interpolation : undefined;\n\n return success(isFeatureConstant ?\n (new ZoomDependentExpression('camera', expression.value, zoomCurve.labels, interpolationType): CameraExpression) :\n (new ZoomDependentExpression('composite', expression.value, zoomCurve.labels, interpolationType): CompositeExpression));\n}\n\nimport {isFunction, createFunction} from '../function';\nimport {Color} from './values';\n\n// serialization wrapper for old-style stop functions normalized to the\n// expression interface\nexport class StylePropertyFunction<T> {\n _parameters: PropertyValueSpecification<T>;\n _specification: StylePropertySpecification;\n\n kind: EvaluationKind;\n evaluate: (globals: GlobalProperties, feature?: Feature) => any;\n interpolationFactor: ?(input: number, lower: number, upper: number) => number;\n zoomStops: ?Array<number>;\n\n constructor(parameters: PropertyValueSpecification<T>, specification: StylePropertySpecification) {\n this._parameters = parameters;\n this._specification = specification;\n extend(this, createFunction(this._parameters, this._specification));\n }\n\n static deserialize(serialized: {_parameters: PropertyValueSpecification<T>, _specification: StylePropertySpecification}) {\n return ((new StylePropertyFunction(serialized._parameters, serialized._specification)): StylePropertyFunction<T>);\n }\n\n static serialize(input: StylePropertyFunction<T>) {\n return {\n _parameters: input._parameters,\n _specification: input._specification\n };\n }\n}\n\nexport function normalizePropertyExpression<T>(value: PropertyValueSpecification<T>, specification: StylePropertySpecification): StylePropertyExpression {\n if (isFunction(value)) {\n return (new StylePropertyFunction(value, specification): any);\n\n } else if (isExpression(value)) {\n const expression = createPropertyExpression(value, specification);\n if (expression.result === 'error') {\n // this should have been caught in validation\n throw new Error(expression.value.map(err => `${err.key}: ${err.message}`).join(', '));\n }\n return expression.value;\n\n } else {\n let constant: any = value;\n if (typeof value === 'string' && specification.type === 'color') {\n constant = Color.parse(value);\n }\n return {\n kind: 'constant',\n evaluate: () => constant\n };\n }\n}\n\n// Zoom-dependent expressions may only use [\"zoom\"] as the input to a top-level \"step\" or \"interpolate\"\n// expression (collectively referred to as a \"curve\"). The curve may be wrapped in one or more \"let\" or\n// \"coalesce\" expressions.\nfunction findZoomCurve(expression: Expression): Step | Interpolate | ParsingError | null {\n let result = null;\n if (expression instanceof Let) {\n result = findZoomCurve(expression.result);\n\n } else if (expression instanceof Coalesce) {\n for (const arg of expression.args) {\n result = findZoomCurve(arg);\n if (result) {\n break;\n }\n }\n\n } else if ((expression instanceof Step || expression instanceof Interpolate) &&\n expression.input instanceof CompoundExpression &&\n expression.input.name === 'zoom') {\n\n result = expression;\n }\n\n if (result instanceof ParsingError) {\n return result;\n }\n\n expression.eachChild((child) => {\n const childResult = findZoomCurve(child);\n if (childResult instanceof ParsingError) {\n result = childResult;\n } else if (!result && childResult) {\n result = new ParsingError('', '\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.');\n } else if (result && childResult && result !== childResult) {\n result = new ParsingError('', 'Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression.');\n }\n });\n\n return result;\n}\n\nimport {ColorType, StringType, NumberType, BooleanType, ValueType, FormattedType, ResolvedImageType, array} from './types';\n\nfunction getExpectedType(spec: StylePropertySpecification): Type {\n const types = {\n color: ColorType,\n string: StringType,\n number: NumberType,\n enum: StringType,\n boolean: BooleanType,\n formatted: FormattedType,\n resolvedImage: ResolvedImageType\n };\n\n if (spec.type === 'array') {\n return array(types[spec.value] || ValueType, spec.length);\n }\n\n return types[spec.type];\n}\n\nfunction getDefaultValue(spec: StylePropertySpecification): Value {\n if (spec.type === 'color' && isFunction(spec.default)) {\n // Special case for heatmap-color: it uses the 'default:' to define a\n // default color ramp, but createExpression expects a simple value to fall\n // back to in case of runtime errors\n return new Color(0, 0, 0, 0);\n } else if (spec.type === 'color') {\n return Color.parse(spec.default) || null;\n } else if (spec.default === undefined) {\n return null;\n } else {\n return spec.default;\n }\n}\n","// @flow\n\nimport assert from 'assert';\nimport type {StylePropertySpecification} from '../style-spec';\n\nexport default convertFunction;\n\nfunction convertLiteral(value) {\n return typeof value === 'object' ? ['literal', value] : value;\n}\n\nfunction convertFunction(parameters: any, propertySpec: StylePropertySpecification) {\n let stops = parameters.stops;\n if (!stops) {\n // identity function\n return convertIdentityFunction(parameters, propertySpec);\n }\n\n const zoomAndFeatureDependent = stops && typeof stops[0][0] === 'object';\n const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n const zoomDependent = zoomAndFeatureDependent || !featureDependent;\n\n stops = stops.map((stop) => {\n if (!featureDependent && propertySpec.tokens && typeof stop[1] === 'string') {\n return [stop[0], convertTokenString(stop[1])];\n }\n return [stop[0], convertLiteral(stop[1])];\n });\n\n if (zoomAndFeatureDependent) {\n return convertZoomAndPropertyFunction(parameters, propertySpec, stops);\n } else if (zoomDependent) {\n return convertZoomFunction(parameters, propertySpec, stops);\n } else {\n return convertPropertyFunction(parameters, propertySpec, stops);\n }\n}\n\nfunction convertIdentityFunction(parameters, propertySpec): Array<mixed> {\n const get = ['get', parameters.property];\n\n if (parameters.default === undefined) {\n // By default, expressions for string-valued properties get coerced. To preserve\n // legacy function semantics, insert an explicit assertion instead.\n return propertySpec.type === 'string' ? ['string', get] : get;\n } else if (propertySpec.type === 'enum') {\n return [\n 'match',\n get,\n Object.keys(propertySpec.values),\n get,\n parameters.default\n ];\n } else {\n const expression = [propertySpec.type === 'color' ? 'to-color' : propertySpec.type, get, convertLiteral(parameters.default)];\n if (propertySpec.type === 'array') {\n expression.splice(1, 0, propertySpec.value, propertySpec.length || null);\n }\n return expression;\n }\n}\n\nfunction getInterpolateOperator(parameters) {\n switch (parameters.colorSpace) {\n case 'hcl': return 'interpolate-hcl';\n case 'lab': return 'interpolate-lab';\n default: return 'interpolate';\n }\n}\n\nfunction convertZoomAndPropertyFunction(parameters, propertySpec, stops) {\n const featureFunctionParameters = {};\n const featureFunctionStops = {};\n const zoomStops = [];\n for (let s = 0; s < stops.length; s++) {\n const stop = stops[s];\n const zoom = stop[0].zoom;\n if (featureFunctionParameters[zoom] === undefined) {\n featureFunctionParameters[zoom] = {\n zoom,\n type: parameters.type,\n property: parameters.property,\n default: parameters.default,\n };\n featureFunctionStops[zoom] = [];\n zoomStops.push(zoom);\n }\n featureFunctionStops[zoom].push([stop[0].value, stop[1]]);\n }\n\n // the interpolation type for the zoom dimension of a zoom-and-property\n // function is determined directly from the style property specification\n // for which it's being used: linear for interpolatable properties, step\n // otherwise.\n const functionType = getFunctionType({}, propertySpec);\n if (functionType === 'exponential') {\n const expression = [getInterpolateOperator(parameters), ['linear'], ['zoom']];\n\n for (const z of zoomStops) {\n const output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n appendStopPair(expression, z, output, false);\n }\n\n return expression;\n } else {\n const expression = ['step', ['zoom']];\n\n for (const z of zoomStops) {\n const output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n appendStopPair(expression, z, output, true);\n }\n\n fixupDegenerateStepCurve(expression);\n\n return expression;\n }\n}\n\nfunction coalesce(a, b) {\n if (a !== undefined) return a;\n if (b !== undefined) return b;\n}\n\nfunction getFallback(parameters, propertySpec) {\n const defaultValue = convertLiteral(coalesce(parameters.default, propertySpec.default));\n\n /*\n * Some fields with type: resolvedImage have an undefined default.\n * Because undefined is an invalid value for resolvedImage, set fallback to\n * an empty string instead of undefined to ensure output\n * passes validation.\n */\n if (defaultValue === undefined && propertySpec.type === 'resolvedImage') {\n return '';\n }\n return defaultValue;\n}\n\nfunction convertPropertyFunction(parameters, propertySpec, stops) {\n const type = getFunctionType(parameters, propertySpec);\n const get = ['get', parameters.property];\n if (type === 'categorical' && typeof stops[0][0] === 'boolean') {\n assert(parameters.stops.length > 0 && parameters.stops.length <= 2);\n const expression = ['case'];\n for (const stop of stops) {\n expression.push(['==', get, stop[0]], stop[1]);\n }\n\n expression.push(getFallback(parameters, propertySpec));\n return expression;\n } else if (type === 'categorical') {\n const expression = ['match', get];\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], false);\n }\n expression.push(getFallback(parameters, propertySpec));\n return expression;\n } else if (type === 'interval') {\n const expression = ['step', ['number', get]];\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], true);\n }\n fixupDegenerateStepCurve(expression);\n return parameters.default === undefined ? expression : [\n 'case',\n ['==', ['typeof', get], 'number'],\n expression,\n convertLiteral(parameters.default)\n ];\n } else if (type === 'exponential') {\n const base = parameters.base !== undefined ? parameters.base : 1;\n const expression = [\n getInterpolateOperator(parameters),\n base === 1 ? [\"linear\"] : [\"exponential\", base],\n [\"number\", get]\n ];\n\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], false);\n }\n return parameters.default === undefined ? expression : [\n 'case',\n ['==', ['typeof', get], 'number'],\n expression,\n convertLiteral(parameters.default)\n ];\n } else {\n throw new Error(`Unknown property function type ${type}`);\n }\n}\n\nfunction convertZoomFunction(parameters, propertySpec, stops, input = ['zoom']) {\n const type = getFunctionType(parameters, propertySpec);\n let expression;\n let isStep = false;\n if (type === 'interval') {\n expression = ['step', input];\n isStep = true;\n } else if (type === 'exponential') {\n const base = parameters.base !== undefined ? parameters.base : 1;\n expression = [getInterpolateOperator(parameters), base === 1 ? [\"linear\"] : [\"exponential\", base], input];\n\n } else {\n throw new Error(`Unknown zoom function type \"${type}\"`);\n }\n\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], isStep);\n }\n\n fixupDegenerateStepCurve(expression);\n\n return expression;\n}\n\nfunction fixupDegenerateStepCurve(expression) {\n // degenerate step curve (i.e. a constant function): add a noop stop\n if (expression[0] === 'step' && expression.length === 3) {\n expression.push(0);\n expression.push(expression[3]);\n }\n}\n\nfunction appendStopPair(curve, input, output, isStep) {\n // Skip duplicate stop values. They were not validated for functions, but they are for expressions.\n // https://github.com/mapbox/mapbox-gl-js/issues/4107\n if (curve.length > 3 && input === curve[curve.length - 2]) {\n return;\n }\n // step curves don't get the first input value, as it is redundant.\n if (!(isStep && curve.length === 2)) {\n curve.push(input);\n }\n curve.push(output);\n}\n\nfunction getFunctionType(parameters, propertySpec) {\n if (parameters.type) {\n return parameters.type;\n } else {\n assert(propertySpec.expression);\n return (propertySpec.expression: any).interpolated ? 'exponential' : 'interval';\n }\n}\n\n// \"String with {name} token\" => [\"concat\", \"String with \", [\"get\", \"name\"], \" token\"]\nexport function convertTokenString(s: string) {\n const result = ['concat'];\n const re = /{([^{}]+)}/g;\n let pos = 0;\n for (let match = re.exec(s); match !== null; match = re.exec(s)) {\n const literal = s.slice(pos, re.lastIndex - match[0].length);\n pos = re.lastIndex;\n if (literal.length > 0) result.push(literal);\n result.push(['get', match[1]]);\n }\n\n if (result.length === 1) {\n return s;\n }\n\n if (pos < s.length) {\n result.push(s.slice(pos));\n } else if (result.length === 2) {\n return ['to-string', result[1]];\n }\n\n return result;\n}\n\n","// @flow\n\nimport {createExpression} from '../expression';\nimport type {GlobalProperties, Feature} from '../expression';\nimport type {CanonicalTileID} from '../../source/tile_id';\n\ntype FilterExpression = (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID) => boolean;\nexport type FeatureFilter ={filter: FilterExpression, needGeometry: boolean};\n\nexport default createFilter;\nexport {isExpressionFilter};\n\nfunction isExpressionFilter(filter: any) {\n if (filter === true || filter === false) {\n return true;\n }\n\n if (!Array.isArray(filter) || filter.length === 0) {\n return false;\n }\n switch (filter[0]) {\n case 'has':\n return filter.length >= 2 && filter[1] !== '$id' && filter[1] !== '$type';\n\n case 'in':\n return filter.length >= 3 && (typeof filter[1] !== 'string' || Array.isArray(filter[2]));\n\n case '!in':\n case '!has':\n case 'none':\n return false;\n\n case '==':\n case '!=':\n case '>':\n case '>=':\n case '<':\n case '<=':\n return filter.length !== 3 || (Array.isArray(filter[1]) || Array.isArray(filter[2]));\n\n case 'any':\n case 'all':\n for (const f of filter.slice(1)) {\n if (!isExpressionFilter(f) && typeof f !== 'boolean') {\n return false;\n }\n }\n return true;\n\n default:\n return true;\n }\n}\n\nconst filterSpec = {\n 'type': 'boolean',\n 'default': false,\n 'transition': false,\n 'property-type': 'data-driven',\n 'expression': {\n 'interpolated': false,\n 'parameters': ['zoom', 'feature']\n }\n};\n\n/**\n * Given a filter expressed as nested arrays, return a new function\n * that evaluates whether a given feature (with a .properties or .tags property)\n * passes its test.\n *\n * @private\n * @param {Array} filter mapbox gl filter\n * @returns {Function} filter-evaluating function\n */\nfunction createFilter(filter: any): FeatureFilter {\n if (filter === null || filter === undefined) {\n return {filter: () => true, needGeometry: false};\n }\n\n if (!isExpressionFilter(filter)) {\n filter = convertFilter(filter);\n }\n\n const compiled = createExpression(filter, filterSpec);\n if (compiled.result === 'error') {\n throw new Error(compiled.value.map(err => `${err.key}: ${err.message}`).join(', '));\n } else {\n const needGeometry = geometryNeeded(filter);\n return {filter: (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID) => compiled.value.evaluate(globalProperties, feature, {}, canonical),\n needGeometry};\n }\n}\n\n// Comparison function to sort numbers and strings\nfunction compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\nfunction geometryNeeded(filter) {\n if (!Array.isArray(filter)) return false;\n if (filter[0] === 'within') return true;\n for (let index = 1; index < filter.length; index++) {\n if (geometryNeeded(filter[index])) return true;\n }\n return false;\n}\n\nfunction convertFilter(filter: ?Array<any>): mixed {\n if (!filter) return true;\n const op = filter[0];\n if (filter.length <= 1) return (op !== 'any');\n const converted =\n op === '==' ? convertComparisonOp(filter[1], filter[2], '==') :\n op === '!=' ? convertNegation(convertComparisonOp(filter[1], filter[2], '==')) :\n op === '<' ||\n op === '>' ||\n op === '<=' ||\n op === '>=' ? convertComparisonOp(filter[1], filter[2], op) :\n op === 'any' ? convertDisjunctionOp(filter.slice(1)) :\n op === 'all' ? ['all'].concat(filter.slice(1).map(convertFilter)) :\n op === 'none' ? ['all'].concat(filter.slice(1).map(convertFilter).map(convertNegation)) :\n op === 'in' ? convertInOp(filter[1], filter.slice(2)) :\n op === '!in' ? convertNegation(convertInOp(filter[1], filter.slice(2))) :\n op === 'has' ? convertHasOp(filter[1]) :\n op === '!has' ? convertNegation(convertHasOp(filter[1])) :\n op === 'within' ? filter :\n true;\n return converted;\n}\n\nfunction convertComparisonOp(property: string, value: any, op: string) {\n switch (property) {\n case '$type':\n return [`filter-type-${op}`, value];\n case '$id':\n return [`filter-id-${op}`, value];\n default:\n return [`filter-${op}`, property, value];\n }\n}\n\nfunction convertDisjunctionOp(filters: Array<Array<any>>) {\n return ['any'].concat(filters.map(convertFilter));\n}\n\nfunction convertInOp(property: string, values: Array<any>) {\n if (values.length === 0) { return false; }\n switch (property) {\n case '$type':\n return [`filter-type-in`, ['literal', values]];\n case '$id':\n return [`filter-id-in`, ['literal', values]];\n default:\n if (values.length > 200 && !values.some(v => typeof v !== typeof values[0])) {\n return ['filter-in-large', property, ['literal', values.sort(compare)]];\n } else {\n return ['filter-in-small', property, ['literal', values]];\n }\n }\n}\n\nfunction convertHasOp(property: string) {\n switch (property) {\n case '$type':\n return true;\n case '$id':\n return [`filter-has-id`];\n default:\n return [`filter-has`, property];\n }\n}\n\nfunction convertNegation(filter: mixed) {\n return ['!', filter];\n}\n","// @flow\n\nimport {isExpressionFilter} from './index';\n\nimport type {FilterSpecification} from '../types';\n\ntype ExpectedTypes = {[_: string]: 'string' | 'number' | 'boolean'};\n\n/**\n * Convert the given legacy filter to (the JSON representation of) an\n * equivalent expression\n * @private\n */\nexport default function convertFilter(filter: FilterSpecification): mixed {\n return _convertFilter(filter, {});\n}\n\n/*\n * Convert the given filter to an expression, storing the expected types for\n * any feature properties referenced in expectedTypes.\n *\n * These expected types are needed in order to construct preflight type checks\n * needed for handling 'any' filters. A preflight type check is necessary in\n * order to mimic legacy filters' semantics around expected type mismatches.\n * For example, consider the legacy filter:\n *\n * [\"any\", [\"all\", [\">\", \"y\", 0], [\">\", \"y\", 0]], [\">\", \"x\", 0]]\n *\n * Naively, we might convert this to the expression:\n *\n * [\"any\", [\"all\", [\">\", [\"get\", \"y\"], 0], [\">\", [\"get\", \"z\"], 0]], [\">\", [\"get\", \"x\"], 0]]\n *\n * But if we tried to evaluate this against, say `{x: 1, y: null, z: 0}`, the\n * [\">\", [\"get\", \"y\"], 0] would cause an evaluation error, leading to the\n * entire filter returning false. Legacy filter semantics, though, ask for\n * [\">\", \"y\", 0] to simply return `false` when `y` is of the wrong type,\n * allowing the subsequent terms of the outer \"any\" expression to be evaluated\n * (resulting, in this case, in a `true` value, because x > 0).\n *\n * We account for this by inserting a preflight type-checking expression before\n * each \"any\" term, allowing us to avoid evaluating the actual converted filter\n * if any type mismatches would cause it to produce an evalaution error:\n *\n * [\"any\",\n * [\"case\",\n * [\"all\", [\"==\", [\"typeof\", [\"get\", \"y\"]], \"number\"], [\"==\", [\"typeof\", [\"get\", \"z\"], \"number]],\n * [\"all\", [\">\", [\"get\", \"y\"], 0], [\">\", [\"get\", \"z\"], 0]],\n * false\n * ],\n * [\"case\",\n * [\"==\", [\"typeof\", [\"get\", \"x\"], \"number\"]],\n * [\">\", [\"get\", \"x\"], 0],\n * false\n * ]\n * ]\n *\n * An alternative, possibly more direct approach would be to use type checks\n * in the conversion of each comparison operator, so that the converted version\n * of each individual ==, >=, etc. would mimic the legacy filter semantics. The\n * downside of this approach is that it can lead to many more type checks than\n * would otherwise be necessary: outside the context of an \"any\" expression,\n * bailing out due to a runtime type error (expression semantics) and returning\n * false (legacy filter semantics) are equivalent: they cause the filter to\n * produce a `false` result.\n */\nfunction _convertFilter(filter: FilterSpecification, expectedTypes: ExpectedTypes): mixed {\n if (isExpressionFilter(filter)) { return filter; }\n\n if (!filter) return true;\n const op = filter[0];\n if (filter.length <= 1) return (op !== 'any');\n\n let converted;\n\n if (\n op === '==' ||\n op === '!=' ||\n op === '<' ||\n op === '>' ||\n op === '<=' ||\n op === '>='\n ) {\n const [, property, value] = (filter: any);\n converted = convertComparisonOp(property, value, op, expectedTypes);\n } else if (op === 'any') {\n const children = (filter: any).slice(1).map(f => {\n const types = {};\n const child = _convertFilter(f, types);\n const typechecks = runtimeTypeChecks(types);\n return typechecks === true ? child : ['case', typechecks, child, false];\n });\n return ['any'].concat(children);\n } else if (op === 'all') {\n const children = (filter: any).slice(1).map(f => _convertFilter(f, expectedTypes));\n return children.length > 1 ? ['all'].concat(children) : [].concat(...children);\n } else if (op === 'none') {\n return ['!', _convertFilter(['any'].concat(filter.slice(1)), {})];\n } else if (op === 'in') {\n converted = convertInOp((filter[1]: any), filter.slice(2));\n } else if (op === '!in') {\n converted = convertInOp((filter[1]: any), filter.slice(2), true);\n } else if (op === 'has') {\n converted = convertHasOp((filter[1]: any));\n } else if (op === '!has') {\n converted = ['!', convertHasOp((filter[1]: any))];\n } else {\n converted = true;\n }\n\n return converted;\n}\n\n// Given a set of feature properties and an expected type for each one,\n// construct an boolean expression that tests whether each property has the\n// right type.\n// E.g.: for {name: 'string', population: 'number'}, return\n// [ 'all',\n// ['==', ['typeof', ['get', 'name'], 'string']],\n// ['==', ['typeof', ['get', 'population'], 'number]]\n// ]\nfunction runtimeTypeChecks(expectedTypes: ExpectedTypes) {\n const conditions = [];\n for (const property in expectedTypes) {\n const get = property === '$id' ? ['id'] : ['get', property];\n conditions.push(['==', ['typeof', get], expectedTypes[property]]);\n }\n if (conditions.length === 0) return true;\n if (conditions.length === 1) return conditions[0];\n return ['all'].concat(conditions);\n}\n\nfunction convertComparisonOp(property: string, value: any, op: string, expectedTypes: ?ExpectedTypes) {\n let get;\n if (property === '$type') {\n return [op, ['geometry-type'], value];\n } else if (property === '$id') {\n get = ['id'];\n } else {\n get = ['get', property];\n }\n\n if (expectedTypes && value !== null) {\n const type = ((typeof value): any);\n expectedTypes[property] = type;\n }\n\n if (op === '==' && property !== '$id' && value === null) {\n return [\n 'all',\n ['has', property], // missing property != null for legacy filters\n ['==', get, null]\n ];\n } else if (op === '!=' && property !== '$id' && value === null) {\n return [\n 'any',\n ['!', ['has', property]], // missing property != null for legacy filters\n ['!=', get, null]\n ];\n }\n\n return [op, get, value];\n}\n\nfunction convertInOp(property: string, values: Array<any>, negate = false) {\n if (values.length === 0) return negate;\n\n let get;\n if (property === '$type') {\n get = ['geometry-type'];\n } else if (property === '$id') {\n get = ['id'];\n } else {\n get = ['get', property];\n }\n\n // Determine if the list of values to be searched is homogenously typed.\n // If so (and if the type is string or number), then we can use a\n // [match, input, [...values], true, false] construction rather than a\n // bunch of `==` tests.\n let uniformTypes = true;\n const type = typeof values[0];\n for (const value of values) {\n if (typeof value !== type) {\n uniformTypes = false;\n break;\n }\n }\n\n if (uniformTypes && (type === 'string' || type === 'number')) {\n // Match expressions must have unique values.\n const uniqueValues = values.sort().filter((v, i) => i === 0 || values[i - 1] !== v);\n return ['match', get, uniqueValues, !negate, negate];\n }\n\n return [ negate ? 'all' : 'any' ].concat(\n values.map(v => [negate ? '!=' : '==', get, v])\n );\n}\n\nfunction convertHasOp(property: string) {\n if (property === '$type') {\n return true;\n } else if (property === '$id') {\n return ['!=', ['id'], null];\n } else {\n return ['has', property];\n }\n}\n","// @flow\n\nimport {\n eachLayer,\n eachProperty\n} from '../visit';\nimport {isExpression} from '../expression';\nimport convertFunction, {convertTokenString} from '../function/convert';\nimport convertFilter from '../feature_filter/convert';\n\nimport type {StyleSpecification} from '../types';\n\n/**\n * Migrate the given style object in place to use expressions. Specifically,\n * this will convert (a) \"stop\" functions, and (b) legacy filters to their\n * expression equivalents.\n */\nexport default function(style: StyleSpecification) {\n const converted = [];\n\n eachLayer(style, (layer) => {\n if (layer.filter) {\n layer.filter = (convertFilter(layer.filter): any);\n }\n });\n\n eachProperty(style, {paint: true, layout: true}, ({path, value, reference, set}) => {\n if (isExpression(value)) return;\n if (typeof value === 'object' && !Array.isArray(value)) {\n set(convertFunction(value, reference));\n converted.push(path.join('.'));\n } else if (reference.tokens && typeof value === 'string') {\n set(convertTokenString(value));\n }\n });\n\n return style;\n}\n\n","\nimport migrateToV8 from './migrate/v8';\nimport migrateToExpressions from './migrate/expressions';\n\n/**\n * Migrate a Mapbox GL Style to the latest version.\n *\n * @private\n * @alias migrate\n * @param {object} style a Mapbox GL Style\n * @returns {Object} a migrated style\n * @example\n * var fs = require('fs');\n * var migrate = require('mapbox-gl-style-spec').migrate;\n * var style = fs.readFileSync('./style.json', 'utf8');\n * fs.writeFileSync('./style.json', JSON.stringify(migrate(style)));\n */\nexport default function(style) {\n let migrated = false;\n\n if (style.version === 7) {\n style = migrateToV8(style);\n migrated = true;\n }\n\n if (style.version === 8) {\n migrated = migrateToExpressions(style);\n migrated = true;\n }\n\n if (!migrated) {\n throw new Error('cannot migrate from', style.version);\n }\n\n return style;\n}\n","\nexport default function (style) {\n const styleIDs = [];\n const sourceIDs = [];\n const compositedSourceLayers = [];\n\n for (const id in style.sources) {\n const source = style.sources[id];\n\n if (source.type !== \"vector\")\n continue;\n\n const match = /^mapbox:\\/\\/(.*)/.exec(source.url);\n if (!match)\n continue;\n\n styleIDs.push(id);\n sourceIDs.push(match[1]);\n }\n\n if (styleIDs.length < 2)\n return style;\n\n styleIDs.forEach((id) => {\n delete style.sources[id];\n });\n\n const compositeID = sourceIDs.join(\",\");\n\n style.sources[compositeID] = {\n \"type\": \"vector\",\n \"url\": `mapbox://${compositeID}`\n };\n\n style.layers.forEach((layer) => {\n if (styleIDs.indexOf(layer.source) >= 0) {\n layer.source = compositeID;\n\n if ('source-layer' in layer) {\n if (compositedSourceLayers.indexOf(layer['source-layer']) >= 0) {\n throw new Error('Conflicting source layer names');\n } else {\n compositedSourceLayers.push(layer['source-layer']);\n }\n }\n }\n });\n\n return style;\n}\n","\nexport default ['type', 'source', 'source-layer', 'minzoom', 'maxzoom', 'filter', 'layout'];\n","\nimport refProperties from './util/ref_properties';\n\nfunction deref(layer, parent) {\n const result = {};\n\n for (const k in layer) {\n if (k !== 'ref') {\n result[k] = layer[k];\n }\n }\n\n refProperties.forEach((k) => {\n if (k in parent) {\n result[k] = parent[k];\n }\n });\n\n return result;\n}\n\nexport default derefLayers;\n\n/**\n * Given an array of layers, some of which may contain `ref` properties\n * whose value is the `id` of another property, return a new array where\n * such layers have been augmented with the 'type', 'source', etc. properties\n * from the parent layer, and the `ref` property has been removed.\n *\n * The input is not modified. The output may contain references to portions\n * of the input.\n *\n * @private\n * @param {Array<Layer>} layers\n * @returns {Array<Layer>}\n */\nfunction derefLayers(layers) {\n layers = layers.slice();\n\n const map = Object.create(null);\n for (let i = 0; i < layers.length; i++) {\n map[layers[i].id] = layers[i];\n }\n\n for (let i = 0; i < layers.length; i++) {\n if ('ref' in layers[i]) {\n layers[i] = deref(layers[i], map[layers[i].ref]);\n }\n }\n\n return layers;\n}\n","// @flow\n\n/**\n * Deeply compares two object literals.\n *\n * @private\n */\nfunction deepEqual(a: ?mixed, b: ?mixed): boolean {\n if (Array.isArray(a)) {\n if (!Array.isArray(b) || a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) {\n if (!deepEqual(a[i], b[i])) return false;\n }\n return true;\n }\n if (typeof a === 'object' && a !== null && b !== null) {\n if (!(typeof b === 'object')) return false;\n const keys = Object.keys(a);\n if (keys.length !== Object.keys(b).length) return false;\n for (const key in a) {\n if (!deepEqual(a[key], b[key])) return false;\n }\n return true;\n }\n return a === b;\n}\n\nexport default deepEqual;\n","\nimport isEqual from './util/deep_equal';\n\nconst operations = {\n\n /*\n * { command: 'setStyle', args: [stylesheet] }\n */\n setStyle: 'setStyle',\n\n /*\n * { command: 'addLayer', args: [layer, 'beforeLayerId'] }\n */\n addLayer: 'addLayer',\n\n /*\n * { command: 'removeLayer', args: ['layerId'] }\n */\n removeLayer: 'removeLayer',\n\n /*\n * { command: 'setPaintProperty', args: ['layerId', 'prop', value] }\n */\n setPaintProperty: 'setPaintProperty',\n\n /*\n * { command: 'setLayoutProperty', args: ['layerId', 'prop', value] }\n */\n setLayoutProperty: 'setLayoutProperty',\n\n /*\n * { command: 'setFilter', args: ['layerId', filter] }\n */\n setFilter: 'setFilter',\n\n /*\n * { command: 'addSource', args: ['sourceId', source] }\n */\n addSource: 'addSource',\n\n /*\n * { command: 'removeSource', args: ['sourceId'] }\n */\n removeSource: 'removeSource',\n\n /*\n * { command: 'setGeoJSONSourceData', args: ['sourceId', data] }\n */\n setGeoJSONSourceData: 'setGeoJSONSourceData',\n\n /*\n * { command: 'setLayerZoomRange', args: ['layerId', 0, 22] }\n */\n setLayerZoomRange: 'setLayerZoomRange',\n\n /*\n * { command: 'setLayerProperty', args: ['layerId', 'prop', value] }\n */\n setLayerProperty: 'setLayerProperty',\n\n /*\n * { command: 'setCenter', args: [[lon, lat]] }\n */\n setCenter: 'setCenter',\n\n /*\n * { command: 'setZoom', args: [zoom] }\n */\n setZoom: 'setZoom',\n\n /*\n * { command: 'setBearing', args: [bearing] }\n */\n setBearing: 'setBearing',\n\n /*\n * { command: 'setPitch', args: [pitch] }\n */\n setPitch: 'setPitch',\n\n /*\n * { command: 'setSprite', args: ['spriteUrl'] }\n */\n setSprite: 'setSprite',\n\n /*\n * { command: 'setGlyphs', args: ['glyphsUrl'] }\n */\n setGlyphs: 'setGlyphs',\n\n /*\n * { command: 'setTransition', args: [transition] }\n */\n setTransition: 'setTransition',\n\n /*\n * { command: 'setLighting', args: [lightProperties] }\n */\n setLight: 'setLight',\n\n /*\n * { command: 'setTerrain', args: [terrainProperties] }\n */\n setTerrain: 'setTerrain'\n\n};\n\nfunction addSource(sourceId, after, commands) {\n commands.push({command: operations.addSource, args: [sourceId, after[sourceId]]});\n}\n\nfunction removeSource(sourceId, commands, sourcesRemoved) {\n commands.push({command: operations.removeSource, args: [sourceId]});\n sourcesRemoved[sourceId] = true;\n}\n\nfunction updateSource(sourceId, after, commands, sourcesRemoved) {\n removeSource(sourceId, commands, sourcesRemoved);\n addSource(sourceId, after, commands);\n}\n\nfunction canUpdateGeoJSON(before, after, sourceId) {\n let prop;\n for (prop in before[sourceId]) {\n if (!before[sourceId].hasOwnProperty(prop)) continue;\n if (prop !== 'data' && !isEqual(before[sourceId][prop], after[sourceId][prop])) {\n return false;\n }\n }\n for (prop in after[sourceId]) {\n if (!after[sourceId].hasOwnProperty(prop)) continue;\n if (prop !== 'data' && !isEqual(before[sourceId][prop], after[sourceId][prop])) {\n return false;\n }\n }\n return true;\n}\n\nfunction diffSources(before, after, commands, sourcesRemoved) {\n before = before || {};\n after = after || {};\n\n let sourceId;\n\n // look for sources to remove\n for (sourceId in before) {\n if (!before.hasOwnProperty(sourceId)) continue;\n if (!after.hasOwnProperty(sourceId)) {\n removeSource(sourceId, commands, sourcesRemoved);\n }\n }\n\n // look for sources to add/update\n for (sourceId in after) {\n if (!after.hasOwnProperty(sourceId)) continue;\n if (!before.hasOwnProperty(sourceId)) {\n addSource(sourceId, after, commands);\n } else if (!isEqual(before[sourceId], after[sourceId])) {\n if (before[sourceId].type === 'geojson' && after[sourceId].type === 'geojson' && canUpdateGeoJSON(before, after, sourceId)) {\n commands.push({command: operations.setGeoJSONSourceData, args: [sourceId, after[sourceId].data]});\n } else {\n // no update command, must remove then add\n updateSource(sourceId, after, commands, sourcesRemoved);\n }\n }\n }\n}\n\nfunction diffLayerPropertyChanges(before, after, commands, layerId, klass, command) {\n before = before || {};\n after = after || {};\n\n let prop;\n\n for (prop in before) {\n if (!before.hasOwnProperty(prop)) continue;\n if (!isEqual(before[prop], after[prop])) {\n commands.push({command, args: [layerId, prop, after[prop], klass]});\n }\n }\n for (prop in after) {\n if (!after.hasOwnProperty(prop) || before.hasOwnProperty(prop)) continue;\n if (!isEqual(before[prop], after[prop])) {\n commands.push({command, args: [layerId, prop, after[prop], klass]});\n }\n }\n}\n\nfunction pluckId(layer) {\n return layer.id;\n}\nfunction indexById(group, layer) {\n group[layer.id] = layer;\n return group;\n}\n\nfunction diffLayers(before, after, commands) {\n before = before || [];\n after = after || [];\n\n // order of layers by id\n const beforeOrder = before.map(pluckId);\n const afterOrder = after.map(pluckId);\n\n // index of layer by id\n const beforeIndex = before.reduce(indexById, {});\n const afterIndex = after.reduce(indexById, {});\n\n // track order of layers as if they have been mutated\n const tracker = beforeOrder.slice();\n\n // layers that have been added do not need to be diffed\n const clean = Object.create(null);\n\n let i, d, layerId, beforeLayer, afterLayer, insertBeforeLayerId, prop;\n\n // remove layers\n for (i = 0, d = 0; i < beforeOrder.length; i++) {\n layerId = beforeOrder[i];\n if (!afterIndex.hasOwnProperty(layerId)) {\n commands.push({command: operations.removeLayer, args: [layerId]});\n tracker.splice(tracker.indexOf(layerId, d), 1);\n } else {\n // limit where in tracker we need to look for a match\n d++;\n }\n }\n\n // add/reorder layers\n for (i = 0, d = 0; i < afterOrder.length; i++) {\n // work backwards as insert is before an existing layer\n layerId = afterOrder[afterOrder.length - 1 - i];\n\n if (tracker[tracker.length - 1 - i] === layerId) continue;\n\n if (beforeIndex.hasOwnProperty(layerId)) {\n // remove the layer before we insert at the correct position\n commands.push({command: operations.removeLayer, args: [layerId]});\n tracker.splice(tracker.lastIndexOf(layerId, tracker.length - d), 1);\n } else {\n // limit where in tracker we need to look for a match\n d++;\n }\n\n // add layer at correct position\n insertBeforeLayerId = tracker[tracker.length - i];\n commands.push({command: operations.addLayer, args: [afterIndex[layerId], insertBeforeLayerId]});\n tracker.splice(tracker.length - i, 0, layerId);\n clean[layerId] = true;\n }\n\n // update layers\n for (i = 0; i < afterOrder.length; i++) {\n layerId = afterOrder[i];\n beforeLayer = beforeIndex[layerId];\n afterLayer = afterIndex[layerId];\n\n // no need to update if previously added (new or moved)\n if (clean[layerId] || isEqual(beforeLayer, afterLayer)) continue;\n\n // If source, source-layer, or type have changes, then remove the layer\n // and add it back 'from scratch'.\n if (!isEqual(beforeLayer.source, afterLayer.source) || !isEqual(beforeLayer['source-layer'], afterLayer['source-layer']) || !isEqual(beforeLayer.type, afterLayer.type)) {\n commands.push({command: operations.removeLayer, args: [layerId]});\n // we add the layer back at the same position it was already in, so\n // there's no need to update the `tracker`\n insertBeforeLayerId = tracker[tracker.lastIndexOf(layerId) + 1];\n commands.push({command: operations.addLayer, args: [afterLayer, insertBeforeLayerId]});\n continue;\n }\n\n // layout, paint, filter, minzoom, maxzoom\n diffLayerPropertyChanges(beforeLayer.layout, afterLayer.layout, commands, layerId, null, operations.setLayoutProperty);\n diffLayerPropertyChanges(beforeLayer.paint, afterLayer.paint, commands, layerId, null, operations.setPaintProperty);\n if (!isEqual(beforeLayer.filter, afterLayer.filter)) {\n commands.push({command: operations.setFilter, args: [layerId, afterLayer.filter]});\n }\n if (!isEqual(beforeLayer.minzoom, afterLayer.minzoom) || !isEqual(beforeLayer.maxzoom, afterLayer.maxzoom)) {\n commands.push({command: operations.setLayerZoomRange, args: [layerId, afterLayer.minzoom, afterLayer.maxzoom]});\n }\n\n // handle all other layer props, including paint.*\n for (prop in beforeLayer) {\n if (!beforeLayer.hasOwnProperty(prop)) continue;\n if (prop === 'layout' || prop === 'paint' || prop === 'filter' ||\n prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom') continue;\n if (prop.indexOf('paint.') === 0) {\n diffLayerPropertyChanges(beforeLayer[prop], afterLayer[prop], commands, layerId, prop.slice(6), operations.setPaintProperty);\n } else if (!isEqual(beforeLayer[prop], afterLayer[prop])) {\n commands.push({command: operations.setLayerProperty, args: [layerId, prop, afterLayer[prop]]});\n }\n }\n for (prop in afterLayer) {\n if (!afterLayer.hasOwnProperty(prop) || beforeLayer.hasOwnProperty(prop)) continue;\n if (prop === 'layout' || prop === 'paint' || prop === 'filter' ||\n prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom') continue;\n if (prop.indexOf('paint.') === 0) {\n diffLayerPropertyChanges(beforeLayer[prop], afterLayer[prop], commands, layerId, prop.slice(6), operations.setPaintProperty);\n } else if (!isEqual(beforeLayer[prop], afterLayer[prop])) {\n commands.push({command: operations.setLayerProperty, args: [layerId, prop, afterLayer[prop]]});\n }\n }\n }\n}\n\n/**\n * Diff two stylesheet\n *\n * Creates semanticly aware diffs that can easily be applied at runtime.\n * Operations produced by the diff closely resemble the mapbox-gl-js API. Any\n * error creating the diff will fall back to the 'setStyle' operation.\n *\n * Example diff:\n * [\n * { command: 'setConstant', args: ['@water', '#0000FF'] },\n * { command: 'setPaintProperty', args: ['background', 'background-color', 'black'] }\n * ]\n *\n * @private\n * @param {*} [before] stylesheet to compare from\n * @param {*} after stylesheet to compare to\n * @returns Array list of changes\n */\nfunction diffStyles(before, after) {\n if (!before) return [{command: operations.setStyle, args: [after]}];\n\n let commands = [];\n\n try {\n // Handle changes to top-level properties\n if (!isEqual(before.version, after.version)) {\n return [{command: operations.setStyle, args: [after]}];\n }\n if (!isEqual(before.center, after.center)) {\n commands.push({command: operations.setCenter, args: [after.center]});\n }\n if (!isEqual(before.zoom, after.zoom)) {\n commands.push({command: operations.setZoom, args: [after.zoom]});\n }\n if (!isEqual(before.bearing, after.bearing)) {\n commands.push({command: operations.setBearing, args: [after.bearing]});\n }\n if (!isEqual(before.pitch, after.pitch)) {\n commands.push({command: operations.setPitch, args: [after.pitch]});\n }\n if (!isEqual(before.sprite, after.sprite)) {\n commands.push({command: operations.setSprite, args: [after.sprite]});\n }\n if (!isEqual(before.glyphs, after.glyphs)) {\n commands.push({command: operations.setGlyphs, args: [after.glyphs]});\n }\n if (!isEqual(before.transition, after.transition)) {\n commands.push({command: operations.setTransition, args: [after.transition]});\n }\n if (!isEqual(before.light, after.light)) {\n commands.push({command: operations.setLight, args: [after.light]});\n }\n\n // Handle changes to `sources`\n // If a source is to be removed, we also--before the removeSource\n // command--need to remove all the style layers that depend on it.\n const sourcesRemoved = {};\n\n // First collect the {add,remove}Source commands\n const removeOrAddSourceCommands = [];\n diffSources(before.sources, after.sources, removeOrAddSourceCommands, sourcesRemoved);\n\n // Push a removeLayer command for each style layer that depends on a\n // source that's being removed.\n // Also, exclude any such layers them from the input to `diffLayers`\n // below, so that diffLayers produces the appropriate `addLayers`\n // command\n const beforeLayers = [];\n if (before.layers) {\n before.layers.forEach((layer) => {\n if (sourcesRemoved[layer.source]) {\n commands.push({command: operations.removeLayer, args: [layer.id]});\n } else {\n beforeLayers.push(layer);\n }\n });\n }\n\n // Remove the terrain if the source for that terrain is being removed\n let beforeTerrain = before.terrain;\n if (beforeTerrain) {\n if (sourcesRemoved[beforeTerrain.source]) {\n commands.push({command: operations.setTerrain, args: [undefined]});\n beforeTerrain = undefined;\n }\n }\n\n commands = commands.concat(removeOrAddSourceCommands);\n\n // Even though terrain is a top-level property\n // Its like a layer in the sense that it depends on a source being present.\n if (!isEqual(beforeTerrain, after.terrain)) {\n commands.push({command: operations.setTerrain, args: [after.terrain]});\n }\n\n // Handle changes to `layers`\n diffLayers(beforeLayers, after.layers, commands);\n\n } catch (e) {\n // fall back to setStyle\n console.warn('Unable to compute style diff:', e);\n commands = [{command: operations.setStyle, args: [after]}];\n }\n\n return commands;\n}\n\nexport default diffStyles;\nexport {operations};\n","// @flow\n\n// Note: Do not inherit from Error. It breaks when transpiling to ES5.\n\nexport default class ValidationError {\n message: string;\n identifier: ?string;\n line: ?number;\n\n constructor(key: ?string, value: ?{ __line__: number }, message: string, identifier: ?string) {\n this.message = (key ? `${key}: ` : '') + message;\n if (identifier) this.identifier = identifier;\n\n if (value !== null && value !== undefined && value.__line__) {\n this.line = value.__line__;\n }\n }\n}\n","// @flow\n\n// Note: Do not inherit from Error. It breaks when transpiling to ES5.\n\nexport default class ParsingError {\n message: string;\n error: Error;\n line: number;\n\n constructor(error: Error) {\n this.error = error;\n this.message = error.message;\n const match = error.message.match(/line (\\d+)/);\n this.line = match ? parseInt(match[1], 10) : 0;\n }\n}\n","\nimport ValidationError from '../error/validation_error';\n\nexport default function validateConstants(options) {\n const key = options.key;\n const constants = options.value;\n\n if (constants) {\n return [new ValidationError(key, constants, 'constants have been deprecated as of v8')];\n } else {\n return [];\n }\n}\n","// @flow\n\n// Turn jsonlint-lines-primitives objects into primitive objects\nexport function unbundle(value: mixed) {\n if (value instanceof Number || value instanceof String || value instanceof Boolean) {\n return value.valueOf();\n } else {\n return value;\n }\n}\n\nexport function deepUnbundle(value: mixed): mixed {\n if (Array.isArray(value)) {\n return value.map(deepUnbundle);\n } else if (value instanceof Object && !(value instanceof Number || value instanceof String || value instanceof Boolean)) {\n const unbundledValue: { [key: string]: mixed } = {};\n for (const key in value) {\n unbundledValue[key] = deepUnbundle(value[key]);\n }\n return unbundledValue;\n }\n\n return unbundle(value);\n}\n","\nimport ValidationError from '../error/validation_error';\nimport getType from '../util/get_type';\nimport validateSpec from './validate';\n\nexport default function validateObject(options) {\n const key = options.key;\n const object = options.value;\n const elementSpecs = options.valueSpec || {};\n const elementValidators = options.objectElementValidators || {};\n const style = options.style;\n const styleSpec = options.styleSpec;\n let errors = [];\n\n const type = getType(object);\n if (type !== 'object') {\n return [new ValidationError(key, object, `object expected, ${type} found`)];\n }\n\n for (const objectKey in object) {\n const elementSpecKey = objectKey.split('.')[0]; // treat 'paint.*' as 'paint'\n const elementSpec = elementSpecs[elementSpecKey] || elementSpecs['*'];\n\n let validateElement;\n if (elementValidators[elementSpecKey]) {\n validateElement = elementValidators[elementSpecKey];\n } else if (elementSpecs[elementSpecKey]) {\n validateElement = validateSpec;\n } else if (elementValidators['*']) {\n validateElement = elementValidators['*'];\n } else if (elementSpecs['*']) {\n validateElement = validateSpec;\n } else {\n errors.push(new ValidationError(key, object[objectKey], `unknown property \"${objectKey}\"`));\n continue;\n }\n\n errors = errors.concat(validateElement({\n key: (key ? `${key}.` : key) + objectKey,\n value: object[objectKey],\n valueSpec: elementSpec,\n style,\n styleSpec,\n object,\n objectKey\n }, object));\n }\n\n for (const elementSpecKey in elementSpecs) {\n // Don't check `required` when there's a custom validator for that property.\n if (elementValidators[elementSpecKey]) {\n continue;\n }\n\n if (elementSpecs[elementSpecKey].required && elementSpecs[elementSpecKey]['default'] === undefined && object[elementSpecKey] === undefined) {\n errors.push(new ValidationError(key, object, `missing required property \"${elementSpecKey}\"`));\n }\n }\n\n return errors;\n}\n","\nimport getType from '../util/get_type';\nimport validate from './validate';\nimport ValidationError from '../error/validation_error';\n\nexport default function validateArray(options) {\n const array = options.value;\n const arraySpec = options.valueSpec;\n const style = options.style;\n const styleSpec = options.styleSpec;\n const key = options.key;\n const validateArrayElement = options.arrayElementValidator || validate;\n\n if (getType(array) !== 'array') {\n return [new ValidationError(key, array, `array expected, ${getType(array)} found`)];\n }\n\n if (arraySpec.length && array.length !== arraySpec.length) {\n return [new ValidationError(key, array, `array length ${arraySpec.length} expected, length ${array.length} found`)];\n }\n\n if (arraySpec['min-length'] && array.length < arraySpec['min-length']) {\n return [new ValidationError(key, array, `array length at least ${arraySpec['min-length']} expected, length ${array.length} found`)];\n }\n\n let arrayElementSpec = {\n \"type\": arraySpec.value,\n \"values\": arraySpec.values\n };\n\n if (styleSpec.$version < 7) {\n arrayElementSpec.function = arraySpec.function;\n }\n\n if (getType(arraySpec.value) === 'object') {\n arrayElementSpec = arraySpec.value;\n }\n\n let errors = [];\n for (let i = 0; i < array.length; i++) {\n errors = errors.concat(validateArrayElement({\n array,\n arrayIndex: i,\n value: array[i],\n valueSpec: arrayElementSpec,\n style,\n styleSpec,\n key: `${key}[${i}]`\n }));\n }\n return errors;\n}\n","\nimport getType from '../util/get_type';\nimport ValidationError from '../error/validation_error';\n\nexport default function validateNumber(options) {\n const key = options.key;\n const value = options.value;\n const valueSpec = options.valueSpec;\n let type = getType(value);\n\n // eslint-disable-next-line no-self-compare\n if (type === 'number' && value !== value) {\n type = 'NaN';\n }\n\n if (type !== 'number') {\n return [new ValidationError(key, value, `number expected, ${type} found`)];\n }\n\n if ('minimum' in valueSpec && value < valueSpec.minimum) {\n return [new ValidationError(key, value, `${value} is less than the minimum value ${valueSpec.minimum}`)];\n }\n\n if ('maximum' in valueSpec && value > valueSpec.maximum) {\n return [new ValidationError(key, value, `${value} is greater than the maximum value ${valueSpec.maximum}`)];\n }\n\n return [];\n}\n","\nimport ValidationError from '../error/validation_error';\nimport getType from '../util/get_type';\nimport validate from './validate';\nimport validateObject from './validate_object';\nimport validateArray from './validate_array';\nimport validateNumber from './validate_number';\nimport {isExpression} from '../expression';\nimport {unbundle, deepUnbundle} from '../util/unbundle_jsonlint';\nimport {\n supportsPropertyExpression,\n supportsZoomExpression,\n supportsInterpolation\n} from '../util/properties';\n\nexport default function validateFunction(options) {\n const functionValueSpec = options.valueSpec;\n const functionType = unbundle(options.value.type);\n let stopKeyType;\n let stopDomainValues = {};\n let previousStopDomainValue;\n let previousStopDomainZoom;\n\n const isZoomFunction = functionType !== 'categorical' && options.value.property === undefined;\n const isPropertyFunction = !isZoomFunction;\n const isZoomAndPropertyFunction =\n getType(options.value.stops) === 'array' &&\n getType(options.value.stops[0]) === 'array' &&\n getType(options.value.stops[0][0]) === 'object';\n\n const errors = validateObject({\n key: options.key,\n value: options.value,\n valueSpec: options.styleSpec.function,\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {\n stops: validateFunctionStops,\n default: validateFunctionDefault\n }\n });\n\n if (functionType === 'identity' && isZoomFunction) {\n errors.push(new ValidationError(options.key, options.value, 'missing required property \"property\"'));\n }\n\n if (functionType !== 'identity' && !options.value.stops) {\n errors.push(new ValidationError(options.key, options.value, 'missing required property \"stops\"'));\n }\n\n if (functionType === 'exponential' && options.valueSpec.expression && !supportsInterpolation(options.valueSpec)) {\n errors.push(new ValidationError(options.key, options.value, 'exponential functions not supported'));\n }\n\n if (options.styleSpec.$version >= 8) {\n if (isPropertyFunction && !supportsPropertyExpression(options.valueSpec)) {\n errors.push(new ValidationError(options.key, options.value, 'property functions not supported'));\n } else if (isZoomFunction && !supportsZoomExpression(options.valueSpec)) {\n errors.push(new ValidationError(options.key, options.value, 'zoom functions not supported'));\n }\n }\n\n if ((functionType === 'categorical' || isZoomAndPropertyFunction) && options.value.property === undefined) {\n errors.push(new ValidationError(options.key, options.value, '\"property\" property is required'));\n }\n\n return errors;\n\n function validateFunctionStops(options) {\n if (functionType === 'identity') {\n return [new ValidationError(options.key, options.value, 'identity function may not have a \"stops\" property')];\n }\n\n let errors = [];\n const value = options.value;\n\n errors = errors.concat(validateArray({\n key: options.key,\n value,\n valueSpec: options.valueSpec,\n style: options.style,\n styleSpec: options.styleSpec,\n arrayElementValidator: validateFunctionStop\n }));\n\n if (getType(value) === 'array' && value.length === 0) {\n errors.push(new ValidationError(options.key, value, 'array must have at least one stop'));\n }\n\n return errors;\n }\n\n function validateFunctionStop(options) {\n let errors = [];\n const value = options.value;\n const key = options.key;\n\n if (getType(value) !== 'array') {\n return [new ValidationError(key, value, `array expected, ${getType(value)} found`)];\n }\n\n if (value.length !== 2) {\n return [new ValidationError(key, value, `array length 2 expected, length ${value.length} found`)];\n }\n\n if (isZoomAndPropertyFunction) {\n if (getType(value[0]) !== 'object') {\n return [new ValidationError(key, value, `object expected, ${getType(value[0])} found`)];\n }\n if (value[0].zoom === undefined) {\n return [new ValidationError(key, value, 'object stop key must have zoom')];\n }\n if (value[0].value === undefined) {\n return [new ValidationError(key, value, 'object stop key must have value')];\n }\n if (previousStopDomainZoom && previousStopDomainZoom > unbundle(value[0].zoom)) {\n return [new ValidationError(key, value[0].zoom, 'stop zoom values must appear in ascending order')];\n }\n if (unbundle(value[0].zoom) !== previousStopDomainZoom) {\n previousStopDomainZoom = unbundle(value[0].zoom);\n previousStopDomainValue = undefined;\n stopDomainValues = {};\n }\n errors = errors.concat(validateObject({\n key: `${key}[0]`,\n value: value[0],\n valueSpec: {zoom: {}},\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {zoom: validateNumber, value: validateStopDomainValue}\n }));\n } else {\n errors = errors.concat(validateStopDomainValue({\n key: `${key}[0]`,\n value: value[0],\n valueSpec: {},\n style: options.style,\n styleSpec: options.styleSpec\n }, value));\n }\n\n if (isExpression(deepUnbundle(value[1]))) {\n return errors.concat([new ValidationError(`${key}[1]`, value[1], 'expressions are not allowed in function stops.')]);\n }\n\n return errors.concat(validate({\n key: `${key}[1]`,\n value: value[1],\n valueSpec: functionValueSpec,\n style: options.style,\n styleSpec: options.styleSpec\n }));\n }\n\n function validateStopDomainValue(options, stop) {\n const type = getType(options.value);\n const value = unbundle(options.value);\n\n const reportValue = options.value !== null ? options.value : stop;\n\n if (!stopKeyType) {\n stopKeyType = type;\n } else if (type !== stopKeyType) {\n return [new ValidationError(options.key, reportValue, `${type} stop domain type must match previous stop domain type ${stopKeyType}`)];\n }\n\n if (type !== 'number' && type !== 'string' && type !== 'boolean') {\n return [new ValidationError(options.key, reportValue, 'stop domain value must be a number, string, or boolean')];\n }\n\n if (type !== 'number' && functionType !== 'categorical') {\n let message = `number expected, ${type} found`;\n if (supportsPropertyExpression(functionValueSpec) && functionType === undefined) {\n message += '\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.';\n }\n return [new ValidationError(options.key, reportValue, message)];\n }\n\n if (functionType === 'categorical' && type === 'number' && (!isFinite(value) || Math.floor(value) !== value)) {\n return [new ValidationError(options.key, reportValue, `integer expected, found ${value}`)];\n }\n\n if (functionType !== 'categorical' && type === 'number' && previousStopDomainValue !== undefined && value < previousStopDomainValue) {\n return [new ValidationError(options.key, reportValue, 'stop domain values must appear in ascending order')];\n } else {\n previousStopDomainValue = value;\n }\n\n if (functionType === 'categorical' && value in stopDomainValues) {\n return [new ValidationError(options.key, reportValue, 'stop domain values must be unique')];\n } else {\n stopDomainValues[value] = true;\n }\n\n return [];\n }\n\n function validateFunctionDefault(options) {\n return validate({\n key: options.key,\n value: options.value,\n valueSpec: functionValueSpec,\n style: options.style,\n styleSpec: options.styleSpec\n });\n }\n}\n","// @flow\n\nimport ValidationError from '../error/validation_error';\n\nimport {createExpression, createPropertyExpression} from '../expression';\nimport {deepUnbundle} from '../util/unbundle_jsonlint';\nimport {isStateConstant, isGlobalPropertyConstant, isFeatureConstant} from '../expression/is_constant';\n\nexport default function validateExpression(options: any): Array<ValidationError> {\n const expression = (options.expressionContext === 'property' ? createPropertyExpression : createExpression)(deepUnbundle(options.value), options.valueSpec);\n if (expression.result === 'error') {\n return expression.value.map((error) => {\n return new ValidationError(`${options.key}${error.key}`, options.value, error.message);\n });\n }\n\n const expressionObj = (expression.value: any).expression || (expression.value: any)._styleExpression.expression;\n\n if (options.expressionContext === 'property' && (options.propertyKey === 'text-font') &&\n !expressionObj.outputDefined()) {\n return [new ValidationError(options.key, options.value, `Invalid data expression for \"${options.propertyKey}\". Output values must be contained as literals within the expression.`)];\n }\n\n if (options.expressionContext === 'property' && options.propertyType === 'layout' &&\n (!isStateConstant(expressionObj))) {\n return [new ValidationError(options.key, options.value, '\"feature-state\" data expressions are not supported with layout properties.')];\n }\n\n if (options.expressionContext === 'filter' && !isStateConstant(expressionObj)) {\n return [new ValidationError(options.key, options.value, '\"feature-state\" data expressions are not supported with filters.')];\n }\n\n if (options.expressionContext && options.expressionContext.indexOf('cluster') === 0) {\n if (!isGlobalPropertyConstant(expressionObj, ['zoom', 'feature-state'])) {\n return [new ValidationError(options.key, options.value, '\"zoom\" and \"feature-state\" expressions are not supported with cluster properties.')];\n }\n if (options.expressionContext === 'cluster-initial' && !isFeatureConstant(expressionObj)) {\n return [new ValidationError(options.key, options.value, 'Feature data expressions are not supported with initial expression part of cluster properties.')];\n }\n }\n\n return [];\n}\n","\nimport getType from '../util/get_type';\nimport ValidationError from '../error/validation_error';\n\nexport default function validateBoolean(options) {\n const value = options.value;\n const key = options.key;\n const type = getType(value);\n\n if (type !== 'boolean') {\n return [new ValidationError(key, value, `boolean expected, ${type} found`)];\n }\n\n return [];\n}\n","\nimport ValidationError from '../error/validation_error';\nimport getType from '../util/get_type';\nimport {parseCSSColor} from 'csscolorparser';\n\nexport default function validateColor(options) {\n const key = options.key;\n const value = options.value;\n const type = getType(value);\n\n if (type !== 'string') {\n return [new ValidationError(key, value, `color expected, ${type} found`)];\n }\n\n if (parseCSSColor(value) === null) {\n return [new ValidationError(key, value, `color expected, \"${value}\" found`)];\n }\n\n return [];\n}\n","\nimport ValidationError from '../error/validation_error';\nimport {unbundle} from '../util/unbundle_jsonlint';\n\nexport default function validateEnum(options) {\n const key = options.key;\n const value = options.value;\n const valueSpec = options.valueSpec;\n const errors = [];\n\n if (Array.isArray(valueSpec.values)) { // <=v7\n if (valueSpec.values.indexOf(unbundle(value)) === -1) {\n errors.push(new ValidationError(key, value, `expected one of [${valueSpec.values.join(', ')}], ${JSON.stringify(value)} found`));\n }\n } else { // >=v8\n if (Object.keys(valueSpec.values).indexOf(unbundle(value)) === -1) {\n errors.push(new ValidationError(key, value, `expected one of [${Object.keys(valueSpec.values).join(', ')}], ${JSON.stringify(value)} found`));\n }\n }\n return errors;\n}\n","\nimport ValidationError from '../error/validation_error';\nimport validateExpression from './validate_expression';\nimport validateEnum from './validate_enum';\nimport getType from '../util/get_type';\nimport {unbundle, deepUnbundle} from '../util/unbundle_jsonlint';\nimport extend from '../util/extend';\nimport {isExpressionFilter} from '../feature_filter';\n\nexport default function validateFilter(options) {\n if (isExpressionFilter(deepUnbundle(options.value))) {\n return validateExpression(extend({}, options, {\n expressionContext: 'filter',\n valueSpec: {value: 'boolean'}\n }));\n } else {\n return validateNonExpressionFilter(options);\n }\n}\n\nfunction validateNonExpressionFilter(options) {\n const value = options.value;\n const key = options.key;\n\n if (getType(value) !== 'array') {\n return [new ValidationError(key, value, `array expected, ${getType(value)} found`)];\n }\n\n const styleSpec = options.styleSpec;\n let type;\n\n let errors = [];\n\n if (value.length < 1) {\n return [new ValidationError(key, value, 'filter array must have at least 1 element')];\n }\n\n errors = errors.concat(validateEnum({\n key: `${key}[0]`,\n value: value[0],\n valueSpec: styleSpec.filter_operator,\n style: options.style,\n styleSpec: options.styleSpec\n }));\n\n switch (unbundle(value[0])) {\n case '<':\n case '<=':\n case '>':\n case '>=':\n if (value.length >= 2 && unbundle(value[1]) === '$type') {\n errors.push(new ValidationError(key, value, `\"$type\" cannot be use with operator \"${value[0]}\"`));\n }\n /* falls through */\n case '==':\n case '!=':\n if (value.length !== 3) {\n errors.push(new ValidationError(key, value, `filter array for operator \"${value[0]}\" must have 3 elements`));\n }\n /* falls through */\n case 'in':\n case '!in':\n if (value.length >= 2) {\n type = getType(value[1]);\n if (type !== 'string') {\n errors.push(new ValidationError(`${key}[1]`, value[1], `string expected, ${type} found`));\n }\n }\n for (let i = 2; i < value.length; i++) {\n type = getType(value[i]);\n if (unbundle(value[1]) === '$type') {\n errors = errors.concat(validateEnum({\n key: `${key}[${i}]`,\n value: value[i],\n valueSpec: styleSpec.geometry_type,\n style: options.style,\n styleSpec: options.styleSpec\n }));\n } else if (type !== 'string' && type !== 'number' && type !== 'boolean') {\n errors.push(new ValidationError(`${key}[${i}]`, value[i], `string, number, or boolean expected, ${type} found`));\n }\n }\n break;\n\n case 'any':\n case 'all':\n case 'none':\n for (let i = 1; i < value.length; i++) {\n errors = errors.concat(validateNonExpressionFilter({\n key: `${key}[${i}]`,\n value: value[i],\n style: options.style,\n styleSpec: options.styleSpec\n }));\n }\n break;\n\n case 'has':\n case '!has':\n type = getType(value[1]);\n if (value.length !== 2) {\n errors.push(new ValidationError(key, value, `filter array for \"${value[0]}\" operator must have 2 elements`));\n } else if (type !== 'string') {\n errors.push(new ValidationError(`${key}[1]`, value[1], `string expected, ${type} found`));\n }\n break;\n case 'within':\n type = getType(value[1]);\n if (value.length !== 2) {\n errors.push(new ValidationError(key, value, `filter array for \"${value[0]}\" operator must have 2 elements`));\n } else if (type !== 'object') {\n errors.push(new ValidationError(`${key}[1]`, value[1], `object expected, ${type} found`));\n }\n break;\n }\n return errors;\n}\n","\nimport validate from './validate';\nimport ValidationError from '../error/validation_error';\nimport getType from '../util/get_type';\nimport {isFunction} from '../function';\nimport {unbundle, deepUnbundle} from '../util/unbundle_jsonlint';\nimport {supportsPropertyExpression} from '../util/properties';\n\nexport default function validateProperty(options, propertyType) {\n const key = options.key;\n const style = options.style;\n const styleSpec = options.styleSpec;\n const value = options.value;\n const propertyKey = options.objectKey;\n const layerSpec = styleSpec[`${propertyType}_${options.layerType}`];\n\n if (!layerSpec) return [];\n\n const transitionMatch = propertyKey.match(/^(.*)-transition$/);\n if (propertyType === 'paint' && transitionMatch && layerSpec[transitionMatch[1]] && layerSpec[transitionMatch[1]].transition) {\n return validate({\n key,\n value,\n valueSpec: styleSpec.transition,\n style,\n styleSpec\n });\n }\n\n const valueSpec = options.valueSpec || layerSpec[propertyKey];\n if (!valueSpec) {\n return [new ValidationError(key, value, `unknown property \"${propertyKey}\"`)];\n }\n\n let tokenMatch;\n if (getType(value) === 'string' && supportsPropertyExpression(valueSpec) && !valueSpec.tokens && (tokenMatch = /^{([^}]+)}$/.exec(value))) {\n return [new ValidationError(\n key, value,\n `\"${propertyKey}\" does not support interpolation syntax\\n` +\n `Use an identity property function instead: \\`{ \"type\": \"identity\", \"property\": ${JSON.stringify(tokenMatch[1])} }\\`.`)];\n }\n\n const errors = [];\n\n if (options.layerType === 'symbol') {\n if (propertyKey === 'text-field' && style && !style.glyphs) {\n errors.push(new ValidationError(key, value, 'use of \"text-field\" requires a style \"glyphs\" property'));\n }\n if (propertyKey === 'text-font' && isFunction(deepUnbundle(value)) && unbundle(value.type) === 'identity') {\n errors.push(new ValidationError(key, value, '\"text-font\" does not support identity functions'));\n }\n }\n\n return errors.concat(validate({\n key: options.key,\n value,\n valueSpec,\n style,\n styleSpec,\n expressionContext: 'property',\n propertyType,\n propertyKey\n }));\n}\n","\nimport validateProperty from './validate_property';\n\nexport default function validatePaintProperty(options) {\n return validateProperty(options, 'paint');\n}\n","\nimport validateProperty from './validate_property';\n\nexport default function validateLayoutProperty(options) {\n return validateProperty(options, 'layout');\n}\n","\nimport ValidationError from '../error/validation_error';\nimport {unbundle} from '../util/unbundle_jsonlint';\nimport validateObject from './validate_object';\nimport validateFilter from './validate_filter';\nimport validatePaintProperty from './validate_paint_property';\nimport validateLayoutProperty from './validate_layout_property';\nimport validateSpec from './validate';\nimport extend from '../util/extend';\n\nexport default function validateLayer(options) {\n let errors = [];\n\n const layer = options.value;\n const key = options.key;\n const style = options.style;\n const styleSpec = options.styleSpec;\n\n if (!layer.type && !layer.ref) {\n errors.push(new ValidationError(key, layer, 'either \"type\" or \"ref\" is required'));\n }\n let type = unbundle(layer.type);\n const ref = unbundle(layer.ref);\n\n if (layer.id) {\n const layerId = unbundle(layer.id);\n for (let i = 0; i < options.arrayIndex; i++) {\n const otherLayer = style.layers[i];\n if (unbundle(otherLayer.id) === layerId) {\n errors.push(new ValidationError(key, layer.id, `duplicate layer id \"${layer.id}\", previously used at line ${otherLayer.id.__line__}`));\n }\n }\n }\n\n if ('ref' in layer) {\n ['type', 'source', 'source-layer', 'filter', 'layout'].forEach((p) => {\n if (p in layer) {\n errors.push(new ValidationError(key, layer[p], `\"${p}\" is prohibited for ref layers`));\n }\n });\n\n let parent;\n\n style.layers.forEach((layer) => {\n if (unbundle(layer.id) === ref) parent = layer;\n });\n\n if (!parent) {\n errors.push(new ValidationError(key, layer.ref, `ref layer \"${ref}\" not found`));\n } else if (parent.ref) {\n errors.push(new ValidationError(key, layer.ref, 'ref cannot reference another ref layer'));\n } else {\n type = unbundle(parent.type);\n }\n } else if (!(type === 'background' || type === 'sky')) {\n if (!layer.source) {\n errors.push(new ValidationError(key, layer, 'missing required property \"source\"'));\n } else {\n const source = style.sources && style.sources[layer.source];\n const sourceType = source && unbundle(source.type);\n if (!source) {\n errors.push(new ValidationError(key, layer.source, `source \"${layer.source}\" not found`));\n } else if (sourceType === 'vector' && type === 'raster') {\n errors.push(new ValidationError(key, layer.source, `layer \"${layer.id}\" requires a raster source`));\n } else if (sourceType === 'raster' && type !== 'raster') {\n errors.push(new ValidationError(key, layer.source, `layer \"${layer.id}\" requires a vector source`));\n } else if (sourceType === 'vector' && !layer['source-layer']) {\n errors.push(new ValidationError(key, layer, `layer \"${layer.id}\" must specify a \"source-layer\"`));\n } else if (sourceType === 'raster-dem' && type !== 'hillshade') {\n errors.push(new ValidationError(key, layer.source, 'raster-dem source can only be used with layer type \\'hillshade\\'.'));\n } else if (type === 'line' && layer.paint && layer.paint['line-gradient'] &&\n (sourceType !== 'geojson' || !source.lineMetrics)) {\n errors.push(new ValidationError(key, layer, `layer \"${layer.id}\" specifies a line-gradient, which requires a GeoJSON source with \\`lineMetrics\\` enabled.`));\n }\n }\n }\n\n errors = errors.concat(validateObject({\n key,\n value: layer,\n valueSpec: styleSpec.layer,\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {\n '*'() {\n return [];\n },\n // We don't want to enforce the spec's `\"requires\": true` for backward compatibility with refs;\n // the actual requirement is validated above. See https://github.com/mapbox/mapbox-gl-js/issues/5772.\n type() {\n return validateSpec({\n key: `${key}.type`,\n value: layer.type,\n valueSpec: styleSpec.layer.type,\n style: options.style,\n styleSpec: options.styleSpec,\n object: layer,\n objectKey: 'type'\n });\n },\n filter: validateFilter,\n layout(options) {\n return validateObject({\n layer,\n key: options.key,\n value: options.value,\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {\n '*'(options) {\n return validateLayoutProperty(extend({layerType: type}, options));\n }\n }\n });\n },\n paint(options) {\n return validateObject({\n layer,\n key: options.key,\n value: options.value,\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {\n '*'(options) {\n return validatePaintProperty(extend({layerType: type}, options));\n }\n }\n });\n }\n }\n }));\n\n return errors;\n}\n","\nimport getType from '../util/get_type';\nimport ValidationError from '../error/validation_error';\n\nexport default function validateString(options) {\n const value = options.value;\n const key = options.key;\n const type = getType(value);\n\n if (type !== 'string') {\n return [new ValidationError(key, value, `string expected, ${type} found`)];\n }\n\n return [];\n}\n","\nimport ValidationError from '../error/validation_error';\nimport {unbundle} from '../util/unbundle_jsonlint';\nimport validateObject from './validate_object';\nimport validateEnum from './validate_enum';\nimport validateExpression from './validate_expression';\nimport validateString from './validate_string';\nimport getType from '../util/get_type';\n\nconst objectElementValidators = {\n promoteId: validatePromoteId\n};\n\nexport default function validateSource(options) {\n const value = options.value;\n const key = options.key;\n const styleSpec = options.styleSpec;\n const style = options.style;\n\n if (!value.type) {\n return [new ValidationError(key, value, '\"type\" is required')];\n }\n\n const type = unbundle(value.type);\n let errors;\n\n switch (type) {\n case 'vector':\n case 'raster':\n case 'raster-dem':\n errors = validateObject({\n key,\n value,\n valueSpec: styleSpec[`source_${type.replace('-', '_')}`],\n style: options.style,\n styleSpec,\n objectElementValidators\n });\n return errors;\n\n case 'geojson':\n errors = validateObject({\n key,\n value,\n valueSpec: styleSpec.source_geojson,\n style,\n styleSpec,\n objectElementValidators\n });\n if (value.cluster) {\n for (const prop in value.clusterProperties) {\n const [operator, mapExpr] = value.clusterProperties[prop];\n const reduceExpr = typeof operator === 'string' ? [operator, ['accumulated'], ['get', prop]] : operator;\n\n errors.push(...validateExpression({\n key: `${key}.${prop}.map`,\n value: mapExpr,\n expressionContext: 'cluster-map'\n }));\n errors.push(...validateExpression({\n key: `${key}.${prop}.reduce`,\n value: reduceExpr,\n expressionContext: 'cluster-reduce'\n }));\n }\n }\n return errors;\n\n case 'video':\n return validateObject({\n key,\n value,\n valueSpec: styleSpec.source_video,\n style,\n styleSpec\n });\n\n case 'image':\n return validateObject({\n key,\n value,\n valueSpec: styleSpec.source_image,\n style,\n styleSpec\n });\n\n case 'canvas':\n return [new ValidationError(key, null, `Please use runtime APIs to add canvas sources, rather than including them in stylesheets.`, 'source.canvas')];\n\n default:\n return validateEnum({\n key: `${key}.type`,\n value: value.type,\n valueSpec: {values: ['vector', 'raster', 'raster-dem', 'geojson', 'video', 'image']},\n style,\n styleSpec\n });\n }\n}\n\nfunction validatePromoteId({key, value}) {\n if (getType(value) === 'string') {\n return validateString({key, value});\n } else {\n const errors = [];\n for (const prop in value) {\n errors.push(...validateString({key: `${key}.${prop}`, value: value[prop]}));\n }\n return errors;\n }\n}\n","\nimport ValidationError from '../error/validation_error';\nimport getType from '../util/get_type';\nimport validate from './validate';\n\nexport default function validateLight(options) {\n const light = options.value;\n const styleSpec = options.styleSpec;\n const lightSpec = styleSpec.light;\n const style = options.style;\n\n let errors = [];\n\n const rootType = getType(light);\n if (light === undefined) {\n return errors;\n } else if (rootType !== 'object') {\n errors = errors.concat([new ValidationError('light', light, `object expected, ${rootType} found`)]);\n return errors;\n }\n\n for (const key in light) {\n const transitionMatch = key.match(/^(.*)-transition$/);\n\n if (transitionMatch && lightSpec[transitionMatch[1]] && lightSpec[transitionMatch[1]].transition) {\n errors = errors.concat(validate({\n key,\n value: light[key],\n valueSpec: styleSpec.transition,\n style,\n styleSpec\n }));\n } else if (lightSpec[key]) {\n errors = errors.concat(validate({\n key,\n value: light[key],\n valueSpec: lightSpec[key],\n style,\n styleSpec\n }));\n } else {\n errors = errors.concat([new ValidationError(key, light[key], `unknown property \"${key}\"`)]);\n }\n }\n\n return errors;\n}\n","\nimport ValidationError from '../error/validation_error';\nimport validate from './validate';\nimport getType from '../util/get_type';\nimport {unbundle} from '../util/unbundle_jsonlint';\n\nexport default function validateTerrain(options) {\n const terrain = options.value;\n const key = options.key;\n const style = options.style;\n const styleSpec = options.styleSpec;\n const terrainSpec = styleSpec.terrain;\n let errors = [];\n\n const rootType = getType(terrain);\n if (terrain === undefined) {\n return errors;\n } else if (rootType !== 'object') {\n errors = errors.concat([new ValidationError('terrain', terrain, `object expected, ${rootType} found`)]);\n return errors;\n }\n\n for (const key in terrain) {\n const transitionMatch = key.match(/^(.*)-transition$/);\n\n if (transitionMatch && terrainSpec[transitionMatch[1]] && terrainSpec[transitionMatch[1]].transition) {\n errors = errors.concat(validate({\n key,\n value: terrain[key],\n valueSpec: styleSpec.transition,\n style,\n styleSpec\n }));\n } else if (terrainSpec[key]) {\n errors = errors.concat(validate({\n key,\n value: terrain[key],\n valueSpec: terrainSpec[key],\n style,\n styleSpec\n }));\n } else {\n errors = errors.concat([new ValidationError(key, terrain[key], `unknown property \"${key}\"`)]);\n }\n }\n\n if (!terrain.source) {\n errors.push(new ValidationError(key, terrain, `terrain is missing required property \"source\"`));\n } else {\n const source = style.sources && style.sources[terrain.source];\n const sourceType = source && unbundle(source.type);\n if (!source) {\n errors.push(new ValidationError(key, terrain.source, `source \"${terrain.source}\" not found`));\n } else if (sourceType !== 'raster-dem') {\n errors.push(new ValidationError(key, terrain.source, `terrain cannot be used with a source of type ${sourceType}, it only be used with a \"raster-dem\" source type`));\n }\n }\n\n return errors;\n}\n","// @flow\nimport validateExpression from './validate_expression';\nimport validateString from './validate_string';\n\nexport default function validateFormatted(options: any) {\n if (validateString(options).length === 0) {\n return [];\n }\n\n return validateExpression(options);\n}\n","// @flow\nimport validateExpression from './validate_expression';\nimport validateString from './validate_string';\n\nexport default function validateImage(options: any) {\n if (validateString(options).length === 0) {\n return [];\n }\n\n return validateExpression(options);\n}\n","\nimport extend from '../util/extend';\nimport {unbundle, deepUnbundle} from '../util/unbundle_jsonlint';\nimport {isExpression} from '../expression';\nimport {isFunction} from '../function';\n\nimport validateFunction from './validate_function';\nimport validateExpression from './validate_expression';\nimport validateObject from './validate_object';\nimport validateArray from './validate_array';\nimport validateBoolean from './validate_boolean';\nimport validateNumber from './validate_number';\nimport validateColor from './validate_color';\nimport validateConstants from './validate_constants';\nimport validateEnum from './validate_enum';\nimport validateFilter from './validate_filter';\nimport validateLayer from './validate_layer';\nimport validateSource from './validate_source';\nimport validateLight from './validate_light';\nimport validateTerrain from './validate_terrain';\nimport validateString from './validate_string';\nimport validateFormatted from './validate_formatted';\nimport validateImage from './validate_image';\n\nconst VALIDATORS = {\n '*'() {\n return [];\n },\n 'array': validateArray,\n 'boolean': validateBoolean,\n 'number': validateNumber,\n 'color': validateColor,\n 'constants': validateConstants,\n 'enum': validateEnum,\n 'filter': validateFilter,\n 'function': validateFunction,\n 'layer': validateLayer,\n 'object': validateObject,\n 'source': validateSource,\n 'light': validateLight,\n 'terrain': validateTerrain,\n 'string': validateString,\n 'formatted': validateFormatted,\n 'resolvedImage': validateImage\n};\n\n// Main recursive validation function. Tracks:\n//\n// - key: string representing location of validation in style tree. Used only\n// for more informative error reporting.\n// - value: current value from style being evaluated. May be anything from a\n// high level object that needs to be descended into deeper or a simple\n// scalar value.\n// - valueSpec: current spec being evaluated. Tracks value.\n// - styleSpec: current full spec being evaluated.\n\nexport default function validate(options) {\n const value = options.value;\n const valueSpec = options.valueSpec;\n const styleSpec = options.styleSpec;\n\n if (valueSpec.expression && isFunction(unbundle(value))) {\n return validateFunction(options);\n\n } else if (valueSpec.expression && isExpression(deepUnbundle(value))) {\n return validateExpression(options);\n\n } else if (valueSpec.type && VALIDATORS[valueSpec.type]) {\n return VALIDATORS[valueSpec.type](options);\n\n } else {\n const valid = validateObject(extend({}, options, {\n valueSpec: valueSpec.type ? styleSpec[valueSpec.type] : valueSpec\n }));\n return valid;\n }\n}\n","\nimport ValidationError from '../error/validation_error';\nimport validateString from './validate_string';\n\nexport default function(options) {\n const value = options.value;\n const key = options.key;\n\n const errors = validateString(options);\n if (errors.length) return errors;\n\n if (value.indexOf('{fontstack}') === -1) {\n errors.push(new ValidationError(key, value, '\"glyphs\" url must include a \"{fontstack}\" token'));\n }\n\n if (value.indexOf('{range}') === -1) {\n errors.push(new ValidationError(key, value, '\"glyphs\" url must include a \"{range}\" token'));\n }\n\n return errors;\n}\n","\nimport validateConstants from './validate/validate_constants';\nimport validate from './validate/validate';\nimport latestStyleSpec from './reference/latest';\nimport validateGlyphsURL from './validate/validate_glyphs_url';\n\nimport validateSource from './validate/validate_source';\nimport validateLight from './validate/validate_light';\nimport validateTerrain from './validate/validate_terrain';\nimport validateLayer from './validate/validate_layer';\nimport validateFilter from './validate/validate_filter';\nimport validatePaintProperty from './validate/validate_paint_property';\nimport validateLayoutProperty from './validate/validate_layout_property';\n\n/**\n * Validate a Mapbox GL style against the style specification. This entrypoint,\n * `mapbox-gl-style-spec/lib/validate_style.min`, is designed to produce as\n * small a browserify bundle as possible by omitting unnecessary functionality\n * and legacy style specifications.\n *\n * @private\n * @param {Object} style The style to be validated.\n * @param {Object} [styleSpec] The style specification to validate against.\n * If omitted, the latest style spec is used.\n * @returns {Array<ValidationError>}\n * @example\n * var validate = require('mapbox-gl-style-spec/lib/validate_style.min');\n * var errors = validate(style);\n */\nfunction validateStyleMin(style, styleSpec = latestStyleSpec) {\n\n let errors = [];\n\n errors = errors.concat(validate({\n key: '',\n value: style,\n valueSpec: styleSpec.$root,\n styleSpec,\n style,\n objectElementValidators: {\n glyphs: validateGlyphsURL,\n '*'() {\n return [];\n }\n }\n }));\n\n if (style.constants) {\n errors = errors.concat(validateConstants({\n key: 'constants',\n value: style.constants,\n style,\n styleSpec\n }));\n }\n\n return sortErrors(errors);\n}\n\nvalidateStyleMin.source = wrapCleanErrors(validateSource);\nvalidateStyleMin.light = wrapCleanErrors(validateLight);\nvalidateStyleMin.terrain = wrapCleanErrors(validateTerrain);\nvalidateStyleMin.layer = wrapCleanErrors(validateLayer);\nvalidateStyleMin.filter = wrapCleanErrors(validateFilter);\nvalidateStyleMin.paintProperty = wrapCleanErrors(validatePaintProperty);\nvalidateStyleMin.layoutProperty = wrapCleanErrors(validateLayoutProperty);\n\nfunction sortErrors(errors) {\n return [].concat(errors).sort((a, b) => {\n return a.line - b.line;\n });\n}\n\nfunction wrapCleanErrors(inner) {\n return function(...args) {\n return sortErrors(inner.apply(this, args));\n };\n}\n\nexport default validateStyleMin;\n","/* parser generated by jison 0.4.15 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,12],$V1=[1,13],$V2=[1,9],$V3=[1,10],$V4=[1,11],$V5=[1,14],$V6=[1,15],$V7=[14,18,22,24],$V8=[18,22],$V9=[22,24];\nvar parser = {trace: function trace() { },\nyy: {},\nsymbols_: {\"error\":2,\"JSONString\":3,\"STRING\":4,\"JSONNumber\":5,\"NUMBER\":6,\"JSONNullLiteral\":7,\"NULL\":8,\"JSONBooleanLiteral\":9,\"TRUE\":10,\"FALSE\":11,\"JSONText\":12,\"JSONValue\":13,\"EOF\":14,\"JSONObject\":15,\"JSONArray\":16,\"{\":17,\"}\":18,\"JSONMemberList\":19,\"JSONMember\":20,\":\":21,\",\":22,\"[\":23,\"]\":24,\"JSONElementList\":25,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"STRING\",6:\"NUMBER\",8:\"NULL\",10:\"TRUE\",11:\"FALSE\",14:\"EOF\",17:\"{\",18:\"}\",21:\":\",22:\",\",23:\"[\",24:\"]\"},\nproductions_: [0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n // replace escaped characters with actual character\n this.$ = new String(yytext.replace(/\\\\(\\\\|\")/g, \"$\"+\"1\")\n .replace(/\\\\n/g,'\\n')\n .replace(/\\\\r/g,'\\r')\n .replace(/\\\\t/g,'\\t')\n .replace(/\\\\v/g,'\\v')\n .replace(/\\\\f/g,'\\f')\n .replace(/\\\\b/g,'\\b'));\n this.$.__line__ = this._$.first_line;\n \nbreak;\ncase 2:\n\n this.$ = new Number(yytext);\n this.$.__line__ = this._$.first_line;\n \nbreak;\ncase 3:\n\n this.$ = null;\n \nbreak;\ncase 4:\n\n this.$ = new Boolean(true);\n this.$.__line__ = this._$.first_line;\n \nbreak;\ncase 5:\n\n this.$ = new Boolean(false);\n this.$.__line__ = this._$.first_line;\n \nbreak;\ncase 6:\nreturn this.$ = $$[$0-1];\nbreak;\ncase 13:\nthis.$ = {}; Object.defineProperty(this.$, '__line__', {\n value: this._$.first_line,\n enumerable: false\n })\nbreak;\ncase 14: case 19:\nthis.$ = $$[$0-1]; Object.defineProperty(this.$, '__line__', {\n value: this._$.first_line,\n enumerable: false\n })\nbreak;\ncase 15:\nthis.$ = [$$[$0-2], $$[$0]];\nbreak;\ncase 16:\nthis.$ = {}; this.$[$$[$0][0]] = $$[$0][1];\nbreak;\ncase 17:\nthis.$ = $$[$0-2]; $$[$0-2][$$[$0][0]] = $$[$0][1];\nbreak;\ncase 18:\nthis.$ = []; Object.defineProperty(this.$, '__line__', {\n value: this._$.first_line,\n enumerable: false\n })\nbreak;\ncase 20:\nthis.$ = [$$[$0]];\nbreak;\ncase 21:\nthis.$ = $$[$0-2]; $$[$0-2].push($$[$0]);\nbreak;\n}\n},\ntable: [{3:5,4:$V0,5:6,6:$V1,7:3,8:$V2,9:4,10:$V3,11:$V4,12:1,13:2,15:7,16:8,17:$V5,23:$V6},{1:[3]},{14:[1,16]},o($V7,[2,7]),o($V7,[2,8]),o($V7,[2,9]),o($V7,[2,10]),o($V7,[2,11]),o($V7,[2,12]),o($V7,[2,3]),o($V7,[2,4]),o($V7,[2,5]),o([14,18,21,22,24],[2,1]),o($V7,[2,2]),{3:20,4:$V0,18:[1,17],19:18,20:19},{3:5,4:$V0,5:6,6:$V1,7:3,8:$V2,9:4,10:$V3,11:$V4,13:23,15:7,16:8,17:$V5,23:$V6,24:[1,21],25:22},{1:[2,6]},o($V7,[2,13]),{18:[1,24],22:[1,25]},o($V8,[2,16]),{21:[1,26]},o($V7,[2,18]),{22:[1,28],24:[1,27]},o($V9,[2,20]),o($V7,[2,14]),{3:20,4:$V0,20:29},{3:5,4:$V0,5:6,6:$V1,7:3,8:$V2,9:4,10:$V3,11:$V4,13:30,15:7,16:8,17:$V5,23:$V6},o($V7,[2,19]),{3:5,4:$V0,5:6,6:$V1,7:3,8:$V2,9:4,10:$V3,11:$V4,13:31,15:7,16:8,17:$V5,23:$V6},o($V8,[2,17]),o($V8,[2,15]),o($V9,[2,21])],\ndefaultActions: {16:[2,6]},\nparseError: function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n throw new Error(str);\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n _token_stack:\n function lex() {\n var token;\n token = lexer.lex() || EOF;\n if (typeof token !== 'number') {\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function (match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex() {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin(condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState() {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState(condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:/* skip whitespace */\nbreak;\ncase 1:return 6\nbreak;\ncase 2:yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2); return 4\nbreak;\ncase 3:return 17\nbreak;\ncase 4:return 18\nbreak;\ncase 5:return 23\nbreak;\ncase 6:return 24\nbreak;\ncase 7:return 22\nbreak;\ncase 8:return 21\nbreak;\ncase 9:return 10\nbreak;\ncase 10:return 11\nbreak;\ncase 11:return 8\nbreak;\ncase 12:return 14\nbreak;\ncase 13:return 'INVALID'\nbreak;\n}\n},\nrules: [/^(?:\\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\\.[0-9]+)?([eE][-+]?[0-9]+)?\\b)/,/^(?:\"(?:\\\\[\\\\\"bfnrt/]|\\\\u[a-fA-F0-9]{4}|[^\\\\\\0-\\x09\\x0a-\\x1f\"])*\")/,/^(?:\\{)/,/^(?:\\})/,/^(?:\\[)/,/^(?:\\])/,/^(?:,)/,/^(?::)/,/^(?:true\\b)/,/^(?:false\\b)/,/^(?:null\\b)/,/^(?:$)/,/^(?:.)/],\nconditions: {\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (typeof require !== 'undefined' && typeof exports !== 'undefined') {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\n}\n","import ParsingError from './error/parsing_error';\nimport jsonlint from '@mapbox/jsonlint-lines-primitives';\n\nexport default function readStyle(style) {\n if (style instanceof String || typeof style === 'string' || style instanceof Buffer) {\n try {\n return jsonlint.parse(style.toString());\n } catch (e) {\n throw new ParsingError(e);\n }\n }\n\n return style;\n}\n","\nimport validateStyleMin from './validate_style.min';\nimport {v8} from './style-spec';\nimport readStyle from './read_style';\n\n/**\n * Validate a Mapbox GL style against the style specification.\n *\n * @private\n * @alias validate\n * @param {Object|String|Buffer} style The style to be validated. If a `String`\n * or `Buffer` is provided, the returned errors will contain line numbers.\n * @param {Object} [styleSpec] The style specification to validate against.\n * If omitted, the spec version is inferred from the stylesheet.\n * @returns {Array<ValidationError|ParsingError>}\n * @example\n * var validate = require('mapbox-gl-style-spec').validate;\n * var style = fs.readFileSync('./style.json', 'utf8');\n * var errors = validate(style);\n */\n\nexport default function validateStyle(style, styleSpec = v8) {\n let s = style;\n\n try {\n s = readStyle(s);\n } catch (e) {\n return [e];\n }\n\n return validateStyleMin(s, styleSpec);\n}\n\nexport const source = validateStyleMin.source;\nexport const light = validateStyleMin.light;\nexport const layer = validateStyleMin.layer;\nexport const filter = validateStyleMin.filter;\nexport const paintProperty = validateStyleMin.paintProperty;\nexport const layoutProperty = validateStyleMin.layoutProperty;\n","// @flow\n\nimport validateStyle from './validate_style.min';\nimport {v8} from './style-spec';\nimport readStyle from './read_style';\nimport ValidationError from './error/validation_error';\nimport getType from './util/get_type';\n\nconst SUPPORTED_SPEC_VERSION = 8;\nconst MAX_SOURCES_IN_STYLE = 15;\n\nfunction isValid(value: ?string, regex: RegExp): boolean {\n if (!value || getType(value) !== 'string') return true;\n return !!value.match(regex);\n}\n\nfunction getSourceCount(source: Object): number {\n if (source.url) {\n return source.url.split(',').length;\n } else {\n return 0;\n }\n}\n\nfunction getAllowedKeyErrors(obj: Object, keys: Array<*>, path: ?string): Array<?ValidationError> {\n const allowed = new Set(keys);\n const errors = [];\n Object.keys(obj).forEach(k => {\n if (!allowed.has(k)) {\n const prop = path ? `${path}.${k}` : null;\n errors.push(new ValidationError(prop, obj[k], `Unsupported property \"${k}\"`));\n }\n });\n return errors;\n}\n\nfunction getSourceErrors(source: Object, i: number): Array<?ValidationError> {\n const errors = [];\n\n /*\n * Inlined sources are not supported by the Mapbox Styles API, so only\n * \"type\", \"url\", and \"tileSize\" properties are valid\n */\n const sourceKeys = ['type', 'url', 'tileSize'];\n errors.push(...getAllowedKeyErrors(source, sourceKeys, 'source'));\n\n /*\n * \"source\" is required. Valid examples:\n * mapbox://mapbox.abcd1234\n * mapbox://penny.abcd1234\n * mapbox://mapbox.abcd1234,penny.abcd1234\n */\n const sourceUrlPattern = /^mapbox:\\/\\/([^/]*)$/;\n if (!isValid(source.url, sourceUrlPattern)) {\n errors.push(new ValidationError(`sources[${i}]`, source.url, 'Source url must be a valid Mapbox tileset url'));\n }\n\n return errors;\n}\n\nfunction getSourcesErrors(sources: Object): Array<?ValidationError> {\n const errors = [];\n let count = 0;\n\n Object.keys(sources).forEach((s: string, i: number) => {\n const sourceErrors = getSourceErrors(sources[s], i);\n\n // If source has errors, skip counting\n if (!sourceErrors.length) {\n count = count + getSourceCount(sources[s]);\n }\n\n errors.push(...sourceErrors);\n });\n\n if (count > MAX_SOURCES_IN_STYLE) {\n errors.push(new ValidationError('sources', null, `Styles must contain ${MAX_SOURCES_IN_STYLE} or fewer sources`));\n }\n\n return errors;\n}\n\nfunction getRootErrors(style: Object, specKeys: Array<any>): Array<?ValidationError> {\n const errors = [];\n\n /*\n * The following keys are optional but fully managed by the Mapbox Styles\n * API. Values on stylesheet on POST or PATCH will be ignored: \"owner\",\n * \"id\", \"cacheControl\", \"draft\", \"created\", \"modified\"\n *\n * The following keys are optional. The Mapbox Styles API respects value on\n * stylesheet on PATCH, but ignores the value on POST: \"visibility\"\n */\n const optionalRootProperties = [\n 'owner',\n 'id',\n 'cacheControl',\n 'draft',\n 'created',\n 'modified',\n 'visibility'\n ];\n\n const allowedKeyErrors = getAllowedKeyErrors(style, [...specKeys, ...optionalRootProperties]);\n errors.push(...allowedKeyErrors);\n\n if (style.version > SUPPORTED_SPEC_VERSION || style.version < SUPPORTED_SPEC_VERSION) {\n errors.push(new ValidationError('version', style.version, `Style version must be ${SUPPORTED_SPEC_VERSION}`));\n }\n\n /*\n * \"glyphs\" is optional. If present, valid examples:\n * mapbox://fonts/penny/{fontstack}/{range}.pbf\n * mapbox://fonts/mapbox/{fontstack}/{range}.pbf\n */\n const glyphUrlPattern = /^mapbox:\\/\\/fonts\\/([^/]*)\\/{fontstack}\\/{range}.pbf$/;\n if (!isValid(style.glyphs, glyphUrlPattern)) {\n errors.push(new ValidationError('glyphs', style.glyphs, 'Styles must reference glyphs hosted by Mapbox'));\n }\n\n /*\n * \"sprite\" is optional. If present, valid examples:\n * mapbox://sprites/penny/abcd1234\n * mapbox://sprites/mapbox/abcd1234/draft\n * mapbox://sprites/cyrus/abcd1234/abcd1234\n */\n const spriteUrlPattern = /^mapbox:\\/\\/sprites\\/([^/]*)\\/([^/]*)\\/?([^/]*)?$/;\n if (!isValid(style.sprite, spriteUrlPattern)) {\n errors.push(new ValidationError('sprite', style.sprite, 'Styles must reference sprites hosted by Mapbox'));\n }\n\n /*\n * \"visibility\" is optional. If present, valid examples:\n * \"private\"\n * \"public\"\n */\n const visibilityPattern = /^(public|private)$/;\n if (!isValid(style.visibility, visibilityPattern)) {\n errors.push(new ValidationError('visibility', style.visibility, 'Style visibility must be public or private'));\n }\n\n return errors;\n}\n\n/**\n * Validate a Mapbox GL style against the style specification and check for\n * compatibility with the Mapbox Styles API.\n *\n * @param {Object} style The style to be validated.\n * @returns {Array<ValidationError>}\n * @example\n * var validateMapboxApiSupported = require('mapbox-gl-style-spec/lib/validate_style_mapbox_api_supported.js');\n * var errors = validateMapboxApiSupported(style);\n */\nexport default function validateMapboxApiSupported(style: Object): Array<?ValidationError> {\n let s = style;\n try {\n s = readStyle(s);\n } catch (e) {\n return [e];\n }\n\n let errors = validateStyle(s, v8)\n .concat(getRootErrors(s, Object.keys(v8.$root)));\n\n if (s.sources) {\n errors = errors.concat(getSourcesErrors(s.sources));\n }\n\n return errors;\n}\n","import {listen} from 'ol/events';\nimport EventType from 'ol/events/EventType';\nimport {labelCache} from 'ol/render/canvas';\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 const assign =\n 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\n const output = Object(target);\n for (let i = 1, ii = arguments.length; i < ii; ++i) {\n const source = arguments[i];\n if (source !== undefined && source !== null) {\n for (const key in source) {\n if (source.hasOwnProperty(key)) {\n output[key] = source[key];\n }\n }\n }\n }\n return output;\n };\n\nexport function deg2rad(degrees) {\n return degrees * Math.PI / 180;\n}\n\nexport const defaultResolutions = (function() {\n const resolutions = [];\n for (let res = 78271.51696402048; resolutions.length <= 24; res /= 2) {\n resolutions.push(res);\n }\n return resolutions;\n})();\n\n/**\n * @param {number} width Width of the canvas.\n * @param {number} height Height of the canvas.\n * @return {HTMLCanvasElement} Canvas.\n */\nexport function createCanvas(width, height) {\n if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && typeof OffscreenCanvas !== 'undefined') { // eslint-disable-line\n return /** @type {?} */ (new OffscreenCanvas(width, height));\n } else {\n const canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n return canvas;\n }\n}\n\nexport function getZoomForResolution(resolution, resolutions) {\n let i = 0;\n const ii = resolutions.length;\n for (; i < ii; ++i) {\n const candidate = resolutions[i];\n if (candidate < resolution && i + 1 < ii) {\n const zoomFactor = resolutions[i] / resolutions[i + 1];\n return i + Math.log(resolutions[i] / resolution) / Math.log(zoomFactor);\n }\n }\n return ii - 1;\n}\n\nconst hairSpacePool = Array(256).join('\\u200A');\nexport function applyLetterSpacing(text, letterSpacing) {\n if (letterSpacing >= 0.05) {\n let textWithLetterSpacing = '';\n const lines = text.split('\\n');\n const joinSpaceString = hairSpacePool.slice(0, Math.round(letterSpacing / 0.1));\n for (let l = 0, ll = lines.length; l < ll; ++l) {\n if (l > 0) {\n textWithLetterSpacing += '\\n';\n }\n textWithLetterSpacing += lines[l].split('').join(joinSpaceString);\n }\n return textWithLetterSpacing;\n }\n return text;\n}\n\nlet measureContext;\nfunction getMeasureContext() {\n if (!measureContext) {\n measureContext = createCanvas(1, 1).getContext('2d');\n }\n return measureContext;\n}\n\nfunction measureText(text, letterSpacing) {\n return getMeasureContext().measureText(text).width + (text.length - 1) * letterSpacing;\n}\n\nlet measureCache = {};\nif (labelCache) {\n // Only available when using ES modules\n listen(labelCache, EventType.CLEAR, function() {\n measureCache = {};\n });\n}\nexport function wrapText(text, font, em, letterSpacing) {\n if (text.indexOf('\\n') !== -1) {\n const hardLines = text.split('\\n');\n const lines = [];\n for (let i = 0, ii = hardLines.length; i < ii; ++i) {\n lines.push(wrapText(hardLines[i], font, em, letterSpacing));\n }\n return lines.join('\\n');\n }\n const key = em + ',' + font + ',' + text + ',' + letterSpacing;\n let wrappedText = measureCache[key];\n if (!wrappedText) {\n const words = text.split(' ');\n if (words.length > 1) {\n const ctx = getMeasureContext();\n ctx.font = font;\n const oneEm = ctx.measureText('M').width;\n const maxWidth = oneEm * em;\n let line = '';\n const lines = [];\n // Pass 1 - wrap lines to not exceed maxWidth\n for (let i = 0, ii = words.length; i < ii; ++i) {\n const word = words[i];\n const testLine = line + (line ? ' ' : '') + word;\n if (measureText(testLine, letterSpacing) <= maxWidth) {\n line = testLine;\n } else {\n if (line) {\n lines.push(line);\n }\n line = word;\n }\n }\n if (line) {\n lines.push(line);\n }\n // Pass 2 - add lines with a width of less than 30% of maxWidth to the previous or next line\n for (let i = 0, ii = lines.length; i < ii && ii > 1; ++i) {\n const line = lines[i];\n if (measureText(line, letterSpacing) < maxWidth * 0.35) {\n const prevWidth = i > 0 ? measureText(lines[i - 1], letterSpacing) : Infinity;\n const nextWidth = i < ii - 1 ? measureText(lines[i + 1], letterSpacing) : Infinity;\n lines.splice(i, 1);\n ii -= 1;\n if (prevWidth < nextWidth) {\n lines[i - 1] += ' ' + line;\n i -= 1;\n } else {\n lines[i] = line + ' ' + lines[i];\n }\n }\n }\n // Pass 3 - try to fill 80% of maxWidth for each line\n for (let i = 0, ii = lines.length - 1; i < ii; ++i) {\n const line = lines[i];\n const next = lines[i + 1];\n if (measureText(line, letterSpacing) > maxWidth * 0.7 &&\n measureText(next, letterSpacing) < maxWidth * 0.6) {\n const lineWords = line.split(' ');\n const lastWord = lineWords.pop();\n if (measureText(lastWord, letterSpacing) < maxWidth * 0.2) {\n lines[i] = lineWords.join(' ');\n lines[i + 1] = lastWord + ' ' + next;\n }\n ii -= 1;\n }\n }\n wrappedText = lines.join('\\n');\n } else {\n wrappedText = text;\n }\n wrappedText = applyLetterSpacing(wrappedText, letterSpacing);\n measureCache[key] = wrappedText;\n }\n return wrappedText;\n}\n","/*\nol-mapbox-style - Use Mapbox Style objects with OpenLayers\nCopyright 2016-present ol-mapbox-style contributors\nLicense: https://raw.githubusercontent.com/openlayers/ol-mapbox-style/master/LICENSE\n*/\n\nimport Style from 'ol/style/Style';\nimport Fill from 'ol/style/Fill';\nimport Stroke from 'ol/style/Stroke';\nimport Icon from 'ol/style/Icon';\nimport Text from 'ol/style/Text';\nimport Circle from 'ol/style/Circle';\nimport RenderFeature from 'ol/render/Feature';\nimport {derefLayers} from '@mapbox/mapbox-gl-style-spec';\n\nimport {\n expression, Color,\n function as fn,\n latest as spec,\n featureFilter as createFilter\n} from '@mapbox/mapbox-gl-style-spec';\nimport mb2css from 'mapbox-to-css-font';\nimport {deg2rad, defaultResolutions, getZoomForResolution, wrapText, applyLetterSpacing, createCanvas} from './util';\n\n/**\n * @typedef {import(\"ol/layer/Vector\").default} VectorLayer\n * @typedef {import(\"ol/layer/VectorTile\").default} VectorTileLayer\n * @typedef {import(\"ol/style/Style\").StyleFunction} StyleFunction\n */\n\nconst isFunction = fn.isFunction;\nconst convertFunction = fn.convertFunction;\nconst isExpression = expression.isExpression;\nconst createPropertyExpression = expression.createPropertyExpression;\n\nconst types = {\n 'Point': 1,\n 'MultiPoint': 1,\n 'LineString': 2,\n 'MultiLineString': 2,\n 'Polygon': 3,\n 'MultiPolygon': 3\n};\nconst anchor = {\n 'center': [0.5, 0.5],\n 'left': [0, 0.5],\n 'right': [1, 0.5],\n 'top': [0.5, 0],\n 'bottom': [0.5, 1],\n 'top-left': [0, 0],\n 'top-right': [1, 0],\n 'bottom-left': [0, 1],\n 'bottom-right': [1, 1]\n};\n\nconst expressionData = function(rawExpression, propertySpec) {\n const compiledExpression = createPropertyExpression(rawExpression, propertySpec);\n if (compiledExpression.result === 'error') {\n throw new Error(compiledExpression.value.map(err => `${err.key}: ${err.message}`).join(', '));\n }\n return compiledExpression.value;\n};\n\nconst emptyObj = {};\nconst zoomObj = {zoom: 0};\n/** @private */\nconst functionCache = {};\nlet renderFeatureCoordinates, renderFeature;\n\n/**\n * @private\n * @param {Object} layer Gl object layer.\n * @param {string} layoutOrPaint 'layout' or 'paint'.\n * @param {string} property Feature property.\n * @param {number} zoom Zoom.\n * @param {Object} feature Gl feature.\n * @return {?} Value.\n */\nexport function getValue(layer, layoutOrPaint, property, zoom, feature) {\n const layerId = layer.id;\n if (!functionCache[layerId]) {\n functionCache[layerId] = {};\n }\n const functions = functionCache[layerId];\n if (!functions[property]) {\n let value = (layer[layoutOrPaint] || emptyObj)[property];\n const propertySpec = spec[`${layoutOrPaint}_${layer.type}`][property];\n if (value === undefined) {\n value = propertySpec.default;\n }\n let isExpr = isExpression((value));\n if (!isExpr && isFunction(value)) {\n value = convertFunction(value, propertySpec);\n isExpr = true;\n }\n if (isExpr) {\n const compiledExpression = expressionData(value, propertySpec);\n functions[property] = compiledExpression.evaluate.bind(compiledExpression);\n } else {\n if (propertySpec.type == 'color') {\n value = Color.parse(value);\n }\n functions[property] = function() {\n return value;\n };\n }\n }\n zoomObj.zoom = zoom;\n return functions[property](zoomObj, feature);\n}\n\n/** @private */\nconst filterCache = {};\n\n/**\n * @private\n * @param {string} layerId Layer id.\n * @param {?} filter Filter.\n * @param {Object} feature Feature.\n * @param {number} zoom Zoom.\n * @return {boolean} Filter result.\n */\nfunction evaluateFilter(layerId, filter, feature, zoom) {\n if (!(layerId in filterCache)) {\n filterCache[layerId] = createFilter(filter).filter;\n }\n zoomObj.zoom = zoom;\n return filterCache[layerId](zoomObj, feature);\n}\n\n/**\n * @private\n * @param {?} color Color.\n * @param {number} opacity Opacity.\n * @return {string} Color.\n */\nfunction colorWithOpacity(color, opacity) {\n if (color) {\n if (color.a === 0 || opacity === 0) {\n return undefined;\n }\n const a = color.a;\n opacity = opacity === undefined ? 1 : opacity;\n return 'rgba(' + Math.round(color.r * 255 / a) + ',' + Math.round(color.g * 255 / a) +\n ',' + Math.round(color.b * 255 / a) + ',' + (a * opacity) + ')';\n }\n return color;\n}\n\nconst templateRegEx = /^([^]*)\\{(.*)\\}([^]*)$/;\n\n/**\n * @private\n * @param {string} text Text.\n * @param {Object} properties Properties.\n * @return {string} Text.\n */\nfunction fromTemplate(text, properties) {\n let parts;\n do {\n parts = text.match(templateRegEx);\n if (parts) {\n const value = properties[parts[2]] || '';\n text = parts[1] + value + parts[3];\n }\n } while (parts);\n return text;\n}\n\nlet recordLayer = false;\n\n/**\n * ```js\n * import {recordStyleLayer} from 'ol-mapbox-style/dist/stylefunction';\n * ```\n * Turns recording of the Mapbox Style's `layer` on and off. When turned on,\n * the layer that a rendered feature belongs to will be set as the feature's\n * `mapbox-layer` property.\n * @param {boolean} [record=false] Recording of the style layer is on.\n */\nexport function recordStyleLayer(record) {\n recordLayer = record;\n}\n\n/**\n * ```js\n * import stylefunction from 'ol-mapbox-style/dist/stylefunction';\n * ```\n * Creates a style function from the `glStyle` object for all layers that use\n * the specified `source`, which needs to be a `\"type\": \"vector\"` or\n * `\"type\": \"geojson\"` source and applies it to the specified OpenLayers layer.\n *\n * Two additional properties will be set on the provided layer:\n *\n * * `mapbox-source`: The `id` of the Mapbox Style document's source that the\n * OpenLayers layer was created from. Usually `apply()` creates one\n * OpenLayers layer per Mapbox Style source, unless the layer stack has\n * layers from different sources in between.\n * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are\n * included in the OpenLayers layer.\n *\n * This function also works in a web worker. In worker mode, the main thread needs\n * to listen to messages from the worker and respond with another message to make\n * sure that sprite image loading works:\n *\n * ```js\n * worker.addEventListener('message', event => {\n * if (event.data.action === 'loadImage') {\n * const image = new Image();\n * image.crossOrigin = 'anonymous';\n * image.addEventListener('load', function() {\n * createImageBitmap(image, 0, 0, image.width, image.height).then(imageBitmap => {\n * worker.postMessage({\n * action: 'imageLoaded',\n * image: imageBitmap,\n * src: event.data.src\n * }, [imageBitmap]);\n * });\n * });\n * image.src = event.data.src;\n * }\n * });\n * ```\n *\n * @param {VectorLayer|VectorTileLayer} olLayer OpenLayers layer to\n * apply the style to. In addition to the style, the layer will get two\n * properties: `mapbox-source` will be the `id` of the `glStyle`'s source used\n * for the layer, and `mapbox-layers` will be an array of the `id`s of the\n * `glStyle`'s layers.\n * @param {string|Object} glStyle Mapbox Style object.\n * @param {string|Array<string>} source `source` key or an array of layer `id`s\n * from the Mapbox Style object. When a `source` key is provided, all layers for\n * the specified source will be included in the style function. When layer `id`s\n * are provided, they must be from layers that use the same source.\n * @param {Array<number>} [resolutions=[78271.51696402048, 39135.75848201024,\n 19567.87924100512, 9783.93962050256, 4891.96981025128, 2445.98490512564,\n 1222.99245256282, 611.49622628141, 305.748113140705, 152.8740565703525,\n 76.43702828517625, 38.21851414258813, 19.109257071294063, 9.554628535647032,\n 4.777314267823516, 2.388657133911758, 1.194328566955879, 0.5971642834779395,\n 0.29858214173896974, 0.14929107086948487, 0.07464553543474244]]\n * Resolutions for mapping resolution to zoom level.\n * @param {Object} [spriteData=undefined] Sprite data from the url specified in\n * the Mapbox Style object's `sprite` property. Only required if a `sprite`\n * property is specified in the Mapbox Style object.\n * @param {Object} [spriteImageUrl=undefined] Sprite image url for the sprite\n * specified in the Mapbox Style object's `sprite` property. Only required if a\n * `sprite` property is specified in the Mapbox Style object.\n * @param {function(Array<string>):Array<string>} [getFonts=undefined] Function that\n * receives a font stack as arguments, and returns a (modified) font stack that\n * is available. Font names are the names used in the Mapbox Style object. If\n * not provided, the font stack will be used as-is. This function can also be\n * used for loading web fonts.\n * @return {StyleFunction} Style function for use in\n * `ol.layer.Vector` or `ol.layer.VectorTile`.\n */\nexport default function(olLayer, glStyle, source, resolutions = defaultResolutions, spriteData, spriteImageUrl, getFonts) {\n if (typeof glStyle == 'string') {\n glStyle = JSON.parse(glStyle);\n }\n if (glStyle.version != 8) {\n throw new Error('glStyle version 8 required.');\n }\n\n let spriteImage, spriteImgSize;\n if (spriteImageUrl) {\n if (typeof Image !== 'undefined') {\n const img = new Image();\n img.crossOrigin = 'anonymous';\n img.onload = function() {\n spriteImage = img;\n spriteImgSize = [img.width, img.height];\n olLayer.changed();\n img.onload = null;\n };\n img.src = spriteImageUrl;\n } else if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { //eslint-disable-line\n const worker = /** @type {*} */ (self);\n // Main thread needs to handle 'loadImage' and dispatch 'imageLoaded'\n worker.postMessage({\n action: 'loadImage',\n src: spriteImageUrl\n });\n worker.addEventListener('message', function handler(event) {\n if (event.data.action === 'imageLoaded' && event.data.src === spriteImageUrl) {\n spriteImage = event.data.image;\n spriteImgSize = [spriteImage.width, spriteImage.height];\n }\n });\n }\n }\n\n\n const allLayers = derefLayers(glStyle.layers);\n\n const layersBySourceLayer = {};\n const mapboxLayers = [];\n let mapboxSource;\n for (let i = 0, ii = allLayers.length; i < ii; ++i) {\n const layer = allLayers[i];\n const layerId = layer.id;\n if (typeof source == 'string' && layer.source == source ||\n source.indexOf(layerId) !== -1) {\n const sourceLayer = layer['source-layer'];\n if (!mapboxSource) {\n mapboxSource = layer.source;\n const source = glStyle.sources[mapboxSource];\n if (!source) {\n throw new Error(`Source \"${mapboxSource}\" is not defined`);\n }\n const type = source.type;\n if (type !== 'vector' && type !== 'geojson') {\n throw new Error(`Source \"${mapboxSource}\" is not of type \"vector\" or \"geojson\", but \"${type}\"`);\n }\n }\n let layers = layersBySourceLayer[sourceLayer];\n if (!layers) {\n layers = layersBySourceLayer[sourceLayer] = [];\n }\n layers.push({\n layer: layer,\n index: i\n });\n mapboxLayers.push(layerId);\n }\n // TODO revisit when diffing gets added\n delete functionCache[layerId];\n delete filterCache[layerId];\n }\n\n const textHalo = new Stroke();\n const textColor = new Fill();\n\n const iconImageCache = {};\n const patternCache = {};\n const styles = [];\n\n const styleFunction = function(feature, resolution) {\n const properties = feature.getProperties();\n const layers = layersBySourceLayer[properties.layer];\n if (!layers) {\n return;\n }\n let zoom = resolutions.indexOf(resolution);\n if (zoom == -1) {\n zoom = getZoomForResolution(resolution, resolutions);\n }\n const type = types[feature.getGeometry().getType()];\n const f = {\n properties: properties,\n type: type\n };\n let stylesLength = -1;\n let featureBelongsToLayer;\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const layerData = layers[i];\n const layer = layerData.layer;\n const layerId = layer.id;\n\n const layout = layer.layout || emptyObj;\n const paint = layer.paint || emptyObj;\n if (layout.visibility === 'none' || ('minzoom' in layer && zoom < layer.minzoom) ||\n ('maxzoom' in layer && zoom >= layer.maxzoom)) {\n continue;\n }\n const filter = layer.filter;\n if (!filter || evaluateFilter(layerId, filter, f, zoom)) {\n featureBelongsToLayer = layer;\n let color, opacity, fill, stroke, strokeColor, style;\n const index = layerData.index;\n if (type == 3 && (layer.type == 'fill' || layer.type == 'fill-extrusion')) {\n opacity = getValue(layer, 'paint', layer.type + '-opacity', zoom, f);\n if (layer.type + '-pattern' in paint) {\n const fillIcon = getValue(layer, 'paint', layer.type + '-pattern', zoom, f);\n if (fillIcon) {\n const icon = typeof fillIcon === 'string'\n ? fromTemplate(fillIcon, properties)\n : fillIcon.toString();\n if (spriteImage && spriteData && spriteData[icon]) {\n ++stylesLength;\n style = styles[stylesLength];\n if (!style || !style.getFill() || style.getStroke() || style.getText()) {\n style = styles[stylesLength] = new Style({\n fill: new Fill()\n });\n }\n fill = style.getFill();\n style.setZIndex(index);\n const icon_cache_key = icon + '.' + opacity;\n let pattern = patternCache[icon_cache_key];\n if (!pattern) {\n const spriteImageData = spriteData[icon];\n const canvas = createCanvas(spriteImageData.width, spriteImageData.height);\n const ctx = /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d'));\n ctx.globalAlpha = opacity;\n ctx.drawImage(\n spriteImage,\n spriteImageData.x,\n spriteImageData.y,\n spriteImageData.width,\n spriteImageData.height,\n 0,\n 0,\n spriteImageData.width,\n spriteImageData.height\n );\n pattern = ctx.createPattern(canvas, 'repeat');\n patternCache[icon_cache_key] = pattern;\n }\n fill.setColor(pattern);\n }\n }\n } else {\n color = colorWithOpacity(getValue(layer, 'paint', layer.type + '-color', zoom, f), opacity);\n if (color) {\n if (layer.type + '-outline-color' in paint) {\n strokeColor = colorWithOpacity(getValue(layer, 'paint', layer.type + '-outline-color', zoom, f), opacity);\n }\n if (!strokeColor) {\n strokeColor = color;\n }\n ++stylesLength;\n style = styles[stylesLength];\n if (!style || !(style.getFill() && style.getStroke()) || style.getText()) {\n style = styles[stylesLength] = new Style({\n fill: new Fill(),\n stroke: new Stroke()\n });\n }\n fill = style.getFill();\n fill.setColor(color);\n stroke = style.getStroke();\n stroke.setColor(strokeColor);\n stroke.setWidth(1);\n style.setZIndex(index);\n }\n }\n }\n if (type != 1 && layer.type == 'line') {\n color = !('line-pattern' in paint) && 'line-color' in paint ?\n colorWithOpacity(getValue(layer, 'paint', 'line-color', zoom, f), getValue(layer, 'paint', 'line-opacity', zoom, f)) :\n undefined;\n const width = getValue(layer, 'paint', 'line-width', zoom, f);\n if (color && width > 0) {\n ++stylesLength;\n style = styles[stylesLength];\n if (!style || !style.getStroke() || style.getFill() || style.getText()) {\n style = styles[stylesLength] = new Style({\n stroke: new Stroke()\n });\n }\n stroke = style.getStroke();\n stroke.setLineCap(getValue(layer, 'layout', 'line-cap', zoom, f));\n stroke.setLineJoin(getValue(layer, 'layout', 'line-join', zoom, f));\n stroke.setMiterLimit(getValue(layer, 'layout', 'line-miter-limit', zoom, f));\n stroke.setColor(color);\n stroke.setWidth(width);\n stroke.setLineDash(paint['line-dasharray'] ?\n getValue(layer, 'paint', 'line-dasharray', zoom, f).map(function(x) {\n return x * width;\n }) : null);\n style.setZIndex(index);\n }\n }\n\n let hasImage = false;\n let text = null;\n let placementAngle = 0;\n let icon, iconImg, skipLabel;\n if ((type == 1 || type == 2) && 'icon-image' in layout) {\n const iconImage = getValue(layer, 'layout', 'icon-image', zoom, f);\n if (iconImage) {\n icon = typeof iconImage === 'string'\n ? fromTemplate(iconImage, properties)\n : iconImage.toString();\n let styleGeom = undefined;\n if (spriteImage && spriteData && spriteData[icon]) {\n const iconRotationAlignment = getValue(layer, 'layout', 'icon-rotation-alignment', zoom, f);\n if (type == 2) {\n const geom = feature.getGeometry();\n // ol package and ol-debug.js only\n if (geom.getFlatMidpoint || geom.getFlatMidpoints) {\n const extent = geom.getExtent();\n const size = Math.sqrt(Math.max(\n Math.pow((extent[2] - extent[0]) / resolution, 2),\n Math.pow((extent[3] - extent[1]) / resolution, 2))\n );\n if (size > 150) {\n //FIXME Do not hard-code a size of 150\n const midpoint = geom.getType() === 'MultiLineString' ? geom.getFlatMidpoints() : geom.getFlatMidpoint();\n if (!renderFeature) {\n renderFeatureCoordinates = [NaN, NaN];\n renderFeature = new RenderFeature('Point', renderFeatureCoordinates, [], {}, null);\n }\n styleGeom = renderFeature;\n renderFeatureCoordinates[0] = midpoint[0];\n renderFeatureCoordinates[1] = midpoint[1];\n const placement = getValue(layer, 'layout', 'symbol-placement', zoom, f);\n if (placement === 'line' && iconRotationAlignment === 'map') {\n const stride = geom.getStride();\n const coordinates = geom.getFlatCoordinates();\n for (let i = 0, ii = coordinates.length - stride; i < ii; i += stride) {\n const x1 = coordinates[i];\n const y1 = coordinates[i + 1];\n const x2 = coordinates[i + stride];\n const y2 = coordinates[i + stride + 1];\n const minX = Math.min(x1, x2);\n const minY = Math.min(y1, y2);\n const maxX = Math.max(x1, x2);\n const maxY = Math.max(y1, y2);\n if (midpoint[0] >= minX && midpoint[0] <= maxX &&\n midpoint[1] >= minY && midpoint[1] <= maxY) {\n placementAngle = Math.atan2(y1 - y2, x2 - x1);\n break;\n }\n }\n }\n }\n }\n }\n if (type !== 2 || styleGeom) {\n ++stylesLength;\n style = styles[stylesLength];\n if (!style || !style.getImage() || style.getFill() || style.getStroke()) {\n style = styles[stylesLength] = new Style();\n }\n style.setGeometry(styleGeom);\n const iconSize = getValue(layer, 'layout', 'icon-size', zoom, f);\n const iconColor = paint['icon-color'] !== undefined ? getValue(layer, 'paint', 'icon-color', zoom, f) : null;\n let icon_cache_key = icon + '.' + iconSize;\n if (iconColor !== null) {\n icon_cache_key += '.' + iconColor;\n }\n iconImg = iconImageCache[icon_cache_key];\n if (!iconImg) {\n const spriteImageData = spriteData[icon];\n if (iconColor !== null) {\n // cut out the sprite and color it\n const canvas = createCanvas(spriteImageData.width, spriteImageData.height);\n const ctx = /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d'));\n ctx.drawImage(\n spriteImage,\n spriteImageData.x,\n spriteImageData.y,\n spriteImageData.width,\n spriteImageData.height,\n 0,\n 0,\n spriteImageData.width,\n spriteImageData.height\n );\n const data = ctx.getImageData(0, 0, canvas.width, canvas.height);\n for (let c = 0, cc = data.data.length; c < cc; c += 4) {\n const a = iconColor.a;\n if (a !== 0) {\n data.data[c] = iconColor.r * 255 / a;\n data.data[c + 1] = iconColor.g * 255 / a;\n data.data[c + 2] = iconColor.b * 255 / a;\n }\n data.data[c + 3] = a;\n }\n ctx.putImageData(data, 0, 0);\n iconImg = iconImageCache[icon_cache_key] = new Icon({\n img: canvas,\n imgSize: [canvas.width, canvas.height],\n scale: iconSize / spriteImageData.pixelRatio\n });\n } else {\n iconImg = iconImageCache[icon_cache_key] = new Icon({\n img: spriteImage,\n imgSize: spriteImgSize,\n size: [spriteImageData.width, spriteImageData.height],\n offset: [spriteImageData.x, spriteImageData.y],\n rotateWithView: iconRotationAlignment === 'map',\n scale: iconSize / spriteImageData.pixelRatio\n });\n }\n }\n iconImg.setRotation(placementAngle + deg2rad(getValue(layer, 'layout', 'icon-rotate', zoom, f)));\n iconImg.setOpacity(getValue(layer, 'paint', 'icon-opacity', zoom, f));\n iconImg.setAnchor(anchor[getValue(layer, 'layout', 'icon-anchor', zoom, f)]);\n style.setImage(iconImg);\n text = style.getText();\n style.setText(undefined);\n style.setZIndex(index);\n hasImage = true;\n skipLabel = false;\n } else {\n skipLabel = true;\n }\n }\n }\n }\n\n if (type == 1 && 'circle-radius' in paint) {\n ++stylesLength;\n style = styles[stylesLength];\n if (!style || !style.getImage() || style.getFill() || style.getStroke()) {\n style = styles[stylesLength] = new Style();\n }\n const circleRadius = getValue(layer, 'paint', 'circle-radius', zoom, f);\n const circleStrokeColor = colorWithOpacity(getValue(layer, 'paint', 'circle-stroke-color', zoom, f), getValue(layer, 'paint', 'circle-stroke-opacity', zoom, f));\n const circleColor = colorWithOpacity(getValue(layer, 'paint', 'circle-color', zoom, f), getValue(layer, 'paint', 'circle-opacity', zoom, f));\n const circleStrokeWidth = getValue(layer, 'paint', 'circle-stroke-width', zoom, f);\n const cache_key = circleRadius + '.' + circleStrokeColor + '.' +\n circleColor + '.' + circleStrokeWidth;\n iconImg = iconImageCache[cache_key];\n if (!iconImg) {\n iconImg = iconImageCache[cache_key] = new Circle({\n radius: circleRadius,\n stroke: circleStrokeColor && circleStrokeWidth > 0 ? new Stroke({\n width: circleStrokeWidth,\n color: circleStrokeColor\n }) : undefined,\n fill: circleColor ? new Fill({\n color: circleColor\n }) : undefined\n });\n }\n style.setImage(iconImg);\n text = style.getText();\n style.setText(undefined);\n style.setGeometry(undefined);\n style.setZIndex(index);\n hasImage = true;\n }\n\n let label;\n if ('text-field' in layout) {\n const textField = getValue(layer, 'layout', 'text-field', zoom, f).toString();\n label = fromTemplate(textField, properties).trim();\n opacity = getValue(layer, 'paint', 'text-opacity', zoom, f);\n }\n if (label && opacity && !skipLabel) {\n if (!hasImage) {\n ++stylesLength;\n style = styles[stylesLength];\n if (!style || !style.getText() || style.getFill() || style.getStroke()) {\n style = styles[stylesLength] = new Style();\n }\n style.setImage(undefined);\n style.setGeometry(undefined);\n }\n if (!style.getText()) {\n style.setText(text || new Text({\n padding: [2, 2, 2, 2]\n }));\n }\n text = style.getText();\n const textSize = Math.round(getValue(layer, 'layout', 'text-size', zoom, f));\n const fontArray = getValue(layer, 'layout', 'text-font', zoom, f);\n const textLineHeight = getValue(layer, 'layout', 'text-line-height', zoom, f);\n const font = mb2css(getFonts ? getFonts(fontArray) : fontArray, textSize, textLineHeight);\n const textTransform = layout['text-transform'];\n if (textTransform == 'uppercase') {\n label = label.toUpperCase();\n } else if (textTransform == 'lowercase') {\n label = label.toLowerCase();\n }\n const maxTextWidth = getValue(layer, 'layout', 'text-max-width', zoom, f);\n const letterSpacing = getValue(layer, 'layout', 'text-letter-spacing', zoom, f);\n const wrappedLabel = type == 2 ? applyLetterSpacing(label, letterSpacing) : wrapText(label, font, maxTextWidth, letterSpacing);\n text.setText(wrappedLabel);\n text.setFont(font);\n text.setRotation(deg2rad(getValue(layer, 'layout', 'text-rotate', zoom, f)));\n const textAnchor = getValue(layer, 'layout', 'text-anchor', zoom, f);\n const placement = (hasImage || type == 1) ? 'point' : getValue(layer, 'layout', 'symbol-placement', zoom, f);\n text.setPlacement(placement);\n let textHaloWidth = getValue(layer, 'paint', 'text-halo-width', zoom, f);\n const textOffset = getValue(layer, 'layout', 'text-offset', zoom, f);\n const textTranslate = getValue(layer, 'paint', 'text-translate', zoom, f);\n // Text offset has to take halo width and line height into account\n let vOffset = 0;\n let hOffset = 0;\n if (placement == 'point') {\n let textAlign = 'center';\n if (textAnchor.indexOf('left') !== -1) {\n textAlign = 'left';\n hOffset = textHaloWidth;\n } else if (textAnchor.indexOf('right') !== -1) {\n textAlign = 'right';\n hOffset = -textHaloWidth;\n }\n text.setTextAlign(textAlign);\n const textRotationAlignment = getValue(layer, 'layout', 'text-rotation-alignment', zoom, f);\n text.setRotateWithView(textRotationAlignment == 'map');\n } else {\n text.setMaxAngle(deg2rad(getValue(layer, 'layout', 'text-max-angle', zoom, f)) * label.length / wrappedLabel.length);\n text.setTextAlign();\n text.setRotateWithView(false);\n }\n let textBaseline = 'middle';\n if (textAnchor.indexOf('bottom') == 0) {\n textBaseline = 'bottom';\n vOffset = -textHaloWidth - (0.5 * (textLineHeight - 1)) * textSize;\n } else if (textAnchor.indexOf('top') == 0) {\n textBaseline = 'top';\n vOffset = textHaloWidth + (0.5 * (textLineHeight - 1)) * textSize;\n }\n text.setTextBaseline(textBaseline);\n text.setOffsetX(textOffset[0] * textSize + hOffset + textTranslate[0]);\n text.setOffsetY(textOffset[1] * textSize + vOffset + textTranslate[1]);\n textColor.setColor(colorWithOpacity(getValue(layer, 'paint', 'text-color', zoom, f), opacity));\n text.setFill(textColor);\n const haloColor = colorWithOpacity(getValue(layer, 'paint', 'text-halo-color', zoom, f), opacity);\n if (haloColor) {\n textHalo.setColor(haloColor);\n // spec here : https://docs.mapbox.com/mapbox-gl-js/style-spec/#paint-symbol-text-halo-width\n // Halo width must be doubled because it is applied around the center of the text outline\n textHaloWidth *= 2;\n // 1/4 of text size (spec) x 2\n const halfTextSize = 0.5 * textSize;\n textHalo.setWidth(textHaloWidth <= halfTextSize ? textHaloWidth : halfTextSize);\n text.setStroke(textHalo);\n } else {\n text.setStroke(undefined);\n }\n const textPadding = getValue(layer, 'layout', 'text-padding', zoom, f);\n const padding = text.getPadding();\n if (textPadding !== padding[0]) {\n padding[0] = padding[1] = padding[2] = padding[3] = textPadding;\n }\n style.setZIndex(index);\n }\n }\n }\n\n if (stylesLength > -1) {\n styles.length = stylesLength + 1;\n if (recordLayer) {\n if (typeof feature.set === 'function') {\n // ol/Feature\n feature.set('mapbox-layer', featureBelongsToLayer);\n } else {\n // ol/render/Feature\n feature.getProperties()['mapbox-layer'] = featureBelongsToLayer;\n }\n }\n return styles;\n }\n };\n\n olLayer.setStyle(styleFunction);\n olLayer.set('mapbox-source', mapboxSource);\n olLayer.set('mapbox-layers', mapboxLayers);\n return styleFunction;\n}\n\nexport {\n colorWithOpacity as _colorWithOpacity,\n filterCache as _filterCache,\n evaluateFilter as _evaluateFilter,\n fromTemplate as _fromTemplate,\n getValue as _getValue,\n functionCache as _functionCache\n};\n","// Generated by CoffeeScript 1.10.0\n(function() {\n var families;\n\n module.exports = {\n icon: 'icons/google.svg',\n name: 'google',\n title: 'Google Fonts',\n link: 'google.com/fonts',\n getNames: function() {\n return families;\n },\n getLink: function(name) {\n return \"https://fonts.google.com/specimen/\" + (name.replace(/( )/g, '+'));\n },\n normalizeName: function(name) {\n return name;\n }\n };\n\n families = [\"ABeeZee\", \"Abel\", \"Abril Fatface\", \"Aclonica\", \"Acme\", \"Actor\", \"Adamina\", \"Advent Pro\", \"Aguafina Script\", \"Akronim\", \"Aladin\", \"Aldrich\", \"Alef\", \"Alegreya\", \"Alegreya SC\", \"Alegreya Sans\", \"Alegreya Sans SC\", \"Alex Brush\", \"Alfa Slab One\", \"Alice\", \"Alike\", \"Alike Angular\", \"Allan\", \"Allerta\", \"Allerta Stencil\", \"Allura\", \"Almendra\", \"Almendra Display\", \"Almendra SC\", \"Amarante\", \"Amaranth\", \"Amatic SC\", \"Amethysta\", \"Amiri\", \"Amita\", \"Anaheim\", \"Andada\", \"Andika\", \"Angkor\", \"Annie Use Your Telescope\", \"Anonymous Pro\", \"Antic\", \"Antic Didone\", \"Antic Slab\", \"Anton\", \"Arapey\", \"Arbutus\", \"Arbutus Slab\", \"Architects Daughter\", \"Archivo Black\", \"Archivo Narrow\", \"Arimo\", \"Arizonia\", \"Armata\", \"Artifika\", \"Arvo\", \"Arya\", \"Asap\", \"Asar\", \"Asset\", \"Astloch\", \"Asul\", \"Atomic Age\", \"Aubrey\", \"Audiowide\", \"Autour One\", \"Average\", \"Average Sans\", \"Averia Gruesa Libre\", \"Averia Libre\", \"Averia Sans Libre\", \"Averia Serif Libre\", \"Bad Script\", \"Balthazar\", \"Bangers\", \"Basic\", \"Battambang\", \"Baumans\", \"Bayon\", \"Belgrano\", \"Belleza\", \"BenchNine\", \"Bentham\", \"Berkshire Swash\", \"Bevan\", \"Bigelow Rules\", \"Bigshot One\", \"Bilbo\", \"Bilbo Swash Caps\", \"Biryani\", \"Bitter\", \"Black Ops One\", \"Bokor\", \"Bonbon\", \"Boogaloo\", \"Bowlby One\", \"Bowlby One SC\", \"Brawler\", \"Bree Serif\", \"Bubblegum Sans\", \"Bubbler One\", \"Buda\", \"Buenard\", \"Butcherman\", \"Butterfly Kids\", \"Cabin\", \"Cabin Condensed\", \"Cabin Sketch\", \"Caesar Dressing\", \"Cagliostro\", \"Calligraffitti\", \"Cambay\", \"Cambo\", \"Candal\", \"Cantarell\", \"Cantata One\", \"Cantora One\", \"Capriola\", \"Cardo\", \"Carme\", \"Carrois Gothic\", \"Carrois Gothic SC\", \"Carter One\", \"Catamaran\", \"Caudex\", \"Caveat\", \"Caveat Brush\", \"Cedarville Cursive\", \"Ceviche One\", \"Changa One\", \"Chango\", \"Chau Philomene One\", \"Chela One\", \"Chelsea Market\", \"Chenla\", \"Cherry Cream Soda\", \"Cherry Swash\", \"Chewy\", \"Chicle\", \"Chivo\", \"Chonburi\", \"Cinzel\", \"Cinzel Decorative\", \"Clicker Script\", \"Coda\", \"Coda Caption\", \"Codystar\", \"Combo\", \"Comfortaa\", \"Coming Soon\", \"Concert One\", \"Condiment\", \"Content\", \"Contrail One\", \"Convergence\", \"Cookie\", \"Copse\", \"Corben\", \"Courgette\", \"Cousine\", \"Coustard\", \"Covered By Your Grace\", \"Crafty Girls\", \"Creepster\", \"Crete Round\", \"Crimson Text\", \"Croissant One\", \"Crushed\", \"Cuprum\", \"Cutive\", \"Cutive Mono\", \"Damion\", \"Dancing Script\", \"Dangrek\", \"Dawning of a New Day\", \"Days One\", \"Dekko\", \"Delius\", \"Delius Swash Caps\", \"Delius Unicase\", \"Della Respira\", \"Denk One\", \"Devonshire\", \"Dhurjati\", \"Didact Gothic\", \"Diplomata\", \"Diplomata SC\", \"Domine\", \"Donegal One\", \"Doppio One\", \"Dorsa\", \"Dosis\", \"Dr Sugiyama\", \"Droid Sans\", \"Droid Sans Mono\", \"Droid Serif\", \"Duru Sans\", \"Dynalight\", \"EB Garamond\", \"Eagle Lake\", \"Eater\", \"Economica\", \"Eczar\", \"Ek Mukta\", \"Electrolize\", \"Elsie\", \"Elsie Swash Caps\", \"Emblema One\", \"Emilys Candy\", \"Engagement\", \"Englebert\", \"Enriqueta\", \"Erica One\", \"Esteban\", \"Euphoria Script\", \"Ewert\", \"Exo\", \"Exo 2\", \"Expletus Sans\", \"Fanwood Text\", \"Fascinate\", \"Fascinate Inline\", \"Faster One\", \"Fasthand\", \"Fauna One\", \"Federant\", \"Federo\", \"Felipa\", \"Fenix\", \"Finger Paint\", \"Fira Mono\", \"Fira Sans\", \"Fjalla One\", \"Fjord One\", \"Flamenco\", \"Flavors\", \"Fondamento\", \"Fontdiner Swanky\", \"Forum\", \"Francois One\", \"Freckle Face\", \"Fredericka the Great\", \"Fredoka One\", \"Freehand\", \"Fresca\", \"Frijole\", \"Fruktur\", \"Fugaz One\", \"GFS Didot\", \"GFS Neohellenic\", \"Gabriela\", \"Gafata\", \"Galdeano\", \"Galindo\", \"Gentium Basic\", \"Gentium Book Basic\", \"Geo\", \"Geostar\", \"Geostar Fill\", \"Germania One\", \"Gidugu\", \"Gilda Display\", \"Give You Glory\", \"Glass Antiqua\", \"Glegoo\", \"Gloria Hallelujah\", \"Goblin One\", \"Gochi Hand\", \"Gorditas\", \"Goudy Bookletter 1911\", \"Graduate\", \"Grand Hotel\", \"Gravitas One\", \"Great Vibes\", \"Griffy\", \"Gruppo\", \"Gudea\", \"Gurajada\", \"Habibi\", \"Halant\", \"Hammersmith One\", \"Hanalei\", \"Hanalei Fill\", \"Handlee\", \"Hanuman\", \"Happy Monkey\", \"Headland One\", \"Henny Penny\", \"Herr Von Muellerhoff\", \"Hind\", \"Hind Siliguri\", \"Hind Vadodara\", \"Holtwood One SC\", \"Homemade Apple\", \"Homenaje\", \"IM Fell DW Pica\", \"IM Fell DW Pica SC\", \"IM Fell Double Pica\", \"IM Fell Double Pica SC\", \"IM Fell English\", \"IM Fell English SC\", \"IM Fell French Canon\", \"IM Fell French Canon SC\", \"IM Fell Great Primer\", \"IM Fell Great Primer SC\", \"Iceberg\", \"Iceland\", \"Imprima\", \"Inconsolata\", \"Inder\", \"Indie Flower\", \"Inika\", \"Inknut Antiqua\", \"Irish Grover\", \"Istok Web\", \"Italiana\", \"Italianno\", \"Itim\", \"Jacques Francois\", \"Jacques Francois Shadow\", \"Jaldi\", \"Jim Nightshade\", \"Jockey One\", \"Jolly Lodger\", \"Josefin Sans\", \"Josefin Slab\", \"Joti One\", \"Judson\", \"Julee\", \"Julius Sans One\", \"Junge\", \"Jura\", \"Just Another Hand\", \"Just Me Again Down Here\", \"Kadwa\", \"Kalam\", \"Kameron\", \"Kantumruy\", \"Karla\", \"Karma\", \"Kaushan Script\", \"Kavoon\", \"Kdam Thmor\", \"Keania One\", \"Kelly Slab\", \"Kenia\", \"Khand\", \"Khmer\", \"Khula\", \"Kite One\", \"Knewave\", \"Kotta One\", \"Koulen\", \"Kranky\", \"Kreon\", \"Kristi\", \"Krona One\", \"Kurale\", \"La Belle Aurore\", \"Laila\", \"Lakki Reddy\", \"Lancelot\", \"Lateef\", \"Lato\", \"League Script\", \"Leckerli One\", \"Ledger\", \"Lekton\", \"Lemon\", \"Libre Baskerville\", \"Life Savers\", \"Lilita One\", \"Lily Script One\", \"Limelight\", \"Linden Hill\", \"Lobster\", \"Lobster Two\", \"Londrina Outline\", \"Londrina Shadow\", \"Londrina Sketch\", \"Londrina Solid\", \"Lora\", \"Love Ya Like A Sister\", \"Loved by the King\", \"Lovers Quarrel\", \"Luckiest Guy\", \"Lusitana\", \"Lustria\", \"Macondo\", \"Macondo Swash Caps\", \"Magra\", \"Maiden Orange\", \"Mako\", \"Mallanna\", \"Mandali\", \"Marcellus\", \"Marcellus SC\", \"Marck Script\", \"Margarine\", \"Marko One\", \"Marmelad\", \"Martel\", \"Martel Sans\", \"Marvel\", \"Mate\", \"Mate SC\", \"Maven Pro\", \"McLaren\", \"Meddon\", \"MedievalSharp\", \"Medula One\", \"Megrim\", \"Meie Script\", \"Merienda\", \"Merienda One\", \"Merriweather\", \"Merriweather Sans\", \"Metal\", \"Metal Mania\", \"Metamorphous\", \"Metrophobic\", \"Michroma\", \"Milonga\", \"Miltonian\", \"Miltonian Tattoo\", \"Miniver\", \"Miss Fajardose\", \"Modak\", \"Modern Antiqua\", \"Molengo\", \"Molle\", \"Monda\", \"Monofett\", \"Monoton\", \"Monsieur La Doulaise\", \"Montaga\", \"Montez\", \"Montserrat\", \"Montserrat Alternates\", \"Montserrat Subrayada\", \"Moul\", \"Moulpali\", \"Mountains of Christmas\", \"Mouse Memoirs\", \"Mr Bedfort\", \"Mr Dafoe\", \"Mr De Haviland\", \"Mrs Saint Delafield\", \"Mrs Sheppards\", \"Muli\", \"Mystery Quest\", \"NTR\", \"Neucha\", \"Neuton\", \"New Rocker\", \"News Cycle\", \"Niconne\", \"Nixie One\", \"Nobile\", \"Nokora\", \"Norican\", \"Nosifer\", \"Nothing You Could Do\", \"Noticia Text\", \"Noto Sans\", \"Noto Serif\", \"Nova Cut\", \"Nova Flat\", \"Nova Mono\", \"Nova Oval\", \"Nova Round\", \"Nova Script\", \"Nova Slim\", \"Nova Square\", \"Numans\", \"Nunito\", \"Odor Mean Chey\", \"Offside\", \"Old Standard TT\", \"Oldenburg\", \"Oleo Script\", \"Oleo Script Swash Caps\", \"Open Sans\", \"Open Sans Condensed\", \"Oranienbaum\", \"Orbitron\", \"Oregano\", \"Orienta\", \"Original Surfer\", \"Oswald\", \"Over the Rainbow\", \"Overlock\", \"Overlock SC\", \"Ovo\", \"Oxygen\", \"Oxygen Mono\", \"PT Mono\", \"PT Sans\", \"PT Sans Caption\", \"PT Sans Narrow\", \"PT Serif\", \"PT Serif Caption\", \"Pacifico\", \"Palanquin\", \"Palanquin Dark\", \"Paprika\", \"Parisienne\", \"Passero One\", \"Passion One\", \"Pathway Gothic One\", \"Patrick Hand\", \"Patrick Hand SC\", \"Patua One\", \"Paytone One\", \"Peddana\", \"Peralta\", \"Permanent Marker\", \"Petit Formal Script\", \"Petrona\", \"Philosopher\", \"Piedra\", \"Pinyon Script\", \"Pirata One\", \"Plaster\", \"Play\", \"Playball\", \"Playfair Display\", \"Playfair Display SC\", \"Podkova\", \"Poiret One\", \"Poller One\", \"Poly\", \"Pompiere\", \"Pontano Sans\", \"Poppins\", \"Port Lligat Sans\", \"Port Lligat Slab\", \"Pragati Narrow\", \"Prata\", \"Preahvihear\", \"Press Start 2P\", \"Princess Sofia\", \"Prociono\", \"Prosto One\", \"Puritan\", \"Purple Purse\", \"Quando\", \"Quantico\", \"Quattrocento\", \"Quattrocento Sans\", \"Questrial\", \"Quicksand\", \"Quintessential\", \"Qwigley\", \"Racing Sans One\", \"Radley\", \"Rajdhani\", \"Raleway\", \"Raleway Dots\", \"Ramabhadra\", \"Ramaraja\", \"Rambla\", \"Rammetto One\", \"Ranchers\", \"Rancho\", \"Ranga\", \"Rationale\", \"Ravi Prakash\", \"Redressed\", \"Reenie Beanie\", \"Revalia\", \"Rhodium Libre\", \"Ribeye\", \"Ribeye Marrow\", \"Righteous\", \"Risque\", \"Roboto\", \"Roboto Condensed\", \"Roboto Mono\", \"Roboto Slab\", \"Rochester\", \"Rock Salt\", \"Rokkitt\", \"Romanesco\", \"Ropa Sans\", \"Rosario\", \"Rosarivo\", \"Rouge Script\", \"Rozha One\", \"Rubik\", \"Rubik Mono One\", \"Rubik One\", \"Ruda\", \"Rufina\", \"Ruge Boogie\", \"Ruluko\", \"Rum Raisin\", \"Ruslan Display\", \"Russo One\", \"Ruthie\", \"Rye\", \"Sacramento\", \"Sahitya\", \"Sail\", \"Salsa\", \"Sanchez\", \"Sancreek\", \"Sansita One\", \"Sarala\", \"Sarina\", \"Sarpanch\", \"Satisfy\", \"Scada\", \"Scheherazade\", \"Schoolbell\", \"Seaweed Script\", \"Sevillana\", \"Seymour One\", \"Shadows Into Light\", \"Shadows Into Light Two\", \"Shanti\", \"Share\", \"Share Tech\", \"Share Tech Mono\", \"Shojumaru\", \"Short Stack\", \"Siemreap\", \"Sigmar One\", \"Signika\", \"Signika Negative\", \"Simonetta\", \"Sintony\", \"Sirin Stencil\", \"Six Caps\", \"Skranji\", \"Slabo 13px\", \"Slabo 27px\", \"Slackey\", \"Smokum\", \"Smythe\", \"Sniglet\", \"Snippet\", \"Snowburst One\", \"Sofadi One\", \"Sofia\", \"Sonsie One\", \"Sorts Mill Goudy\", \"Source Code Pro\", \"Source Sans Pro\", \"Source Serif Pro\", \"Special Elite\", \"Spicy Rice\", \"Spinnaker\", \"Spirax\", \"Squada One\", \"Sree Krushnadevaraya\", \"Stalemate\", \"Stalinist One\", \"Stardos Stencil\", \"Stint Ultra Condensed\", \"Stint Ultra Expanded\", \"Stoke\", \"Strait\", \"Sue Ellen Francisco\", \"Sumana\", \"Sunshiney\", \"Supermercado One\", \"Sura\", \"Suranna\", \"Suravaram\", \"Suwannaphum\", \"Swanky and Moo Moo\", \"Syncopate\", \"Tangerine\", \"Taprom\", \"Tauri\", \"Teko\", \"Telex\", \"Tenali Ramakrishna\", \"Tenor Sans\", \"Text Me One\", \"The Girl Next Door\", \"Tienne\", \"Tillana\", \"Timmana\", \"Tinos\", \"Titan One\", \"Titillium Web\", \"Trade Winds\", \"Trocchi\", \"Trochut\", \"Trykker\", \"Tulpen One\", \"Ubuntu\", \"Ubuntu Condensed\", \"Ubuntu Mono\", \"Ultra\", \"Uncial Antiqua\", \"Underdog\", \"Unica One\", \"UnifrakturCook\", \"UnifrakturMaguntia\", \"Unkempt\", \"Unlock\", \"Unna\", \"VT323\", \"Vampiro One\", \"Varela\", \"Varela Round\", \"Vast Shadow\", \"Vesper Libre\", \"Vibur\", \"Vidaloka\", \"Viga\", \"Voces\", \"Volkhov\", \"Vollkorn\", \"Voltaire\", \"Waiting for the Sunrise\", \"Wallpoet\", \"Walter Turncoat\", \"Warnes\", \"Wellfleet\", \"Wendy One\", \"Wire One\", \"Work Sans\", \"Yanone Kaffeesatz\", \"Yantramanav\", \"Yellowtail\", \"Yeseva One\", \"Yesteryear\", \"Zeyada\"];\n\n}).call(this);\n","/*\nol-mapbox-style - Use Mapbox Style objects with OpenLayers\nCopyright 2016-present ol-mapbox-style contributors\nLicense: https://raw.githubusercontent.com/openlayers/ol-mapbox-style/master/LICENSE\n*/\n\nimport mb2css from 'mapbox-to-css-font';\nimport applyStyleFunction, {getValue} from './stylefunction';\nimport googleFonts from 'webfont-matcher/lib/fonts/google';\nimport {fromLonLat} from 'ol/proj';\nimport {createXYZ} from 'ol/tilegrid';\nimport TileGrid from 'ol/tilegrid/TileGrid';\nimport Map from 'ol/Map';\nimport View from 'ol/View';\nimport GeoJSON from 'ol/format/GeoJSON';\nimport MVT from 'ol/format/MVT';\nimport {unByKey} from 'ol/Observable';\nimport TileLayer from 'ol/layer/Tile';\nimport VectorLayer from 'ol/layer/Vector';\nimport VectorTileLayer from 'ol/layer/VectorTile';\nimport TileJSON from 'ol/source/TileJSON';\nimport VectorSource from 'ol/source/Vector';\nimport VectorTileSource from 'ol/source/VectorTile';\nimport {Color} from '@mapbox/mapbox-gl-style-spec';\nimport {assign, defaultResolutions} from './util';\n\n/**\n * @typedef {import(\"ol/Map\").default} PluggableMap\n * @typedef {import(\"ol/layer/Layer\").default} Layer\n * @typedef {import(\"ol/source/Source\").default} Source\n * @private\n */\n\nconst tilejsonCache = {};\n\nconst fontFamilyRegEx = /font-family: ?([^;]*);/;\nconst stripQuotesRegEx = /(\"|')/g;\nlet loadedFontFamilies;\nfunction hasFontFamily(family) {\n if (!loadedFontFamilies) {\n loadedFontFamilies = {};\n const styleSheets = document.styleSheets;\n for (let i = 0, ii = styleSheets.length; i < ii; ++i) {\n const styleSheet = /** @type {CSSStyleSheet} */ (styleSheets[i]);\n try {\n const cssRules = styleSheet.rules || styleSheet.cssRules;\n if (cssRules) {\n for (let j = 0, jj = cssRules.length; j < jj; ++j) {\n const cssRule = cssRules[j];\n if (cssRule.type == 5) {\n const match = cssRule.cssText.match(fontFamilyRegEx);\n loadedFontFamilies[match[1].replace(stripQuotesRegEx, '')] = true;\n }\n }\n }\n } catch (e) {\n // empty catch block\n }\n }\n }\n return family in loadedFontFamilies;\n}\n\nconst processedFontFamilies = {};\nconst googleFamilies = googleFonts.getNames();\n\n/**\n * @private\n * @param {Array} fonts Fonts.\n * @return {Array} Processed fonts.\n */\nfunction getFonts(fonts) {\n const fontsKey = fonts.toString();\n if (fontsKey in processedFontFamilies) {\n return fonts;\n }\n const googleFontDescriptions = fonts.map(function(font) {\n const parts = mb2css(font, 1).split(' ');\n return [parts.slice(3).join(' ').replace(/\"/g, ''), parts[1] + parts[0]];\n });\n for (let i = 0, ii = googleFontDescriptions.length; i < ii; ++i) {\n const googleFontDescription = googleFontDescriptions[i];\n const family = googleFontDescription[0];\n if (!hasFontFamily(family) && googleFamilies.indexOf(family) !== -1) {\n const fontUrl = 'https://fonts.googleapis.com/css?family=' + family.replace(/ /g, '+') + ':' + googleFontDescription[1];\n if (!document.querySelector('link[href=\"' + fontUrl + '\"]')) {\n const markup = document.createElement('link');\n markup.href = fontUrl;\n markup.rel = 'stylesheet';\n document.head.appendChild(markup);\n }\n }\n }\n processedFontFamilies[fontsKey] = true;\n return fonts;\n}\n\nconst spriteRegEx = /^(.*)(\\?.*)$/;\n\nfunction withPath(url, path) {\n if (path && url.indexOf('.') === 0) {\n url = path + url;\n }\n return url;\n}\n\nfunction toSpriteUrl(url, path, extension) {\n url = withPath(url, path);\n const parts = url.match(spriteRegEx);\n return parts ?\n parts[1] + extension + (parts.length > 2 ? parts[2] : '') :\n url + extension;\n}\n\n/**\n * ```js\n * import {applyStyle} from 'ol-mapbox-style';\n * ```\n *\n * Applies a style function to an `ol.layer.VectorTile` or `ol.layer.Vector`\n * with an `ol.source.VectorTile` or an `ol.source.Vector`. The style function\n * will render all layers from the `glStyle` object that use the specified\n * `source`, or a subset of layers from the same source. The source needs to be\n * a `\"type\": \"vector\"` or `\"type\": \"geojson\"` source.\n *\n * Two additional properties will be set on the provided layer:\n *\n * * `mapbox-source`: The `id` of the Mapbox Style document's source that the\n * OpenLayers layer was created from. Usually `apply()` creates one\n * OpenLayers layer per Mapbox Style source, unless the layer stack has\n * layers from different sources in between.\n * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are\n * included in the OpenLayers layer.\n *\n * @param {VectorTileLayer|VectorLayer} layer OpenLayers layer.\n * @param {string|Object} glStyle Mapbox Style object.\n * @param {string|Array<string>} source `source` key or an array of layer `id`s from the\n * Mapbox Style object. When a `source` key is provided, all layers for the\n * specified source will be included in the style function. When layer `id`s\n * are provided, they must be from layers that use the same source.\n * @param {string} [path=undefined] Path of the style file. Only required when\n * a relative path is used with the `\"sprite\"` property of the style.\n * @param {Array<number>} [resolutions=undefined] Resolutions for mapping resolution to zoom level.\n * @return {Promise} Promise which will be resolved when the style can be used\n * for rendering.\n */\nexport function applyStyle(layer, glStyle, source, path, resolutions) {\n return new Promise(function(resolve, reject) {\n\n // TODO: figure out where best place to check source type is\n // Note that the source arg is an array of gl layer ids and each must be\n // dereferenced to get source type to validate\n if (typeof glStyle != 'object') {\n glStyle = JSON.parse(glStyle);\n }\n if (glStyle.version != 8) {\n return reject(new Error('glStyle version 8 required.'));\n }\n if (!(layer instanceof VectorLayer || layer instanceof VectorTileLayer)) {\n return reject(new Error('Can only apply to VectorLayer or VectorTileLayer'));\n }\n\n let spriteScale, spriteData, spriteImageUrl, style;\n function onChange() {\n if (!style && (!glStyle.sprite || spriteData)) {\n style = applyStyleFunction(layer, glStyle, source, resolutions, spriteData, spriteImageUrl, getFonts);\n if (!layer.getStyle()) {\n reject(new Error(`Nothing to show for source [${source}]`));\n } else {\n resolve();\n }\n } else if (style) {\n layer.setStyle(style);\n resolve();\n } else {\n reject(new Error('Something went wrong trying to apply style.'));\n }\n }\n\n if (glStyle.sprite) {\n spriteScale = window.devicePixelRatio >= 1.5 ? 0.5 : 1;\n const sizeFactor = spriteScale == 0.5 ? '@2x' : '';\n let spriteUrl = toSpriteUrl(glStyle.sprite, path, sizeFactor + '.json');\n\n fetch(spriteUrl, {credentials: 'same-origin'})\n .then(function(response) {\n if (!response.ok && (sizeFactor !== '')) {\n spriteUrl = toSpriteUrl(glStyle.sprite, path, '.json');\n return fetch(spriteUrl, {credentials: 'same-origin'});\n } else {\n return response;\n }\n })\n .then(function(response) {\n if (response.ok) {\n return response.json();\n } else {\n reject(new Error(`Problem fetching sprite from ${spriteUrl}: ${response.statusText}`));\n }\n })\n .then(function(spritesJson) {\n if ((spritesJson === undefined)) {\n return reject(new Error('No sprites found.'));\n }\n spriteData = spritesJson;\n spriteImageUrl = toSpriteUrl(glStyle.sprite, path, sizeFactor + '.png');\n onChange();\n })\n .catch(function(err) {\n reject(new Error(`Sprites cannot be loaded: ${spriteUrl}: ${err.message}`));\n });\n } else {\n onChange();\n }\n\n });\n}\n\nconst emptyObj = {};\n\nfunction setBackground(map, layer) {\n const background = {\n type: layer.type\n };\n function updateStyle() {\n const element = map.getTargetElement();\n if (!element) {\n return;\n }\n const layout = layer.layout || {};\n const paint = layer.paint || {};\n background['paint'] = paint;\n background.id = 'olms-bg-' + paint['background-opacity'] + paint['background-color'];\n const zoom = map.getView().getZoom();\n if (paint['background-color'] !== undefined) {\n const bg = getValue(background, 'paint', 'background-color', zoom, emptyObj);\n element.style.background = Color.parse(bg).toString();\n }\n if (paint['background-opacity'] !== undefined) {\n element.style.opacity = getValue(background, 'paint', 'background-opacity', zoom, emptyObj);\n }\n if (layout.visibility == 'none') {\n element.style.backgroundColor = '';\n element.style.opacity = '';\n }\n }\n if (map.getTargetElement()) {\n updateStyle();\n }\n map.on(['change:resolution', 'change:target'], updateStyle);\n}\n\n/**\n * ```js\n * import {applyBackground} from 'ol-mapbox-style';\n * ```\n * Applies properties of the Mapbox Style's first `background` layer to the map.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {Object} glStyle Mapbox Style object.\n */\nexport function applyBackground(map, glStyle) {\n glStyle.layers.some(function(l) {\n if (l.type == 'background') {\n setBackground(map, l);\n return true;\n }\n });\n}\n\nfunction getSourceIdByRef(layers, ref) {\n let sourceId;\n layers.some(function(layer) {\n if (layer.id == ref) {\n sourceId = layer.source;\n return true;\n }\n });\n return sourceId;\n}\n\nfunction extentFromTileJSON(tileJSON) {\n const bounds = tileJSON.bounds;\n if (bounds) {\n const ll = fromLonLat([bounds[0], bounds[1]]);\n const tr = fromLonLat([bounds[2], bounds[3]]);\n return [ll[0], ll[1], tr[0], tr[1]];\n }\n}\n\nfunction setupVectorLayer(glSource, accessToken, url) {\n glSource = assign({}, glSource);\n const layer = new VectorTileLayer({\n declutter: true,\n visible: false\n });\n const cacheKey = JSON.stringify(glSource);\n let tilejson = tilejsonCache[cacheKey];\n if (!tilejson) {\n tilejson = tilejsonCache[cacheKey] = new TileJSON({\n url: glSource.tiles ? undefined : url,\n tileJSON: glSource.tiles ? glSource : undefined\n });\n }\n const key = tilejson.on('change', function() {\n const state = tilejson.getState();\n if (state === 'ready') {\n const tileJSONDoc = tilejson.getTileJSON();\n const tiles = Array.isArray(tileJSONDoc.tiles) ? tileJSONDoc.tiles : [tileJSONDoc.tiles];\n if (url) {\n for (let i = 0, ii = tiles.length; i < ii; ++i) {\n const tile = tiles[i];\n if (tile.indexOf('http') != 0) {\n tiles[i] = url.replace(/\\/?$/, '/') + tile.replace(/^\\//, '');\n }\n }\n }\n const tileGrid = tilejson.getTileGrid();\n const extent = extentFromTileJSON(tileJSONDoc);\n const minZoom = tileJSONDoc.minzoom || 0;\n const maxZoom = tileJSONDoc.maxzoom || 22;\n let source = tilejson.get('ol-source');\n if (source === undefined) {\n source = new VectorTileSource({\n attributions: tilejson.getAttributions(),\n format: new MVT(),\n tileGrid: new TileGrid({\n origin: tileGrid.getOrigin(0),\n extent: extent || tileGrid.getExtent(),\n minZoom: minZoom,\n resolutions: defaultResolutions.slice(0, maxZoom + 1),\n tileSize: 512\n }),\n urls: tiles\n });\n tilejson.set('ol-source', source);\n }\n unByKey(key);\n layer.setSource(source);\n } else if (state === 'error') {\n tilejson.set('ol-source', null);\n unByKey(key);\n layer.setSource(undefined);\n }\n });\n if (tilejson.getState() === 'ready') {\n tilejson.changed();\n }\n return layer;\n}\n\nfunction setupRasterLayer(glSource, url) {\n const layer = new TileLayer();\n const source = new TileJSON({\n transition: 0,\n url: glSource.tiles ? undefined : url,\n tileJSON: glSource.tiles ? glSource : undefined,\n crossOrigin: 'anonymous'\n });\n const key = source.on('change', function() {\n const state = source.getState();\n if (state === 'ready') {\n unByKey(key);\n const tileJSONDoc = /** @type {Object} */ (source.getTileJSON());\n const extent = extentFromTileJSON(tileJSONDoc);\n const tileGrid = source.getTileGrid();\n const tileSize = glSource.tileSize || tileJSONDoc.tileSize || 512;\n const minZoom = tileJSONDoc.minzoom || 0;\n const maxZoom = tileJSONDoc.maxzoom || 22;\n // Only works when using ES modules\n source.tileGrid = new TileGrid({\n origin: tileGrid.getOrigin(0),\n extent: extent || tileGrid.getExtent(),\n minZoom: minZoom,\n resolutions: createXYZ({\n maxZoom: maxZoom,\n tileSize: tileSize\n }).getResolutions(),\n tileSize: tileSize\n });\n layer.setSource(source);\n } else if (state === 'error') {\n unByKey(key);\n layer.setSource(undefined);\n }\n });\n source.setTileLoadFunction(function(tile, src) {\n if (src.indexOf('{bbox-epsg-3857}') != -1) {\n const bbox = source.getTileGrid().getTileCoordExtent(tile.getTileCoord());\n src = src.replace('{bbox-epsg-3857}', bbox.toString());\n }\n const img = /** @type {import(\"ol/ImageTile\").default} */ (tile).getImage();\n /** @type {HTMLImageElement} */ (img).src = src;\n });\n return layer;\n}\n\nconst geoJsonFormat = new GeoJSON();\nfunction setupGeoJSONLayer(glSource, path) {\n const data = glSource.data;\n let features, geoJsonUrl;\n if (typeof data == 'string') {\n geoJsonUrl = withPath(data, path);\n } else {\n features = geoJsonFormat.readFeatures(data, {featureProjection: 'EPSG:3857'});\n }\n return new VectorLayer({\n source: new VectorSource({\n attributions: glSource.attribution,\n features: features,\n format: geoJsonFormat,\n url: geoJsonUrl\n }),\n visible: false\n });\n}\n\nfunction updateRasterLayerProperties(glLayer, layer, view) {\n const zoom = view.getZoom();\n const opacity = getValue(glLayer, 'paint', 'raster-opacity', zoom, emptyObj);\n layer.setOpacity(opacity);\n}\n\nfunction processStyle(glStyle, map, baseUrl, host, path, accessToken) {\n const promises = [];\n let view = map.getView();\n if (!view.isDef() && !view.getRotation() && !view.getResolutions()) {\n view = new View({\n maxResolution: defaultResolutions[0]\n });\n map.setView(view);\n }\n\n if ('center' in glStyle && !view.getCenter()) {\n view.setCenter(fromLonLat(glStyle.center));\n }\n if ('zoom' in glStyle && view.getZoom() === undefined) {\n view.setResolution(defaultResolutions[0] / Math.pow(2, glStyle.zoom));\n }\n if (!view.getCenter() || view.getZoom() === undefined) {\n view.fit(view.getProjection().getExtent(), {\n nearest: true,\n size: map.getSize()\n });\n }\n if (glStyle.sprite) {\n if (glStyle.sprite.indexOf('mapbox://') == 0) {\n glStyle.sprite = baseUrl + '/sprite' + accessToken;\n } else if (glStyle.sprite.indexOf('http') != 0) {\n glStyle.sprite = (host ? (host + path) : '') + glStyle.sprite + accessToken;\n }\n }\n\n const glLayers = glStyle.layers;\n let layerIds = [];\n\n let glLayer, glSource, glSourceId, id, layer, url;\n for (let i = 0, ii = glLayers.length; i < ii; ++i) {\n glLayer = glLayers[i];\n const type = glLayer.type;\n if (type == 'heatmap' || type == 'hillshade') {\n //FIXME Unsupported layer type\n } else if (type == 'background') {\n setBackground(map, glLayer);\n } else {\n id = glLayer.source || getSourceIdByRef(glLayers, glLayer.ref);\n // this technique assumes gl layers will be in a particular order\n if (id != glSourceId) {\n if (layerIds.length) {\n promises.push(finalizeLayer(layer, layerIds, glStyle, path, map));\n layerIds = [];\n }\n glSource = glStyle.sources[id];\n url = glSource.url;\n if (url) {\n url = withPath(url, path);\n if (url.indexOf('mapbox://') == 0) {\n const mapid = url.replace('mapbox://', '');\n glSource.tiles = ['a', 'b', 'c', 'd'].map(function(host) {\n return 'https://' + host + '.tiles.mapbox.com/v4/' + mapid +\n '/{z}/{x}/{y}.' +\n (glSource.type == 'vector' ? 'vector.pbf' : 'png') +\n accessToken;\n });\n } else if (url.indexOf('/') === 0 && host.indexOf('http') === 0) {\n url = host + url;\n }\n }\n\n\n if (glSource.type == 'vector') {\n layer = setupVectorLayer(glSource, accessToken, url);\n } else if (glSource.type == 'raster') {\n layer = setupRasterLayer(glSource, url);\n layer.setVisible(glLayer.layout ? glLayer.layout.visibility !== 'none' : true);\n view.on('change:resolution', updateRasterLayerProperties.bind(this, glLayer, layer, view));\n updateRasterLayerProperties(glLayer, layer, view);\n } else if (glSource.type == 'geojson') {\n layer = setupGeoJSONLayer(glSource, path);\n }\n glSourceId = id;\n if (layer) {\n layer.set('mapbox-source', glSourceId);\n }\n }\n layerIds.push(glLayer.id);\n }\n }\n promises.push(finalizeLayer(layer, layerIds, glStyle, path, map));\n map.set('mapbox-style', glStyle);\n return Promise.all(promises);\n}\n\n/**\n * ```js\n * import olms from 'ol-mapbox-style';\n * ```\n *\n * Loads and applies a Mapbox Style object to an OpenLayers Map. This includes\n * the map background, the layers, the center and the zoom.\n *\n * The center and zoom will only be set if present in the Mapbox Style document,\n * and if not already set on the OpenLayers map.\n *\n * Layers will be added to the OpenLayers map, without affecting any layers that\n * might already be set on the map.\n *\n * Layers added by `apply()` will have two additional properties:\n *\n * * `mapbox-source`: The `id` of the Mapbox Style document's source that the\n * OpenLayers layer was created from. Usually `apply()` creates one\n * OpenLayers layer per Mapbox Style source, unless the layer stack has\n * layers from different sources in between.\n * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are\n * included in the OpenLayers layer.\n *\n * This function sets an additional `mapbox-style` property on the OpenLayers\n * map instance, which holds the Mapbox Style object.\n *\n * @param {PluggableMap|HTMLElement|string} map Either an existing OpenLayers Map\n * instance, or a HTML element, or the id of a HTML element that will be the\n * target of a new OpenLayers Map.\n * @param {string|Object} style JSON style object or style url pointing to a\n * Mapbox Style object. When using Mapbox APIs, the url must contain an access\n * token and look like\n * `https://api.mapbox.com/styles/v1/mapbox/bright-v9?access_token=[your_access_token_here]`.\n * When passed as JSON style object, all OpenLayers layers created by `apply()`\n * will be immediately available, but they may not have a source yet (i.e. when\n * they are defined by a TileJSON url in the Mapbox Style document). When passed\n * as style url, layers will be added to the map when the Mapbox Style document\n * is loaded and parsed.\n * @return {Promise} A promise that resolves after all layers have been added to\n * the OpenLayers Map instance, their sources set, and their styles applied. the\n * `resolve` callback will be called with the OpenLayers Map instance as\n * argument.\n */\nexport default function olms(map, style) {\n\n let accessToken, baseUrl, host, path, promise;\n accessToken = baseUrl = host = path = '';\n\n if (typeof map === 'string' || map instanceof HTMLElement) {\n map = new Map({\n target: map\n });\n }\n\n if (typeof style === 'string') {\n const parts = style.match(spriteRegEx);\n if (parts) {\n baseUrl = parts[1];\n accessToken = parts.length > 2 ? parts[2] : '';\n }\n promise = new Promise(function(resolve, reject) {\n fetch(style, {\n credentials: 'same-origin'\n })\n .then(function(response) {\n return response.json();\n })\n .then(function(glStyle) {\n const a = /** @type {HTMLAnchorElement} */ (document.createElement('A'));\n a.href = style;\n const href = a.href;\n path = a.pathname.split('/').slice(0, -1).join('/') + '/';\n host = href.substr(0, href.indexOf(path));\n\n processStyle(glStyle, map, baseUrl, host, path, accessToken)\n .then(function() {\n resolve(map);\n })\n .catch(reject);\n })\n .catch(function(err) {\n reject(new Error(`Could not load ${style}: ${err.message}`));\n });\n });\n } else {\n promise = new Promise(function(resolve, reject) {\n processStyle(style, map)\n .then(function() {\n resolve(map);\n })\n .catch(reject);\n });\n }\n\n return promise;\n}\n\n/**\n * ```js\n * import {apply} from 'ol-mapbox-style';\n * ```\n * Like `olms`, but returns an `ol/Map` instance instead of a `Promise`.\n *\n * @param {PluggableMap|HTMLElement|string} map Either an existing OpenLayers Map\n * instance, or a HTML element, or the id of a HTML element that will be the\n * target of a new OpenLayers Map.\n * @param {string|Object} style JSON style object or style url pointing to a\n * Mapbox Style object. When using Mapbox APIs, the url must contain an access\n * token and look like\n * `https://api.mapbox.com/styles/v1/mapbox/bright-v9?access_token=[your_access_token_here]`.\n * When passed as JSON style object, all OpenLayers layers created by `apply()`\n * will be immediately available, but they may not have a source yet (i.e. when\n * they are defined by a TileJSON url in the Mapbox Style document). When passed\n * as style url, layers will be added to the map when the Mapbox Style document\n * is loaded and parsed.\n * @return {PluggableMap} The OpenLayers Map instance that will be populated with the\n * contents described in the Mapbox Style object.\n */\nexport function apply(map, style) {\n if (typeof map === 'string' || map instanceof HTMLElement) {\n map = new Map({\n target: map\n });\n }\n setTimeout(function() {\n olms(map, style);\n }, 0);\n return map;\n}\n\n\n/**\n * @private\n * If layerIds is not empty, applies the style specified in glStyle to the layer,\n * and adds the layer to the map.\n *\n * The layer may not yet have a source when the function is called. If so, the style\n * is applied to the layer via a once listener on the 'change:source' event.\n *\n * @param {Layer} layer An OpenLayers layer instance.\n * @param {Array<string>} layerIds Array containing layer ids of already-processed layers.\n * @param {Object} glStyle Style as a JSON object.\n * @param {string|undefined} path The path part of the style URL. Only required\n * when a relative path is used with the `\"sprite\"` property of the style.\n * @param {PluggableMap} map OpenLayers Map.\n * @return {Promise} Returns a promise that resolves after the source has\n * been set on the specified layer, and the style has been applied.\n */\nfunction finalizeLayer(layer, layerIds, glStyle, path, map) {\n let minZoom = 24;\n let maxZoom = 0;\n const glLayers = glStyle.layers;\n for (let i = 0, ii = glLayers.length; i < ii; ++i) {\n const glLayer = glLayers[i];\n if (layerIds.indexOf(glLayer.id) !== -1) {\n minZoom = Math.min('minzoom' in glLayer ? glLayer.minzoom : 0, minZoom);\n maxZoom = Math.max('maxzoom' in glLayer ? glLayer.maxzoom : 24, maxZoom);\n }\n }\n return new Promise(function(resolve, reject) {\n const setStyle = function() {\n const source = layer.getSource();\n if (!source || source.getState() === 'error') {\n reject(new Error('Error accessing data for source ' + layer.get('mapbox-source')));\n return;\n }\n if (typeof source.getTileGrid === 'function') {\n const tileGrid = source.getTileGrid();\n if (tileGrid) {\n const sourceMinZoom = tileGrid.getMinZoom();\n if (minZoom > 0 || sourceMinZoom > 0) {\n layer.setMaxResolution(Math.min(defaultResolutions[minZoom], tileGrid.getResolution(sourceMinZoom)) + 1e-9);\n }\n if (maxZoom < 24) {\n layer.setMinResolution(defaultResolutions[maxZoom] + 1e-9);\n }\n }\n }\n if (source instanceof VectorSource || source instanceof VectorTileSource) {\n applyStyle(/** @type {import(\"ol/layer/Vector\").default|import(\"ol/layer/VectorTile\").default} */ (layer), glStyle, layerIds, path).then(function() {\n layer.setVisible(true);\n resolve();\n }, function(e) {\n reject(e);\n });\n } else {\n resolve();\n }\n };\n\n layer.set('mapbox-layers', layerIds);\n if (map.getLayers().getArray().indexOf(layer) === -1) {\n map.addLayer(layer);\n }\n\n if (layer.getSource()) {\n setStyle();\n } else {\n layer.once('change:source', setStyle);\n }\n });\n}\n\n\n/**\n * ```js\n * import {getLayer} from 'ol-mapbox-style';\n * ```\n * Get the OpenLayers layer instance that contains the provided Mapbox Style\n * `layer`. Note that multiple Mapbox Style layers are combined in a single\n * OpenLayers layer instance when they use the same Mapbox Style `source`.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {string} layerId Mapbox Style layer id.\n * @return {Layer} OpenLayers layer instance.\n */\nexport function getLayer(map, layerId) {\n const layers = map.getLayers().getArray();\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const mapboxLayers = layers[i].get('mapbox-layers');\n if (mapboxLayers && mapboxLayers.indexOf(layerId) !== -1) {\n return /** @type {Layer} */ (layers[i]);\n }\n }\n}\n\n/**\n * ```js\n * import {getLayers} from 'ol-mapbox-style';\n * ```\n * Get the OpenLayers layer instances for the provided Mapbox Style `source`.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Array<Layer>} OpenLayers layer instances.\n */\nexport function getLayers(map, sourceId) {\n const result = [];\n const layers = map.getLayers().getArray();\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n if (layers[i].get('mapbox-source') === sourceId) {\n result.push(/** @type {Layer} */ (layers[i]));\n }\n }\n return result;\n}\n\n/**\n * ```js\n * import {getSource} from 'ol-mapbox-style';\n * ```\n * Get the OpenLayers source instance for the provided Mapbox Style `source`.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Source} OpenLayers source instance.\n */\nexport function getSource(map, sourceId) {\n const layers = map.getLayers().getArray();\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const source = /** @type {Layer} */ (layers[i]).getSource();\n if (layers[i].get('mapbox-source') === sourceId) {\n return source;\n }\n }\n}\n\nexport {\n finalizeLayer as _finalizeLayer,\n getFonts as _getFonts\n};\n","/**\n * @module ol/layer/MapboxVector\n */\nimport BaseEvent from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport MVT from '../format/MVT.js';\nimport SourceState from '../source/State.js';\nimport VectorTileLayer from '../layer/VectorTile.js';\nimport VectorTileSource from '../source/VectorTile.js';\nimport {applyStyle} from 'ol-mapbox-style';\n\nconst mapboxBaseUrl = 'https://api.mapbox.com';\n\n/**\n * Gets the path from a mapbox:// URL.\n * @param {string} url The Mapbox URL.\n * @return {string} The path.\n * @private\n */\nexport function getMapboxPath(url) {\n const startsWith = 'mapbox://';\n if (url.indexOf(startsWith) !== 0) {\n return '';\n }\n return url.slice(startsWith.length);\n}\n\n/**\n * Turns mapbox:// sprite URLs into resolvable URLs.\n * @param {string} url The sprite URL.\n * @param {string} token The access token.\n * @return {string} A resolvable URL.\n * @private\n */\nexport function normalizeSpriteUrl(url, token) {\n const mapboxPath = getMapboxPath(url);\n if (!mapboxPath) {\n return url;\n }\n const startsWith = 'sprites/';\n if (mapboxPath.indexOf(startsWith) !== 0) {\n throw new Error(`unexpected sprites url: ${url}`);\n }\n const sprite = mapboxPath.slice(startsWith.length);\n\n return `${mapboxBaseUrl}/styles/v1/${sprite}/sprite?access_token=${token}`;\n}\n\n/**\n * Turns mapbox:// glyphs URLs into resolvable URLs.\n * @param {string} url The glyphs URL.\n * @param {string} token The access token.\n * @return {string} A resolvable URL.\n * @private\n */\nexport function normalizeGlyphsUrl(url, token) {\n const mapboxPath = getMapboxPath(url);\n if (!mapboxPath) {\n return url;\n }\n const startsWith = 'fonts/';\n if (mapboxPath.indexOf(startsWith) !== 0) {\n throw new Error(`unexpected fonts url: ${url}`);\n }\n const font = mapboxPath.slice(startsWith.length);\n\n return `${mapboxBaseUrl}/fonts/v1/${font}/0-255.pbf?access_token=${token}`;\n}\n\n/**\n * Turns mapbox:// style URLs into resolvable URLs.\n * @param {string} url The style URL.\n * @param {string} token The access token.\n * @return {string} A resolvable URL.\n * @private\n */\nexport function normalizeStyleUrl(url, token) {\n const mapboxPath = getMapboxPath(url);\n if (!mapboxPath) {\n return url;\n }\n const startsWith = 'styles/';\n if (mapboxPath.indexOf(startsWith) !== 0) {\n throw new Error(`unexpected style url: ${url}`);\n }\n const style = mapboxPath.slice(startsWith.length);\n\n return `${mapboxBaseUrl}/styles/v1/${style}?&access_token=${token}`;\n}\n\n/**\n * Turns mapbox:// source URLs into vector tile URL templates.\n * @param {string} url The source URL.\n * @param {string} token The access token.\n * @return {string} A vector tile template.\n * @private\n */\nexport function normalizeSourceUrl(url, token) {\n const mapboxPath = getMapboxPath(url);\n if (!mapboxPath) {\n return url;\n }\n return `https://{a-d}.tiles.mapbox.com/v4/${mapboxPath}/{z}/{x}/{y}.vector.pbf?access_token=${token}`;\n}\n\n/**\n * @classdesc\n * Event emitted on configuration or loading error.\n */\nclass ErrorEvent extends BaseEvent {\n /**\n * @param {Error} error error object.\n */\n constructor(error) {\n super(EventType.ERROR);\n\n /**\n * @type {Error}\n */\n this.error = error;\n }\n}\n\n/**\n * @typedef {Object} StyleObject\n * @property {Object<string, SourceObject>} sources The style sources.\n * @property {string} sprite The sprite URL.\n * @property {string} glyphs The glyphs URL.\n * @property {Array<LayerObject>} layers The style layers.\n */\n\n/**\n * @typedef {Object} SourceObject\n * @property {string} url The source URL.\n * @property {SourceType} type The source type.\n */\n\n/**\n * The Mapbox source type.\n * @enum {string}\n */\nconst SourceType = {\n VECTOR: 'vector',\n};\n\n/**\n * @typedef {Object} LayerObject\n * @property {string} id The layer id.\n * @property {string} source The source id.\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} styleUrl The URL of the Mapbox style object to use for this layer. For a\n * style created with Mapbox Studio and hosted on Mapbox, this will look like\n * 'mapbox://styles/you/your-style'.\n * @property {string} accessToken The access token for your Mapbox style.\n * @property {string} [source] If your style uses more than one source, you need to use either the\n * `source` property or the `layers` property to limit rendering to a single vector source. The\n * `source` property corresponds to the id of a vector source in your Mapbox style.\n * @property {Array<string>} [layers] Limit rendering to the list of included layers. All layers\n * must share the same vector soource. If your style uses more than one source, you need to use\n * either the `source` property or the `layers` property to limit rendering to a single vector\n * source.\n * @property {boolean} [declutter=true] Declutter images and text. Decluttering is applied to all\n * image and text styles of all Vector and VectorTile layers that have set this to `true`. The priority\n * is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.\n * Higher z-index means higher priority. Within the same z-index, a feature rendered before another has\n * higher priority.\n * @property {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 {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the tile extent used by the\n * renderer when getting features from the vector tile for the rendering or hit-detection.\n * Recommended value: Vector tiles are usually generated with a buffer, so this value should match\n * the largest possible buffer of the used tiles. It should be at least the size of the largest\n * point symbol or line width.\n * @property {import(\"./VectorTileRenderType.js\").default|string} [renderMode='hybrid'] Render mode for vector tiles:\n * * `'image'`: Vector tiles are rendered as images. Great performance, but point symbols and texts\n * are always rotated with the view and pixels are scaled during zoom animations. When `declutter`\n * is set to `true`, the decluttering is done per tile resulting in labels and point symbols getting\n * cut off at tile boundaries.\n * * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom\n * animations. Point symbols and texts are accurately rendered as vectors and can stay upright on\n * rotated views.\n * * `'vector'`: Everything is rendered as vectors. Use this mode for improved performance on vector\n * tile layers with only a few rendered features (e.g. for highlighting a subset of features of\n * another layer with the same source).\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be\n * recreated during animations. This means that no vectors will be shown clipped, but the setting\n * will have a performance impact for large amounts of vector data. When set to `false`, batches\n * will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will be\n * recreated during interactions. See also `updateWhileAnimating`.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.\n */\n\n/**\n * @classdesc\n * A vector tile layer based on a Mapbox style that uses a single vector source. Configure\n * the layer with the `styleUrl` and `accessToken` shown in Mapbox Studio's share panel.\n * If the style uses more than one source, use the `source` property to choose a single\n * vector source. If you want to render a subset of the layers in the style, use the `layers`\n * property (all layers must share the same vector source). See the constructor options for\n * more detail.\n *\n * var map = new Map({\n * view: new View({\n * center: [0, 0],\n * zoom: 1\n * }),\n * layers: [\n * new MapboxVector({\n * styleUrl: 'mapbox://styles/mapbox/bright-v9',\n * accessToken: 'your-mapbox-access-token-here'\n * })\n * ],\n * target: 'map'\n * });\n *\n * On configuration or loading error, the layer will trigger an `'error'` event. Listeners\n * will receive an object with an `error` property that can be used to diagnose the problem.\n *\n * @param {Options} options Options.\n * @extends {VectorTileLayer}\n * @fires module:ol/events/Event~BaseEvent#event:error\n * @api\n */\nclass MapboxVectorLayer extends VectorTileLayer {\n /**\n * @param {Options} options Layer options. At a minimum, `styleUrl` and `accessToken`\n * must be provided.\n */\n constructor(options) {\n const declutter = 'declutter' in options ? options.declutter : true;\n const source = new VectorTileSource({\n state: SourceState.LOADING,\n format: new MVT(),\n });\n\n super({\n source: source,\n declutter: declutter,\n className: options.className,\n opacity: options.opacity,\n visible: options.visible,\n zIndex: options.zIndex,\n minResolution: options.minResolution,\n maxResolution: options.maxResolution,\n minZoom: options.minZoom,\n maxZoom: options.maxZoom,\n renderOrder: options.renderOrder,\n renderBuffer: options.renderBuffer,\n renderMode: options.renderMode,\n map: options.map,\n updateWhileAnimating: options.updateWhileAnimating,\n updateWhileInteracting: options.updateWhileInteracting,\n preload: options.preload,\n useInterimTilesOnError: options.useInterimTilesOnError,\n });\n\n this.sourceId = options.source;\n this.layers = options.layers;\n this.accessToken = options.accessToken;\n this.fetchStyle(options.styleUrl);\n }\n\n /**\n * Fetch the style object.\n * @param {string} styleUrl The URL of the style to load.\n * @protected\n */\n fetchStyle(styleUrl) {\n const url = normalizeStyleUrl(styleUrl, this.accessToken);\n fetch(url)\n .then((response) => {\n if (!response.ok) {\n throw new Error(\n `unexpected response when fetching style: ${response.status}`\n );\n }\n return response.json();\n })\n .then((style) => {\n this.onStyleLoad(style);\n })\n .catch((error) => {\n this.handleError(error);\n });\n }\n\n /**\n * Handle the loaded style object.\n * @param {StyleObject} style The loaded style.\n * @protected\n */\n onStyleLoad(style) {\n let sourceId;\n let sourceIdOrLayersList;\n if (this.layers) {\n // confirm all layers share the same source\n const lookup = {};\n for (let i = 0; i < style.layers.length; ++i) {\n const layer = style.layers[i];\n if (layer.source) {\n lookup[layer.id] = layer.source;\n }\n }\n let firstSource;\n for (let i = 0; i < this.layers.length; ++i) {\n const candidate = lookup[this.layers[i]];\n if (!candidate) {\n this.handleError(\n new Error(`could not find source for ${this.layers[i]}`)\n );\n return;\n }\n if (!firstSource) {\n firstSource = candidate;\n } else if (firstSource !== candidate) {\n this.handleError(\n new Error(\n `layers can only use a single source, found ${firstSource} and ${candidate}`\n )\n );\n return;\n }\n }\n sourceId = firstSource;\n sourceIdOrLayersList = this.layers;\n } else {\n sourceId = this.sourceId;\n sourceIdOrLayersList = sourceId;\n }\n\n if (!sourceIdOrLayersList) {\n // default to the first source in the style\n sourceId = Object.keys(style.sources)[0];\n sourceIdOrLayersList = sourceId;\n }\n\n if (style.sprite) {\n style.sprite = normalizeSpriteUrl(style.sprite, this.accessToken);\n }\n\n if (style.glyphs) {\n style.glyphs = normalizeGlyphsUrl(style.glyphs, this.accessToken);\n }\n\n const styleSource = style.sources[sourceId];\n if (styleSource.type !== SourceType.VECTOR) {\n this.handleError(\n new Error(`only works for vector sources, found ${styleSource.type}`)\n );\n return;\n }\n\n const source = this.getSource();\n source.setUrl(normalizeSourceUrl(styleSource.url, this.accessToken));\n\n applyStyle(this, style, sourceIdOrLayersList)\n .then(() => {\n source.setState(SourceState.READY);\n })\n .catch((error) => {\n this.handleError(error);\n });\n }\n\n /**\n * Handle configuration or loading error.\n * @param {Error} error The error.\n * @protected\n */\n handleError(error) {\n this.dispatchEvent(new ErrorEvent(error));\n const source = this.getSource();\n source.setState(SourceState.ERROR);\n }\n}\n\nexport default MapboxVectorLayer;\n","/**\n * @module ol/renderer/canvas/VectorImageLayer\n */\nimport CanvasImageLayerRenderer from './ImageLayer.js';\nimport CanvasVectorLayerRenderer from './VectorLayer.js';\nimport EventType from '../../events/EventType.js';\nimport ImageCanvas from '../../ImageCanvas.js';\nimport ImageState from '../../ImageState.js';\nimport RBush from 'rbush';\nimport ViewHint from '../../ViewHint.js';\nimport {apply, compose, create} from '../../transform.js';\nimport {assign} from '../../obj.js';\nimport {getHeight, getWidth, isEmpty, scaleFromCenter} from '../../extent.js';\n\n/**\n * @classdesc\n * Canvas renderer for image layers.\n * @api\n */\nclass CanvasVectorImageLayerRenderer extends CanvasImageLayerRenderer {\n /**\n * @param {import(\"../../layer/VectorImage.js\").default} layer Vector image layer.\n */\n constructor(layer) {\n super(layer);\n\n /**\n * @private\n * @type {import(\"./VectorLayer.js\").default}\n */\n this.vectorRenderer_ = new CanvasVectorLayerRenderer(layer);\n\n /**\n * @private\n * @type {number}\n */\n this.layerImageRatio_ = layer.getImageRatio();\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.coordinateToVectorPixelTransform_ = create();\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.renderedPixelToCoordinateTransform_ = null;\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n this.vectorRenderer_.dispose();\n super.disposeInternal();\n }\n\n /**\n * Asynchronous layer level hit detection.\n * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n * @return {Promise<Array<import(\"../../Feature\").default>>} Promise that resolves with an array of features.\n */\n getFeatures(pixel) {\n if (this.vectorRenderer_) {\n const vectorPixel = apply(\n this.coordinateToVectorPixelTransform_,\n apply(this.renderedPixelToCoordinateTransform_, pixel.slice())\n );\n return this.vectorRenderer_.getFeatures(vectorPixel);\n } else {\n const promise = new Promise(function (resolve, reject) {\n resolve([]);\n });\n return promise;\n }\n }\n\n /**\n * Perform action necessary to get the layer rendered after new fonts have loaded\n */\n handleFontsChanged() {\n this.vectorRenderer_.handleFontsChanged();\n }\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 prepareFrame(frameState) {\n const pixelRatio = frameState.pixelRatio;\n const viewState = frameState.viewState;\n const viewResolution = viewState.resolution;\n\n const hints = frameState.viewHints;\n const vectorRenderer = this.vectorRenderer_;\n let renderedExtent = frameState.extent;\n if (this.layerImageRatio_ !== 1) {\n renderedExtent = renderedExtent.slice(0);\n scaleFromCenter(renderedExtent, this.layerImageRatio_);\n }\n const width = getWidth(renderedExtent) / viewResolution;\n const height = getHeight(renderedExtent) / viewResolution;\n\n if (\n !hints[ViewHint.ANIMATING] &&\n !hints[ViewHint.INTERACTING] &&\n !isEmpty(renderedExtent)\n ) {\n vectorRenderer.useContainer(null, null, 1);\n const context = vectorRenderer.context;\n const imageFrameState = /** @type {import(\"../../PluggableMap.js\").FrameState} */ (assign(\n {},\n frameState,\n {\n declutterTree: new RBush(9),\n extent: renderedExtent,\n size: [width, height],\n viewState: /** @type {import(\"../../View.js\").State} */ (assign(\n {},\n frameState.viewState,\n {\n rotation: 0,\n }\n )),\n }\n ));\n const image = new ImageCanvas(\n renderedExtent,\n viewResolution,\n pixelRatio,\n context.canvas,\n function (callback) {\n if (\n vectorRenderer.prepareFrame(imageFrameState) &&\n vectorRenderer.replayGroupChanged\n ) {\n vectorRenderer.clipping = false;\n vectorRenderer.renderFrame(imageFrameState, null);\n vectorRenderer.renderDeclutter(imageFrameState);\n callback();\n }\n }\n );\n\n image.addEventListener(\n EventType.CHANGE,\n function () {\n if (image.getState() === ImageState.LOADED) {\n this.image_ = image;\n const imageResolution = image.getResolution();\n const imagePixelRatio = image.getPixelRatio();\n const renderedResolution =\n (imageResolution * pixelRatio) / imagePixelRatio;\n this.renderedResolution = renderedResolution;\n this.coordinateToVectorPixelTransform_ = compose(\n this.coordinateToVectorPixelTransform_,\n width / 2,\n height / 2,\n 1 / renderedResolution,\n -1 / renderedResolution,\n 0,\n -viewState.center[0],\n -viewState.center[1]\n );\n }\n }.bind(this)\n );\n image.load();\n }\n\n if (this.image_) {\n this.renderedPixelToCoordinateTransform_ = frameState.pixelToCoordinateTransform.slice();\n }\n\n return !!this.image_;\n }\n\n /**\n */\n preRender() {}\n\n /**\n */\n postRender() {}\n\n /**\n */\n renderDeclutter() {}\n\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {import(\"../vector.js\").FeatureCallback<T>} callback Feature callback.\n * @param {Array<import(\"../Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n * @return {T|undefined} Callback result.\n * @template T\n */\n forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n callback,\n matches\n ) {\n if (this.vectorRenderer_) {\n return this.vectorRenderer_.forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n callback,\n matches\n );\n } else {\n return super.forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n callback,\n matches\n );\n }\n }\n}\n\nexport default CanvasVectorImageLayerRenderer;\n","/**\n * @module ol/layer/VectorImage\n */\nimport BaseVectorLayer from './BaseVector.js';\nimport CanvasVectorImageLayerRenderer from '../renderer/canvas/VectorImageLayer.js';\nimport {assign} from '../obj.js';\n\n/**\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 {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the\n * renderer when getting features from the vector source for the rendering or hit-detection.\n * Recommended value: the size of the largest symbol, line width or label.\n * @property {import(\"../source/Vector.js\").default} [source] Source.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {boolean} [declutter=false] Declutter images and text on this layer. The priority is defined\n * by the `zIndex` of the style and the render order of features. Higher z-index means higher priority.\n * Within the same z-index, a feature rendered before another has higher priority.\n * @property {import(\"../style/Style.js\").StyleLike} [style] Layer style. See\n * {@link module:ol/style} for default style which will be used if this is not defined.\n * @property {number} [imageRatio=1] Ratio by which the rendered extent should be larger than the\n * viewport extent. A larger ratio avoids cut images during panning, but will cause a decrease in performance.\n */\n\n/**\n * @classdesc\n * Vector data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @api\n */\nclass VectorImageLayer extends BaseVectorLayer {\n /**\n * @param {Options=} opt_options Options.\n */\n constructor(opt_options) {\n const options = opt_options ? opt_options : {};\n\n const baseOptions = assign({}, options);\n delete baseOptions.imageRatio;\n super(baseOptions);\n\n /**\n * @type {number}\n * @private\n */\n this.imageRatio_ =\n options.imageRatio !== undefined ? options.imageRatio : 1;\n }\n\n /**\n * @return {number} Ratio between rendered extent size and viewport extent size.\n */\n getImageRatio() {\n return this.imageRatio_;\n }\n\n /**\n * Create a renderer for this layer.\n * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n */\n createRenderer() {\n return new CanvasVectorImageLayerRenderer(this);\n }\n}\n\nexport default VectorImageLayer;\n","/**\n * Operators and utilities used for style expressions\n * @module ol/style/expressions\n */\n\nimport {asArray, isStringColor} from '../color.js';\n\n/**\n * Base type used for literal style parameters; can be a number literal or the output of an operator,\n * which in turns takes {@link ExpressionValue} arguments.\n *\n * The following operators can be used:\n *\n * * Reading operators:\n * * `['get', 'attributeName']` fetches a feature attribute (it will be prefixed by `a_` in the shader)\n * Note: those will be taken from the attributes provided to the renderer\n * * `['var', 'varName']` fetches a value from the style variables, or 0 if undefined\n * * `['time']` returns the time in seconds since the creation of the layer\n * * `['zoom']` returns the current zoom level\n * * `['resolution']` returns the current resolution\n *\n * * Math operators:\n * * `['*', value1, value2]` multiplies `value1` by `value2`\n * * `['/', value1, value2]` divides `value1` by `value2`\n * * `['+', value1, value2]` adds `value1` and `value2`\n * * `['-', value1, value2]` subtracts `value2` from `value1`\n * * `['clamp', value, low, high]` clamps `value` between `low` and `high`\n * * `['%', value1, value2]` returns the result of `value1 % value2` (modulo)\n * * `['^', value1, value2]` returns the value of `value1` raised to the `value2` power\n *\n * * Transform operators:\n * * `['case', condition1, output1, ...conditionN, outputN, fallback]` selects the first output whose corresponding\n * condition evaluates to `true`. If no match is found, returns the `fallback` value.\n * All conditions should be `boolean`, output and fallback can be any kind.\n * * `['match', input, match1, output1, ...matchN, outputN, fallback]` compares the `input` value against all\n * provided `matchX` values, returning the output associated with the first valid match. If no match is found,\n * returns the `fallback` value.\n * `input` and `matchX` values must all be of the same type, and can be `number` or `string`. `outputX` and\n * `fallback` values must be of the same type, and can be of any kind.\n * * `['interpolate', interpolation, input, stop1, output1, ...stopN, outputN]` returns a value by interpolating between\n * pairs of inputs and outputs; `interpolation` can either be `['linear']` or `['exponential', base]` where `base` is\n * the rate of increase from stop A to stop B (i.e. power to which the interpolation ratio is raised); a value\n * of 1 is equivalent to `['linear']`.\n * `input` and `stopX` values must all be of type `number`. `outputX` values can be `number` or `color` values.\n * Note: `input` will be clamped between `stop1` and `stopN`, meaning that all output values will be comprised\n * between `output1` and `outputN`.\n *\n * * Logical operators:\n * * `['<', value1, value2]` returns `true` if `value1` is strictly lower than `value2`, or `false` otherwise.\n * * `['<=', value1, value2]` returns `true` if `value1` is lower than or equals `value2`, or `false` otherwise.\n * * `['>', value1, value2]` returns `true` if `value1` is strictly greater than `value2`, or `false` otherwise.\n * * `['>=', value1, value2]` returns `true` if `value1` is greater than or equals `value2`, or `false` otherwise.\n * * `['==', value1, value2]` returns `true` if `value1` equals `value2`, or `false` otherwise.\n * * `['!=', value1, value2]` returns `true` if `value1` does not equal `value2`, or `false` otherwise.\n * * `['!', value1]` returns `false` if `value1` is `true` or greater than `0`, or `true` otherwise.\n * * `['all', value1, value2, ...]` returns `true` if all the inputs are `true`, `false` otherwise.\n * * `['any', value1, value2, ...]` returns `true` if any of the inputs are `true`, `false` otherwise.\n * * `['between', value1, value2, value3]` returns `true` if `value1` is contained between `value2` and `value3`\n * (inclusively), or `false` otherwise.\n *\n * * Conversion operators:\n * * `['array', value1, ...valueN]` creates a numerical array from `number` values; please note that the amount of\n * values can currently only be 2, 3 or 4.\n * * `['color', red, green, blue, alpha]` creates a `color` value from `number` values; the `alpha` parameter is\n * optional; if not specified, it will be set to 1.\n * Note: `red`, `green` and `blue` components must be values between 0 and 255; `alpha` between 0 and 1.\n *\n * Values can either be literals or another operator, as they will be evaluated recursively.\n * Literal values can be of the following types:\n * * `boolean`\n * * `number`\n * * `string`\n * * {@link module:ol/color~Color}\n *\n * @typedef {Array<*>|import(\"../color.js\").Color|string|number|boolean} ExpressionValue\n */\n\n/**\n * Possible inferred types from a given value or expression.\n * Note: these are binary flags.\n * @enum {number}\n */\nexport const ValueTypes = {\n NUMBER: 0b00001,\n STRING: 0b00010,\n COLOR: 0b00100,\n BOOLEAN: 0b01000,\n NUMBER_ARRAY: 0b10000,\n ANY: 0b11111,\n NONE: 0,\n};\n\n/**\n * An operator declaration must contain two methods: `getReturnType` which returns a type based on\n * the operator arguments, and `toGlsl` which returns a GLSL-compatible string.\n * Note: both methods can process arguments recursively.\n * @typedef {Object} Operator\n * @property {function(Array<ExpressionValue>): ValueTypes|number} getReturnType Returns one or several types\n * @property {function(ParsingContext, Array<ExpressionValue>, ValueTypes=): string} toGlsl Returns a GLSL-compatible string\n * Note: takes in an optional type hint as 3rd parameter\n */\n\n/**\n * Operator declarations\n * @type {Object<string, Operator>}\n */\nexport const Operators = {};\n\n/**\n * Returns the possible types for a given value (each type being a binary flag)\n * To test a value use e.g. `getValueType(v) & ValueTypes.BOOLEAN`\n * @param {ExpressionValue} value Value\n * @returns {ValueTypes|number} Type or types inferred from the value\n */\nexport function getValueType(value) {\n if (typeof value === 'number') {\n return ValueTypes.NUMBER;\n }\n if (typeof value === 'boolean') {\n return ValueTypes.BOOLEAN;\n }\n if (typeof value === 'string') {\n if (isStringColor(value)) {\n return ValueTypes.COLOR | ValueTypes.STRING;\n }\n return ValueTypes.STRING;\n }\n if (!Array.isArray(value)) {\n throw new Error(`Unhandled value type: ${JSON.stringify(value)}`);\n }\n const valueArr = /** @type {Array<*>} */ (value);\n const onlyNumbers = valueArr.every(function (v) {\n return typeof v === 'number';\n });\n if (onlyNumbers) {\n if (valueArr.length === 3 || valueArr.length === 4) {\n return ValueTypes.COLOR | ValueTypes.NUMBER_ARRAY;\n }\n return ValueTypes.NUMBER_ARRAY;\n }\n if (typeof valueArr[0] !== 'string') {\n throw new Error(\n `Expected an expression operator but received: ${JSON.stringify(\n valueArr\n )}`\n );\n }\n const operator = Operators[valueArr[0]];\n if (operator === undefined) {\n throw new Error(\n `Unrecognized expression operator: ${JSON.stringify(valueArr)}`\n );\n }\n return operator.getReturnType(valueArr.slice(1));\n}\n\n/**\n * Checks if only one value type is enabled in the input number.\n * @param {ValueTypes|number} valueType Number containing value type binary flags\n * @return {boolean} True if only one type flag is enabled, false if zero or multiple\n */\nexport function isTypeUnique(valueType) {\n return Math.log2(valueType) % 1 === 0;\n}\n\n/**\n * Context available during the parsing of an expression.\n * @typedef {Object} ParsingContext\n * @property {boolean} [inFragmentShader] If false, means the expression output should be made for a vertex shader\n * @property {Array<string>} variables List of variables used in the expression; contains **unprefixed names**\n * @property {Array<string>} attributes List of attributes used in the expression; contains **unprefixed names**\n * @property {Object<string, number>} stringLiteralsMap This object maps all encountered string values to a number\n */\n\n/**\n * Will return the number as a float with a dot separator, which is required by GLSL.\n * @param {number} v Numerical value.\n * @returns {string} The value as string.\n */\nexport function numberToGlsl(v) {\n const s = v.toString();\n return s.indexOf('.') === -1 ? s + '.0' : s;\n}\n\n/**\n * Will return the number array as a float with a dot separator, concatenated with ', '.\n * @param {Array<number>} array Numerical values array.\n * @returns {string} The array as a vector, e. g.: `vec3(1.0, 2.0, 3.0)`.\n */\nexport function arrayToGlsl(array) {\n if (array.length < 2 || array.length > 4) {\n throw new Error(\n '`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.'\n );\n }\n return `vec${array.length}(${array.map(numberToGlsl).join(', ')})`;\n}\n\n/**\n * Will normalize and converts to string a `vec4` color array compatible with GLSL.\n * @param {string|import(\"../color.js\").Color} color Color either in string format or [r, g, b, a] array format,\n * with RGB components in the 0..255 range and the alpha component in the 0..1 range.\n * Note that the final array will always have 4 components.\n * @returns {string} The color expressed in the `vec4(1.0, 1.0, 1.0, 1.0)` form.\n */\nexport function colorToGlsl(color) {\n const array = asArray(color).slice();\n if (array.length < 4) {\n array.push(1);\n }\n return arrayToGlsl(\n array.map(function (c, i) {\n return i < 3 ? c / 255 : c;\n })\n );\n}\n\n/**\n * Returns a stable equivalent number for the string literal.\n * @param {ParsingContext} context Parsing context\n * @param {string} string String literal value\n * @returns {number} Number equivalent\n */\nexport function getStringNumberEquivalent(context, string) {\n if (context.stringLiteralsMap[string] === undefined) {\n context.stringLiteralsMap[string] = Object.keys(\n context.stringLiteralsMap\n ).length;\n }\n return context.stringLiteralsMap[string];\n}\n\n/**\n * Returns a stable equivalent number for the string literal, for use in shaders. This number is then\n * converted to be a GLSL-compatible string.\n * @param {ParsingContext} context Parsing context\n * @param {string} string String literal value\n * @returns {string} GLSL-compatible string containing a number\n */\nexport function stringToGlsl(context, string) {\n return numberToGlsl(getStringNumberEquivalent(context, string));\n}\n\n/**\n * Recursively parses a style expression and outputs a GLSL-compatible string. Takes in a parsing context that\n * will be read and modified during the parsing operation.\n * @param {ParsingContext} context Parsing context\n * @param {ExpressionValue} value Value\n * @param {ValueTypes|number} [typeHint] Hint for the expected final type (can be several types combined)\n * @returns {string} GLSL-compatible output\n */\nexport function expressionToGlsl(context, value, typeHint) {\n // operator\n if (Array.isArray(value) && typeof value[0] === 'string') {\n const operator = Operators[value[0]];\n if (operator === undefined) {\n throw new Error(\n `Unrecognized expression operator: ${JSON.stringify(value)}`\n );\n }\n return operator.toGlsl(context, value.slice(1), typeHint);\n }\n const valueType = getValueType(value);\n if ((valueType & ValueTypes.NUMBER) > 0) {\n return numberToGlsl(/** @type {number} */ (value));\n } else if ((valueType & ValueTypes.BOOLEAN) > 0) {\n return value.toString();\n } else if (\n (valueType & ValueTypes.STRING) > 0 &&\n (typeHint === undefined || typeHint == ValueTypes.STRING)\n ) {\n return stringToGlsl(context, value.toString());\n } else if (\n (valueType & ValueTypes.COLOR) > 0 &&\n (typeHint === undefined || typeHint == ValueTypes.COLOR)\n ) {\n return colorToGlsl(/** @type {number[]|string} */ (value));\n } else if ((valueType & ValueTypes.NUMBER_ARRAY) > 0) {\n return arrayToGlsl(/** @type {number[]} */ (value));\n }\n}\n\nfunction assertNumber(value) {\n if (!(getValueType(value) & ValueTypes.NUMBER)) {\n throw new Error(\n `A numeric value was expected, got ${JSON.stringify(value)} instead`\n );\n }\n}\nfunction assertNumbers(values) {\n for (let i = 0; i < values.length; i++) {\n assertNumber(values[i]);\n }\n}\nfunction assertString(value) {\n if (!(getValueType(value) & ValueTypes.STRING)) {\n throw new Error(\n `A string value was expected, got ${JSON.stringify(value)} instead`\n );\n }\n}\nfunction assertBoolean(value) {\n if (!(getValueType(value) & ValueTypes.BOOLEAN)) {\n throw new Error(\n `A boolean value was expected, got ${JSON.stringify(value)} instead`\n );\n }\n}\nfunction assertArgsCount(args, count) {\n if (args.length !== count) {\n throw new Error(\n `Exactly ${count} arguments were expected, got ${args.length} instead`\n );\n }\n}\nfunction assertArgsMinCount(args, count) {\n if (args.length < count) {\n throw new Error(\n `At least ${count} arguments were expected, got ${args.length} instead`\n );\n }\n}\nfunction assertArgsMaxCount(args, count) {\n if (args.length > count) {\n throw new Error(\n `At most ${count} arguments were expected, got ${args.length} instead`\n );\n }\n}\nfunction assertArgsEven(args) {\n if (args.length % 2 !== 0) {\n throw new Error(\n `An even amount of arguments was expected, got ${args} instead`\n );\n }\n}\nfunction assertArgsOdd(args) {\n if (args.length % 2 === 0) {\n throw new Error(\n `An odd amount of arguments was expected, got ${args} instead`\n );\n }\n}\nfunction assertUniqueInferredType(args, types) {\n if (!isTypeUnique(types)) {\n throw new Error(\n `Could not infer only one type from the following expression: ${JSON.stringify(\n args\n )}`\n );\n }\n}\n\nOperators['get'] = {\n getReturnType: function (args) {\n return ValueTypes.ANY;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 1);\n assertString(args[0]);\n const value = args[0].toString();\n if (context.attributes.indexOf(value) === -1) {\n context.attributes.push(value);\n }\n const prefix = context.inFragmentShader ? 'v_' : 'a_';\n return prefix + value;\n },\n};\nOperators['var'] = {\n getReturnType: function (args) {\n return ValueTypes.ANY;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 1);\n assertString(args[0]);\n const value = args[0].toString();\n if (context.variables.indexOf(value) === -1) {\n context.variables.push(value);\n }\n return `u_${value}`;\n },\n};\nOperators['time'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 0);\n return 'u_time';\n },\n};\nOperators['zoom'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 0);\n return 'u_zoom';\n },\n};\nOperators['resolution'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 0);\n return 'u_resolution';\n },\n};\n\nOperators['*'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n assertNumbers(args);\n return `(${expressionToGlsl(context, args[0])} * ${expressionToGlsl(\n context,\n args[1]\n )})`;\n },\n};\nOperators['/'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n assertNumbers(args);\n return `(${expressionToGlsl(context, args[0])} / ${expressionToGlsl(\n context,\n args[1]\n )})`;\n },\n};\nOperators['+'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n assertNumbers(args);\n return `(${expressionToGlsl(context, args[0])} + ${expressionToGlsl(\n context,\n args[1]\n )})`;\n },\n};\nOperators['-'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n assertNumbers(args);\n return `(${expressionToGlsl(context, args[0])} - ${expressionToGlsl(\n context,\n args[1]\n )})`;\n },\n};\nOperators['clamp'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 3);\n assertNumbers(args);\n const min = expressionToGlsl(context, args[1]);\n const max = expressionToGlsl(context, args[2]);\n return `clamp(${expressionToGlsl(context, args[0])}, ${min}, ${max})`;\n },\n};\nOperators['%'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n assertNumbers(args);\n return `mod(${expressionToGlsl(context, args[0])}, ${expressionToGlsl(\n context,\n args[1]\n )})`;\n },\n};\nOperators['^'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n assertNumbers(args);\n return `pow(${expressionToGlsl(context, args[0])}, ${expressionToGlsl(\n context,\n args[1]\n )})`;\n },\n};\nOperators['>'] = {\n getReturnType: function (args) {\n return ValueTypes.BOOLEAN;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n assertNumbers(args);\n return `(${expressionToGlsl(context, args[0])} > ${expressionToGlsl(\n context,\n args[1]\n )})`;\n },\n};\nOperators['>='] = {\n getReturnType: function (args) {\n return ValueTypes.BOOLEAN;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n assertNumbers(args);\n return `(${expressionToGlsl(context, args[0])} >= ${expressionToGlsl(\n context,\n args[1]\n )})`;\n },\n};\nOperators['<'] = {\n getReturnType: function (args) {\n return ValueTypes.BOOLEAN;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n assertNumbers(args);\n return `(${expressionToGlsl(context, args[0])} < ${expressionToGlsl(\n context,\n args[1]\n )})`;\n },\n};\nOperators['<='] = {\n getReturnType: function (args) {\n return ValueTypes.BOOLEAN;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n assertNumbers(args);\n return `(${expressionToGlsl(context, args[0])} <= ${expressionToGlsl(\n context,\n args[1]\n )})`;\n },\n};\n\nfunction getEqualOperator(operator) {\n return {\n getReturnType: function (args) {\n return ValueTypes.BOOLEAN;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n\n // find common type\n let type = ValueTypes.ANY;\n for (let i = 0; i < args.length; i++) {\n type = type & getValueType(args[i]);\n }\n if (type === 0) {\n throw new Error(\n `All arguments should be of compatible type, got ${JSON.stringify(\n args\n )} instead`\n );\n }\n\n return `(${expressionToGlsl(\n context,\n args[0],\n type\n )} ${operator} ${expressionToGlsl(context, args[1], type)})`;\n },\n };\n}\nOperators['=='] = getEqualOperator('==');\nOperators['!='] = getEqualOperator('!=');\n\nOperators['!'] = {\n getReturnType: function (args) {\n return ValueTypes.BOOLEAN;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 1);\n assertBoolean(args[0]);\n return `(!${expressionToGlsl(context, args[0])})`;\n },\n};\n\nfunction getDecisionOperator(operator) {\n return {\n getReturnType: function (args) {\n return ValueTypes.BOOLEAN;\n },\n toGlsl: function (context, args) {\n assertArgsMinCount(args, 2);\n for (let i = 0; i < args.length; i++) {\n assertBoolean(args[i]);\n }\n let result = '';\n result = args\n .map((arg) => expressionToGlsl(context, arg))\n .join(` ${operator} `);\n result = `(${result})`;\n return result;\n },\n };\n}\n\nOperators['all'] = getDecisionOperator('&&');\nOperators['any'] = getDecisionOperator('||');\nOperators['between'] = {\n getReturnType: function (args) {\n return ValueTypes.BOOLEAN;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 3);\n assertNumbers(args);\n const min = expressionToGlsl(context, args[1]);\n const max = expressionToGlsl(context, args[2]);\n const value = expressionToGlsl(context, args[0]);\n return `(${value} >= ${min} && ${value} <= ${max})`;\n },\n};\n\nOperators['array'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER_ARRAY;\n },\n toGlsl: function (context, args) {\n assertArgsMinCount(args, 2);\n assertArgsMaxCount(args, 4);\n assertNumbers(args);\n const parsedArgs = args.map(function (val) {\n return expressionToGlsl(context, val, ValueTypes.NUMBER);\n });\n return `vec${args.length}(${parsedArgs.join(', ')})`;\n },\n};\nOperators['color'] = {\n getReturnType: function (args) {\n return ValueTypes.COLOR;\n },\n toGlsl: function (context, args) {\n assertArgsMinCount(args, 3);\n assertArgsMaxCount(args, 4);\n assertNumbers(args);\n const array = /** @type {number[]} */ (args);\n if (args.length === 3) {\n array.push(1);\n }\n const parsedArgs = args.map(function (val, i) {\n return (\n expressionToGlsl(context, val, ValueTypes.NUMBER) +\n (i < 3 ? ' / 255.0' : '')\n );\n });\n return `vec${args.length}(${parsedArgs.join(', ')})`;\n },\n};\n\nOperators['interpolate'] = {\n getReturnType: function (args) {\n let type = ValueTypes.COLOR | ValueTypes.NUMBER;\n for (let i = 3; i < args.length; i += 2) {\n type = type & getValueType(args[i]);\n }\n return type;\n },\n toGlsl: function (context, args, opt_typeHint) {\n assertArgsEven(args);\n assertArgsMinCount(args, 6);\n\n // validate interpolation type\n const type = args[0];\n let interpolation;\n switch (type[0]) {\n case 'linear':\n interpolation = 1;\n break;\n case 'exponential':\n interpolation = type[1];\n break;\n default:\n interpolation = null;\n }\n if (!interpolation) {\n throw new Error(\n `Invalid interpolation type for \"interpolate\" operator, received: ${JSON.stringify(\n type\n )}`\n );\n }\n\n // compute input/output types\n const typeHint = opt_typeHint !== undefined ? opt_typeHint : ValueTypes.ANY;\n const outputType = Operators['interpolate'].getReturnType(args) & typeHint;\n assertUniqueInferredType(args, outputType);\n\n const input = expressionToGlsl(context, args[1]);\n let result = null;\n for (let i = 2; i < args.length - 2; i += 2) {\n const stop1 = expressionToGlsl(context, args[i]);\n const output1 = expressionToGlsl(context, args[i + 1], outputType);\n const stop2 = expressionToGlsl(context, args[i + 2]);\n const output2 = expressionToGlsl(context, args[i + 3], outputType);\n result = `mix(${\n result || output1\n }, ${output2}, pow(clamp((${input} - ${stop1}) / (${stop2} - ${stop1}), 0.0, 1.0), ${numberToGlsl(\n interpolation\n )}))`;\n }\n return result;\n },\n};\nOperators['match'] = {\n getReturnType: function (args) {\n let type = ValueTypes.ANY;\n for (let i = 2; i < args.length; i += 2) {\n type = type & getValueType(args[i]);\n }\n type = type & getValueType(args[args.length - 1]);\n return type;\n },\n toGlsl: function (context, args, opt_typeHint) {\n assertArgsEven(args);\n assertArgsMinCount(args, 4);\n\n const typeHint = opt_typeHint !== undefined ? opt_typeHint : ValueTypes.ANY;\n const outputType = Operators['match'].getReturnType(args) & typeHint;\n assertUniqueInferredType(args, outputType);\n\n const input = expressionToGlsl(context, args[0]);\n const fallback = expressionToGlsl(\n context,\n args[args.length - 1],\n outputType\n );\n let result = null;\n for (let i = args.length - 3; i >= 1; i -= 2) {\n const match = expressionToGlsl(context, args[i]);\n const output = expressionToGlsl(context, args[i + 1], outputType);\n result = `(${input} == ${match} ? ${output} : ${result || fallback})`;\n }\n return result;\n },\n};\nOperators['case'] = {\n getReturnType: function (args) {\n let type = ValueTypes.ANY;\n for (let i = 1; i < args.length; i += 2) {\n type = type & getValueType(args[i]);\n }\n type = type & getValueType(args[args.length - 1]);\n return type;\n },\n toGlsl: function (context, args, opt_typeHint) {\n assertArgsOdd(args);\n assertArgsMinCount(args, 3);\n\n const typeHint = opt_typeHint !== undefined ? opt_typeHint : ValueTypes.ANY;\n const outputType = Operators['case'].getReturnType(args) & typeHint;\n assertUniqueInferredType(args, outputType);\n for (let i = 0; i < args.length - 1; i += 2) {\n assertBoolean(args[i]);\n }\n\n const fallback = expressionToGlsl(\n context,\n args[args.length - 1],\n outputType\n );\n let result = null;\n for (let i = args.length - 3; i >= 0; i -= 2) {\n const condition = expressionToGlsl(context, args[i]);\n const output = expressionToGlsl(context, args[i + 1], outputType);\n result = `(${condition} ? ${output} : ${result || fallback})`;\n }\n return result;\n },\n};\n","/**\n * Classes and utilities for generating shaders from literal style objects\n * @module ol/webgl/ShaderBuilder\n */\n\nimport {\n ValueTypes,\n expressionToGlsl,\n getStringNumberEquivalent,\n} from '../style/expressions.js';\n\n/**\n * @typedef {Object} VaryingDescription\n * @property {string} name Varying name, as will be declared in the header.\n * @property {string} type Varying type, either `float`, `vec2`, `vec4`...\n * @property {string} expression Expression which will be assigned to the varying in the vertex shader, and\n * passed on to the fragment shader.\n */\n\n/**\n * @classdesc\n * This class implements a classic builder pattern for generating many different types of shaders.\n * Methods can be chained, e. g.:\n *\n * ```js\n * const shader = new ShaderBuilder()\n * .addVarying('v_width', 'float', 'a_width')\n * .addUniform('u_time')\n * .setColorExpression('...')\n * .setSizeExpression('...')\n * .outputSymbolFragmentShader();\n * ```\n */\nexport class ShaderBuilder {\n constructor() {\n /**\n * Uniforms; these will be declared in the header (should include the type).\n * @type {Array<string>}\n * @private\n */\n this.uniforms = [];\n\n /**\n * Attributes; these will be declared in the header (should include the type).\n * @type {Array<string>}\n * @private\n */\n this.attributes = [];\n\n /**\n * Varyings with a name, a type and an expression.\n * @type {Array<VaryingDescription>}\n * @private\n */\n this.varyings = [];\n\n /**\n * @type {string}\n * @private\n */\n this.sizeExpression = 'vec2(1.0)';\n\n /**\n * @type {string}\n * @private\n */\n this.rotationExpression = '0.0';\n\n /**\n * @type {string}\n * @private\n */\n this.offsetExpression = 'vec2(0.0)';\n\n /**\n * @type {string}\n * @private\n */\n this.colorExpression = 'vec4(1.0)';\n\n /**\n * @type {string}\n * @private\n */\n this.texCoordExpression = 'vec4(0.0, 0.0, 1.0, 1.0)';\n\n /**\n * @type {string}\n * @private\n */\n this.discardExpression = 'false';\n\n /**\n * @type {boolean}\n * @private\n */\n this.rotateWithView = false;\n }\n\n /**\n * Adds a uniform accessible in both fragment and vertex shaders.\n * The given name should include a type, such as `sampler2D u_texture`.\n * @param {string} name Uniform name\n * @return {ShaderBuilder} the builder object\n */\n addUniform(name) {\n this.uniforms.push(name);\n return this;\n }\n\n /**\n * Adds an attribute accessible in the vertex shader, read from the geometry buffer.\n * The given name should include a type, such as `vec2 a_position`.\n * @param {string} name Attribute name\n * @return {ShaderBuilder} the builder object\n */\n addAttribute(name) {\n this.attributes.push(name);\n return this;\n }\n\n /**\n * Adds a varying defined in the vertex shader and accessible from the fragment shader.\n * The type and expression of the varying have to be specified separately.\n * @param {string} name Varying name\n * @param {'float'|'vec2'|'vec3'|'vec4'} type Type\n * @param {string} expression Expression used to assign a value to the varying.\n * @return {ShaderBuilder} the builder object\n */\n addVarying(name, type, expression) {\n this.varyings.push({\n name: name,\n type: type,\n expression: expression,\n });\n return this;\n }\n\n /**\n * Sets an expression to compute the size of the shape.\n * This expression can use all the uniforms and attributes available\n * in the vertex shader, and should evaluate to a `vec2` value.\n * @param {string} expression Size expression\n * @return {ShaderBuilder} the builder object\n */\n setSizeExpression(expression) {\n this.sizeExpression = expression;\n return this;\n }\n\n /**\n * Sets an expression to compute the rotation of the shape.\n * This expression can use all the uniforms and attributes available\n * in the vertex shader, and should evaluate to a `float` value in radians.\n * @param {string} expression Size expression\n * @return {ShaderBuilder} the builder object\n */\n setRotationExpression(expression) {\n this.rotationExpression = expression;\n return this;\n }\n\n /**\n * Sets an expression to compute the offset of the symbol from the point center.\n * This expression can use all the uniforms and attributes available\n * in the vertex shader, and should evaluate to a `vec2` value.\n * Note: will only be used for point geometry shaders.\n * @param {string} expression Offset expression\n * @return {ShaderBuilder} the builder object\n */\n setSymbolOffsetExpression(expression) {\n this.offsetExpression = expression;\n return this;\n }\n\n /**\n * Sets an expression to compute the color of the shape.\n * This expression can use all the uniforms, varyings and attributes available\n * in the fragment shader, and should evaluate to a `vec4` value.\n * @param {string} expression Color expression\n * @return {ShaderBuilder} the builder object\n */\n setColorExpression(expression) {\n this.colorExpression = expression;\n return this;\n }\n\n /**\n * Sets an expression to compute the texture coordinates of the vertices.\n * This expression can use all the uniforms and attributes available\n * in the vertex shader, and should evaluate to a `vec4` value.\n * @param {string} expression Texture coordinate expression\n * @return {ShaderBuilder} the builder object\n */\n setTextureCoordinateExpression(expression) {\n this.texCoordExpression = expression;\n return this;\n }\n\n /**\n * Sets an expression to determine whether a fragment (pixel) should be discarded,\n * i.e. not drawn at all.\n * This expression can use all the uniforms, varyings and attributes available\n * in the fragment shader, and should evaluate to a `bool` value (it will be\n * used in an `if` statement)\n * @param {string} expression Fragment discard expression\n * @return {ShaderBuilder} the builder object\n */\n setFragmentDiscardExpression(expression) {\n this.discardExpression = expression;\n return this;\n }\n\n /**\n * Sets whether the symbols should rotate with the view or stay aligned with the map.\n * Note: will only be used for point geometry shaders.\n * @param {boolean} rotateWithView Rotate with view\n * @return {ShaderBuilder} the builder object\n */\n setSymbolRotateWithView(rotateWithView) {\n this.rotateWithView = rotateWithView;\n return this;\n }\n\n /**\n * @returns {string} Previously set size expression\n */\n getSizeExpression() {\n return this.sizeExpression;\n }\n\n /**\n * @returns {string} Previously set symbol offset expression\n */\n getOffsetExpression() {\n return this.offsetExpression;\n }\n\n /**\n * @returns {string} Previously set color expression\n */\n getColorExpression() {\n return this.colorExpression;\n }\n\n /**\n * @returns {string} Previously set texture coordinate expression\n */\n getTextureCoordinateExpression() {\n return this.texCoordExpression;\n }\n\n /**\n * @returns {string} Previously set fragment discard expression\n */\n getFragmentDiscardExpression() {\n return this.discardExpression;\n }\n\n /**\n * Generates a symbol vertex shader from the builder parameters,\n * intended to be used on point geometries.\n *\n * Three uniforms are hardcoded in all shaders: `u_projectionMatrix`, `u_offsetScaleMatrix`,\n * `u_offsetRotateMatrix`, `u_time`.\n *\n * The following attributes are hardcoded and expected to be present in the vertex buffers:\n * `vec2 a_position`, `float a_index` (being the index of the vertex in the quad, 0 to 3).\n *\n * The following varyings are hardcoded and gives the coordinate of the pixel both in the quad and on the texture:\n * `vec2 v_quadCoord`, `vec2 v_texCoord`\n *\n * @param {boolean} [forHitDetection] If true, the shader will be modified to include hit detection variables\n * (namely, hit color with encoded feature id).\n * @returns {string} The full shader as a string.\n */\n getSymbolVertexShader(forHitDetection) {\n const offsetMatrix = this.rotateWithView\n ? 'u_offsetScaleMatrix * u_offsetRotateMatrix'\n : 'u_offsetScaleMatrix';\n\n let attributes = this.attributes;\n let varyings = this.varyings;\n\n if (forHitDetection) {\n attributes = attributes.concat('vec4 a_hitColor');\n varyings = varyings.concat({\n name: 'v_hitColor',\n type: 'vec4',\n expression: 'a_hitColor',\n });\n }\n\n return `precision mediump float;\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n${this.uniforms\n .map(function (uniform) {\n return 'uniform ' + uniform + ';';\n })\n .join('\\n')}\nattribute vec2 a_position;\nattribute float a_index;\n${attributes\n .map(function (attribute) {\n return 'attribute ' + attribute + ';';\n })\n .join('\\n')}\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n${varyings\n .map(function (varying) {\n return 'varying ' + varying.type + ' ' + varying.name + ';';\n })\n .join('\\n')}\nvoid main(void) {\n mat4 offsetMatrix = ${offsetMatrix};\n vec2 halfSize = ${this.sizeExpression} * 0.5;\n vec2 offset = ${this.offsetExpression};\n float angle = ${this.rotationExpression};\n float offsetX;\n float offsetY;\n if (a_index == 0.0) {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n } else if (a_index == 1.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else if (a_index == 2.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n }\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n vec4 texCoord = ${this.texCoordExpression};\n float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;\n float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;\n v_texCoord = vec2(u, v);\n u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n v = a_index == 2.0 || a_index == 3.0 ? 0.0 : 1.0;\n v_quadCoord = vec2(u, v);\n${varyings\n .map(function (varying) {\n return ' ' + varying.name + ' = ' + varying.expression + ';';\n })\n .join('\\n')}\n}`;\n }\n\n /**\n * Generates a symbol fragment shader from the builder parameters,\n * intended to be used on point geometries.\n *\n * Expects the following varyings to be transmitted by the vertex shader:\n * `vec2 v_quadCoord`, `vec2 v_texCoord`\n *\n * @param {boolean} [forHitDetection] If true, the shader will be modified to include hit detection variables\n * (namely, hit color with encoded feature id).\n * @returns {string} The full shader as a string.\n */\n getSymbolFragmentShader(forHitDetection) {\n const hitDetectionBypass = forHitDetection\n ? ' if (gl_FragColor.a < 0.1) { discard; } gl_FragColor = v_hitColor;'\n : '';\n\n let varyings = this.varyings;\n\n if (forHitDetection) {\n varyings = varyings.concat({\n name: 'v_hitColor',\n type: 'vec4',\n expression: 'a_hitColor',\n });\n }\n\n return `precision mediump float;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n${this.uniforms\n .map(function (uniform) {\n return 'uniform ' + uniform + ';';\n })\n .join('\\n')}\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n${varyings\n .map(function (varying) {\n return 'varying ' + varying.type + ' ' + varying.name + ';';\n })\n .join('\\n')}\nvoid main(void) {\n if (${this.discardExpression}) { discard; }\n gl_FragColor = ${this.colorExpression};\n gl_FragColor.rgb *= gl_FragColor.a;\n${hitDetectionBypass}\n}`;\n }\n}\n\n/**\n * @typedef {Object} StyleParseResult\n * @property {ShaderBuilder} builder Shader builder pre-configured according to a given style\n * @property {Object.<string,import(\"./Helper\").UniformValue>} uniforms Uniform definitions.\n * @property {Array<import(\"../renderer/webgl/PointsLayer\").CustomAttribute>} attributes Attribute descriptions.\n */\n\n/**\n * Parses a {@link import(\"../style/LiteralStyle\").LiteralStyle} object and returns a {@link ShaderBuilder}\n * object that has been configured according to the given style, as well as `attributes` and `uniforms`\n * arrays to be fed to the `WebGLPointsRenderer` class.\n *\n * Also returns `uniforms` and `attributes` properties as expected by the\n * {@link module:ol/renderer/webgl/PointsLayer~WebGLPointsLayerRenderer}.\n *\n * @param {import(\"../style/LiteralStyle\").LiteralStyle} style Literal style.\n * @returns {StyleParseResult} Result containing shader params, attributes and uniforms.\n */\nexport function parseLiteralStyle(style) {\n const symbStyle = style.symbol;\n const size = symbStyle.size !== undefined ? symbStyle.size : 1;\n const color = symbStyle.color || 'white';\n const texCoord = symbStyle.textureCoord || [0, 0, 1, 1];\n const offset = symbStyle.offset || [0, 0];\n const opacity = symbStyle.opacity !== undefined ? symbStyle.opacity : 1;\n const rotation = symbStyle.rotation !== undefined ? symbStyle.rotation : 0;\n\n /**\n * @type {import(\"../style/expressions.js\").ParsingContext}\n */\n const vertContext = {\n inFragmentShader: false,\n variables: [],\n attributes: [],\n stringLiteralsMap: {},\n };\n const parsedSize = expressionToGlsl(\n vertContext,\n size,\n ValueTypes.NUMBER_ARRAY | ValueTypes.NUMBER\n );\n const parsedOffset = expressionToGlsl(\n vertContext,\n offset,\n ValueTypes.NUMBER_ARRAY\n );\n const parsedTexCoord = expressionToGlsl(\n vertContext,\n texCoord,\n ValueTypes.NUMBER_ARRAY\n );\n const parsedRotation = expressionToGlsl(\n vertContext,\n rotation,\n ValueTypes.NUMBER\n );\n\n /**\n * @type {import(\"../style/expressions.js\").ParsingContext}\n */\n const fragContext = {\n inFragmentShader: true,\n variables: vertContext.variables,\n attributes: [],\n stringLiteralsMap: vertContext.stringLiteralsMap,\n };\n const parsedColor = expressionToGlsl(fragContext, color, ValueTypes.COLOR);\n const parsedOpacity = expressionToGlsl(\n fragContext,\n opacity,\n ValueTypes.NUMBER\n );\n\n let opacityFilter = '1.0';\n const visibleSize = `vec2(${expressionToGlsl(\n fragContext,\n size,\n ValueTypes.NUMBER_ARRAY | ValueTypes.NUMBER\n )}).x`;\n switch (symbStyle.symbolType) {\n case 'square':\n break;\n case 'image':\n break;\n // taken from https://thebookofshaders.com/07/\n case 'circle':\n opacityFilter = `(1.0-smoothstep(1.-4./${visibleSize},1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))`;\n break;\n case 'triangle':\n const st = '(v_quadCoord*2.-1.)';\n const a = `(atan(${st}.x,${st}.y))`;\n opacityFilter = `(1.0-smoothstep(.5-3./${visibleSize},.5,cos(floor(.5+${a}/2.094395102)*2.094395102-${a})*length(${st})))`;\n break;\n\n default:\n throw new Error('Unexpected symbol type: ' + symbStyle.symbolType);\n }\n\n const builder = new ShaderBuilder()\n .setSizeExpression(`vec2(${parsedSize})`)\n .setRotationExpression(parsedRotation)\n .setSymbolOffsetExpression(parsedOffset)\n .setTextureCoordinateExpression(parsedTexCoord)\n .setSymbolRotateWithView(!!symbStyle.rotateWithView)\n .setColorExpression(\n `vec4(${parsedColor}.rgb, ${parsedColor}.a * ${parsedOpacity} * ${opacityFilter})`\n );\n\n if (style.filter) {\n const parsedFilter = expressionToGlsl(\n fragContext,\n style.filter,\n ValueTypes.BOOLEAN\n );\n builder.setFragmentDiscardExpression(`!${parsedFilter}`);\n }\n\n /** @type {Object.<string,import(\"../webgl/Helper\").UniformValue>} */\n const uniforms = {};\n\n // define one uniform per variable\n fragContext.variables.forEach(function (varName) {\n builder.addUniform(`float u_${varName}`);\n uniforms[`u_${varName}`] = function () {\n if (!style.variables || style.variables[varName] === undefined) {\n throw new Error(\n `The following variable is missing from the style: ${varName}`\n );\n }\n let value = style.variables[varName];\n if (typeof value === 'string') {\n value = getStringNumberEquivalent(vertContext, value);\n }\n return value !== undefined ? value : -9999999; // to avoid matching with the first string literal\n };\n });\n\n if (symbStyle.symbolType === 'image' && symbStyle.src) {\n const texture = new Image();\n texture.src = symbStyle.src;\n builder\n .addUniform('sampler2D u_texture')\n .setColorExpression(\n builder.getColorExpression() + ' * texture2D(u_texture, v_texCoord)'\n );\n uniforms['u_texture'] = texture;\n }\n\n // for each feature attribute used in the fragment shader, define a varying that will be used to pass data\n // from the vertex to the fragment shader, as well as an attribute in the vertex shader (if not already present)\n fragContext.attributes.forEach(function (attrName) {\n if (vertContext.attributes.indexOf(attrName) === -1) {\n vertContext.attributes.push(attrName);\n }\n builder.addVarying(`v_${attrName}`, 'float', `a_${attrName}`);\n });\n\n // for each feature attribute used in the vertex shader, define an attribute in the vertex shader.\n vertContext.attributes.forEach(function (attrName) {\n builder.addAttribute(`float a_${attrName}`);\n });\n\n return {\n builder: builder,\n attributes: vertContext.attributes.map(function (attributeName) {\n return {\n name: attributeName,\n callback: function (feature, props) {\n let value = props[attributeName];\n if (typeof value === 'string') {\n value = getStringNumberEquivalent(vertContext, value);\n }\n return value !== undefined ? value : -9999999; // to avoid matching with the first string literal\n },\n };\n }),\n uniforms: uniforms,\n };\n}\n","/**\n * @module ol/layer/WebGLPoints\n */\nimport Layer from './Layer.js';\nimport WebGLPointsLayerRenderer from '../renderer/webgl/PointsLayer.js';\nimport {assign} from '../obj.js';\nimport {parseLiteralStyle} from '../webgl/ShaderBuilder.js';\n\n/**\n * @typedef {Object} Options\n * @property {import('../style/LiteralStyle.js').LiteralStyle} style Literal style to apply to the layer features.\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 {import(\"../source/Vector.js\").default} [source] Source.\n * @property {boolean} [disableHitDetection=false] Setting this to true will provide a slight performance boost, but will\n * prevent all hit detection on the layer.\n */\n\n/**\n * @classdesc\n * Layer optimized for rendering large point datasets. Takes a `style` property which\n * is a serializable JSON object describing how the layer should be rendered.\n *\n * Here are a few samples of literal style objects:\n * ```js\n * const style = {\n * symbol: {\n * symbolType: 'circle',\n * size: 8,\n * color: '#33AAFF',\n * opacity: 0.9\n * }\n * }\n * ```\n *\n * ```js\n * const style = {\n * symbol: {\n * symbolType: 'image',\n * offset: [0, 12],\n * size: [4, 8],\n * src: '../static/exclamation-mark.png'\n * }\n * }\n * ```\n *\n * **Important: a `WebGLPoints` layer must be manually disposed when removed, otherwise the underlying WebGL context\n * will not be garbage collected.**\n *\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @fires import(\"../render/Event.js\").RenderEvent\n */\nclass WebGLPointsLayer extends Layer {\n /**\n * @param {Options} options Options.\n */\n constructor(options) {\n const baseOptions = assign({}, options);\n\n super(baseOptions);\n\n /**\n * @private\n * @type {import('../webgl/ShaderBuilder.js').StyleParseResult}\n */\n this.parseResult_ = parseLiteralStyle(options.style);\n\n /**\n * @private\n * @type {boolean}\n */\n this.hitDetectionDisabled_ = !!options.disableHitDetection;\n }\n\n /**\n * Create a renderer for this layer.\n * @return {WebGLPointsLayerRenderer} A layer renderer.\n */\n createRenderer() {\n return new WebGLPointsLayerRenderer(this, {\n className: this.getClassName(),\n vertexShader: this.parseResult_.builder.getSymbolVertexShader(),\n fragmentShader: this.parseResult_.builder.getSymbolFragmentShader(),\n hitVertexShader:\n !this.hitDetectionDisabled_ &&\n this.parseResult_.builder.getSymbolVertexShader(true),\n hitFragmentShader:\n !this.hitDetectionDisabled_ &&\n this.parseResult_.builder.getSymbolFragmentShader(true),\n uniforms: this.parseResult_.uniforms,\n attributes: this.parseResult_.attributes,\n });\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n this.getRenderer().disposeInternal();\n super.disposeInternal();\n }\n}\n\nexport default WebGLPointsLayer;\n","/**\n * @module ol/layer\n */\n\nexport {default as Graticule} from './layer/Graticule.js';\nexport {default as Group} from './layer/Group.js';\nexport {default as Heatmap} from './layer/Heatmap.js';\nexport {default as Image} from './layer/Image.js';\nexport {default as Layer} from './layer/Layer.js';\nexport {default as MapboxVector} from './layer/MapboxVector.js';\nexport {default as Tile} from './layer/Tile.js';\nexport {default as Vector} from './layer/Vector.js';\nexport {default as VectorImage} from './layer/VectorImage.js';\nexport {default as VectorTile} from './layer/VectorTile.js';\nexport {default as WebGLPoints} from './layer/WebGLPoints.js';\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","module.exports = require('./lib/axios');","// utils\nimport { createCache, getObjectCloneLoose, getObjectCloneStrict, getRegExpFlags } from './utils';\n\nconst { isArray } = Array;\n\nconst GLOBAL_THIS = (() => {\n if (typeof self !== 'undefined') {\n return self;\n }\n\n if (typeof window !== 'undefined') {\n return window;\n }\n\n if (typeof global !== 'undefined') {\n return global;\n }\n\n if (console && console.error) {\n console.error('Unable to locate global object, returning \"this\".');\n }\n})();\n\n/**\n * @function copy\n *\n * @description\n * copy an object deeply as much as possible\n *\n * If `strict` is applied, then all properties (including non-enumerable ones)\n * are copied with their original property descriptors on both objects and arrays.\n *\n * The object is compared to the global constructors in the `realm` provided,\n * and the native constructor is always used to ensure that extensions of native\n * objects (allows in ES2015+) are maintained.\n *\n * @param object the object to copy\n * @param [options] the options for copying with\n * @param [options.isStrict] should the copy be strict\n * @param [options.realm] the realm (this) object the object is copied from\n * @returns the copied object\n */\nfunction copy<T>(object: T, options?: FastCopy.Options): T {\n // manually coalesced instead of default parameters for performance\n const isStrict: boolean = !!(options && options.isStrict);\n const realm: FastCopy.Realm = (options && options.realm) || GLOBAL_THIS;\n\n const getObjectClone: FastCopy.ObjectCloner = isStrict\n ? getObjectCloneStrict\n : getObjectCloneLoose;\n\n /**\n * @function handleCopy\n *\n * @description\n * copy the object recursively based on its type\n *\n * @param object the object to copy\n * @returns the copied object\n */\n const handleCopy: FastCopy.Copier = (object: any, cache: FastCopy.Cache): any => {\n if (!object || typeof object !== 'object') {\n return object;\n } if (cache.has(object)) {\n return cache.get(object);\n }\n\n const { constructor: Constructor } = object;\n\n // plain objects\n if (Constructor === realm.Object) {\n return getObjectClone(object, realm, handleCopy, cache);\n }\n\n let clone: any;\n // arrays\n if (isArray(object)) {\n // if strict, include non-standard properties\n if (isStrict) {\n return getObjectCloneStrict(object, realm, handleCopy, cache);\n }\n\n const { length } = object;\n\n clone = new Constructor();\n cache.set(object, clone);\n\n for (let index: number = 0; index < length; index++) {\n clone[index] = handleCopy(object[index], cache);\n }\n\n return clone;\n }\n\n // dates\n if (object instanceof realm.Date) {\n return new Constructor(object.getTime());\n }\n\n // regexps\n if (object instanceof realm.RegExp) {\n clone = new Constructor(object.source, object.flags || getRegExpFlags(object));\n\n clone.lastIndex = object.lastIndex;\n\n return clone;\n }\n\n // maps\n if (realm.Map && object instanceof realm.Map) {\n clone = new Constructor();\n cache.set(object, clone);\n\n object.forEach((value: any, key: any) => {\n clone.set(key, handleCopy(value, cache));\n });\n\n return clone;\n }\n\n // sets\n if (realm.Set && object instanceof realm.Set) {\n clone = new Constructor();\n cache.set(object, clone);\n\n object.forEach((value: any) => {\n clone.add(handleCopy(value, cache));\n });\n\n return clone;\n }\n\n // blobs\n if (realm.Blob && object instanceof realm.Blob) {\n return object.slice(0, object.size, object.type);\n }\n\n // buffers (node-only)\n if (realm.Buffer && realm.Buffer.isBuffer(object)) {\n clone = realm.Buffer.allocUnsafe\n ? realm.Buffer.allocUnsafe(object.length)\n : new Constructor(object.length);\n\n cache.set(object, clone);\n object.copy(clone);\n\n return clone;\n }\n\n // arraybuffers / dataviews\n if (realm.ArrayBuffer) {\n // dataviews\n if (realm.ArrayBuffer.isView(object)) {\n clone = new Constructor(object.buffer.slice(0));\n cache.set(object, clone);\n return clone;\n }\n\n // arraybuffers\n if (object instanceof realm.ArrayBuffer) {\n clone = object.slice(0);\n cache.set(object, clone);\n return clone;\n }\n }\n\n // if the object cannot / should not be cloned, don't\n if (\n // promise-like\n typeof object.then === 'function' ||\n // errors\n object instanceof Error ||\n // weakmaps\n (realm.WeakMap && object instanceof realm.WeakMap) ||\n // weaksets\n (realm.WeakSet && object instanceof realm.WeakSet)\n ) {\n return object;\n }\n\n // assume anything left is a custom constructor\n return getObjectClone(object, realm, handleCopy, cache);\n };\n\n return handleCopy(object, createCache());\n}\n\n// Adding reference to allow usage in CommonJS libraries compiled using TSC, which\n// expects there to be a default property on the exported object. See\n// [#37](https://github.com/planttheidea/fast-copy/issues/37) for details.\ncopy.default = copy;\n\n/**\n * @function strictCopy\n *\n * @description\n * copy the object with `strict` option pre-applied\n *\n * @param object the object to copy\n * @param [options] the options for copying with\n * @param [options.realm] the realm (this) object the object is copied from\n * @returns the copied object\n */\ncopy.strict = function strictCopy(object: any, options?: FastCopy.Options) {\n return copy(object, {\n isStrict: true,\n realm: options ? options.realm : void 0,\n });\n};\n\nexport default copy;\n","const { toString: toStringFunction } = Function.prototype;\nconst {\n create,\n defineProperty,\n getOwnPropertyDescriptor,\n getOwnPropertyNames,\n getOwnPropertySymbols,\n getPrototypeOf,\n} = Object;\nconst { hasOwnProperty, propertyIsEnumerable } = Object.prototype;\n\n/**\n * @enum\n *\n * @const {Object} SUPPORTS\n *\n * @property {boolean} SYMBOL_PROPERTIES are symbol properties supported\n * @property {boolean} WEAKMAP is WeakMap supported\n */\nexport const SUPPORTS = {\n SYMBOL_PROPERTIES: typeof getOwnPropertySymbols === 'function',\n WEAKMAP: typeof WeakMap === 'function',\n};\n\n/**\n * @function createCache\n *\n * @description\n * get a new cache object to prevent circular references\n *\n * @returns the new cache object\n */\nexport const createCache = (): FastCopy.Cache => {\n if (SUPPORTS.WEAKMAP) {\n return new WeakMap();\n }\n\n // tiny implementation of WeakMap\n const object = create({\n has: (key: any) => !!~object._keys.indexOf(key),\n set: (key: any, value: any) => {\n object._keys.push(key);\n object._values.push(value);\n },\n get: (key: any) => object._values[object._keys.indexOf(key)],\n });\n\n object._keys = [];\n object._values = [];\n\n return object;\n};\n\n/**\n * @function getCleanClone\n *\n * @description\n * get an empty version of the object with the same prototype it has\n *\n * @param object the object to build a clean clone from\n * @param realm the realm the object resides in\n * @returns the empty cloned object\n */\nexport const getCleanClone = (object: any, realm: FastCopy.Realm): any => {\n if (!object.constructor) {\n return create(null);\n }\n\n const { constructor: Constructor } = object;\n const prototype = object.__proto__ || getPrototypeOf(object);\n\n if (Constructor === realm.Object) {\n return prototype === realm.Object.prototype ? {} : create(prototype);\n }\n\n if (~toStringFunction.call(Constructor).indexOf('[native code]')) {\n try {\n return new Constructor();\n } catch {}\n }\n\n return create(prototype);\n};\n\n/**\n * @function getObjectCloneLoose\n *\n * @description\n * get a copy of the object based on loose rules, meaning all enumerable keys\n * and symbols are copied, but property descriptors are not considered\n *\n * @param object the object to clone\n * @param realm the realm the object resides in\n * @param handleCopy the function that handles copying the object\n * @returns the copied object\n */\nexport const getObjectCloneLoose: FastCopy.ObjectCloner = (\n object: any,\n realm: FastCopy.Realm,\n handleCopy: FastCopy.Copier,\n cache: FastCopy.Cache,\n): any => {\n const clone: any = getCleanClone(object, realm);\n // set in the cache immediately to be able to reuse the object recursively\n cache.set(object, clone);\n\n for (const key in object) {\n if (hasOwnProperty.call(object, key)) {\n clone[key] = handleCopy(object[key], cache);\n }\n }\n\n if (SUPPORTS.SYMBOL_PROPERTIES) {\n const symbols: symbol[] = getOwnPropertySymbols(object);\n\n const { length } = symbols;\n\n if (length) {\n for (let index = 0, symbol; index < length; index++) {\n symbol = symbols[index];\n\n if (propertyIsEnumerable.call(object, symbol)) {\n clone[symbol] = handleCopy(object[symbol], cache);\n }\n }\n }\n }\n\n return clone;\n};\n\n/**\n * @function getObjectCloneStrict\n *\n * @description\n * get a copy of the object based on strict rules, meaning all keys and symbols\n * are copied based on the original property descriptors\n *\n * @param object the object to clone\n * @param realm the realm the object resides in\n * @param handleCopy the function that handles copying the object\n * @returns the copied object\n */\nexport const getObjectCloneStrict: FastCopy.ObjectCloner = (\n object: any,\n realm: FastCopy.Realm,\n handleCopy: FastCopy.Copier,\n cache: FastCopy.Cache,\n): any => {\n const clone: any = getCleanClone(object, realm);\n // set in the cache immediately to be able to reuse the object recursively\n cache.set(object, clone);\n\n const properties: (string | symbol)[] = SUPPORTS.SYMBOL_PROPERTIES\n ? getOwnPropertyNames(object).concat((getOwnPropertySymbols(object) as unknown) as string[])\n : getOwnPropertyNames(object);\n\n const { length } = properties;\n\n if (length) {\n for (let index = 0, property, descriptor; index < length; index++) {\n property = properties[index];\n\n if (property !== 'callee' && property !== 'caller') {\n descriptor = getOwnPropertyDescriptor(object, property);\n\n if (descriptor) {\n // Only clone the value if actually a value, not a getter / setter.\n if (!descriptor.get && !descriptor.set) {\n descriptor.value = handleCopy(object[property], cache);\n }\n\n try {\n defineProperty(clone, property, descriptor);\n } catch (error) {\n // Tee above can fail on node in edge cases, so fall back to the loose assignment.\n clone[property] = descriptor.value;\n }\n } else {\n // In extra edge cases where the property descriptor cannot be retrived, fall back to\n // the loose assignment.\n clone[property] = handleCopy(object[property], cache);\n }\n }\n }\n }\n\n return clone;\n};\n\n/**\n * @function getRegExpFlags\n *\n * @description\n * get the flags to apply to the copied regexp\n *\n * @param regExp the regexp to get the flags of\n * @returns the flags for the regexp\n */\nexport const getRegExpFlags = (regExp: RegExp): string => {\n let flags = '';\n\n if (regExp.global) {\n flags += 'g';\n }\n\n if (regExp.ignoreCase) {\n flags += 'i';\n }\n\n if (regExp.multiline) {\n flags += 'm';\n }\n\n if (regExp.unicode) {\n flags += 'u';\n }\n\n if (regExp.sticky) {\n flags += 'y';\n }\n\n return flags;\n};\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar hexTable = (function () {\n var array = [];\n for (var i = 0; i < 256; ++i) {\n array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());\n }\n\n return array;\n}());\n\nvar compactQueue = function compactQueue(queue) {\n while (queue.length > 1) {\n var item = queue.pop();\n var obj = item.obj[item.prop];\n\n if (isArray(obj)) {\n var compacted = [];\n\n for (var j = 0; j < obj.length; ++j) {\n if (typeof obj[j] !== 'undefined') {\n compacted.push(obj[j]);\n }\n }\n\n item.obj[item.prop] = compacted;\n }\n }\n};\n\nvar arrayToObject = function arrayToObject(source, options) {\n var obj = options && options.plainObjects ? Object.create(null) : {};\n for (var i = 0; i < source.length; ++i) {\n if (typeof source[i] !== 'undefined') {\n obj[i] = source[i];\n }\n }\n\n return obj;\n};\n\nvar merge = function merge(target, source, options) {\n /* eslint no-param-reassign: 0 */\n if (!source) {\n return target;\n }\n\n if (typeof source !== 'object') {\n if (isArray(target)) {\n target.push(source);\n } else if (target && typeof target === 'object') {\n if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {\n target[source] = true;\n }\n } else {\n return [target, source];\n }\n\n return target;\n }\n\n if (!target || typeof target !== 'object') {\n return [target].concat(source);\n }\n\n var mergeTarget = target;\n if (isArray(target) && !isArray(source)) {\n mergeTarget = arrayToObject(target, options);\n }\n\n if (isArray(target) && isArray(source)) {\n source.forEach(function (item, i) {\n if (has.call(target, i)) {\n var targetItem = target[i];\n if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {\n target[i] = merge(targetItem, item, options);\n } else {\n target.push(item);\n }\n } else {\n target[i] = item;\n }\n });\n return target;\n }\n\n return Object.keys(source).reduce(function (acc, key) {\n var value = source[key];\n\n if (has.call(acc, key)) {\n acc[key] = merge(acc[key], value, options);\n } else {\n acc[key] = value;\n }\n return acc;\n }, mergeTarget);\n};\n\nvar assign = function assignSingleSource(target, source) {\n return Object.keys(source).reduce(function (acc, key) {\n acc[key] = source[key];\n return acc;\n }, target);\n};\n\nvar decode = function (str, decoder, charset) {\n var strWithoutPlus = str.replace(/\\+/g, ' ');\n if (charset === 'iso-8859-1') {\n // unescape never throws, no try...catch needed:\n return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);\n }\n // utf-8\n try {\n return decodeURIComponent(strWithoutPlus);\n } catch (e) {\n return strWithoutPlus;\n }\n};\n\nvar encode = function encode(str, defaultEncoder, charset) {\n // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n\n var string = str;\n if (typeof str === 'symbol') {\n string = Symbol.prototype.toString.call(str);\n } else if (typeof str !== 'string') {\n string = String(str);\n }\n\n if (charset === 'iso-8859-1') {\n return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {\n return '%26%23' + parseInt($0.slice(2), 16) + '%3B';\n });\n }\n\n var out = '';\n for (var i = 0; i < string.length; ++i) {\n var c = string.charCodeAt(i);\n\n if (\n c === 0x2D // -\n || c === 0x2E // .\n || c === 0x5F // _\n || c === 0x7E // ~\n || (c >= 0x30 && c <= 0x39) // 0-9\n || (c >= 0x41 && c <= 0x5A) // a-z\n || (c >= 0x61 && c <= 0x7A) // A-Z\n ) {\n out += string.charAt(i);\n continue;\n }\n\n if (c < 0x80) {\n out = out + hexTable[c];\n continue;\n }\n\n if (c < 0x800) {\n out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n if (c < 0xD800 || c >= 0xE000) {\n out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n i += 1;\n c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));\n out += hexTable[0xF0 | (c >> 18)]\n + hexTable[0x80 | ((c >> 12) & 0x3F)]\n + hexTable[0x80 | ((c >> 6) & 0x3F)]\n + hexTable[0x80 | (c & 0x3F)];\n }\n\n return out;\n};\n\nvar compact = function compact(value) {\n var queue = [{ obj: { o: value }, prop: 'o' }];\n var refs = [];\n\n for (var i = 0; i < queue.length; ++i) {\n var item = queue[i];\n var obj = item.obj[item.prop];\n\n var keys = Object.keys(obj);\n for (var j = 0; j < keys.length; ++j) {\n var key = keys[j];\n var val = obj[key];\n if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {\n queue.push({ obj: obj, prop: key });\n refs.push(val);\n }\n }\n }\n\n compactQueue(queue);\n\n return value;\n};\n\nvar isRegExp = function isRegExp(obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\nvar isBuffer = function isBuffer(obj) {\n if (!obj || typeof obj !== 'object') {\n return false;\n }\n\n return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n};\n\nvar combine = function combine(a, b) {\n return [].concat(a, b);\n};\n\nvar maybeMap = function maybeMap(val, fn) {\n if (isArray(val)) {\n var mapped = [];\n for (var i = 0; i < val.length; i += 1) {\n mapped.push(fn(val[i]));\n }\n return mapped;\n }\n return fn(val);\n};\n\nmodule.exports = {\n arrayToObject: arrayToObject,\n assign: assign,\n combine: combine,\n compact: compact,\n decode: decode,\n encode: encode,\n isBuffer: isBuffer,\n isRegExp: isRegExp,\n maybeMap: maybeMap,\n merge: merge\n};\n","'use strict';\n\nvar replace = String.prototype.replace;\nvar percentTwenties = /%20/g;\n\nvar util = require('./utils');\n\nvar Format = {\n RFC1738: 'RFC1738',\n RFC3986: 'RFC3986'\n};\n\nmodule.exports = util.assign(\n {\n 'default': Format.RFC3986,\n formatters: {\n RFC1738: function (value) {\n return replace.call(value, percentTwenties, '+');\n },\n RFC3986: function (value) {\n return String(value);\n }\n }\n },\n Format\n);\n","'use strict';\n\nvar utils = require('./utils');\nvar formats = require('./formats');\nvar has = Object.prototype.hasOwnProperty;\n\nvar arrayPrefixGenerators = {\n brackets: function brackets(prefix) {\n return prefix + '[]';\n },\n comma: 'comma',\n indices: function indices(prefix, key) {\n return prefix + '[' + key + ']';\n },\n repeat: function repeat(prefix) {\n return prefix;\n }\n};\n\nvar isArray = Array.isArray;\nvar push = Array.prototype.push;\nvar pushToArray = function (arr, valueOrArray) {\n push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);\n};\n\nvar toISO = Date.prototype.toISOString;\n\nvar defaultFormat = formats['default'];\nvar defaults = {\n addQueryPrefix: false,\n allowDots: false,\n charset: 'utf-8',\n charsetSentinel: false,\n delimiter: '&',\n encode: true,\n encoder: utils.encode,\n encodeValuesOnly: false,\n format: defaultFormat,\n formatter: formats.formatters[defaultFormat],\n // deprecated\n indices: false,\n serializeDate: function serializeDate(date) {\n return toISO.call(date);\n },\n skipNulls: false,\n strictNullHandling: false\n};\n\nvar isNonNullishPrimitive = function isNonNullishPrimitive(v) {\n return typeof v === 'string'\n || typeof v === 'number'\n || typeof v === 'boolean'\n || typeof v === 'symbol'\n || typeof v === 'bigint';\n};\n\nvar stringify = function stringify(\n object,\n prefix,\n generateArrayPrefix,\n strictNullHandling,\n skipNulls,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n formatter,\n encodeValuesOnly,\n charset\n) {\n var obj = object;\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n } else if (obj instanceof Date) {\n obj = serializeDate(obj);\n } else if (generateArrayPrefix === 'comma' && isArray(obj)) {\n obj = utils.maybeMap(obj, function (value) {\n if (value instanceof Date) {\n return serializeDate(value);\n }\n return value;\n }).join(',');\n }\n\n if (obj === null) {\n if (strictNullHandling) {\n return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key') : prefix;\n }\n\n obj = '';\n }\n\n if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {\n if (encoder) {\n var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key');\n return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value'))];\n }\n return [formatter(prefix) + '=' + formatter(String(obj))];\n }\n\n var values = [];\n\n if (typeof obj === 'undefined') {\n return values;\n }\n\n var objKeys;\n if (isArray(filter)) {\n objKeys = filter;\n } else {\n var keys = Object.keys(obj);\n objKeys = sort ? keys.sort(sort) : keys;\n }\n\n for (var i = 0; i < objKeys.length; ++i) {\n var key = objKeys[i];\n var value = obj[key];\n\n if (skipNulls && value === null) {\n continue;\n }\n\n var keyPrefix = isArray(obj)\n ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix\n : prefix + (allowDots ? '.' + key : '[' + key + ']');\n\n pushToArray(values, stringify(\n value,\n keyPrefix,\n generateArrayPrefix,\n strictNullHandling,\n skipNulls,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n formatter,\n encodeValuesOnly,\n charset\n ));\n }\n\n return values;\n};\n\nvar normalizeStringifyOptions = function normalizeStringifyOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') {\n throw new TypeError('Encoder has to be a function.');\n }\n\n var charset = opts.charset || defaults.charset;\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n\n var format = formats['default'];\n if (typeof opts.format !== 'undefined') {\n if (!has.call(formats.formatters, opts.format)) {\n throw new TypeError('Unknown format option provided.');\n }\n format = opts.format;\n }\n var formatter = formats.formatters[format];\n\n var filter = defaults.filter;\n if (typeof opts.filter === 'function' || isArray(opts.filter)) {\n filter = opts.filter;\n }\n\n return {\n addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,\n allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,\n encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,\n encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,\n encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,\n filter: filter,\n formatter: formatter,\n serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,\n skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,\n sort: typeof opts.sort === 'function' ? opts.sort : null,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\n\nmodule.exports = function (object, opts) {\n var obj = object;\n var options = normalizeStringifyOptions(opts);\n\n var objKeys;\n var filter;\n\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n } else if (isArray(options.filter)) {\n filter = options.filter;\n objKeys = filter;\n }\n\n var keys = [];\n\n if (typeof obj !== 'object' || obj === null) {\n return '';\n }\n\n var arrayFormat;\n if (opts && opts.arrayFormat in arrayPrefixGenerators) {\n arrayFormat = opts.arrayFormat;\n } else if (opts && 'indices' in opts) {\n arrayFormat = opts.indices ? 'indices' : 'repeat';\n } else {\n arrayFormat = 'indices';\n }\n\n var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];\n\n if (!objKeys) {\n objKeys = Object.keys(obj);\n }\n\n if (options.sort) {\n objKeys.sort(options.sort);\n }\n\n for (var i = 0; i < objKeys.length; ++i) {\n var key = objKeys[i];\n\n if (options.skipNulls && obj[key] === null) {\n continue;\n }\n pushToArray(keys, stringify(\n obj[key],\n key,\n generateArrayPrefix,\n options.strictNullHandling,\n options.skipNulls,\n options.encode ? options.encoder : null,\n options.filter,\n options.sort,\n options.allowDots,\n options.serializeDate,\n options.formatter,\n options.encodeValuesOnly,\n options.charset\n ));\n }\n\n var joined = keys.join(options.delimiter);\n var prefix = options.addQueryPrefix === true ? '?' : '';\n\n if (options.charsetSentinel) {\n if (options.charset === 'iso-8859-1') {\n // encodeURIComponent('✓'), the \"numeric entity\" representation of a checkmark\n prefix += 'utf8=%26%2310003%3B&';\n } else {\n // encodeURIComponent('✓')\n prefix += 'utf8=%E2%9C%93&';\n }\n }\n\n return joined.length > 0 ? prefix + joined : '';\n};\n","'use strict';\n\nvar utils = require('./utils');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar defaults = {\n allowDots: false,\n allowPrototypes: false,\n arrayLimit: 20,\n charset: 'utf-8',\n charsetSentinel: false,\n comma: false,\n decoder: utils.decode,\n delimiter: '&',\n depth: 5,\n ignoreQueryPrefix: false,\n interpretNumericEntities: false,\n parameterLimit: 1000,\n parseArrays: true,\n plainObjects: false,\n strictNullHandling: false\n};\n\nvar interpretNumericEntities = function (str) {\n return str.replace(/&#(\\d+);/g, function ($0, numberStr) {\n return String.fromCharCode(parseInt(numberStr, 10));\n });\n};\n\nvar parseArrayValue = function (val, options) {\n if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {\n return val.split(',');\n }\n\n return val;\n};\n\n// This is what browsers will submit when the ✓ character occurs in an\n// application/x-www-form-urlencoded body and the encoding of the page containing\n// the form is iso-8859-1, or when the submitted form has an accept-charset\n// attribute of iso-8859-1. Presumably also with other charsets that do not contain\n// the ✓ character, such as us-ascii.\nvar isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')\n\n// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.\nvar charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')\n\nvar parseValues = function parseQueryStringValues(str, options) {\n var obj = {};\n var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\\?/, '') : str;\n var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;\n var parts = cleanStr.split(options.delimiter, limit);\n var skipIndex = -1; // Keep track of where the utf8 sentinel was found\n var i;\n\n var charset = options.charset;\n if (options.charsetSentinel) {\n for (i = 0; i < parts.length; ++i) {\n if (parts[i].indexOf('utf8=') === 0) {\n if (parts[i] === charsetSentinel) {\n charset = 'utf-8';\n } else if (parts[i] === isoSentinel) {\n charset = 'iso-8859-1';\n }\n skipIndex = i;\n i = parts.length; // The eslint settings do not allow break;\n }\n }\n }\n\n for (i = 0; i < parts.length; ++i) {\n if (i === skipIndex) {\n continue;\n }\n var part = parts[i];\n\n var bracketEqualsPos = part.indexOf(']=');\n var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;\n\n var key, val;\n if (pos === -1) {\n key = options.decoder(part, defaults.decoder, charset, 'key');\n val = options.strictNullHandling ? null : '';\n } else {\n key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');\n val = utils.maybeMap(\n parseArrayValue(part.slice(pos + 1), options),\n function (encodedVal) {\n return options.decoder(encodedVal, defaults.decoder, charset, 'value');\n }\n );\n }\n\n if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {\n val = interpretNumericEntities(val);\n }\n\n if (part.indexOf('[]=') > -1) {\n val = isArray(val) ? [val] : val;\n }\n\n if (has.call(obj, key)) {\n obj[key] = utils.combine(obj[key], val);\n } else {\n obj[key] = val;\n }\n }\n\n return obj;\n};\n\nvar parseObject = function (chain, val, options, valuesParsed) {\n var leaf = valuesParsed ? val : parseArrayValue(val, options);\n\n for (var i = chain.length - 1; i >= 0; --i) {\n var obj;\n var root = chain[i];\n\n if (root === '[]' && options.parseArrays) {\n obj = [].concat(leaf);\n } else {\n obj = options.plainObjects ? Object.create(null) : {};\n var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;\n var index = parseInt(cleanRoot, 10);\n if (!options.parseArrays && cleanRoot === '') {\n obj = { 0: leaf };\n } else if (\n !isNaN(index)\n && root !== cleanRoot\n && String(index) === cleanRoot\n && index >= 0\n && (options.parseArrays && index <= options.arrayLimit)\n ) {\n obj = [];\n obj[index] = leaf;\n } else {\n obj[cleanRoot] = leaf;\n }\n }\n\n leaf = obj; // eslint-disable-line no-param-reassign\n }\n\n return leaf;\n};\n\nvar parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {\n if (!givenKey) {\n return;\n }\n\n // Transform dot notation to bracket notation\n var key = options.allowDots ? givenKey.replace(/\\.([^.[]+)/g, '[$1]') : givenKey;\n\n // The regex chunks\n\n var brackets = /(\\[[^[\\]]*])/;\n var child = /(\\[[^[\\]]*])/g;\n\n // Get the parent\n\n var segment = options.depth > 0 && brackets.exec(key);\n var parent = segment ? key.slice(0, segment.index) : key;\n\n // Stash the parent if it exists\n\n var keys = [];\n if (parent) {\n // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties\n if (!options.plainObjects && has.call(Object.prototype, parent)) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n\n keys.push(parent);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {\n i += 1;\n if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, just add whatever is left\n\n if (segment) {\n keys.push('[' + key.slice(segment.index) + ']');\n }\n\n return parseObject(keys, val, options, valuesParsed);\n};\n\nvar normalizeParseOptions = function normalizeParseOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {\n throw new TypeError('Decoder has to be a function.');\n }\n\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;\n\n return {\n allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,\n arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,\n decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,\n delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,\n // eslint-disable-next-line no-implicit-coercion, no-extra-parens\n depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,\n ignoreQueryPrefix: opts.ignoreQueryPrefix === true,\n interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,\n parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,\n parseArrays: opts.parseArrays !== false,\n plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\n\nmodule.exports = function (str, opts) {\n var options = normalizeParseOptions(opts);\n\n if (str === '' || str === null || typeof str === 'undefined') {\n return options.plainObjects ? Object.create(null) : {};\n }\n\n var tempObj = typeof str === 'string' ? parseValues(str, options) : str;\n var obj = options.plainObjects ? Object.create(null) : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');\n obj = utils.merge(obj, newObj, options);\n }\n\n return utils.compact(obj);\n};\n","'use strict';\n\nvar stringify = require('./stringify');\nvar parse = require('./parse');\nvar formats = require('./formats');\n\nmodule.exports = {\n formats: formats,\n parse: parse,\n stringify: stringify\n};\n","import copy from 'fast-copy';\nimport qs from 'qs';\nimport { platform, release } from 'os';\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) {\n var it;\n\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n\n var F = function () {};\n\n return {\n s: F,\n n: function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function (e) {\n throw e;\n },\n f: F\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function () {\n it = o[Symbol.iterator]();\n },\n n: function () {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function (e) {\n didErr = true;\n err = e;\n },\n f: function () {\n try {\n if (!normalCompletion && it.return != null) it.return();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}\n\nvar attempts = {};\nvar networkErrorAttempts = 0;\n\nfunction noop() {\n return undefined;\n}\n\nvar delay = function delay(ms) {\n return new Promise(function (resolve) {\n setTimeout(resolve, ms);\n });\n};\n\nfunction rateLimit(instance) {\n var maxRetry = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5;\n var _instance$defaults = instance.defaults,\n _instance$defaults$re = _instance$defaults.responseLogger,\n responseLogger = _instance$defaults$re === void 0 ? noop : _instance$defaults$re,\n _instance$defaults$re2 = _instance$defaults.requestLogger,\n requestLogger = _instance$defaults$re2 === void 0 ? noop : _instance$defaults$re2;\n instance.interceptors.request.use(function (config) {\n requestLogger(config);\n return config;\n }, function (error) {\n requestLogger(error);\n return Promise.reject(error);\n });\n instance.interceptors.response.use(function (response) {\n // we don't need to do anything here\n responseLogger(response);\n return response;\n }, function (error) {\n var response = error.response;\n var config = error.config;\n responseLogger(error); // Do not retry if it is disabled or no request config exists (not an axios error)\n\n if (!config || !instance.defaults.retryOnError) {\n return Promise.reject(error);\n }\n\n var retryErrorType = null;\n var wait = 0; // Errors without response did not recieve anything from the server\n\n if (!response) {\n retryErrorType = 'Connection';\n networkErrorAttempts++;\n\n if (networkErrorAttempts > maxRetry) {\n error.attempts = networkErrorAttempts;\n return Promise.reject(error);\n }\n\n wait = Math.pow(Math.SQRT2, networkErrorAttempts);\n response = {};\n } else {\n networkErrorAttempts = 0;\n }\n\n if (response.status >= 500 && response.status < 600) {\n // 5** errors are server related\n retryErrorType = \"Server \".concat(response.status);\n var headers = response.headers || {};\n var requestId = headers['x-contentful-request-id'] || null;\n attempts[requestId] = attempts[requestId] || 0;\n attempts[requestId]++; // we reject if there are too many errors with the same request id or request id is not defined\n\n if (attempts[requestId] > maxRetry || !requestId) {\n error.attempts = attempts[requestId];\n return Promise.reject(error);\n }\n\n wait = Math.pow(Math.SQRT2, attempts[requestId]);\n } else if (response.status === 429) {\n // 429 errors are exceeded rate limit exceptions\n retryErrorType = 'Rate limit'; // all headers are lowercased by axios https://github.com/mzabriskie/axios/issues/413\n\n if (response.headers && error.response.headers['x-contentful-ratelimit-reset']) {\n wait = response.headers['x-contentful-ratelimit-reset'];\n }\n }\n\n if (retryErrorType) {\n // convert to ms and add jitter\n wait = Math.floor(wait * 1000 + Math.random() * 200 + 500);\n instance.defaults.logHandler('warning', \"\".concat(retryErrorType, \" error occurred. Waiting for \").concat(wait, \" ms before retrying...\"));\n /* Somehow between the interceptor and retrying the request the httpAgent/httpsAgent gets transformed from an Agent-like object\n to a regular object, causing failures on retries after rate limits. Removing these properties here fixes the error, but retry\n requests still use the original http/httpsAgent property */\n\n delete config.httpAgent;\n delete config.httpsAgent;\n return delay(wait).then(function () {\n return instance(config);\n });\n }\n\n return Promise.reject(error);\n });\n}\n\nfunction asyncToken(instance, getToken) {\n instance.interceptors.request.use(function (config) {\n return getToken().then(function (accessToken) {\n config.headers = _objectSpread2(_objectSpread2({}, config.headers), {}, {\n Authorization: \"Bearer \".concat(accessToken)\n });\n return config;\n });\n });\n}\n\nfunction isNode() {\n /**\n * Polyfills of 'process' might set process.browser === true\n *\n * See:\n * https://github.com/webpack/node-libs-browser/blob/master/mock/process.js#L8\n * https://github.com/defunctzombie/node-process/blob/master/browser.js#L156\n **/\n return typeof process !== 'undefined' && !process.browser;\n}\nfunction isReactNative() {\n return typeof window !== 'undefined' && 'navigator' in window && 'product' in window.navigator && window.navigator.product === 'ReactNative';\n}\nfunction getNodeVersion() {\n return process.versions && process.versions.node ? \"v\".concat(process.versions.node) : process.version;\n}\nfunction getWindow() {\n return window;\n}\n\n// Also enforces toplevel domain specified, no spaces and no protocol\n\nvar HOST_REGEX = /^(?!\\w+:\\/\\/)([^\\s:]+\\.?[^\\s:]+)(?::(\\d+))?(?!:)$/;\n/**\n * Create pre configured axios instance\n * @private\n * @param {AxiosStatic} axios - Axios library\n * @param {CreateHttpClientParams} options - Initialization parameters for the HTTP client\n * @return {ContentfulAxiosInstance} Initialized axios instance\n */\n\nfunction createHttpClient(axios, options) {\n var defaultConfig = {\n insecure: false,\n retryOnError: true,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n logHandler: function logHandler(level, data) {\n if (level === 'error' && data) {\n var title = [data.name, data.message].filter(function (a) {\n return a;\n }).join(' - ');\n console.error(\"[error] \".concat(title));\n console.error(data);\n return;\n }\n\n console.log(\"[\".concat(level, \"] \").concat(data));\n },\n // Passed to axios\n headers: {},\n httpAgent: false,\n httpsAgent: false,\n timeout: 30000,\n proxy: false,\n basePath: '',\n adapter: undefined,\n maxContentLength: 1073741824 // 1GB\n\n };\n\n var config = _objectSpread2(_objectSpread2({}, defaultConfig), options);\n\n if (!config.accessToken) {\n var missingAccessTokenError = new TypeError('Expected parameter accessToken');\n config.logHandler('error', missingAccessTokenError);\n throw missingAccessTokenError;\n } // Construct axios baseURL option\n\n\n var protocol = config.insecure ? 'http' : 'https';\n var space = config.space ? \"\".concat(config.space, \"/\") : '';\n var hostname = config.defaultHostname;\n var port = config.insecure ? 80 : 443;\n\n if (config.host && HOST_REGEX.test(config.host)) {\n var parsed = config.host.split(':');\n\n if (parsed.length === 2) {\n\n var _parsed = _slicedToArray(parsed, 2);\n\n hostname = _parsed[0];\n port = _parsed[1];\n } else {\n hostname = parsed[0];\n }\n } // Ensure that basePath does start but not end with a slash\n\n\n if (config.basePath) {\n config.basePath = \"/\".concat(config.basePath.split('/').filter(Boolean).join('/'));\n }\n\n var baseURL = options.baseURL || \"\".concat(protocol, \"://\").concat(hostname, \":\").concat(port).concat(config.basePath, \"/spaces/\").concat(space);\n\n if (!config.headers.Authorization && typeof config.accessToken !== 'function') {\n config.headers.Authorization = 'Bearer ' + config.accessToken;\n } // Set these headers only for node because browsers don't like it when you\n // override user-agent or accept-encoding.\n // The SDKs should set their own X-Contentful-User-Agent.\n\n\n if (isNode()) {\n config.headers['user-agent'] = 'node.js/' + getNodeVersion();\n config.headers['Accept-Encoding'] = 'gzip';\n }\n\n var axiosOptions = {\n // Axios\n baseURL: baseURL,\n headers: config.headers,\n httpAgent: config.httpAgent,\n httpsAgent: config.httpsAgent,\n paramsSerializer: qs.stringify,\n proxy: config.proxy,\n timeout: config.timeout,\n adapter: config.adapter,\n maxContentLength: config.maxContentLength,\n // Contentful\n logHandler: config.logHandler,\n responseLogger: config.responseLogger,\n requestLogger: config.requestLogger,\n retryOnError: config.retryOnError\n };\n var instance = axios.create(axiosOptions);\n instance.httpClientParams = options;\n /**\n * Creates a new axios instance with the same default base parameters as the\n * current one, and with any overrides passed to the newParams object\n * This is useful as the SDKs use dependency injection to get the axios library\n * and the version of the library comes from different places depending\n * on whether it's a browser build or a node.js build.\n * @private\n * @param {CreateHttpClientParams} httpClientParams - Initialization parameters for the HTTP client\n * @return {ContentfulAxiosInstance} Initialized axios instance\n */\n\n instance.cloneWithNewParams = function (newParams) {\n return createHttpClient(axios, _objectSpread2(_objectSpread2({}, copy(options)), newParams));\n };\n /**\n * Apply interceptors.\n * Please note that the order of interceptors is important\n */\n\n\n if (config.onBeforeRequest) {\n instance.interceptors.request.use(config.onBeforeRequest);\n }\n\n if (typeof config.accessToken === 'function') {\n asyncToken(instance, config.accessToken);\n }\n\n rateLimit(instance, config.retryLimit);\n\n if (config.onError) {\n instance.interceptors.response.use(function (response) {\n return response;\n }, config.onError);\n }\n\n return instance;\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * Creates request parameters configuration by parsing an existing query object\n * @private\n * @param {Object} query\n * @return {Object} Config object with `params` property, ready to be used in axios\n */\nfunction createRequestConfig(_ref) {\n var query = _ref.query;\n var config = {};\n delete query.resolveLinks;\n config.params = copy(query);\n return config;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction enforceObjPath(obj, path) {\n if (!(path in obj)) {\n var err = new Error();\n err.name = 'PropertyMissing';\n err.message = \"Required property \".concat(path, \" missing from:\\n\\n\").concat(JSON.stringify(obj), \"\\n\\n\");\n throw err;\n }\n\n return true;\n}\n\n// copied from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze\nfunction deepFreeze(object) {\n var propNames = Object.getOwnPropertyNames(object);\n\n var _iterator = _createForOfIteratorHelper(propNames),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var name = _step.value;\n // @ts-expect-error\n var value = object[name];\n\n if (value && _typeof(value) === 'object') {\n deepFreeze(value);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return Object.freeze(object);\n}\n\nfunction freezeSys(obj) {\n // @ts-expect-error\n deepFreeze(obj.sys || {});\n return obj;\n}\n\nfunction getBrowserOS() {\n var win = getWindow();\n\n if (!win) {\n return null;\n }\n\n var userAgent = win.navigator.userAgent;\n var platform = win.navigator.platform;\n var macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'];\n var windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'];\n var iosPlatforms = ['iPhone', 'iPad', 'iPod'];\n var os = null;\n\n if (macosPlatforms.indexOf(platform) !== -1) {\n os = 'macOS';\n } else if (iosPlatforms.indexOf(platform) !== -1) {\n os = 'iOS';\n } else if (windowsPlatforms.indexOf(platform) !== -1) {\n os = 'Windows';\n } else if (/Android/.test(userAgent)) {\n os = 'Android';\n } else if (/Linux/.test(platform)) {\n os = 'Linux';\n }\n\n return os;\n}\n\nfunction getNodeOS() {\n var os = platform() || 'linux';\n var version = release() || '0.0.0';\n var osMap = {\n android: 'Android',\n aix: 'Linux',\n darwin: 'macOS',\n freebsd: 'Linux',\n linux: 'Linux',\n openbsd: 'Linux',\n sunos: 'Linux',\n win32: 'Windows'\n };\n\n if (os in osMap) {\n // @ts-expect-error\n return \"\".concat(osMap[os] || 'Linux', \"/\").concat(version);\n }\n\n return null;\n}\n\nfunction getUserAgentHeader(sdk, application, integration, feature) {\n var headerParts = [];\n\n if (application) {\n headerParts.push(\"app \".concat(application));\n }\n\n if (integration) {\n headerParts.push(\"integration \".concat(integration));\n }\n\n if (feature) {\n headerParts.push('feature ' + feature);\n }\n\n headerParts.push(\"sdk \".concat(sdk));\n var os = null;\n\n try {\n if (isReactNative()) {\n os = getBrowserOS();\n headerParts.push('platform ReactNative');\n } else if (isNode()) {\n os = getNodeOS();\n headerParts.push(\"platform node.js/\".concat(getNodeVersion()));\n } else {\n os = getBrowserOS();\n headerParts.push('platform browser');\n }\n } catch (e) {\n os = null;\n }\n\n if (os) {\n headerParts.push(\"os \".concat(os));\n }\n\n return \"\".concat(headerParts.filter(function (item) {\n return item !== '';\n }).join('; '), \";\");\n}\n\n/**\n * Mixes in a method to return just a plain object with no additional methods\n * @private\n * @param data - Any plain JSON response returned from the API\n * @return Enhanced object with toPlainObject method\n */\n\nfunction toPlainObject(data) {\n return Object.defineProperty(data, 'toPlainObject', {\n enumerable: false,\n configurable: false,\n writable: false,\n value: function value() {\n return copy(this);\n }\n });\n}\n\nexport { createHttpClient, createRequestConfig, enforceObjPath, freezeSys, getUserAgentHeader, toPlainObject };\n","import { toPlainObject, freezeSys } from 'contentful-sdk-core';\n/**\n * @memberof Entities\n * @typedef Space\n * @prop {Object} sys - System metadata\n * @prop {string} sys.id - Space id\n * @prop {string} sys.type - Entity type\n * @prop {string} name - Space name\n * @prop {Array<string>} locales - Array with locale codes\n * @prop {function(): Object} toPlainObject() - Returns this Space as a plain JS object\n */\n\n/**\n * @private\n * @param {Object} data - API response for a Space\n * @return {Space}\n */\n\nexport function wrapSpace(data) {\n return freezeSys(toPlainObject(data));\n}","exports = module.exports = stringify\nexports.getSerialize = serializer\n\nfunction stringify(obj, replacer, spaces, cycleReplacer) {\n return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces)\n}\n\nfunction serializer(replacer, cycleReplacer) {\n var stack = [], keys = []\n\n if (cycleReplacer == null) cycleReplacer = function(key, value) {\n if (stack[0] === value) return \"[Circular ~]\"\n return \"[Circular ~.\" + keys.slice(0, stack.indexOf(value)).join(\".\") + \"]\"\n }\n\n return function(key, value) {\n if (stack.length > 0) {\n var thisPos = stack.indexOf(this)\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this)\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key)\n if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value)\n }\n else stack.push(value)\n\n return replacer == null ? value : replacer.call(this, key, value)\n }\n}\n","import jsonStringifySafe from 'json-stringify-safe';\nexport default function mixinStringifySafe(data) {\n return Object.defineProperty(data, 'stringifySafe', {\n enumerable: false,\n configurable: false,\n writable: false,\n value: function value() {\n var serializer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var indent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n return jsonStringifySafe(this, serializer, indent, function (key, value) {\n return {\n sys: {\n type: 'Link',\n linkType: 'Entry',\n id: value.sys.id,\n circular: true\n }\n };\n });\n }\n });\n}","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nimport copy from 'fast-copy';\n\nvar UNRESOLVED_LINK = {}; // unique object to avoid polyfill bloat using Symbol()\n\n/**\n * isLink Function\n * Checks if the object has sys.type \"Link\"\n * @param object\n */\nvar isLink = function isLink(object) {\n return object && object.sys && object.sys.type === 'Link';\n};\n\n/**\n * Creates a string key for lookup in entityMap\n *\n * @param {*} sys\n * @param {String} sys.type\n * @param {String} sys.id\n * @return {String}\n */\nvar makeLookupKey = function makeLookupKey(sys) {\n return sys.type + '!' + sys.id;\n};\n\n/**\n * getLink Function\n *\n * @param response\n * @param link\n * @return {undefined}\n */\nvar getLink = function getLink(entityMap, link) {\n var _link$sys = link.sys,\n type = _link$sys.linkType,\n id = _link$sys.id;\n\n var lookupKey = makeLookupKey({ type: type, id: id });\n\n return entityMap.get(lookupKey) || UNRESOLVED_LINK;\n};\n\n/**\n * cleanUpLinks Function\n * - Removes unresolvable links from Arrays and Objects\n *\n * @param {Object[]|Object} input\n */\nvar cleanUpLinks = function cleanUpLinks(input) {\n if (Array.isArray(input)) {\n return input.filter(function (val) {\n return val !== UNRESOLVED_LINK;\n });\n }\n for (var key in input) {\n if (input[key] === UNRESOLVED_LINK) {\n delete input[key];\n }\n }\n return input;\n};\n\n/**\n * walkMutate Function\n * @param input\n * @param predicate\n * @param mutator\n * @return {*}\n */\nvar walkMutate = function walkMutate(input, predicate, mutator, removeUnresolved) {\n if (predicate(input)) {\n return mutator(input);\n }\n\n if (input && (typeof input === 'undefined' ? 'undefined' : _typeof(input)) === 'object') {\n for (var key in input) {\n if (input.hasOwnProperty(key)) {\n input[key] = walkMutate(input[key], predicate, mutator, removeUnresolved);\n }\n }\n if (removeUnresolved) {\n input = cleanUpLinks(input);\n }\n }\n return input;\n};\n\nvar normalizeLink = function normalizeLink(entityMap, link, removeUnresolved) {\n var resolvedLink = getLink(entityMap, link);\n if (resolvedLink === UNRESOLVED_LINK) {\n return removeUnresolved ? resolvedLink : link;\n }\n return resolvedLink;\n};\n\nvar makeEntryObject = function makeEntryObject(item, itemEntryPoints) {\n if (!Array.isArray(itemEntryPoints)) {\n return item;\n }\n\n var entryPoints = Object.keys(item).filter(function (ownKey) {\n return itemEntryPoints.indexOf(ownKey) !== -1;\n });\n\n return entryPoints.reduce(function (entryObj, entryPoint) {\n entryObj[entryPoint] = item[entryPoint];\n return entryObj;\n }, {});\n};\n\n/**\n * resolveResponse Function\n * Resolves contentful response to normalized form.\n * @param {Object} response Contentful response\n * @param {Object} options\n * @param {Boolean} options.removeUnresolved - Remove unresolved links default:false\n * @param {Array<String>} options.itemEntryPoints - Resolve links only in those item properties\n * @return {Object}\n */\nvar resolveResponse = function resolveResponse(response, options) {\n options = options || {};\n if (!response.items) {\n return [];\n }\n var responseClone = copy(response);\n var allIncludes = Object.keys(responseClone.includes || {}).reduce(function (all, type) {\n return [].concat(_toConsumableArray(all), _toConsumableArray(response.includes[type]));\n }, []);\n\n var allEntries = [].concat(_toConsumableArray(responseClone.items), _toConsumableArray(allIncludes));\n\n var entityMap = new Map(allEntries.map(function (entity) {\n return [makeLookupKey(entity.sys), entity];\n }));\n\n allEntries.forEach(function (item) {\n var entryObject = makeEntryObject(item, options.itemEntryPoints);\n\n Object.assign(item, walkMutate(entryObject, isLink, function (link) {\n return normalizeLink(entityMap, link, options.removeUnresolved);\n }, options.removeUnresolved));\n });\n\n return responseClone.items;\n};\n\nexport default resolveResponse;","import copy from 'fast-copy';\nimport { toPlainObject, freezeSys } from 'contentful-sdk-core';\nimport mixinStringifySafe from '../mixins/stringify-safe';\nimport resolveResponse from 'contentful-resolve-response';\n/**\n * Types of fields found in an Entry\n * @namespace EntryFields\n */\n\n/**\n * @memberof EntryFields\n * @typedef Symbol\n * @type string\n */\n\n/**\n * @memberof EntryFields\n * @typedef Text\n * @type string\n */\n\n/**\n * @memberof EntryFields\n * @typedef Integer\n * @type number\n */\n\n/**\n * @memberof EntryFields\n * @typedef Number\n * @type number\n */\n\n/**\n * @memberof EntryFields\n * @typedef Date\n * @type string\n */\n\n/**\n * @memberof EntryFields\n * @typedef Boolean\n * @type boolean\n */\n\n/**\n * @memberof EntryFields\n * @typedef Location\n * @prop {string} lat - latitude\n * @prop {string} lon - longitude\n */\n\n/**\n * A Field in an Entry can have one of the following types that can be defined in Contentful. See <a href=\"https://www.contentful.com/developers/docs/references/field-type/\">Field Types</a> for more details.\n * @memberof Entities\n * @typedef Field\n * @type EntryFields.Symbol | EntryFields.Text | EntryFields.Integer | EntryFields.Number | EntryFields.Date | EntryFields.Boolean | EntryFields.Location | Entities.Link | Array<EntryFields.Symbol|Entities.Link> | Object\n */\n\n/**\n * @memberof Entities\n * @typedef Entry\n * @prop {Entities.Sys} sys - Standard system metadata with additional entry specific properties\n * @prop {Entities.Link} sys.contentType - Content Type used by this Entry\n * @prop {string=} sys.locale - If present, indicates the locale which this entry uses\n * @prop {Object<EntryFields.Field>} fields - Object with content for each field\n * @prop {function(): Object} toPlainObject() - Returns this Entry as a plain JS object\n */\n\n/**\n * @private\n * @param {Object} data - Raw entry data\n * @return {Entry} Wrapped entry data\n */\n\nexport function wrapEntry(data) {\n return freezeSys(toPlainObject(copy(data)));\n}\n/**\n * @memberof Entities\n * @typedef EntryCollection\n * @prop {number} total\n * @prop {number} skip\n * @prop {number} limit\n * @prop {Array<Entities.Entry>} items\n * @prop {Array<Object>=} errors - Array of errors that might occur when retrieving entries.\n * @prop {Object<Array>=} includes - Object with arrays of includes for Entries and Assets. This will be present if resolveLinks is on, and any linked entries or assets exist. Those links will be resolved in the Entries present in the items array, but they are also present here in raw form.\n * @prop {function(): Object} toPlainObject() - Returns this Entry collection as a plain JS object\n * @prop {function(?function=, space=): Object} stringifySafe(replacer,space) - Stringifies the entry collection, accounting for circular references. Circular references will be replaced with just a Link object, with a <code>circular</code> property set to <code>true</code>. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify\">MDN</a> and <a href=\"https://www.npmjs.com/package/json-stringify-safe\">json-stringify-safe</a> for more details on the arguments this method can take.\n */\n\n/**\n * Data is also mixed in with link getters if links exist and includes were requested\n * @private\n * @param {Object} data - Raw entry collection data\n * @param {Object} options - wrapper options\n * @return {EntryCollection} Wrapped entry collection data\n */\n\nexport function wrapEntryCollection(data, _ref) {\n var resolveLinks = _ref.resolveLinks,\n removeUnresolved = _ref.removeUnresolved;\n var wrappedData = mixinStringifySafe(toPlainObject(copy(data)));\n\n if (resolveLinks) {\n wrappedData.items = resolveResponse(wrappedData, {\n removeUnresolved: removeUnresolved,\n itemEntryPoints: ['fields']\n });\n }\n\n return freezeSys(wrappedData);\n}","import copy from 'fast-copy';\nimport { toPlainObject, freezeSys } from 'contentful-sdk-core';\n/**\n * @memberof Entities\n * @typedef Asset\n * @prop {Entities.Sys} sys - Standard system metadata with additional entry specific properties\n * @prop {string=} sys.locale - If present, indicates the locale which this asset uses\n * @prop {Object} fields - Object with content for each field\n * @prop {string} fields.title - Title for this asset\n * @prop {string} fields.description - Description for this asset\n * @prop {Object} fields.file - File object for this asset\n * @prop {string} fields.file.fileName - Name for the file\n * @prop {string} fields.file.contentType - Mime type for the file\n * @prop {string} fields.file.url - Url where the file is available at.\n * @prop {Object} fields.file.details - Details for the file, depending on file type (example: image size in bytes, etc)\n * @prop {function(): Object} toPlainObject() - Returns this Asset as a plain JS object\n */\n\n/**\n * @private\n * @param {Object} data - Raw asset data\n * @return {Asset} Wrapped asset data\n */\n\nexport function wrapAsset(data) {\n return freezeSys(toPlainObject(copy(data)));\n}\n/**\n * @memberof Entities\n * @typedef AssetCollection\n * @prop {number} total\n * @prop {number} skip\n * @prop {number} limit\n * @prop {Array<Entities.Asset>} items\n * @prop {function(): Object} toPlainObject() - Returns this Asset collection as a plain JS object\n */\n\n/**\n * @private\n * @param {Object} data - Raw asset collection data\n * @return {AssetCollection} Wrapped asset collection data\n */\n\nexport function wrapAssetCollection(data) {\n return freezeSys(toPlainObject(copy(data)));\n}","import copy from 'fast-copy';\nimport { toPlainObject, freezeSys } from 'contentful-sdk-core';\n/**\n * @memberof Entities\n * @typedef ContentType\n * @prop {Entities.Sys} sys - System metadata\n * @prop {string} name\n * @prop {string} description\n * @prop {string} displayField - Field used as the main display field for Entries\n * @prop {string} Array<Field> - All the fields contained in this Content Type\n * @prop {function(): Object} toPlainObject() - Returns this Content Type as a plain JS object\n */\n\n/**\n * @private\n * @param {Object} data - Raw content type data\n * @return {ContentType} Wrapped content type data\n */\n\nexport function wrapContentType(data) {\n return freezeSys(toPlainObject(copy(data)));\n}\n/**\n * @memberof Entities\n * @typedef ContentTypeCollection\n * @prop {number} total\n * @prop {number} skip\n * @prop {number} limit\n * @prop {Array<Entities.ContentType>} items\n * @prop {function(): Object} toPlainObject() - Returns this Content Type collection as a plain JS object\n */\n\n/**\n * @private\n * @param {Object} data - Raw content type collection data\n * @return {ContentTypeCollection} Wrapped content type collection data\n */\n\nexport function wrapContentTypeCollection(data) {\n return freezeSys(toPlainObject(copy(data)));\n}","import copy from 'fast-copy';\nimport { toPlainObject, freezeSys } from 'contentful-sdk-core';\n/**\n * @memberof Entities\n * @typedef Locale\n * @prop {Entities.Sys} sys - Standard system metadata with additional entry specific properties\n * @prop {string} name - locale name (example: English)\n * @prop {string} code - locale code (example: en-US)\n * @prop {string} fallbackCode - the locale code to fallback to when there is not content for the current locale\n * @prop {boolean} default - If this is the default locale\n * @prop {boolean} optional - If the locale needs to be filled in on entries or not\n * @prop {function(): Object} toPlainObject() - Returns this Locale as a plain JS object\n */\n\n/**\n * @private\n * @param {Object} data - Raw locale data\n * @return {Locale} Wrapped locale data\n */\n\nexport function wrapLocale(data) {\n return freezeSys(toPlainObject(copy(data)));\n}\n/**\n * @memberof Entities\n * @typedef LocaleCollection\n * @prop {number} total\n * @prop {number} skip\n * @prop {number} limit\n * @prop {Array<Entities.Locale>} items\n * @prop {function(): Object} toPlainObject() - Returns this Locale collection as a plain JS object\n */\n\n/**\n * @private\n * @param {Object} data - Raw locale collection data\n * @return {LocaleCollection} Wrapped locale collection data\n */\n\nexport function wrapLocaleCollection(data) {\n return freezeSys(toPlainObject(copy(data)));\n}","import * as space from './space';\nimport * as entry from './entry';\nimport * as asset from './asset';\nimport * as contentType from './content-type';\nimport * as locale from './locale';\nexport default {\n space: space,\n entry: entry,\n asset: asset,\n contentType: contentType,\n locale: locale\n};","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\n/**\n * See <a href=\"https://www.contentful.com/developers/docs/concepts/sync/\">Synchronization</a> for more information.\n * @namespace Sync\n */\nimport { createRequestConfig, freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport resolveResponse from 'contentful-resolve-response';\nimport mixinStringifySafe from './mixins/stringify-safe';\n/**\n * @memberof Sync\n * @typedef SyncCollection\n * @prop {Array<Entities.Entry>} entries - All existing entries on first sync. New and updated entries on subsequent syncs.\n * @prop {Array<Entities.Asset>} assets - All existing assets on first sync. New and updated assets on subsequent syncs.\n * @prop {Array<Sync.DeletedEntry>} deletedEntries - List of deleted Entries since last sync\n * @prop {Array<Sync.DeletedAsset>} deletedAssets - List of deleted Assets since last sync\n * @prop {string} nextSyncToken - Token to be sent to the next sync call\n * @prop {function(): Object} toPlainObject() - Returns this Sync collection as a plain JS object\n * @prop {function(?function=, space=): Object} stringifySafe(replacer,space) - Stringifies the Sync collection, accounting for circular references. Circular references will be replaced with just a Link object, with a <code>circular</code> property set to <code>true</code>. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify\">MDN</a> and <a href=\"https://www.npmjs.com/package/json-stringify-safe\">json-stringify-safe</a> for more details on the arguments this method can take.\n */\n\n/**\n * Deleted Entries are the same as Entries, but only appear on the sync API.\n * @memberof Sync\n * @typedef DeletedEntry\n * @type Entities.Entry\n */\n\n/**\n * Deleted Assets are the same as Assets, but only appear on the sync API.\n * @memberof Sync\n * @typedef DeletedAsset\n * @type Entities.Asset\n */\n\n/**\n * This module retrieves all the available pages for a sync operation\n * @private\n * @param {Object} http - HTTP client\n * @param {Object} query - Query object\n * @param {Object} options - Sync options object\n * @param {boolean} [options.resolveLinks = true] - If links should be resolved\n * @param {boolean} [options.removeUnresolved = false] - If unresolvable links should get removed\n * @param {boolean} [options.paginate = true] - If further sync pages should automatically be crawled\n * @return {Promise<SyncCollection>}\n */\n\nexport default function pagedSync(_x, _x2) {\n return _pagedSync.apply(this, arguments);\n}\n/**\n * @private\n * @param {Array<Entities.Entry|Entities.Array|Sync.DeletedEntry|Sync.DeletedAsset>} items\n * @return {Object} Entities mapped to an object for each entity type\n */\n\nfunction _pagedSync() {\n _pagedSync = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(http, query) {\n var options,\n defaultOptions,\n _defaultOptions$optio,\n resolveLinks,\n removeUnresolved,\n paginate,\n syncOptions,\n response,\n mappedResponseItems,\n _args = arguments;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n options = _args.length > 2 && _args[2] !== undefined ? _args[2] : {};\n\n if (!(!query || !query.initial && !query.nextSyncToken && !query.nextPageToken)) {\n _context.next = 3;\n break;\n }\n\n throw new Error('Please provide one of `initial`, `nextSyncToken` or `nextPageToken` parameters for syncing');\n\n case 3:\n if (!(query && query.content_type && !query.type)) {\n _context.next = 7;\n break;\n }\n\n query.type = 'Entry';\n _context.next = 9;\n break;\n\n case 7:\n if (!(query && query.content_type && query.type && query.type !== 'Entry')) {\n _context.next = 9;\n break;\n }\n\n throw new Error('When using the `content_type` filter your `type` parameter cannot be different from `Entry`.');\n\n case 9:\n defaultOptions = {\n resolveLinks: true,\n removeUnresolved: false,\n paginate: true\n };\n _defaultOptions$optio = _objectSpread(_objectSpread({}, defaultOptions), options), resolveLinks = _defaultOptions$optio.resolveLinks, removeUnresolved = _defaultOptions$optio.removeUnresolved, paginate = _defaultOptions$optio.paginate;\n syncOptions = {\n paginate: paginate\n };\n _context.next = 14;\n return getSyncPage(http, [], query, syncOptions);\n\n case 14:\n response = _context.sent;\n\n // clones response.items used in includes because we don't want these to be mutated\n if (resolveLinks) {\n response.items = resolveResponse(response, {\n removeUnresolved: removeUnresolved,\n itemEntryPoints: ['fields']\n });\n } // maps response items again after getters are attached\n\n\n mappedResponseItems = mapResponseItems(response.items);\n\n if (response.nextSyncToken) {\n mappedResponseItems.nextSyncToken = response.nextSyncToken;\n }\n\n if (response.nextPageToken) {\n mappedResponseItems.nextPageToken = response.nextPageToken;\n }\n\n return _context.abrupt(\"return\", freezeSys(mixinStringifySafe(toPlainObject(mappedResponseItems))));\n\n case 20:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _pagedSync.apply(this, arguments);\n}\n\nfunction mapResponseItems(items) {\n var reducer = function reducer(type) {\n return function (accumulated, item) {\n if (item.sys.type === type) {\n accumulated.push(toPlainObject(item));\n }\n\n return accumulated;\n };\n };\n\n return {\n entries: items.reduce(reducer('Entry'), []),\n assets: items.reduce(reducer('Asset'), []),\n deletedEntries: items.reduce(reducer('DeletedEntry'), []),\n deletedAssets: items.reduce(reducer('DeletedAsset'), [])\n };\n}\n/**\n * If the response contains a nextPageUrl, extracts the sync token to get the\n * next page and calls itself again with that token.\n * Otherwise, if the response contains a nextSyncUrl, extracts the sync token\n * and returns it.\n * On each call of this function, any retrieved items are collected in the\n * supplied items array, which gets returned in the end\n * @private\n * @param {Object} http\n * @param {Array<Entities.Entry|Entities.Array|Sync.DeletedEntry|Sync.DeletedAsset>} items\n * @param {Object} query\n * @param {Object} options - Sync page options object\n * @param {boolean} [options.paginate = true] - If further sync pages should automatically be crawled\n * @return {Promise<{items: Array, nextSyncToken: string}>}\n */\n\n\nfunction getSyncPage(_x3, _x4, _x5, _x6) {\n return _getSyncPage.apply(this, arguments);\n}\n/**\n * Extracts token out of an url\n * @private\n */\n\n\nfunction _getSyncPage() {\n _getSyncPage = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(http, items, query, _ref) {\n var paginate, response, data;\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n paginate = _ref.paginate;\n\n if (query.nextSyncToken) {\n query.sync_token = query.nextSyncToken;\n delete query.nextSyncToken;\n }\n\n if (query.nextPageToken) {\n query.sync_token = query.nextPageToken;\n delete query.nextPageToken;\n }\n\n if (query.sync_token) {\n delete query.initial;\n delete query.type;\n delete query.content_type;\n delete query.limit;\n }\n\n _context2.next = 6;\n return http.get('sync', createRequestConfig({\n query: query\n }));\n\n case 6:\n response = _context2.sent;\n data = response.data || {};\n items = items.concat(data.items || []);\n\n if (!data.nextPageUrl) {\n _context2.next = 17;\n break;\n }\n\n if (!paginate) {\n _context2.next = 14;\n break;\n }\n\n delete query.initial;\n query.sync_token = getToken(data.nextPageUrl);\n return _context2.abrupt(\"return\", getSyncPage(http, items, query, {\n paginate: paginate\n }));\n\n case 14:\n return _context2.abrupt(\"return\", {\n items: items,\n nextPageToken: getToken(data.nextPageUrl)\n });\n\n case 17:\n if (!data.nextSyncUrl) {\n _context2.next = 21;\n break;\n }\n\n return _context2.abrupt(\"return\", {\n items: items,\n nextSyncToken: getToken(data.nextSyncUrl)\n });\n\n case 21:\n return _context2.abrupt(\"return\", {\n items: []\n });\n\n case 22:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n return _getSyncPage.apply(this, arguments);\n}\n\nfunction getToken(url) {\n var urlParts = url.split('?');\n return urlParts.length > 0 ? urlParts[1].replace('sync_token=', '') : '';\n}","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/*\n* sdk relies heavily on sys metadata\n* so we cannot omit the sys property on sdk level entirely\n* and we have to ensure that at least `id` and `type` are present\n* */\nexport default function normalizeSelect(query) {\n if (!query.select) {\n return query;\n } // The selection of fields for the query is limited\n // Get the different parts that are listed for selection\n\n\n var allSelects = Array.isArray(query.select) ? query.select : query.select.split(','); // Move the parts into a set for easy access and deduplication\n\n var selectedSet = new Set(allSelects); // If we already select all of `sys` we can just return\n // since we're anyway fetching everything that is needed\n\n if (selectedSet.has('sys')) {\n return query;\n } // We don't select `sys` so we need to ensure the minimum set\n\n\n selectedSet.add('sys.id');\n selectedSet.add('sys.type'); // Reassign the normalized sys properties\n\n return _objectSpread(_objectSpread({}, query), {}, {\n select: _toConsumableArray(selectedSet).join(',')\n });\n}","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\n/**\n * Contentful Delivery API Client. Contains methods which allow access to the\n * different kinds of entities present in Contentful (Entries, Assets, etc).\n * @namespace ContentfulClientAPI\n * @see Entities\n */\n\n/**\n * The different kinds of top level entities you can find in Contentful\n * @namespace Entities\n */\n\n/**\n * System metadata. See <a href=\"https://www.contentful.com/developers/docs/references/content-delivery-api/#/introduction/common-resource-attributes\">Common Resource Attributes</a> for more details.\n * @memberof Entities\n * @typedef Sys\n * @prop {string} type\n * @prop {string} id\n * @prop {Entities.Link} space\n * @prop {string} createdAt\n * @prop {string} updatedAt\n * @prop {number} revision\n */\n\n/**\n * Link to another entity. See <a href=\"https://www.contentful.com/developers/docs/concepts/links/\">Links</a> for more details.\n * @memberof Entities\n * @typedef Link\n * @prop {string} type - type of this entity. Always link.\n * @prop {string} id\n * @prop {string} linkType - type of this link. If defined, either Entry or Asset\n */\n\n/**\n * @memberof ContentfulClientAPI\n * @typedef {Object} ClientAPI\n * @prop {function} getSpace\n * @prop {function} getContentType\n * @prop {function} getContentTypes\n * @prop {function} getEntry\n * @prop {function} getEntries\n * @prop {function} getAsset\n * @prop {function} getAssets\n * @prop {function} parseEntries\n * @prop {function} sync\n */\nimport { createRequestConfig } from 'contentful-sdk-core';\nimport entities from './entities';\nimport pagedSync from './paged-sync';\nimport normalizeSelect from './utils/normalize-select';\n/**\n * Creates API object with methods to access functionality from Contentful's\n * Delivery API\n * @private\n * @param {Object} params - API initialization params\n * @prop {Object} http - HTTP client instance\n * @prop {Object} entities - Object with wrapper methods for each kind of entity\n * @prop {Function} getGlobalOptions - Link resolver preconfigured with global setting\n * @return {ClientAPI}\n */\n\nexport default function createContentfulApi(_ref) {\n var http = _ref.http,\n getGlobalOptions = _ref.getGlobalOptions;\n var wrapSpace = entities.space.wrapSpace;\n var _entities$contentType = entities.contentType,\n wrapContentType = _entities$contentType.wrapContentType,\n wrapContentTypeCollection = _entities$contentType.wrapContentTypeCollection;\n var _entities$entry = entities.entry,\n wrapEntry = _entities$entry.wrapEntry,\n wrapEntryCollection = _entities$entry.wrapEntryCollection;\n var _entities$asset = entities.asset,\n wrapAsset = _entities$asset.wrapAsset,\n wrapAssetCollection = _entities$asset.wrapAssetCollection;\n var wrapLocaleCollection = entities.locale.wrapLocaleCollection;\n\n var notFoundError = function notFoundError(id) {\n var error = new Error('The resource could not be found.');\n error.sys = {\n type: 'Error',\n id: 'NotFound'\n };\n error.details = {\n type: 'Entry',\n id: id,\n environment: getGlobalOptions().environment,\n space: getGlobalOptions().space\n };\n return error;\n };\n\n function errorHandler(error) {\n if (error.data) {\n throw error.data;\n }\n\n if (error.response && error.response.data) {\n throw error.response.data;\n }\n\n throw error;\n }\n /**\n * Gets the Space which the client is currently configured to use\n * @memberof ContentfulClientAPI\n * @return {Promise<Entities.Space>} Promise for a Space\n * @example\n * const contentful = require('contentful')\n *\n * const client = contentful.createClient({\n * space: '<space_id>',\n * accessToken: '<content_delivery_api_key>'\n * })\n * // returns the space object with the above <space-id>\n * const space = await client.getSpace()\n * console.log(space)\n */\n\n\n function getSpace() {\n return _getSpace.apply(this, arguments);\n }\n /**\n * Gets a Content Type\n * @memberof ContentfulClientAPI\n * @param {string} id\n * @return {Promise<Entities.ContentType>} Promise for a Content Type\n * @example\n * const contentful = require('contentful')\n *\n * const client = contentful.createClient({\n * space: '<space_id>',\n * accessToken: '<content_delivery_api_key>'\n * })\n *\n * const contentType = await client.getContentType('<content_type_id>')\n * console.log(contentType)\n */\n\n\n function _getSpace() {\n _getSpace = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var response;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n switchToSpace(http);\n _context.prev = 1;\n _context.next = 4;\n return http.get('');\n\n case 4:\n response = _context.sent;\n return _context.abrupt(\"return\", wrapSpace(response.data));\n\n case 8:\n _context.prev = 8;\n _context.t0 = _context[\"catch\"](1);\n errorHandler(_context.t0);\n\n case 11:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, null, [[1, 8]]);\n }));\n return _getSpace.apply(this, arguments);\n }\n\n function getContentType(_x) {\n return _getContentType.apply(this, arguments);\n }\n /**\n * Gets a collection of Content Types\n * @memberof ContentfulClientAPI\n * @param {Object=} query - Object with search parameters. Check the <a href=\"https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters\">JS SDK tutorial</a> and the <a href=\"https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters\">REST API reference</a> for more details.\n * @return {Promise<Entities.ContentTypeCollection>} Promise for a collection of Content Types\n * @example\n * const contentful = require('contentful')\n *\n * const client = contentful.createClient({\n * space: '<space_id>',\n * accessToken: '<content_delivery_api_key>'\n * })\n *\n * const response = await client.getContentTypes()\n * console.log(response.items)\n */\n\n\n function _getContentType() {\n _getContentType = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(id) {\n var response;\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n switchToEnvironment(http);\n _context2.prev = 1;\n _context2.next = 4;\n return http.get(\"content_types/\".concat(id));\n\n case 4:\n response = _context2.sent;\n return _context2.abrupt(\"return\", wrapContentType(response.data));\n\n case 8:\n _context2.prev = 8;\n _context2.t0 = _context2[\"catch\"](1);\n errorHandler(_context2.t0);\n\n case 11:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, null, [[1, 8]]);\n }));\n return _getContentType.apply(this, arguments);\n }\n\n function getContentTypes() {\n return _getContentTypes.apply(this, arguments);\n }\n /**\n * Gets an Entry\n * @memberof ContentfulClientAPI\n * @param {string} id\n * @param {Object=} query - Object with search parameters. In this method it's only useful for `locale`.\n * @return {Promise<Entities.Entry>} Promise for an Entry\n * @example\n * const contentful = require('contentful')\n *\n * const client = contentful.createClient({\n * space: '<space_id>',\n * accessToken: '<content_delivery_api_key>'\n * })\n *\n * const entry = await client.getEntry('<entry_id>')\n * console.log(entry)\n */\n\n\n function _getContentTypes() {\n _getContentTypes = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {\n var query,\n response,\n _args3 = arguments;\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n query = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};\n switchToEnvironment(http);\n _context3.prev = 2;\n _context3.next = 5;\n return http.get('content_types', createRequestConfig({\n query: query\n }));\n\n case 5:\n response = _context3.sent;\n return _context3.abrupt(\"return\", wrapContentTypeCollection(response.data));\n\n case 9:\n _context3.prev = 9;\n _context3.t0 = _context3[\"catch\"](2);\n errorHandler(_context3.t0);\n\n case 12:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, null, [[2, 9]]);\n }));\n return _getContentTypes.apply(this, arguments);\n }\n\n function getEntry(_x2) {\n return _getEntry.apply(this, arguments);\n }\n /**\n * Gets a collection of Entries\n * @memberof ContentfulClientAPI\n * @param {Object=} query - Object with search parameters. Check the <a href=\"https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters\">JS SDK tutorial</a> and the <a href=\"https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters\">REST API reference</a> for more details.\n * @return {Promise<Entities.EntryCollection>} Promise for a collection of Entries\n * @example\n * const contentful = require('contentful')\n *\n * const client = contentful.createClient({\n * space: '<space_id>',\n * accessToken: '<content_delivery_api_key>'\n * })\n *\n * const response = await client.getEntries()\n * .console.log(response.items)\n */\n\n\n function _getEntry() {\n _getEntry = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(id) {\n var query,\n response,\n _args4 = arguments;\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n query = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};\n\n if (id) {\n _context4.next = 3;\n break;\n }\n\n throw notFoundError(id);\n\n case 3:\n _context4.prev = 3;\n _context4.next = 6;\n return this.getEntries(_objectSpread({\n 'sys.id': id\n }, query));\n\n case 6:\n response = _context4.sent;\n\n if (!(response.items.length > 0)) {\n _context4.next = 11;\n break;\n }\n\n return _context4.abrupt(\"return\", wrapEntry(response.items[0]));\n\n case 11:\n throw notFoundError(id);\n\n case 12:\n _context4.next = 17;\n break;\n\n case 14:\n _context4.prev = 14;\n _context4.t0 = _context4[\"catch\"](3);\n errorHandler(_context4.t0);\n\n case 17:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this, [[3, 14]]);\n }));\n return _getEntry.apply(this, arguments);\n }\n\n function getEntries() {\n return _getEntries.apply(this, arguments);\n }\n /**\n * Gets an Asset\n * @memberof ContentfulClientAPI\n * @param {string} id\n * @param {Object=} query - Object with search parameters. In this method it's only useful for `locale`.\n * @return {Promise<Entities.Asset>} Promise for an Asset\n * @example\n * const contentful = require('contentful')\n *\n * const client = contentful.createClient({\n * space: '<space_id>',\n * accessToken: '<content_delivery_api_key>'\n * })\n *\n * const asset = await client.getAsset('<asset_id>')\n * console.log(asset)\n */\n\n\n function _getEntries() {\n _getEntries = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {\n var query,\n _getGlobalOptions2,\n resolveLinks,\n removeUnresolved,\n response,\n _args5 = arguments;\n\n return regeneratorRuntime.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n query = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};\n switchToEnvironment(http);\n _getGlobalOptions2 = getGlobalOptions(query), resolveLinks = _getGlobalOptions2.resolveLinks, removeUnresolved = _getGlobalOptions2.removeUnresolved;\n query = normalizeSelect(query);\n _context5.prev = 4;\n _context5.next = 7;\n return http.get('entries', createRequestConfig({\n query: query\n }));\n\n case 7:\n response = _context5.sent;\n return _context5.abrupt(\"return\", wrapEntryCollection(response.data, {\n resolveLinks: resolveLinks,\n removeUnresolved: removeUnresolved\n }));\n\n case 11:\n _context5.prev = 11;\n _context5.t0 = _context5[\"catch\"](4);\n errorHandler(_context5.t0);\n\n case 14:\n case \"end\":\n return _context5.stop();\n }\n }\n }, _callee5, null, [[4, 11]]);\n }));\n return _getEntries.apply(this, arguments);\n }\n\n function getAsset(_x3) {\n return _getAsset.apply(this, arguments);\n }\n /**\n * Gets a collection of Assets\n * @memberof ContentfulClientAPI\n * @param {Object=} query - Object with search parameters. Check the <a href=\"https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters\">JS SDK tutorial</a> and the <a href=\"https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters\">REST API reference</a> for more details.\n * @return {Promise<Entities.AssetCollection>} Promise for a collection of Assets\n * @example\n * const contentful = require('contentful')\n *\n * const client = contentful.createClient({\n * space: '<space_id>',\n * accessToken: '<content_delivery_api_key>'\n * })\n *\n * const response = await client.getAssets()\n * console.log(response.items)\n */\n\n\n function _getAsset() {\n _getAsset = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(id) {\n var query,\n response,\n _args6 = arguments;\n return regeneratorRuntime.wrap(function _callee6$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n query = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};\n switchToEnvironment(http);\n query = normalizeSelect(query);\n _context6.prev = 3;\n _context6.next = 6;\n return http.get(\"assets/\".concat(id), createRequestConfig({\n query: query\n }));\n\n case 6:\n response = _context6.sent;\n return _context6.abrupt(\"return\", wrapAsset(response.data));\n\n case 10:\n _context6.prev = 10;\n _context6.t0 = _context6[\"catch\"](3);\n errorHandler(_context6.t0);\n\n case 13:\n case \"end\":\n return _context6.stop();\n }\n }\n }, _callee6, null, [[3, 10]]);\n }));\n return _getAsset.apply(this, arguments);\n }\n\n function getAssets() {\n return _getAssets.apply(this, arguments);\n }\n /**\n * Gets a collection of Locale\n * @memberof ContentfulClientAPI\n * @param {Object=} query - Object with search parameters. Check the <a href=\"https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters\">JS SDK tutorial</a> and the <a href=\"https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters\">REST API reference</a> for more details.\n * @return {Promise<Entities.LocaleCollection>} Promise for a collection of Locale\n * @example\n * const contentful = require('contentful')\n *\n * const client = contentful.createClient({\n * space: '<space_id>',\n * accessToken: '<content_delivery_api_key>'\n * })\n *\n * const response = await client.getLocales()\n * console.log(response.items)\n */\n\n\n function _getAssets() {\n _getAssets = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {\n var query,\n response,\n _args7 = arguments;\n return regeneratorRuntime.wrap(function _callee7$(_context7) {\n while (1) {\n switch (_context7.prev = _context7.next) {\n case 0:\n query = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};\n switchToEnvironment(http);\n query = normalizeSelect(query);\n _context7.prev = 3;\n _context7.next = 6;\n return http.get('assets', createRequestConfig({\n query: query\n }));\n\n case 6:\n response = _context7.sent;\n return _context7.abrupt(\"return\", wrapAssetCollection(response.data));\n\n case 10:\n _context7.prev = 10;\n _context7.t0 = _context7[\"catch\"](3);\n errorHandler(_context7.t0);\n\n case 13:\n case \"end\":\n return _context7.stop();\n }\n }\n }, _callee7, null, [[3, 10]]);\n }));\n return _getAssets.apply(this, arguments);\n }\n\n function getLocales() {\n return _getLocales.apply(this, arguments);\n }\n /**\n * Synchronizes either all the content or only new content since last sync\n * See <a href=\"https://www.contentful.com/developers/docs/concepts/sync/\">Synchronization</a> for more information.\n * <strong> Important note: </strong> The the sync api endpoint does not support include or link resolution.\n * However contentful.js is doing link resolution client side if you only make an initial sync.\n * For the delta sync (using nextSyncToken) it is not possible since the sdk wont have access to all the data to make such an operation.\n * @memberof ContentfulClientAPI\n * @param {Object} query - Query object for the sync call. One of initial or nextSyncToken always needs to be specified, but not both.\n * @param {boolean?} query.initial - Indicates if this is the first sync. Use it if you don't have a sync token.\n * @param {string?} query.nextSyncToken - The token you got the last time you used this method. Ensures you only get changed content.\n * @param {string=} query.type - Filter by this type (all (default), Entry, Asset, Deletion, DeletedAsset or DeletedEntry)\n * @param {string=} query.content_type - Filter by this content type id\n * @param {boolean=} query.resolveLinks - When true, links to other Entries or Assets are resolved. Default: true.\n * @param {Object} options\n * @param {boolean=} [options.paginate = true] - Set to false to disable pagination\n * @return {Promise<Sync.SyncCollection>} Promise for the collection resulting of a sync operation\n * @example\n * const contentful = require('contentful')\n *\n * const client = contentful.createClient({\n * space: '<space_id>',\n * accessToken: '<content_delivery_api_key>'\n * })\n *\n * const response = await client.sync({\n * initial: true\n * })\n * console.log({\n * entries: response.entries,\n * assets: response.assets,\n * nextSyncToken: response.nextSyncToken\n * })\n */\n\n\n function _getLocales() {\n _getLocales = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {\n var query,\n response,\n _args8 = arguments;\n return regeneratorRuntime.wrap(function _callee8$(_context8) {\n while (1) {\n switch (_context8.prev = _context8.next) {\n case 0:\n query = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};\n switchToEnvironment(http);\n _context8.prev = 2;\n _context8.next = 5;\n return http.get('locales', createRequestConfig({\n query: query\n }));\n\n case 5:\n response = _context8.sent;\n return _context8.abrupt(\"return\", wrapLocaleCollection(response.data));\n\n case 9:\n _context8.prev = 9;\n _context8.t0 = _context8[\"catch\"](2);\n errorHandler(_context8.t0);\n\n case 12:\n case \"end\":\n return _context8.stop();\n }\n }\n }, _callee8, null, [[2, 9]]);\n }));\n return _getLocales.apply(this, arguments);\n }\n\n function sync() {\n return _sync.apply(this, arguments);\n }\n /**\n * Parse raw json data into collection of entry objects.Links will be resolved also\n * @memberof ContentfulClientAPI\n * @param {Object} raw json data\n * @example\n * let data = {items: [\n * {\n * sys: {type: 'Entry', locale: 'en-US'},\n * fields: {\n * animal: {sys: {type: 'Link', linkType: 'Animal', id: 'oink'}},\n * anotheranimal: {sys: {type: 'Link', linkType: 'Animal', id: 'middle-parrot'}}\n * }\n * }\n * ],\n * includes: {\n * Animal: [\n * {\n * sys: {type: 'Animal', id: 'oink', locale: 'en-US'},\n * fields: {\n * name: 'Pig',\n * friend: {sys: {type: 'Link', linkType: 'Animal', id: 'groundhog'}}\n * }\n * }\n * ]\n * }\n * }\n * console.log( data.items[0].fields.foo ); // undefined\n * let parsedData = client.parseEntries(data);\n * console.log( parsedData.items[0].fields.foo ); // foo\n */\n\n\n function _sync() {\n _sync = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {\n var query,\n options,\n _getGlobalOptions3,\n resolveLinks,\n removeUnresolved,\n _args9 = arguments;\n\n return regeneratorRuntime.wrap(function _callee9$(_context9) {\n while (1) {\n switch (_context9.prev = _context9.next) {\n case 0:\n query = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};\n options = _args9.length > 1 && _args9[1] !== undefined ? _args9[1] : {\n paginate: true\n };\n _getGlobalOptions3 = getGlobalOptions(query), resolveLinks = _getGlobalOptions3.resolveLinks, removeUnresolved = _getGlobalOptions3.removeUnresolved;\n switchToEnvironment(http);\n return _context9.abrupt(\"return\", pagedSync(http, query, _objectSpread({\n resolveLinks: resolveLinks,\n removeUnresolved: removeUnresolved\n }, options)));\n\n case 5:\n case \"end\":\n return _context9.stop();\n }\n }\n }, _callee9);\n }));\n return _sync.apply(this, arguments);\n }\n\n function parseEntries(data) {\n var _getGlobalOptions = getGlobalOptions({}),\n resolveLinks = _getGlobalOptions.resolveLinks,\n removeUnresolved = _getGlobalOptions.removeUnresolved;\n\n return wrapEntryCollection(data, {\n resolveLinks: resolveLinks,\n removeUnresolved: removeUnresolved\n });\n }\n /*\n * Switches BaseURL to use /environments path\n * */\n\n\n function switchToEnvironment(http) {\n http.defaults.baseURL = getGlobalOptions().environmentBaseUrl;\n }\n /*\n * Switches BaseURL to use /spaces path\n * */\n\n\n function switchToSpace(http) {\n http.defaults.baseURL = getGlobalOptions().spaceBaseUrl;\n }\n\n return {\n getSpace: getSpace,\n getContentType: getContentType,\n getContentTypes: getContentTypes,\n getEntry: getEntry,\n getEntries: getEntries,\n getAsset: getAsset,\n getAssets: getAssets,\n getLocales: getLocales,\n parseEntries: parseEntries,\n sync: sync\n };\n}","/**\n * Link resolution can be set globally, or it can be turned off for the methods\n * which make use of it. The local setting always overrides the global setting.\n * @private\n * @param {boolean} globalSetting - Global library setting for link resolution\n * @returns {function} Link resolver method preconfigured with global setting\n */\nexport default function createGlobalOptions(globalSettings) {\n /**\n * Link resolver method\n * @param {Object} query - regular query object used for collection endpoints\n */\n return function getGlobalOptions(query) {\n return Object.assign({}, globalSettings, query);\n };\n}","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Contentful Delivery API SDK. Allows you to create instances of a client\n * with access to the Contentful Content Delivery API.\n * @namespace contentful\n * @see ContentfulClientAPI\n */\nimport axios from 'axios';\nimport { createHttpClient, getUserAgentHeader } from 'contentful-sdk-core';\nimport createContentfulApi from './create-contentful-api';\nimport createGlobalOptions from './create-global-options';\n/**\n * Create a client instance\n * @func\n * @name createClient\n * @memberof contentful\n * @param {Object} params - Client initialization parameters\n * @prop {string} params.space - Space ID\n * @prop {string} params.accessToken - Contentful CDA Access Token\n * @prop {string} [params.environment=\"master\"] - Contentful Environment ID\n * @prop {boolean=} params.insecure - Requests will be made over http instead of the default https (default: true)\n * @prop {string=} params.host - API host (default: cdn.contentful.com). Also usable with preview.contentful.com.\n * @prop {string=} params.basePath - Path appended to the host to support gateways/proxies with custom urls.\n * @prop {Object=} params.httpAgent - Optional Node.js HTTP agent for proxying (see <a href=\"https://nodejs.org/api/http.html#http_class_http_agent\">Node.js docs</a> and <a href=\"https://www.npmjs.com/package/https-proxy-agent\">https-proxy-agent</a>)\n * @prop {Object=} params.httpsAgent - Optional Node.js HTTP agent for proxying (see <a href=\"https://nodejs.org/api/http.html#http_class_http_agent\">Node.js docs</a> and <a href=\"https://www.npmjs.com/package/https-proxy-agent\">https-proxy-agent</a>)\n * @prop {Object=} params.proxy - Optional Axios proxy (see <a href=\"https://github.com/mzabriskie/axios#request-config\"> axios docs </a>)\n * @prop {Object=} params.headers - Optional additional headers\n * @prop {function=} params.adapter - Optional axios request adapter (see <a href=\"https://github.com/mzabriskie/axios#request-config\"> axios docs </a>)\n * @prop {boolean=?} params.resolveLinks - If we should resolve links between entries (default: true)\n * @prop {boolean=?} params.removeUnresolved - If we should remove links to entries which could not be resolved (default: false)\n * @prop {boolean=?} params.retryOnError - If we should retry on errors and 429 rate limit exceptions (default: true)\n * @prop {function=} params.logHandler - A log handler function to process given log messages & errors. Receives the log level (error, warning & info) and the actual log data (Error object or string). (The default can be found at: https://github.com/contentful/contentful-sdk-core/blob/master/lib/create-http-client.js)\n * @prop {string=?} params.application - Application name and version e.g myApp/version\n * @prop {string=?} params.integration - Integration name and version e.g react/version\n * @prop {number=} params.timeout in milliseconds - connection timeout (default:30000)\n * @prop {number=} params.retryLimit - Optional number of retries before failure. Default is 5\n * @returns {ContentfulClientAPI.ClientAPI}\n * @example\n * const contentful = require('contentful')\n * const client = contentful.createClient({\n * accessToken: 'myAccessToken',\n * space: 'mySpaceId'\n * })\n */\n\nexport function createClient(params) {\n if (!params.accessToken) {\n throw new TypeError('Expected parameter accessToken');\n }\n\n if (!params.space) {\n throw new TypeError('Expected parameter space');\n }\n\n var defaultConfig = {\n resolveLinks: true,\n removeUnresolved: false,\n defaultHostname: 'cdn.contentful.com',\n environment: 'master'\n };\n\n var config = _objectSpread(_objectSpread({}, defaultConfig), params);\n\n var userAgentHeader = getUserAgentHeader(\"contentful.js/\".concat(\"8.1.7\"), config.application, config.integration);\n config.headers = _objectSpread(_objectSpread({}, config.headers), {}, {\n 'Content-Type': 'application/vnd.contentful.delivery.v1+json',\n 'X-Contentful-User-Agent': userAgentHeader\n });\n var http = createHttpClient(axios, config);\n var getGlobalOptions = createGlobalOptions({\n resolveLinks: config.resolveLinks,\n environment: config.environment,\n removeUnresolved: config.removeUnresolved,\n spaceBaseUrl: http.defaults.baseURL,\n environmentBaseUrl: \"\".concat(http.defaults.baseURL, \"environments/\").concat(config.environment)\n }); // Append environment to baseURL\n\n http.defaults.baseURL = getGlobalOptions().environmentBaseUrl; // Intercepts response and obscure the token\n\n obscureAuthTokenInResponse(http);\n return createContentfulApi({\n http: http,\n getGlobalOptions: getGlobalOptions\n });\n}\n\nfunction obscureAuthTokenInResponse(http) {\n http.interceptors.response.use(function (response) {\n return response;\n }, function (error) {\n if (error.response && error.response.config.headers.Authorization) {\n var token = error.response.config.headers.Authorization;\n error.response.config.headers.Authorization = error.response.config.headers.Authorization.replace(token, \"Bearer...\".concat(token.substr(-5)));\n\n if (error.response.request._headers && error.response.request._headers.authorization) {\n error.response.request._headers.authorization = error.response.request._headers.authorization.replace(token, \"Bearer...\".concat(token.substr(-5)));\n }\n\n if (error.response.request._header) {\n error.response.request._header = error.response.request._header.replace(token, \"Bearer...\".concat(token.substr(-5)));\n }\n }\n\n return Promise.reject(error);\n });\n}","/*!\n * escape-html\n * Copyright(c) 2012-2013 TJ Holowaychuk\n * Copyright(c) 2015 Andreas Lubbe\n * Copyright(c) 2015 Tiancheng \"Timothy\" Gu\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module variables.\n * @private\n */\n\nvar matchHtmlRegExp = /[\"'&<>]/;\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = escapeHtml;\n\n/**\n * Escape special characters in the given string of html.\n *\n * @param {string} string The string to escape for inserting into HTML\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index = 0;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34: // \"\n escape = '"';\n break;\n case 38: // &\n escape = '&';\n break;\n case 39: // '\n escape = ''';\n break;\n case 60: // <\n escape = '<';\n break;\n case 62: // >\n escape = '>';\n break;\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index\n ? html + str.substring(lastIndex, index)\n : html;\n}\n","var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line no-undef\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func\n Function('return this')();\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var fails = require('../internals/fails');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !fails(function () {\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","'use strict';\nvar nativePropertyIsEnumerable = {}.propertyIsEnumerable;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : nativePropertyIsEnumerable;\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","// `RequireObjectCoercible` abstract operation\n// https://tc39.github.io/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('../internals/is-object');\n\n// `ToPrimitive` abstract operation\n// https://tc39.github.io/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\nvar nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return nativeGetOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\n\nvar nativeDefineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return nativeDefineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nmodule.exports = function (key, value) {\n try {\n createNonEnumerableProperty(global, key, value);\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n","var store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper\nif (typeof store.inspectSource != 'function') {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP) {\n var store = new WeakMap();\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var global = require('../internals/global');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.6.5',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2020 Denis Pushkarev (zloirock.ru)'\n});\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","module.exports = {};\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);\n enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || inspectSource(this);\n});\n","var global = require('../internals/global');\n\nmodule.exports = global;\n","var path = require('../internals/path');\nvar global = require('../internals/global');\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.github.io/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","var toInteger = require('../internals/to-integer');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.github.io/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertynames\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","exports.f = Object.getOwnPropertySymbols;\n","var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var fails = require('../internals/fails');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.github.io/ecma262/#sec-object.keys\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar objectKeys = require('../internals/object-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar propertyIsEnumerable = require('../internals/object-property-is-enumerable').f;\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {\n result.push(TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\n\nmodule.exports = {\n // `Object.entries` method\n // https://tc39.github.io/ecma262/#sec-object.entries\n entries: createMethod(true),\n // `Object.values` method\n // https://tc39.github.io/ecma262/#sec-object.values\n values: createMethod(false)\n};\n","var $ = require('../internals/export');\nvar $values = require('../internals/object-to-array').values;\n\n// `Object.values` method\n// https://tc39.github.io/ecma262/#sec-object.values\n$({ target: 'Object', stat: true }, {\n values: function values(O) {\n return $values(O);\n }\n});\n","require('../../modules/es.object.values');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Object.values;\n","var anObject = require('../internals/an-object');\nvar defineProperties = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n /* global ActiveXObject */\n activeXDocument = document.domain && new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.github.io/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n // Chrome 38 Symbol has incorrect toString conversion\n // eslint-disable-next-line no-undef\n return !String(Symbol());\n});\n","var NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n // eslint-disable-next-line no-undef\n && !Symbol.sham\n // eslint-disable-next-line no-undef\n && typeof Symbol.iterator == 'symbol';\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar has = require('../internals/has');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!has(WellKnownSymbolsStore, name)) {\n if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];\n else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n } return WellKnownSymbolsStore[name];\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperties\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n return O;\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar has = require('../internals/has');\n\nvar defineProperty = Object.defineProperty;\nvar cache = {};\n\nvar thrower = function (it) { throw it; };\n\nmodule.exports = function (METHOD_NAME, options) {\n if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];\n if (!options) options = {};\n var method = [][METHOD_NAME];\n var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;\n var argument0 = has(options, 0) ? options[0] : thrower;\n var argument1 = has(options, 1) ? options[1] : undefined;\n\n return cache[METHOD_NAME] = !!method && !fails(function () {\n if (ACCESSORS && !DESCRIPTORS) return true;\n var O = { length: -1 };\n\n if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower });\n else O[1] = 1;\n\n method.call(O, argument0, argument1);\n });\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $includes = require('../internals/array-includes').includes;\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });\n\n// `Array.prototype.includes` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.includes\n$({ target: 'Array', proto: true, forced: !USES_TO_LENGTH }, {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('includes');\n","module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n","var global = require('../internals/global');\nvar bind = require('../internals/function-bind-context');\n\nvar call = Function.call;\n\nmodule.exports = function (CONSTRUCTOR, METHOD, length) {\n return bind(call, global[CONSTRUCTOR].prototype[METHOD], length);\n};\n","/**\n * Map of all Contentful block types. Blocks contain inline or block nodes.\n */\nenum BLOCKS {\n DOCUMENT = 'document',\n PARAGRAPH = 'paragraph',\n\n HEADING_1 = 'heading-1',\n HEADING_2 = 'heading-2',\n HEADING_3 = 'heading-3',\n HEADING_4 = 'heading-4',\n HEADING_5 = 'heading-5',\n HEADING_6 = 'heading-6',\n\n OL_LIST = 'ordered-list',\n UL_LIST = 'unordered-list',\n LIST_ITEM = 'list-item',\n\n HR = 'hr',\n QUOTE = 'blockquote',\n\n EMBEDDED_ENTRY = 'embedded-entry-block',\n EMBEDDED_ASSET = 'embedded-asset-block',\n}\n\nexport default BLOCKS;\n","var aFunction = require('../internals/a-function');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","require('../../modules/es.array.includes');\nvar entryUnbind = require('../../internals/entry-unbind');\n\nmodule.exports = entryUnbind('Array', 'includes');\n","/**\n * Map of all Contentful inline types. Inline contain inline or text nodes.\n */\nenum INLINES {\n HYPERLINK = 'hyperlink',\n ENTRY_HYPERLINK = 'entry-hyperlink',\n ASSET_HYPERLINK = 'asset-hyperlink',\n EMBEDDED_ENTRY = 'embedded-entry-inline',\n}\n\nexport default INLINES;\n","import BLOCKS from './blocks';\n\nexport type TopLevelBlockEnum =\n | BLOCKS.PARAGRAPH\n | BLOCKS.HEADING_1\n | BLOCKS.HEADING_2\n | BLOCKS.HEADING_3\n | BLOCKS.HEADING_4\n | BLOCKS.HEADING_5\n | BLOCKS.HEADING_6\n | BLOCKS.OL_LIST\n | BLOCKS.UL_LIST\n | BLOCKS.HR\n | BLOCKS.QUOTE\n | BLOCKS.EMBEDDED_ENTRY\n | BLOCKS.EMBEDDED_ASSET;\n\n/**\n * Array of all top level block types.\n * Only these block types can be the direct children of the document.\n */\nexport const TOP_LEVEL_BLOCKS: TopLevelBlockEnum[] = [\n BLOCKS.PARAGRAPH,\n BLOCKS.HEADING_1,\n BLOCKS.HEADING_2,\n BLOCKS.HEADING_3,\n BLOCKS.HEADING_4,\n BLOCKS.HEADING_5,\n BLOCKS.HEADING_6,\n\n BLOCKS.OL_LIST,\n BLOCKS.UL_LIST,\n BLOCKS.HR,\n BLOCKS.QUOTE,\n BLOCKS.EMBEDDED_ENTRY,\n BLOCKS.EMBEDDED_ASSET,\n];\n\n/**\n * Array of all void block types\n */\nexport const VOID_BLOCKS = [BLOCKS.HR, BLOCKS.EMBEDDED_ENTRY, BLOCKS.EMBEDDED_ASSET];\n\n/**\n * Dictionary of all container block types, and the set block types they accept as children.\n */\nexport const CONTAINERS = {\n [BLOCKS.OL_LIST]: [BLOCKS.LIST_ITEM],\n [BLOCKS.UL_LIST]: [BLOCKS.LIST_ITEM],\n [BLOCKS.LIST_ITEM]: [...TOP_LEVEL_BLOCKS],\n [BLOCKS.QUOTE]: [BLOCKS.PARAGRAPH],\n};\n","import { Document } from './types';\nimport BLOCKS from './blocks';\n\n/**\n * A rich text document considered to be empty.\n * Any other document structure than this is not considered empty.\n */\nconst EMPTY_DOCUMENT: Document = {\n nodeType: BLOCKS.DOCUMENT,\n data: {},\n content: [\n {\n nodeType: BLOCKS.PARAGRAPH,\n data: {},\n content: [\n {\n nodeType: 'text',\n value: '',\n marks: [],\n data: {},\n },\n ],\n },\n ],\n};\n\nexport default EMPTY_DOCUMENT;\n","import { Node, Block, Inline, Text } from './types';\nimport BLOCKS from './blocks';\nimport INLINES from './inlines';\n\n/**\n * Checks if the node is an instance of Inline.\n */\nexport function isInline(node: Node): node is Inline {\n return Object.values(INLINES).includes(node.nodeType);\n}\n\n/**\n * Checks if the node is an instance of Block.\n */\nexport function isBlock(node: Node): node is Block {\n return Object.values(BLOCKS).includes(node.nodeType);\n}\n\n/**\n * Checks if the node is an instance of Text.\n */\nexport function isText(node: Node): node is Text {\n return node.nodeType === 'text';\n}\n","/**\n * Map of all Contentful marks.\n */\nexport default {\n BOLD: 'bold',\n ITALIC: 'italic',\n UNDERLINE: 'underline',\n CODE: 'code',\n};\n","module.exports={sys:{type:\"Array\"},total:39,skip:0,limit:100,items:[{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"siragusa_center\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:0,createdAt:\"2020-11-12T17:58:43.889Z\",updatedAt:\"2021-03-04T21:23:12.600Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Siragusa Center\",sponsors:[{sys:{type:\"Link\",linkType:\"Entry\",id:\"6iCDvdprseKgFBU0P2Bobo\"}}]}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"nature_walk\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:12,createdAt:\"2020-11-07T02:00:51.539Z\",updatedAt:\"2021-03-03T20:35:14.978Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Nature and Wilderness\",fullName:\"Nature Walk and Messages from the Wilderness\",closed:\"Open\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"Follow the \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"Nature Walk \",nodeType:\"text\"},{data:{},marks:[],value:\"boardwalk to discover animal habitats from right here in the Midwest and across the Americas. At every turn, encounter a diorama scene of plant and animal life—and see if you can spot each critter, down to the smallest beetle! The hand-crafted landscapes and diverse animal groups make \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"Nature Walk\",nodeType:\"text\"},{data:{},marks:[],value:\" an immersive habitat tour for all ages. \\n\\nThen visit national parks from across the Americas. Dioramas in \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"Messages from the Wilderness \",nodeType:\"text\"},{data:{},marks:[],value:\"show species—from the common to the extinct—as they would appear in their natural habitats. Tips and audio recordings from park rangers reveal the importance of protecting the places where animals live. \",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/nature-walk-messages-wilderness\",color:\"Map Light Green\",showAtZoomLevel:\"medium\",ticketed:!1,nodeId:29581,category:\"exhibition_major\",floor:\"Upper\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"mammals\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:1,createdAt:\"2021-03-03T16:15:53.646Z\",updatedAt:\"2021-03-03T20:22:48.529Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Mammals\",fullName:\"Mammals\",closed:\"Open\",shortDescription:{nodeType:\"document\",data:{},content:[{nodeType:\"paragraph\",content:[{nodeType:\"text\",value:\"Catch glimpse of mammals from Asia and Africa—from giraffes at a watering hole to monkeys peeking out from the canopy. These halls include dioramas with meticulously crafted landscapes and carefully preserved specimens to immerse you in their unique habitats. \",marks:[],data:{}}],data:{}}]},imageUrl:\"https://placehold.it/300x200\",color:\"Map Light Green\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"science_hub\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:2,createdAt:\"2020-11-07T02:00:55.091Z\",updatedAt:\"2021-03-03T20:22:42.151Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Science Hub\",fullName:\"Grainger Science Hub\",shortDescription:{nodeType:\"document\",data:{},content:[{nodeType:\"paragraph\",content:[{nodeType:\"text\",value:\"Science hub\",marks:[],data:{}}],data:{}}]},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/grainger-science-hub\",color:\"\",closed:\"Closed\",ticketed:!1,nodeId:21926,category:\"exhibition_major\",floor:\"Main\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"evolving_planet\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:6,createdAt:\"2020-11-07T02:00:56.687Z\",updatedAt:\"2021-03-03T20:22:42.134Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Evolving Planet\",fullName:\"Griffin Halls of Evolving Planet & SUE the T. rex\",closed:\"Open\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"Discover the many creatures that have roamed the earth throughout history, from single-celled organisms to our extended human family. You can see a variety of real fossils and experience the story of evolution, the process that connects all living things on Earth.\",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"Don’t miss the \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"Elizabeth Morse Genius Hall of Dinosaurs\",nodeType:\"text\"},{data:{},marks:[],value:\" to get up close and personal with more than a dozen of the biggest creatures in our history. Then, experience the world of SUE the \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"T. rex\",nodeType:\"text\"},{data:{},marks:[],value:\", our famous fossil with a big personality.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/evolving-planet\",sponsorAcknowledgment:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"The \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"Griffin Halls of Evolving Planet\",nodeType:\"text\"},{data:{},marks:[],value:\" are part of the Griffin Dinosaur Experience, made possible by the generous support of the Kenneth C. Griffin Charitable Fund.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},color:\"Field Purple\",sponsors:[{sys:{type:\"Link\",linkType:\"Entry\",id:\"6lxI0OAhVSYpXbeiFfeNUb\"}}],ticketed:!1,nodeId:561,category:\"exhibition_major\",floor:\"Upper\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"sue\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:11,createdAt:\"2020-11-12T18:02:34.853Z\",updatedAt:\"2021-03-03T20:22:41.923Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"SUE the T. rex\",fullName:\"SUE the T. rex\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"Enter a Late Cretaceous forest and come face-to-face with one of the world’s most notorious predators. Already the largest and most complete \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"T. rex\",nodeType:\"text\"},{data:{},marks:[],value:\" specimen, SUE received scientific updates in 2018. We now have a more accurate picture of how a \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"T. rex\",nodeType:\"text\"},{data:{},marks:[],value:\" skeleton should look, including where SUE’s gastralia fit in. Resembling a second set of ribs in the belly, gastralia may have helped \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"T. rex\",nodeType:\"text\"},{data:{},marks:[],value:\" breathe.\",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"You can see \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"T. rex\",nodeType:\"text\"},{data:{},marks:[],value:\" in motion through a media experience that recreates South Dakota 67 million years ago. And you can find fossils of creatures that lived at the same time, including \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"Triceratops\",nodeType:\"text\"},{data:{},marks:[],value:\", small mammals, and fish.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/visit/maps-guides/visiting-sue-t-rex-what-know-you-go\",sponsorAcknowledgment:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"The Griffin Dinosaur Experience, made possible by the generous support of the Kenneth C. Griffin Charitable Fund, includes updates to SUE the T. rex and the Griffin Halls of Evolving Planet and more.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},color:\"Field Purple\",closed:\"Open\",showAtZoomLevel:\"always\",ticketed:!1,nodeId:28231}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"carl_cotton\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:14,createdAt:\"2021-01-12T14:50:07.540Z\",updatedAt:\"2021-03-03T20:22:41.658Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Carl Cotton\",fullName:\"Carl Cotton\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"When you walk through our taxidermy halls, there’s a good chance you’ll see the handiwork of Carl W. Cotton. Now meet the person behind these displays. Cotton made realistic animal figures and exhibits for nearly 25 years at the Field. Unlike most taxidermists then—and now—Cotton was African American. After growing up on Chicago’s South Side and serving in World War II, Cotton went on to forge his own path in the museum starting in 1947. Get to know Cotton through his letters and photos, and take a closer look at the specimens he prepared. Each of his creations, whether a bird pecking at the ground or a monkey poised to jump, tells a story about nature.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/natural-talent-taxidermy-carl-cotton\",color:\"Field Orange\",closed:\"Open\",showAtZoomLevel:\"medium\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"ese_eja\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:5,createdAt:\"2020-11-07T02:01:01.966Z\",updatedAt:\"2021-03-03T20:22:41.658Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Ese'Eja People\",fullName:\"The Ese'Eja People of the Amazon\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"The Ese'Eja (ess-ee-AY-ha) Nation are an Indigenous people that have lived in and cultivated the Amazon rainforest for thousands of years. Now, external forces like illegal mining, restrictive government policies, and slash-and-burn farming threaten their way of life. \",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"Learn about the Ese'Eja and their response to change. Read messages from the Ese'Eja Nation alongside photographs that illustrate their resilience. In spite of threats to their home and cultural identity, the Ese'Eja remain connected to the forest and work tirelessly to protect it. \",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"This exhibition was created in collaboration with the Ese'Eja Nation.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/eseeja-people-amazon\",color:\"Field Orange\",closed:\"Open\",showAtZoomLevel:\"medium\",labelOverride:\"Ese'Eja\\nPeople\",ticketed:!1,nodeId:31341,category:\"exhibition_major\",floor:\"Ground\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"pacific\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:5,createdAt:\"2020-11-07T02:00:55.149Z\",updatedAt:\"2021-03-03T20:22:41.658Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Pacific\",fullName:\"Regenstein Halls of the Pacific\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"The countries collectively referred to as the Pacific Islands—including New Guinea, New Zealand, Hawaii, the Marshall Islands, the Philippines, and many more—are separated by thousands of miles of ocean. The people who live on these islands speak many different languages and observe vastly different historical traditions and modern ways of life. In this exhibition, visitors can explore the history and culture of some of these islands. Hundreds of contemporary and historical objects—and stories shared by Pacific Islanders themselves—showcase the geographic and cultural diversity of this region.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/regenstein-halls-pacific\",color:\"Field Orange\",closed:\"Open\",ticketed:!1,nodeId:24041,category:\"exhibition_major\",floor:\"Upper\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"hoffman\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:5,createdAt:\"2020-11-07T02:00:56.729Z\",updatedAt:\"2021-03-03T20:22:41.638Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Malvina Hoffman Sculptures\",fullName:\"Looking at Ourselves: Rethinking the Sculptures of Malvina Hoffman\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"In the early 1930s, the Field Museum commissioned sculptor Malvina Hoffman to create bronze sculptures for an exhibition called \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"The Races of Mankind\",nodeType:\"text\"},{data:{},marks:[],value:\". Hoffman traveled around the world for an up-close look at the “racial types” her sculptures were meant to portray. The Field deinstalled the exhibition in the 1960s. By then, more than 10 million people had seen it—as well as its misguided message that human physical differences could be categorized into distinct “races.”\",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"\\n50 of Hoffman’s sculptures are back on display in \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"Looking at Ourselves: Rethinking the Sculptures of Malvina Hoffman\",nodeType:\"text\"},{data:{},marks:[],value:\". This exhibition examines the nuance and beauty that defines the person and inspiration behind each sculpture.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/looking-ourselves-rethinking-sculptures-malvina-hoffman\",sponsorAcknowledgment:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"Conservation and re-installation of the Hoffman works are made possible by a generous gift from Pamela K. and Roger B. Hull. The exhibition is made possible with the support of the Elizabeth Morse Genius Charitable Trust and an anonymous donor.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},color:\"Field Orange\",closed:\"Open\",showAtZoomLevel:\"medium\",labelOverride:\"Malvina Hoffman\\nSculptures\",ticketed:!1,nodeId:20226,category:\"exhibition_major\",floor:\"Upper\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"d_day\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:6,createdAt:\"2020-11-07T02:01:05.579Z\",updatedAt:\"2021-03-03T20:22:41.632Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"D-Day Warriors\",fullName:\"D-Day Warriors: American Indians in the Military\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"Honor Native soldiers who served during World War II and throughout US history. On June 6, 1944, Charles Shay landed on Omaha Beach in Normand as one of an estimated 500 American Indian soldiers who participated in the D-Day invasion to retake France in the fight against Nazi Germany.\\n\",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"In D-Day Warriors: American Indians in the Military, hear Shay’s story and explore the important role that Native servicemen and servicewomen continue to play in the armed forces.\\n\",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[{type:\"italic\"}],value:\"The exhibition is presented in both English and Spanish. La exhibición está presentada en inglés y español.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/d-day-warriors-american-indians-military\",color:\"Field Orange\",closed:\"Open\",showAtZoomLevel:\"medium\",labelOverride:\"D-Day\\nWarriors\",wheelchairAccessible:!0,sensoryFriendly:!0,ticketed:!1,nodeId:29531,category:\"exhibition_major\",floor:\"Main\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"plants\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:3,createdAt:\"2020-11-07T02:01:02.104Z\",updatedAt:\"2021-03-03T20:22:41.623Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Plants\",fullName:\"Plants of the World\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"Peer through the glass of the grand wooden display cases to see meticulous, lifelike recreations of plant specimens. A stroll through \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"Plants of the World\",nodeType:\"text\"},{data:{},marks:[],value:\" is an introduction to the varied uses of plants, from medicines and rubber to chocolates and teas. The hall opened in 1983 with 300 plants—representing nearly a third of all plant families. Wander this exhibition for a glimpse of the world of botany, from exotic specimens to plants you might spot in your own backyard.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/plants-world\",color:\"Map Light Green\",closed:\"Open\",ticketed:!1,nodeId:26201,category:\"exhibition_major\",floor:\"Upper\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"africa\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:3,createdAt:\"2020-11-07T02:00:58.446Z\",updatedAt:\"2021-03-03T20:22:40.772Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Africa\",fullName:\"Africa\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"This exhibition offers a glimpse into the varied cultures and environments across this vast continent. There are 54 countries in Africa—home to more than a billion residents who communicate in as many as 2,000 unique languages. Experience the sights and sounds of life on the African continent. You can get lost in a bustling city in Senegal or the rainforest of Rwanda. You can travel along with a camel caravan deep in the Sahara or visit an industrial workshop in Ethiopia. Collection artifacts, cultural displays, and scientific findings come together to shed light on Africa throughout history.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/africa\",color:\"Field Orange\",closed:\"Open\",ticketed:!1,nodeId:426,category:\"exhibition_major\",floor:\"Main\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"fm_store\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:10,createdAt:\"2020-11-12T17:57:12.531Z\",updatedAt:\"2021-03-03T20:22:40.760Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Museum Store\",fullName:\"Museum Store\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"A day at the museum isn’t complete without a stop by our store! Shelves are stocked with science-inspired gear, crafts, collectibles, and more. From SUE the \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"T. rex \",nodeType:\"text\"},{data:{},marks:[],value:\"t-shirts to exclusive Field Museum spirits, you’ll find goodies for yourself and the other Field fans in your life. Members enjoy a 10-percent discount. \",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"You can also shop online anytime! Proceeds from our store go to support the Field’s critical work.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://store.fieldmuseum.org/\",color:\"Field Blue\",closed:\"Open\",showAtZoomLevel:\"medium\",labelOverride:\"Museum\\nStore\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"restoring_earth\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:3,createdAt:\"2020-11-07T02:00:58.403Z\",updatedAt:\"2021-03-03T20:22:40.759Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Restoring Earth\",fullName:\"Abbott Hall of Conservation: Restoring Earth\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"See how Field scientists get their hands dirty and their feet wet, putting science into action around the globe and close to home. Videos, large-scale photographs, and hands-on learning tools provide a close look at this collaborative work. Trek to Peru to learn how rainforests are conserved. Travel to Madagascar to explore how biodiversity is safeguarded. Drive to Chicago's South Side to see how scientists are helping people to connect with nature. \",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"In this exhibition, our scientists share how they promote cultural understanding and learn more about life on earth. Get a glimpse into the Field's worldwide conservation efforts—and the rich ecosystems that are central to our well-being.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/abbott-hall-conservation-restoring-earth\",color:\"Map Light Green\",closed:\"Open\",ticketed:!1,nodeId:841,category:\"exhibition_major\",floor:\"Upper\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"china\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:12,createdAt:\"2020-11-07T02:00:58.503Z\",updatedAt:\"2021-03-03T20:22:40.742Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"China\",fullName:\"Cyrus Tang Hall of China\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"Between a pair of stone lions is the entrance to a collection of rare textiles, rubbings, bronzes, and ceramics. The 350 objects on display examine 10,000 years of China’s rich cultural history. Take a close look at stone tools from Neolithic villages and weapons dating back to the centuries of the warring states. Get lost in painted scrolls depicting ordinary life. Discover goods traded along the Silk Road.\",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"There is no one China. In reality, it is composed of a variety of distinct landscapes, ethnicities, and social and lived experiences. The objects in this exhibition tell the story of China, a land of diverse societies unified by shared traditions and a history of dynamic change.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/cyrus-tang-hall-china\",sponsorAcknowledgment:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"The \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"Cyrus Tang Hall of China\",nodeType:\"text\"},{data:{},marks:[],value:\" is made possible with the generous support of the Cyrus Chung Ying Tang Foundation.\",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"Additional support provided by the William G. McGowan Charitable Fund in Memory of Sue Ling Gin-McGowan.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},color:\"Field Orange\",closed:\"Open\",ticketed:!0,nodeId:26131,category:\"exhibition_major\",floor:\"Upper\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"americas\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:3,createdAt:\"2020-11-07T02:01:02.276Z\",updatedAt:\"2021-03-03T20:22:40.730Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Ancient Americas\",fullName:\"Robert R. McCormick Halls of the Ancient Americas\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"See how ancient cultures intertwine with our own. This exhibition journeys through 13,000 years of human ingenuity and achievement in the Americas. Societies thrived here long before the arrival of Europeans. Follow the path from hunters and gatherers to the Aztec and Inca empires, as well as, from the arrival of European settlers to the present day. With interactive displays and thousands of artifacts, explore what we’ve learned recently about these advanced early civilizations and what they teach us about our way of life today.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/robert-r-mccormick-halls-ancient-americas\",color:\"Field Orange\",closed:\"Open\",ticketed:!1,nodeId:436,category:\"exhibition_major\",floor:\"Main\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"apsaalooke\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:16,createdAt:\"2020-11-07T02:00:55.126Z\",updatedAt:\"2021-03-03T20:22:40.728Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Apsáalooke Women and Warriors\",fullName:\"Apsáalooke Women and Warriors\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"Warriors who are fearless in battle. Powerful women who are keepers of war shields and their stories. Beaders, artists, mothers, two-spirited people. Hear their voices and many others in \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"Apsáalooke Women and Warriors\",nodeType:\"text\"},{data:{},marks:[],value:\". In this exhibition, learn about the history, values, and beliefs of the Apsáalooke (Ahp-SAH-luh-guh) people of the Northern Plains, also known as the Crow. \",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"The exhibition is presented in both English and Spanish, with select sections also in Apsáalooke. \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"La exhibición está presentada en inglés y español, con algunas secciones en apsálooke\",nodeType:\"text\"},{data:{},marks:[],value:\". \",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/apsaalooke-women-and-warriors\",sponsorAcknowledgment:{data:{},content:[{data:{},content:[{data:{},marks:[{type:\"italic\"}],value:\"Apsáalooke Women and Warriors\",nodeType:\"text\"},{data:{},marks:[],value:\" is jointly organized by the Field Museum and the Neubauer Collegium for Culture and Society at the University of Chicago.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},color:\"Field Orange\",labelAlignment:\"left\",closed:\"Open\",labelOverride:\"Apsáalooke Women\\n& Warriors\",ticketed:!0,nodeId:30931,category:\"exhibition_major\",floor:\"Ground\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"gems\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:4,createdAt:\"2020-11-07T02:00:53.219Z\",updatedAt:\"2021-03-03T20:22:35.377Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Gems\",fullName:\"Grainger Hall of Gems\",closed:\"Open\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"See a stunning display of hundreds of precious stones and eye-popping jewelry. Each display features a gem in its three stages of transformation: raw crystal, cut and polished stone, and mounted jewel. \",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"The \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"Grainger Hall of Gems\",nodeType:\"text\"},{data:{},marks:[],value:\" has been a visitor favorite since the museum opened in 1921. And it has a history older than the Field Museum itself. Tiffany & Co. displayed a gem collection at the 1893 World’s Columbian Exposition. It was then purchased and donated to Chicago’s then-new natural history museum. Since then, our collection has grown to include more than 600 gemstones and 150 pieces of antique and contemporary jewelry.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/grainger-hall-gems\",color:\"Map Yellow\",labelAlignment:\"right\",ticketed:!1,nodeId:601,category:\"exhibition_major\",floor:\"Upper\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"jades\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:14,createdAt:\"2020-11-07T02:00:51.454Z\",updatedAt:\"2021-03-03T20:22:35.376Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Jades\",fullName:\"Elizabeth Hubert Malott Hall of Jades\",closed:\"Open\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"Get a close look at more than 450 jade objects from our collection. They tell the story of jade’s iconic role throughout China's history and how it has changed over time. In Neolithic China, the stone was used in burial rituals. During the Bronze Age, kings and warriors displayed jade objects as symbols of their status. Today artists create arresting jade pieces honoring the past, using intricate new techniques.\",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"For millennia, jade has been described as possessing five virtues: benevolence, loyalty, wisdom, courage, and integrity. Discover more about its enduring importance to Chinese cultural traditions.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/elizabeth-hubert-malott-hall-jades\",color:\"Map Yellow\",labelAlignment:\"left\",ticketed:!1,nodeId:631,category:\"exhibition_major\",floor:\"Upper\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"birds\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:3,createdAt:\"2020-11-07T02:00:55.130Z\",updatedAt:\"2021-03-03T20:22:35.365Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Birds\",fullName:\"Ronald and Christina Gidwitz Hall of Birds\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"Peek through this window into our collective ornithological obsession—more than 1,000 birds await you. With rail displays, you can explore new science alongside traditional taxidermy. And you can feel immersed in the natural environments of birds through wall projections and environmental sound.\",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"We started building our collection as part of the World’s Columbian Exposition of 1893—and we never stopped collecting. Today, the Field Museum’s scientific bird collection has more than 530,000 specimens. It is the third largest in the United States and represents 90 percent of the world’s known bird species.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/ronald-and-christina-gidwitz-hall-birds\",color:\"Map Light Green\",closed:\"Open\",ticketed:!1,nodeId:591,category:\"exhibition_major\",floor:\"Main\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"simpson_theater\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:13,createdAt:\"2020-11-12T17:58:00.255Z\",updatedAt:\"2021-03-03T20:22:34.443Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"3D Movies\",fullName:\"3D Movies at James Simpson Theater\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"Do dinosaurs delight you? You can retrace the steps of Máximo—the largest dinosaur ever discovered—following a titanosaur’s life from egg to towering titan. You can also thrill in the earthshaking steps of a seven-ton predator: SUE the \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"T. rex\",nodeType:\"text\"},{data:{},marks:[],value:\", the Field Museum’s most famous fossil. Or, unravel the mysteries of ancient Egypt. Take a journey that unlocks the secrets of Egyptian mummies and experience the wonders of ancient monuments.\",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"Films are available to visitors with the purchase of an All-Access or Discovery Pass. Or—if your preferred showtime still has open seats—you can also purchase tickets at the theater door. \",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions?threeDMovie=1\",color:\"Field Blue\",closed:\"Open\",labelOverride:\"3D Movies\",ticketed:!0,mapId:\"simpson_theater\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"animals\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:9,createdAt:\"2020-11-07T02:00:56.732Z\",updatedAt:\"2021-03-03T20:22:34.127Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"What is an Animal?\",fullName:\"What is an Animal? and Animal Biology \",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"Pass under the shadows of giant sea creatures and explore the colors, shapes, and sounds that make up the animal kingdom. In \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"What is an Animal? \",nodeType:\"text\"},{data:{},marks:[],value:\"you can meet mollusks hiding two skeletons and a frog that looks like a leaf. Discover the animal world and learn what makes each creature—including you!—an animal. Then, investigate how animals are related in \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"Animal Biology.\",nodeType:\"text\"},{data:{},marks:[],value:\" Through specimens, models, and games, this journey through the animal kingdom showcases the vibrant diversity of life on Earth.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/what-animal-animal-biology\",color:\"Map Light Green\",closed:\"Open\",labelOverride:\"What is\\nan Animal?\",ticketed:!1,nodeId:29586,category:\"exhibition_major\",floor:\"Main\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"underground\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:4,createdAt:\"2020-11-07T02:01:00.170Z\",updatedAt:\"2021-03-03T20:22:34.125Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Underground Adventure\",fullName:\"Underground Adventure\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"Step into our shrinking machine and come out smaller than a penny. (Don't worry, we'll change you back to your original size!) And explore the wild and exciting world of underground insects. Then meet a creepy, crawly cast of characters, including a giant mole cricket and a wolf spider. \",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"You can learn how some creatures live in the soil and how every species needs soil to survive and thrive. Soil nourishes plants like cotton, which we use to make the clothes we wear. And it sustains our food sources, from fruits and vegetables to animal proteins. \",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"After your adventure, you can tell your friends why we need healthy soil and why the next generation does too!\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/underground-adventure\",color:\"Map Light Green\",closed:\"Open\",labelOverride:\"Underground\\nAdventure\",ticketed:!0,nodeId:14496,category:\"exhibition_major\",floor:\"Ground\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"egypt\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:4,createdAt:\"2020-11-07T02:01:00.439Z\",updatedAt:\"2021-03-03T20:22:34.122Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Ancient Egypt\",fullName:\"Inside Ancient Egypt\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[{type:\"italic\"}],value:\"Inside Ancient Egypt\",nodeType:\"text\"},{data:{},marks:[],value:\" is an up-close look at the daily lives of ancient Egyptians, as well as how they thought about death.\",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"Explore two authentic chamber rooms from the burial site of Unis-Ankh, the son of the pharaoh Unis who reigned during the 5th Dynasty. The burial chamber is over 4,400 years old. And it houses one of the largest collections of mummies in the United States: 23 human mummies and more than 30 animal mummies.\",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"You can also experience an ancient marketplace reconstructed from market scenes shown on tomb walls. It's filled with goods and people engaged in everyday activities that occurred in this bustling cultural center.\",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"This exhibition offers clues to ancient Egyptians’ lives on Earth and everything we may have in common with them.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/inside-ancient-egypt\",color:\"Field Orange\",closed:\"Open\",labelOverride:\"Ancient\\nEgypt\",ticketed:!1,nodeId:656,category:\"exhibition_major\",floor:\"Ground\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"meteorites\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:1,createdAt:\"2020-11-07T02:00:54.895Z\",updatedAt:\"2021-01-12T14:39:57.190Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Meteorites\",fullName:\"Meteorites\",imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/meteorites\",color:\"\",closed:\"Open\",ticketed:!1,category:\"exhibition_major\",nodeId:23276,floor:\"Upper\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"maximo\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:10,createdAt:\"2020-11-07T02:00:58.504Z\",updatedAt:\"2021-01-05T16:40:42.712Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Máximo the Titanosaur\",fullName:\"Máximo the Titanosaur\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"Come face-to-face with the largest dinosaur ever discovered—the titanosaur \",nodeType:\"text\"},{data:{},marks:[{type:\"italic\"}],value:\"Patagotitan mayorum\",nodeType:\"text\"},{data:{},marks:[],value:\". Named Máximo, meaning “maximum” or “most” in Spanish. This long-necked, plant-eating dinosaur lived over 100 million years ago in what is now Patagonia, Argentina.\",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"Our titanosaur cast reaches 122 feet across and stands 28 feet tall at the head. Modeled from fossil bones, this cast conveys the sheer size of the biggest animal ever to live. \",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[{type:\"italic\"}],value:\"The exhibition is presented in both English and Spanish. La exhibición está presentada en inglés y español.\",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"And you can get to know Máximo better—by texting him at 1 (844) 994-3466. You can ask our friendly titanosaur what life was like during the Cretaceous Period and more.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/maximo-titanosaur\",color:\"Field Purple\",closed:\"Open\",ticketed:!1,nodeId:26621,category:\"exhibition_major\",floor:\"Upper\",showAtZoomLevel:\"medium\",labelOverride:\"Máximo\\nthe\\nTitanosaur\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"dna_lab\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:3,createdAt:\"2020-11-07T02:00:53.348Z\",updatedAt:\"2020-12-30T19:27:56.085Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"DNA Lab\",fullName:\"DNA Discovery Center\",imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/dna-discovery-center\",color:\"\",closed:\"Open\",ticketed:!1,nodeId:541,category:\"exhibition_major\",floor:\"Upper\",showAtZoomLevel:\"medium\",labelOverride:\"DNA\\nLab\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"568EPqn9T3fcjQuwlurHiQ\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:0,createdAt:\"2020-12-11T21:27:45.709Z\",updatedAt:\"2020-12-11T21:30:40.278Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Pawnee Earth Lodge\",fullName:\"Pawnee Earth Lodge\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"Step into a full-size replica of an earth lodge and experience Native American life in the 1800s under a blanket of stars. A traditional circular dwelling, an earth lodge was the center of life for the Pawnee people on the Great Plains in the 19th century. Settlements of up to 50 of these structures would form a community of nearby families in what is now Nebraska.\",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"The dwelling’s round, domed shape symbolizes the belief that the stars and planets represented celestial beings. Look up for a peek at a few of the constellations the Pawnee most revered.\",nodeType:\"text\"}],nodeType:\"paragraph\"},{data:{},content:[{data:{},marks:[],value:\"Members of the Pawnee nation served as advisors in designing this earth lodge and its furnishings for the Museum—including a sacred area that was blessed by a Pawnee holy man when it was built.\",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/pawnee-earth-lodge\",color:\"Map Brown\",closed:\"Closed\",nodeId:801,mapId:\"earth_lodge\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"maori_house\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:2,createdAt:\"2020-11-07T02:00:54.988Z\",updatedAt:\"2020-12-11T21:03:03.725Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Maori House\",fullName:\"Maori Meeting House, Ruatepupuke II\",shortDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:\"The Maori are the first settlers of New Zealand. Today, they have a strong presence in New Zealand’s government and society and maintain traditions that celebrate the past and flourish with contemporary inspiration. Built in 1881 on Tokomaru Bay, this wharenui (FAH-reh-new-EE) is one of only three such Maori meeting houses outside of New Zealand. The house is still used in the spirit of its original purpose, welcoming diverse groups of many backgrounds from around Chicago and the world. Structural elements of the house form the body of Ruatepupuke (roo-AH-tay-PU-pu-keh), the Maori ancestor who brought the art of woodcarving to the world. Look for his carved face at the top of the roof, as his arms welcome you inside. \",nodeType:\"text\"}],nodeType:\"paragraph\"}],nodeType:\"document\"},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/maori-meeting-house-ruatepupuke-ii\",color:\"Map Brown\",closed:\"Closed\",ticketed:!1,nodeId:731,category:\"exhibition_major\",floor:\"Upper\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"fossil_lab\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:2,createdAt:\"2020-11-07T02:00:53.343Z\",updatedAt:\"2020-12-11T16:57:38.844Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Fossil Lab\",fullName:\"McDonald’s Fossil Preparation Lab\",shortDescription:{nodeType:\"document\",data:{},content:[{nodeType:\"paragraph\",content:[{nodeType:\"text\",value:\"Watch as stone slabs become prehistoric scientific specimens. After scientists discover fossils out in the field, they carefully package them at the site for their journey to the museum. Then, a team of preparators and volunteers begin extracting the fossils from their stone tombs—a job that can take months or years. Preparing the fossils of SUE the T. rex took 12 person-years! \",marks:[],data:{}}],data:{}},{nodeType:\"paragraph\",content:[{nodeType:\"text\",value:\"See the steps in the delicate process to ready fossilized specimens for display. Can you spot miniature versions of tools like jackhammers, circular saws, and sandblasters? The mini sandblasters shoot baking soda—strong enough to whittle away rock but gentle enough to protect precious fossils.\",marks:[],data:{}}],data:{}}]},imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/mcdonalds-fossil-preparation-lab\",color:\"Field Gray\",closed:\"Closed\",ticketed:!1,nodeId:751,category:\"exhibition_major\",floor:\"Upper\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"malvina\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:1,createdAt:\"2020-11-28T02:11:52.483Z\",updatedAt:\"2020-11-28T02:17:15.691Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Malvina Hoffman Statues\",fullName:\"\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"travel_pacific\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:9,createdAt:\"2020-11-10T16:23:02.149Z\",updatedAt:\"2020-11-24T18:06:18.841Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Traveling the Pacific\",fullName:\"Traveling the Pacific\",color:\"Map Light Blue\",closed:\"Open\",category:\"exhibition_major\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"south_lunch_area\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:0,createdAt:\"2020-11-12T17:58:30.347Z\",updatedAt:\"2020-11-12T17:58:30.347Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"South Lunch Area\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"north_lunch_area\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:0,createdAt:\"2020-11-12T17:58:20.874Z\",updatedAt:\"2020-11-12T17:58:20.874Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"North Lunch Area\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"ward_hall\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:0,createdAt:\"2020-11-12T17:57:42.273Z\",updatedAt:\"2020-11-12T17:57:42.273Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Ward Hall\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"pawnee_lodge\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:1,createdAt:\"2020-11-07T02:00:53.184Z\",updatedAt:\"2020-11-07T02:15:08.135Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Pawnee Lodge\",fullName:\"Pawnee Earth Lodge\",imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/pawnee-earth-lodge\",color:\"\",closed:\"Closed\",ticketed:!1,category:\"exhibition_major\",nodeId:801,floor:\"Main\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"playlab\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:1,createdAt:\"2020-11-07T02:00:49.876Z\",updatedAt:\"2020-11-07T02:15:08.013Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Family PlayLab\",fullName:\"Crown Family PlayLab\",imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/crown-family-playlab\",color:\"\",closed:\"Closed\",ticketed:!1,category:\"exhibition_major\",nodeId:511,floor:\"Ground\"}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"plant_medicine\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"poi\"}},revision:1,createdAt:\"2020-11-07T02:01:03.982Z\",updatedAt:\"2020-11-07T02:15:04.459Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{shortName:\"Plant Medicine\",fullName:\"Plant Medicine\",imageUrl:\"https://placehold.it/300x200\",websiteUrl:\"https://www.fieldmuseum.org/exhibitions/plant-medicine\",color:\"\",closed:\"Open\",ticketed:!1,category:\"exhibition_major\",nodeId:31407,floor:\"Upper\"}}],includes:{Entry:[{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"6iCDvdprseKgFBU0P2Bobo\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"sponsor\"}},revision:0,createdAt:\"2021-03-04T21:22:50.212Z\",updatedAt:\"2021-03-04T21:22:50.212Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Entry\",id:\"6lxI0OAhVSYpXbeiFfeNUb\",contentType:{sys:{type:\"Link\",linkType:\"ContentType\",id:\"sponsor\"}},revision:1,createdAt:\"2020-11-12T17:21:29.147Z\",updatedAt:\"2020-11-12T17:27:05.210Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{name:\"Griffin\",logo:{sys:{type:\"Link\",linkType:\"Asset\",id:\"7v1ap6e4YqaJ413aeAPuEm\"}}}}],Asset:[{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"7v1ap6e4YqaJ413aeAPuEm\",revision:1,createdAt:\"2020-11-12T17:25:46.532Z\",updatedAt:\"2020-11-12T17:26:07.536Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"griffin placeholder\",file:{url:\"https://placehold.it/300x200\",details:{size:5758,image:{width:116,height:50}},fileName:\"image.png\",contentType:\"image/png\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"africa\",revision:1,createdAt:\"2020-11-07T02:00:49.837Z\",updatedAt:\"2020-11-07T02:01:02.252Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Africa\",description:\"Africa\",file:{url:\"https://placehold.it/300x200\",details:{size:673056,image:{width:2e3,height:1333}},fileName:\"17-069-5047-anderson_webexport.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"americas\",revision:1,createdAt:\"2020-11-07T02:00:55.155Z\",updatedAt:\"2020-11-07T02:01:12.820Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Ancient Americas\",description:\"Robert R. McCormick Halls of the Ancient Americas\",file:{url:\"https://placehold.it/300x200\",details:{size:1119496,image:{width:1500,height:1e3}},fileName:\"17-069-0448-anderson_webexport.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"animals\",revision:1,createdAt:\"2020-11-07T02:00:54.919Z\",updatedAt:\"2020-11-07T02:01:07.398Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"What is an Animal?\",description:\"What Is an Animal? & Animal Biology\",file:{url:\"https://placehold.it/300x200\",details:{size:805567,image:{width:2e3,height:1333}},fileName:\"17-069-5583-anderson_webexport.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"apsaalooke\",revision:1,createdAt:\"2020-11-07T02:00:58.451Z\",updatedAt:\"2020-11-07T02:01:12.724Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Apsáalooke Women & Warriors\",description:\"Apsáalooke Women and Warriors\",file:{url:\"https://placehold.it/300x200\",details:{size:771454,image:{width:2e3,height:1471}},fileName:\"c-ben-pease-sacred-under-the-cliff-of-yellowstone.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"birds\",revision:1,createdAt:\"2020-11-07T02:01:02.108Z\",updatedAt:\"2020-11-07T02:01:06.552Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Birds\",description:\"Ronald and Christina Gidwitz Hall of Birds\",file:{url:\"https://placehold.it/300x200\",details:{size:909256,image:{width:2e3,height:1333}},fileName:\"17-069-5324-anderson_webexport.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"china\",revision:1,createdAt:\"2020-11-07T02:00:53.339Z\",updatedAt:\"2020-11-07T02:01:04.070Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"China\",description:\"Cyrus Tang Hall of China\",file:{url:\"https://placehold.it/300x200\",details:{size:704448,image:{width:2e3,height:1333}},fileName:\"17-069-1735.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"d_day\",revision:2,createdAt:\"2020-11-07T02:00:49.852Z\",updatedAt:\"2020-11-07T02:22:24.548Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"D-Day American Indians\",description:\"D-Day Warriors: American Indians in the Military\",file:{url:\"https://placehold.it/300x200\",details:{size:559701,image:{width:2e3,height:903}},fileName:\"gn92643_024ad-kuo_webexportrevised.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"dna_lab\",revision:1,createdAt:\"2020-11-07T02:00:49.858Z\",updatedAt:\"2020-11-07T02:01:02.122Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"DNA Lab\",description:\"DNA Discovery Center\",file:{url:\"https://placehold.it/300x200\",details:{size:800654,image:{width:2e3,height:1333}},fileName:\"17-069-3611-anderson_webexport.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"egypt\",revision:1,createdAt:\"2020-11-07T02:00:56.739Z\",updatedAt:\"2020-11-07T02:01:12.853Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Ancient Egypt\",description:\"Inside Ancient Egypt\",file:{url:\"https://placehold.it/300x200\",details:{size:1288196,image:{width:2e3,height:1333}},fileName:\"17-069-8344-anderson_webexport.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"ese_eja\",revision:1,createdAt:\"2020-11-07T02:00:53.199Z\",updatedAt:\"2020-11-07T02:01:04.156Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Ese'Eja People\",description:\"The Ese'Eja People of the Amazon\",file:{url:\"https://placehold.it/300x200\",details:{size:525071,image:{width:2e3,height:1335}},fileName:\"eseeja-field-museum-andrew-bale-jon-cox-jc_03120-1.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"evolving_planet\",revision:1,createdAt:\"2020-11-07T02:00:51.517Z\",updatedAt:\"2020-11-07T02:01:04.210Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Evolving Planet\",description:\"Griffin Halls of Evolving Planet & SUE the T. rex\",file:{url:\"https://placehold.it/300x200\",details:{size:1914919,image:{width:2e3,height:1336}},fileName:\"field2_sue_visitors1266-hewett_webexport.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"fossil_lab\",revision:1,createdAt:\"2020-11-07T02:01:07.346Z\",updatedAt:\"2020-11-07T02:01:14.429Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Fossil Lab\",description:\"McDonald’s Fossil Preparation Lab\",file:{url:\"https://placehold.it/300x200\",details:{size:667252,image:{width:2e3,height:1333}},fileName:\"17-069-4332-anderson_webexport.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"gems\",revision:1,createdAt:\"2020-11-07T02:00:49.852Z\",updatedAt:\"2020-11-07T02:00:54.536Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Gems\",description:\"Grainger Hall of Gems\",file:{url:\"https://placehold.it/300x200\",details:{size:534710,image:{width:2e3,height:1333}},fileName:\"17-069-1189-anderson_webexport.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"hoffman\",revision:1,createdAt:\"2020-11-07T02:00:56.717Z\",updatedAt:\"2020-11-07T02:01:09.178Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Mavina Hoffman Sculptures\",description:\"Looking at Ourselves: Rethinking the Sculptures of Malvina Hoffman\",file:{url:\"https://placehold.it/300x200\",details:{size:687077,image:{width:2e3,height:1333}},fileName:\"17-069-2824-anderson_webexport.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"jades\",revision:1,createdAt:\"2020-11-07T02:00:55.154Z\",updatedAt:\"2020-11-07T02:00:59.331Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Jades\",description:\"Elizabeth Hubert Malott Hall of Jades\",file:{url:\"https://placehold.it/300x200\",details:{size:582724,image:{width:2e3,height:1333}},fileName:\"17-069-1450-anderson_webexport.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"maori_house\",revision:1,createdAt:\"2020-11-07T02:01:00.451Z\",updatedAt:\"2020-11-07T02:01:11.245Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Maori House\",description:\"Maori Meeting House, Ruatepupuke II\",file:{url:\"https://placehold.it/300x200\",details:{size:701501,image:{width:2e3,height:1333}},fileName:\"17-069-3791-anderson_webexport.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"maximo\",revision:1,createdAt:\"2020-11-07T02:00:54.875Z\",updatedAt:\"2020-11-07T02:01:09.162Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Máximo the Titanosaur\",description:\"Máximo the Titanosaur\",file:{url:\"https://placehold.it/300x200\",details:{size:146611,image:{width:1024,height:683}},fileName:\"fieldmuseum_maximo-451-hewett_webexport.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"meteorites\",revision:1,createdAt:\"2020-11-07T02:00:51.509Z\",updatedAt:\"2020-11-07T02:01:10.988Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Meteorites\",description:\"Meteorites\",file:{url:\"https://placehold.it/300x200\",details:{size:5670917,image:{width:3861,height:2574}},fileName:\"meteorites_img_0759-knight_dropbox_webexport_0.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"nature_walk\",revision:1,createdAt:\"2020-11-07T02:00:56.677Z\",updatedAt:\"2020-11-07T02:01:04.216Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Nature Walk\",description:\"Nature Walk & Messages from the Wilderness\",file:{url:\"https://placehold.it/300x200\",details:{size:1128037,image:{width:2e3,height:1398}},fileName:\"17-069-6379-anderson_webexport.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"pacific\",revision:1,createdAt:\"2020-11-07T02:00:51.504Z\",updatedAt:\"2020-11-07T02:01:04.175Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Pacific\",description:\"Regenstein Halls of the Pacific\",file:{url:\"https://placehold.it/300x200\",details:{size:601182,image:{width:2e3,height:1333}},fileName:\"17-069-1171-anderson_webexport_0.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"pawnee_lodge\",revision:1,createdAt:\"2020-11-07T02:00:55.154Z\",updatedAt:\"2020-11-07T02:01:10.900Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Pawnee Lodge\",description:\"Pawnee Earth Lodge\",file:{url:\"https://placehold.it/300x200\",details:{size:955978,image:{width:2e3,height:1333}},fileName:\"17-069-3746-anderson_webexport.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"plant_medicine\",revision:1,createdAt:\"2020-11-07T02:00:53.176Z\",updatedAt:\"2020-11-07T02:01:10.972Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Plant Medicine\",description:\"Plant Medicine\",file:{url:\"https://placehold.it/300x200\",details:{size:512726,image:{width:2e3,height:1191}},fileName:\"paul-bick-plant-medicine-dsc_6089.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"plants\",revision:1,createdAt:\"2020-11-07T02:00:58.490Z\",updatedAt:\"2020-11-07T02:01:11.224Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Plants\",description:\"Plants of the World\",file:{url:\"https://placehold.it/300x200\",details:{size:278574,image:{width:1500,height:1e3}},fileName:\"17-069-1530-anderson_webexport.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"playlab\",revision:1,createdAt:\"2020-11-07T02:00:51.534Z\",updatedAt:\"2020-11-07T02:01:09.168Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Family PlayLab\",description:\"Crown Family PlayLab\",file:{url:\"https://placehold.it/300x200\",details:{size:843233,image:{width:2e3,height:1333}},fileName:\"17-069-2163-anderson_webexport.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"restoring_earth\",revision:1,createdAt:\"2020-11-07T02:01:00.194Z\",updatedAt:\"2020-11-07T02:01:06.222Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Restoring Earth\",description:\"Abbott Hall of Conservation: Restoring Earth\",file:{url:\"https://placehold.it/300x200\",details:{size:869074,image:{width:2e3,height:1333}},fileName:\"17-069-2775-anderson_webexport.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"science_hub\",revision:1,createdAt:\"2020-11-07T02:00:56.568Z\",updatedAt:\"2020-11-07T02:01:11.163Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Science Hub\",description:\"Grainger Science Hub\",file:{url:\"https://placehold.it/300x200\",details:{size:254479,image:{width:1500,height:1e3}},fileName:\"17-069-3735-anderson_webexport.jpg\",contentType:\"image/jpeg\"}}},{metadata:{tags:[]},sys:{space:{sys:{type:\"Link\",linkType:\"Space\",id:\"sq6jwxz7772c\"}},type:\"Asset\",id:\"underground\",revision:1,createdAt:\"2020-11-07T02:00:51.495Z\",updatedAt:\"2020-11-07T02:01:10.966Z\",environment:{sys:{id:\"master\",type:\"Link\",linkType:\"Environment\"}},locale:\"en-US\"},fields:{title:\"Underground Adventure\",description:\"Underground Adventure\",file:{url:\"https://placehold.it/300x200\",details:{size:1209728,image:{width:2e3,height:1339}},fileName:\"17-069-7390-anderson_webexport.jpg\",contentType:\"image/jpeg\"}}}]}};","// Turn on debug mode during local development based on hostname\n// Or when a query param \"debug\" is set (for CMS content previews)\nconst queryString = new URLSearchParams(window.location.search);\nconst hasDebugParam = queryString.has('debug');\nif (window.location.hostname === 'localhost' || window.location.hostname === 'tfm-map-preview.vercel.app' || hasDebugParam) window.tfmDebug = true;\n\n/*** BASIC SETUP ***/\n// OpenLayer modules\nimport {Map, View} from 'ol';\nimport LayerSwitcher from 'ol-layerswitcher';\nimport GeoJSON from 'ol/format/GeoJSON';\nimport {Vector as VectorSource, OSM} from 'ol/source';\nimport {Tile as TileLayer, Vector as VectorLayer, Group as LayerGroup} from 'ol/layer';\nimport {Fill, Stroke, Style, Text, Icon, Circle, RegularShape} from 'ol/style';\nimport Point from 'ol/geom/Point';\nimport {defaults as defaultInteractions} from 'ol/interaction';\n\n/*\n Contentful SDK\n Contentful is our CMS for most of the map metadata content (colors, descriptions, full names, etc.)\n Currently, some non-clickable exhibition labels are hardcoded in the geoJSON layers directly\n But as soon as something becomes interactive or needs editor configuration, it goes into Contentful\n You can swap out Contentful for any other headless CMS of your choice. We tried this with Airtable, GSheets, etc.\n To do so, you will have to either mirror Contentful's API structure or else refactor the data structures in this file\n Sorry for our lack of abstraction!\n*/\n\nimport \"regenerator-runtime/runtime\"; // Contentful needs it\nimport * as contentful from 'contentful'; // Basic JS SDK\nimport {documentToHtmlString} from '@contentful/rich-text-html-renderer'; // Renders Contentful's WYSIWYG rich text fields\n\n// Stylesheets\nimport 'ol/ol.css'; // Some default OpenLayer styles\n// index.css contains OUR styles. That's loaded via index.html instead (don't ask me why; just how OL set it up)\n\n\n/*** PRELOAD CONTENT DATA ***/\n// First we preload the data from a cached JSON file, for faster loading and just in case our CMS is down\nimport FallbackData from '/assets/cms/fallback-data.json';\nlet CMSData = {};\nFallbackData.items.forEach(item => {\n CMSData[item.sys.id] = item;\n});\n\n/*** REFRESH DATA FROM CMS ***/\n// Disabled for the open-source release, but uncomment and it should work\n\n/*\n// Then we set up a fetch from our CMS, Contentful\n// We default to the production build (i.e., entries marked PUBLISHED)\nlet client = contentful.createClient({\n space: 'your_space_id', // The ID for your Contentful space\n accessToken: 'your_api_token' // You'd want to set your own API key. SUE is ours!!\n})\n\n// But if debug mode is on, we fetch from the preview build instead\n// This shows unpublished drafts so we can see how color changes, etc. will look without affecting visitors\nif(window.tfmDebug) {\n client = contentful.createClient({\n host: 'preview.contentful.com', // To see unpublished changes\n space: 'your_same_space_id', // The ID for your Contentful space\n accessToken: 'your_PREVIEW_api_token' // Preview API key is different from regular key\n })\n\n}\n\nclient.getEntries({\n content_type: 'poi',\n}).then((response) => {\n CMSData = {}; // Clear the fallback\n\n // Replace it with Contentful's data\n response.items.forEach(responseItem => {\n CMSData[responseItem.sys.id] = responseItem;\n });\n}).catch(console.warn)\n\n*/\n\n/*** REUSABLE SETTINGS ***/\n\n/*\n We show/hide different things depending on zoom level\n For example, important exhibitions and amenities (restrooms, etc.) are always visible,\n while others only appear at `medium` or `close`.\n\n Independently of zoom levels, some font and icon sizes scale as a function of the zoom level.\n This is so that they can remain constant sized to the visitor, i.e. as zoom level increases, their size decreases\n proportionally so that they remain the same on-screen size.\n */\nconst tfmZooms = {\n far: 17,\n medium: 18.5,\n close: 20,\n};\n\n// Our brand colors. Our CMS uses these same string names in `fields.color`\nconst tfmColors = {\n \"Field Blue\": '#0a46e6',\n \"Field Gray Lighter\": '#F0F3F3',\n \"Field Gray Light\": '#C9CACC',\n \"Field Gray\": '#6a6a71',\n \"Field Gray Darker\": '#333336',\n \"Field Black\": '#0F0F14',\n \"Field Orange\": '#F29F77',\n \"Field Purple\": '#B274A7',\n \"Field Green\": '#37816e',\n \"Success Green\": '#53B59E',\n \"Warning Red\": '#D44235',\n \"Map Dark Yellow\": '#9a7e0b',\n \"Map Brown\": '#663300',\n \"Map Light Blue\": '#6FB4D6',\n \"Map Yellow\": '#C6AD59',\n \"Map Magenta\": '#A7197C',\n \"Map Light Green\": '#AAC38A',\n 'Error Red': '#FF0000',\n};\n\n// Line widths\nconst tfmStrokes = {\n narrow: 1, // Most lines (we use a minimalist style)\n thick: 4, // COVID one-way flows\n}\n\n/*** LAYER SETUP ***/\n\n// First read in the files\n// Note that the `require()` function here is provided by our packer, Parcel, not OL or JS\n// We do this because geoJSON files aren't ES6 modules and can't be properly `import()`ed.\n\n\n// !!! SUPER IMPORTANT!!!\n// Note that if you're editing these with QGIS, there's a bug that prevents saving geoJSON IDs properly\n// QGIS saves IDs as inside `properties`, when the geoJSON spec says they should instead be a top-level member\n// See https://github.com/qgis/QGIS/issues/40805 for details\n// For now, the workaround is documented in that Github issue, or you can manually move IDs in the geoJSONs\n// The IDs are used anywhere the OpenLayer `getId()` function is used, which is a lot of places.\n\nconst LayerFiles = {\n ground: {\n areas: require('/assets/layers/ground_level_areas.geojson'),\n labels: require('/assets/layers/ground_level_labels.geojson'),\n amenities: require('/assets/layers/ground_level_amenities.geojson'),\n flows: require('/assets/layers/ground_level_flows.geojson'),\n pictograms: require('/assets/layers/ground_level_pictograms.geojson'),\n outline: require('/assets/layers/ground_level_outline.geojson'),\n },\n main: {\n areas: require('/assets/layers/main_level_areas.geojson'),\n labels: require('/assets/layers/main_level_labels.geojson'),\n amenities: require('/assets/layers/main_level_amenities.geojson'),\n flows: require('/assets/layers/main_level_flows.geojson'),\n pictograms: require('/assets/layers/main_level_pictograms.geojson'),\n outline: require('/assets/layers/main_level_outline.geojson'),\n },\n upper: {\n areas: require('/assets/layers/upper_level_areas.geojson'),\n labels: require('/assets/layers/upper_level_labels.geojson'),\n amenities: require('/assets/layers/upper_level_amenities.geojson'),\n flows: require('/assets/layers/upper_level_flows.geojson'),\n pictograms: require('/assets/layers/upper_level_pictograms.geojson'),\n outline: require('/assets/layers/upper_level_outline.geojson')\n }\n}\n\n// Then load them into OpenLayer VectorSources\n// In OpenLayers, each layer is a combination of both a geometry source (the VectorSource) and other data (styles, etc.)\nconst LayerSources = {};\nObject.entries(LayerFiles).forEach(([floor, layers]) => {\n LayerSources[floor] = {};\n Object.entries(layers).forEach(([layerName, layer]) => {\n LayerSources[floor][layerName] = new VectorSource({\n url: layer,\n format: new GeoJSON(),\n })\n })\n});\n\n// Defining reusable layer styles shared by all the layers of the same type (exhibition areas, amenity icons, etc.)\n// They get used and assigned to particular layers in the next section, LayerSettings{}\nconst LayerStyles = {\n // This is a hack to get around an issue with ol-layerswitcher: because our floor switcher \"buttons\" are actually\n // checkboxes, it's possible to unselect ALL of them and be left with nothing visible on the map.\n // In that case, this layer shows up and tells visitors to choose a floor.\n WarningLayer: [\n new Style({\n fill: new Fill({\n color: 'white',\n }),\n // https://openlayers.org/en/latest/apidoc/module-ol_style_Text-Text.html\n text: new Text({\n text: \"Oops! You've unselected all the floors.\\nPlease choose a floor to get back into the museum.\\n\\nPsst... did you know that TFM Members can go deep underground\\n to see secret collections during Members' Nights?\",\n font: '10pt Graphik, sans-serif',\n fill: new Fill({color: 'black'}),\n overflow: false,\n }),\n }),\n ],\n\n // When you zoom out far enough, we replace the museum internals with just our name and a message to zoom further in\n ZoomedOutFootprint: [\n new Style({\n fill: new Fill({\n color: tfmColors['Field Blue'],\n }),\n stroke: new Stroke({\n color: tfmColors['Field Blue'],\n width: 3,\n }),\n // https://openlayers.org/en/latest/apidoc/module-ol_style_Text-Text.html\n text: new Text({\n text: \"FIELD MUSEUM \",\n font: 'bold 16pt Druk, sans-serif',\n fill: new Fill({color: 'white'}),\n overflow: false,\n }),\n }),\n new Style({\n // https://openlayers.org/en/latest/apidoc/module-ol_style_Text-Text.html\n text: new Text({\n text: \"(zoom in) \",\n offsetY: 15,\n font: '8pt Graphik, sans-serif',\n fill: new Fill({color: 'white'}),\n overflow: false,\n }),\n })\n ],\n\n // Amenity icons\n // `showAtFarZoom` is the list of amenity IDs (set in geoJSON) that will show up at the `far` zoom level\n // Others show up at `medium` and in\n // You can set zoom levels in the Reusable Settings section, near the top of this file\n amenities: feature => {\n const showAtFarZoom = ['elevator', 'stairs_up', 'stairs_up_down', 'stairs_down', 'restroom', 'restroom_male', 'restroom_female'];\n const important = showAtFarZoom.includes(feature.get('type'));\n if (!important && tfmView.getZoom() < tfmZooms.medium) return;\n\n return new Style({\n image: new Icon({\n src: tfmIcons[feature.get('type')],\n color: 'white',\n scale: important ? (tfmView.getZoom() < tfmZooms.close ? 0.05 : 0.01 / tfmView.getResolution()) : 0.01 / tfmView.getResolution(),\n opacity: important ? 1 : (0.1 / tfmView.getResolution()) + 0.25\n\n }),\n })\n },\n\n\n // Animal glyphs (dinosaurs, lions, and birds, oh my)\n pictograms: feature => {\n const id = feature.getId();\n const coords = feature.getGeometry().getCoordinates();\n const deskew = angle => (angle + 0.95) * Math.PI / 180; // To account for Chicago skewing off true north\n const directions = {\n north: deskew(0),\n east: deskew(90),\n south: deskew(180),\n west: deskew(270),\n };\n\n switch (id) {\n\n // North entrance\n case 'north_entrance':\n return new Style({\n geometry: new Point(coords),\n image: new RegularShape({\n fill: new Fill({color: tfmColors[\"Field Gray\"]}),\n points: 3,\n radius: 2 / tfmView.getResolution(),\n angle: directions.north,\n }),\n\n text: new Text({\n fill: new Fill({color: tfmColors[\"Field Gray\"]}),\n font: 1.5 / tfmView.getResolution() + 'pt Graphik, sans-serif',\n text: 'Exit Only\\n(Enter on ground Floor)',\n offsetY: -5 / tfmView.getResolution(),\n })\n\n })\n\n case 'south_entrance':\n return new Style({\n geometry: new Point(coords),\n image: new RegularShape({\n fill: new Fill({color: tfmColors[\"Field Gray\"]}),\n points: 3,\n radius: 2 / tfmView.getResolution(),\n angle: directions.south,\n }),\n\n text: new Text({\n fill: new Fill({color: tfmColors[\"Field Gray\"]}),\n font: 1.5 / tfmView.getResolution() + 'pt Graphik, sans-serif',\n text: 'Exit Only\\n(Enter on ground Floor)',\n offsetY: 5 / tfmView.getResolution(),\n })\n\n })\n\n case 'east_entrance':\n return new Style({\n geometry: new Point(coords),\n image: new RegularShape({\n fill: new Fill({color: tfmColors[\"Field Blue\"]}),\n points: 3,\n radius: 4 / tfmView.getResolution(),\n angle: directions.west,\n }),\n\n text: new Text({\n fill: new Fill({color: tfmColors[\"Field Blue\"]}),\n font: 'bold ' + 6 / tfmView.getResolution() + 'pt Graphik, sans-serif',\n text: 'Entrance',\n textAlign: 'right',\n offsetX: -5 / tfmView.getResolution(),\n })\n\n })\n\n default:\n if (tfmView.getZoom() < tfmZooms.medium) return;\n\n return new Style({\n image: new Icon({\n src: tfmPictograms[id],\n color: 'white',\n scale: tfmView.getZoom() < tfmZooms.close ? 0.1 / tfmView.getResolution() : 0.68,\n opacity: (0.1 / tfmView.getResolution()) + 0.25\n }),\n })\n }\n },\n // COVID one-way flow arrows\n flows: feature => {\n if (tfmView.getZoom() < tfmZooms.medium) return;\n if (CMSData[feature.get('exhibition')].fields.closed === 'Closed' || CMSData[feature.get('exhibition')].fields.closed === 'Staff-Only') return;\n const coords = feature.getGeometry().getCoordinates()[0]; // Returns an array of coordinate pairs\n const endPoint = coords[coords.length - 1];\n const startPoint = coords[0];\n const secondToLastPoint = coords[coords.length - 2];\n\n // Calculating a rotation angle from two coordinate pairs:\n // https://gist.github.com/conorbuck/2606166\n const rotationAngle = Math.atan2(endPoint[0] - secondToLastPoint[0], endPoint[1] - secondToLastPoint[1]);\n\n let color;\n try {\n color = tfmColors[CMSData[feature.get('exhibition')].fields.color];\n } catch (e) {\n if (window.tfmDebug) console.warn(`Flow for exhibition ${feature.get('exhibition')} has no color, falling back to red.`, e, feature);\n color = tfmColors['Error Red'];\n }\n\n return [\n new Style({\n stroke: new Stroke({\n color: 'white',\n width: 3 / tfmView.getResolution(),\n lineJoin: 'miter',\n })\n }),\n new Style({\n stroke: new Stroke({\n color: color,\n width: 1.5 / tfmView.getResolution(),\n lineJoin: 'miter',\n })\n }),\n new Style({\n geometry: new Point(startPoint),\n image: new Circle({\n fill: new Fill({color: color}),\n radius: 2 / tfmView.getResolution(),\n })\n }),\n new Style({\n geometry: new Point(endPoint),\n image: new RegularShape({\n fill: new Fill({color: color}),\n points: 3,\n radius: 3 / tfmView.getResolution(),\n angle: rotationAngle,\n })\n }),\n ];\n },\n\n // Major exhibition labels\n labels: feature => {\n const labelData = CMSData[feature.getId()] ? CMSData[feature.getId()].fields : undefined;\n if (!labelData) return; // Don't show this label unless it's explicitly added to our CMS\n if (!labelData.closed || labelData.closed === 'Closed' || labelData.closed === 'Staff-Only') return; // Don't show if closed or if the field was never set\n if (labelData.showAtZoomLevel === 'medium' && tfmView.getZoom() < tfmZooms.medium) return; // Don't show if below set zoom level\n\n const name = labelData.labelOverride ?? labelData.shortName;\n let color = tfmColors[labelData.color] ?? tfmColors['Error Red']; // Fallback color\n\n /*// Fade out unselected labels for easier ID when one is clicked on\n // TOOD: Fix bugginess\n if (selectedFeature && selectedFeature.getId() !== feature.getId()) color = tfmColors['Field Gray Light'];\n */\n const fontSize = tfmView.getZoom() < tfmZooms.close ? 10 : 1.5 / tfmView.getResolution();\n const labelWidth = tfmView.getZoom() < tfmZooms.close ? 20 : 3 / tfmView.getResolution();\n const labelHeight = tfmView.getZoom() < tfmZooms.close ? 8 : 1 / tfmView.getResolution();\n return new Style({\n // Text parameters: https://openlayers.org/en/latest/apidoc/module-ol_style_Text-Text.html\n text: new Text({\n text: name + ' »',\n font: 'bold ' + fontSize + 'pt Graphik, sans-serif',\n textAlign: labelData.labelAlignment ?? 'center',\n fill: new Fill({color: 'white'}),\n backgroundFill: new Fill({color: color}),\n padding: [labelHeight, labelWidth, labelHeight, labelWidth],\n overflow: true, // Allow labels to exceed polygon width (or they'd just be hidden)\n }),\n })\n },\n Footprint: new Style({\n fill: new Fill({\n color: 'white',\n }),\n }),\n outline: new Style({\n stroke: new Stroke({\n color: tfmColors[\"Field Gray\"],\n width: tfmStrokes.narrow,\n }),\n }),\n\n // Areas (exhibition, staff-only, etc.)\n areas: feature => {\n let closed = feature.get('closed') ?? 0; // By default, use the feature's geoJSON \"closed\" property, or 0 (open) as a fallback\n\n // But if this feature is in our CMS, use that instead\n if (CMSData[feature.getId()]) {\n switch (CMSData[feature.getId()].fields.closed) {\n case 'Open': // Open to the public\n closed = 0;\n break;\n case 'Staff-Only': // Always closed to the public (staff areas, etc.)\n closed = 2;\n break;\n case 'Closed': // Temporarily closed due to COVID. We experimented with different styling but ultimately opted against it.\n closed = 1;\n break;\n }\n }\n\n switch (closed) {\n /*\n\n // Diagonal gray stripes (not currently used)\n // Previously used for areas temporarily closed due to COVID, but it became too visually confusing\n // So we just mark all closed areas with the same solid gray\n case 1:\n return new Style({\n // https://viglino.github.io/ol-ext/doc/doc-pages/ol.style.FillPattern.html\n fill: new FillPattern({\n pattern: 'hatch',\n size: tfmStrokes.narrow,\n angle: 45,\n color: tfmColors[\"Field Gray Light\"],\n scale: 0.5,\n }),\n\n stroke: new Stroke({\n color: tfmColors[\"Field Gray Light\"],\n width: tfmStrokes.narrow,\n }),\n })\n */\n // Solid gray (closed and staff areas)\n case 1:\n case 2:\n return new Style({\n // https://viglino.github.io/ol-ext/doc/doc-pages/ol.style.FillPattern.html\n fill: new Fill({\n color: tfmColors[\"Field Gray Light\"],\n }),\n\n stroke: new Stroke({\n color: tfmColors[\"Field Gray Light\"],\n width: tfmStrokes.narrow,\n }),\n /*\n text: new Text({\n text: feature.get('label') ? (tfmView.getZoom() >= tfmZooms.close ? feature.get('label') + '\\n(Closed)': null) : null,\n font: (tfmView.getZoom() >= tfmZooms.close ? 1.2 / tfmView.getResolution() : 8) + 'pt Graphik, sans-serif',\n fill: new Fill({\n color: tfmColors['Field Gray'],\n }),\n overflow: true,\n offsetY: 50,\n }),\n */\n })\n\n // Open (white background, gray label text if specified in the geoJSON)\n default:\n const color = CMSData[feature.getId()] ? tfmColors[CMSData[feature.getId()].fields.color] + '88' : 'white';\n\n return new Style({\n stroke: new Stroke({\n color: tfmColors[\"Field Gray Light\"],\n width: tfmStrokes.narrow,\n }),\n\n fill: new Fill({\n color: 'white',\n }),\n\n text: new Text({\n text: feature.get('label') ? (tfmView.getZoom() >= tfmZooms.medium ? feature.get('label') : '') : null,\n font: (tfmView.getZoom() >= tfmZooms.close ? 1.2 / tfmView.getResolution() : 8) + 'pt Graphik, sans-serif',\n fill: new Fill({\n color: tfmColors['Field Gray'],\n }),\n overflow: true,\n opacity: (0.1 / tfmView.getResolution()) + 0.25,\n }),\n })\n }\n }\n};\n\n// Layer settings by layer type\n// This is where we define the settings per layer type\nconst LayerSettings = {\n labels: {\n tfmClickable: true,\n tfmLayerType: \"label\",\n minZoom: tfmZooms.far,\n updateWhileInteracting: true,\n updateWhileAnimating: true,\n style: feature => LayerStyles.labels(feature),\n },\n pictograms: {\n minZoom: tfmZooms.far,\n tfmLayerType: \"pictogram\",\n tfmClickable: true,\n updateWhileInteracting: true,\n updateWhileAnimating: true,\n style: feature => LayerStyles.pictograms(feature),\n },\n flows: {\n minZoom: tfmZooms.far,\n updateWhileInteracting: true,\n updateWhileAnimating: true,\n style: feature => LayerStyles.flows(feature),\n },\n Footprint: {\n minZoom: tfmZooms.far,\n updateWhileInteracting: true,\n updateWhileAnimating: true,\n style: LayerStyles.Footprint\n },\n areas: {\n tfmClickable: true,\n tfmLayerType: \"area\",\n minZoom: tfmZooms.far,\n updateWhileInteracting: true,\n updateWhileAnimating: true,\n style: feature => LayerStyles.areas(feature),\n },\n outline: {\n minZoom: tfmZooms.far,\n updateWhileInteracting: true,\n updateWhileAnimating: true,\n style: LayerStyles.outline\n },\n amenities: {\n minZoom: tfmZooms.far,\n updateWhileInteracting: true,\n updateWhileAnimating: true,\n style: feature => LayerStyles.amenities(feature)\n },\n};\n\n/*\n This is where we actually initiate the layers, combining their sources and their settings (which also include their styles).\n\n A \"floor\" is a just a group of layers for a specific floor of the museum, but we group them for easy switching\n Each floor should at least have a solid footprint and areas, otherwise the base layer (OSM/Google Maps) will show through\n The other stuff (flows, labels, amenities, pictograms, etc.) are helpful for visitors but not strictly necessary if you want to disable them\n\n Once they are added here, they also automatically get added to the floor switcher based on `LayerGroups`. Setting a group's type to `base` will make them\n mutually exclusive (only one base can be selected at a time). This behavior is due to change in a future version of `ol-layerswitcher`.\n*/\nconst Floors = {\n upper: new LayerGroup({\n title: 'Upper<br>Level',\n type: 'base',\n layers: [\n new VectorLayer({source: LayerSources.upper.outline, ...LayerSettings.Footprint}),\n new VectorLayer({source: LayerSources.upper.areas, ...LayerSettings.areas}),\n new VectorLayer({source: LayerSources.upper.outline, ...LayerSettings.outline}),\n new VectorLayer({source: LayerSources.upper.amenities, ...LayerSettings.amenities}),\n new VectorLayer({source: LayerSources.upper.flows, ...LayerSettings.flows}),\n new VectorLayer({source: LayerSources.upper.pictograms, ...LayerSettings.pictograms}),\n new VectorLayer({source: LayerSources.upper.labels, ...LayerSettings.labels}),\n ]\n }),\n\n main: new LayerGroup({\n title: 'Main<br>Level',\n type: 'base',\n layers: [\n new VectorLayer({source: LayerSources.main.outline, ...LayerSettings.Footprint}),\n new VectorLayer({source: LayerSources.main.areas, ...LayerSettings.areas}),\n new VectorLayer({source: LayerSources.main.outline, ...LayerSettings.outline}),\n new VectorLayer({source: LayerSources.main.amenities, ...LayerSettings.amenities}),\n new VectorLayer({source: LayerSources.main.flows, ...LayerSettings.flows}),\n new VectorLayer({source: LayerSources.main.pictograms, ...LayerSettings.pictograms}),\n new VectorLayer({source: LayerSources.main.labels, ...LayerSettings.labels}),\n ]\n }),\n\n ground: new LayerGroup({\n title: 'Ground<br>Level',\n type: 'base',\n layers: [\n new VectorLayer({source: LayerSources.ground.outline, ...LayerSettings.Footprint}),\n new VectorLayer({source: LayerSources.ground.areas, ...LayerSettings.areas}),\n new VectorLayer({source: LayerSources.ground.outline, ...LayerSettings.outline}),\n new VectorLayer({source: LayerSources.ground.amenities, ...LayerSettings.amenities}),\n new VectorLayer({source: LayerSources.ground.flows, ...LayerSettings.flows}),\n new VectorLayer({source: LayerSources.ground.pictograms, ...LayerSettings.pictograms}),\n new VectorLayer({source: LayerSources.ground.labels, ...LayerSettings.labels}),\n ]\n }),\n};\n\n// Amenity icons\n// Note that the \"require\" functionality here comes from Parcel. If you were using webpack or another bundler, you may have to change this.\nconst tfmIcons = {\n atm: require('~/assets/icons/atm.svg'),\n picnic_area: require('~/assets/icons/picnic_area.svg'),\n elevator: require('~/assets/icons/elevator.svg'),\n first_aid: require('~/assets/icons/first_aid.svg'),\n guest_services: require('~/assets/icons/guest_services.svg'),\n restaurant: require('~/assets/icons/restaurant.svg'),\n restroom: require('~/assets/icons/restroom.svg'),\n restroom_female: require('~/assets/icons/restroom_female.svg'),\n restroom_male: require('~/assets/icons/restroom_male.svg'),\n stairs_down: require('~/assets/icons/stairs_down.svg'),\n stairs_up: require('~/assets/icons/stairs_up.svg'),\n stairs_up_down: require('~/assets/icons/stairs_up_down.svg'),\n store: require('~/assets/icons/store.svg'),\n stroller: require('~/assets/icons/stroller.svg'),\n wheelchair: require('~/assets/icons/wheelchair.svg')\n};\n\n// Pictograms (animals, dinosaurs, etc.)\n// Note that the \"require\" functionality here comes from Parcel. If you were using webpack or another bundler, you may have to change this.\n// For the open source release, we had to replace our pictogram assets with a placeholder SVG. That's what \"example tardigrade\" is.\nconst tfmPictograms = {\n bird: require('~/assets/icons/tardigrade.svg'),\n maximo: require('~/assets/icons/tardigrade.svg'),\n lion: require('~/assets/icons/tardigrade.svg'),\n totems: require('~/assets/icons/tardigrade.svg'),\n elephant: require('~/assets/icons/tardigrade.svg'),\n mask: require('~/assets/icons/tardigrade.svg'),\n pawnee_lodge: require('~/assets/icons/tardigrade.svg'),\n bushman: require('~/assets/icons/tardigrade.svg'),\n sarcophagus: require('~/assets/icons/tardigrade.svg'),\n sue: require('~/assets/icons/tardigrade.svg'),\n trike: require('~/assets/icons/tardigrade.svg'),\n stone_lion: require('~/assets/icons/tardigrade.svg'),\n maori_house: require('~/assets/icons/tardigrade.svg'),\n};\n\n/*** SET UP THE VIEW AND MAP ***/\n\n// Configure the starting view\n\n// Desktop starts zoomed out and centered\nlet startingCenter = [-9753489.474583665, 5140948.158950368];\nlet startingZoom = tfmZooms.medium - 0.1;\n\n// Mobile view starts at east entrance\nif (window.innerWidth < 568\n) {\n startingCenter = [-9753360.67205395, 5140955.575372018]\n startingZoom = tfmZooms.close - 0.7;\n}\n\n// Create the view\nconst tfmView = new View({\n center: startingCenter,\n zoom: startingZoom,\n maxZoom: 27,\n minZoom: 16,\n constrainRotation: false, // Allow micro-adjusting the rotation so the museum doesn't look skewed\n rotation: 0.95 * Math.PI / 180, // To account for slight skew of Chicago's grid, which is off true north\n enableRotation: true, // Don't allow user to rotate map\n});\n\n// Create the map\nconst tfmMap = new Map({\n layers: [\n\n // Exterior basemap\n new TileLayer({\n source: new OSM({\n attributions: ['Built with <a href=\"https://openlayers.org/\" target=\"_blank\">OpenLayers</a> and <a href=\"https://qgis.org/\" target=\"_blank\">QGIS</a><br>Exterior map © <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">OpenStreetMap contributors</a>'],\n }),\n opacity: 0.25,\n }),\n // Warning/secret layer in case the floor picker accidentally unselects all floors\n // This is necessary due to https://github.com/walkermatt/ol-layerswitcher/pull/360\n new VectorLayer({\n minZoom: tfmZooms.far,\n source: LayerSources.upper.outline,\n style: LayerStyles.WarningLayer,\n updateWhileInteracting: true,\n }),\n // Simple museum outline for zoom levels <=16\n new VectorLayer({\n maxZoom: tfmZooms.far,\n source: LayerSources.ground.outline,\n updateWhileInteracting: true,\n style: LayerStyles.ZoomedOutFootprint\n }),\n Floors.upper,\n Floors.main,\n Floors.ground\n\n ],\n interactions: defaultInteractions({\n altShiftDragRotate: false,\n pinchRotate: false,\n doubleClickZoom: true\n }),\n target: 'map',\n keyboardEventTarget: document,\n view: tfmView,\n});\n\n\n// Add layerswitcher controls\n// https://github.com/walkermatt/ol-layerswitcher#api\n// We use this as the floor switcher\nlet layerSwitcher = new LayerSwitcher(\n {\n reverse: false,\n startActive: true,\n activationMode: 'click',\n groupSelectStyle: 'group',\n }\n);\ntfmMap.addControl(layerSwitcher);\nlayerSwitcher.showPanel();\n\n\n// Once the map renders\ntfmMap.once('rendercomplete', function (event) {\n zoomToHash(); // Go to the area specified in the URL, if any\n\n // Preload sidebar images\n Object.entries(CMSData).forEach(([k, v]) => {\n if (v.fields && v.fields.imageUrl) {\n const thumbnailUrl = shrinkImage(v.fields.imageUrl);\n preloadImage(thumbnailUrl);\n }\n });\n\n tfmMap.renderSync(); // Redraw the map\n\n});\n\nwindow.addEventListener('hashchange', zoomToHash); // If someone manually types in a new hash with the map open\n\n/*** CLICK HANDLER ***/\n// We use map.onClick instead of OL's selection event because this seems more reliable... the selection event\n// doesn't always catch clicks outside of features, so closing the sidebar becomes hard\ntfmMap.on('click', e => {\n if (window.tfmDebug) console.log('Click event:', e);\n let counter = 0; // Ideally we want to find one feature only, not zero or more than one, but there isn't a forFirstFeatureAtPixel event\n\n tfmMap.forEachFeatureAtPixel(e.pixel, (feature, layer) => {\n if (counter > 0) return; // We only want the first feature, not all the ones beneath it\n counter++;\n\n // If nothing was clicked on, close the sidebar and return\n if ((!feature && !layer) || !feature.getId() || !CMSData[feature.getId()]) {\n closeSidebar();\n return;\n }\n\n // Setup\n const currentLevel = Floors.upper.getVisible() ? 'upper' : Floors.main.getVisible() ? 'main' : Floors.ground.getVisible() ? 'ground' : null;\n const tfmLayerType = layer.get('tfmLayerType');\n const id = feature.getId();\n const data = CMSData[id] ? CMSData[id].fields : null;\n\n // Debug info\n if (window.tfmDebug) {\n console.log(`Clicked on feature \"${feature.getId()}\", data:`, data);\n console.log(`Located in layer (type: ${tfmLayerType ?? undefined}):`, layer);\n }\n\n // Do different things depending on the layer type that was clicked on.\n // tfmLayerType is a custom parameter we set to each layer in LayerSettings{}\n switch (tfmLayerType) {\n // Exhibitions and other areas\n case 'area':\n\n\n // Closed areas should not be clickable\n if (data && (data.closed === 'Closed' || data.closed === 'Staff-Only')) return; // Check CMS first\n else if (feature.get('closed') > 0) return;\n\n // Only focus if it's in our CMS (i.e. has content added by an editor)\n if (data) {\n zoomToFeature(feature, currentLevel);\n setHash(currentLevel, id);\n }\n break;\n\n case 'label':\n\n // Try to find a matching pictogram on this floor, with Contentful data too\n if (LayerSources[currentLevel].pictograms.getFeatureById(id) && data) {\n zoomToFeature(LayerSources[currentLevel].pictograms.getFeatureById(id));\n setHash(currentLevel, id);\n }\n\n // Otherwise, assume it's an area\n else {\n zoomToFeature(LayerSources[currentLevel].areas.getFeatureById(id), currentLevel);\n setHash(currentLevel, id)\n }\n break;\n\n case 'pictogram':\n // Closed areas should not be clickable\n if (data && (data.closed === 'Closed' || data.closed === 'Staff-Only')) return;\n\n if (id && data) {\n zoomToFeature(feature);\n setHash(currentLevel, id);\n }\n break;\n }\n\n\n }, {\n layerFilter: layer => {\n return layer.get('tfmClickable');\n },\n });\n\n if (!counter) closeSidebar(); // If no features were detected at all\n\n})\n\n/*** KEYBOARD SHORTCUTS ***/\ndocument.onkeydown = function (evt) {\n evt = evt || window.event; // janky polyfill\n\n switch (evt.key) {\n case \"Escape\":\n case \"Esc\":\n closeSidebar();\n break;\n\n case \"1\":\n closeSidebar();\n switchFloors('ground');\n fitFloor('ground');\n break;\n\n case \"2\":\n closeSidebar();\n switchFloors('main');\n fitFloor('main');\n\n break;\n\n case \"3\":\n closeSidebar();\n switchFloors('upper');\n fitFloor('upper');\n\n break;\n\n // By default, OpenLayers only uses the + sign for zooming. This code makes the = sign also emulate\n // that behavior so you don't have to hold down the shift key\n case \"=\":\n tfmView.animate({zoom: tfmView.getZoom() + 1, duration: 100});\n break;\n\n case \"0\":\n closeSidebar();\n break;\n\n }\n\n};\n\n/*** DEBUG HELPERS ***/\n// For easier debugging inside the console\nif (window.tfmDebug) {\n window.tfmMap = tfmMap;\n window.tfmView = tfmView;\n window.contentfulData = CMSData;\n}\n\n/*** HELPER FUNCTIONS ***/\n// Zoom to a specified feature (usually an area or pictogram)\n// In the case of areas, also highlight them with a different color, basically a desaturated version of its specified color\nlet lastZoomedFeature;\n\nfunction zoomToFeature(feature, currentLevel = null) {\n const id = feature.getId();\n const geometry = feature.getGeometry();\n const data = CMSData[id];\n\n resetHighlight();\n\n // Map padding\n let myPadding = [20, 400, 20, 20];\n let myZoom = tfmZooms.close;\n\n // For smaller devices\n if (window.innerWidth <= 500) {\n myZoom = tfmZooms.medium;\n // Set the bottom padding so the popup doesn't hide the exhibition\n myPadding = [10, 10, window.innerHeight * .7 + 10, 10]; // Equal to the sidebar.open height (in vh units) in index.css, line 236 or so\n }\n\n // If there's an area with a matching ID, highlight it\n // We have to do this search because OpenLayers doesn't have an easy way to return a layer from a feature\n if (currentLevel && LayerSources[currentLevel].areas.getFeatureById(id)) {\n\n // Highlight areas with a lighter version of its color\n if (!data) return;\n if (!data.fields.color) data.fields.color = \"Error Red\"; // Set default color\n feature.setStyle(\n new Style({\n fill: new Fill({\n color: tfmColors[data.fields.color] + '88', // Approx 50% opacity (last two digits of hex code specify opacity)\n }),\n /* text: new Text({\n text: selectedFeature.get('label') ? (tfmView.getZoom() >= tfmZooms.medium ? selectedFeature.get('label') : '') : null,\n font: \"bold 10pt Graphik, sans-serif\",\n fill: new Fill({\n color: 'white',\n }),\n overflow: true,\n opacity: (0.1 / tfmView.getResolution()) + 0.25,\n }),\n */\n })\n );\n }\n\n // Zoom to fit the feature\n tfmView.fit(geometry, {maxZoom: myZoom, duration: 500, padding: myPadding})\n\n createSidebar(data);\n openSidebar();\n\n lastZoomedFeature = feature;\n}\n\n// Create/re-create the sidebar with CMS data for a given POI\n// Does NOT open it.\nfunction createSidebar(poi) {\n\n // Don't open the sidebar if this is invalid\n if (!poi || !poi.fields) {\n if (window.tfmDebug) console.warn('Invalid POI for sidebar creation. POI should be a Contentful API entry.', poi);\n return false;\n }\n\n // Resize image\n const imageURL = shrinkImage(poi.fields.imageUrl) ?? null;\n\n let sidebarText = \"<div id='sidebar-close-button'>✕</div>\";\n sidebarText += \"<div id='sidebar-content'>\";\n sidebarText += \"<h2>\" + poi.fields.fullName + \"</h2>\";\n\n // Add a link if it's provided in the CMS\n const linkURL = poi.fields && poi.fields.websiteUrl ? new URL(poi.fields.websiteUrl) : false;\n if (linkURL) {\n\n // Add UTM params to our outgoing URLs\n const utmParams = {\n source: \"field\",\n medium: \"map\",\n };\n Object.entries(utmParams).forEach(([k, v]) => linkURL.searchParams.set(`utm_${k}`, v));\n\n // Add the link\n sidebarText += `<p><a href='${linkURL.href}'><img src='${imageURL}'\"></p>`;\n sidebarText += `<button style=\"background-color: ${tfmColors[poi.fields.color]};\" class=\"poi-learn-more-button\">Learn More</button></a>`;\n } else {\n sidebarText += `<p><img src='${imageURL}'\"></p>`;\n }\n sidebarText += `<div id=\"sidebar-poi-description\">${documentToHtmlString(poi.fields.shortDescription)}</div>`;\n sidebarText += '<p><a href=\"#\" id=\"sidebar-go-back-link\">« Return to map</a></p>';\n\n if (window.tfmDebug === true) {\n sidebarText += '<h2>Debug info</h2>';\n sidebarText += '<ul>';\n sidebarText += `<li>Short Name: ${poi.fields.shortName}</li>`;\n sidebarText += `<li>Contentful ID: <a href='https://app.contentful.com/spaces/sq6jwxz7772c/entries/${poi.sys.id}' target=\"_blank\">${poi.sys.id}</a></li>`;\n sidebarText += `<li>Drupal Node: <a href=\"https://www.fieldmuseum.org/node/${poi.fields.nodeId}/edit\" target=\"_blank\">${poi.fields.nodeId}</a></li>`;\n sidebarText += `<li>Color: <span style=\"background-color: ${tfmColors[poi.fields.color]}; color: white; padding: 0 5px\">${poi.fields.color}</span></li>`;\n sidebarText += '</ul>';\n }\n\n sidebarText += \"<div>\";\n\n // Replace the sidebar\n document.getElementById('tfm-sidebar').dataset.featureId = poi.sys.id;\n document.getElementById('tfm-sidebar').style.borderColor = tfmColors[poi.fields.color];\n document.getElementById('tfm-sidebar').innerHTML = sidebarText;\n\n // Add event listeners\n document.getElementById('tfm-sidebar').scrollTop = 0; // Scroll back up to the top\n document.getElementById('sidebar-close-button').addEventListener('click', closeSidebar);\n document.getElementById('sidebar-go-back-link').addEventListener('click', closeSidebar);\n\n // Also set document title to indicate current sidebar\n document.title = poi.fields.shortName + \" - Field Museum Map\";\n}\n\n// Open the sidebar. Use createSidebar() to create or update it first.\nfunction openSidebar() {\n document.getElementById('tfm-sidebar').className = 'open';\n}\n\n// Close the sidebar, clear highlights, reset the title and hash\nfunction closeSidebar() {\n resetHighlight();\n document.getElementById('tfm-sidebar').className = 'closed';\n document.title = \"Field Museum Map\";\n location.hash = '';\n}\n\n// Update the URL hash (like #ground.egypt)\nfunction setHash(level, id) {\n location.hash = level + '.' + id;\n}\n\n// Reset previously selected feature if one already exists\nfunction resetHighlight() {\n if (lastZoomedFeature) {\n lastZoomedFeature.setStyle(undefined); // Reset style\n lastZoomedFeature = null;\n }\n}\n\n// Manually switch to one floor or another\n// Note that ol-layerswitcher does NOT do this; it has its own internal logic\n// But it doesn't expose its methods, so we have to try to recreate it on our own\n// We use this function in permalinks and keyboard shortcuts\nfunction switchFloors(level) {\n Object.entries(Floors).forEach(([floor, data]) => {\n Floors[floor].setVisible(floor === level)\n });\n\n layerSwitcher.renderPanel(); // Resync the layer switcher\n}\n\n// Fit the entire floor in the viewport\n// Right now only used by the keyboard shortcuts\n// You might want to use this to zoom back out to the whole floor whenever a sidebar is closed... maybe?\nfunction fitFloor(level) {\n tfmMap.once('rendercomplete', () => {\n tfmView.fit(LayerSources[level].outline.getExtent(), {padding: [50, 50, 50, 50], duration: 500})\n });\n}\n\n// Given a floor and/or exhibition (like #ground.egypt), zoom to it and pull up its sidebar, if relevant\nfunction zoomToHash() {\n if (location.hash === undefined || location.hash === '') return;\n\n const hash = location.hash.substring(1);\n const matches = hash.match(/(.+?)(?:\\.(.+))?$/); // expected format is #level.feature_id, like #main.maximo or #upper.evolving_planet\n const level = matches[1];\n const id = matches[2];\n\n // Make the specified level visible\n if (level && Object.keys(Floors).includes(level)) {\n switchFloors(level);\n\n // If an ID was also specified, zoom to it\n if (id) {\n tfmMap.once('rendercomplete', () => {\n if (LayerSources[level].areas.getFeatureById(id)) {\n zoomToFeature(LayerSources[level].areas.getFeatureById(id), level);\n } else if (LayerSources[level].pictograms.getFeatureById(id)) {\n zoomToFeature(LayerSources[level].pictograms.getFeatureById(id))\n } else {\n console.warn(`Warning: Cannot zoom to invalid id \"${id}\" on ${level} floor`);\n }\n });\n }\n\n // Otherwise just fit the entire level\n else {\n fitFloor(level);\n }\n } else {\n console.warn('Warning: Could not zoom to invalid floor: ', level);\n console.info('Valid floors are: ', Object.keys(Floors).join(\", \"));\n }\n\n}\n\n// This preloads all the sidebar images\n// Don't call this until the map is fully rendered, or you'd impact load time\nfunction preloadImage(url) {\n try {\n var _img = new Image();\n _img.src = url;\n } catch (e) {\n if (window.tfmDebug) console.warn(e);\n }\n}\n\n// Generate a thumbnail using cloud services\nfunction shrinkImage(url) {\n const newURL = new URL(url);\n\n // Use Drupal image styles if this is one of ours (to save CDN bandwidth)\n if (newURL.host === 'www.fieldmuseum.org') {\n newURL.pathname = newURL.pathname.replace(/\\/sites\\/default\\/files\\/(styles\\/.+\\/public\\/)?/, '/sites/default/files/styles/gallery_500w/public/');\n return newURL.href\n }\n\n // Else use Cloudinary as an image CDN (can also replace this with imgix, etc.)\n else {\n // return 'https://res.cloudinary.com/your_cloudinary_account/image/fetch/w_500/' + newURL.href;\n return newURL.href;\n }\n}\n"]} |