cccamp19-map/dist/main.js.map
2019-07-25 22:17:34 +02:00

1 line
1.9 MiB
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/ol/util.js","webpack:///./node_modules/ol/events.js","webpack:///./node_modules/ol/events/EventType.js","webpack:///./node_modules/ol/obj.js","webpack:///./node_modules/ol/dom.js","webpack:///./node_modules/ol/functions.js","webpack:///./node_modules/ol/Object.js","webpack:///./node_modules/ol/events/Event.js","webpack:///./node_modules/ol/events/Target.js","webpack:///./node_modules/ol/control/Control.js","webpack:///./node_modules/ol/ObjectEventType.js","webpack:///./node_modules/ol/Disposable.js","webpack:///./node_modules/ol/MapEventType.js","webpack:///./node_modules/ol/Observable.js","webpack:///./node_modules/rbush/index.js","webpack:///./node_modules/ol-layerswitcher/dist/ol-layerswitcher.js","webpack:///./node_modules/quickselect/quickselect.js","webpack:///./src/app.scss?cb69","webpack:///./node_modules/ol/AssertionError.js","webpack:///./node_modules/ol/CollectionEventType.js","webpack:///./node_modules/ol/Collection.js","webpack:///./node_modules/ol/MapEvent.js","webpack:///./node_modules/ol/MapBrowserEvent.js","webpack:///./node_modules/ol/has.js","webpack:///./node_modules/ol/MapBrowserEventType.js","webpack:///./node_modules/ol/MapBrowserPointerEvent.js","webpack:///./node_modules/ol/pointer/EventType.js","webpack:///./node_modules/ol/pointer/EventSource.js","webpack:///./node_modules/ol/pointer/MouseSource.js","webpack:///./node_modules/ol/pointer/MsSource.js","webpack:///./node_modules/ol/pointer/NativeSource.js","webpack:///./node_modules/ol/pointer/PointerEvent.js","webpack:///./node_modules/ol/array.js","webpack:///./node_modules/ol/pointer/TouchSource.js","webpack:///./node_modules/ol/pointer/PointerEventHandler.js","webpack:///./node_modules/ol/MapBrowserEventHandler.js","webpack:///./node_modules/ol/MapProperty.js","webpack:///./node_modules/ol/render/EventType.js","webpack:///./node_modules/ol/TileState.js","webpack:///./node_modules/ol/asserts.js","webpack:///./node_modules/ol/structs/PriorityQueue.js","webpack:///./node_modules/ol/TileQueue.js","webpack:///./node_modules/ol/tilegrid/common.js","webpack:///./node_modules/ol/math.js","webpack:///./node_modules/ol/centerconstraint.js","webpack:///./node_modules/ol/resolutionconstraint.js","webpack:///./node_modules/ol/rotationconstraint.js","webpack:///./node_modules/ol/ViewHint.js","webpack:///./node_modules/ol/ViewProperty.js","webpack:///./node_modules/ol/string.js","webpack:///./node_modules/ol/coordinate.js","webpack:///./node_modules/ol/easing.js","webpack:///./node_modules/ol/extent/Corner.js","webpack:///./node_modules/ol/extent/Relationship.js","webpack:///./node_modules/ol/extent.js","webpack:///./node_modules/ol/geom/GeometryType.js","webpack:///./node_modules/ol/geom/GeometryLayout.js","webpack:///./node_modules/ol/geom/flat/transform.js","webpack:///./node_modules/ol/sphere.js","webpack:///./node_modules/ol/proj/Units.js","webpack:///./node_modules/ol/proj/Projection.js","webpack:///./node_modules/ol/proj/epsg3857.js","webpack:///./node_modules/ol/proj/epsg4326.js","webpack:///./node_modules/ol/proj/projections.js","webpack:///./node_modules/ol/proj/transforms.js","webpack:///./node_modules/ol/proj.js","webpack:///./node_modules/ol/transform.js","webpack:///./node_modules/ol/geom/Geometry.js","webpack:///./node_modules/ol/geom/SimpleGeometry.js","webpack:///./node_modules/ol/geom/flat/area.js","webpack:///./node_modules/ol/geom/flat/closest.js","webpack:///./node_modules/ol/geom/flat/deflate.js","webpack:///./node_modules/ol/geom/flat/inflate.js","webpack:///./node_modules/ol/geom/flat/simplify.js","webpack:///./node_modules/ol/geom/LinearRing.js","webpack:///./node_modules/ol/geom/Point.js","webpack:///./node_modules/ol/geom/flat/contains.js","webpack:///./node_modules/ol/geom/flat/interiorpoint.js","webpack:///./node_modules/ol/geom/flat/segments.js","webpack:///./node_modules/ol/geom/flat/intersectsextent.js","webpack:///./node_modules/ol/geom/flat/reverse.js","webpack:///./node_modules/ol/geom/flat/orient.js","webpack:///./node_modules/ol/geom/Polygon.js","webpack:///./node_modules/ol/View.js","webpack:///./node_modules/ol/layer/Property.js","webpack:///./node_modules/ol/layer/Base.js","webpack:///./node_modules/ol/source/State.js","webpack:///./node_modules/ol/layer/Group.js","webpack:///./node_modules/ol/size.js","webpack:///./node_modules/ol/PluggableMap.js","webpack:///./node_modules/ol/css.js","webpack:///./node_modules/ol/layer/Layer.js","webpack:///./node_modules/ol/control/Attribution.js","webpack:///./node_modules/ol/control/Rotate.js","webpack:///./node_modules/ol/control/Zoom.js","webpack:///./node_modules/ol/control/util.js","webpack:///./node_modules/ol/Kinetic.js","webpack:///./node_modules/ol/interaction/Property.js","webpack:///./node_modules/ol/interaction/Interaction.js","webpack:///./node_modules/ol/interaction/DoubleClickZoom.js","webpack:///./node_modules/ol/events/condition.js","webpack:///./node_modules/ol/interaction/Pointer.js","webpack:///./node_modules/ol/interaction/DragPan.js","webpack:///./node_modules/ol/interaction/DragRotate.js","webpack:///./node_modules/ol/render/Box.js","webpack:///./node_modules/ol/interaction/DragBox.js","webpack:///./node_modules/ol/interaction/DragZoom.js","webpack:///./node_modules/ol/events/KeyCode.js","webpack:///./node_modules/ol/interaction/KeyboardPan.js","webpack:///./node_modules/ol/interaction/KeyboardZoom.js","webpack:///./node_modules/ol/interaction/MouseWheelZoom.js","webpack:///./node_modules/ol/interaction/PinchRotate.js","webpack:///./node_modules/ol/interaction/PinchZoom.js","webpack:///./node_modules/ol/interaction.js","webpack:///./node_modules/ol/reproj/common.js","webpack:///./node_modules/ol/ImageBase.js","webpack:///./node_modules/ol/ImageState.js","webpack:///./node_modules/ol/ImageCanvas.js","webpack:///./node_modules/ol/LayerType.js","webpack:///./node_modules/ol/layer/VectorRenderType.js","webpack:///./node_modules/ol/render/Event.js","webpack:///./node_modules/ol/structs/LRUCache.js","webpack:///./node_modules/ol/render/canvas.js","webpack:///./node_modules/ol/color.js","webpack:///./node_modules/ol/colorlike.js","webpack:///./node_modules/ol/render/VectorContext.js","webpack:///./node_modules/ol/render/canvas/Immediate.js","webpack:///./node_modules/ol/style/IconImageCache.js","webpack:///./node_modules/ol/renderer/Map.js","webpack:///./node_modules/ol/renderer/canvas/Map.js","webpack:///./node_modules/ol/renderer/Layer.js","webpack:///./node_modules/ol/renderer/canvas/Layer.js","webpack:///./node_modules/ol/renderer/canvas/IntermediateCanvas.js","webpack:///./node_modules/ol/renderer/canvas/ImageLayer.js","webpack:///./node_modules/ol/TileRange.js","webpack:///./node_modules/ol/renderer/canvas/TileLayer.js","webpack:///./node_modules/ol/render/ReplayGroup.js","webpack:///./node_modules/ol/render/ReplayType.js","webpack:///./node_modules/ol/geom/flat/length.js","webpack:///./node_modules/ol/geom/flat/textpath.js","webpack:///./node_modules/ol/render/canvas/Instruction.js","webpack:///./node_modules/ol/render/replay.js","webpack:///./node_modules/ol/render/canvas/Replay.js","webpack:///./node_modules/ol/render/canvas/ImageReplay.js","webpack:///./node_modules/ol/render/canvas/LineStringReplay.js","webpack:///./node_modules/ol/render/canvas/PolygonReplay.js","webpack:///./node_modules/ol/geom/flat/straightchunk.js","webpack:///./node_modules/ol/style/TextPlacement.js","webpack:///./node_modules/ol/render/canvas/TextReplay.js","webpack:///./node_modules/ol/render/canvas/ReplayGroup.js","webpack:///./node_modules/ol/renderer/vector.js","webpack:///./node_modules/ol/renderer/canvas/VectorLayer.js","webpack:///./node_modules/ol/layer/VectorTileRenderType.js","webpack:///./node_modules/ol/renderer/canvas/VectorTileLayer.js","webpack:///./node_modules/ol/Map.js","webpack:///./node_modules/ol/webgl.js","webpack:///./node_modules/ol/webgl/Shader.js","webpack:///./node_modules/ol/webgl/Fragment.js","webpack:///./node_modules/ol/webgl/Vertex.js","webpack:///./node_modules/ol/render/webgl/circlereplay/defaultshader.js","webpack:///./node_modules/ol/render/webgl/circlereplay/defaultshader/Locations.js","webpack:///./node_modules/ol/vec/mat4.js","webpack:///./node_modules/ol/render/webgl/Replay.js","webpack:///./node_modules/ol/render/webgl.js","webpack:///./node_modules/ol/webgl/Buffer.js","webpack:///./node_modules/ol/render/webgl/CircleReplay.js","webpack:///./node_modules/ol/render/webgl/texturereplay/defaultshader.js","webpack:///./node_modules/ol/render/webgl/texturereplay/defaultshader/Locations.js","webpack:///./node_modules/ol/webgl/ContextEventType.js","webpack:///./node_modules/ol/webgl/Context.js","webpack:///./node_modules/ol/render/webgl/TextureReplay.js","webpack:///./node_modules/ol/render/webgl/ImageReplay.js","webpack:///./node_modules/ol/geom/flat/topology.js","webpack:///./node_modules/ol/render/webgl/linestringreplay/defaultshader.js","webpack:///./node_modules/ol/render/webgl/linestringreplay/defaultshader/Locations.js","webpack:///./node_modules/ol/render/webgl/LineStringReplay.js","webpack:///./node_modules/ol/render/webgl/polygonreplay/defaultshader.js","webpack:///./node_modules/ol/render/webgl/polygonreplay/defaultshader/Locations.js","webpack:///./node_modules/ol/style/Stroke.js","webpack:///./node_modules/ol/structs/LinkedList.js","webpack:///./node_modules/ol/structs/RBush.js","webpack:///./node_modules/ol/render/webgl/PolygonReplay.js","webpack:///./node_modules/ol/style/Atlas.js","webpack:///./node_modules/ol/style/AtlasManager.js","webpack:///./node_modules/ol/render/webgl/TextReplay.js","webpack:///./node_modules/ol/render/webgl/ReplayGroup.js","webpack:///./node_modules/ol/render/webgl/Immediate.js","webpack:///./node_modules/ol/renderer/webgl/defaultmapshader.js","webpack:///./node_modules/ol/renderer/webgl/defaultmapshader/Locations.js","webpack:///./node_modules/ol/renderer/webgl/Layer.js","webpack:///./node_modules/ol/renderer/webgl/ImageLayer.js","webpack:///./node_modules/ol/renderer/webgl/Map.js","webpack:///./node_modules/ol/Tile.js","webpack:///./node_modules/ol/ImageTile.js","webpack:///./node_modules/ol/tilecoord.js","webpack:///./node_modules/ol/TileCache.js","webpack:///./node_modules/ol/source/Source.js","webpack:///./node_modules/ol/tilegrid/TileGrid.js","webpack:///./node_modules/ol/tilegrid.js","webpack:///./node_modules/ol/source/Tile.js","webpack:///./node_modules/ol/renderer/webgl/tilelayershader.js","webpack:///./node_modules/ol/renderer/webgl/tilelayershader/Locations.js","webpack:///./node_modules/ol/renderer/webgl/TileLayer.js","webpack:///./node_modules/ol/renderer/webgl/VectorLayer.js","webpack:///./node_modules/ol/WebGLMap.js","webpack:///./node_modules/ol/control/ScaleLine.js","webpack:///./node_modules/ol/format/FormatType.js","webpack:///./node_modules/ol/featureloader.js","webpack:///./node_modules/ol/loadingstrategy.js","webpack:///./node_modules/ol/source/VectorEventType.js","webpack:///./node_modules/ol/source/Vector.js","webpack:///./node_modules/ol/OverlayPositioning.js","webpack:///./node_modules/ol/Overlay.js","webpack:///./node_modules/ol/geom/flat/interpolate.js","webpack:///./node_modules/ol/geom/LineString.js","webpack:///./node_modules/ol/Feature.js","webpack:///./node_modules/ol/geom/Circle.js","webpack:///./node_modules/ol/geom/MultiLineString.js","webpack:///./node_modules/ol/geom/MultiPoint.js","webpack:///./node_modules/ol/geom/flat/center.js","webpack:///./node_modules/ol/geom/MultiPolygon.js","webpack:///./node_modules/ol/style/Image.js","webpack:///./node_modules/ol/style/RegularShape.js","webpack:///./node_modules/ol/style/Circle.js","webpack:///./node_modules/ol/style/Fill.js","webpack:///./node_modules/ol/style/Style.js","webpack:///./node_modules/ol/layer/Vector.js","webpack:///./node_modules/ol/interaction/Draw.js","webpack:///./src/MessureControl.js","webpack:///./node_modules/ol/layer/TileProperty.js","webpack:///./node_modules/ol/layer/Tile.js","webpack:///./node_modules/ol/reproj.js","webpack:///./node_modules/ol/reproj/Triangulation.js","webpack:///./node_modules/ol/reproj/Tile.js","webpack:///./node_modules/ol/tileurlfunction.js","webpack:///./node_modules/ol/source/TileEventType.js","webpack:///./node_modules/ol/source/UrlTile.js","webpack:///./node_modules/ol/source/TileImage.js","webpack:///./node_modules/ol/source/XYZ.js","webpack:///./node_modules/ol/source/OSM.js","webpack:///./node_modules/ol/format/Feature.js","webpack:///./node_modules/ol/xml.js","webpack:///./node_modules/ol/format/XMLFeature.js","webpack:///./node_modules/ol/format/OSMXML.js","webpack:///./node_modules/ol/style/Text.js","webpack:///./src/app.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;AClFA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;;AAEA;AACA,YAAY,EAAE;AACd;AACO;AACP,oBAAoB,EAAE;AACtB;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACO;AACP;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACO;;AAEP,gC;;;;;;;ACpEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAC+B;;;AAG/B;AACA,oBAAoB,8CAA8C;AAClE,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,iBAAiB;AAC/B,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,iBAAiB;AAC/B,cAAc,6CAA6C;AAC3D,cAAc,OAAO;AACrB;AACA;;;AAGA;AACA;AACA;AACA;AACA,aAAa,sEAAsE;AACnF;AACA;;;AAGA;AACA,WAAW,UAAU;AACrB,YAAY,iBAAiB;AAC7B;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,uBAAuB,iCAAiC;AACxD;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,sBAAsB,qCAAqC;AAC3D,YAAY,oBAAoB;AAChC;AACO;AACP;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,6CAA6C;AACxD,WAAW,OAAO;AAClB,YAAY,2BAA2B;AACvC;AACO;AACP;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,6CAA6C;AACxD,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA,0CAA0C,QAAQ;AAClD,iBAAiB,qCAAqC;AACtD;AACA,MAAM,6DAAK;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qCAAqC;AAC5D;AACA,WAAW,6CAA6C;AACxD,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB,YAAY,UAAU;AACtB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,6BAA6B,UAAU;AACvC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,qCAAqC;AACpD;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qCAAqC;AACzC;AACA;AACA,SAAS,8BAA8B;AACvC;AACA;AACA;AACA,WAAW,6CAA6C;AACxD,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACO;AACP;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,4CAA4C,8BAA8B;AAC1E;AACA,WAAW,6CAA6C;AACxD,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI,8BAA8B,KAAK,kCAAkC;AACzE;AACA,WAAW,UAAU;AACrB;AACO;AACP;AACA,eAAe,qCAAqC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,6DAAK;AACT;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,6CAA6C;AACxD;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kC;;;;;;;ACjRA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;AACe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,qC;;;;;;;ACxCA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB;AACO;AACP;;AAEA;AACA;AACA;;AAEA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB;AACO;AACP;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,YAAY;AACvB,YAAY,UAAU;AACtB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA,+B;;;;;;;AC3EA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,yBAAyB;AACrC;AACO;AACP,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;;;AAGA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB;AACO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;AACO;AACP;AACA;;AAEA;AACA,WAAW,KAAK;AAChB;AACO;AACP;AACA;AACA;AACA;;AAEA,+B;;;;;;;AClFA;AAAA;AAAA;AAAA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACO;AACP;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACO;AACP;AACA;;AAEA;AACA;AACA;AACA,YAAY,KAAK;AACjB;AACO;;AAEP,qC;;;;;;;AC3BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACiC;AACkB;AACV;AACH;AACN;;;AAGhC;AACA;AACA,sBAAsB,kCAAkC;AACxD;AACO;AACP;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,gEAAK;;;AAGP;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA,iBAAiB,2BAA2B;AAC5C;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD,IAAI,wBAAwB;AAC5B;AACA;AACA;AACA;AACA;AACA,yCAAyC,0BAA0B;AACnE,kEAAkE,IAAI,EAAE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gDAAgD;AACpE;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,4BAA4B;AACzC;AACA;AACA;AACA,IAAI,+DAAM;;AAEV;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,EAAE;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA,WAAW,8DAAM,GAAG;AACpB;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA,gBAAgB,mEAAe;AAC/B;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,EAAE;AACf,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,sDAAU;;;AAGZ;AACA,UAAU;AACV;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;;;AAGe,mEAAU,EAAC;;AAE1B,kC;;;;;;;AClOA;AAAA;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qCAAqC;AACzC;AACA;;AAEA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,mCAAmC;AAC9C;AACO;AACP;AACA;;;AAGA;AACA,WAAW,mCAAmC;AAC9C;AACO;AACP;AACA;;AAEe,8DAAK,EAAC;;AAErB,iC;;;;;;;ACtEA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAC0C;AACD;AACJ;AACN;;;AAG/B;AACA,aAAa,mBAAmB;AAChC;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,iDAAiD;AACjD,6CAA6C;AAC7C,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA,8CAA8C,yDAAK;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,0DAAI;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI,sEAAW;AACf;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,+CAA+C;AAC7D;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,0DAAI;AAC/B;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,8DAAU;;;AAGG,+DAAM,EAAC;;AAEtB,kC;;;;;;;AC5KA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACqC;AACS;AACR;AACD;AACc;;;AAGnD;AACA,aAAa,OAAO;AACpB,cAAc,YAAY;AAC1B;AACA;AACA,cAAc,2CAA2C;AACzD;AACA;AACA,cAAc,mBAAmB;AACjC;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,mBAAmB;AACnD;AACA;AACA;AACA;AACA;AACA,8BAA8B,sCAAsC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA,oDAAoD,0DAAI;;AAExD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI,kEAAU;AACd;AACA;;AAEA;AACA;AACA,cAAc,qCAAqC;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,qCAAqC;AAClD;AACA;AACA;AACA;AACA,MAAM,kEAAU;AAChB;AACA,kDAAkD,QAAQ;AAC1D,MAAM,wEAAa;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,0DAAI;AAC9B,+BAA+B,iEAAM;AACrC,UAAU,gEAAY;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,0DAAU;;;AAGG,sEAAO,EAAC;;AAEvB,mC;;;;;;;AC7JA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,2C;;;;;;;AChBA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEe,mEAAU,EAAC;;AAE1B,sC;;;;;;;ACnCA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;;AAEf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC,EAAC;;AAEF,wC;;;;;;;AChCA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACwE;AAC3B;AACC;;AAE9C;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA,IAAI,8CAA8C;AAClD;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oEAAS;AAChC;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,qBAAqB;AAClC,aAAa,eAAe;AAC5B,cAAc,uEAAuE;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,SAAS;AAC9B,kBAAkB,iEAAM;AACxB;AACA;AACA,KAAK;AACL,aAAa,iEAAM,kBAAkB,OAAO;AAC5C;AACA;;AAEA;AACA;AACA,aAAa,qBAAqB;AAClC,aAAa,eAAe;AAC5B,cAAc,uEAAuE;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,SAAS;AAC9B,kBAAkB,qEAAU;AAC5B;AACA;AACA,KAAK;AACL,aAAa,qEAAU,kBAAkB,OAAO;AAChD;AACA;;AAEA;AACA;AACA,aAAa,qBAAqB;AAClC,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C,QAAQ,mEAAQ;AAChB;AACA;AACA,KAAK;AACL,MAAM,mEAAQ,kBAAkB,OAAO;AACvC;AACA;;AAEA;AACA,CAAC,CAAC,iEAAW;;;AAGb;AACA;AACA,WAAW,uEAAuE;AAClF;AACA;AACA;AACO;AACP;AACA,oCAAoC,QAAQ;AAC5C,MAAM,wEAAa;AACnB;AACA,GAAG;AACH,IAAI,wEAAa,YAAY,gCAAgC;AAC7D;AACA;;;AAGe,yEAAU,EAAC;;AAE1B,sC;;;;;;;AC1Ia;;AAEb;AACA;;AAEA,kBAAkB,mBAAO,CAAC,EAAa;;AAEvC;AACA;;AAEA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,mDAAmD,SAAS;;AAE5D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,mDAAmD,SAAS;;AAE5D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;;AAEA,4BAA4B;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;;AAEA,aAAa,mBAAmB;AAChC;AACA;AACA;;AAEA,aAAa,kBAAkB;AAC/B;;AAEA;AACA,KAAK;;AAEL,6BAA6B,aAAa,EAAE;;AAE5C;AACA;;AAEA,yBAAyB,kBAAkB,EAAE;;AAE7C;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA,sBAAsB,YAAY;;AAElC;;AAEA;;AAEA,uBAAuB,aAAa;;AAEpC;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA,mDAAmD,SAAS;AAC5D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;;AAEA;;AAEA,mBAAmB,YAAY;AAC/B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA,KAAK;;AAEL;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;;AAEA,iBAAiB;;AAEjB,aAAa;AACb;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA,gDAAgD;;AAEhD;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA;AACA,yCAAyC;AACzC;AACA;;AAEA;AACA;;AAEA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0BAA0B,OAAO;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gCAAgC,wBAAwB;AACxD,gCAAgC,wBAAwB;;AAExD,wBAAwB,8CAA8C;AACtE,wBAAwB,8CAA8C;;AAEtE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;;;;;;ACjjBA;AACA,CAAC,KAA4D,4BAA4B,mBAAO,CAAC,CAAoB,GAAG,mBAAO,CAAC,EAAe;AAC/I,CAAC,SACgF;AACjF,CAAC,0CAA0C;;AAE3C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AAQD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;AAYA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;;AAEA;;AAEA;;AAEA,kIAAkI,2CAA2C;;AAE7K;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,cAAc,WAAW;AACzB;;;AAGA;AACA;AACA;AACA;AACA,gCAAgC,8BAA8B;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;;AAEA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA,kBAAkB,WAAW;AAC7B,kBAAkB,QAAQ;AAC1B;;AAEA,KAAK;AACL;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;;AAEA;AACA;AACA,kBAAkB,WAAW;AAC7B;AACA;;AAEA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW;AAC7B,kBAAkB,wBAAwB;AAC1C;;AAEA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,WAAW;AAC7B,kBAAkB,wBAAwB;AAC1C,kBAAkB,OAAO;AACzB;;AAEA,KAAK;AACL;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,WAAW;AAC7B,kBAAkB,0BAA0B;AAC5C,kBAAkB,QAAQ;AAC1B;;AAEA,KAAK;AACL;AACA;AACA;AACA,8BAA8B,iBAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,0BAA0B;AAC5C,kBAAkB,SAAS;AAC3B;AACA;;AAEA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;;AAEA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;;AAED;AACA;AACA;;AAEA;;AAEA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;ACzlBD;AACA,CAAC,KAA4D;AAC7D,CAAC,SACgC;AACjC,CAAC,qBAAqB;;AAEtB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,CAAC;;;;;;;AC9DD,uC;;;;;;;;;;;;;ACAA;AACA;AACA;AACkC;;AAElC;AACA;AACA;AACA;AACA;AACA,IAAI,6BAAc;AAClB;AACA,eAAe,uBAAO,gBAAgB,uBAAO,SAAS,uBAAO;AAC7D;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAEc,mFAAc,EAAC;;AAE9B,0C;;AC9CA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,+C;;;;;;;;ACtBA;AACA;AACA;AACiD;AACU;AACtB;AACC;;;AAGtC;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,sBAAsB,sCAAsC;AAC5D;AACA;AACO;AACP;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,wBAAK;;;AAGP;AACA,aAAa,OAAO;AACpB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qBAAU;AACd;;AAEA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,cAAc,cAAc;AAC5B;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,iCAAiC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,EAAE;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,mBAAmB;AAC7C;;AAEA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,EAAE;AACf,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,EAAE;AACf,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,mBAAmB;AAC9D;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,mBAAmB;AAC/C;AACA,4BAA4B,mBAAmB;AAC/C,KAAK;AACL,qBAAqB,WAAW;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,EAAE;AACf,aAAa,QAAQ;AACrB;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA,kBAAkB,iBAAc;AAChC;AACA;AACA;;AAEA;AACA,CAAC,CAAC,4BAAU;;;AAGG,uEAAU,EAAC;;AAE1B,sC;;AClSA;AACA;AACA;AACsC;;AAEtC;AACA;AACA;AACA,QAAQ,0CAA0C;AAClD;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,wBAAK;;AAEQ,wDAAQ,EAAC;;AAExB,oC;;ACxCA;AACA;AACA;AACqC;;AAErC;AACA;AACA;AACA,QAAQ,0CAA0C;AAClD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,WAAQ;;;AAGK,sEAAe,EAAC;;AAE/B,2C;;AChFA;AACA;AACA;;AAEA,IAAI,MAAE;AACN;;AAEA;AACA;AACA,UAAU;AACV;AACO,cAAc,MAAE;;AAEvB;AACA;AACA,UAAU;AACV;AACO,aAAa,MAAE,6BAA6B,MAAE;;AAErD;AACA;AACA,UAAU;AACV;AACO,aAAa,MAAE,6BAA6B,MAAE;;AAErD;AACA;AACA,UAAU;AACV;AACO,UAAU,MAAE;;;AAGnB;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACO;;;AAGP;AACA,2DAA2D,QAAQ;AACnE,UAAU;AACV;AACO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,CAAC;;;AAGD;AACA;AACA;AACA,UAAU;AACV;AACA;AACO;;;AAGP;AACA;AACA;AACA,UAAU;AACV;AACA;AACO;;;AAGP;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGiC;;AAExC,+B;;;;;AC7FA;AACA;AACA;AAC8C;;AAE9C;AACA;AACA,UAAU;AACV;AACe;;AAEf;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS,4BAAS;;AAElB;AACA;AACA;AACA;AACA;AACA,YAAY,4BAAS;;AAErB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,+C;;ACzDA;AACA;AACA;AACmD;;AAEnD;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,kBAAe;;AAEF,oFAAsB,EAAC;;AAEtC,kD;;;;;;;;AC3BA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,qC;;ACnBA;AACA;AACA;;AAEA,IAAI,uBAAW;;AAEf;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B;AACA,uBAAW;AACX;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,gBAAgB;AAC5B;AACA,uBAAW;AACX;AACA;;AAEe,+EAAW,EAAC;;AAE3B,uC;;ACtCA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D,oBAAoB;AACpB;AACA;AACA;;AAE2C;;;AAG3C;AACA,UAAU;AACV;AACO;;;AAGP;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,WAAW;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA,iDAAiD,uBAAuB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,mBAAW;;;AAGb;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,2CAA2C;AACtD,YAAY,OAAO;AACnB;AACO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGe,mEAAW,EAAC;;AAE3B,uC;;AC1PA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D,oBAAoB;AACpB;AACA;AACA;;AAE2C;;;AAG3C;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B,cAAc,OAAO;AACrB;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,mBAAW;;AAEE,6DAAQ,EAAC;;AAExB,oC;;ACpMA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D,oBAAoB;AACpB;AACA;AACA;;AAE2C;;AAE3C;AACA;AACA;AACA,UAAU;AACV,WAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,mBAAW;;AAEE,qEAAY,EAAC;;AAE5B,wC;;AC5IA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D,oBAAoB;AACpB;AACA;AACA;;AAEwC;;;AAGxC;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,wBAAM;;;AAGR;AACA,WAAW,kBAAkB;AAC7B,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,0BAA0B;AAC1B,0BAA0B;AAC1B,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,kBAAkB;AAC7B,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,sCAAsC,WAAW;AACjD;AACA,GAAG;AACH;AACA;AACA,CAAC;;AAEc,qEAAY,EAAC;;AAE5B,wC;;AC/QA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,UAAU;AACrB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB;AACpB;;AAEA,KAAK,OAAO;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,EAAE;AACb,WAAW,EAAE;AACb,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,YAAY,QAAQ;AACpB;AACO;AACP;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL,iBAAiB,OAAO;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,aAAa;AACxB,WAAW,oBAAoB;AAC/B;AACA;AACO;AACP;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;;;AAGA;AACA,WAAW,aAAa;AACxB,WAAW,MAAM;AACjB;AACA,YAAY,QAAQ;AACpB;AACO,SAAS,YAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,aAAa;AACxB,WAAW,qCAAqC;AAChD;AACA,YAAY,WAAW;AACvB;AACO;AACP;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,wBAAwB;AACnC,WAAW,wBAAwB;AACnC,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA;AACA,iBAAiB,UAAU;AAC3B;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,wBAAwB;AACnC;AACA;AACO;AACP;AACA;AACA;AACA,aAAa,YAAY;AACzB,cAAc;AACd;AACA;AACA;AACA,GAAG;AACH,aAAa,gBAAgB;AAC7B;AACA;AACA;;;AAGA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;AAGA;AACA,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA,iC;;AC1PA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D,oBAAoB;AACpB;AACA;AACA;;AAEmC;AACQ;AACC;;;AAG5C;AACA,UAAU;AACV;AACA;;AAEA;AACA,UAAU;AACV;AACA,IAAI,wBAAY;;AAEhB;AACA;AACA;AACA;AACA,UAAU;AACV,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,WAAW;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV,WAAW,WAAW;AACtB;AACA;AACA;AACA;;;AAGA,IAAI,uBAAW;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,MAAM;AACnB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA,uCAAuC,UAAU;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB,aAAa,MAAM;AACnB,cAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wBAAY;;AAEhC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB,aAAa,mCAAmC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,OAAO;AACpB,cAAc,QAAQ;AACtB;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,WAAW;AAChC;AACA;AACA;AACA;AACA;AACA,mBAAmB,UAAU;AAC7B;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,mBAAmB,OAAO;AAC1B,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ,YAAM;AACd,OAAO;AACP;AACA;;AAEA;AACA,CAAC,CAAC,mBAAW;;AAEE,+EAAW,EAAC;;AAE3B,uC;;AC1aA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D,oBAAoB;AACpB;AACA;AACA;;AAE8C;AACA;AACM;AACN;AACkC;AAC3C;AACQ;AACA;AACF;;;AAG3C;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,IAAI,uCAAmB;AACvB;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ,OAAO;AACf,wCAAwC,oBAAY;AACpD,KAAK,UAAU,SAAS;AACxB,oCAAoC,gBAAQ;AAC5C,KAAK;AACL,4BAA4B,mBAAW;AACvC;;AAEA,UAAU,KAAK;AACf,yCAAyC,mBAAW;AACpD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,mCAAmC;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA,MAAM,mCAAM;AACZ,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA,MAAM,qCAAQ;AACd,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,MAAM;AACnB,aAAa,YAAY;AACzB;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;;AAEA;AACA;;AAEA;;;AAGA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA,mBAAmB,iBAAgB;AACnC;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA,mBAAmB,iBAAgB;AACnC;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA,mBAAmB,iBAAgB;AACnC;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA,mBAAmB,iBAAgB;AACnC;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA,mBAAmB,iBAAgB;AACnC;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA,mBAAmB,iBAAgB;AACnC;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA,mBAAmB,iBAAgB;AACnC;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA,mBAAmB,iBAAgB;AACnC;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB,cAAc,aAAa;AAC3B;AACA;AACA,eAAe,oBAAY;AAC3B;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB,cAAc,aAAa;AAC3B;AACA;AACA;AACA,iBAAiB,YAAiB;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,yBAAW;;AAEE,uGAAmB,EAAC;;AAEnC,+C;;ACraA;AACA;AACA;AAC4C;AACe;AACM;AACf;AACL;AACS;AACa;;AAEnE,IAAI,6CAAsB;AAC1B;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;AACA,sBAAsB,kBAAkB,GAAG,kBAAkB;;AAE7D;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,oCAAoC,2BAAmB;;AAEvD;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA,mCAAmC,mCAAM;AACzC,MAAM,iBAAgB;AACtB;;AAEA;AACA,cAAc;AACd;AACA;AACA,+BAA+B,mCAAM;AACrC,MAAM,iBAAgB;AACtB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,4CAA4C;AACzD;AACA;AACA;AACA;AACA,uBAAuB,yBAAsB;AAC7C,MAAM,mBAAmB;AACzB;AACA;AACA;AACA;AACA;AACA,qBAAqB,yBAAsB;AAC3C,QAAQ,mBAAmB;AAC3B;AACA,KAAK;AACL;AACA;AACA;AACA,2BAA2B,yBAAsB;AACjD,UAAU,mBAAmB;AAC7B;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,aAAa,4CAA4C;AACzD;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,mBAAmB;AACzC,sBAAsB,mBAAmB;AACzC;AACA,KAAK,wBAAwB,mBAAmB;AAChD;AACA;AACA;AACA;;AAEA;AACA,aAAa,4CAA4C;AACzD;AACA;AACA;AACA;AACA;AACA,uBAAuB,yBAAsB;AAC7C,MAAM,mBAAmB;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,kCAAa;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,4CAA4C;AACzD;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,4CAA4C;AACzD;AACA;AACA;AACA;AACA;AACA,uBAAuB,yBAAsB;AAC7C,MAAM,mBAAmB;AACzB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,2BAAmB;;AAEjC;AACA,QAAQ,mCAAM;AACd,UAAU,mBAAmB;AAC7B;AACA,QAAQ,mCAAM;AACd,UAAU,mBAAmB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mCAAM;AACd,UAAU,mBAAmB;AAC7B;AACA;AACA;AACA;;AAEA;AACA,aAAa,4CAA4C;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,yBAAsB;AAC/C,QAAQ,mBAAmB;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,4CAA4C;AACzD;AACA;AACA;AACA;AACA;AACA,2BAA2B,yBAAsB;AACjD;AACA;;AAEA;AACA,aAAa,4CAA4C;AACzD;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM,0CAAa;AACnB;AACA;AACA;AACA,MAAM,0CAAa;AACnB;AACA;;AAEA,mCAAmC,kCAAa;AAChD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,yBAAW;;;AAGE,2GAAsB,EAAC;;AAEtC,kD;;;;;ACvUA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,uC;;ACdA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,qC;;;;;AChCA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,qC;;ACpBA;AACA;AACA;AACiD;;AAEjD;AACA,WAAW,EAAE;AACb,WAAW,OAAO;AAClB;AACO;AACP;AACA,cAAc,iBAAc;AAC5B;AACA;;AAEA,mC;;;;;ACfA;AACA;AACA;AACqC;AACL;;;AAGhC;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,2BAAa;;AAEjB;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,2BAAa;AACb;AACA;AACA,EAAE,+BAAK;AACP;;;AAGA;AACA;AACA,YAAY,EAAE;AACd;AACA,2BAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,EAAE;AACb,YAAY,QAAQ;AACpB;AACA,2BAAa;AACb,EAAE,MAAM;AACR,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,YAAY,OAAO;AACnB;AACA,2BAAa;AACb;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA,2BAAa;AACb;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA,2BAAa;AACb;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA,2BAAa;AACb;AACA;;;AAGA;AACA;AACA;AACA;AACA,2BAAa;AACb;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;;;AAGA;AACA,YAAY,QAAQ;AACpB;AACA,2BAAa;AACb;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACA,2BAAa;AACb;AACA;;;AAGA;AACA,WAAW,EAAE;AACb,YAAY,QAAQ;AACpB;AACA,2BAAa;AACb;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB;AACA;AACA,2BAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA,2BAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,2BAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGe,qFAAa,EAAC;;AAE7B,yC;;ACnRA;AACA;AACA;AACuC;AACM;AACC;AACS;;;AAGvD;AACA,aAAa,oGAAoG;AACjH;;;AAGA,IAAI,mBAAS;AACb;;AAEA;AACA;AACA,iBAAiB,MAAM;AACvB,kBAAkB,OAAO;AACzB;AACA;AACA;AACA,OAAO;AACP;AACA,iBAAiB,MAAM;AACvB,kBAAkB,OAAO;AACzB;AACA;AACA,2BAA2B,4BAA4B;AACvD,OAAO;;AAEP;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,mCAAM,OAAO,4BAAS;AAC5B;AACA;AACA;;AAEA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA,aAAa,oCAAoC;AACjD;AACA;AACA;AACA,0BAA0B,4BAA4B;AACtD;AACA,kBAAkB,SAAS,qBAAqB,SAAS;AACzD,kBAAkB,SAAS,oBAAoB,SAAS;AACxD,MAAM,qCAAQ,OAAO,4BAAS;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,4BAA4B;AACpD;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA,OAAO,oBAAoB,SAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,qBAAa;;;AAGA,oEAAS,EAAC;;AAEzB,qC;;AClIA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACO;;AAEP;AACA;AACA,UAAU;AACV;AACO;;AAEP,kC;;;;;AChBA;AACA;AACA;AACoC;;AAEpC;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,yBAAyB,KAAK;AAC9B;AACA;AACA;AACA;AACA,CAAC;;;AAGD;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP,EAAE,MAAM,YAAY;AACpB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS,oBAAe;AACxB;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO,SAAS,oBAAe;AAC/B;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;AACA,YAAY,cAAc;AAC1B;AACO;AACP;;AAEA,iBAAiB,OAAO;AACxB;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,OAAO;AAC9B;AACA,qBAAqB,WAAW;AAChC;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,QAAQ;AAC7B;AACA,uBAAuB,QAAQ;AAC/B;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;;;AAGA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;;AAEA,gC;;ACvMA;AACA;AACA;AACgC;;;AAGhC;AACA,aAAa,6GAA6G;AAC1H;;;AAGA;AACA,WAAW,6BAA6B;AACxC,YAAY,KAAK;AACjB;AACO;AACP;AACA;AACA,eAAe,sCAAsC;AACrD,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA;AACA,UAAU,KAAK;AACf,UAAU,KAAK;AACf;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,sCAAsC;AACjD,YAAY,+CAA+C;AAC3D;AACO;AACP;AACA;;AAEA,4C;;AC3CA;AACA;AACA;AAC6C;AACb;;;AAGhC;AACA,aAAa,iEAAiE;AAC9E;;;AAGA;AACA,WAAW,cAAc;AACzB,YAAY,KAAK;AACjB;AACO;AACP;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,YAAY,KAAK;AACjB;AACO;AACP;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;;AAEA,gD;;ACzEA;AACA;AACA;AACoC;;;AAGpC;AACA,aAAa,yDAAyD;AACtE;;;AAGA;AACA,WAAW,iBAAiB;AAC5B,WAAW,OAAO;AAClB,YAAY,iBAAiB;AAC7B;AACO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA,WAAW,iBAAiB;AAC5B,WAAW,OAAO;AAClB,YAAY,iBAAiB;AAC7B;AACO,SAAS,uBAAI;AACpB;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,YAAY,KAAK;AACjB;AACO;AACP;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,OAAO;AACtB,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;;;AAGA;AACA,WAAW,QAAQ;AACnB,YAAY,KAAK;AACjB;AACO;AACP,mCAAmC,SAAS;AAC5C;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,OAAO;AACtB,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;;AAEA,8C;;ACvFA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA,CAAC,EAAC;;AAEF,oC;;ACZA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA,CAAC,EAAC;;AAEF,wC;;ACbA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,cAAc;AACzB,aAAa,OAAO;AACpB;AACO;AACP;AACA;;AAEA,iBAAiB,oCAAoC;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kC;;AC3CA;AACA;AACA;AACiC;AACK;;;AAGtC;AACA;AACA,aAAa,cAAc;AAC3B;AACA;;;AAGA;AACA,4BAA4B,sCAAsC;AAClE,0BAA0B,OAAO;AACjC;AACA,aAAa,yCAAyC;AACtD;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB,YAAY,WAAW;AACvB;AACA;AACA;AACO,SAAS,cAAG;AACnB;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,mCAAmC;AAC9C,YAAY,WAAW;AACvB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,kBAAkB;AAC7B;AACA,YAAY,WAAW;AACvB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;;AAGA;AACA,cAAc,4CAA4C;AAC1D;AACA,MAAM,WAAW;AACjB;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,iBAAiB;AAC7B;AACA;AACO;AACP;AACA;AACA,eAAe,WAAW;AAC1B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACO;AACP,0BAA0B,MAAM;AAChC;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,2BAA2B,SAAS;AACpC,IAAI,SAAS;AACb;AACA;;;AAGA;AACA,yBAAyB,sCAAsC;AAC/D,kDAAkD,EAAE,QAAQ,EAAE;AAC9D;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,uCAAuC,EAAE,EAAE,EAAE;AAC7C;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,uCAAuC,EAAE,EAAE,EAAE;AAC7C;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO,mCAAmC,EAAE,QAAQ,EAAE;AACjE;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACO,SAAS,iBAAM;AACtB;AACA;AACA,iBAAiB,EAAE;AACnB,iBAAiB,EAAE;AACnB,GAAG;AACH;AACA;AACA;;;AAGA;AACA,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB,YAAY,QAAQ;AACpB;AACO,SAAS,iBAAM;AACtB;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,YAAY,WAAW;AACvB;AACA;AACO,SAAS,iBAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,YAAY,WAAW;AACvB;AACO,SAAS,gBAAK;AACrB;AACA;AACA;AACA;;;AAGA;AACA,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB,YAAY,OAAO;AACnB;AACO,SAAS,0BAAe;AAC/B;AACA;AACA;AACA;;;AAGA;AACA,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB,YAAY,OAAO;AACnB;AACO,SAAS,mBAAQ;AACxB,mBAAmB,0BAAe;AAClC;;;AAGA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,kBAAkB;AAC7B;AACA,YAAY,OAAO;AACnB;AACO;AACP,SAAS,0BAAe;AACxB;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACO;AACP,SAAS,iBAAM,eAAe,EAAE,GAAG,EAAE;AACrC;;AAEA,sC;;ACrZA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,6BAA6B,gCAAgC;AAC7D;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA,kC;;ACjEA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,kC;;ACfA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,wC;;ACjBA;AACA;AACA;AACoC;AACI;AACY;;;AAGpD;AACA;AACA,aAAa,cAAc;AAC3B;AACA;;AAEA;AACA;AACA;AACA,WAAW,4CAA4C;AACvD,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACA;AACO,SAAS,aAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACO,SAAS,YAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,qCAAqC;AAChD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,SAAS,iBAAU;AACnB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACA;AACA;AACO;AACP;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACA;AACO,SAAS,iBAAU;AAC1B;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,qCAAqC;AAChD,YAAY,aAAa;AACzB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA,kCAAkC,YAAY;AAC9C,GAAG;AACH,kCAAkC,YAAY;AAC9C;AACA;AACA,kCAAkC,YAAY;AAC9C,GAAG;AACH,kCAAkC,YAAY;AAC9C;AACA,uBAAuB,YAAY;AACnC,mBAAmB,YAAY;AAC/B;AACA;AACA;;;AAGA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;;;AAGA;AACA,WAAW,qCAAqC;AAChD,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;;;AAGA;AACA,WAAW,4CAA4C;AACvD,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;;AAEA;AACA,WAAW,mDAAmD;AAC9D,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACA;AACO,SAAS,aAAM;AACtB;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACO,SAAS,aAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,qCAAqC;AAChD;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,4CAA4C;AACvD,YAAY,OAAO;AACnB;AACO;AACP,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP,QAAQ,cAAc;AACtB;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,mDAAmD;AAC9D,YAAY,OAAO;AACnB;AACO;AACP,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACO;AACP;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,0DAA0D;AACrE,WAAW,GAAG;AACd,YAAY,UAAU;AACtB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACO,SAAS,cAAO;AACvB;AACA,OAAO,cAAO;AACd;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,qCAAqC;AACjD;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,qCAAqC;AACjD;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,qCAAqC;AACjD;AACA;AACO,SAAS,gBAAS;AACzB;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,qCAAqC;AACjD;AACO;AACP;AACA,iBAAiB,MAAM;AACvB;AACA,GAAG,qBAAqB,MAAM;AAC9B;AACA,GAAG,qBAAqB,MAAM;AAC9B;AACA,GAAG,qBAAqB,MAAM;AAC9B;AACA,GAAG;AACH,IAAI,MAAM,YAAY;AACtB;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,qCAAqC;AAChD,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,yBAAyB;AACpC,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA,SAAS,cAAO;AAChB;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA,MAAM,iBAAU;AAChB;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,yBAAyB;AACrC;AACA;AACO,SAAS,cAAO;AACvB;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,qCAAqC;AACjD;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,qCAAqC;AACjD;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACA;AACO,SAAS,iBAAU;AAC1B;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACA;AACO,SAAS,cAAO;AACvB;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,qCAAqC;AAChD,WAAW,qCAAqC;AAChD,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA,mBAAmB,YAAY;AAC/B,iBAAiB,YAAY;AAC7B;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA,mCAAmC,YAAY;AAC/C,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA,mCAAmC,YAAY;AAC/C,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA,mCAAmC,YAAY;AAC/C,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACA;AACO,SAAS,qBAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kC;;AC7xBA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,wC;;ACtBA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,0C;;ACjBA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,uCAAuC;AAClD,WAAW,eAAe;AAC1B,YAAY,cAAc;AAC1B;AACO;AACP;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,eAAe;AAC1B,YAAY,cAAc;AAC1B;AACO,SAAS,gBAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,eAAe;AAC1B,YAAY,cAAc;AAC1B;AACO,SAAS,eAAK;AACrB;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,eAAe;AAC1B,YAAY,cAAc;AAC1B;AACO,SAAS,mBAAS;AACzB;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qC;;AC1HA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAC+C;AACG;;;AAGlD;AACA,wCAAwC,gBAAgB,KAAK;AAC7D;AACA,aAAa,OAAO;AACpB,cAAc,mCAAmC;AACjD;AACA;AACA,cAAc,OAAO;AACrB;AACA;;;AAGA;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA,0CAA0C,YAAY;AACtD;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,qBAAqB;AAChC;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACO,SAAS,gBAAS;AACzB;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB;AACA;AACA,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,+BAA+B,2CAA2C;AAC1E;AACA;AACA;AACA,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,+BAA+B,2CAA2C;AAC1E,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;AACA,SAAS,YAAY;AACrB,+BAA+B,2CAA2C;AAC1E,0CAA0C,QAAQ;AAClD;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY;AACrB,kCAAkC,+CAA+C;AACjF,yCAAyC,QAAQ;AACjD,kBAAkB,gBAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4CAA4C;AACvD;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA,YAAY,SAAS;AACrB,sBAAsB,SAAS;AAC/B,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,qBAAqB;AAChC;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACO,SAAS,cAAO;AACvB;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB;AACA;AACA,SAAS,YAAY;AACrB,+BAA+B,oCAAoC;AACnE;AACA,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;AACA,SAAS,YAAY;AACrB,+BAA+B,2CAA2C;AAC1E,0CAA0C,QAAQ;AAClD;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY;AACrB,kCAAkC,+CAA+C;AACjF,yCAAyC,QAAQ;AACjD,gBAAgB,cAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,OAAO;AAClB;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,qCAAqC;AACjD;AACO,SAAS,aAAM;AACtB;AACA,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,SAAS,OAAO,SAAS;AACnC;;AAEA,kC;;AChQA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,UAAU;AACV;AACA;AACO;AACP;AACA;AACA;AACA;AACA;;AAEe,oDAAK,EAAC;;AAErB,iC;;AClCA;AACA;AACA;AAC2C;;;AAG3C;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,oCAAoC;AAClD;AACA,cAAc,8BAA8B;AAC5C,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,8EAA8E;AAC9E;AACA,cAAc,8BAA8B;AAC5C,cAAc,+DAA+D;AAC7E;AACA,KAAK,OAAO,2BAA2B,sCAAsC;AAC7E,SAAS,OAAO;AAChB,gBAAgB,wCAAwC;AACxD;;;AAGA;AACA;AACA;AACA,mDAAmD,qBAAqB;AACxE;AACA,oBAAoB,oCAAoC;AACxD;AACA;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oCAAoC;AACxD;AACA;AACA;AACA,IAAI,qBAAU;AACd;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,2BAA2B,6BAA6B;;AAExD;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,YAAY,QAAQ;AACpB;AACA,qBAAU;AACV;AACA;;AAEA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA,qBAAU;AACV;AACA;;AAEA;AACA;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA,qBAAU;AACV;AACA;;AAEA;AACA;AACA,YAAY,6BAA6B;AACzC;AACA;AACA,qBAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA,qBAAU;AACV,gCAAgC,eAAe;AAC/C;;AAEA;AACA;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA,qBAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA,qBAAU;AACV;AACA;;AAEA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,qBAAU;AACV;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,qBAAU;AACV;AACA;AACA;;AAEA;AACA,YAAY,0CAA0C;AACtD;AACA,qBAAU;AACV;AACA;;AAEA;AACA,WAAW,0CAA0C;AACrD;AACA,qBAAU;AACV;AACA;;AAEA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;AACA,qBAAU;AACV;AACA;AACA;;AAEA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;AACA;AACA,qBAAU;AACV;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA,WAAW,+DAA+D;AAC1E;AACA;AACA,qBAAU;AACV;AACA;;AAEA;AACA;AACA,YAAY,yEAAyE;AACrF;AACA;AACA,qBAAU;AACV;AACA;;AAEe,yEAAU,EAAC;;AAE1B,sC;;AC7QA;AACA;AACA;AACgC;AACS;AACV;;;AAG/B;AACA;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;AACP;AACA;AACA;;;AAGA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA;AACA,IAAI,2BAAkB;AACtB;AACA;AACA;AACA,aAAa,UAAK;AAClB;AACA;AACA;AACA;AACA,4BAA4B,IAAI;AAChC;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,eAAU;;;AAGZ;AACA;AACA;AACA;AACA,UAAU;AACV;AACO;AACP,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB;;;AAGA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,YAAY,cAAc;AAC1B;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,YAAY,cAAc;AAC1B;AACO,SAAS,mBAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA,oC;;ACrJA;AACA;AACA;AACyC;AACV;;;AAG/B;AACA;AACA;AACA;AACA,UAAU;AACV;AACO,IAAI,eAAM;;;AAGjB;AACA;AACA;AACA;AACA,UAAU;AACV;AACO,IAAI,eAAM;;;AAGjB;AACA;AACA,UAAU;AACV;AACO,IAAI,wBAAe,aAAa,eAAM;;;AAG7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,2BAAkB;AACtB;AACA;AACA;AACA,aAAa,UAAK;AAClB,cAAc,eAAM;AACpB;AACA;AACA,qBAAqB,wBAAe;AACpC,mBAAmB,eAAM;AACzB,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,eAAU;;;AAGZ;AACA;AACA;AACA;AACA,UAAU;AACV;AACO,IAAI,oBAAW;AACtB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB;;AAEA,oC;;AC/EA;AACA;AACA;;;AAGA;AACA,UAAU;AACV;AACA,IAAI,iBAAK;;;AAGT;AACA;AACA;AACO,SAAS,iBAAK;AACrB,EAAE,iBAAK;AACP;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,kCAAkC;AAC9C;AACO,SAAS,eAAG;AACnB,SAAS,iBAAK;AACd;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,kCAAkC;AAC7C;AACO,SAAS,eAAG;AACnB,EAAE,iBAAK;AACP;;AAEA,uC;;ACtCA;AACA;AACA;AACkC;;;AAGlC;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA;AACA;AACO,SAAS,gBAAK;AACrB;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,kCAAkC;AAC7C,WAAW,kCAAkC;AAC7C,WAAW,uCAAuC;AAClD;AACO,SAAS,cAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,kCAAkC;AAC7C,WAAW,kCAAkC;AAC7C,YAAY,uCAAuC;AACnD;AACO,SAAS,iBAAM;AACtB;AACA;AACA;AACA;AACA,MAAM,iCAAO;AACb;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,iDAAiD;AAC7D;AACO,SAAS,cAAG;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA,sC;;AC1EA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,6CAA6C;AACjD,MAAM,gCAAgC;AACtC,IAAI,mCAAmC;AACvC,mBAAmB,6CAA6C;AAChE;AACA;AACA;AACA,2BAA2B,gCAAgC;AAC3D,IAAI,mCAAmC;AACvC;AACA;AACwC;AACG;AACV;AACgE;AAC1B;AACzB;AACS;AACF;AAC+D;;;AAGpH;AACA,oBAAoB,gCAAgC;AACpD;AACA,aAAa,4BAA4B;AACzC;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,gEAAgE;AAC7E;AACA;;;AAGyB;;AAEL;;AAEpB;AACA,WAAW,cAAc;AACzB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,YAAY,cAAc;AAC1B;AACA;AACO;AACP;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,YAAY,cAAc;AAC1B;AACO;AACP;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACO;AACP,EAAE,eAAe;AACjB,EAAE,cAAgB;AAClB;;;AAGA;AACA,WAAW,kBAAkB;AAC7B;AACO;AACP;AACA;;;AAGA;AACA;AACA;AACA,WAAW,eAAe;AAC1B;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACO,SAAS,QAAG;AACnB;AACA,IAAI,eAAe,YAAY,OAAO;AACtC,gBAAgB,WAAW;AAC3B;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,2CAA2C;AAC/C,IAAI,iEAAiE;AACrE;AACA,WAAW,eAAe;AAC1B,WAAW,OAAO;AAClB,WAAW,qCAAqC;AAChD,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACO;AACP,eAAe,QAAG;AAClB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,iBAAiB,UAAK,uCAAuC,UAAK;AAClE;AACA,KAAK;AACL;AACA;AACA;AACA,+DAA+D,QAAG;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW;AAC7B,mBAAmB,WAAW;AAC9B;AACA;AACA,QAAQ,eAAe;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACO;AACP;AACA;AACA;AACA;AACA,QAAQ,cAAgB;AACxB;AACA,KAAK;AACL,GAAG;AACH;;;AAGA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA,WAAW,kBAAkB;AAC7B;AACA,WAAW,kBAAkB;AAC7B;AACA,WAAW,kBAAkB;AAC7B;AACA;AACO;AACP;AACA;AACA,MAAM,cAAgB;AACtB,MAAM,cAAgB;AACtB,KAAK;AACL,GAAG;AACH;;;AAGA;AACA;AACA;AACO;AACP,EAAE,iBAAiB;AACnB,EAAE,gBAAmB;AACrB;;;AAGA;AACA,WAAW,4BAA4B;AACvC,WAAW,OAAO;AAClB,YAAY,WAAW;AACvB;AACO;AACP;AACA,WAAW,QAAG;AACd,GAAG;AACH,WAAW,QAAG;AACd,GAAG;AACH;AACA,iBAAiB,WAAW;AAC5B;AACA;AACA;;;AAGA;AACA,cAAc,uCAAuC;AACrD;AACA,WAAW,qFAAqF;AAChG;AACA,YAAY,kBAAkB;AAC9B;AACO;AACP;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,eAAe;AAC9B,eAAe,QAAQ;AACvB,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA,KAAK;AACL;;;AAGA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA,WAAW,eAAe;AAC1B,WAAW,eAAe;AAC1B,WAAW,qFAAqF;AAChG;AACA,iCAAiC,sCAAsC;AACvE,wBAAwB,sCAAsC;AAC9D,WAAW,qFAAqF;AAChG;AACA,iCAAiC,sCAAsC;AACvE,wBAAwB,sCAAsC;AAC9D;AACA;AACO;AACP,mBAAmB,QAAG;AACtB,iBAAiB,QAAG;AACpB,EAAE,cAAgB;AAClB,EAAE,cAAgB;AAClB;;;AAGA;AACA;AACA,WAAW,qCAAqC;AAChD;AACA,WAAW,gBAAgB;AAC3B;AACA,YAAY,qCAAqC;AACjD;AACA;AACO;AACP,SAAS,cAAS;AAClB;AACA;;;AAGA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,gBAAgB;AAC3B;AACA,YAAY,qCAAqC;AACjD;AACA;AACA;AACO;AACP,eAAe,cAAS;AACxB;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB,YAAY,QAAQ;AACpB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB;AACA,YAAY,kBAAkB;AAC9B;AACO;AACP;AACA;AACA,sBAAsB,cAAgB;AACtC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B,WAAW,eAAe;AAC1B,YAAY,kBAAkB;AAC9B;AACA;AACO,SAAS,iBAAY;AAC5B,yBAAyB,QAAG;AAC5B,8BAA8B,QAAG;AACjC;AACA;;;AAGA;AACA;AACA;AACA;AACA,QAAQ,qCAAqC;AAC7C,gCAAgC,uCAAuC;AACvE;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,eAAe;AAC1B,WAAW,eAAe;AAC1B,YAAY,qCAAqC;AACjD;AACA;AACO,SAAS,cAAS;AACzB,sBAAsB,iBAAY;AAClC;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,6BAA6B;AACxC,WAAW,eAAe;AAC1B,WAAW,eAAe;AAC1B,YAAY,6BAA6B;AACzC;AACA;AACO;AACP,sBAAsB,iBAAY;AAClC,SAAS,qBAAc;AACvB;;;AAGA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB,YAAY,qCAAqC;AACjD;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,2BAA2B,WAAoB;AAC/C,2BAA2B,oBAAoB;AAC/C;AACA;AACA,0BAA0B,oBAAoB,EAAE,WAAoB,EAAE,YAAY,EAAE,mBAAU;AAC9F;;AAEA;;AAEA,gC;;AC/fA;AACA;AACA;AACoC;;;AAGpC;AACA;AACA,IAAI,0BAA0B;AAC9B,aAAa,eAAe;AAC5B;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA;AACA,YAAY,WAAW;AACvB;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,WAAW;AACtB,YAAY,WAAW;AACvB;AACO,SAAS,eAAK;AACrB,SAAS,aAAG;AACZ;;;AAGA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB,YAAY,WAAW;AACvB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,WAAW;AACvB;AACO,SAAS,aAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB,YAAY,WAAW;AACvB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,gEAAgE;AAC3E,YAAY,gEAAgE;AAC5E;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,YAAY,WAAW;AACvB;AACO,SAAS,mBAAM;AACtB;AACA;AACA,6BAA6B,aAAG;AAChC;;;AAGA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,WAAW;AACvB;AACO,SAAS,kBAAK;AACrB,6BAA6B,aAAG;AAChC;;;AAGA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,WAAW;AACvB;AACO,SAAS,sBAAS;AACzB,6BAA6B,aAAG;AAChC;;;AAGA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,WAAW;AACvB;AACO,SAAS,iBAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,WAAW;AACtB,YAAY,WAAW;AACvB;AACO;AACP;AACA,EAAE,MAAM,gBAAgB;;AAExB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA,WAAW,WAAW;AACtB,YAAY,OAAO;AACnB;AACO;AACP;AACA;;AAEA,qC;;AC/OA;AACA;AACA;AACoC;AACE;AAC8B;AACpB;AACc;AACzB;AACkD;;;AAGvF;AACA,UAAU;AACV;AACA,mBAAmB,MAAe;;;AAGlC;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iBAAQ;AACZ;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA,mBAAmB,WAAW;;AAE9B;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,sCAAsC;AACnD,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,iDAAiD;AACvD,aAAa,sCAAsC;AACnD,aAAa,uCAAuC;AACpD,cAAc,sCAAsC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,sCAAsC;AACnD,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA;AACA,aAAa,+BAA+B;AAC5C,cAAc,8BAA8B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,sCAAsC;AACnD;AACA;AACA;AACA,IAAI,gCAAQ;AACZ;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,QAAQ;AACrB;AACA,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;AACA,IAAI,gCAAQ;AACZ;;AAEA;AACA;AACA,cAAc;AACd;AACA,qBAAqB;AACrB;AACA,aAAa,OAAO;AACpB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,SAAS;AACvB;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA;AACA;AACA,cAAc,oCAAoC;AAClD;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uCAAuC;AACpD;AACA;AACA,IAAI,gCAAQ;AACZ;;AAEA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C,cAAc,QAAQ;AACtB;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA,IAAI,gCAAQ;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oCAAoC;AACjD,iCAAiC,2CAA2C;AAC5E,aAAa,oCAAoC;AACjD,iCAAiC,2CAA2C;AAC5E,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD,qBAAqB,QAAa;AAClC,+CAA+C,UAAK;AACpD;AACA;AACA;AACA,oBAAoB,SAAS,oBAAoB,SAAS;AAC1D,QAAQ,iBAAgB;AACxB;AACA;AACA;AACA,QAAQ,WAAW;AACnB;AACA,eAAe,iBAAY;AAC3B,OAAO;AACP,MAAM,iBAAY;AAClB;AACA;AACA;;AAEA;AACA,CAAC,CAAC,4BAAU;;;AAGG,mEAAQ,EAAC;;AAExB,oC;;AChSA;AACA;AACA;AACoC;AACsC;AACrC;AACY;AACyB;AAC1C;;AAEhC;AACA;AACA,uBAAuB,mCAAmC;AAC1D;AACA;AACA;AACA;AACA;AACA,IAAI,6BAAc;AAClB;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA,kBAAkB,cAAc;;AAEhC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,iCAAiC;AAC5C;AACA;;AAEA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA;AACA,cAAc,sCAAsC;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,sCAAsC;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,2CAA2C;AAC5D,cAAc,eAAe;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM,+BAAK;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,cAAc,eAAe;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA,aAAa,eAAe;AAC5B,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,gBAAgB;AAC7B;AACA;AACA,IAAI,gCAAQ;AACZ;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,MAAM;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA,KAAK;AACL,qBAAqB,aAAa;AAClC;AACA,wBAAwB,cAAc;AACtC;AACA;AACA,SAAS;AACT,mCAAmC,MAAM;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,gBAAM;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAS;AACxB;AACA;AACA;AACA;AACA,MAAM,eAAK;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,mBAAS;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,aAAQ;;;AAGV;AACA,WAAW,OAAO;AAClB,YAAY,eAAe;AAC3B;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B,GAAG;AACH,aAAa,cAAc;AAC3B,GAAG;AACH,aAAa,cAAc;AAC3B;AACA;AACA,eAAe,eAAe;AAC9B;AACA;;;AAGA;AACA,WAAW,eAAe;AAC1B,YAAY,OAAO;AACnB;AACO;AACP;AACA,gBAAgB,cAAc;AAC9B;AACA,GAAG,oBAAoB,cAAc,kBAAkB,cAAc;AACrE;AACA,GAAG,oBAAoB,cAAc;AACrC;AACA;AACA,oBAAoB,OAAO;AAC3B;;;AAGA;AACA,WAAW,eAAe;AAC1B,WAAW,oCAAoC;AAC/C,WAAW,eAAe;AAC1B,YAAY,cAAc;AAC1B;AACO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA,WAAW,WAAW;AACtB;AACA;AACA;AACA;;AAEe,qFAAc,EAAC;;AAE9B,0C;;ACnUA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO,SAAS,eAAU;AAC1B;AACA;AACA;AACA,QAAQ,cAAc;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO,SAAS,gBAAW;AAC3B;AACA,mCAAmC,QAAQ;AAC3C;AACA,YAAY,eAAU;AACtB;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA,oCAAoC,QAAQ;AAC5C;AACA,YAAY,gBAAW;AACvB;AACA;AACA;AACA;;AAEA,gC;;AC9DA;AACA;AACA;AACiE;;;AAGjE;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL,qBAAqB,YAAY;AACjC,0BAA0B,IAAI;AAC9B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA,wBAAwB,cAAc;AACtC;AACA;AACA,uBAAuB,oBAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,eAAe;AAC1B,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,oBAAS;AAC/B;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,oBAAS;AAC/B;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,oBAAS;AAC/B;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,eAAe;AAC1B,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,eAAe;AAC1B,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mC;;AC3PA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,yCAAyC;AACpD,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,gDAAgD;AAC3D,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP,0CAA0C,QAAQ;AAClD;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,uDAAuD;AAClE,WAAW,OAAO;AAClB,WAAW,eAAe;AAC1B,YAAY,cAAc;AAC1B;AACO;AACP;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,8DAA8D;AACzE,WAAW,OAAO;AAClB,WAAW,sBAAsB;AACjC,YAAY,qBAAqB;AACjC;AACO;AACP;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mC;;ACjFA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iDAAiD;AAC5D,YAAY,gDAAgD;AAC5D;AACO;AACP;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,wDAAwD;AACnE,YAAY,uDAAuD;AACnE;AACO;AACP;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,WAAW,+DAA+D;AAC1E;AACA,YAAY,8DAA8D;AAC1E;AACO;AACP;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mC;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,+BAA+B;AAC/D;AACA;AACA;AACA;;AAEsE;;;AAGtE;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,eAAe;AAC1B;AACA,YAAY,cAAc;AAC1B;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA,UAAU,cAAc;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,UAAU;AAC1C;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB;AACA,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB;AACA,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA,UAAU,cAAc;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,cAAc;AACtC;AACA;AACA,QAAQ,oBAAe;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB;AACA,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB;AACA,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oC;;AC5YA;AACA;AACA;AACsD;AACL;AACJ;AACI;AACW;AACU;AACjB;AACA;AACH;;AAElD;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA,IAAI,qBAAU;AACd;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,qDAAqD,cAAc;AACnE,KAAK;AACL,qCAAqC,6CAA6C;AAClF;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6BAA6B,wBAAwB;AACrD;AACA;AACA;AACA,iCAAiC,eAAe;AAChD;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,WAAW,eAAc;AACzB;;AAEA;AACA;AACA,cAAc,6CAA6C;AAC3D;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA,qDAAqD,cAAc;AACnE;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,8CAA8C;AAC3D,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,kBAAkB;AACpD;AACA;AACA;;AAEA;AACA,CAAC,CAAC,mBAAc;;;AAGD,yEAAU,EAAC;;AAE1B,sC;;ACjJA;AACA;AACA;AACsE;AACzB;AACI;AACG;AACI;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,WAAK;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAS;AACnC;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,cAAc,sCAAsC;AACpD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD;AACA;AACA;;AAEA;AACA,CAAC,CAAC,mBAAc;;;AAGD,0DAAK,EAAC;;AAErB,iC;;AC3GA;AACA;AACA;AAC8C;;;AAG9C;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,YAAY,QAAQ;AACpB;AACO;AACP,gBAAgB,aAAa;AAC7B;AACA,eAAe,yCAAyC;AACxD,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,KAAK;AACL;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,cAAc;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oC;;AChHA;AACA;AACA;AACyD;AACL;;;AAGpD;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,eAAe;AAC1B,YAAY,cAAc;AAC1B;AACA;AACO;AACP;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,yBAAyB;AAC9C;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA,UAAU,qBAAqB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,YAAY,cAAc;AAC1B;AACA;AACO;AACP;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yC;;AC9FA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,yGAAyG;AACpH;AACA,WAAW,GAAG;AACd;AACA,YAAY,UAAU;AACtB;AACA;AACO;AACP;AACA;AACA;AACA,QAAQ,yBAAyB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oC;;ACrCA;AACA;AACA;AACkH;AACrC;AACrB;;;AAGxD;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,YAAY,QAAQ;AACpB;AACO;AACP,0BAA0B,qBAAqB;AAC/C,IAAI,WAAW;AACf,OAAO,iBAAU;AACjB;AACA;AACA,MAAM,cAAc;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,OAAc;AACvB;AACA,eAAe,yCAAyC;AACxD,eAAe,yCAAyC;AACxD,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B,KAAK;AACL;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,YAAY,QAAQ;AACpB;AACO;AACP,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA;AACA,MAAM,oBAAoB;AAC1B;AACA;AACA,MAAM,oBAAoB;AAC1B;AACA;AACA,MAAM,oBAAoB;AAC1B;AACA;AACA,MAAM,oBAAoB;AAC1B;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C,QAAQ,wBAAwB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,YAAY,QAAQ;AACpB;AACO;AACP,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,4C;;AC9IA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACO,SAAS,mBAAW;AAC3B;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mC;;ACvBA;AACA;AACA;AAC+D;;;AAG/D;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA,QAAQ,cAAc;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACO;AACP;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACO;AACP,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,YAAY,OAAO;AACnB;AACO;AACP;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,mBAAkB;AACxB;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,YAAY,OAAO;AACnB;AACO;AACP,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;;AAEA,kC;;AC5IA;AACA;AACA;AACmC;AAC8B;AAChB;AACJ;AACJ;AACV;AACkB;AACG;AACU;AACkB;AACvB;AACC;AACA;AACM;AACK;AACI;AACxB;AACf;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAO;AACX;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,qDAAqD,cAAc;AACnE;AACA,KAAK;AACL,qCAAqC,oDAAoD;AACzF;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,MAAM,MAAM;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6BAA6B,wBAAwB;AACrD;AACA;AACA;AACA,iCAAiC,oBAAoB;AACrD;AACA;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,WAAW,gBAAe;AAC1B;;AAEA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,cAAc,oDAAoD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,iBAAiB;AACvB;AACA,KAAK;AACL;AACA;;AAEA,WAAW,uBAAuB;AAClC;AACA;;AAEA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;;AAEA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA,uBAAuB,gBAAS;AAChC,gCAAgC,uBAAuB;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA,eAAe,UAAK,8BAA8B,cAAc;AAChE;;AAEA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,WAAW;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAU;AACzB;AACA;;AAEA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA,2BAA2B,eAAU;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,aAAa;AACpD;AACA;AACA;AACA,kDAAkD,cAAc;AAChE;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;AAEA;AACA;AACA,aAAa,qDAAqD;AAClE,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,mBAAc;;;AAGD,gEAAO,EAAC;;;AAGvB;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,OAAO;AAClB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACO;AACP;AACA,aAAa,cAAc;AAC3B;AACA,iBAAiB,OAAO;AACxB,IAAI,MAAM,kBAAkB,aAAY;AACxC;AACA;AACA,aAAa,eAAO,kBAAkB,cAAc;AACpD;;;AAGA;AACA;AACA,WAAW,8BAA8B;AACzC,YAAY,QAAQ;AACpB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAO,kBAAkB,cAAc;AACpD;;;AAGA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA,oBAAoB,eAAO;AAC3B;AACA;AACA;;;AAGA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,sCAAsC;AACjD,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACO;AACP;AACA;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA,8BAA8B,MAAM;AACpC;AACA;AACA;AACA;AACA;;AAEA,mC;;ACtaA;AACA;AACA;AACuD;AACtB;AACG;AACmC;AAClC;AACgD;AACkB;AAClE;AACQ;AACA;AACT;AACyE;AACxE;AACkD;AACrC;AACgB;AAC1B;AACR;AAC4B;AACxB;;;AAGpC;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,qCAAqC;AACnD,cAAc,qCAAqC;AACnD,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,qCAAqC;AACnD,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,wBAAwB;AACtC,cAAc,kBAAkB;AAChC;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,qCAAqC;AACnD,cAAc,yCAAyC;AACvD,cAAc,uCAAuC;AACrD;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,yBAAyB;AACvC;AACA;AACA,cAAc,eAAe;AAC7B;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA,cAAc,wBAAwB;AACtC,+BAA+B,gCAAgC;AAC/D;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,qCAAqC;AACnD;AACA;AACA,yCAAyC,iBAAiB;AAC1D,cAAc,eAAe;AAC7B;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,cAAc,mCAAmC;AACjD;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,SAAS,eAAe,KAAK,qBAAqB;AAClD,cAAc,cAAc;AAC5B;AACA;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA,uCAAuC,2BAA2B;AAClE,cAAc,OAAO;AACrB;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,qCAAqC;AACnD;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA,cAAc,qCAAqC;AACnD;AACA,cAAc,OAAO;AACrB,cAAc,wBAAwB;AACtC,sCAAsC,gCAAgC;AACtE;AACA;AACA;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,qCAAqC;AACnD,cAAc,uCAAuC;AACrD,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;;;AAGA;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,SAAI;AACR;AACA;;AAEA,kBAAkB,gCAAM,GAAG;;AAE3B;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA,uBAAuB,gBAAgB;;AAEvC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,YAAY;AACzB;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA,eAAe,YAAY;AAC3B;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,YAAY;AAC7B,KAAK;AACL,iBAAiB,YAAY;AAC7B;;AAEA,8BAA8B;AAC9B,mBAAmB,YAAY,eAAe,KAAK;AACnD,oDAAoD,YAAY;AAChE;AACA;AACA;AACA,eAAe,YAAY;AAC3B;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,cAAc,YAAY;AAC1B;AACA;AACA,kBAAkB,gCAAM,GAAG;;AAE3B;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,WAAW,gCAAM,GAAG;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAuB,yBAAyB;AAChD;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,eAAe;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,oBAAoB;AACvC,+BAA+B,iBAAiB;;AAEhD,iCAAiC,UAAU;AAC3C;AACA;AACA;AACA;AACA,kCAAkC,QAAQ;AAC1C,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,MAAM;AAC1B;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB;AACA;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,uBAAuB,QAAQ;AAC/B;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,uBAAuB,QAAQ;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,QAAQ,yBAAyB,QAAQ;AAC1D,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,QAAQ;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,qCAAqC;AAClD,cAAc,+CAA+C;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,iBAAgB;AACtB,MAAM,cAAa;AACnB;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,qCAAqC;AAClD,cAAc,+CAA+C;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,yBAAyB;AACvC;AACA;AACA;AACA,gDAAgD,8BAAM;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+CAA+C;AAC5D,cAAc,+CAA+C;AAC7D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B,aAAa,QAAQ;AACrB,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,+CAA+C;AAC7D;AACA;AACA;AACA;AACA;AACA,iBAAiB,+CAA+C,cAAc,YAAY;AAC1F;AACA;;AAEA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;;AAEA;AACA,aAAa,eAAe;AAC5B,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,0BAA0B;AACvC;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA,4BAA4B,sCAAsC;AAClE,IAAI,MAAM,YAAY;AACtB,gCAAgC,QAAQ;AACxC,IAAI,MAAM,8BAA8B;AACxC,8BAA8B,QAAQ;AACtC,IAAI,MAAM,4BAA4B;;AAEtC,WAAW,iBAAiB;AAC5B;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA,gDAAgD,cAAc;AAC9D;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA,gDAAgD,cAAc;AAC9D;;AAEA;AACA;AACA,cAAc,uCAAuC;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB,cAAc,YAAY;AACjE;;AAEA;AACA;AACA;AACA,cAAc,wBAAwB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,6BAA6B;AAC1C,aAAa,0BAA0B;AACvC,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B,sBAAsB,SAAS;AAC/B;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,yBAAyB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA,sBAAsB,OAAO,cAAc,YAAY;AACvD;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,yBAAyB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,aAAa,OAAO;AACpB,cAAc,MAAM;AACpB;AACA;AACA,4BAA4B,qCAAqC;AACjE;AACA,gCAAgC,OAAO;AACvC;AACA;AACA;AACA,iBAAiB,MAAM;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,wEAAwE;AACrF;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,IAAI,MAAM,sDAAsD,EAAE;AAClE,UAAU;AACV;AACA,MAAM,MAAM,EAAE,cAAO;AACrB,YAAY;AACZ,iBAAiB,UAAiB;AAClC,KAAK,yCAAyC,YAAY;AAC1D;AACA,iBAAiB,UAAiB;AAClC,0CAA0C,gBAAS;AACnD,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,yBAAI;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,qCAAqC;AAClD,aAAa,yBAAyB;AACtC,aAAa,2BAA2B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB;AACA;;AAEA;AACA;;AAEA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,sCAAsC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+CAA+C;AAC5D;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;;AAEA;AACA,aAAa,SAAS;AACtB,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,4BAAU;;;AAGZ;AACA,WAAW,SAAS;AACpB,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA,GAAG;AACH;;;AAGA;AACA,WAAW,YAAY;AACvB,YAAY,qCAAqC;AACjD;AACO;AACP;AACA,WAAW,YAAY;AACvB,GAAG;AACH,WAAW,IAAU;AACrB;AACA;;;AAGA;AACA,WAAW,YAAY;AACvB,aAAa;AACb,mEAAmE;AACnE;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA,GAAG;AACH;AACA,qBAAqB,gBAAgB;AACrC;AACA;AACA;AACA,YAAY,eAAe,CAAC,UAAK;AACjC;AACA,eAAe,QAAQ,UAAU,SAAS;;AAE1C,sCAAsC,iBAAiB;AACvD;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,2BAA2B,iBAAiB;AAC5C;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA,WAAW,YAAY;AACvB,YAAY,uCAAuC;AACnD;AACO;AACP;AACA;AACA;AACA;AACA;AACA,aAAa,gBAAgB;AAC7B,KAAK;AACL,aAAa,uBAAY;AACzB,KAAK;AACL,aAAa,aAAa;AAC1B,KAAK;AACL,aAAa,uBAAY;AACzB;AACA,GAAG;AACH,WAAW,OAAO;AAClB;AACA;;;AAGA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB;AACO;AACP;AACA,SAAS,iBAAgB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEe,qDAAI,EAAC;;AAEpB,gC;;;;;AC3zCA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,oC;;ACjBA;AACA;AACA;AACoC;AACE;AACI;AACT;AACA;;;AAGjC;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,8BAA8B;AAC5C;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA;;;AAGA;AACA;AACA,uBAAuB;AACvB;AACA,mBAAmB,2BAA2B;AAC9C,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA,IAAI,cAAS;AACb;;AAEA;;AAEA;AACA,cAAc;AACd;AACA,qBAAqB,gCAAM,GAAG;AAC9B,eAAe,cAAa;AAC5B;AACA,eAAe,cAAa;AAC5B;AACA,eAAe,cAAa;AAC5B,eAAe,cAAa;AAC5B;AACA,eAAe,cAAa;AAC5B;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;;AAEA;AACA,cAAc,2BAA2B;AACzC;AACA;AACA,eAAe,2BAA2B;AAC1C,0CAA0C,EAAE;AAC5C;AACA;AACA,KAAK;AACL,oBAAoB,KAAK;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,qCAAqC;AAClD;AACA,cAAc,oCAAoC;AAClD;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA;AACA,aAAa,mCAAmC;AAChD;AACA,cAAc,kCAAkC;AAChD;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA,iBAAiB,qCAAqC;AACtD;AACA,cAAc,wCAAwC;AACtD;AACA;AACA;AACA;AACA;AACA,iBAAiB,wCAAwC,cAAc,cAAa;AACpF;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA,sBAAsB,OAAO,cAAc,cAAa;AACxD;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA,sBAAsB,OAAO,cAAc,cAAa;AACxD;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA,sBAAsB,OAAO,cAAc,cAAa;AACxD;;AAEA;AACA;AACA,cAAc,qCAAqC;AACnD;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA,sBAAsB,QAAQ,cAAc,cAAa;AACzD;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA,sBAAsB,OAAO,cAAc,cAAa;AACxD;;AAEA;AACA;AACA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA,aAAa,cAAa;AAC1B;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,aAAa,cAAa;AAC1B;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,aAAa,cAAa;AAC1B;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,aAAa,cAAa;AAC1B;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,aAAa,cAAa;AAC1B;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,aAAa,cAAa;AAC1B;;AAEA;AACA,CAAC,CAAC,4BAAU;;;AAGG,uDAAS,EAAC;;AAEzB,gC;;AC1QA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;AACe;AACf;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,iC;;ACfA;AACA;AACA;AACkC;AACQ;AACkB;AACZ;AACI;AACf;AACc;AACJ;AACF;AACX;AACM;AACK;;;AAG7C;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,8BAA8B;AAC5C;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA,cAAc,mGAAmG;AACjH;;;AAGA;AACA,UAAU;AACV;AACA;AACA,IAAI,cAAQ;AACZ;AACA;;;AAGA;AACA;AACA,MAAM,sCAAsC;AAC5C;AACA;AACA;AACA;AACA;AACA,IAAI,gBAAU;AACd;;AAEA;AACA,iCAAiC,QAAQ,KAAK,gCAAM,GAAG;AACvD;;AAEA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA,IAAI,mCAAM;AACV,MAAM,+CAAkB,CAAC,cAAQ;AACjC;;AAEA;AACA;AACA,qBAAqB,aAAU,kBAAkB,aAAa;AAC9D,OAAO;AACP,QAAQ,MAAM,mBAAmB,EAAE;AACnC,cAAc;AACd;AACA,KAAK;AACL,mBAAmB,aAAU,aAAa,aAAa;AACvD;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qCAAqC,kCAAa;AAClD;;AAEA;AACA;AACA,MAAM,mCAAM,SAAS,mBAAmB;AACxC,MAAM,mCAAM,SAAS,mBAAmB;AACxC;;AAEA;AACA,qCAAqC,kCAAa;AAClD;AACA,IAAI,+BAAK;;AAET;AACA,4CAA4C,QAAQ;AACpD;AACA,yBAAyB,8BAAM;AAC/B,QAAQ,mCAAM,QAAQ,kCAAe;AACrC,QAAQ,mCAAM,QAAQ,4BAAS;AAC/B;AACA;;AAEA;AACA;;AAEA;AACA,aAAa,2CAA2C;AACxD;AACA;AACA;AACA,2BAA2B,4BAA4B;AACvD,uBAAuB,8BAAM;AAC7B,MAAM,mCAAM,QAAQ,kCAAe;AACnC,MAAM,mCAAM,QAAQ,4BAAS;AAC7B;AACA;AACA;;AAEA;AACA,aAAa,2CAA2C;AACxD;AACA;AACA;AACA,2BAA2B,4BAA4B;AACvD,cAAc,8BAAM;AACpB,oCAAoC,kCAAa;AACjD;AACA;AACA;;AAEA;AACA,kBAAkB,sCAAsC,KAAK;AAC7D;AACA,cAAc,iEAAiE;AAC/E,QAAQ,kCAAkC;AAC1C;AACA;AACA;AACA;AACA;AACA,iBAAiB,iEAAiE,cAAc,cAAQ;AACxG;AACA;;AAEA;AACA,cAAc,sCAAsC,KAAK;AACzD;AACA,aAAa,iEAAiE;AAC9E,QAAQ,kCAAkC;AAC1C;AACA;AACA;AACA;AACA,aAAa,cAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,eAAe;AAC7C,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,KAAW;AACtB;;AAEA;AACA,CAAC,CAAC,IAAS;;;AAGI,0DAAU,EAAC;;AAE1B,iC;;ACnPA;AACA;AACA;;;AAGA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;;;AAGA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB,YAAY,KAAK;AACjB;AACO,SAAS,WAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,KAAK;AAChB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB,YAAY,KAAK;AACjB;AACO,SAAS,UAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,MAAM;AACjB,YAAY,KAAK;AACjB;AACA;AACO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA,KAAK;AACL,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;;AAEA,gC;;AC9EA;AACA;AACA;AACiC;AACQ;AACkB;AACR;AACc;AACN;AACtB;AACQ;AACF;AACS;AACO;AACR;AACZ;AACV;AACQ;AACD;AACA;AACwB;AACV;AACJ;AAC0D;AACpE;AACe;AACT;AACR;AACc;AACkC;;;AAGlF;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,0BAA0B;AACxC,cAAc,QAAQ;AACtB,cAAc,mCAAmC;AACjD,cAAc,kCAAkC;AAChD,cAAc,qCAAqC;AACnD,cAAc,OAAO;AACrB,cAAc,iDAAiD;AAC/D,cAAc,wCAAwC;AACtD,cAAc,mCAAmC;AACjD,cAAc,0BAA0B;AACxC,cAAc,yBAAyB;AACvC,cAAc,yBAAyB;AACvC,cAAc,UAAU;AACxB,cAAc,iEAAiE;AAC/E,cAAc,cAAc;AAC5B,cAAc,yCAAyC;AACvD;;;AAGA;AACA,aAAa,6CAA6C;AAC1D;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,gEAAgE;AAC9E;AACA,IAAI,4CAA4C;AAChD;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,mDAAmD;AACjE,cAAc,2DAA2D;AACzE,cAAc,qBAAqB;AACnC,cAAc,2CAA2C;AACzD,cAAc,kBAAkB;AAChC;;;AAGA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,iGAAiG;AAC/G;AACA,IAAI,iCAAiC;AACrC,cAAc,OAAO;AACrB;AACA,cAAc,iHAAiH;AAC/H;AACA,IAAI,qCAAqC;AACzC,cAAc,4BAA4B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kGAAkG;AAChH;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA,cAAc,iFAAiF;AAC/F;AACA,cAAc,mBAAmB;AACjC;AACA,UAAU,kCAAkC;AAC5C;AACA,cAAc,KAAK;AACnB;AACA,IAAI,gCAAgC;AACpC;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,yBAAY;AAChB;;AAEA;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,2BAA2B,kBAAkB;;AAE7C;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,cAAc;AACd;AACA,uCAAuC,MAAe;;AAEtD;AACA;AACA,cAAc;AACd;AACA,uCAAuC,MAAe;;AAEtD;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,gDAAgD,KAAK;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,MAAM,4BAAS;AACf,MAAM,4BAAS;AACf,MAAM,4BAAS;AACf,MAAM,4BAAS;AACf,MAAM,4BAAS;AACf,MAAM,mBAAmB;AACzB,MAAM,4BAAS;AACf,MAAM,4BAAS;AACf;AACA,8CAA8C,QAAQ;AACtD,MAAM,mCAAM,oDAAoD,gCAAe;AAC/E;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,uCAAuC,yBAAsB;AAC7D,oBAAoB,mBAAmB;AACvC,MAAM,mCAAM,+BAA+B,mBAAmB;AAC9D;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA,IAAI,mCAAM,iBAAiB,4BAAS;AACpC,IAAI,mCAAM,iBAAiB,4BAAS;AACpC,IAAI,mCAAM,iBAAiB,4BAAS;;AAEpC;AACA,cAAc;AACd;AACA;AACA,oDAAoD,aAAU;;AAE9D;AACA,cAAc;AACd;AACA;AACA,4DAA4D,aAAU;;AAEtE;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,0BAA0B,YAAS;AACnC;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA,IAAI,mCAAM;AACV,YAAY,+CAAkB,CAAC,WAAW;AAC1C;AACA,IAAI,mCAAM,OAAO,+CAAkB,CAAC,WAAW;AAC/C;AACA,IAAI,mCAAM,OAAO,+CAAkB,CAAC,WAAW;AAC/C;AACA,IAAI,mCAAM,OAAO,+CAAkB,CAAC,WAAW;AAC/C;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,uCAAuC;AACxD,gBAAgB;AAChB;AACA;AACA;AACA,OAAO;;AAEP,IAAI,mCAAM,gBAAgB,mBAAmB;AAC7C;AACA,iBAAiB,0CAA0C;AAC3D;AACA;AACA;AACA,OAAO;;AAEP,IAAI,mCAAM,gBAAgB,mBAAmB;AAC7C;AACA,iBAAiB,0CAA0C;AAC3D;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,iBAAiB,+CAA+C;AAChE,gBAAgB;AAChB;AACA;AACA;AACA,OAAO;;AAEP,IAAI,mCAAM,oBAAoB,mBAAmB;AACjD;AACA,iBAAiB,0CAA0C;AAC3D;AACA;AACA;AACA,OAAO;;AAEP,IAAI,mCAAM,oBAAoB,mBAAmB;AACjD;AACA,iBAAiB,0CAA0C;AAC3D;AACA;AACA;AACA,OAAO;;AAEP;;AAEA,IAAI,mCAAM,iBAAiB,mBAAmB;AAC9C;AACA,iBAAiB,0CAA0C;AAC3D;AACA;AACA,4CAA4C,+BAA+B;AAC3E,OAAO;;AAEP,IAAI,mCAAM,iBAAiB,mBAAmB;AAC9C;AACA,iBAAiB,0CAA0C;AAC3D;AACA;AACA,iCAAiC,+BAA+B;AAChE;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,oCAAoC;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+CAA+C;AAC5D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,sCAAsC;AAC5C,aAAa,kCAAkC;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qCAAQ,iBAAiB,4BAAS;AACtC,IAAI,qCAAQ,iBAAiB,4BAAS;AACtC,IAAI,qCAAQ,iBAAiB,4BAAS;AACtC;AACA,0BAA0B,4BAAS;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,2BAA2B;AACxC,aAAa;AACb,gDAAgD;AAChD;AACA,UAAU,gCAAgC;AAC1C,UAAU,8CAA8C;AACxD,cAAc,kCAAkC;AAChD;AACA;AACA,aAAa,gBAAgB;AAC7B,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,eAAe,OAAO;AACvC;AACA;AACA;AACA,gCAAgC,yBAAI;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,2BAA2B;AACxC,aAAa,gBAAgB;AAC7B,cAAc,0CAA0C;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,2BAA2B;AACxC,aAAa,yFAAyF;AACtG;AACA,UAAU,kCAAkC;AAC5C;AACA;AACA;AACA,aAAa,gBAAgB;AAC7B,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,eAAe,OAAO;AAClE;AACA;AACA,6CAA6C,yBAAI;AACjD;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,2BAA2B;AACxC,aAAa,gBAAgB;AAC7B,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,eAAe,OAAO;AACvC,wFAAwF,yBAAI;AAC5F;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,MAAM;AACnB,cAAc,qCAAqC;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B,cAAc,2BAA2B;AACzC;AACA;AACA;AACA;AACA;AACA,iBAAiB,WAAW;AAC5B,iBAAiB,WAAW;;AAE5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mDAAmD;AACnD,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B,cAAc,WAAW;AAC5E;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,2BAA2B;AACxC,cAAc,qCAAqC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,aAAa,KAAc;AAC3B;AACA;;AAEA;AACA;AACA;AACA,cAAc,mDAAmD;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,2CAA2C;AACzD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B,cAAc,+BAA+B;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,2DAA2D;AACzE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,WAAW;AACzB;AACA;AACA;AACA;AACA;AACA,iBAAiB,WAAW,cAAc,WAAW;AACrD;AACA;;AAEA;AACA;AACA,cAAc,+CAA+C;AAC7D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,qCAAqC;AAClD,cAAc,2BAA2B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,aAAa,KAAc;AAC3B;AACA;;AAEA;AACA;AACA,cAAc,oCAAoC;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,mCAAmC;AACjD;AACA;AACA;AACA;AACA;AACA,iBAAiB,mCAAmC,cAAc,WAAW;AAC7E;AACA;;AAEA;AACA;AACA;AACA,cAAc,KAAK;AACnB;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK,cAAc,WAAW;AAC/C;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD;AACxD;AACA,cAAc,aAAa;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB,gDAAgD;AACxE,cAAc,aAAa;AAC3B;AACA;AACA;AACA;;AAEA;AACA,aAAa,4BAA4B;AACzC,aAAa,OAAO;AACpB,aAAa,qCAAqC;AAClD,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,IAAI;AACjB;AACA;AACA,aAAa,IAAI;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,MAAM;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA,8BAA8B,kBAAe;AAC7C;AACA;;AAEA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA,uCAAuC,gBAAe;AACtD;AACA,yCAAyC,gBAAe;AACxD;;AAEA;AACA,oDAAoD,QAAQ;AAC5D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,uDAAuD,QAAQ;AAC/D,QAAQ,0CAAa;AACrB;AACA;AACA;;AAEA;AACA;AACA,MAAM,iCAAU;AAChB;AACA,4BAA4B,4BAAS;AACrC;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,QAAQ,mCAAM,sBAAsB,4BAAS;AAC7C,QAAQ,mCAAM,sBAAsB,4BAAS;AAC7C;;AAEA;AACA;AACA,gCAAgC,4BAAS;AACzC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM,0CAAa;AACnB;AACA;AACA;AACA,MAAM,0CAAa;AACnB;AACA;AACA;AACA;AACA,+CAA+C,8BAAM;AACrD,sCAAsC,mCAAM;AAC5C,cAAc,kCAAe;AAC7B;AACA,oCAAoC,mCAAM;AAC1C,cAAc,4BAAS;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mDAAmD,kCAAa;AAChE;AACA;AACA;AACA;AACA;AACA,QAAQ,mCAAM;AACd,sBAAsB,kCAAe;AACrC;AACA,QAAQ,mCAAM;AACd,sBAAsB,4BAAS;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,uCAAuC;AACpD,cAAc,iDAAiD;AAC/D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+CAA+C;AAC5D,cAAc,yDAAyD;AACvE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,kCAAkC;AAC/C,cAAc,4CAA4C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+BAA+B;AAC5C,cAAc,yCAAyC;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,WAAW;AAC5B;AACA,eAAe,YAAY;AAC3B;AACA,8BAA8B,OAAO;AACrC;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D,oBAAoB,8BAAM;AAC1B;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,0BAA0B,iBAAiB;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB,cAAO;AAC7B,qBAAqB,aAAM;AAC3B;AACA;AACA,gBAAgB,WAAQ,CAAC,+BAAY;AACrC,iCAAiC,mBAAmB;AACpD;AACA;;AAEA;AACA,gCAAgC,QAAQ;AACxC,gCAAgC,QAAQ;AACxC,WAAW,aAAM;;AAEjB;AACA,+BAA+B,WAAQ,CAAC,+BAAY;AACpD,QAAQ,YAAK;AACb;AACA;;AAEA,2BAA2B,WAAQ,CAAC,+BAAY;;AAEhD;;AAEA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB;;AAEA;AACA;AACA,aAAa,mCAAmC;AAChD;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB;;AAEA;AACA;AACA,aAAa,6BAA6B;AAC1C;AACA;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB;;AAEA;AACA;AACA,aAAa,KAAK;AAClB;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB;;AAEA;AACA,aAAa,+BAA+B;AAC5C;AACA;AACA,6BAA6B,8BAAM;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,+BAA+B;AAC5C;AACA;AACA,oCAAoC,8BAAM;AAC1C;AACA;;AAEA;AACA,CAAC,CAAC,4BAAU;;;AAGZ;AACA,WAAW,WAAW;AACtB,YAAY,mBAAmB;AAC/B;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;;AAEA,uDAAuD,EAAE;AACzD,eAAe,WAAW,2BAA2B,KAAU,EAAE,mBAAmB,WAAW,qBAAqB;AACpH,SAAS,WAAW;;AAEpB,SAAS,WAAW;;AAEpB,SAAS,WAAW;AACpB,uBAAuB,OAAI;;AAE3B;AACA;AACA;AACA,qBAAqB,aAAU;AAC/B,KAAK;AACL,MAAM,MAAM,mBAAmB,EAAE;AACjC,YAAY;AACZ,4BAA4B,WAAW;AACvC;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,aAAU;AACnC,KAAK;AACL,MAAM,MAAM,mBAAmB,EAAE;AACjC,YAAY;AACZ,gCAAgC,WAAW;AAC3C;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,aAAU;AAC/B,KAAK;AACL,MAAM,MAAM,mBAAmB,EAAE;AACjC,YAAY;AACZ;AACA;AACA,GAAG;AACH,mBAAmB,aAAU;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACe,6EAAY,EAAC;;AAE5B;AACA,YAAY,yCAAyC;AACrD,YAAY,QAAQ;AACpB;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA,0BAA0B,EAAE;AAC5B,mCAAmC,WAAW;AAC9C,KAAK;AACL,8BAA8B,mCAAmC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wC;;;;;ACr6CA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,eAAe;AAC3B;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED,+B;;ACtFA;AACA;AACA;AACmD;AACJ;AACb;AACc;AACd;AACQ;AACT;AACoB;AACR;;;AAG7C;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,8BAA8B;AAC5C;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA,cAAc,sCAAsC;AACpD,qCAAqC,8DAA8D;AACnG;AACA,cAAc,qCAAqC;AACnD;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,4BAA4B;AAC1C,cAAc,OAAO;AACrB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,8BAA8B;AAC5C,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;;AAEA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,2CAA2C,6BAA6B;AACxE,SAAS,0CAA0C;AACnD;AACA,IAAI,yCAAyC;AAC7C;AACA;AACA;AACA;AACA;AACA,IAAI,WAAK;AACT;;AAEA,sBAAsB,gCAAM,GAAG;AAC/B;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;;AAEA,IAAI,mCAAM;AACV,MAAM,+CAAkB,CAAC,cAAa;AACtC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,sCAAsC;AACpD;AACA;AACA;AACA;AACA,0BAA0B,cAAa;AACvC;AACA,iBAAiB,sCAAsC;AACvD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qBAAqB,KAAW;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM,0CAAa;AACnB;AACA;AACA;AACA;AACA,8BAA8B,mCAAM;AACpC,QAAQ,4BAAS;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,wCAAwC;AAC9C;AACA;AACA;AACA;AACA,MAAM,6BAA6B;AACnC,aAAa,qCAAqC;AAClD;AACA;AACA;AACA;AACA,MAAM,0CAAa;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,0CAAa;AACnB;AACA;AACA;AACA,+BAA+B,mCAAM,MAAM,gBAAe;AAC1D,qCAAqC,qCAAqC;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,8BAAM;AACjD,OAAO;AACP,2BAA2B,mCAAM,OAAO,4BAAS;AACjD;AACA;AACA;;AAEA;AACA;AACA,aAAa,sCAAsC;AACnD;AACA;AACA;AACA;AACA,aAAa,cAAa;AAC1B;;AAEA;AACA,CAAC,CAAC,IAAS;;;AAGX;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;;;AAGe,2DAAK,EAAC;;AAErB,iC;;AC/OA;AACA;AACA;AACmC;AACA;AAC0C;AACvB;AAClB;AACW;AACO;;;AAGtD;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,mBAAmB;AACjC;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;AACA,cAAc,mBAAmB;AACjC;AACA;AACA,cAAc,2CAA2C;AACzD;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uBAAW;AACf;;AAEA;;AAEA;AACA;AACA,gCAAgC,kBAAM;AACtC;AACA,KAAK;;AAEL;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,KAAK;AACL;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI,mCAAM,SAAS,4BAAS;;AAE5B,uCAAuC,kBAAkB,SAAS,aAAa;AAC/E,sDAAsD,eAAe;AACrE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,wCAAwC;AACrD,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,iDAAiD,QAAQ;AACzD;AACA,WAAW,mBAAmB;AAC9B;AACA;;AAEA,8BAA8B,oCAAoC;AAClE;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,yCAAyC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,QAAQ,MAAM;AACd;AACA;;AAEA,IAAI,qCAAc;;AAElB;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA,MAAM,kCAAW;AACjB,KAAK;AACL,MAAM,kCAAW;AACjB;AACA;AACA;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,0BAAO;;;AAGT;AACA;AACA,WAAW,iCAAiC;AAC5C,UAAU;AACV;AACA;AACO,SAAS,kBAAM;AACtB;AACA;;;AAGe,+EAAW,EAAC;;AAE3B,uC;;ACpVA;AACA;AACA;AACmC;AACuC;AACrC;AACD;AACW;;;AAG/C;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,mBAAmB;AACjC;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,2CAA2C;AACzD;AACA,cAAc,WAAW;AACzB;AACA,cAAc,mBAAmB;AACjC;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,aAAM;AACV;;AAEA;;AAEA;AACA;AACA,gCAAgC,aAAM;AACtC;AACA,KAAK;;AAEL;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,IAAI,mCAAM,SAAS,4BAAS;;AAE5B,uCAAuC,kBAAkB,SAAS,aAAa;AAC/E;AACA;AACA;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,iCAAiC,YAAY;AAC7C;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,0BAAO;;;AAGT;AACA;AACA,WAAW,iCAAiC;AAC5C,UAAU;AACV;AACA;AACO,SAAS,aAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,YAAY;AACjE;AACA,mCAAmC,YAAY;AAC/C,OAAO;AACP,sCAAsC,YAAY;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEe,gEAAM,EAAC;;AAEtB,kC;;ACtLA;AACA;AACA;AACoC;AACW;AACZ;AACyB;AACvB;;;AAGrC;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,mBAAmB;AACjC;AACA,cAAc,mBAAmB;AACjC;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,mBAAmB;AACjC;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,SAAI;AACR;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI,mCAAM,YAAY,4BAAS;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI,mCAAM,aAAa,4BAAS;;AAEhC,uCAAuC,kBAAkB,SAAS,aAAa;AAC/E;AACA;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,0BAAO;;;AAGM,0DAAI,EAAC;;AAEpB,gC;;AC5IA;AACA;AACA;AAC0C;AACC;AACV;AACJ;;;AAG7B;AACA,aAAa,OAAO;AACpB,cAAc,QAAQ;AACtB,IAAI,gDAAgD;AACpD,cAAc,mCAAmC;AACjD,gBAAgB,gDAAgD;AAChE,cAAc,QAAQ;AACtB,IAAI,sCAAsC;AAC1C,cAAc,8BAA8B;AAC5C,QAAQ,sCAAsC;AAC9C,cAAc,QAAQ,iBAAiB,kCAAkC;AACzE,cAAc,4BAA4B;AAC1C,IAAI,kCAAkC;AACtC;AACA;;;AAGA;AACA;AACA;AACA;AACA,MAAM;AACN,MAAM;AACN,MAAM;AACN;AACA,WAAW,iBAAiB;AAC5B;AACA,YAAY;AACZ;AACA;AACA;AACA;AACO;;AAEP;;AAEA,qBAAqB,aAAU;;AAE/B;AACA;AACA,sBAAsB,YAAI;AAC1B;;AAEA;AACA;AACA,sBAAsB,cAAM;AAC5B;;AAEA;AACA;AACA;AACA,sBAAsB,mBAAW;AACjC;;AAEA;AACA;;AAEA,gC;;AClEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEe,sDAAO,EAAC;;AAEvB,mC;;ACxHA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA,CAAC,EAAC;;AAEF,oC;;ACXA;AACA;AACA;AACsC;AACO;AACG;AACf;;;AAGjC;AACA;AACA,aAAa,OAAO;AACpB,cAAc,0DAA0D;AACxE;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA,iBAAiB,sDAAsD;AACvE,6BAA6B,kCAAkC;AAC/D;AACA;AACA;AACA;AACA;AACA,IAAI,uBAAW;AACf;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA,sBAAsB,QAAQ,cAAc,oBAAmB;AAC/D;;AAEA;AACA;AACA,cAAc,qCAAqC;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,kDAAkD;AACpE,aAAa,wCAAwC;AACrD,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,aAAa,oBAAmB;AAChC;;AAEA;AACA;AACA;AACA;AACA,aAAa,qCAAqC;AAClD;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,4BAAU;;;AAGZ;AACA,WAAW,6BAA6B;AACxC,WAAW,sCAAsC;AACjD,WAAW,QAAQ;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;;AAGA;AACA,WAAW,6BAA6B;AACxC,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,QAAQ;AACnB;AACO,SAAS,kBAAM;AACtB;AACA;AACA;;;AAGA;AACA,WAAW,6BAA6B;AACxC,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,QAAQ;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;;AAGA;AACA,WAAW,6BAA6B;AACxC,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,QAAQ;AACnB,WAAW,QAAQ,iCAAiC;AACpD;AACA,sCAAsC;AACtC;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACO,SAAS,gBAAI;AACpB;AACA;AACA;;;AAGA;AACA,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,uCAAuC;AAClD,WAAW,QAAQ;AACnB;AACO;AACP;AACA;;AAEA;AACA;AACA,iBAAiB,KAAK;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA,WAAW,6BAA6B;AACxC,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,QAAQ;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEe,mFAAW,EAAC;;AAE3B,uC;;AC9PA;AACA;AACA;AAC4D;AACF;;;AAG1D;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2BAAW;AAC9B,KAAK;;AAEL;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,uBAAW;;;AAGb;AACA,gBAAgB,kDAAkD;AAClE;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB,UAAU;AACV;AACA,SAAS,2BAAW;AACpB;AACA,8BAA8B,mBAAmB;AACjD,kCAAkC,WAAW;AAC7C;AACA;AACA;AACA;AACA,IAAI,WAAW;AACf;AACA;AACA;AACA;AACA;;AAEe,+EAAe,EAAC;;AAE/B,2C;;ACzEA;AACA;AACA;AAC4D;AACvB;AACO;AACN;;;AAGtC;AACA,6BAA6B,gCAAgC;AAC7D,KAAK,QAAQ;AACb;AACA,aAAa,oEAAoE;AACjF;;;AAGA;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,iCAAiC,oCAAoC;AACrE;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,iCAAiC,oCAAoC;AACrE;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO,IAAI,eAAK;AAChB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO,aAAa,yBAAI;;;AAGxB;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,iCAAiC,mBAAmB;AACpD;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACO;AACP,iCAAiC,WAAW;AAC5C;AACA,QAAQ,MAAM,IAAI,GAAG;AACrB;;;AAGA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO,YAAY,0BAAK;;;AAGxB;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO,IAAI,qBAAW;AACtB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,iCAAiC,mBAAmB;AACpD;;;AAGA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,iCAAiC,mBAAmB;AACpD;;;AAGA;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,iCAAiC,oCAAoC;AACrE;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,iCAAiC,oCAAoC;AACrE;AACA,KAAK,GAAG;AACR;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,iCAAiC,oCAAoC;AACrE;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,gCAAgC,4CAA4C;AAC5E,EAAE,MAAM,iCAAiC;AACzC;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,gCAAgC,4CAA4C;AAC5E,EAAE,MAAM,iCAAiC;AACzC;AACA;;AAEA,qC;;ACxPA;AACA;AACA;AAC4D;AACjB;AACP;;;AAGpC;AACA,aAAa,OAAO;AACpB,cAAc,iEAAiE;AAC/E;AACA;AACA,cAAc,yDAAyD;AACvE;AACA;AACA,cAAc,0DAA0D;AACxE;AACA;AACA;AACA;AACA,cAAc,yDAAyD;AACvE;AACA;AACA;AACA,cAAc,iEAAiE;AAC/E;AACA;AACA,cAAc,0BAA0B;AACxC;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,0BAAkB;AACtB;;AAEA;;AAEA,gCAAgC,8CAA8C;;AAE9E;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+CAA+C;AAC5D,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+CAA+C;AAC5D;AACA;AACA;;AAEA;AACA,kBAAkB,kDAAkD;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,+CAA+C;AACpE;AACA;;AAEA;AACA;AACA;AACA,kCAAkC,mBAAmB;AACrD;AACA,OAAO,kCAAkC,mBAAmB;AAC5D;AACA;AACA;AACA,KAAK;AACL,kCAAkC,mBAAmB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,kCAAkC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+CAA+C;AAC5D;AACA;AACA;;AAEA;AACA;AACA,aAAa,+CAA+C;AAC5D,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA,aAAa,+CAA+C;AAC5D;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAkC,mBAAmB;AACrD;AACA,OAAO;AACP,UAAU,mBAAmB;AAC7B;AACA,OAAO;AACP;AACA;AACA;AACA,4BAA4B,mCAAS;AACrC;AACA;;AAEA;AACA,CAAC,CAAC,uBAAW;;;AAGb;AACA,WAAW,oDAAoD;AAC/D,YAAY,4BAA4B;AACxC;AACO,SAAS,gBAAQ;AACxB;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,+CAA+C;AAC1D,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,kBAAkB,mBAAmB;AACrC,aAAa,mBAAmB;AAChC,aAAa,mBAAmB;AAChC;;;AAGe,sEAAkB,EAAC;;AAElC,mC;;ACzOA;AACA;AACA;AACsC;AACsE;AACvE;AACiB;AAChB;AAC4C;;;AAGlF;AACA,aAAa,OAAO;AACpB,cAAc,2CAA2C,uCAAuC,gDAAgD;AAChJ;AACA,eAAe,gDAAgD;AAC/D,cAAc,gCAAgC;AAC9C;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAO;AACX;;AAEA;AACA,gBAAgB,0BAAK;AACrB,KAAK;;AAEL;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,8DAA8D,cAAc;;AAE5E;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA,mBAAmB,gBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,gBAAe;AACvB,QAAQ,iBAAgB;AACxB,QAAQ,cAAa;AACrB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,uCAAuC;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB,SAAS;AACT;AACA;AACA;AACA,qBAAqB,QAAQ;AAC7B;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,CAAC,CAAC,OAAkB;;AAEL,uEAAO,EAAC;;AAEvB,mC;;AC/KA;AACA;AACA;AACiD;AACX;AACgD;AAChD;AAC4B;AACpB;;;AAG9C;AACA,aAAa,OAAO;AACpB,cAAc,2CAA2C;AACzD,IAAI,gDAAgD;AACpD;AACA,eAAe,kDAAkD;AACjE,cAAc,OAAO;AACrB;;;AAGA;AACA;AACA;AACA,8BAA8B,iCAAiC;AAC/D;AACA;AACA;AACA;AACA;AACA,IAAI,qBAAU;AACd;;AAEA;;AAEA;AACA,gBAAgB,0BAAK;AACrB,KAAK;;AAEL;AACA;AACA,cAAc;AACd;AACA,8DAA8D,gBAAgB;;AAE9E;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,SAAS;AAClB;AACA;;AAEA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,wBAAwB;AAC9B;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,SAAS,SAAS;AAClB;AACA;;AAEA;AACA;AACA,iBAAiB,QAAQ;AACzB;AACA,IAAI,kBAAM;AACV;AACA;;;AAGA;AACA;AACA;AACA;AACA,SAAS,SAAS;AAClB;AACA;;AAEA,QAAQ,iBAAiB;AACzB;AACA,4BAA4B,QAAQ;AACpC;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,CAAC,CAAC,OAAkB;;AAEL,gFAAU,EAAC;;AAE1B,sC;;;;;ACjIA;AACA;AACA;;AAE0C;AACD;;AAEzC,IAAI,aAAS;AACb;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,qCAAqC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,4BAA4B;AACzC,aAAa,4BAA4B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,YAAO;AAClC,KAAK;AACL;AACA;AACA;;AAEA;AACA,cAAc,qCAAqC;AACnD;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,gCAAU;;;AAGG,qDAAS,EAAC;;AAEzB,+B;;ACnIA;AACA;AACA;AACA;AACuC;AACqC;AACvC;AACS;AACL;;;AAGzC;AACA,4BAA4B,gCAAgC;AAC5D,IAAI,4BAA4B,kBAAkB,QAAQ;AAC1D;AACA,aAAa,6HAA6H;AAC1I;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,2CAA2C,uCAAuC,gDAAgD;AAChJ;AACA,eAAe,iCAAiC;AAChD,cAAc,OAAO;AACrB;AACA,cAAc,aAAa,4CAA4C,gDAAgD;AACvH,IAAI,4BAA4B;AAChC;AACA,cAAc,gEAAgE;AAC9E;AACA;;;AAGA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,sBAAsB,4CAA4C;AAClE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,wBAAK;;;AAGP;AACA;AACA;AACA,8BAA8B,iCAAiC;AAC/D;AACA;AACA,SAAS,8CAA8C;AACvD,IAAI,8CAA8C;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAO;AACX;;AAEA;;AAEA;;AAEA;AACA,aAAa;AACb;AACA;AACA,oBAAoB,GAAS;;AAE7B;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,2DAA2D,yBAAI;;AAE/D;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA,8DAA8D,MAAM;;AAEpE;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,wCAAwC;AACrD;AACA,aAAa,4BAA4B;AACzC,aAAa,4BAA4B;AACzC,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,qCAAqC;AAClD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,SAAS;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,SAAS;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,SAAS;AAClB;AACA;;AAEA,QAAQ,iBAAiB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,CAAC,CAAC,OAAkB;;;AAGL,uEAAO,EAAC;;AAEvB,mC;;ACnPA;AACA;AACA;AACqC;AACe;AAC+D;AAChF;;;AAGnC;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA,cAAc,2CAA2C;AACzD,aAAa,gDAAgD;AAC7D;AACA,eAAe,8CAA8C;AAC7D,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB;;;AAGA;AACA;AACA;AACA,8BAA8B,iCAAiC;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iBAAQ;AACZ;AACA;;AAEA,4DAA4D,YAAY;;AAExE;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,mBAAO;;;AAGT;AACA,UAAU;AACV;AACA;AACA;AACA,wBAAwB,8BAA8B;AACtD,wBAAwB,2BAA2B;AACnD;;AAEA;AACA;AACA,yBAAyB,6BAA6B;AACtD,iCAAiC,aAAa;AAC9C,iCAAiC,WAAW;AAC5C;;AAEA,IAAI,eAAe;AACnB;AACA;;AAEA;AACA;;AAEA,eAAe,gBAAS;AACxB;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,GAAG;AACH;;;AAGe,0EAAQ,EAAC;;AAExB,oC;;ACtGA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;AACe;AACf;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,mC;;ACfA;AACA;AACA;AAC4D;AACb;AACJ;AAC8B;AACvB;;;AAGlD;AACA,aAAa,OAAO;AACpB,cAAc,2CAA2C;AACzD,aAAa,gDAAgD;AAC7D;AACA,IAAI,gDAAgD;AACpD,IAAI,mDAAmD;AACvD,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,wBAAwB;AAC5B;AACA;AACA,aAAa,sDAAsD;AACnE;AACA;AACA,IAAI,uBAAW;AACf;;AAEA;AACA,mBAAmB,uBAAW;AAC9B,KAAK;;AAEL;;AAEA;AACA;AACA,eAAe,wCAAwC;AACvD,gBAAgB,QAAQ;AACxB;AACA;AACA,aAAa,cAAc;AAC3B,QAAQ,iBAAiB;AACzB;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,uBAAW;;;AAGb;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB,UAAU;AACV;AACA,SAAS,uBAAW;AACpB;AACA,8BAA8B,4BAAS;AACvC,8BAA8B,cAAc;AAC5C;AACA;AACA,oBAAoB,OAAO;AAC3B,mBAAmB,OAAO;AAC1B,mBAAmB,OAAO;AAC1B,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA,OAAO,qBAAqB,OAAO;AACnC;AACA,OAAO,qBAAqB,OAAO;AACnC;AACA,OAAO;AACP;AACA;AACA;AACA,MAAM,iBAAgB;AACtB,MAAM,GAAG;AACT;AACA;AACA;AACA;AACA;AACA;;AAEe,mFAAW,EAAC;;AAE3B,uC;;AChIA;AACA;AACA;AAC+C;AACU;AACC;;;AAG1D;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,2CAA2C;AACzD,aAAa,gDAAgD;AAC7D;AACA,IAAI,mDAAmD;AACvD,cAAc,OAAO;AACrB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,wBAAwB;AAC5B;AACA;AACA,aAAa,oDAAoD;AACjE;AACA;AACA,IAAI,yBAAY;AAChB;;AAEA;AACA,mBAAmB,wBAAW;AAC9B,KAAK;;AAEL;;AAEA;AACA;AACA,cAAc;AACd;AACA,8DAA8D,iBAAiB;;AAE/E;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,uBAAW;;;AAGb;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB,UAAU;AACV;AACA,SAAS,wBAAW;AACpB;AACA,8BAA8B,4BAAS;AACvC,8BAA8B,4BAAS;AACvC,8BAA8B,cAAc;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,WAAW;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEe,sFAAY,EAAC;;AAE5B,wC;;AClGA;AACA;AACA;AACsC;AACQ;AACT;AACU;AACe;AACJ;AACzB;;;AAGjC;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA,UAAU;AACV;AACO;AACP;AACA;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,2CAA2C;AACzD,aAAa,gDAAgD;AAC7D;AACA,IAAI,wCAAwC;AAC5C,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI,6BAAc;AAClB;;AAEA;;AAEA,gCAAgC,8CAA8C;;AAE9E;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,8DAA8D,MAAM;;AAEpE;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB;;AAEA;AACA,kBAAkB,kDAAkD;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAAS,mBAAmB,4BAAS;AACtD;AACA;;AAEA;;AAEA;AACA,gCAAgC,WAAW;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,4BAAS;AACzC;AACA,UAAU,OAAO;AACjB;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA,KAAK,kCAAkC,4BAAS;AAChD;AACA,UAAU,MAAM;AAChB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,qBAAqB,QAAQ;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,qCAAqC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB,IAAI,WAAW;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,uBAAW;;AAEE,4FAAc,EAAC;;AAE9B,0C;;AC5TA;AACA;AACA;AACsC;AACA;AAC4B;AACgB;AACjC;;;AAGjD;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uBAAW;AACf;;AAEA;;AAEA,oCAAoC,+BAA+B;;AAEnE;AACA,gCAAgC,0BAAK;AACrC;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,gBAAoB;AACvC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM,wBAAwB;AAC9B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B;AACA;AACA,QAAQ,kBAAM;AACd;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,QAAQ;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,CAAC,CAAC,OAAkB;;AAEL,mFAAW,EAAC;;AAE3B,uC;;ACzKA;AACA;AACA;AACsC;AACA;AACwB;AACoB;;;AAGlF;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,mBAAS;AACb;;AAEA;;AAEA,oCAAoC,+BAA+B;;AAEnE;AACA,gCAAgC,0BAAK;AACrC;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,gBAAoB;AACvC;AACA;AACA;;AAEA;AACA;AACA,IAAI,sBAAsB;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,gBAAI;AACZ;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,QAAQ;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,CAAC,CAAC,OAAkB;;AAEL,6EAAS,EAAC;;AAEzB,qC;;ACzKA;AACA;AACA;AACyC;AACN;AAC4B;AAChB;AACM;AACJ;AACM;AACE;AACI;AACN;AACJ;AACP;;AAEgC;AACR;AACR;AACA;AACM;AACc;AAClB;AACR;AACI;AACU;AACA;AACE;AACZ;AACgB;AACN;AACJ;AACJ;AACF;AACJ;AACU;;;AAGhE;AACA,aAAa,OAAO;AACpB,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI,wCAAwC;AAC5C,gBAAgB,2BAA2B;AAC3C,yBAAyB,wBAAwB;AACjD;AACA,MAAM;AACN,MAAM;AACN,MAAM;AACN,MAAM;AACN,MAAM;AACN,MAAM;AACN,MAAM;AACN,MAAM;AACN,MAAM;AACN;AACA,WAAW,iBAAiB;AAC5B,YAAY;AACZ,qDAAqD;AACrD;AACA;AACA;AACO,SAAS,oBAAQ;;AAExB;;AAEA,yBAAyB,aAAU;;AAEnC,oBAAoB,UAAO;;AAE3B;AACA;AACA;AACA,0BAA0B,sBAAU;AACpC;;AAEA;AACA;AACA;AACA,0BAA0B,2BAAe;AACzC;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,0BAA0B,mBAAO;AACjC,uCAAuC,eAAK;AAC5C;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,0BAA0B,uBAAW;AACrC;;AAEA;AACA;AACA,0BAA0B,qBAAS;AACnC;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,0BAA0B,uBAAW;AACrC,0BAA0B,wBAAY;AACtC;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,0BAA0B,0BAAc;AACxC,uCAAuC,eAAK;AAC5C;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,0BAA0B,oBAAQ;AAClC;AACA,KAAK;AACL;;AAEA;;AAEA;;AAEA,uC;;ACpKA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACO;;AAEP;AACA;AACA;AACA,UAAU;AACV;AACO;;AAEP,kC;;AClBA;AACA;AACA;AACmC;AACU;AACC;;AAE9C;AACA;AACA;AACA,IAAI,mBAAS;AACb;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,4BAAS;AAChC;;AAEA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,oDAAoD;AAClE;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA,cAAc,OAAO;AACrB;AACA;AACA,sBAAsB,OAAO;AAC7B;;AAEA;AACA,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI,gCAAQ;AACZ;;AAEA;AACA,CAAC,CAAC,yBAAW;;;AAGE,oEAAS,EAAC;;AAEzB,qC;;ACtGA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,sC;;ACdA;AACA;AACA;AACuC;AACE;;;AAGzC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,2BAA2B;AACxC;;;AAGA,IAAI,uBAAW;AACf;;AAEA,2CAA2C,UAAU,QAAQ,UAAU;;AAEvE;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,mBAAmB,UAAU;AAC7B,KAAK;AACL,mBAAmB,UAAU;AAC7B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,UAAU;AAChC,mBAAmB,UAAU;AAC7B;AACA;AACA;AACA;;AAEA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,YAAS;;;AAGI,0EAAW,EAAC;;AAE3B,uC;;AChGA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,qC;;ACfA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA,CAAC,EAAC;;AAEF,4C;;ACnBA;AACA;AACA;;AAEuC;;AAEvC;AACA;;AAEA;;AAEA;AACA,2CAA2C,wCAAwC;AACnF,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,wBAAK;;AAEQ,4DAAW,EAAC;;AAE3B,iC;;ACpDA;AACA;AACA;;AAEqC;AACS;AACC;;;AAG/C;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,EAAE;AAChB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iBAAQ;AACZ;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,4BAAS;AAChC;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;;AAGA;AACA,aAAa,0CAA0C;AACvD;AACA;AACA;AACA,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,EAAE;AAChB;AACA;AACA;AACA,IAAI,MAAM;AACV,UAAU;AACV;AACA;AACA,KAAK;AACL,gCAAgC,MAAM;AACtC;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,EAAE;AAChB;AACA;AACA;AACA,IAAI,MAAM,0BAA0B;AACpC;AACA,gCAAgC,MAAM;AACtC;AACA;AACA;AACA,KAAK;AACL,gCAAgC,MAAM;AACtC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;;AAGA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA,8BAA8B,OAAO;AACrC;AACA;AACA;AACA;;;AAGA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA,8BAA8B,OAAO;AACrC;AACA;AACA;AACA;;;AAGA;AACA,cAAc,EAAE;AAChB;AACA;AACA;AACA;;;AAGA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;;AAGA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;;AAGA;AACA,cAAc,EAAE;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,MAAM;AACpC;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,aAAa,EAAE;AACf;AACA;AACA,kBAAkB;AAClB;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,aAAa,EAAE;AACf;AACA;AACA,IAAI,MAAM;AACV,UAAU;AACV,2BAA2B,MAAM;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,yBAAW;;AAEE,sEAAQ,EAAC;;AAExB,oC;;AChTA;AACA;AACA;AAC0C;AACM;AAChB;AACc;AACY;;;AAG1D;AACA,aAAa,OAAO;AACpB,cAAc,oCAAoC;AAClD;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,oCAAoC;AAClD,cAAc,oCAAoC;AAClD,cAAc,OAAO;AACrB,cAAc,cAAc;AAC5B,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,oCAAoC;AAClD,cAAc,oCAAoC;AAClD,cAAc,OAAO;AACrB,cAAc,cAAc;AAC5B,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,cAAc;AAC5B,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,oCAAoC;AAClD;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,mCAAmC;AACjD,cAAc,qCAAqC;AACnD,cAAc,OAAO;AACrB,cAAc,cAAc;AAC5B;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,wCAAwC;AACzD,aAAa,SAAS;AACtB;;;AAGA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,iBAAiB,yCAAyC;AAC1D,UAAU;AACV;AACA;AACO,qBAAqB,gBAAQ;;;AAGpC;AACA,UAAU;AACV;AACO;;;AAGP;AACA,UAAU;AACV;AACA;;;AAGA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,WAAW,OAAO;AAClB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,eAAe;AACzC;AACA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,+BAAK;AACf;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,eAAe;AACtC;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;AAGD;AACA,YAAY,yBAAyB;AACrC;AACA;AACA;AACA,qBAAqB,4CAAqB;AAC1C;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,YAAY,0BAA0B;AACtC;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;AAGD;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,yBAAyB;AACpC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;;AAGO,qBAAqB,MAAe;;;AAG3C;AACA,WAAW,yBAAyB;AACpC,WAAW,yCAAyC;AACpD,WAAW,OAAO;AAClB,WAAW,oDAAoD;AAC/D,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kC;;AC1XA;AACA;AACA;AACoC;AACJ;;;AAGhC;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;;;AAGA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,iCAAiC,EAAE,UAAU,EAAE,YAAY,EAAE,EAAE,IAAI;;;AAGnE;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;;AAGA;AACA;AACA,WAAW,aAAa;AACxB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;AACA,GAAG;AACH,WAAW,cAAQ;AACnB;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,YAAY,MAAM;AAClB;AACO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,iBAAiB,OAAO;AACxB,kBAAkB,MAAM;AACxB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAG;;AAEH;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY,MAAM;AAClB;AACA;AACO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;;AAEA;AACA;AACA;;AAEA,8BAA8B;AAC9B,yBAAyB;AACzB,UAAU;AACV;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,oCAAoC;AACvC;AACA;AACA,GAAG,mCAAmC;AACtC;AACA;AACA;AACA,GAAG;AACH,IAAI,MAAM,YAAY;AACtB;AACA;AACA;;;AAGA;AACA;AACA,WAAW,MAAM;AACjB,YAAY,MAAM;AAClB;AACO;AACP,aAAa,KAAK;AAClB,aAAa,KAAK;AAClB,aAAa,KAAK;AAClB,aAAa,KAAK;AAClB;AACA;;;AAGA;AACA,WAAW,MAAM;AACjB,YAAY,OAAO;AACnB;AACO,SAAS,cAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iC;;AClOA;AACA;AACA;AACoC;;;AAGpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oCAAoC;AACjD;AACA;;;AAGA;AACA,WAAW,qCAAqC;AAChD,YAAY,UAAU,kBAAkB,6BAA6B;AACrE;AACA;AACO;AACP;AACA,WAAW,cAAQ;AACnB,GAAG;AACH;AACA;AACA;;AAEA,qC;;AChCA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,2BAAa;;AAEjB,2BAAa;;AAEb;AACA;AACA;AACA,WAAW,sCAAsC;AACjD;AACA,2BAAa;;AAEb;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C;AACA,2BAAa;;AAEb;AACA,WAAW,oCAAoC;AAC/C,WAAW,gCAAgC;AAC3C;AACA,2BAAa;;AAEb;AACA,WAAW,gCAAgC;AAC3C,WAAW,oCAAoC;AAC/C;AACA,2BAAa;;AAEb;AACA,WAAW,gDAAgD;AAC3D,WAAW,gCAAgC;AAC3C;AACA,2BAAa;;AAEb;AACA,WAAW,uEAAuE;AAClF,WAAW,+DAA+D;AAC1E;AACA,2BAAa;;AAEb;AACA,WAAW,4EAA4E;AACvF,WAAW,+DAA+D;AAC1E;AACA,2BAAa;;AAEb;AACA,WAAW,uEAAuE;AAClF,WAAW,+DAA+D;AAC1E;AACA,2BAAa;;AAEb;AACA,WAAW,0CAA0C;AACrD,WAAW,+DAA+D;AAC1E;AACA,2BAAa;;AAEb;AACA,WAAW,kEAAkE;AAC7E,WAAW,+DAA+D;AAC1E;AACA,2BAAa;;AAEb;AACA,WAAW,oEAAoE;AAC/E,WAAW,+DAA+D;AAC1E;AACA,2BAAa;;AAEb;AACA,WAAW,qEAAqE;AAChF,WAAW,+DAA+D;AAC1E;AACA,2BAAa;;AAEb;AACA,WAAW,mCAAmC;AAC9C,WAAW,qCAAqC;AAChD;AACA,2BAAa;;AAEb;AACA,WAAW,oCAAoC;AAC/C,WAAW,sCAAsC;AACjD;AACA,2BAAa;;AAEb;AACA,WAAW,mCAAmC;AAC9C,WAAW,sCAAsC;AACjD;AACA,2BAAa;;AAEE,oFAAa,EAAC;;AAE7B,yC;;AC5GA;AACA;AACA;AACA;AACA;AACA;;AAEsC;AACS;AACJ;AACW;AACO;AACJ;AACX;AACE;AACoL;AAC1I;;AAE1F;AACA;AACA,2BAA2B,qCAAqC;AAChE;AACA;AACA;AACA,IAAI,yCAAyC;AAC7C;AACA;AACA,IAAI,iCAAuB;AAC3B;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,8BAA8B,MAAe;;AAE7C;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA;AACA,QAAQ,iBAAgB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,cAAc;AACxB;AACA;AACA;AACA,6BAA6B,iBAAgB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,QAAQ;AACrB;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB;AACA,cAAc,OAAO;AACrB;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;AACA,SAAS,iBAAU;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,eAAe;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,iDAAiD;AACvD;AACA,aAAa,yEAAyE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,kCAAkC,sCAAsC;AACxE;AACA,WAAW,YAAY;AACvB,uCAAuC,2CAA2C;AAClF;AACA,WAAW,YAAY;AACvB,oCAAoC,wCAAwC;AAC5E;AACA,WAAW,YAAY;AACvB,uCAAuC,2CAA2C;AAClF;AACA,WAAW,YAAY;AACvB,4CAA4C,gDAAgD;AAC5F;AACA,WAAW,YAAY;AACvB,yCAAyC,6CAA6C;AACtF;AACA,WAAW,YAAY;AACvB,+CAA+C,mDAAmD;AAClG;AACA,WAAW,YAAY;AACvB,mCAAmC,uCAAuC;AAC1E;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM,yCAAyC;AAC/C;AACA,aAAa,mCAAmC;AAChD,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAU;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,mDAAmD;AAChE;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,sEAAsE;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,2EAA2E;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,2EAA2E;AACxF;AACA;AACA;AACA,SAAS,iBAAU;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,gFAAgF;AAC7F;AACA;AACA;AACA;AACA,SAAS,iBAAU;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,cAAc;AAC1C;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,wEAAwE;AACrF;AACA;AACA;AACA,SAAS,iBAAU;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,cAAc;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,6CAA6C;AAC1D;AACA;AACA;AACA,SAAS,iBAAU;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,iCAAiC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,mCAAmC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD,UAAU,gBAAgB;AAC1B;AACA;AACA;AACA,oCAAoC,eAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,kEAAkE,cAAc;AAChF;AACA,UAAU,gBAAgB;AAC1B,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,eAAe;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,iCAAiC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA,qCAAqC,gBAAgB;AACrD,wCAAwC,mBAAmB;AAC3D;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,oEAAoE,gBAAgB;AACpF;AACA;AACA;AACA,qBAAqB,mBAAmB;AACxC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,sCAAsC;AACnD,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,mBAAmB,WAAW;AAC9B,2BAA2B,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA,gCAAgC,eAAe;AAC/C;AACA,sCAAsC,qBAAqB;AAC3D;AACA,gCAAgC,eAAe;AAC/C;AACA,6BAA6B,gBAAgB;AAC7C;AACA,kCAAkC,iBAAiB;AACnD,qBAAqB,WAAW;AAChC,6BAA6B,kBAAkB;AAC/C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,sCAAsC;AACnD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,qBAAqB,WAAW;AAChC,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,cAAc;AACnD;AACA,sCAAsC,eAAe;AACrD;AACA,4CAA4C,qBAAqB;AACjE;AACA,sCAAsC,eAAe;AACrD;AACA,mCAAmC,gBAAgB;AACnD;AACA,wCAAwC,iBAAiB;AACzD,uBAAuB,WAAW;AAClC,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,WAAW;AAChC;AACA,0BAA0B,gBAAgB;AAC1C;AACA,6BAA6B,mBAAmB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,oBAAa;;;AAGA,+EAAuB,EAAC;;AAEvC,qC;;ACr6BA;AACA;AACA;AACqC;;AAErC;AACA;AACA,uCAAuC,4CAA4C;AACnF;AACA;;AAEA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,OAAO;AACjB,UAAU,QAAQ;AAClB,UAAU,4BAA4B;AACtC,WAAW,iCAAiC;AAC5C;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,OAAO;AACjB,UAAU,QAAQ;AAClB,UAAU,4BAA4B;AACtC,UAAU,iCAAiC;AAC3C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU,OAAO;AACjB;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC,YAAY,OAAO;AACnB;AACA;AACA,4BAA4B,QAAQ;AACpC;AACA;;;AAGe,uEAAc,EAAC;;;AAG9B;AACA,QAAQ,oDAAoD;AAC5D,IAAI,gCAAgC;AACpC;AACA;AACO;;AAEP,0C;;AChHA;AACA;AACA;AAC4C;AACF;AACS;AACJ;AACT;AACD;AACiB;AACc;AAC0D;;AAE9H;AACA;AACA;AACA,IAAI,eAAW;AACf;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,yCAAyC;AACtD,aAAa,wCAAwC;AACrD;AACA;AACA,IAAI,gCAAQ;AACZ;;AAEA;AACA;AACA,aAAa,2CAA2C;AACxD;AACA;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI,iBAAgB;AACpB;AACA;AACA;AACA;;AAEA,IAAI,MAAe;AACnB,MAAM,YAAqB;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,sCAAsC;AACnD,aAAa,wCAAwC;AACrD,aAAa,OAAO;AACpB,aAAa;AACb,iDAAiD;AACjD,aAAa,EAAE;AACf,aAAa,gEAAgE;AAC7E;AACA;AACA;AACA,aAAa,EAAE;AACf,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,oCAAoC;AACnD,eAAe,oCAAoC;AACnD,gBAAgB,EAAE;AAClB;AACA;AACA,2CAA2C,8BAAM;AACjD,YAAY,8BAAM;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,uBAAuB,QAAQ;AAC/B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA,UAAU,mBAAmB;AAC7B;AACA,gCAAgC,oCAAoC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,4BAA4B;AACzC,aAAa,wCAAwC;AACrD,aAAa,OAAO;AACpB,aAAa,0FAA0F;AACvG;AACA,aAAa,EAAE;AACf,aAAa,gEAAgE;AAC7E;AACA;AACA;AACA,aAAa,EAAE;AACf,cAAc,YAAY;AAC1B;AACA;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA,aAAa,sCAAsC;AACnD,aAAa,wCAAwC;AACrD,aAAa,OAAO;AACpB,aAAa,gEAAgE;AAC7E;AACA;AACA;AACA,aAAa,EAAE;AACf,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA,4CAA4C,yBAAI;;AAEhD;AACA;;AAEA;AACA,aAAa,mCAAmC;AAChD;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,mBAAmB,8BAAM;AACzB;AACA;AACA,KAAK;AACL;AACA,kEAAkE,QAAQ;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,mCAAM;AACvD,UAAU,4BAAS;AACnB,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,6CAA6C;AAC3D;AACA;AACA;AACA;;AAEA;AACA,cAAc,qCAAqC;AACnD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA;;AAEA,IAAI,0CAAa;AACjB;;AAEA;AACA;;AAEA;AACA,aAAa,qCAAqC;AAClD,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,yCAAyC;AACtD;AACA;AACA,IAAI,gCAAQ;AACZ;;AAEA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA,mDAAmD,gDAAgD;AACnG;;AAEA;AACA,aAAa,yCAAyC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,gDAAgD;AACrE;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,gCAAU;;;AAGZ;AACA,WAAW,qCAAqC;AAChD,WAAW,wCAAwC;AACnD;AACA;AACA,EAAE,MAAc;AAChB;;;AAGA;AACA,WAAW,kCAAkC;AAC7C,WAAW,kCAAkC;AAC7C,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACe,gEAAW,EAAC;;AAE3B,+B;;ACjWA;AACA;AACA;AACmH;AAC/D;AACJ;AACG;AACM;AACT;AACQ;AACF;AACiB;AACnB;AACJ;;;AAGhD;AACA,UAAU;AACV;AACO;;AAEP;AACA;AACA;AACA;AACA;AACA,IAAI,qBAAiB;AACrB;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA,oBAAoB,4CAAqB;;AAEzC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,6BAA6B,kBAAkB;AAC/C;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,sBAAsB,MAAe;;AAErC;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,4CAA4C;AACzD,aAAa,2CAA2C;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,8BAA8B,SAAuB;AACrD;AACA,6BAA6B,YAAW;AACxC;AACA;AACA;AACA;;AAEA;AACA,aAAa,2CAA2C;AACxD;AACA,cAAc,wCAAwC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAgB;AAC3B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;;AAEA,6BAA6B,gBAAe;;AAE5C;AACA,IAAI,UAAU,mBAAmB,YAAY;;AAE7C;AACA;AACA,MAAM,cAAc;AACpB;;AAEA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,qCAAqC,6BAA6B;AAClE,WAAW,mBAAmB;AAC9B,oCAAoC,KAAW;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAA6B,gBAAe;;AAE5C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,qBAAqB,KAAc;AACnC;;AAEA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA,UAAU,mBAAmB;AAC7B,uCAAuC,6BAA6B;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,YAAW;;;AAGE,oEAAiB,EAAC;;AAEjC,+B;;;;;ACjOA;AACA;AACA;AACkC;AACQ;AACA;AACF;AACJ;AACW;AACF;;AAE7C,IAAI,mBAAa;AACjB;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,oCAAoC;AACjD,aAAa,wCAAwC;AACrD,aAAa,6DAA6D;AAC1E,cAAc,4DAA4D;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB,iBAAiB,kCAAkC;AACnD,kBAAkB,QAAQ;AAC1B;AACA;AACA;AACA,mBAAmB,6BAA6B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,sCAAsC;AACnD,aAAa,wCAAwC;AACrD,aAAa,OAAO;AACpB,aAAa,sFAAsF;AACnG,cAAc,OAAO;AACrB;AACA;AACA;;AAEA;AACA,cAAc,oCAAoC;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,qCAAqC;AAClD;AACA;AACA;AACA,2BAA2B,8BAA8B;AACzD,6BAA6B,UAAU;AACvC;AACA;AACA;;AAEA;AACA,aAAa,sCAAsC;AACnD,aAAa,wCAAwC;AACrD,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,kCAAkC;AAC/C,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA,sBAAsB,UAAU,yBAAyB,UAAU;AACnE,MAAM,mCAAM,QAAQ,4BAAS;AAC7B;AACA,sBAAsB,UAAU;AAChC;AACA;AACA;AACA,yBAAyB,UAAU;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA,wDAAwD,KAAW;AACnE;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD,aAAa,oCAAoC;AACjD;AACA;AACA;AACA;AACA;AACA,iBAAiB,oCAAoC;AACrD,iBAAiB,qCAAqC;AACtD,iBAAiB,wCAAwC;AACzD;AACA;AACA,4BAA4B,8BAAM;AAClC;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,mBAAmB,gDAAgD;AACnE;AACA;AACA;;AAEA;AACA,aAAa,oEAAoE;AACjF,aAAa,oCAAoC;AACjD,aAAa,OAAO;AACpB,aAAa,kCAAkC;AAC/C;AACA;AACA;AACA;AACA,wBAAwB,8BAAM;AAC9B;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,wCAAwC;AACrD,aAAa,oCAAoC;AACjD,aAAa,0CAA0C;AACvD,aAAa,OAAO;AACpB,aAAa,wCAAwC;AACrD,aAAa,8BAA8B;AAC3C,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,iDAAiD;AAC9D,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,8BAAM;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA;AACA,8BAA8B,qBAAqB;AACnD,gCAAgC,qBAAqB;AACrD;AACA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,wBAAU;;AAEG,sEAAa,EAAC;;AAE7B,iC;;ACtPA;AACA;AACA;AACuC;AACgD;AAC/C;AACQ;AACQ;AACF;AACiB;AAC/B;AAC2E;;AAEnH;AACA;AACA;AACA,IAAI,yBAAmB;AACvB;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,sBAAsB,MAAe;;AAErC;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,2CAA2C;AACxD,aAAa,iCAAiC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,UAAU;AAC5B,mBAAmB,WAAW;AAC9B,sBAAsB,cAAc;AACpC,qBAAqB,aAAa;;AAElC,IAAI,KAAc;AAClB,IAAI,KAAc;AAClB,IAAI,KAAc;AAClB,IAAI,KAAc;;AAElB;AACA,IAAI,cAAc;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,cAAc;AAClB;;AAEA;AACA,aAAa,4CAA4C;AACzD,aAAa,yBAAyB;AACtC,aAAa,2CAA2C;AACxD,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,cAAc;AACpB;AACA;AACA,uBAAuB,SAAuB;AAC9C;AACA;AACA,6BAA6B,YAAW;AACxC;AACA;AACA,MAAM,cAAc;AACpB;AACA;;AAEA;AACA,aAAa,yCAAyC;AACtD,aAAa,2CAA2C;AACxD,aAAa,OAAO;AACpB,aAAa,6FAA6F;AAC1G;AACA,aAAa,EAAE;AACf,cAAc,YAAY;AAC1B;AACA;AACA;AACA,2FAA2F,yBAAI;;AAE/F;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,2CAA2C;AACxD,aAAa,qCAAqC;AAClD,aAAa,wCAAwC;AACrD;AACA;AACA;AACA,+BAA+B,gBAAe;AAC9C;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,2CAA2C;AACxD,aAAa,wCAAwC;AACrD;AACA;AACA;AACA,+BAA+B,gBAAe;AAC9C;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,2CAA2C;AACxD,aAAa,wCAAwC;AACrD;AACA;AACA;AACA,+BAA+B,gBAAe;AAC9C;;AAEA;AACA,aAAa,2CAA2C;AACxD,aAAa,OAAO;AACpB;AACA,cAAc,wCAAwC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAgB;AAC3B;;AAEA;AACA;AACA,aAAa,2CAA2C;AACxD,aAAa,qCAAqC;AAClD,aAAa,yBAAyB;AACtC;AACA;AACA,IAAI,gCAAQ;AACZ;;AAEA;AACA;AACA,aAAa,2CAA2C;AACxD,aAAa,qCAAqC;AAClD,cAAc,QAAQ;AACtB;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA,CAAC,CAAC,cAAa;;AAEA,0EAAmB,EAAC;;AAEnC,iC;;AChMA;AACA;AACA;AACuC;AACsB;AACV;AACQ;AACd;AACyC;;AAEtF;AACA;AACA;AACA,IAAI,6CAA0B;AAC9B;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA,4CAA4C,MAAe;;AAE3D;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,UAAU,iBAAU;AACpB;AACA,kDAAkD,iCAAiC;AACnF;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,cAAc,oDAAoD;AAClE;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA;AACA,cAAc,wCAAwC;AACtD;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB,KAAc;AAC9B,IAAI,gBAAe;;AAEnB;AACA,+BAA+B,4CAAqB;AACpD;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,CAAC,CAAC,YAAmB;;;AAGN,oGAA0B,EAAC;;AAE1C,8C;;AClIA;AACA;AACA;AACkE;AACnB;AACJ;AACF;AACH;AACwC;AACf;AAC3B;AACe;AACc;AACyB;;AAE1F;AACA;AACA;AACA;AACA;AACA,IAAI,mCAAwB;AAC5B;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,2BAA2B,MAAe;;AAE1C;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA,iCAAiC,SAAS;AAC1C,2BAA2B,yBAAyB,QAAQ,QAAQ;AACpE,mBAAmB,yBAAyB;AAC5C;AACA,4CAA4C,mCAAmC;AAC/E;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAAgC,uCAAuC;AACvE,iCAAiC,wCAAwC;;AAEzE;;AAEA;AACA;AACA;AACA,uBAAuB,eAAe;AACtC;;AAEA,eAAe,QAAQ,sBAAsB,QAAQ;AACrD,SAAS,cAAO;AAChB;AACA,WAAW,0BAA0B;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,2CAA2C,KAAK,gCAAM,GAAG;AAClG;AACA,YAAY,QAAQ;AACpB,YAAY,SAAS;AACrB;AACA,gCAAgC,8BAA8B,KAAK,gCAAM,GAAG;AAC5E;AACA,WAAW;AACX,SAAS;AACT;AACA,oBAAoB,cAAW;AAC/B;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAgB;AACtC;AACA;AACA;AACA;AACA;AACA,MAAM,iBAAgB;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,CAAC,CAAC,kBAA0B;;;AAG5B;AACA;AACA,WAAW,uCAAuC;AAClD,YAAY,QAAQ;AACpB;AACA,mCAAwB;AACxB,6BAA6B,SAAS;AACtC,wBAAwB,SAAS;AACjC,eAAe,wCAAwC,gCAAgC,gBAAgB;AACvG;;;AAGA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uCAAuC;AAClD,YAAY,yBAAyB;AACrC;AACA,mCAAwB;AACxB,aAAa,mCAAwB,YAAY,uCAAuC;AACxF;;;AAGe,kFAAwB,EAAC;;AAExC,sC;;AC3NA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;;AAEA;AACA,YAAY;AACZ;AACA;;AAEA;AACA,YAAY;AACZ;AACA;;AAEA;AACA,YAAY;AACZ;AACA;;AAEA;;AAEA;AACA,WAAW,mCAAmC;AAC9C,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA,YAAY,yBAAyB;AACrC;AACA;AACA;AACA;;AAEA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,YAAY,UAAU;AACtB;AACO,SAAS,wBAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGe,0DAAS,EAAC;;AAEzB,qC;;AC7IA;AACA;AACA;AACqC;AACM;AACA;AACA;AACF;AACU;AAC2C;AAC7B;AACyB;;AAE1F;AACA;AACA;AACA;AACA;AACA,IAAI,iCAAuB;AAC3B;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA,0CAA0C,4CAAqB;;AAE/D;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,qBAAqB,WAAW;;AAEhC;AACA;AACA,cAAc;AACd;AACA,6BAA6B,YAAS;;AAEtC;AACA;AACA,cAAc;AACd;AACA,2BAA2B,MAAe;;AAE1C;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,gCAAgC;AAC7C,cAAc,QAAQ;AACtB;AACA;AACA,+BAA+B,sCAAsC;AACrE;AACA;AACA,wBAAwB,SAAS;AACjC,qBAAqB,SAAS;AAC9B,qBAAqB,SAAS;AAC9B;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,2CAA2C;AACxD,cAAc,iCAAiC;AAC/C;AACA;AACA,+BAA+B,sCAAsC;AACrE,gCAAgC,uCAAuC;AACvE;AACA,2BAA2B,SAAS;AACpC;AACA;AACA,sBAAsB,SAAS;AAC/B,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,+BAA+B,sCAAsC;AACrE,gCAAgC,uCAAuC;AACvE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,eAAe;AAC9B;AACA,QAAQ,cAAO;AACf;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;;AAEA;AACA,uCAAuC,QAAQ,qBAAqB,QAAQ;;AAE5E;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD,8BAA8B,qBAAqB;AACnD;AACA;AACA;AACA;AACA;AACA,oBAAoB,8BAAM;AAC1B,iCAAiC,SAAS;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,oCAAoC,cAAc;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,wCAAwC,aAAM;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,iBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA,IAAI,iBAAgB;AACpB;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,aAAa,gCAAgC;AAC7C,aAAa,2CAA2C;AACxD,aAAa,qCAAqC;AAClD,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAAM;AACpB;AACA,+BAA+B,sCAAsC;AACrE,gCAAgC,uCAAuC;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,gCAAgC;AAC7C,cAAc,oDAAoD;AAClE;AACA;AACA;AACA,sBAAsB,qCAAqC;AAC3D;;AAEA;AACA,CAAC,CAAC,kBAA0B;;;AAG5B;AACA;AACA,WAAW,uCAAuC;AAClD,YAAY,QAAQ;AACpB;AACA,iCAAuB;AACvB,6BAA6B,SAAS;AACtC;;;AAGA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uCAAuC;AAClD,YAAY,wBAAwB;AACpC;AACA,iCAAuB;AACvB,aAAa,iCAAuB,YAAY,sCAAsC;AACtF;;;AAGA;AACA;AACA,YAAY;AACZ;AACA,iCAAuB;;;AAGR,sFAAuB,EAAC;;AAEvC,qC;;;;;;ACnZA;AACA;AACA;AACoC;;AAEpC;AACA;AACA;AACA,IAAI,uBAAW;;AAEf,uBAAW;AACX,SAAS,gCAAQ;AACjB;;AAEA;AACA;AACA,YAAY,QAAQ;AACpB;AACA,uBAAW;AACX,SAAS,gCAAQ;AACjB;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,SAAS;AACrB;AACA,uBAAW;AACX,SAAS,gCAAQ;AACjB;;AAEe,8EAAW,EAAC;;AAE3B,uC;;ACjCA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,sC;;AChBA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA,+BAA+B,SAAS;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA,kC;;AC1CA;AACA;AACA;AACmC;;;AAGnC;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,wBAAwB;AACnC;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,gBAAgB;AAC5B;AACA;AACO;AACP;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,IAAI;AAChB,YAAY,IAAI;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oC;;AC7FA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,UAAU;AACV;AACO,IAAI,2BAAe;;;AAG1B;AACA,UAAU;AACV;AACO,IAAI,6BAAiB;;;AAG5B;AACA,UAAU;AACV;AACO;;;AAGP;AACA,UAAU;AACV;AACO;;;AAGQ,kEAAW,EAAC;;AAE3B,uC;;AClDA;AACA;AACA;AACyC;;;AAGzC;AACA;AACA,UAAU;AACV;AACO;AACP,EAAE,UAAU;AACZ,EAAE,UAAU;AACZ,EAAE,UAAU;AACZ,EAAE,UAAU;AACZ,EAAE,UAAU;AACZ,EAAE,UAAU;AACZ;;AAEA;AACA;AACA,UAAU;AACV;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kC;;ACpCA;AACA;AACA;AACqC;AACkB;AACR;AAEqC;AAC5B;AACF;AAC+D;AAC1D;AACA;AACF;AACX;AACT;AACW;AAGO;AACN;AACT;AAMZ;;;AAG5B;AACA,UAAU;AACV;AACA,IAAI,gBAAS,GAAG,WAAW;;;AAG3B;AACA,UAAU;AACV;AACA,IAAI,mBAAY,GAAG,MAAe;;;AAGlC,IAAI,mBAAY;AAChB;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,8BAA8B,MAAe;;AAE7C;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,4BAA4B,uCAAuC,OAAO;;AAE1E;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,yCAAyC;AACtD,aAAa,yCAAyC;AACtD,aAAa,yCAAyC;AACtD,aAAa,yCAAyC;AACtD,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,oDAAoD;AACjE,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,sCAAsC;AACnD,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,QAAQ;AACrB,aAAa,OAAO;AACpB,aAAa,cAAc;AAC3B,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,yCAAyC;AACxD;AACA,eAAe,yCAAyC;AACxD;AACA,eAAe,yCAAyC;AACxD;AACA,eAAe,yCAAyC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,iBAAgB,CAAC,mBAAY;;AAE/C,MAAM,mBAAmB,CAAC,gBAAS;AACnC,MAAM,gBAAgB,CAAC,gBAAS,EAAE,KAAc,CAAC,mBAAY;AAC7D,MAAM,gBAAgB,CAAC,gBAAS,EAAE,KAAc,CAAC,mBAAY;AAC7D,MAAM,gBAAgB,CAAC,gBAAS,EAAE,KAAc,CAAC,mBAAY;AAC7D,MAAM,gBAAgB,CAAC,gBAAS,EAAE,KAAc,CAAC,mBAAY;AAC7D,KAAK;AACL,MAAM,cAAc,uCAAuC,gBAAS;AACpE;AACA;AACA;AACA;AACA,QAAQ,gBAAS,uCAAuC,gBAAS;AACjE,QAAQ,gBAAS,wCAAwC,gBAAS;;AAElE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM,aAAM,iBAAiB,gBAAS;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,qBAAqB,SAAS;AAC9B,qBAAqB,SAAS;AAC9B;AACA,MAAM,SAAS;AACf;AACA;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6BAA6B,SAAS;AACtC;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,sBAAsB,YAAY;AACzC;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,cAAc;AAC3B,cAAc,OAAO;AACrB;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B,4BAA4B,6CAA6C;AACzE;AACA;AACA;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA,8BAA8B,kBAAiB;AAC/C,sDAAsD,4BAA4B;AAClF,KAAK,kBAAkB,YAAY,oBAAoB,YAAY;AACnE;AACA,iCAAiC,YAAY;AAC7C,mBAAmB,wCAAwC;AAC3D;AACA;AACA,mBAAmB,wFAAwF;AAC3G;AACA,8BAA8B,kBAAiB;AAC/C,qDAAqD,uBAAuB;AAC5E,KAAK,kBAAkB,YAAY,wBAAwB,YAAY;AACvE;AACA;AACA;AACA,8BAA8B,kBAAiB;AAC/C,oDAAoD,kBAAkB;AACtE,KAAK,kBAAkB,YAAY;AACnC;AACA;AACA;AACA,8BAA8B,kBAAiB;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,yEAAyE;AACtF,aAAa,mEAAmE;AAChF;AACA;AACA,uCAAuC,kBAAiB;AACxD;AACA,uCAAuC,kBAAiB;AACxD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,yBAAyB;AACtC;AACA;AACA;AACA,mBAAmB,KAAc;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,cAAc;AACxD;AACA;;AAEA;AACA;AACA,aAAa,yBAAyB;AACtC,aAAa,SAAS;AACtB;AACA;AACA,qCAAqC,uCAAuC;AAC5E,mCAAmC,OAAO;AAC1C,iCAAiC,cAAc;AAC/C,kCAAkC,eAAe;AACjD,oCAAoC,OAAO;AAC3C,QAAQ,gBAAgB;AACxB,0CAA0C,OAAO;AACjD,qCAAqC,cAAc;AACnD;AACA;;AAEA;AACA,aAAa,sCAAsC;AACnD,aAAa,mEAAmE;AAChF;AACA;AACA;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D;AACA,2BAA2B,OAAO;AAClC,2BAA2B,OAAO;AAClC,2BAA2B,OAAO;AAClC,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA,qDAAqD,QAAQ;AAC7D,2CAA2C,MAAM;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA,QAAQ,mBAAmB;AAC3B;AACA;AACA;;AAEA;AACA;AACA,aAAa,yBAAyB;AACtC,aAAa,uCAAuC;AACpD,aAAa,wBAAwB;AACrC;AACA,aAAa,SAAS;AACtB,aAAa,QAAQ;AACrB,aAAa,4FAA4F;AACzG,aAAa,kCAAkC;AAC/C;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA,kCAAkC,MAAM;AACxC;AACA,KAAK;AACL;AACA;AACA;AACA,yBAAyB,WAAW;AACpC;AACA;AACA,MAAM,YAAqB;AAC3B;AACA,wBAAwB,iCAAO;AAC/B,cAAc;AACd,iCAAiC;AACjC,cAAc;AACd,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,gCAAgC;AAC3D;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,mBAAmB,mEAAmE;AACtF;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA,aAAa,kBAAiB;AAC9B,+BAA+B,mEAAmE;AAClG,mDAAmD,8BAAM;AACzD,2BAA2B,OAAO;AAClC,WAAW,0CAA0C,iBAAU;AAC/D;AACA,2BAA2B,OAAO;AAClC,WAAW;AACX;AACA;AACA;AACA,aAAa,kBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAiB;AAC9B,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAiB;AAC9B;AACA;AACA;AACA,aAAa,kBAAiB;AAC9B,yBAAyB,OAAO;AAChC;AACA,oCAAoC,+CAA+C;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAiB;AAC9B,yBAAyB,OAAO;AAChC,0BAA0B,OAAO;AACjC,6BAA6B,oDAAoD;AACjF;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+DAA+D,sCAAsC;AACrG,kCAAkC,OAAO;AACzC,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C,0CAA0C,QAAQ;AAClD,oCAAoC,OAAO;AAC3C,iCAAiC,OAAO;AACxC,iCAAiC,OAAO;;AAExC;AACA;AACA,iCAAiC,cAAc;AAC/C,wCAAwC,QAAQ;AAChD,0CAA0C,QAAQ;AAClD,WAAW;AACX,sBAAsB,cAAc;AACpC;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,0CAA0C,SAAS;AACnD,4CAA4C,SAAS;AACrD;AACA;AACA;AACA;AACA,aAAa,kBAAiB;AAC9B,iCAAiC,OAAO;AACxC,+BAA+B,OAAO;AACtC,oCAAoC,OAAO;AAC3C,+DAA+D,sCAAsC;AACrG,oCAAoC,OAAO;AAC3C,mCAAmC,OAAO;AAC1C,oCAAoC,OAAO;AAC3C,mCAAmC,wBAAwB;AAC3D,mCAAmC,OAAO;AAC1C,qCAAqC,OAAO;AAC5C,uCAAuC,OAAO;AAC9C,gCAAgC,OAAO;AACvC,mCAAmC,OAAO;AAC1C,qCAAqC,OAAO;;AAE5C,2BAA2B,gBAAgB;AAC3C;AACA;AACA,uBAAuB,kCAAkC;AACzD,wCAAwC,EAAE;AAC1C;AACA,qDAAqD,UAAU;AAC/D,wBAAwB,cAAc;AACtC;AACA;AACA;AACA;AACA,8CAA8C,QAAQ;AACtD,kCAAkC;AAClC,qCAAqC,OAAO;AAC5C;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA,+BAA+B,OAAO,0BAA0B,OAAO;AACvE;AACA,+BAA+B,OAAO;AACtC,oBAAoB,cAAc;AAClC;AACA;AACA;AACA,8CAA8C,QAAQ;AACtD,kCAAkC;AAClC,qCAAqC,OAAO;AAC5C;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA,+BAA+B,OAAO,0BAA0B,OAAO;AACvE;AACA,+BAA+B,OAAO;AACtC,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAiB;AAC9B;AACA,iCAAiC,mEAAmE;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAiB;AAC9B;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,aAAa,kBAAiB;AAC9B,yBAAyB,OAAO;AAChC,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAiB;AAC9B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC,uCAAuC;AAChF;AACA;AACA,aAAa,kBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA,aAAa,kBAAiB;AAC9B;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,uCAAuC;AACpD,aAAa,OAAO;AACpB,aAAa,wBAAwB;AACrC;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,uCAAuC;AACpD,aAAa,OAAO;AACpB,aAAa,wBAAwB;AACrC;AACA,aAAa,mFAAmF;AAChG;AACA,aAAa,kCAAkC;AAC/C;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,wBAAwB,kBAAkB;AAC1C,kBAAkB,kBAAiB;AACnC;AACA,OAAO,kBAAkB,kBAAiB;AAC1C;AACA,QAAQ,eAAe;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC,yBAAyB,gBAAgB;AACzC,KAAK;AACL;AACA;AACA;AACA;AACA,0BAA0B,WAAW;AACrC,2BAA2B,kBAAkB;AAC7C;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA,sCAAsC,eAAe;AACrD;AACA;AACA,oCAAoC,qBAAqB;AACzD;AACA;AACA,8BAA8B,eAAe;AAC7C;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,uCAAuC;AACpD,aAAa,yEAAyE;AACtF,cAAc,SAAS;AACvB;AACA;AACA;AACA,eAAe,SAAS;AACxB,2BAA2B,kBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;;AAEA;AACA,aAAa,uCAAuC;AACpD,cAAc,SAAS;AACvB;AACA;AACA;AACA,MAAM,kBAAiB;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,uCAAuC;AACpD,aAAa,yJAAyJ;AACtK,aAAa,yEAAyE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,uCAAuC;AACpD,aAAa,oEAAoE;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,MAAM;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,yEAAyE;AACtF,aAAa,mEAAmE;AAChF;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,kBAAiB;AACnD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,YAAK;AACrC;AACA;AACA,QAAQ,aAAM;AACd;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,oBAAa;;;AAGA,8DAAY,EAAC;;AAE5B,kC;;AChkCA;AACA;AACA;AACiD;AACV;;AAEvC,IAAI,6BAAiB;AACrB;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kBAAiB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kBAAiB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kBAAiB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kBAAiB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,sCAAsC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,MAAY;;;AAGC,6EAAiB,EAAC;;AAEjC,uC;;ACvNA;AACA;AACA;AAC4F;AACrD;;AAEvC,IAAI,uCAAsB;AAC1B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA,mCAAmC,kBAAiB;AACpD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kBAAiB;AACvB;AACA;AACA,OAAO,oBAAoB;AAC3B;AACA;AACA;AACA,uCAAuC,6BAAiB;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kBAAiB;AACvB;AACA;AACA,OAAO,oBAAoB;AAC3B;AACA;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA,uCAAuC,6BAAiB;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,6BAAiB;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6BAA6B,6BAAiB;AAC9C;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;;AAEA;AACA,CAAC,CAAC,MAAY;;;AAGC,4FAAsB,EAAC;;AAEtC,4C;;ACpHA;AACA;AACA;AACwC;AACS;AACH;AAGpB;AACa;;;AAGvC,IAAI,iCAAmB;AACvB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C,uCAAuC,oBAAoB;AAC3D,mBAAmB,aAAa;AAChC;AACA;AACA;AACA,qCAAqC,kBAAiB;AACtD;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD,2CAA2C,oBAAoB;AAC/D;AACA;AACA;AACA;AACA,6BAA6B,2BAAe;AAC5C,yCAAyC,2BAAe;AACxD;AACA;AACA,6BAA6B,6BAAiB;AAC9C,yCAAyC,6BAAiB;AAC1D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,kBAAiB;AACzB,QAAQ,QAAQ,CAAC,gBAAgB;AACjC;AACA;AACA;AACA;AACA,QAAQ,kBAAiB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,kBAAiB;AAC9C,2BAA2B,oBAAoB;AAC/C,uCAAuC,oBAAoB;AAC3D,uCAAuC,2BAAe;AACtD;AACA,6BAA6B,2BAAe;AAC5C;AACA;AACA,6BAA6B,6BAAiB;AAC9C,yCAAyC,6BAAiB;AAC1D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,kBAAiB;AACzB,QAAQ,QAAQ,CAAC,gBAAgB;AACjC;AACA;AACA;AACA;AACA,QAAQ,kBAAiB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,kBAAiB;AACzB,QAAQ,QAAQ,CAAC,gBAAgB;AACjC;AACA;AACA;AACA;AACA,QAAQ,kBAAiB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,QAAQ;AACtD,yBAAyB,IAAI;AAC7B;AACA;AACA;;AAEA;AACA;AACA,aAAa,yEAAyE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,MAAY;;;AAGC,mFAAmB,EAAC;;AAEnC,yC;;ACrNA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,cAAc;AAC1B;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yC;;ACpDA;AACA;AACA;;AAEA;AACA;AACA,sDAAsD,2CAA2C;AACjG,IAAI,qCAAqC,GAAG,qDAAqD;AACjG,IAAI,+CAA+C;AACnD,UAAU;AACV;AACe;AACf;AACA;AACA,CAAC,EAAC;;AAEF,yC;;AChBA;AACA;AACA;AACqC;AACU;AACI;AACR;AACoB;AACT;AACR;AACkQ;AAC/P;AACV;AACC;AACiB;;AAEzD,IAAI,2BAAgB;AACpB;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,iCAAiC,iCAAiC,OAAO;;AAEzE;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA,IAAI,UAAU;;AAEd;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,gCAAgC,aAAa;AAC7C,WAAW,iBAAU;AACrB;AACA;AACA;AACA;AACA;AACA,0BAA0B,YAAY;AACtC;AACA,OAAO,0BAA0B,YAAY;AAC7C;AACA,OAAO,0BAA0B,YAAY;AAC7C;AACA,OAAO,0BAA0B,YAAY;AAC7C;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA,sBAAsB,aAAa;AACnC;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,aAAa;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;AACL;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,YAAY;AACzB;AACA;AACA;AACA,aAAa,YAAY;AACzB,uCAAuC,2CAA2C;AAClF;AACA,aAAa,YAAY;AACzB,uCAAuC,uCAAuC;AAC9E;AACA,aAAa,YAAY;AACzB,uCAAuC,gDAAgD;AACvF;AACA;AACA,aAAa,YAAY;AACzB,uCAAuC,wCAAwC;AAC/E;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,0CAA0C,6CAA6C;AACvF;AACA,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;;AAEA,SAAS,UAAU;AACnB;AACA;AACA;AACA;AACA;AACA,kBAAkB,UAAU,wBAAwB,gBAAgB;AACpE;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA,oBAAoB,4CAAqB;AACzC;AACA;AACA;AACA,MAAM,UAAU;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,cAAc;AACnD,sCAAsC,eAAe;AACrD;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;;AAEA;AACA;AACA,aAAa,kBAAkB;AAC/B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU,wBAAwB,gBAAgB;AAClE,mBAAmB,UAAU;AAC7B;;AAEA;AACA;AACA,4BAA4B,kBAAiB;AAC7C;AACA;AACA;AACA,2BAA2B,cAAc;AACzC,QAAQ,cAAc;AACtB;AACA,SAAS;AACT;AACA;AACA,wCAAwC,kBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,sCAAsC;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kDAAkD,mCAAmC;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,kDAAkD,iCAAiC;AACnF;AACA,0CAA0C,gBAAgB;AAC1D;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,8CAA8C,iCAAiC;AAC/E;AACA,SAAS;AACT;AACA;;AAEA;AACA,mBAAmB,UAAU;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA,OAAO;AACP;AACA;AACA,wCAAwC,kBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,wCAAwC,sCAAsC;;AAE9E;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,uDAAuD,iCAAiC,OAAO;AAC/F;AACA,8BAA8B,WAAW;AACzC,sCAAsC,gBAAgB;AACtD;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,2DAA2D,mCAAmC,OAAO;AACrG;AACA;AACA;AACA;AACA;AACA,8DAA8D,cAAc;AAC5E,6DAA6D,eAAe;AAC5E;AACA,2CAA2C,qBAAqB;AAChE,gEAAgE,eAAe;AAC/E;AACA,sCAAsC,gBAAgB;AACtD;AACA,uCAAuC,iBAAiB;AACxD,kCAAkC,WAAW;AAC7C,wCAAwC,kBAAkB;AAC1D;;AAEA;AACA,wCAAwC,WAAW;AACnD,MAAM,SAAS;AACf;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,mBAAmB;AACjF;AACA;AACA,oDAAoD,cAAc;AAClE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gFAAgF,8BAAM;AACtF;AACA;AACA;AACA;AACA;AACA,+EAA+E,8BAAM;AACrF;AACA;AACA;;AAEA;AACA,CAAC,CAAC,MAAY;;;AAGd;AACA,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,cAAc;AACzB;AACA,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA,iBAAiB,cAAc;AAC/B,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;;;AAGe,0EAAgB,EAAC;;AAEhC,sC;;AC3hBA;AACA;AACA;;AAEyD;AACN;AACmB;AACb;AACpB;AACO;AACF;AACH;AACU;AACU;AACN;AACN;AACZ;AACuD;;;AAG1F;AACA,UAAU;AACV;AACA;AACA,YAAY,aAAmB;AAC/B,aAAa,MAAY;AACzB,WAAW,WAAiB;AAC5B,gBAAgB,gBAAsB;AACtC,aAAa,aAAmB;AAChC,UAAU,UAAgB;AAC1B;;;AAGA,IAAI,6BAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,gCAAgC,4CAAqB;;AAErD;AACA;AACA,cAAc;AACd;AACA,kCAAkC,MAAe;AACjD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B,OAAO;AACP,2CAA2C,WAAW;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,kBAAkB;AAC/B,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,yCAAyC;AACtD,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,wBAAwB;AACrC,aAAa,kFAAkF;AAC/F,aAAa,sDAAsD;AACnE,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,iBAAgB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;AACA,kBAAkB,WAAW;AAC7B,MAAM,gBAAgB;AACtB,MAAM,aAAM;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;;AAEA;AACA,eAAe,mEAAmE;AAClF,gBAAgB,EAAE;AAClB;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA,0DAA0D,UAAU,wBAAwB,UAAU;AACtG;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,cAAc;AAC7B;AACA,YAAY,yBAAyB;;AAErC;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA,eAAe,KAAK,YAAY,QAAQ;AACxC,qBAAqB,KAAK;AAC1B;AACA;AACA;AACA,6BAA6B,UAAU,wBAAwB,UAAU;AACzE;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,uCAAuC;AACpD,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,iDAAiD;AAC/D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,iCAAO;AAClB;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,uCAAuC;AACpD,aAAa,OAAO;AACpB,aAAa,wBAAwB;AACrC,aAAa,QAAQ;AACrB,aAAa,mBAAmB;AAChC,qBAAqB;AACrB,aAAa,uDAAuD;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,cAAc;AAC7B;AACA,YAAY,yBAAyB;;AAErC;AACA;AACA;AACA;;AAEA,0DAA0D,KAAK;AAC/D;AACA,+BAA+B,QAAQ;AACvC;AACA;AACA,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;AACA,6BAA6B,UAAU,wBAAwB,UAAU;AACzE;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,CAAC,CAAC,kBAAW;;;AAGb;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,kCAAkC;AAC7C,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA,GAAG;AACH,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,kCAAkC;AAC/C;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,eAAe;AAChC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA,WAAW,0BAA0B;AACrC,WAAW,yBAAyB;AACpC,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACO;AACP,0DAA0D,yBAAyB;AACnF;AACA,iCAAiC,QAAQ;AACzC;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;;;AAGe,oFAAiB,EAAC;;AAEjC,uC;;ACtfA;AACA;AACA;AACkC;AACQ;AACS;AACF;;;AAGjD;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C,YAAY,OAAO;AACnB;AACO;AACP,kBAAkB,8BAAM,2BAA2B,8BAAM;AACzD;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C,WAAW,gCAAgC;AAC3C;AACA;AACA;AACA;AACA;AACA,gEAAgE,UAAU;AAC1E;AACA;AACA;AACA;AACA;AACA,8DAA8D,UAAU;AACxE;AACA;AACA;AACA;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C,WAAW,OAAO;AAClB,WAAW,wDAAwD;AACnE,WAAW,EAAE;AACb,YAAY,QAAQ;AACpB;AACA;AACO;AACP;AACA;AACA;AACA;AACA,sBAAsB,UAAU,yBAAyB,UAAU;AACnE;AACA,KAAK;AACL,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,6EAA6E;AACxF,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C;AACA;AACA,4BAA4B,YAAY;AACxC,gCAAgC,gDAAgD;AAChF,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA,wDAAwD,UAAU;AAClE,+BAA+B,4CAA4C;AAC3E;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,gDAAgD;AAC3D,WAAW,oCAAoC;AAC/C,WAAW,gCAAgC;AAC3C;AACA;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,+EAA+E;AAC1F,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C;AACA;AACA;AACA;AACA,oEAAoE,UAAU;AAC9E;AACA;AACA;AACA;AACA;AACA,8DAA8D,UAAU;AACxE;AACA;AACA;AACA;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,oFAAoF;AAC/F,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C;AACA;AACA;AACA;AACA,oEAAoE,UAAU;AAC9E;AACA;AACA;AACA;AACA;AACA,8DAA8D,UAAU;AACxE;AACA;AACA;AACA;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,0CAA0C;AACrD,WAAW,oCAAoC;AAC/C,WAAW,gCAAgC;AAC3C;AACA;AACA;AACA;AACA;AACA,iEAAiE,UAAU;AAC3E;AACA;AACA;AACA;AACA;AACA,8DAA8D,UAAU;AACxE;AACA;AACA;AACA;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,0EAA0E;AACrF,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA,+DAA+D,UAAU;AACzE;AACA;AACA;AACA;AACA;AACA,8DAA8D,UAAU;AACxE;AACA;AACA;AACA;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,+EAA+E;AAC1F,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA,+DAA+D,UAAU;AACzE;AACA;AACA;AACA;AACA;AACA,8DAA8D,UAAU;AACxE;AACA;AACA;AACA;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,4EAA4E;AACvF,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C;AACA;AACA;AACA;AACA;AACA,iEAAiE,UAAU;AAC3E;AACA;AACA;AACA;AACA;AACA,8DAA8D,UAAU;AACxE;AACA;AACA;AACA;;AAEA,kC;;AC7TA;AACA;AACA;AACqC;AACM;AACF;AACU;AACF;AACC;AACxB;AACoD;AACtB;AACU;AACC;AACtB;AACwH;;AAErK;AACA;AACA;AACA;AACA;AACA,IAAI,qCAAyB;AAC7B;;AAEA;;AAEA;AACA;AACA;AACA;AACA,uDAAuD,eAAK;;AAE5D;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,2BAA2B,WAAW;;AAEtC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA,mBAAmB,4CAAqB;;AAExC,IAAI,mCAAM,CAAC,UAAU,EAAE,4BAAS;;AAEhC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI,qCAAQ,CAAC,UAAU,EAAE,4BAAS;AAClC;AACA;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,2CAA2C;AACxD,aAAa,qCAAqC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,yCAAyC;;AAE3E;;AAEA;AACA;AACA;AACA;AACA,gDAAgD,iCAAiC;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,wCAAwC;AACrE;AACA;AACA;AACA;AACA,iDAAiD,gBAAe;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,QAAQ,yBAAyB,QAAQ;AAC7E;AACA;AACA,MAAM,cAAc;AACpB;AACA;AACA;AACA,WAAW,cAAc;AACzB;AACA,yBAAyB,QAAQ;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,cAAc;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,6BAA6B,wCAAwC;AACrE,iBAAiB,yBAAyB;AAC1C;AACA,kHAAkH;AAClH;AACA,mBAAmB,uCAAuC;AAC1D,oBAAoB,EAAE;AACtB;AACA;AACA,oBAAoB,8BAAM;AAC1B;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iCAAiC,wCAAwC;AACzE,kCAAkC,yCAAyC;;AAE3E,yCAAyC,QAAQ;AACjD,2CAA2C,QAAQ;AACnD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,YAAkB;AACjD;;AAEA,iBAAiB,aAAM;AACvB;AACA;;AAEA;AACA,SAAS,cAAc;AACvB;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ;AAC/B,4BAA4B,QAAQ;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ,cAAc;AACtB;AACA;AACA;;AAEA;;AAEA;;AAEA,0BAA0B,kBAAiB;AAC3C,MAAM,YAAkB;AACxB;AACA;AACA;AACA,eAAe,mCAAmC;AAClD,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,iBAAiB,0CAA0C;AAC3D;AACA;AACA;AACA,mBAAmB,mCAAmC;AACtD;AACA;AACA;AACA,SAAS;AACT;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,mCAAmC;AAChD,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,qFAAqF;AAClG,aAAa,qDAAqD;AAClE,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD,kBAAkB,aAAa;AAC/B;AACA,UAAU,mBAAyB;AACnC;AACA;AACA,KAAK;AACL,gBAAgB,aAAa;AAC7B;AACA,QAAQ,mBAAyB;AACjC;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,YAAmB;;;AAGrB;AACA;AACA,WAAW,uCAAuC;AAClD,YAAY,QAAQ;AACpB;AACA,qCAAyB;AACzB,6BAA6B,SAAS;AACtC;;;AAGA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uCAAuC;AAClD,YAAY,0BAA0B;AACtC;AACA,qCAAyB;AACzB,aAAa,qCAAyB,YAAY,wCAAwC;AAC1F;;;AAGe,4FAAyB,EAAC;;AAEzC,uC;;ACxbA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA,CAAC,EAAC;;AAEF,gD;;ACvBA;AACA;AACA;AACqC;AACM;AACA;AACF;AACU;AACF;AACC;AACxB;AACkF;AACrC;AACN;AACzB;AACY;AACc;AACoB;AACzC;AACQ;AACwC;AAOjE;;;AAG5B;AACA,UAAU;AACV;AACA;AACA,YAAY,UAAU,UAAU,UAAU;AAC1C,IAAI,UAAU,cAAc,UAAU,QAAQ,UAAU;AACxD,aAAa,UAAU,UAAU,UAAU;AAC3C;;;AAGA;AACA,UAAU;AACV;AACA;AACA,YAAY,UAAU;AACtB,aAAa,UAAU,QAAQ,UAAU,OAAO,UAAU;AAC1D,YAAY,KAAK;AACjB;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI,6CAA6B;AACjC;;AAEA;;AAEA;AACA;AACA;AACA;AACA,iDAAiD,eAAK;;AAEtD;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,yBAAyB,MAAe;;AAExC;;AAEA;AACA,qCAAqC,oBAAoB;;AAEzD,uBAAuB,oBAAoB;AAC3C,qBAAqB,4CAAqB;AAC1C;;;AAGA,IAAI,mCAAM,CAAC,UAAU,EAAE,4BAAS;;AAEhC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI,qCAAQ,CAAC,UAAU,EAAE,4BAAS;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC,yCAAyC,2CAA2C;AACpF;AACA,yCAAyC,2CAA2C;AACpF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,+BAA+B,sCAAsC;AACrE,sBAAsB,2CAA2C;AACjE;;AAEA;AACA;AACA;AACA;AACA,2BAA2B,wCAAwC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,2CAA2C;AACxD,aAAa,OAAO;AACpB,aAAa,2CAA2C;AACxD;AACA;AACA;AACA;;AAEA,2BAA2B,wCAAwC;AACnE;AACA,iCAAiC,wCAAwC;;AAEzE;AACA;AACA;AACA;AACA;;AAEA,4BAA4B,6CAA6C;AACzE;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,SAAS;AAC5C;AACA;;AAEA;AACA;AACA,yBAAyB,eAAe;AACxC,2BAA2B,aAAM;AACjC,QAAQ,aAAM;AACd;AACA;AACA,WAAW,UAAoB;AAC/B;AACA;AACA;AACA;AACA,4BAA4B,kBAAiB;AAC7C;AACA,6BAA6B,mBAAyB;;AAEtD;AACA,iBAAiB,uCAAuC;AACxD,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA,2CAA2C,UAAK;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAU;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C,QAAQ;AACtD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;;AAEA,mCAAmC,kDAAkD;;AAErF;AACA;AACA,0CAA0C,QAAQ;AAClD;AACA,uBAAuB,aAAM;AAC7B,WAAW,kBAAkB;AAC7B;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,qCAAqC,kBAAkB;AACvD;AACA,kHAAkH;AAClH;AACA,qBAAqB,uCAAuC;AAC5D,sBAAsB,EAAE;AACxB;AACA;AACA,sBAAsB,8BAAM;AAC5B;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA,aAAa,sCAAsC;AACnD,aAAa,2CAA2C;AACxD,cAAc,uCAAuC;AACrD;AACA;AACA;AACA;AACA,4BAA4B,6CAA6C;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,UAAU;AAC3B;AACA;AACA;AACA,WAAW,iBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2BAA2B,wCAAwC;AACnE;AACA,sBAAsB,oBAAoB;AAC1C,sDAAsD;AACtD,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,cAAc;AACtB;AACA;AACA;AACA;AACA;AACA,oCAAoC,QAAQ,yBAAyB,QAAQ;AAC7E;AACA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C,8BAA8B,2CAA2C;AACzE,+BAA+B,SAAS;AACxC;AACA;AACA;AACA;AACA;AACA,kDAAkD,QAAQ;AAC1D;AACA,uCAAuC,SAAS;AAChD;AACA;AACA,uCAAuC,kBAAkB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,eAAe;AACvB;AACA;AACA,QAAQ,cAAc;AACtB,qBAAqB,OAAO,0BAA0B,OAAO;AAC7D;AACA;AACA;AACA;;AAEA;AACA,aAAa,uCAAuC;AACpD,aAAa,OAAO;AACpB,aAAa,qFAAqF;AAClG,aAAa,qDAAqD;AAClE,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD,kBAAkB,aAAa;AAC/B;AACA;AACA;AACA,KAAK;AACL,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,2CAA2C;AACxD,aAAa,OAAO;AACpB,aAAa,2CAA2C;AACxD;AACA;AACA;AACA,2BAA2B,wCAAwC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA;AACA,wBAAwB,eAAc;AACtC,QAAQ,kBAAc;AACtB,QAAQ,sBAAkB;AAC1B,qCAAqC,kBAAkB;AACvD;AACA,oDAAoD;AACpD;AACA;AACA;;AAEA;AACA,CAAC,CAAC,gBAAuB;;;AAGzB;AACA;AACA,WAAW,uCAAuC;AAClD,YAAY,QAAQ;AACpB;AACA,6CAA6B;AAC7B,6BAA6B,SAAS;AACtC;;;AAGA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uCAAuC;AAClD,YAAY,8BAA8B;AAC1C;AACA,6CAA6B;AAC7B,aAAa,6CAA6B,YAAY,4CAA4C;AAClG;;;AAGe,iGAA6B,EAAC;;AAE7C,2C;;AChgBA;AACA;AACA;AAC6C;AACiB;AACG;AACjC;AACuC;AACd;AACY;AACI;AACQ;;AAEjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,QAAQ;AACR;AACA,4CAA4C,2BAA2B;AACvE,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,gCAAgC;AAC9C;AACA;AACA,2BAA2B,sCAAsC;AACjE;AACA;AACA;AACA;AACA,6CAA6C;AAC7C,qBAAqB,2BAA2B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAG;AACP;AACA,cAAc,gCAAM,GAAG;AACvB;AACA,yBAAyB,QAAe;AACxC;AACA;AACA,6BAA6B,oBAAmB;AAChD;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,uBAAuB,UAAiB;AACxC;AACA,MAAM,UAAwB;AAC9B,MAAM,gBAAuB;AAC7B,MAAM,kBAAyB;AAC/B,MAAM,eAA6B;AACnC;AACA;AACA;;AAEA;AACA,CAAC,CAAC,eAAY;;;AAGC,kDAAG,EAAC;;AAEnB,+B;;AClGA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;;;AAGA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,YAAY,sBAAsB;AAClC;AACO;AACP;AACA,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA,0BAA0B,uBAAuB;AACjD;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA,UAAU;AACV;AACA,qBAAqB;;;AAGrB;AACA;AACA,UAAU;AACV;AACA,eAAe;;;AAGf;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ,YAAM,cAAc,kBAAkB;AAC9C,QAAQ,QAAE,cAAc,YAAM,GAAG,mCAAmC;AACpE,QAAQ,QAAE;AACV;AACA,oCAAoC,OAAO,KAAK,QAAE,cAAc,QAAE;AAClE,mBAAmB,QAAE;AACrB;AACA,GAAG;AACH;AACA;AACA;;AAE2C;;AAE3C,iC;;ACnVA;AACA;AACA;AACoC;;AAEpC;AACA;AACA;AACA,IAAI,kBAAW;;AAEf;AACA;AACA,YAAY;AACZ;AACA;;AAEA;;AAEA;AACA,YAAY,QAAQ;AACpB;AACA,kBAAW;AACX;AACA;;AAEA;AACA;AACA,YAAY,OAAO;AACnB;AACA,kBAAW;AACX,SAAS,gCAAQ;AACjB;;AAEA;AACA,YAAY,OAAO;AACnB;AACA,kBAAW;AACX;AACA;;;AAGe,6DAAW,EAAC;;AAE3B,kC;;AC3CA;AACA;AACA;;AAE4C;AACC;;AAE7C,IAAI,sBAAa;AACjB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B;;AAEA;AACA,CAAC,CAAC,MAAW;;;AAGE,mEAAa,EAAC;;AAE7B,oC;;AC7BA;AACA;AACA;;AAE0C;AACG;;AAE7C,IAAI,kBAAW;AACf;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;;AAEA;AACA,CAAC,CAAC,MAAW;;;AAGE,6DAAW,EAAC;;AAE3B,kC;;AC7BA;AACA;AACA;AACA;AACA;;AAEuD;AACA;AACJ;;AAE5C,mBAAmB,QAAa,CAAC,KAAW;AACnD,2BAA2B,wBAAwB,wBAAwB,4BAA4B,6BAA6B,gCAAgC,2BAA2B,6BAA6B,sBAAsB,qBAAqB,4IAA4I,4IAA4I,uDAAuD,wDAAwD,sCAAsC,mCAAmC,mCAAmC,OAAO,OAAO,qCAAqC,OAAO,wEAAwE,KAAK,iCAAiC,uGAAuG,wCAAwC,wEAAwE,OAAO,KAAK,OAAO,iCAAiC,8CAA8C,2CAA2C,8BAA8B,qCAAqC,OAAO,2CAA2C,0EAA0E,6DAA6D,OAAO,KAAK,gDAAgD,gCAAgC,cAAc,KAAK,GAAG;AACpnD,2BAA2B,eAAe,eAAe,gBAAgB,gBAAgB,gBAAgB,eAAe,eAAe,eAAe,gBAAgB,gEAAgE,gEAAgE,+CAA+C,gDAAgD,kBAAkB,aAAa,gBAAgB,KAAK,gBAAgB,iDAAiD,kBAAkB,eAAe,kBAAkB,gDAAgD,MAAM,eAAe,0BAA0B,sBAAsB,oBAAoB,gBAAgB,oCAAoC,4DAA4D,6BAA6B,iCAAiC,wBAAwB,UAAU;;AAE/3B,iBAAiB,MAAW,CAAC,KAAW;AAC/C,yBAAyB,wBAAwB,4BAA4B,6BAA6B,gCAAgC,gCAAgC,2BAA2B,oCAAoC,mCAAmC,oCAAoC,4BAA4B,6BAA6B,qBAAqB,mEAAmE,wEAAwE,gCAAgC,iDAAiD,kCAAkC,2BAA2B,qCAAqC,KAAK,gBAAgB,2FAA2F,iGAAiG,8MAA8M,KAAK,iCAAiC,gCAAgC,KAAK,iCAAiC,+BAA+B,KAAK,OAAO,8BAA8B,KAAK,iJAAiJ,0GAA0G,mDAAmD,6CAA6C,KAAK,GAAG;AACxnD,kBAAkB,eAAe,gBAAgB,gBAAgB,iBAAiB,kBAAkB,kBAAkB,eAAe,eAAe,eAAe,gBAAgB,gBAAgB,gBAAgB,sBAAsB,6BAA6B,IAAI,oBAAoB,gBAAgB,mBAAmB,iBAAiB,YAAY,qBAAqB,WAAW,uBAAuB,gBAAgB,wBAAwB,gBAAgB,uBAAuB,KAAK,sBAAsB,wFAAwF,qCAAqC,0BAA0B,8BAA8B;;AAEprB,yC;;AClBA;AACA;AACA;AACA;AACA;;AAE0D;;AAE1D,IAAI,mBAAS;;AAEb;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;;AAEe,+EAAS,EAAC;;AAEzB,qC;;ACtFA;AACA;AACA;;;AAGA;AACA,YAAY,cAAc;AAC1B;AACO,SAAS,WAAM;AACtB;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,oCAAoC;AAC/C,YAAY,cAAc;AAC1B;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gC;;AC5BA;AACA;AACA;AACuC;AACG;AACM;AAOpB;AAC4B;AAEF;;AAEtD,IAAI,kBAAW;AACf;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,kBAAkB,gBAAS;;AAE3B;AACA;AACA,cAAc;AACd;AACA,6BAA6B,MAAe;;AAE5C;AACA;AACA,cAAc;AACd;AACA,+BAA+B,MAAe;;AAE9C;AACA;AACA,cAAc;AACd;AACA,8BAA8B,MAAe;;AAE7C;AACA;AACA,cAAc;AACd;AACA,oBAAoB,WAAM;;AAE1B;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,yCAAyC;AACtD,cAAc,WAAW;AACzB;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA;AACA,aAAa,yCAAyC;AACtD;AACA;AACA,IAAI,gCAAQ;AACZ;;AAEA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC,aAAa,yCAAyC;AACtD,aAAa,6BAA6B;AAC1C,aAAa,OAAO;AACpB,cAAc;AACd;AACA;AACA,kEAAkE;AAClE;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC,aAAa;AACb;AACA;AACA,kEAAkE;AAClE;AACA;AACA,IAAI,gCAAQ;AACZ;;AAEA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC,aAAa,yCAAyC;AACtD,aAAa,wBAAwB;AACrC,aAAa,QAAQ;AACrB;AACA;AACA,IAAI,gCAAQ;AACZ;;AAEA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC,aAAa,yCAAyC;AACtD,aAAa,wBAAwB;AACrC,aAAa,4FAA4F;AACzG,aAAa,kCAAkC;AAC/C,cAAc,YAAY;AAC1B;AACA;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA;AACA,aAAa,sBAAsB;AACnC,aAAa,yCAAyC;AACtD,aAAa,wBAAwB;AACrC,aAAa,4FAA4F;AACzG,aAAa,QAAQ;AACrB,aAAa,kCAAkC;AAC/C,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,sBAAsB;AACnC,aAAa,yCAAyC;AACtD,aAAa,wBAAwB;AACrC,aAAa,4FAA4F;AACzG,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,aAAa,yCAAyC;AACtD,aAAa,yCAAyC;AACtD,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,6BAA6B;AAC1C,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,wBAAwB;AACrC,aAAa,4FAA4F;AACzG,aAAa,QAAQ;AACrB,aAAa,kCAAkC;AAC/C,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,uBAAuB,YAAY;;AAEnC,uBAAuB,oBAAoB;;AAE3C;;AAEA;AACA,2BAA2B,eAAc;AACzC,IAAI,kBAAc;AAClB,IAAI,mBAAe;AACnB,IAAI,sBAAkB;;AAEtB,4BAA4B,eAAc;AAC1C,IAAI,kBAAc;;AAElB,6BAA6B,eAAc;AAC3C;AACA,MAAM,mBAAe;AACrB;;AAEA;AACA,MAAM,aAAa;AACnB;AACA,MAAM,aAAa;AACnB;AACA,MAAM,aAAa;AACnB;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gCAAgC,OAAO;AACvC,mBAAmB,OAAO,gCAAgC,OAAO;AACjE,gCAAgC,OAAO;AACvC,8BAA8B,OAAO;AACrC,mBAAmB,OAAO,oCAAoC,OAAO;AACrE;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,sBAAsB;AACnC,aAAa,yCAAyC;AACtD,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA,MAAM,YAAY,GAAG,cAAc;AACnC;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;;AAEA;AACA,CAAC,CAAC,oBAAa;;;AAGA,mEAAW,EAAC;;AAE3B,kC;;ACpXA;AACA;AACA;;;AAGA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;AAEP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;AAEP;AACA;AACA,UAAU;AACV;AACO;;AAEP;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,kBAAkB;AAC9B;AACO;AACP;AACA;AACA;AACA;;;AAGA,iC;;ACvGA;AACA;AACA;AACmE;;AAEnE;AACA,UAAU;AACV;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,WAAW;AAC1B,gBAAgB,YAAY;AAC5B;;;AAGA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;;AAEA;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;;AAEA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEe,sDAAW,EAAC;;AAE3B,kC;;AC/CA;AACA;AACA;AACqC;AACC;AACC;AACI;AACN;AACkB;AACU;AACC;AAC5B;AAEqB;AACtB;AACW;;AAEhD,IAAI,8BAAiB;AACrB;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,QAAQ;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,mBAAS;AACjC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,6CAA6C,cAAc;AAC3D,+CAA+C,cAAc;AAC7D,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,8BAA8B,MAAW;;AAEzC;AACA,6BAA6B,MAAW;;AAExC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qCAAqC,QAAQ,EAAE,MAAM;;AAErD;AACA;AACA;AACA,sBAAsB,uBAAS;AAC/B;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA,oDAAoD,KAAK;AACzD;;AAEA;AACA,uDAAuD,KAAK;AAC5D;;AAEA;AACA,kDAAkD,KAAK;AACvD;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,iCAAO;AAChB;AACA,KAAK;AACL;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,0CAA0C,cAAc;AACxD,4CAA4C,cAAc;AAC1D,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA,wCAAwC,cAAc;AACtD,0CAA0C,cAAc;AACxD,mBAAmB,OAAO;AAC1B;;AAEA;AACA;AACA;AACA;;AAEA,gCAAgC,8BAAM;AACtC;AACA,4CAA4C,iBAAU;AACtD,yBAAyB,cAAc;AACvC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,sBAAsB;AACnC,aAAa,yCAAyC;AACtD,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA,wCAAwC,cAAc;AACtD,0CAA0C,cAAc;AACxD,mBAAmB,OAAO;AAC1B;;AAEA;AACA;AACA;AACA;;AAEA,gCAAgC,8BAAM;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,sBAAsB;AACnC,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,sBAAsB;AACnC,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA,SAAS,KAAK,mBAAmB;AACjC,OAAO;AACP,2BAA2B,mBAAmB;AAC9C;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA,OAAO,KAAK,iBAAiB;AAC7B,KAAK;AACL,uBAAuB,iBAAiB;AACxC;AACA,qCAAqC,MAAM;AAC3C,mCAAmC,MAAM;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,YAAW;;;AAGE,+EAAiB,EAAC;;AAEjC,wC;;ACtZA;AACA;AACA;AACA;AACA;;AAEuD;AACA;AACJ;;AAE5C,IAAI,sBAAQ,OAAO,QAAa,CAAC,KAAW;AACnD,2BAA2B,0BAA0B,0BAA0B,4BAA4B,4BAA4B,qBAAqB,mDAAmD,oCAAoC,qDAAqD,uBAAuB,cAAc,KAAK,2BAA2B,GAAG;AAChX,2BAA2B,eAAe,gBAAgB,gBAAgB,oBAAoB,gBAAgB,6BAA6B,8BAA8B,2BAA2B,eAAe,SAAS,sBAAsB;;AAE3O,IAAI,oBAAM,OAAO,MAAW,CAAC,KAAW;AAC/C,2BAA2B,0BAA0B,8BAA8B,4BAA4B,2BAA2B,4BAA4B,mCAAmC,oCAAoC,mCAAmC,oCAAoC,qBAAqB,4CAA4C,kCAAkC,gEAAgE,KAAK,4DAA4D,4EAA4E,4BAA4B,0BAA0B,GAAG;AAC7pB,kBAAkB,gBAAgB,iBAAiB,iBAAiB,iBAAiB,kBAAkB,kBAAkB,eAAe,eAAe,eAAe,gBAAgB,oBAAoB,WAAW,kBAAkB,0CAA0C,sCAAsC,IAAI,KAAK;;AAEhU,yC;;AClBA;AACA;AACA;AACA;AACA;;AAE0D;;AAE1D,IAAI,iCAAS;;AAEb;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;;AAEe,2GAAS,EAAC;;AAEzB,qC;;AC1EA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA,CAAC,EAAC;;AAEF,4C;;ACZA;AACA;AACA;AACkC;AACyB;AACjB;AACL;AACY;AACjB;AAC2E;AAC/C;;;AAG5D;AACA,aAAa,OAAO;AACpB,cAAc,8BAA8B;AAC5C,cAAc,YAAY;AAC1B;;;AAGA;AACA;AACA;AACA;AACA,IAAI,oBAAY;AAChB;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA,kCAAkC,QAAQ,CAAC,UAAgB;;AAE3D;AACA;AACA;AACA;;AAEA,IAAI,mCAAM,eAAe,gBAAgB;AACzC;AACA,IAAI,mCAAM,eAAe,gBAAgB;AACzC;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,oBAAoB,8BAAM;AAC1B;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,qBAAqB,gBAAgB;AACrC,oBAAoB,YAAY;AAChC;AACA,OAAO,oBAAoB,oBAAoB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA,oBAAoB,8BAAM;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI,wCAAW;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,sBAAsB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C,cAAc,YAAY;AAC1B;AACA;AACA,oBAAoB,8BAAM;AAC1B;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,gCAAgC;AAC7C,aAAa,8BAA8B;AAC3C,cAAc,aAAa;AAC3B;AACA;AACA,qBAAqB,8BAAM,+BAA+B,8BAAM;AAChE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI,+BAAK;AACT,IAAI,+BAAK;AACT,IAAI,+BAAK;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,aAAa;AAC1B,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,gCAAU;;;AAGZ;AACA,WAAW,sBAAsB;AACjC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,UAAU,EAAE,cAAc;AAChC;AACA;AACA;AACA,MAAM,UAAU,EAAE,cAAc;AAChC;;AAEA;AACA;;;AAGA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,aAAa;AACzB;AACO;AACP;AACA;AACA;AACA;;;AAGA;AACA,WAAW,sBAAsB;AACjC,WAAW,oDAAoD;AAC/D,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,aAAa;AACzB;AACO;AACP;AACA;AACA;AACA;;AAEe,gEAAY,EAAC;;AAE5B,mC;;AC3WA;AACA;AACA;AAC+C;AACJ;AACN;AAC6B;AACC;AAC7B;AAC0B;AACX;;AAErD,IAAI,gCAAkB;AACtB;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA;AACA,6BAA6B,OAAO;AACpC,6BAA6B,OAAO;AACpC,4BAA4B,OAAO;AACnC,iCAAiC,OAAO;AACxC,gCAAgC,OAAO;AACvC,6BAA6B,OAAO;AACpC,6BAA6B,OAAO;AACpC,6BAA6B,OAAO;AACpC;AACA;AACA,8BAA8B,OAAO;AACrC,2BAA2B,OAAO;AAClC,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,oBAAoB;AACjC,aAAa,2DAA2D;AACxE,aAAa,8BAA8B;AAC3C,aAAa,sBAAsB;AACnC;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;;AAEA,YAAY,8BAAM;AAClB;AACA;AACA,OAAO;AACP,kBAAkB,aAAa;AAC/B,qBAAqB,aAAa,EAAE,aAAa;AACjD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qCAAqC,sBAAQ,EAAE,oBAAM;;AAErD;AACA;AACA;AACA,sBAAsB,qCAAS;AAC/B;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA,oDAAoD,KAAK;AACzD;;AAEA;AACA,mDAAmD,KAAK;AACxD;;AAEA;AACA,oDAAoD,KAAK;AACzD;;AAEA;AACA,mDAAmD,KAAK;AACxD;;AAEA;AACA,0DAA0D,KAAK;AAC/D;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS,iCAAO;AAChB;AACA,KAAK;AACL;AACA,kDAAkD,QAAQ;AAC1D,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC,aAAa,yCAAyC;AACtD,aAAa,wBAAwB;AACrC;AACA,aAAa,oBAAoB;AACjC,aAAa,cAAc;AAC3B;AACA;AACA;;AAEA;AACA,qCAAqC,QAAQ;AAC7C,qBAAqB,UAAU;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,gCAAgC,8BAAM;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD,qBAAqB,UAAU;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,gCAAgC,8BAAM;AACtC;AACA,4CAA4C,iBAAU;AACtD,yBAAyB,cAAc;AACvC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB,cAAc,oBAAoB;AAClC;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA;AACA;AACA,cAAc,oBAAoB;AAClC;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA,CAAC,CAAC,YAAW;;;AAGE,kFAAkB,EAAC;;AAElC,yC;;ACneA;AACA;AACA;AACqC;AACe;AACJ;;AAEhD,IAAI,4BAAgB;AACpB;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,8BAA8B,MAAW;;AAEzC;;AAEA;AACA,6BAA6B,MAAW;;AAExC;AACA,eAAe,6BAA6B;AAC5C;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,UAAU,8BAAM,kBAAkB,8BAAM;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA,UAAU,8BAAM,kBAAkB,8BAAM;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,aAAkB;;;AAGL,kFAAgB,EAAC;;AAEhC,uC;;ACvKA;AACA;AACA;AACuD;;AAEvD;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA,aAAa,eAAc;AAC3B;AACA;AACA;;AAEA,oC;;ACtBA;AACA;AACA;AACA;AACA;;AAEuD;AACA;AACJ;;AAE5C,IAAI,uCAAQ,OAAO,QAAa,CAAC,KAAW;AACnD,2BAA2B,wBAAwB,6BAA6B,4BAA4B,gCAAgC,uBAAuB,sBAAsB,6BAA6B,qBAAqB,wBAAwB,0JAA0J,gFAAgF,gBAAgB,OAAO,KAAK,2BAA2B,wCAAwC,uBAAuB,cAAc,KAAK,2BAA2B,GAAG;AACppB,2BAA2B,gBAAgB,qBAAqB,gBAAgB,gBAAgB,eAAe,eAAe,gBAAgB,gBAAgB,UAAU,4EAA4E,6CAA6C,UAAU,gBAAgB,kBAAkB,eAAe,SAAS,sBAAsB;;AAEpX,IAAI,qCAAM,OAAO,MAAW,CAAC,KAAW;AAC/C,yBAAyB,6BAA6B,4BAA4B,+BAA+B,4BAA4B,2BAA2B,8BAA8B,oCAAoC,mCAAmC,oCAAoC,4BAA4B,6BAA6B,qDAAqD,mCAAmC,4DAA4D,GAAG,4FAA4F,sCAAsC,6EAA6E,oDAAoD,GAAG,yFAAyF,wCAAwC,oGAAoG,8CAA8C,0CAA0C,4DAA4D,gEAAgE,8CAA8C,gBAAgB,kBAAkB,kBAAkB,KAAK,qDAAqD,iDAAiD,KAAK,GAAG,gGAAgG,4BAA4B,oGAAoG,8CAA8C,0CAA0C,4DAA4D,6CAA6C,yBAAyB,wCAAwC,0EAA0E,qDAAqD,mFAAmF,6BAA6B,uEAAuE,KAAK,OAAO,sDAAsD,kFAAkF,6BAA6B,uEAAuE,KAAK,uNAAuN,kEAAkE,4EAA4E,2EAA2E,gFAAgF,2FAA2F,4FAA4F,mCAAmC,qGAAqG,wDAAwD,wDAAwD,kCAAkC,wBAAwB,KAAK,OAAO,kEAAkE,gDAAgD,KAAK,sBAAsB,GAAG,iIAAiI,gBAAgB,sCAAsC,0CAA0C,wGAAwG,4DAA4D,gGAAgG,yDAAyD,6BAA6B,kBAAkB,kBAAkB,KAAK,GAAG,qBAAqB,4BAA4B,+CAA+C,mEAAmE,gBAAgB,mEAAmE,0DAA0D,oBAAoB,oCAAoC,+BAA+B,kGAAkG,qDAAqD,KAAK,kGAAkG,sDAAsD,KAAK,sDAAsD,iDAAiD,KAAK,sDAAsD,uEAAuE,KAAK,qDAAqD,mEAAmE,KAAK,sDAAsD,oEAAoE,KAAK,sBAAsB,2DAA2D,sCAAsC,KAAK,OAAO,2CAA2C,KAAK,GAAG;AACt/K,mBAAmB,qBAAqB,gBAAgB,iBAAiB,iBAAiB,iBAAiB,kBAAkB,eAAe,eAAe,eAAe,gBAAgB,gBAAgB,+CAA+C,6BAA6B,+CAA+C,oFAAoF,qBAAqB,kEAAkE,+BAA+B,iFAAiF,sBAAsB,sDAAsD,uCAAuC,iBAAiB,qDAAqD,uDAAuD,oCAAoC,UAAU,YAAY,WAAW,yBAAyB,uCAAuC,yFAAyF,sBAAsB,sDAAsD,uCAAuC,iBAAiB,qDAAqD,uCAAuC,qBAAqB,sBAAsB,4BAA4B,yCAAyC,sEAAsE,aAAa,mCAAmC,KAAK,0CAA0C,qEAAqE,aAAa,mCAAmC,yEAAyE,sDAAsD,gEAAgE,+DAA+D,4DAA4D,qEAAqE,sEAAsE,6BAA6B,6EAA6E,0CAA0C,0CAA0C,0BAA0B,iBAAiB,KAAK,uDAAuD,qCAAqC,mBAAmB,kHAAkH,UAAU,qBAAqB,oCAAoC,yFAAyF,oDAAoD,iFAAiF,2BAA2B,qBAAqB,YAAY,YAAY,iBAAiB,sBAAsB,+BAA+B,sBAAsB,YAAY,+BAA+B,wCAAwC,MAAM,QAAQ,mBAAmB,gEAAgE,qCAAqC,qEAAqE,sCAAsC,uCAAuC,mCAAmC,uCAAuC,6DAA6D,sCAAsC,2CAA2C,uCAAuC,4CAA4C,gBAAgB,+CAA+C,6BAA6B,KAAK,mCAAmC;;AAE3wH,yC;;AClBA;AACA;AACA;AACA;AACA;;AAE0D;;AAE1D,IAAI,kDAAS;;AAEb;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;;AAEe,+HAAS,EAAC;;AAEzB,qC;;AC5FA;AACA;AACA;AACqC;AACC;AACC;AACI;AACqB;AACT;AACQ;AAC1B;AAGY;AACX;AAC+B;AACC;AACjC;AACW;;;AAGhD;AACA,UAAU;AACV;AACA,IAAI,4BAAW;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,IAAI,sCAAqB;AACzB;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;;AAEA,8BAA8B,QAAQ;;AAEtC;;AAEA;AACA;AACA;AACA;AACA;AACA,2CAA2C,MAAM;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS;AACT;;AAEA;AACA;AACA,yBAAyB,4BAAW;;AAEpC;AACA,0BAA0B,4BAAW;;AAErC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,uBAAuB,4BAAW;;AAElC;AACA,wBAAwB,4BAAW;;AAEnC;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,uBAAuB,4BAAW;;AAElC;AACA,wBAAwB,4BAAW;;AAEnC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,yBAAyB,4BAAW;;AAEpC;AACA,0BAA0B,4BAAW;;AAErC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,aAAa,0BAA0B;AACvC;;AAEA;AACA,eAAe,4BAAW;;AAE1B;AACA,eAAe,4BAAW;;AAE1B;AACA,gBAAgB,4BAAW;;AAE3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,4BAAW;;AAE5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,qBAAqB;AAClC;;AAEA;AACA,eAAe,4BAAW;;AAE1B;AACA,gBAAgB,4BAAW;;AAE3B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,cAAc;AAC3B,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,cAAc,MAAM;AACpB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA,2BAA2B,mBAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,qBAAqB;AAClC,aAAa,OAAO;AACpB;AACA;AACA,SAAS,kBAAkB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,QAAQ;AAC1D,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,mEAAmE;AAChF,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,8BAA8B,MAAW;;AAEzC;AACA,6BAA6B,MAAW;;AAExC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qCAAqC,uCAAQ,EAAE,qCAAM;;AAErD;AACA;AACA;AACA,sBAAsB,wCAAS;AAC/B;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA,mDAAmD,KAAK;AACxD;;AAEA;AACA,oDAAoD,KAAK;AACzD;;AAEA;AACA,mDAAmD,KAAK;AACxD;;AAEA;AACA,qDAAqD,KAAK;AAC1D;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kCAAkC,OAAO;AACzC,kCAAkC,QAAQ;;AAE1C;AACA;AACA;AACA;AACA;;AAEA,SAAS,iCAAO;AAChB;AACA,KAAK;AACL;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,sBAAsB;AACnC,aAAa,yCAAyC;AACtD,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gCAAgC,8BAAM;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gCAAgC,8BAAM;AACtC;AACA,4CAA4C,iBAAU;AACtD,yBAAyB,cAAc;AACvC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,sBAAsB;AACnC,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA,kCAAkC,sBAAsB;AACxD;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA,OAAO,KAAK,mBAAmB;AAC/B,KAAK;AACL,yBAAyB,mBAAmB;AAC5C;AACA;AACA;AACA,yBAAyB,iBAAiB;AAC1C;AACA;AACA,8BAA8B,kBAAkB;AAChD,qCAAqC,MAAM;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,YAAW;;;AAGE,iGAAqB,EAAC;;AAErC,4C;;AC5pBA;AACA;AACA;AACA;AACA;;AAEuD;AACA;AACJ;;AAE5C,IAAI,oCAAQ,OAAO,QAAa,CAAC,KAAW;AACnD,2BAA2B,6BAA6B,0BAA0B,qBAAqB,2BAA2B,wCAAwC,uBAAuB,cAAc,KAAK,2BAA2B,GAAG;AAClP,2BAA2B,eAAe,gBAAgB,gBAAgB,eAAe,kBAAkB,eAAe,SAAS,sBAAsB;;AAElJ,IAAI,kCAAM,OAAO,MAAW,CAAC,KAAW;AAC/C,iCAAiC,oCAAoC,mCAAmC,oCAAoC,qBAAqB,kEAAkE,GAAG;AACtO,oBAAoB,eAAe,eAAe,eAAe,gBAAgB,+BAA+B;;AAEhH,yC;;AClBA;AACA;AACA;AACA;AACA;;AAE0D;;AAE1D,IAAI,+CAAS;;AAEb;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;;AAEe,yHAAS,EAAC;;AAEzB,qC;;AClDA;AACA;AACA;AACkC;;;AAGlC;AACA,aAAa,OAAO;AACpB,cAAc,gEAAgE;AAC9E,QAAQ,4BAA4B,MAAM,oCAAoC;AAC9E,gBAAgB;AAChB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,cAAc;AAC5B;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;;;AAGA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA,YAAY,gEAAgE;AAC5E;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gEAAgE;AAC3E;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,0BAA0B,8BAAM;AAChC;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEe,uDAAM,EAAC;;AAEtB,kC;;AC1RA;AACA;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,KAAK;AACnB,cAAc,KAAK;AACnB,cAAc,EAAE;AAChB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;;AAEA,aAAa,KAAK;AAClB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;;AAGe,iEAAU,EAAC;;AAE1B,sC;;ACnQA;AACA;AACA;AACkC;AACR;AAC0B;AAClB;;AAElC;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,WAAK;;AAET;AACA;AACA;AACA,gBAAgB,eAAK;;AAErB;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;;AAEA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,EAAE;AACb;AACA,WAAK;AACL,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,8BAAM;AACpB;;;AAGA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,SAAS;AACpB;AACA,WAAK;AACL;AACA,oCAAoC,OAAO;AAC3C;AACA;;AAEA,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAAM;AACtB;AACA;AACA;;;AAGA;AACA;AACA,WAAW,EAAE;AACb,YAAY,QAAQ;AACpB;AACA,WAAK;AACL,YAAY,8BAAM;;AAElB;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,EAAE;AACb;AACA,WAAK;AACL,yBAAyB,8BAAM;AAC/B;AACA,OAAO,aAAM;AACb;AACA;AACA;AACA;;;AAGA;AACA;AACA,YAAY,SAAS;AACrB;AACA,WAAK;AACL;AACA;AACA;AACA,GAAG;AACH;;;AAGA;AACA;AACA,WAAW,8BAA8B;AACzC,YAAY,SAAS;AACrB;AACA,WAAK;AACL,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;AAGA;AACA;AACA;AACA;AACA,WAAW,wBAAwB;AACnC,WAAW,GAAG;AACd,YAAY,EAAE;AACd;AACA;AACA,WAAK;AACL;AACA;;;AAGA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,wBAAwB;AACnC,WAAW,GAAG;AACd,YAAY,EAAE;AACd;AACA;AACA,WAAK;AACL;AACA;;;AAGA;AACA,WAAW,SAAS;AACpB,WAAW,wBAAwB;AACnC,WAAW,GAAG;AACd;AACA,YAAY,EAAE;AACd;AACA;AACA,WAAK;AACL;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,YAAY,QAAQ;AACpB;AACA,WAAK;AACL,SAAS,iCAAO;AAChB;;;AAGA;AACA;AACA;AACA,WAAK;AACL;AACA;AACA;;;AAGA;AACA,WAAW,+BAA+B;AAC1C,YAAY,8BAA8B;AAC1C;AACA,WAAK;AACL;AACA,SAAS,cAAc;AACvB;;;AAGA;AACA,WAAW,MAAM;AACjB;AACA,WAAK;AACL;AACA;AACA;AACA;AACA;;;AAGe,6DAAK,EAAC;;AAErB,iC;;AC7OA;AACA;AACA;AACqC;AACC;AACC;AACI;AACN;AAC4B;AACD;AACT;AACW;AACC;AACT;AACpB;AAC6C;AACxC;AACU;AACV;AACN;AACW;;;AAGhD;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB;;AAEA;AACA,aAAa,OAAO;AACpB,cAAc,cAAc;AAC5B,cAAc,cAAc;AAC5B;;;AAGA,IAAI,gCAAkB;AACtB;AACA;;AAEA,gCAAgC,sBAAqB;AACrD;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,eAAe;AACf,gCAAgC;AAChC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B,aAAa,qBAAqB;AAClC,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,wBAAwB,kBAAU;AAClC,oBAAoB,aAAK;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kDAAkD,QAAQ;AAC1D;AACA,oBAAoB,kBAAU;AAC9B;AACA,qBAAqB,aAAK;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,iBAAiB,sBAAsB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,8CAA8C;AAC3D,aAAa,yCAAyC;AACtD,aAAa,QAAQ;AACrB;AACA;AACA,sBAAsB,qBAAqB;AAC3C;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA,eAAe,cAAc;AAC7B;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,8CAA8C;AAC3D,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA,aAAa,8CAA8C;AAC3D,aAAa,yCAAyC;AACtD,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,0BAA0B;AACnD;AACA,QAAQ,0BAA0B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,aAAa,8CAA8C;AAC3D,aAAa,OAAO;AACpB,aAAa,8CAA8C;AAC3D,aAAa,OAAO;AACpB,aAAa,yCAAyC;AACtD,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,cAAc;AAC7B,cAAc;AACd;AACA;AACA,eAAe,cAAc;AAC7B;;AAEA,uDAAuD,eAAe;AACtE,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA,4BAA4B,0BAA0B;AACtD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB;AACpB,oBAAoB;;AAEpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,8CAA8C;AAC3D,aAAa,yCAAyC;AACtD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,8CAA8C;AAC3D,aAAa,yCAAyC;AACtD,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,+CAA+C,eAAe;AAC9D;AACA;AACA;AACA,cAAc,qBAAqB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA,aAAa,8CAA8C;AAC3D,aAAa,yCAAyC;AACtD,aAAa,SAAS;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,aAAa,8CAA8C;AAC3D,aAAa,yCAAyC;AACtD,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,aAAa,8CAA8C;AAC3D,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,WAAW,qBAAqB;AAChC;;AAEA;AACA;AACA,aAAa,8CAA8C;AAC3D,aAAa,yCAAyC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,kBAAU;AACvC,2BAA2B,aAAK;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B,aAAa,cAAc;AAC3B,aAAa,8CAA8C;AAC3D,aAAa,0CAA0C;AACvD,cAAc,eAAe;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,8CAA8C;AAC5D,cAAc,yCAAyC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B,aAAa,cAAc;AAC3B,aAAa,cAAc;AAC3B,aAAa,yCAAyC;AACtD,aAAa,SAAS;AACtB,cAAc,qBAAqB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA;AACA,cAAc,oBAAoB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,eAAe;AAC5B,aAAa,yCAAyC;AACtD,aAAa,SAAS;AACtB,cAAc,sBAAsB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B,aAAa,cAAc;AAC3B,aAAa,cAAc;AAC3B,aAAa,cAAc;AAC3B,aAAa,SAAS;AACtB,cAAc,wBAAwB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,OAAO,aAAa,OAAO;AACzD,eAAe,OAAO,aAAa,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B,aAAa,cAAc;AAC3B,aAAa,cAAc;AAC3B,aAAa,cAAc;AAC3B,aAAa,cAAc;AAC3B,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,QAAQ;AAC1C;AACA;AACA,wBAAwB,mBAAS;AACjC;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA,+BAA+B,mBAAS;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,mBAAS;AAC/B;AACA;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA,6BAA6B,mBAAS;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,8BAA8B,MAAW;;AAEzC;AACA,6BAA6B,MAAW;;AAExC;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qCAAqC,oCAAQ,EAAE,kCAAM;;AAErD;AACA;AACA;AACA,sBAAsB,qCAAS;AAC/B;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA,oDAAoD,KAAK;AACzD;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kCAAkC,OAAO;AACzC,kCAAkC,QAAQ;;AAE1C;AACA;AACA;AACA;AACA;;AAEA,SAAS,iCAAO;AAChB;AACA,KAAK;AACL;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gCAAgC,8BAAM;AACtC;AACA,4CAA4C,iBAAU;AACtD,yBAAyB,cAAc;AACvC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,sBAAsB;AACnC,aAAa,yCAAyC;AACtD,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gCAAgC,8BAAM;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,sBAAsB;AACnC,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA,OAAO,KAAK,iBAAiB;AAC7B,KAAK;AACL,uBAAuB,iBAAiB;AACxC;AACA,mCAAmC,MAAM;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,gCAAgC,YAAM;AACtC;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,CAAC,CAAC,YAAW;;;AAGE,wFAAkB,EAAC;;AAElC,yC;;ACvhCA;AACA;AACA;AACgD;;;AAGhD;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,kBAAkB;AAChC;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA,IAAI,WAAK;;AAET;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA,wBAAwB,sCAAsC;;AAE9D;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA,kBAAkB,4CAAqB;;AAEvC;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,YAAY,WAAW;AACvB;AACA,WAAK;AACL;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,mDAAmD;AAC9D;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,WAAW;AACvB;AACA,WAAK;AACL,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,WAAK;AACL;AACA;;AAEA,aAAa,WAAW;AACxB;AACA,aAAa,WAAW;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB;AACA,WAAK;AACL,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEe,2DAAK,EAAC;;AAErB,iC;;ACpMA;AACA;AACA;AACuE;AAClC;AACN;;;AAG/B;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;;;AAGA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,kBAAkB;AAChC,cAAc,kBAAkB;AAChC;;;AAGA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,yBAAY;;AAEhB;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,uBAAuB,gBAAsB;AAC7C,QAAQ,gBAAsB;;AAE9B;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA,uBAAuB,WAAK;;AAE5B;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA,0BAA0B,WAAK;AAC/B;;AAEA;AACA,WAAW,OAAO;AAClB,YAAY,kBAAkB;AAC9B;AACA;AACA,yBAAY;AACZ,aAAa,gCAAgC;AAC7C;;AAEA;AACA;AACA;AACA,2BAA2B,+BAA+B;;AAE1D;AACA;;AAEA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,OAAO;AAClB,YAAY,gCAAgC;AAC5C;AACA;AACA,yBAAY;AACZ,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA,yBAAY;AACZ;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,mDAAmD;AAC9D;AACA,WAAW,oDAAoD;AAC/D;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA,yBAAY;AACZ;AACA;AACA;AACA;;AAEA,aAAa,gCAAgC;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,4BAA4B,yBAAI;;AAEhC,2BAA2B,+BAA+B;AAC1D;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,mDAAmD;AAC9D;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,gCAAgC;AAC5C;AACA;AACA,yBAAY;AACZ;AACA;AACA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,kBAAkB,WAAK;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEe,gFAAY,EAAC;;AAE5B,wC;;ACxPA;AACA;AACA;AACqC;AACU;AACI;AACG;AACR;AACN;AAG2C;AAC/B;AACG;AACP;;AAEhD;AACA,aAAa,OAAO;AACpB,cAAc,8CAA8C;AAC5D,cAAc,uBAAuB;AACrC,cAAc,OAAO;AACrB;;;AAGA,IAAI,0BAAe;AACnB;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,0BAA0B,4CAAqB;;AAE/C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,uCAAuC,uCAAuC;AAC9E;AACA,aAAa,YAAY;AACzB,uCAAuC,2CAA2C;AAClF;AACA,aAAa,YAAY;AACzB,uCAAuC,gDAAgD;AACvF;AACA;AACA,aAAa,YAAY;AACzB,uCAAuC,wCAAwC;AAC/E;AACA,aAAa,YAAY;AACzB,uCAAuC,6CAA6C;AACpF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oCAAoC,QAAQ;AAC5C;AACA;AACA;;AAEA,wCAAwC,QAAQ;AAChD;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA,kBAAkB,8BAAM,kBAAkB,8BAAM;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA,kCAAkC,QAAQ;AAC1C;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA;AACA,mCAAmC,cAAc;AACjD,oCAAoC,eAAe;AACnD,sCAAsC,OAAO;AAC7C;AACA;AACA,cAAc,gBAAgB;AAC9B;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C,yBAAyB,OAAO;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,8BAA8B,MAAW;;AAEzC;AACA,6BAA6B,MAAW;;AAExC;AACA,eAAe,6BAA6B;AAC5C;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,OAAO;AACP;AACA,0BAA0B,WAAW;AACrC,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,4BAA4B,WAAW;AACvC,iCAAiC,mBAAmB;AACpD,wDAAwD,iBAAiB;AACzE,wDAAwD,eAAe;AACvE,sEAAsE,sBAAsB;AAC5F,0DAA0D,gBAAgB;AAC1E,8DAA8D,kBAAkB;AAChF;AACA,uDAAuD,gBAAgB;AACvE;AACA,0CAA0C,YAAY;AACtD;AACA,8BAA8B,OAAO;AACrC,sBAAsB,UAAU;AAChC,yBAAyB,UAAU;AACnC;AACA,QAAQ,iBAAiB;AACzB;AACA,QAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,WAAW;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAY;AAC/B;AACA,SAAS;AACT,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,qBAAqB;AAClC,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,aAAkB;;;AAGL,+EAAe,EAAC;;AAE/B,sC;;AC7cA;AACA;AACA;;AAEyD;AACY;AAChC;AACF;AACS;AACM;AACF;AACU;AACN;AACN;;AAE9C;AACA,UAAU;AACV;AACA;;AAEA;AACA,UAAU;AACV;AACA,IAAI,8BAAkB;AACtB,YAAY,YAAiB;AAC7B,WAAW,iBAAgB;AAC3B,gBAAgB,sBAAqB;AACrC,aAAa,mBAAkB;AAC/B,UAAU,gBAAe;AACzB;;;AAGA,IAAI,4BAAgB;AACpB;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,yCAAyC;AACtD,cAAc,WAAW;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,yCAAyC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,8BAAkB;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,iCAAO;AAClB;;AAEA;AACA,aAAa,yCAAyC;AACtD,aAAa,yCAAyC;AACtD,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,6BAA6B;AAC1C,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,wBAAwB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA,YAAY,yBAAyB;;AAErC;AACA,+BAA+B,QAAQ;AACvC;AACA,uBAAuB,KAAK,QAAQ,QAAQ;AAC5C,yBAAyB,KAAK;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,yCAAyC;AACtD,aAAa,yCAAyC;AACtD,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,6BAA6B;AAC1C,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,wBAAwB;AACrC,aAAa,4FAA4F;AACzG,aAAa,QAAQ;AACrB,aAAa,kCAAkC;AAC/C;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA,KAAK;;AAEL;AACA,+BAA+B,QAAQ;AACvC;AACA,eAAe,KAAK,YAAY,QAAQ;AACxC,yBAAyB,KAAK;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,yCAAyC;AACtD,aAAa,yCAAyC;AACtD,aAAa,yCAAyC;AACtD,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,6BAA6B;AAC1C,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,wBAAwB;AACrC,aAAa,4FAA4F;AACzG,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,kBAAkB,aAAM,CAAC,4BAA4B;AACrD;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,mEAAmE;AACpF,kBAAkB,EAAE;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,aAAa,yCAAyC;AACtD,aAAa,yCAAyC;AACtD,aAAa,yCAAyC;AACtD,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,6BAA6B;AAC1C,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,wBAAwB;AACrC,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,mEAAmE;AACpF,kBAAkB,QAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;;AAEA;AACA,CAAC,CAAC,kBAAW;;;AAGE,kFAAgB,EAAC;;AAEhC,uC;;ACtVA;AACA;AACA;;AAE2C;AACW;AACZ;AACM;AACA;;AAEhD,IAAI,gCAAsB;AAC1B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,mCAAmC;AAChD,aAAa,yEAAyE;AACtF;AACA;AACA;AACA;AACA,4BAA4B,kCAAkC;AAC9D,+BAA+B,UAAU;AACzC;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,yCAAyC;AAC/C;AACA,aAAa,yEAAyE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,kCAAkC,sCAAsC;AACxE;AACA,WAAW,YAAY;AACvB,uCAAuC,2CAA2C;AAClF;AACA,WAAW,YAAY;AACvB,oCAAoC,wCAAwC;AAC5E;AACA,WAAW,YAAY;AACvB,uCAAuC,2CAA2C;AAClF;AACA,WAAW,YAAY;AACvB,4CAA4C,gDAAgD;AAC5F;AACA,WAAW,YAAY;AACvB,yCAAyC,6CAA6C;AACtF;AACA,WAAW,YAAY;AACvB,+CAA+C,mDAAmD;AAClG;AACA,WAAW,YAAY;AACvB,mCAAmC,uCAAuC;AAC1E;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAU;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iBAAgB;AAC1C,4BAA4B,mCAAmC;AAC/D,+BAA+B,UAAU;AACzC;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iBAAgB;AAC1C,4BAA4B,mCAAmC;AAC/D,+BAA+B,UAAU;AACzC;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iBAAgB;AAC1C,4BAA4B,wCAAwC;AACpE,+BAA+B,UAAU;AACzC;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iBAAgB;AAC1C,4BAA4B,wCAAwC;AACpE,+BAA+B,UAAU;AACzC;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iBAAgB;AAC1C,4BAA4B,qCAAqC;AACjE,+BAA+B,UAAU;AACzC;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iBAAgB;AAC1C,4BAA4B,qCAAqC;AACjE,+BAA+B,UAAU;AACzC;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iBAAgB;AAC1C,4BAA4B,oCAAoC;AAChE,+BAA+B,UAAU;AACzC;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,oBAAa;;;AAGA,oFAAsB,EAAC;;AAEtC,qC;;ACxYA;AACA;AACA;AACA;AACA;;AAEoD;AACA;AACJ;;AAEzC,IAAI,yBAAQ,OAAO,QAAa,CAAC,KAAW;AACnD,2BAA2B,0BAA0B,8BAA8B,8BAA8B,qBAAqB,qDAAqD,oCAAoC,4CAA4C,GAAG;AAC9Q,2BAA2B,eAAe,gBAAgB,oBAAoB,gBAAgB,6BAA6B,8BAA8B,6BAA6B;;AAE/K,IAAI,uBAAM,OAAO,MAAW,CAAC,KAAW;AAC/C,2BAA2B,gCAAgC,4BAA4B,kCAAkC,kCAAkC,qBAAqB,gEAAgE,kEAAkE,GAAG;AACrT,kBAAkB,iBAAiB,iBAAiB,eAAe,eAAe,gBAAgB,4BAA4B,wBAAwB;;AAEtJ,4C;;AClBA;AACA;AACA;AACA;AACA;;AAEuD;;AAEvD,IAAI,oCAAS;;AAEb;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;;AAEe,mGAAS,EAAC;;AAEzB,qC;;AClDA;AACA;AACA;AACuC;AACS;AACQ;AACa;AAC7B;AACe;AACC;AACK;AACL;AAEG;AACX;AACU;;AAE1D;AACA;AACA;AACA,IAAI,wBAAkB;AACtB;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,4BAA4B,MAAW;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,0BAA0B,MAAe;;AAEzC;AACA;AACA,cAAc;AACd;AACA,4BAA4B,MAAe;;AAE3C;AACA,cAAc;AACd;AACA;AACA,oBAAoB,WAAM;;AAE1B;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,2CAA2C;AACxD,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC,iBAAiB,iBAAiB;AAClC,iBAAiB,aAAa;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,mBAAmB,mDAAmD;AACtE;;AAEA,oBAAoB,kBAAkB;AACtC;;AAEA;AACA,yBAAyB,WAAW;AACpC,8BAA8B,WAAW;AACzC,QAAQ,iBAAiB,EAAE,UAAU;;AAErC;AACA;AACA;;AAEA,KAAK;AACL,yBAAyB,WAAW;AACpC;;AAEA;;AAEA;AACA,aAAa,2CAA2C;AACxD,aAAa,qCAAqC;AAClD,aAAa,yCAAyC;AACtD;AACA;;AAEA,+BAA+B,gBAAe;;AAE9C,uBAAuB,YAAY;;AAEnC;;AAEA,qCAAqC,yBAAQ,EAAE,uBAAM;;AAErD;AACA;AACA,sBAAsB,0BAAS;AAC/B;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,iCAAiC,KAAK;AACtC;AACA;AACA,iCAAiC,KAAK;AACtC;AACA;;AAEA;AACA,MAAM,aAAa;AACnB;AACA,MAAM,aAAa;AACnB;AACA,mBAAmB,UAAU;AAC7B,kBAAkB,cAAc;;AAEhC,+BAA+B,gBAAe;AAC9C;;AAEA;AACA,aAAa,4CAA4C;AACzD,aAAa,yCAAyC;AACtD,aAAa,2CAA2C;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uBAAuB,eAAsB;AAC7C;AACA,6BAA6B,YAAW;AACxC;AACA;AACA;AACA;;AAEA;AACA,cAAc,wCAAwC;AACtD;AACA;AACA;AACA;;AAEA;AACA,cAAc,aAAa;AAC3B;AACA;AACA;AACA;;AAEA;AACA,cAAc,wCAAwC;AACtD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,2CAA2C;AACxD,aAAa,qCAAqC;AAClD,aAAa,yCAAyC;AACtD,cAAc,QAAQ;AACtB;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA;AACA,aAAa,+BAA+B;AAC5C,aAAa,2CAA2C;AACxD,aAAa,6FAA6F;AAC1G;AACA,aAAa,EAAE;AACf,cAAc,YAAY;AAC1B;AACA;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA,CAAC,CAAC,cAAa;;;AAGA,wEAAkB,EAAC;;AAElC,iC;;ACzQA;AACA;AACA;AACkE;AACvB;AACF;AACU;AACM;AACb;AAUhB;AACiB;AACQ;;AAErD;AACA;AACA;AACA;AACA;AACA,IAAI,kCAAuB;AAC3B;;AAEA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,qCAAqC;AAClD;AACA,cAAc,aAAa;AAC3B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,WAAW,aAAa;AACxB,wBAAwB,aAAa,EAAE,aAAa;AACpD;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,uCAAuC;AACvE,iCAAiC,wCAAwC;;AAEzE;;AAEA;AACA;AACA,uBAAuB,eAAe;AACtC;AACA,eAAe,QAAQ,sBAAsB,QAAQ;AACrD,SAAS,cAAO;AAChB;AACA,WAAW,0BAA0B;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C,uBAAuB,aAAa;AACpC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,yBAAyB,mDAAmD;AAC5E;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,eAAc;AACpB,MAAM,kBAAc;AACpB,MAAM,sBAAkB;;AAExB;AACA;AACA;;AAEA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,yCAAyC;AACtD,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,iCAAiC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,IAAI,eAAc;AAClB,IAAI,kBAAc;AAClB;AACA;AACA,IAAI,mBAAe;AACnB,IAAI,sBAAkB;AACtB;AACA;AACA,IAAI,kBAAc;AAClB;AACA;AACA,IAAI,sBAAkB;;AAEtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,6BAA6B,KAAc;AAC3C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,4CAAqB;AACpD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,6BAA6B;AAC1C,aAAa,6BAA6B;AAC1C,cAAc,uCAAuC;AACrD;AACA;AACA;AACA;AACA;AACA,4BAA4B,MAAe;AAC3C,IAAI,sBAAkB;AACtB,IAAI,kBAAc;AAClB,IAAI,sBAAkB;AACtB,IAAI,kBAAc;;AAElB;AACA;AACA,8BAA8B,MAAe;;AAE7C;AACA,oBAAoB,MAAe;AACnC,IAAI,sBAAkB;AACtB,IAAI,kBAAc;AAClB,IAAI,kBAAc;AAClB,IAAI,sBAAkB;;AAEtB,IAAI,QAAiB;AACrB,IAAI,QAAiB;;AAErB;AACA;;AAEA;AACA,CAAC,CAAC,WAAkB;;;AAGpB;AACA;AACA,WAAW,uCAAuC;AAClD,YAAY,QAAQ;AACpB;AACA,kCAAuB;AACvB,6BAA6B,SAAS;AACtC;;;AAGA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uCAAuC;AAClD,YAAY,wBAAwB;AACpC;AACA,kCAAuB;AACvB,aAAa,kCAAuB;AACpC,eAAe,2BAA2B;AAC1C,eAAe,uCAAuC;AACtD;AACA;;;AAGe,uFAAuB,EAAC;;AAEvC,sC;;AC1SA;AACA;AACA;;AAE0C;AACM;AACG;AACZ;AACkB;AACT;AACQ;AACa;AACjB;AACJ;AACC;AACU;AAIY;AACrB;AACa;;;AAG/D;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,aAAa;AAC3B;;;AAGA;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI,oBAAgB;AACpB;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA,6BAA6B,kBAAkB;AAC/C;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,4BAA4B,4CAAqB;;AAEjD;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,cAAc;AACd;AACA,wBAAwB,OAAY;;AAEpC,IAAI,mCAAM,eAAe,gBAAgB;AACzC;AACA,IAAI,mCAAM,eAAe,gBAAgB;AACzC;;AAEA;AACA;AACA,cAAc;AACd;AACA,6BAA6B,gBAAQ;;AAErC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,iCAAiC,qBAAa;AAC9C;AACA,iBAAiB,SAAS;AAC1B,kBAAkB,OAAO;AACzB,gBAAgB;AAChB;AACA;AACA,oCAAoC,yCAAyC;AAC7E,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,iBAAiB,SAAS;AAC1B,kBAAkB,OAAO;AACzB;AACA;AACA;AACA,qBAAqB,gCAAgC;AACrD;AACA,OAAO;;;AAGP;AACA,eAAe,wCAAwC;AACvD,eAAe,4CAA4C;AAC3D,gBAAgB,QAAQ;AACxB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,gCAAgC;AAClE,sCAAsC,6BAA6B;AACnE,wCAAwC,OAAO;AAC/C;AACA,0CAA0C,MAAM,EAAE,MAAM;AACxD;AACA;AACA,SAAS;;;AAGT;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,gCAAgC;AAC7C,aAAa,6BAA6B;AAC1C,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA,UAAU,UAAU,EAAE,kBAAkB;AACxC;AACA;AACA;AACA;AACA,UAAU,UAAU,EAAE,kBAAkB;AACxC;AACA;AACA,KAAK;AACL;AACA,iCAAiC,qCAAqC;AACtE,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,sBAAsB,UAAU;AAChC,UAAU,IAAI,EAAE,IAAI;AACpB,UAAU,aAAa;AACvB,OAAO;AACP,sBAAsB,UAAU;AAChC,UAAU,IAAI,EAAE,IAAI;AACpB,UAAU,aAAa;AACvB;AACA;AACA,QAAQ,UAAU,EAAE,kBAAkB;AACtC;AACA,QAAQ,UAAU,EAAE,kBAAkB;AACtC,uBAAuB,UAAU,EAAE,cAAc;AACjD,QAAQ,aAAa;AACrB,uBAAuB,UAAU,EAAE,cAAc;AACjD,QAAQ,aAAa;AACrB;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,aAAa,4CAA4C;AACzD,aAAa,2CAA2C;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,8BAA8B,eAAsB;AACpD;AACA,6BAA6B,YAAW;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD,aAAa,2CAA2C;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,yCAAyC;AACvD;AACA;AACA;AACA;;AAEA;AACA,cAAc,sBAAsB;AACpC;AACA;AACA;AACA;;AAEA;AACA,cAAc,wDAAwD;AACtE;AACA;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,6BAA6B;AAC7D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qBAAqB,QAAQ;AAC7B;AACA,MAAM,SAAS,EAAE,mBAAmB;AACpC,MAAM,GAAG,EAAE,mBAAmB;AAC9B,eAAe,SAAS;AACxB,eAAe,UAAU;AACzB,eAAe,YAAY;AAC3B,eAAe,YAAY;AAC3B;;AAEA;AACA,aAAa,gCAAgC;AAC7C,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,6BAA6B,gBAAe;;AAE5C,eAAe,4CAA4C;AAC3D;AACA;AACA,IAAI,UAAU,mBAAmB,YAAY;;AAE7C;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA,UAAU,mBAAmB;AAC7B,oCAAoC,KAAW;AAC/C,uCAAuC,6BAA6B;AACpE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,uBAAuB,WAAW;;AAElC;AACA,aAAa,gBAAgB;AAC7B,cAAc,KAAK;AACnB;;AAEA,8CAA8C,QAAQ;AACtD;AACA,uCAAuC,6BAA6B;AACpE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,mBAAmB,mDAAmD;AACtE;AACA;;AAEA;AACA;AACA;AACA;;AAEA,6BAA6B,gBAAe;;AAE5C;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA,UAAU,mBAAmB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA,UAAU,mBAAmB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA,UAAU,mBAAmB;AAC7B;AACA,uCAAuC,6BAA6B;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,YAAW;;;AAGE,kEAAgB,EAAC;;AAEhC,+B;;ACzkBA;AACA;AACA;AACuC;AACJ;AACU;AACC;;;AAG9C;AACA,6BAA6B,qBAAqB;AAClD,KAAK,OAAO;AACZ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;;AAEA;AACA,IAAI,iCAAiC;AACrC;AACA;AACA,2BAA2B,oCAAoC;AAC/D,mBAAmB,OAAO;AAC1B,IAAI,gCAAgC;AACpC,mBAAmB,OAAO;AAC1B;AACA;AACA,aAAa;AACb,yEAAyE;AACzE;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,SAAI;AACR;AACA;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,4BAAS;AAChC;;AAEA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6BAA6B,SAAS;AACtC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,KAAK;;AAE/B;AACA,6BAA6B,SAAS;AACtC;AACA;AACA;AACA;AACA;AACA,OAAO,6BAA6B,SAAS;AAC7C;AACA;AACA;AACA,OAAO,6BAA6B,SAAS;AAC7C;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,cAAc,mCAAmC;AACjD;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;;AAEA;AACA,yDAAyD,mDAAmD;AAC5G,oDAAoD;AACpD;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA,2CAA2C;AAC3C;AACA;AACA;AACA,WAAW,MAAM;AACjB;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,yBAAW;;;AAGE,qDAAI,EAAC;;AAEpB,gC;;AC1SA;AACA;AACA;AAC6B;AACU;AACQ;AACO;AACR;;;AAG9C,IAAI,mBAAS;AACb;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;;AAEA;AACA;AACA,cAAc,oDAAoD;AAClE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA,mBAAmB,SAAS;AAC5B,KAAK;AACL,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B,mBAAmB,SAAS;AAC5B;AACA;AACA,QAAQ,uCAAU,cAAc,4BAAS;AACzC;AACA,QAAQ,uCAAU,cAAc,4BAAS;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,kCAAa;AACjD;AACA;;AAEA;AACA,CAAC,CAAC,OAAI;;;AAGN;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA,YAAY,4CAAqB;AACjC;AACA;AACA;AACA;;AAEe,oEAAS,EAAC;;AAEzB,qC;;ACxKA;AACA;AACA;;;AAGA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,YAAY,UAAU;AACtB;AACO,SAAS,wBAAc;AAC9B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,OAAO;AACnB;AACO,SAAS,gBAAM;AACtB;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,UAAU;AACtB;AACO;AACP;AACA;;;AAGA;AACA,WAAW,UAAU;AACrB,YAAY,OAAO;AACnB;AACO,SAAS,cAAI;AACpB;AACA;;;AAGA;AACA,WAAW,UAAU;AACrB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,UAAU;AACrB,WAAW,0CAA0C;AACrD,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA,qC;;AC5HA;AACA;AACA;AAC6C;AACE;;AAE/C,IAAI,mBAAS;AACb;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,kDAAkD;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA,oBAAoB,gBAAM;AAC1B;AACA;AACA,KAAK;AACL;;AAEA;AACA,CAAC,CAAC,gBAAQ;;;AAGK,oEAAS,EAAC;;AAEzB,qC;;ACxDA;AACA;AACA;AACoC;AACE;AACU;AACX;;;AAGrC;AACA;AACA;AACA;AACA,aAAa,0EAA0E;AACvF;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,0CAA0C;AACvG;AACA,aAAa,iCAAiC;AAC9C;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,gBAAgB;AAC9B,cAAc,QAAQ;AACtB,cAAc,oCAAoC;AAClD,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB;;;AAGA;AACA;AACA,uBAAuB;AACvB;AACA,mBAAmB,kCAAkC;AACrD;AACA;AACA;AACA;AACA;AACA,IAAI,aAAM;AACV;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA,uBAAuB,QAAa;;AAEpC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,sBAAsB,KAAW;;AAEjC;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,aAAa;AAC3B;AACA;AACA;AACA;;AAEA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,wCAAwC;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,wBAAwB;AACtC;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA,uCAAuC,mCAAmC;AAC1E,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,0BAA0B;AACvC,uDAAuD,0CAA0C;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,4BAAU;;;AAGZ;AACA;AACA,WAAW,0BAA0B;AACrC,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGe,+DAAM,EAAC;;AAEtB,kC;;AChNA;AACA;AACA;AAC8C;AACT;AACgD;AAC7B;AACA;AACvB;AACC;AACwC;;;AAG1E;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,8BAA8B;AAC5C,gCAAgC,4BAA4B;AAC5D;AACA,cAAc,OAAO;AACrB,cAAc,sCAAsC;AACpD;AACA;AACA,cAAc,6CAA6C;AAC3D;AACA;AACA;AACA;AACA,cAAc,eAAe;AAC7B;AACA;AACA,cAAc,iCAAiC;AAC/C,cAAc,iCAAiC;AAC/C;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iBAAQ;;AAEZ;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA,EAAE,MAAM,CAAC,QAAQ;AACjB;AACA,GAAG,aAAa;;;AAGhB;AACA;AACA;AACA,sDAAsD,QAAQ;AAC9D;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,YAAY;AACZ;AACA;;;AAGA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,IAAI,MAAM;AACV,UAAU;AACV;;AAEA;;AAEA;AACA;AACA,mBAAmB,UAAU;AAC7B;;AAEA,EAAE,MAAM;AACR;AACA,QAAQ;;AAER;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,IAAI,MAAM;AACV,UAAU;AACV;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC,EAAE,MAAM;AACR;AACA;AACA,QAAQ;;AAER;AACA;AACA,YAAY;AACZ;AACA;;;AAGA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,0BAA0B,YAAS;AACnC;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,OAAO;AAClB,WAAW,8CAA8C;AACzD;AACA;AACA,iBAAQ;AACR;AACA,mDAAmD,SAAS;AAC5D,qDAAqD,SAAS;AAC9D;AACA;AACA;AACA;;AAEA;AACA,WAAW,oCAAoC;AAC/C,WAAW,sEAAsE;AACjF,WAAW,GAAG;AACd,WAAW,mCAAmC;AAC9C,WAAW,+BAA+B;AAC1C,YAAY,QAAQ;AACpB;AACA;AACA,iBAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,wBAAuB;AACzC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,8BAA8B;AAC1C;AACA,iBAAQ;AACR;AACA;;AAEA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA,iBAAQ;AACR;AACA;;AAEA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA,iBAAQ;AACR;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,sCAAsC;AAClD;AACA;AACA,iBAAQ;AACR;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA,iBAAQ;AACR;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA,iBAAQ;AACR;AACA;;AAEA;AACA,WAAW,oCAAoC;AAC/C,WAAW,mCAAmC;AAC9C,WAAW,+BAA+B;AAC1C,YAAY,kCAAkC;AAC9C;AACA,iBAAQ;AACR;AACA;AACA;AACA;AACA,aAAa,wBAAuB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,kCAAkC;AAC7C,WAAW,+BAA+B;AAC1C,YAAY,8BAA8B;AAC1C;AACA,iBAAQ;AACR;AACA;AACA,iBAAiB,MAAM;AACvB;AACA;AACA;AACA;AACA,SAAS,cAAc;AACvB;;AAEA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,OAAO;AAClB,WAAW,mCAAmC;AAC9C,YAAY,kCAAkC;AAC9C;AACA,iBAAQ;AACR;AACA;AACA;AACA;AACA;AACA,SAAS,wBAAuB;AAChC;;AAEA;AACA,WAAW,oCAAoC;AAC/C,YAAY,sCAAsC;AAClD;AACA,iBAAQ;AACR;AACA;AACA,iBAAiB,MAAM;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,+BAA+B;AAC1C,YAAY,8BAA8B;AAC1C;AACA;AACA,iBAAQ;AACR;AACA;AACA,iBAAiB,MAAM;AACvB;AACA;AACA;AACA;AACA,SAAS,cAAc;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,OAAO;AAClB,WAAW,qCAAqC;AAChD,YAAY,oCAAoC;AAChD;AACA;AACA,iBAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,qCAAqC;AAChD,YAAY,oCAAoC;AAChD;AACA;AACA,iBAAQ;AACR;AACA;AACA;AACA,iBAAiB,MAAM;;AAEvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA,SAAS,wBAAuB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,qCAAqC;AAChD,YAAY,oCAAoC;AAChD;AACA;AACA,iBAAQ;AACR;AACA;AACA,iBAAiB,MAAM;;AAEvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA,SAAS,wBAAuB;AAChC;;AAEA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,OAAO;AAClB,WAAW,qCAAqC;AAChD,YAAY,oCAAoC;AAChD;AACA;AACA,iBAAQ;AACR;AACA;AACA;;AAEA;AACA,WAAW,oCAAoC;AAC/C,YAAY,OAAO;AACnB;AACA,iBAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,iCAAiC;AAC7C;AACA;AACA,iBAAQ;AACR;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,YAAY,kCAAkC;AAC9C;AACA,iBAAQ;AACR;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA,iBAAQ;AACR,UAAU,iBAAiB;AAC3B,SAAS,KAAK;AACd;;AAEA;AACA,WAAW,+BAA+B;AAC1C;AACA;AACA,iBAAQ;AACR;AACA;AACA,4BAA4B,YAAY;AACxC;AACA;AACA;AACA;;;AAGe,uEAAQ,EAAC;;AAExB,oC;;ACriBA;AACA;AACA;AACyE;AACxC;AAC8D;AACvD;AACwB;AAC5B;AACU;;;AAG9C;AACA,WAAW,uCAAuC;AAClD,YAAY,UAAU;AACtB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,SAAS;AACpB,WAAW,mCAAmC;AAC9C,WAAW,uCAAuC;AAClD,YAAY,mCAAmC;AAC/C;AACO;AACP;AACA;AACA;AACA,OAAO,kBAAkB;AACzB,qBAAqB,QAAQ;AAC7B;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA,WAAW,6BAA6B;AACxC,WAAW,QAAQ;AACnB;AACA,WAAW,iCAAiC;AAC5C;AACA,WAAW,QAAQ;AACnB,YAAY,UAAU;AACtB;AACO;AACP,uDAAuD,MAAM;;AAE7D;;AAEA,aAAa,iBAAQ;AACrB;AACA,YAAY,SAAS;AACrB;AACA;AACA,GAAG;AACH;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,6BAA6B;AAC3C;AACA;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB,cAAc,gCAAgC;AAC9C;;;AAGA;AACA;AACA,WAAW,YAAY;AACvB,YAAY,UAAU;AACtB;AACA;AACO;AACP,aAAa,WAAW;AACxB;;AAEA,oCAAoC,QAAa;;AAEjD,aAAa,yCAAyC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAQ;AACrB;;;AAGA;AACA;AACA,WAAW,6BAA6B;AACxC,WAAW,QAAQ;AACnB;AACA,WAAW,iCAAiC;AAC5C;AACA,YAAY,eAAe;AAC3B;AACA;AACA;AACA,kBAAkB,gBAAgB;;AAElC,eAAe,SAAS;AACxB,cAAc,QAAQ;;AAEtB,iBAAiB,MAAM;AACvB,mBAAmB,iBAAiB;AACpC;AACA;;AAEA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;;;AAGA;AACA,WAAW,mCAAmC;AAC9C,WAAW,QAAQ;AACnB;AACA,WAAW,iCAAiC;AAC5C;AACA,WAAW,QAAQ;AACnB,YAAY,UAAU;AACtB;AACO;AACP;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,mCAAmC;AAC9C,YAAY,6BAA6B;AACzC;AACO;AACP,eAAe,QAAa;AAC5B;AACA;AACA,qBAAqB,eAAe,CAAC,UAAK;AAC1C,aAAa,cAAc;AAC3B;AACA;AACA;;AAEA,oC;;AC3KA;AACA;AACA;AACoC;AACI;AACA;AACD;AACD;AACgB;AACrB;AAC2B;AACuB;;AAEnF;AACA,aAAa,OAAO;AACpB,cAAc,sCAAsC;AACpD,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,oCAAoC;AAClD,cAAc,6BAA6B;AAC3C,cAAc,0CAA0C;AACxD,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;;;AAGA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,IAAI,eAAU;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,yBAAyB,YAAS;;AAElC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,wBAAwB;;AAExB;;AAEA;AACA;AACA;;AAEA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD,aAAa,mDAAmD;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD,aAAa,OAAO;AACpB,aAAa,kCAAkC;AAC/C,aAAa,sDAAsD;AACnE;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,qBAAqB;AACrD,kCAAkC,qBAAqB;AACvD,uBAAuB,SAAS;AAChC;AACA;AACA,4BAA4B,8BAA8B;AAC1D,uCAAuC,SAAS;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,wCAAwC;AACrD,cAAc,8BAA8B;AAC5C;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA;AACA,cAAc,0CAA0C;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD,cAAc,2CAA2C;AACzD;AACA;AACA;AACA,aAAa,gBAAwB;AACrC,KAAK;AACL;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;AACA,qBAAqB,UAAU;AAC/B;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,wCAAwC;AACrD,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB;AACA;AACA,KAAK;AACL,aAAa,UAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,oCAAoC;AACjD,aAAa,yCAAyC;AACtD,cAAc,oCAAoC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,KAAK;AACvB;AACA,WAAW,gBAAgB;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,wCAAwC;AACrD;AACA;;AAEA;AACA,CAAC,CAAC,aAAM;;;AAGR;AACA;AACA,sBAAsB,uCAAuC;AAC7D;AACA;AACO;AACP;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,wBAAK;;AAEQ,+DAAU,EAAC;;AAE1B,gC;;ACpVA;AACA;AACA;AACA;AACA;;AAEoD;AACA;AACJ;;AAEzC,IAAI,wBAAQ,OAAO,QAAa,CAAC,KAAW;AACnD,2BAA2B,0BAA0B,kCAAkC,qBAAqB,oDAAoD,GAAG;AACnK,2BAA2B,eAAe,oBAAoB,gBAAgB,6BAA6B;;AAEpG,IAAI,sBAAM,OAAO,MAAW,CAAC,KAAW;AAC/C,2BAA2B,gCAAgC,4BAA4B,4BAA4B,qBAAqB,+EAA+E,4BAA4B,GAAG;AACtP,kBAAkB,iBAAiB,iBAAiB,eAAe,gBAAgB,oCAAoC,KAAK;;AAE5H,2C;;AClBA;AACA;AACA;AACA;AACA;;AAEuD;;AAEvD,IAAI,mCAAS;;AAEb;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;AACA,YAAY;AACZ;AACA;AACA,aAAa,KAAW;;AAExB;;AAEe,iGAAS,EAAC;;AAEzB,qC;;ACtCA;AACA;AACA;AACA;AACA;;AAE2C;AACA;AACA;AACA;AACG;AACW;AACD;AACN;AACN;AACU;AACC;AAClB;AAOT;AACwE;AACpD;;AAEhD;AACA;AACA;AACA;AACA;AACA,IAAI,gCAAsB;AAC1B;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA,2BAA2B,wBAAQ;;AAEnC;AACA;AACA,cAAc;AACd;AACA,yBAAyB,sBAAM;;AAE/B;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,kCAAkC,MAAW;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,OAAO;AACxB,iBAAiB,qCAAqC;AACtD,kBAAkB,QAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,+BAA+B,sCAAsC;AACrE;AACA,gCAAgC,WAAU;AAC1C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ,MAAM;AACd;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA,iCAAiC,mBAAmB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,gBAAgB;AAC/B,iBAAiB,KAAK;;AAEtB;AACA;AACA;AACA,8BAA8B,yBAAS;AACvC;;AAEA,yBAAyB,YAAY;AACrC;AACA;AACA,uCAAuC,KAAK;AAC5C;AACA;AACA,uCAAuC,KAAK;AAC5C;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,sBAAsB,WAAW;AACjC,6BAA6B,YAAS;AACtC;AACA;AACA,8BAA8B,qBAAqB;AACnD,gCAAgC,qBAAqB;;AAErD;AACA;AACA;AACA;AACA,iBAAiB,iBAAU;AAC3B;AACA;AACA;AACA;AACA,kCAAkC,SAAS;AAC3C,2BAA2B,SAAS;AACpC,2BAA2B,SAAS;AACpC;AACA;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;AACA;AACA;AACA,WAAW,uBAAuB,SAAS;AAC3C,mCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,iBAAiB,cAAc;AAC/B;AACA,cAAc,yBAAyB;AACvC;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;;AAEA,gCAAgC,YAAS;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,MAAM,EAAE,MAAM;AACnD,wBAAwB,cAAc;AACtC;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gCAAgC;AACjD;AACA;AACA,+BAA+B,SAAS;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,IAAI,eAAc;AAClB,IAAI,sBAAkB;AACtB;AACA;AACA;AACA;AACA;AACA,MAAM,mBAAe;AACrB;AACA,IAAI,kBAAc;AAClB;AACA;AACA;AACA;AACA,IAAI,sBAAkB;;AAEtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,KAAc;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,CAAC,CAAC,WAAkB;;;AAGpB;AACA;AACA,WAAW,uCAAuC;AAClD,YAAY,QAAQ;AACpB;AACA,gCAAsB;AACtB,6BAA6B,SAAS;AACtC;;;AAGA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uCAAuC;AAClD,YAAY,uBAAuB;AACnC;AACA,gCAAsB;AACtB,aAAa,gCAAsB;AACnC,eAAe,2BAA2B;AAC1C,eAAe,sCAAsC;AACrD;AACA;;;AAGe,oFAAsB,EAAC;;AAEtC,qC;;ACzaA;AACA;AACA;AACqC;AACM;AACF;AAC2B;AACH;AACoG;AACzH;AACe;;;AAG3D;AACA;AACA;AACA;AACA;AACA,IAAI,oCAAwB;AAC5B;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,2BAA2B,WAAW;;AAEtC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,iBAAiB,yBAAyB;AAC1C;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,mBAAmB,uCAAuC;AAC1D,oBAAoB,EAAE;AACtB;AACA;AACA,oBAAoB,8BAAM;AAC1B;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB,KAAc;AACnC;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iCAAiC,wCAAwC;AACzE,kCAAkC,yCAAyC;;AAE3E,yCAAyC,QAAQ;AACjD,2CAA2C,QAAQ;AACnD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,YAAkB;AACjD;;AAEA,iBAAiB,aAAM;AACvB;;AAEA;AACA;AACA;AACA;AACA,QAAQ,cAAc;AACtB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,0BAA0B,iBAAgB;AAC1C,MAAM,YAAkB;AACxB;AACA;AACA;AACA,eAAe,mCAAmC;AAClD,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,iBAAiB,0CAA0C;AAC3D;AACA;AACA;AACA,mBAAmB,mCAAmC;AACtD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,aAAa,mCAAmC;AAChD,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,qFAAqF;AAClG;AACA,aAAa,oDAAoD;AACjE,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD,kBAAkB,aAAa;AAC/B;AACA,UAAU,mBAAyB;AACnC;AACA;AACA,KAAK;AACL,gBAAgB,aAAa;AAC7B;AACA,QAAQ,mBAAyB;AACjC;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,WAAkB;;;AAGpB;AACA;AACA,WAAW,uCAAuC;AAClD,YAAY,QAAQ;AACpB;AACA,oCAAwB;AACxB,6BAA6B,SAAS;AACtC;;;AAGA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uCAAuC;AAClD,YAAY,yBAAyB;AACrC;AACA,oCAAwB;AACxB,aAAa,oCAAwB;AACrC,eAAe,2BAA2B;AAC1C,eAAe,wCAAwC;AACvD;AACA;;;AAGe,0FAAwB,EAAC;;AAExC,uC;;AC7UA;AACA;AACA;AAC6C;AACY;AACQ;AACjC;AACqC;AACd;AACY;AACI;;;AAGvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,QAAQ;AACR;AACA,4CAA4C,gCAAgC;AAC5E,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,gCAAgC;AAC9C;AACA;AACA,2BAA2B,sCAAsC;AACjE;AACA;AACA;AACA;AACA;AACA,cAAc,kCAAkC;AAChD,IAAI,2BAA2B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iBAAQ;AACZ;AACA,cAAc,gCAAM,GAAG;AACvB;AACA,yBAAyB,QAAe;AACxC;AACA;AACA,6BAA6B,oBAAmB;AAChD;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,uBAAuB,SAAgB;AACvC;AACA,MAAM,gBAAuB;AAC7B,MAAM,eAAsB;AAC5B,MAAM,iBAAwB;AAC9B;AACA;AACA;;AAEA;AACA,CAAC,CAAC,eAAY;;;AAGC,iEAAQ,EAAC;;AAExB,oC;;ACjGA;AACA;AACA;AACgD;AACX;AACF;AACU;AACT;AAC2B;AACtB;;;AAGzC;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACO,IAAI,eAAK;AAChB;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,2CAA2C;AACzD;AACA,cAAc,mBAAmB;AACjC;AACA,cAAc,aAAa;AAC3B;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,mBAAS;AACb;;AAEA;;AAEA;;AAEA;AACA;AACA,gCAAgC,gBAAM;AACtC;AACA,KAAK;;AAEL;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA,+CAA+C,kBAAkB;AACjE;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA,IAAI,mCAAM;AACV,YAAY,+CAAkB;AAC9B;;AAEA,6BAA6B,MAAM,uBAAuB,eAAK;;AAE/D;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAwC,eAAK;AAC7C,MAAM,UAAS;AACf,MAAM,UAAS;AACf;AACA,QAAQ,kBAAkB;AAC1B,iCAAiC,UAAS;AAC1C,iCAAiC,UAAS;AAC1C;AACA;;AAEA;AACA;AACA,iBAAiB,eAAK;AACtB,4BAA4B,eAAe,CAAC,UAAS;AACrD,mCAAmC,UAAS;AAC5C;AACA,OAAO;AACP;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,OAAO;AACP,0BAA0B;AAC1B;AACA,OAAO;AACP,0BAA0B;AAC1B;AACA,KAAK,mBAAmB,eAAK;AAC7B;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK,mBAAmB,eAAK;AAC7B;AACA;AACA,KAAK,mBAAmB,eAAK;AAC7B;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK,mBAAmB,eAAK;AAC7B;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL,MAAM,MAAM,YAAY;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,CAAC,CAAC,0BAAO;;;AAGT;AACA;AACA,WAAW,iCAAiC;AAC5C,UAAU;AACV;AACA;AACO,SAAS,gBAAM;AACtB;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;AAGe,yEAAS,EAAC;;AAEzB,qC;;AC5SA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,sC;;ACdA;AACA;AACA;AACoC;AACY;;AAEhD;AACA,IAAI,8BAA8B;AAClC;AACA;AACA,2BAA2B,8BAA8B;AACzD,OAAO,OAAO;AACd,IAAI,gCAAgC;AACpC;AACA,IAAI,8BAA8B;AAClC;AACA;AACA;AACA,aAAa;AACb,8DAA8D;AAC9D;AACA;;;AAGA;AACA,IAAI,8BAA8B;AAClC;AACA;AACA,2BAA2B,8BAA8B;AACzD,qBAAqB,OAAO;AAC5B,WAAW,gCAAgC;AAC3C,6BAA6B,OAAO;AACpC,aAAa,+FAA+F;AAC5G;AACA;;;AAGA;AACA,WAAW,0BAA0B;AACrC,WAAW,sCAAsC;AACjD,WAAW,sPAAsP;AACjQ;AACA;AACA,WAAW,kGAAkG;AAC7G;AACA;AACA,YAAY,cAAc;AAC1B;AACO;AACP;AACA;AACA,eAAe,6BAA6B;AAC5C,eAAe,OAAO;AACtB,eAAe,uCAAuC;AACtD,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,UAAU;AACxC;AACA;AACA;AACA,iBAAiB,MAAM;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sCAAsC;AAC3D;AACA,sBAAsB,UAAU,iBAAiB,UAAU;AAC3D;AACA,WAAW,kBAAkB,UAAU;AACvC;AACA;AACA;AACA;AACA,WAAW,kBAAkB,UAAU;AACvC,gCAAgC,YAAY;AAC5C;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,sCAAsC;AACjD,YAAY,cAAc;AAC1B;AACA;AACO,SAAS,iBAAG;AACnB;AACA;AACA,eAAe,sCAAsC;AACrD,eAAe,uCAAuC;AACtD;AACA,cAAc;AACd;AACA;AACA,oCAAoC,EAAE;AACtC;AACA,mBAAmB,kCAAkC;AACrD;AACA,KAAK,2BAA2B,yBAAI;AACpC;;AAEA,yC;;ACpIA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,YAAY,oCAAoC;AAChD;AACA;AACO,SAAS,mBAAG;AACnB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,YAAY,oCAAoC;AAChD;AACA;AACO,SAAS,oBAAI;AACpB;AACA;;;AAGA;AACA;AACA,WAAW,yCAAyC;AACpD,YAAY,oFAAoF;AAChG;AACA;AACO,SAAS,oBAAI;AACpB;AACA;AACA,eAAe,6BAA6B;AAC5C,eAAe,OAAO;AACtB,gBAAgB,oCAAoC;AACpD;AACA;AACA;AACA;AACA,iBAAiB,oCAAoC;AACrD;AACA,iBAAiB,mCAAmC;AACpD;AACA,yCAAyC,gCAAgC;AACzE,2CAA2C,gCAAgC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2C;;AC5DA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,mDAAmD;AAC7D;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,2C;;ACtCA;AACA;AACA;;AAEkC;AACQ;AACkB;AACR;AACjB;AACE;AACc;AACZ;AACQ;AACK;AACZ;AACG;AACc;AACZ;AACZ;AACI;AACc;AACX;;AAExC;AACA,6BAA6B,8BAA8B;AAC3D,wBAAwB,8BAA8B;AACtD,2BAA2B,gCAAgC;AAC3D;AACA,aAAa,sFAAsF;AACnG;AACA;;;AAGA;AACA;AACA,sBAAsB,8BAA8B;AACpD;AACA;AACO;AACP;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,wBAAK;;;AAGP;AACA,aAAa,OAAO;AACpB,cAAc,sCAAsC;AACpD,cAAc,mFAAmF;AACjG,6BAA6B,2BAA2B;AACxD;AACA,cAAc,uCAAuC;AACrD;AACA,cAAc,4CAA4C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,cAAc,gBAAgB;AAC9B,kBAAkB;AAClB;AACA,cAAc,wDAAwD;AACtE;AACA,SAAS,kCAAkC;AAC3C,IAAI,oCAAoC;AACxC,yBAAyB,iDAAiD;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI,+DAA+D;AACnE,IAAI,yEAAyE;AAC7E,IAAI,qDAAqD;AACzD,wBAAwB,kEAAkE;AAC1F;AACA;AACA;AACA,IAAI,2BAA2B;AAC/B,IAAI,iEAAiE;AACrE,cAAc,QAAQ;AACtB;AACA;AACA;;;AAGA;AACA;AACA;AACA,iDAAiD,6CAA6C;AAC9F;AACA;AACA;AACA;AACA;AACA,IAAI,mBAAY;AAChB;;AAEA;;AAEA;AACA;AACA;AACA,aAAa,KAAW;AACxB;AACA,KAAK;;AAEL;AACA;AACA,cAAc;AACd;AACA,mBAAmB,yBAAI;;AAEvB;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,KAAK;AACL,MAAM,MAAM,kBAAkB;AAC9B;AACA,qBAAqB,iBAAG,uBAAuB,uCAAuC;AACtF;;AAEA;AACA;AACA,cAAc;AACd;AACA,yEAAyE,mBAAW;;AAEpF;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,gDAAgD,aAAK;;AAErD;AACA;AACA,cAAc,OAAO,sCAAsC;AAC3D;AACA,mCAAmC,aAAK;;AAExC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,uBAAuB,aAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,aAAa,gCAAgC;AAC7C;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,aAAa,gCAAgC;AAC7C;AACA;AACA;AACA,qBAAqB,8BAAM;;AAE3B;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA,4BAA4B,eAAe;AAC3C;;;AAGA;AACA,aAAa,OAAO;AACpB,aAAa,gCAAgC;AAC7C;AACA;AACA;AACA;AACA,MAAM,mCAAM,UAAU,4BAAS;AAC/B;AACA,MAAM,mCAAM,UAAU,kCAAe;AACrC;AACA;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,aAAa,gCAAgC;AAC7C,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,MAAM,MAAM;AACZ,YAAY;AACZ;AACA;AACA;AACA;;;AAGA;AACA;AACA,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;AACA;AACA;;AAEA,6CAA6C,YAAY;AACzD;AACA,uBAAuB,8BAAM;AAC7B;AACA;AACA;AACA;;AAEA,oDAAoD,gBAAgB;AACpE;AACA,yBAAyB,8BAAM;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA,oDAAoD,gBAAgB;AACpE,+CAA+C,eAAe;AAC9D;AACA;;;AAGA;AACA,aAAa,6CAA6C;AAC1D;AACA;AACA;AACA;AACA,IAAI,mCAAM,OAAO,eAAe;AAChC;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,IAAI,mCAAM,OAAO,eAAe;AAChC;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,IAAI,mCAAM,aAAa,mBAAmB;AAC1C;AACA,iBAAiB,2CAA2C;AAC5D;AACA;AACA;AACA;AACA,qCAAqC,gCAAgC;AACrE;AACA;AACA,OAAO;AACP,IAAI,mCAAM,aAAa,mBAAmB;AAC1C;AACA,iBAAiB,2CAA2C;AAC5D;AACA;AACA;AACA;AACA,wCAAwC,gCAAgC;AACxE;AACA;AACA,OAAO;AACP;AACA;;;AAGA;AACA;AACA,aAAa,SAAS,+BAA+B,8DAA8D;AACnH;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kCAAa;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,2CAA2C,eAAe;AAC1D;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,6CAA6C;AAC1D;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,sCAAsC;AACnD,aAAa,6CAA6C;AAC1D;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gHAAgH;AAC1H;AACA;AACA,8BAA8B,4EAA4E;AAC1G;AACA,aAAa,8BAA8B;AAC3C,aAAa,6CAA6C;AAC1D;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,4FAA4F;AAClG;AACA,aAAa,8BAA8B;AAC3C,aAAa,6CAA6C;AAC1D;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gCAAgC;AACjD,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;;AAGA;AACA;AACA;AACA,cAAc,2BAA2B;AACzC,cAAc,4CAA4C;AAC1D;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,cAAc,uCAAuC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,WAAW,iCAAO;AAClB,QAAQ,MAAM,WAAW,mCAAS;AAClC;AACA;AACA;AACA,iBAAiB,uCAAuC;AACxD;AACA;;;AAGA;AACA;AACA,aAAa,sCAAsC;AACnD,cAAc,uCAAuC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C,cAAc,uCAAuC;AACrD;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,aAAa,sCAAsC;AACnD,aAAa,mDAAmD;AAChE,6DAA6D;AAC7D;AACA,cAAc,gCAAgC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,yBAAI;AAC/C;AACA;AACA,iBAAiB,gCAAgC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B,cAAc,gCAAgC;AAC9C;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,cAAc,iDAAiD;AAC/D;AACA;AACA;AACA;AACA;;;AAGA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,cAAc,kEAAkE;AAChF;AACA;AACA;AACA;AACA;;;AAGA;AACA,aAAa,MAAM;AACnB;AACA;AACA;AACA,6BAA6B,gCAAgC;AAC7D,qBAAqB,8BAAM;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,eAAe;AACrB;;AAEA;AACA;AACA,aAAa,gCAAgC;AAC7C,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,aAAa,8BAAM;AACnB;AACA;;AAEA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,4CAA4C,iCAAO;AACnD;;;AAGA;AACA,aAAa,8BAA8B;AAC3C,aAAa,OAAO;AACpB,aAAa,wCAAwC;AACrD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uCAAuC;AAC3D,oBAAoB,QAAQ;AAC5B;AACA;AACA,iBAAiB,cAAc;AAC/B,SAAS;AACT;AACA;AACA,iDAAiD,6BAA6B;AAC9E,4CAA4C,yBAAI;AAChD;AACA;;AAEA,8CAA8C,QAAQ;AACtD;;;AAGA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,aAAM;AAChB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;AAGA;AACA;AACA,uBAAuB,0DAA0D;AACjF;AACA,aAAa,gCAAgC;AAC7C;AACA;AACA;AACA,qBAAqB,8BAAM;AAC3B;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,aAAa,gCAAgC;AAC7C;AACA;AACA;AACA,qBAAqB,8BAAM;AAC3B,gDAAgD,kCAAa;AAC7D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,MAAM,eAAe;AACrB;;;AAGA;AACA;AACA;AACA,aAAa,gCAAgC;AAC7C,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,aAAa,4CAA4C;AACzD;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,aAAM;;;AAGO,8DAAY,EAAC;;AAE5B,kC;;ACv+BA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,8C;;ACtBA;AACA;AACA;AAC6C;AACc;AACF;AACf;AACmC;AAC3B;AACP;;;AAG3C;AACA,aAAa,OAAO;AACpB,cAAc,cAAc;AAC5B,aAAa,uCAAuC;AACpD,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA,cAAc,qCAAqC;AACnD;AACA,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,oCAAoC;AACpC;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,WAAW;AACzB;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA,cAAc,wBAAwB;AACtC,gBAAgB,uBAAuB;AACvC,eAAe,gCAAgC;AAC/C;;;AAGA;AACA,UAAU;AACV;AACA;AACA,IAAI,gBAAQ;AACZ;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,oBAAoB,wCAAwC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,IAAI,eAAO;AACX;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,oDAAoD,gBAAgB;AACpE;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,mEAAmE,WAAW,OAAO;;AAErF;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA,IAAI,mCAAM;AACV,YAAY,+CAAkB,CAAC,gBAAQ;AACvC;;AAEA,IAAI,mCAAM;AACV,YAAY,+CAAkB,CAAC,gBAAQ;AACvC;;AAEA,IAAI,mCAAM;AACV,YAAY,+CAAkB,CAAC,gBAAQ;AACvC;;AAEA,IAAI,mCAAM;AACV,YAAY,+CAAkB,CAAC,gBAAQ;AACvC;;AAEA,IAAI,mCAAM;AACV,YAAY,+CAAkB,CAAC,gBAAQ;AACvC;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,iBAAiB,mBAAmB;AACpC,MAAM,kBAAkB;;AAExB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,sBAAsB;AACpC;AACA;AACA;AACA;AACA,sBAAsB,sBAAsB,cAAc,gBAAQ;AAClE;;AAEA;AACA;AACA,cAAc,wBAAwB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,8CAA8C;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8CAA8C,cAAc,gBAAQ;AACrF;AACA;;AAEA;AACA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA,sBAAsB,cAAc,cAAc,gBAAQ;AAC1D;;AAEA;AACA;AACA,cAAc,+CAA+C;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+CAA+C,cAAc,gBAAQ;AACtF;AACA;;AAEA;AACA;AACA,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB,cAAc,gBAAQ;AAC1D;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI,qCAAc;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM,iCAAU;AAChB,MAAM,0CAAa;AACnB;AACA;AACA;AACA;AACA,sCAAsC,mCAAM;AAC5C,QAAQ,+BAAY;AACpB;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gBAAQ;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA;AACA;AACA;AACA,aAAa,gBAAQ;AACrB;;AAEA;AACA;AACA,aAAa,8CAA8C;AAC3D;AACA;AACA;AACA;AACA;AACA,aAAa,gBAAQ;AACrB;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA,aAAa,gBAAQ;AACrB;;AAEA;AACA;AACA;AACA,aAAa,+CAA+C;AAC5D;AACA;AACA;AACA;AACA;AACA,aAAa,gBAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,6CAA6C,iCAAU,WAAW,kCAAW;;AAE7E;AACA,SAAS,cAAc;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,gCAAgC,qCAAqC;AACrE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA,aAAa,sBAAsB;AACnC,aAAa,mCAAmC;AAChD,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;AACA,aAAa,gBAAQ;AACrB;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa,2BAA2B;AACxC,aAAa,mCAAmC;AAChD;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC,uBAAuB,kBAAkB;AACzC,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,yBAAyB,kBAAkB;AAC3C,yBAAyB,kBAAkB;AAC3C,yBAAyB,kBAAkB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC,uBAAuB,kBAAkB;AACzC,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,yBAAyB,kBAAkB;AAC3C,yBAAyB,kBAAkB;AAC3C,yBAAyB,kBAAkB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,4BAAU;;;AAGG,8DAAO,EAAC;;AAEvB,mC;;AC5kBA;AACA;AACA;AAC4C;AACT;;;AAGnC;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,eAAe;AAC1B,YAAY,cAAc;AAC1B;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,iCAAiC,SAAS;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA,eAAe,IAAI;AACnB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,YAAY,yCAAyC;AACrD;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gBAAgB;AACjC,oBAAoB,IAAI;AACxB;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,yCAAyC;AACrD;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uC;;AClLA;AACA;AACA;AACmC;AACmB;AACL;AACJ;AACI;AACqB;AACjB;AACA;AAC2B;AAChB;AACd;AACW;AACX;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qBAAU;AACd;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,qDAAqD,cAAc;AACnE,KAAK;AACL,qCAAqC,6CAA6C;AAClF;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,sCAAsC;AACnD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,MAAM,MAAM;AACZ;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6BAA6B,wBAAwB;AACrD;AACA;AACA;AACA,iCAAiC,eAAe;AAChD;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,mGAAmG;AAChH;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA,WAAW,OAAc;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,SAAS;AACtB,cAAc,sCAAsC;AACpD;AACA;AACA;AACA,uBAAuB,cAAc;AACrC,uBAAuB,cAAc;AACrC;AACA;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;AAEA;AACA;AACA,cAAc,6CAA6C;AAC3D;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,uCAAuC;AACpD;AACA,cAAc,sCAAsC;AACpD;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;;AAEA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA,qDAAqD,cAAc;AACnE;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;AACA;;AAEA;AACA;AACA,aAAa,8CAA8C;AAC3D,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,kBAAkB;AACpD;AACA;AACA;;AAEA;AACA,CAAC,CAAC,mBAAc;;;AAGD,yEAAU,EAAC;;AAE1B,sC;;ACpPA;AACA;AACA;AACoC;AACwB;AACd;AACa;;AAE3D;AACA,aAAa,4DAA4D;AACzE;;AAEA;AACA,aAAa,8CAA8C;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA,8CAA8C,uBAAuB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAO;AACX;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA,IAAI,mCAAM;AACV,YAAY,+CAAkB;AAC9B;;AAEA;AACA,4BAA4B,EAAE;AAC9B,kCAAkC,qCAAqC;AACvE;AACA,OAAO;AACP,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,4CAA4C;AACnE,cAAc,+CAA+C;AAC7D;AACA;AACA;AACA;AACA;AACA,iBAAiB,+CAA+C;AAChE;AACA;;AAEA;AACA;AACA;AACA,cAAc,sCAAsC;AACpD,cAAc,wBAAwB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,yCAAyC;AAC/C,cAAc,qCAAqC;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,mDAAmD;AACjE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM,0CAAa;AACnB;AACA;AACA;AACA;AACA,gCAAgC,mCAAM;AACtC,QAAQ,4BAAS;AACjB;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,gDAAgD;AAChF,aAAa,+CAA+C;AAC5D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,qCAAqC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM,0DAA0D;AAChE,aAAa,wBAAwB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,4CAA4C;AAC/D;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA,IAAI,qCAAQ;AACZ,YAAY,+CAAkB;AAC9B;AACA;AACA,IAAI,mCAAM;AACV,YAAY,+CAAkB;AAC9B;AACA;AACA;;AAEA;AACA,CAAC,CAAC,4BAAU;;;AAGZ;AACA;AACA;AACA;AACA,WAAW,yHAAyH;AACpI;AACA,YAAY,yCAAyC;AACrD;AACO;AACP;AACA;AACA,GAAG;AACH;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL,MAAM,MAAM,mBAAmB,EAAE;AACjC,YAAY;AACZ,6BAA6B,mCAAmC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACe,8DAAO,EAAC;;AAEvB,mC;;ACnTA;AACA;AACA;AACuE;AAC1B;AACI;AACG;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,aAAM;AACV;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,yBAAyB,mBAAmB;AAC5C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yCAAyC,iDAAiD;AAC1F,cAAc,sCAAsC;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,iBAAU;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,aAAa;AAC1B;AACA;;AAEA;;AAEA;AACA,sCAAsC,iDAAiD;AACvF,aAAa,sCAAsC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB,iDAAiD;AAC1E;AACA,aAAa,uCAAuC;AACpD,aAAa,OAAO;AACpB,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA,iBAAiB,iBAAiB;AAClC;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,mBAAc;;;AAGhB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,+BAA+B,2CAA2C;AAC1E,WAAW,oCAAoC;AAC/C,+BAA+B,2CAA2C;AAC1E,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA,aAAM;AACS,6DAAM,EAAC;;AAEtB,kC;;AChPA;AACA;AACA;AACmC;AACmB;AACL;AACJ;AACJ;AACQ;AAC+B;AACtB;AACA;AACuB;AACZ;AACd;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,+BAAe;AACnB;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,qCAAqC,oDAAoD;AACzF,KAAK;AACL,qDAAqD,cAAc;AACnE;AACA,KAAK;AACL;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA,QAAQ,MAAM;AACd;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,MAAM,MAAM;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6BAA6B,wBAAwB;AACrD;AACA;AACA;AACA,iCAAiC,oBAAoB;AACrD;AACA;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB,cAAc,sCAAsC;AACpD;AACA;AACA;AACA,wBAAwB,cAAc;AACtC,wBAAwB,cAAc;AACtC;AACA;AACA;AACA;AACA;AACA,WAAW,wBAAwB;AACnC;AACA;;AAEA;AACA;AACA,cAAc,oDAAoD;AAClE;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;AAEA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,WAAW;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAU;AACzB;AACA;;AAEA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA,2BAA2B,eAAU;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA,qBAAqB,gBAAgB;AACrC;AACA,MAAM,MAAM;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D;AACA;AACA,0DAA0D,cAAc;AACxE;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;AAEA;AACA;AACA,aAAa,qDAAqD;AAClE,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,mBAAc;;;AAGD,wFAAe,EAAC;;AAE/B,2C;;AClRA;AACA;AACA;AACmC;AAC+B;AACrB;AACd;AACkB;AACI;AACA;AACG;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qBAAU;AACd;AACA;AACA;AACA,qDAAqD,cAAc;AACnE,KAAK;AACL,qCAAqC,6CAA6C;AAClF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,MAAM,MAAM;AACZ;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6BAA6B,wBAAwB;AACrD;AACA;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD,4BAA4B,oBAAS;AACrC;AACA;AACA;AACA,uBAAuB,YAAY;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,6CAA6C;AAC3D;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAK;AACpB;AACA;;AAEA;AACA;AACA,cAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA,gDAAgD,QAAQ;AACxD,sBAAsB,UAAK;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA,UAAU,iBAAU;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,8CAA8C;AAC3D,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,kBAAkB;AACpD;AACA;AACA;;AAEA;AACA,CAAC,CAAC,mBAAc;;;AAGD,yEAAU,EAAC;;AAE1B,sC;;AC5KA;AACA;AACA;AAC+E;;;AAG/E;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,YAAY,cAAc;AAC1B;AACO,SAAS,mBAAY;AAC5B;AACA,eAAe,WAAW;AAC1B,oCAAoC,QAAQ;AAC5C;AACA,aAAa,iCAAiC;AAC9C;AACA;AACA;AACA;AACA;;AAEA,kC;;ACzBA;AACA;AACA;AACmC;AACmB;AACL;AACJ;AACJ;AACN;AACc;AACe;AACI;AACsB;AAChC;AACK;AACA;AACO;AACI;AACM;AAC1B;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,yBAAY;AAChB;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,gCAAgC,eAAe;AAC/C;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA,QAAQ,MAAM;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,cAAc;AACnE;AACA,KAAK;AACL,qCAAqC,2DAA2D;AAChG;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,MAAM,MAAM;AACZ;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6BAA6B,wBAAwB;AACrD;AACA;AACA;AACA,iCAAiC,yBAAyB;AAC1D;AACA;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,WAAW,YAAgB;AAC3B;;AAEA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,cAAc,2DAA2D;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,sBAAsB;AAC5B;AACA,KAAK;AACL;AACA;;AAEA,WAAW,4BAA4B;AACvC;AACA;;AAEA;AACA,cAAc,qBAAqB;AACnC;AACA;AACA;AACA;;AAEA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA,wBAAwB,mBAAkB;AAC1C;AACA,iCAAiC,6BAA6B;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC,2CAA2C;AAC/E,cAAc,WAAW;AACzB;AACA;AACA;AACA;AACA,eAAe,eAAU,uCAAuC,cAAc;AAC9E;;AAEA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA,UAAU,sBAAsB;AAChC;AACA;AACA,OAAO;AACP;AACA;AACA,YAAY,sBAAsB;AAClC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,kBAAkB;AACzD;AACA;AACA;AACA,uDAAuD,cAAc;AACrE;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA,eAAe,YAAO;AACtB;;AAEA;AACA;AACA,cAAc,eAAe;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA,wBAAwB,YAAO;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;;AAEA;AACA;AACA,aAAa,4DAA4D;AACzE,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,mBAAc;;;AAGD,+EAAY,EAAC;;AAE5B,wC;;ACzXA;AACA;AACA;AACoC;;;AAGpC;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;;;AAGA;AACA;AACA;AACA,yBAAyB,gCAAgC,GAAG,yCAAyC;AACrG,IAAI,gDAAgD;AACpD;AACA;AACA;AACA,IAAI,gBAAU;;AAEd;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;;AAEA;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA,gBAAU;AACV,aAAa,gBAAU;AACvB;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA,gBAAU;AACV;AACA;;AAEA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,gBAAU;AACV;AACA;;AAEA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA,gBAAU;AACV;AACA;;AAEA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA,gBAAU;AACV;AACA;;AAEA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,gBAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B;AACA,gBAAU;AACV,SAAS,gCAAQ;AACjB;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,oDAAoD;AAChE;AACA,gBAAU;AACV,SAAS,gCAAQ;AACjB;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,oDAAoD;AAChE;AACA,gBAAU;AACV,SAAS,gCAAQ;AACjB;;AAEA;AACA;AACA,YAAY,mCAAmC;AAC/C;AACA,gBAAU;AACV,SAAS,gCAAQ;AACjB;;AAEA;AACA;AACA,YAAY,0BAA0B;AACtC;AACA,gBAAU;AACV,SAAS,gCAAQ;AACjB;;AAEA;AACA;AACA,YAAY,0BAA0B;AACtC;AACA,gBAAU;AACV,SAAS,gCAAQ;AACjB;;AAEA;AACA;AACA;AACA,YAAY,cAAc;AAC1B;AACA,gBAAU;AACV,SAAS,gCAAQ;AACjB;;AAEA;AACA;AACA;AACA,YAAY,0BAA0B;AACtC;AACA,gBAAU;AACV,SAAS,gCAAQ;AACjB;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA,gBAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,gBAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA,gBAAU;AACV;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA,gBAAU;AACV;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,gBAAU;;AAEV;AACA;AACA,WAAW,wDAAwD;AACnE,WAAW,EAAE;AACb,YAAY,2CAA2C;AACvD;AACA;AACA,gBAAU;AACV,SAAS,gCAAQ;AACjB;;AAEA;AACA;AACA;AACA;AACA,gBAAU;AACV,EAAE,gCAAQ;AACV;;AAEA;AACA;AACA,WAAW,wDAAwD;AACnE,WAAW,EAAE;AACb;AACA;AACA,gBAAU;AACV,EAAE,gCAAQ;AACV;;AAEe,gEAAU,EAAC;;AAE1B,iC;;ACpQA;AACA;AACA;;AAEqC;AACO;AACI;AACL;AACD;AACqG;AAC3G;;;AAGpC;AACA;AACA,aAAa,OAAO;AACpB,cAAc,4BAA4B;AAC1C,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,8BAA8B;AAC5C,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,oCAAoC;AAClD;AACA;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,oCAAoC;AAClD,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,cAAc;AAC5B,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,yBAAY;AAChB;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,8BAA8B,OAAO;AACrC;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,4BAA4B;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,8CAA8C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;;AAEA;;AAEA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,4CAAqB;AACzC;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B,aAAa,yBAAyB;AACtC,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,iBAAiB,aAAa;AAC9B;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,gBAAgB,gBAAgB;AAChC;AACA,0BAA0B,WAAW;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD,oCAAoC,eAAe;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,4CAAqB;AACvC;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B,aAAa,yBAAyB;AACtC,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,aAAa;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA,wBAAwB,QAAQ,CAAC,gBAAgB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,OAAO;AAC7B;;AAEA;AACA,CAAC,CAAC,WAAU;;;AAGG,gFAAY,EAAC;;AAE5B,wC;;AC9kBA;AACA;AACA;;AAE6C;;;AAG7C;AACA,aAAa,OAAO;AACpB,cAAc,4BAA4B;AAC1C,cAAc,OAAO;AACrB,cAAc,8BAA8B;AAC5C,cAAc,oCAAoC;AAClD;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,4CAA4C,QAAQ,OAAO;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,kBAAY;;;AAGC,4DAAW,EAAC;;AAE3B,kC;;AC7EA;AACA;AACA;AACkC;AACG;;;AAGrC;AACA,aAAa,OAAO;AACpB,cAAc,gEAAgE;AAC9E,QAAQ,4BAA4B,MAAM,oCAAoC;AAC9E,gBAAgB;AAChB;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,0DAA0D,oCAAoC;AAC9F,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA,YAAY,gEAAgE;AAC5E;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gEAAgE;AAC3E;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,QAAQ,YAAY,mCAAmC;AACtF,OAAO;AACP,yBAAyB,8BAAM;AAC/B;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEe,mDAAI,EAAC;;AAEpB,gC;;AC3FA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACqC;AACc;AACb;AACT;AACI;;;AAGjC;AACA,6BAA6B,wBAAwB,SAAS,OAAO;AACrE;AACA,IAAI,4BAA4B;AAChC;AACA;AACA,aAAa,2EAA2E;AACxF;;AAEA;AACA,MAAM,YAAY,eAAe,YAAY,QAAQ,oBAAoB;AACzE,aAAa,iCAAiC;AAC9C;;AAEA;AACA,6BAA6B,wBAAwB;AACrD,IAAI,8BAA8B;AAClC;AACA,aAAa;AACb,gGAAgG;AAChG;;;AAGA;AACA;AACA;AACA;AACA,WAAW,6BAA6B;AACxC;AACA,aAAa;AACb;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,8DAA8D;AAC5E;AACA,cAAc,4BAA4B;AAC1C,cAAc,6BAA6B;AAC3C,cAAc,eAAe;AAC7B;AACA,cAAc,8BAA8B;AAC5C,cAAc,4BAA4B;AAC1C,cAAc,OAAO;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;;AAEA;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,0BAA0B,sCAAsC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA,IAAI,mBAAmB;AACvB,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,6BAA6B;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,8DAA8D;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,sCAAsC;AACzD;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA,mBAAmB,sCAAsC;AACzD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,iCAAiC;AAC5C;AACA,YAAY,cAAc;AAC1B;AACO;AACP;;AAEA;AACA;AACA,GAAG;AACH;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL,MAAM,MAAM,mBAAmB,EAAE;AACjC,YAAY;AACZ,6BAA6B,MAAM;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,UAAU;AACV;AACA;;;AAGA;AACA,WAAW,oCAAoC;AAC/C,WAAW,OAAO;AAClB,YAAY,aAAa;AACzB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,UAAI;AACvB;AACA,KAAK;AACL,qBAAqB,YAAM;AAC3B;AACA;AACA,KAAK;AACL;AACA;AACA,mBAAmB,YAAW;AAC9B;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;;AAGA;AACA;AACA,YAAY,gEAAgE;AAC5E;AACO;AACP,aAAa,gEAAgE;AAC7E;AACA;AACA;AACA;AACA,SAAS,YAAY;AACrB;AACA,gBAAgB,UAAI;AACpB;AACA,OAAO;AACP,KAAK;AACL;AACA,SAAS,YAAY;AACrB,aAAa,YAAY;;AAEzB,SAAS,YAAY;AACrB;AACA,kBAAkB,YAAM;AACxB;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,kBAAkB,YAAM;AACxB;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,SAAS,YAAY;AACrB,aAAa,YAAY;;AAEzB,SAAS,YAAY;AACrB,aAAa,YAAY;AACzB,eAAe,YAAY;AAC3B;;;AAGA,SAAS,YAAY;AACrB;AACA,iBAAiB,YAAW;AAC5B;AACA,kBAAkB,UAAI;AACtB;AACA,SAAS;AACT,oBAAoB,YAAM;AAC1B;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA,KAAK;AACL;AACA,SAAS,YAAY;AACrB,aAAa,YAAY;;AAEzB,SAAS,YAAY;AACrB,aAAa,YAAY;AACzB,eAAe,YAAY;AAC3B,eAAe,YAAY;AAC3B;;AAEA;AACA;;;AAGA;AACA;AACA,WAAW,oCAAoC;AAC/C,YAAY,uFAAuF;AACnG;AACA;AACA;AACA;;AAEe,qDAAK,EAAC;;AAErB,iC;;ACliBA;AACA;AACA;AACwC;AACT;AACsB;AACpB;AACmD;;;AAGpF;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,8BAA8B;AAC5C;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA,cAAc,qCAAqC;AACnD;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA,cAAc,+CAA+C;AAC7D;AACA;AACA;AACA;AACA,cAAc,sCAAsC;AACpD,cAAc,qCAAqC;AACnD;AACA;AACA,QAAQ,6BAA6B;AACrC,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,sCAAsC;AACpD,IAAI,sBAAsB;AAC1B,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;;;AAGA;AACA,UAAU;AACV;AACA;AACA,IAAI,eAAQ;AACZ;AACA;;;AAGA;AACA;AACA;AACA,0DAA0D;AAC1D,gCAAgC;AAChC;AACA;AACA;AACA;AACA,IAAI,kBAAW;AACf;AACA;AACA,+BAA+B,QAAQ,OAAO;;AAE9C,sBAAsB,gCAAM,GAAG;;AAE/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;;AAEA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA,6CAA6C,gBAAgB;;AAE7D;AACA;AACA;AACA,aAAa;AACb;AACA,gBAAgB,SAAS;;AAEzB;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;;AAEA;AACA,aAAa,kGAAkG;AAC/G;AACA;AACA;AACA;AACA,eAAe,oDAAoD,cAAc,eAAQ;AACzF;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,oDAAoD;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,oDAAoD;AAChE;AACA;AACA;AACA,aAAa,eAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sBAAsB;AAC3B,YAAY,wIAAwI;AACpJ;AACA;AACA;AACA,gDAAgD,kBAAkB;AAClE;AACA,kBAAkB,UAAe;AACjC;AACA;;AAEA;AACA,aAAa,+CAA+C;AAC5D;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,WAAK;;;AAGP;AACA,0BAA0B,2CAA2C;AACrE;AACA,YAAY,sCAAsC;AAClD;AACA;AACA,kBAAW;;;AAGI,mEAAW,EAAC;;AAE3B,kC;;ACvQA;AACA;AACA;AAC+C;AACX;AACwB;AACM;AAClB;AAC8B;AAC1C;AACG;AACqC;AACwB;AACxD;AACL;AACY;AACJ;AACU;AACV;AACI;AACI;AAClB;AAC+B;AACtB;AACE;AACH;AACE;AACM;;;AAGrD;AACA,aAAa,OAAO;AACpB,cAAc,aAAa;AAC3B;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA,cAAc,4CAA4C;AAC1D;AACA,cAAc,aAAa;AAC3B;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,OAAO;AACrB;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA,cAAc,2CAA2C;AACzD,kBAAkB,gDAAgD;AAClE;AACA,cAAc,sCAAsC;AACpD;AACA,cAAc,iBAAiB;AAC/B;AACA,cAAc,OAAO;AACrB;AACA,cAAc,2CAA2C;AACzD,aAAa,gDAAgD;AAC7D;AACA,eAAe,gDAAgD;AAC/D;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,2CAA2C;AACzD;AACA,sBAAsB,gDAAgD;AACtE;AACA,eAAe,8CAA8C;AAC7D;AACA,cAAc,QAAQ;AACtB;AACA;;;AAGA;AACA;AACA,aAAa,sCAAsC;AACnD;;;AAGA;AACA;AACA,aAAa,6CAA6C;AAC1D;;;AAGA;AACA;AACA,aAAa,oDAAoD;AACjE;;;AAGA;AACA;AACA,aAAa,2CAA2C;AACxD;;;AAGA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,mDAAmD;AACnD;;;AAGA;AACA;AACA;AACA,UAAU;AACV;AACA,IAAI,SAAI;AACR;AACA;AACA;AACA;AACA;;;AAGA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,sBAAsB,sCAAsC;AAC5D;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,wBAAK;;;AAGP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,SAAI;AACR;;AAEA,oCAAoC,+BAA+B;AACnE;AACA,gCAAgC,0BAAK;AACrC;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,4BAA4B,aAAa;;AAEzC;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,sBAAsB,SAAI;;AAE1B;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA,gFAAgF,yBAAI;;AAEpF;AACA;AACA,yBAAyB,YAAY;AACrC;AACA,mBAAmB,eAAe;AAClC,mBAAmB,6CAA6C;AAChE,oBAAoB,4CAA4C;AAChE;AACA;AACA,iDAAiD,OAAO;AACxD,gBAAgB,WAAM;AACtB,8BAA8B,0BAAyB;AACvD;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,qBAAqB,SAAI;AACzB,wBAAwB,UAAK;AAC7B,SAAS,mBAAmB,SAAI;AAChC,wBAAwB,eAAU;AAClC,SAAS,mBAAmB,SAAI;AAChC,wBAAwB,YAAO;AAC/B;AACA;AACA,mBAAmB,eAAe;AAClC,mBAAmB,6CAA6C;AAChE,oBAAoB,4CAA4C;AAChE;AACA;AACA;AACA;AACA,yBAAyB,SAAI;AAC7B;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,aAAa;AACb;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,wBAAwB,YAAW;AACnC,kBAAkB,MAAY;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,8DAA8D,cAAc;;AAE5E;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,gCAAgC,MAAM;AACtC,KAAK;AACL;AACA,oCAAoC,YAAY;AAChD;;AAEA,IAAI,mCAAM;AACV,MAAM,+CAAkB,CAAC,oBAAmB;AAC5C;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,kDAAkD;AACpE;AACA;AACA;AACA;AACA,qCAAqC,4BAAS;AAC9C;AACA;AACA;AACA,oCAAoC,SAAI;AACxC,8BAA8B,mBAAmB;AACjD;AACA,gEAAgE,mBAAmB;AACnF;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA,KAAK;AACL,uBAAuB,mBAAmB;AAC1C;AACA,KAAK;AACL,4BAA4B,mBAAmB;AAC/C;AACA;AACA,OAAO,qBAAqB,uBAAuB,wCAAwC,YAAY;AACvG,0BAA0B,mBAAmB;AAC7C;AACA;AACA,KAAK,yBAAyB,mBAAmB;AACjD;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,oCAAoC,yBAAsB;AAC1D,UAAU,mBAAmB;AAC7B,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,oCAAoC,SAAI;;AAExC;AACA;AACA;AACA,2BAA2B,SAAI;AAC/B;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,wCAAwC;AACrD,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,wCAAwC;AACrD,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,SAAI;AAC7B;AACA,OAAO,yBAAyB,SAAI;AACpC,sCAAsC,cAAc;AACpD;AACA;AACA;AACA;AACA;AACA,iEAAiE,QAAQ;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA,8BAA8B,UAAO,KAAK,UAAK;AAC/C;AACA,KAAK;AACL,uCAAuC,MAAM;AAC7C;AACA;AACA;;AAEA;AACA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAI;AAC3B;AACA,KAAK,yBAAyB,SAAI;AAClC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,6BAA6B,UAAO;AACpC,YAAY,eAAU;AACtB;AACA;AACA,8BAA8B,UAAO;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA,8BAA8B,4CAA4C;AAC1E;AACA,uBAAuB,SAAI;AAC3B;AACA,KAAK,yBAAyB,SAAI;AAClC,+BAA+B,cAAc;AAC7C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,sCAAsC,eAAe;AACrD;AACA,uCAAuC,MAAM;AAC7C;AACA;AACA,eAAe,WAAW;AAC1B;AACA,8BAA8B,YAAY;AAC1C,uBAAuB,SAAI;AAC3B;AACA,+BAA+B,UAAO;AACtC;AACA,4BAA4B,QAAQ;AACpC,kCAAkC,WAAW;AAC7C;AACA,6BAA6B,eAAU;AACvC;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL,kCAAkC,WAAW;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA,8BAA8B,4CAA4C;AAC1E;AACA;AACA,uBAAuB,SAAI;AAC3B;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,KAAK,yBAAyB,SAAI;AAClC,+BAA+B,cAAc;AAC7C;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,4CAA4C;AAC1E;AACA,eAAe,WAAW;AAC1B;AACA,uBAAuB,SAAI;AAC3B,+BAA+B,cAAc;AAC7C;AACA;AACA;AACA;AACA;AACA,KAAK,yBAAyB,SAAI;AAClC,+BAA+B,cAAc;AAC7C;AACA,kCAAkC,WAAW;AAC7C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,UAAU,uDAAuD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,4CAA4C;AAC1E,uBAAuB,SAAI;AAC3B;AACA;AACA;AACA,KAAK,yBAAyB,SAAI;AAClC;AACA,iBAAiB,cAAc;AAC/B;AACA;AACA;;AAEA;AACA,uBAAuB,YAAY;AACnC,oCAAoC,eAAU,aAAa,eAAe;AAC1E,KAAK,yBAAyB,YAAY;AAC1C,oCAAoC,oBAAe,aAAa,cAAc;AAC9E,KAAK,yBAAyB,YAAY;AAC1C,oCAAoC,iBAAY,aAAa,cAAc;AAC3E;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,aAAa;AAC9B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,gCAAgC,WAAW;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,aAAa;AAChD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,OAAkB;;;AAGpB;AACA,YAAY,0CAA0C;AACtD;AACA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACO;AACP;AACA,4BAA4B,cAAc;AAC1C,yBAAyB,cAAc;AACvC;AACA,MAAM,0BAAyB;AAC/B,6CAA6C,QAAQ;AACrD,MAAM,UAAU,KAAK,WAAM;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW;AACf;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACO;AACP;AACA;AACA,mBAAmB,cAAc,YAAY,cAAc;AAC3D;AACA,QAAQ,aAAa;AACrB,QAAQ,cAAc;AACtB,QAAQ,WAAW;AACnB,QAAQ,UAAU;AAClB,QAAQ,aAAa;AACrB;AACA;AACA;AACA;AACA,OAAO;AACP,uBAAuB,YAAO;AAC9B;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY,KAAK;AACjB;AACA;AACA;AACA,eAAe,YAAY;AAC3B,eAAe,YAAY;AAC3B,WAAW,SAAI;AACf,GAAG,mBAAmB,YAAY;AAClC,eAAe,YAAY;AAC3B,WAAW,SAAI;AACf,GAAG,mBAAmB,YAAY;AAClC,eAAe,YAAY;AAC3B,WAAW,SAAI;AACf,GAAG,mBAAmB,YAAY;AAClC,WAAW,SAAI;AACf;AACA;AACA,eAAe,MAAM;AACrB;AACA;;;AAGe,8DAAI,EAAC;;AAEpB,gC;;AChiCA;AACA;AACA;AAC4C;AACmC;AACzC;AACF;AACW;AACE;AACb;AACW;AACL;AAC6B;AACvB;AACP;;AAEzC;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,YAAY;AAC1B;AACA,cAAc,YAAY;AAC1B;AACA;AACA,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,mBAAmB;AACjC;AACA,cAAc,mBAAmB;AACjC;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,6BAAc;AAClB;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,EAAE,mCAAM,eAAe,4BAAS;AAChC;;AAEA,8CAA8C,kBAAkB;AAChE,UAAU,aAAa;AACvB;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA,iEAAiE;;AAEjE;AACA;AACA,YAAY;AACZ;AACA,uDAAuD,MAAY;;;AAGnE;AACA;AACA,YAAY;AACZ;AACA;;;AAGA;AACA;AACA,YAAY;AACZ;AACA;;;AAGA;AACA;AACA,YAAY;AACZ;AACA;;;AAGA;AACA;AACA,YAAY;AACZ;AACA;;;AAGA;AACA;AACA,YAAY;AACZ;AACA;;;AAGA;AACA;AACA,YAAY;AACZ;AACA;;;AAGA;AACA;AACA,YAAY;AACZ;AACA;;AAEA,sBAAsB,SAAS;AAC/B,mBAAmB,gBAAI;AACvB;AACA;AACA,cAAc,WAAK;AACnB,cAAc,UAAI;AAClB;AACA,KAAK;AACL,gBAAgB,YAAM;AACtB;AACA;AACA;AACA,KAAK;AACL,eAAe,YAAW;AAC1B;AACA,iBAAiB,YAAM;AACvB;AACA,MAAM;AACN,eAAe,UAAI;AACnB;AACA,MAAM;AACN,KAAK;AACL,IAAI;AACJ,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA,eAAe,0CAA0C;AACzD;;AAEA;AACA;AACA;AACA,yBAAyB,YAAO;AAChC;AACA;AACA,MAAM,0BAA0B,eAAU;AAC1C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,gCAAO;AACX,IAAI;;AAEJ;;AAEA;AACA;AACA;;AAEA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,0CAA0C;AACtD;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;;AAEA;AACA;AACA,uBAAuB,YAAO;AAC9B;AACA,IAAI,0BAA0B,eAAU;AACxC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,YAAY,YAAY;AACxB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,UAAO;AAChC;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,UAAO;AACnC;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,aAAa,qCAAqC;AAClD,cAAc,OAAO;AACrB;AACA;AACA,gBAAgB,gBAAS;AACzB;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,0BAAO;;AAEM,oFAAc,EAAC;;AAE9B;;;;;;;AC5ZA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA,CAAC,EAAC;;AAEF,wC;;ACZA;AACA;AACA;AACwC;AACT;AACc;AACZ;;;AAGjC;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,8BAA8B;AAC5C;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA,cAAc,oCAAoC;AAClD,cAAc,qCAAqC;AACnD;AACA;AACA,QAAQ,6BAA6B;AACrC,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D,gCAAgC;AAChC;AACA;AACA;AACA;AACA,IAAI,cAAS;AACb;AACA;;AAEA,sBAAsB,gCAAM,GAAG;;AAE/B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA,gBAAgB,SAAS;;AAEzB;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,sBAAsB,OAAO,cAAc,YAAY;AACvD;;AAEA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,sBAAsB,QAAQ,cAAc,YAAY;AACxD;;AAEA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;;AAEA;AACA,CAAC,CAAC,WAAK;;;AAGP;AACA,0BAA0B,uCAAuC;AACjE;AACA,YAAY,oCAAoC;AAChD;AACA;AACA,cAAS;;;AAGM,6DAAS,EAAC;;AAEzB,gC;;AC7HA;AACA;AACA;AAC+C;AACsD;AACzD;AACY;;;AAGxD;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,uCAAuC;AAClD,WAAW,qCAAqC;AAChD,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;;AAEA,qBAAqB,cAAS;;AAE9B;AACA,yBAAyB,kBAAkB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,uBAAuB,kBAAkB;AACzC,6BAA6B,kBAAkB;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,qCAAqC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,6BAA6B;AACxC,WAAW,4CAA4C;AACvD;AACA,WAAW,OAAO;AAClB,gFAAgF,EAAE;AAClF;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,YAAY,kBAAkB;AAC9B;AACO,SAAS,aAAM;AACtB;AACA;;AAEA,gBAAgB,4CAAqB;AACrC;;AAEA;AACA;AACA;;AAEA;;AAEA,yBAAyB,WAAW;AACpC;AACA,IAAI,aAAM;AACV,GAAG;;AAEH,2BAA2B,QAAQ;AACnC,4BAA4B,SAAS;AACrC,sBAAsB,4CAAqB;AAC3C;AACA;;AAEA;;AAEA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B,oBAAoB,SAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH,sBAAsB,UAAU;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA,kC;;ACpPA;AACA;AACA;AAEqE;AACnC;AACM;;;AAGxC;AACA,mBAAmB;AACnB,aAAa,OAAO;AACpB,cAAc,6CAA6C;AAC3D,cAAc,6CAA6C;AAC3D;;;AAGA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA,UAAU;AACV;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI,2BAAa;;AAEjB;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;;AAEA,aAAa,uDAAuD;AACpE;AACA,qBAAqB,iBAAY;;AAEjC;AACA,aAAa,sCAAsC;AACnD,cAAc,sCAAsC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,OAAO,QAAQ,qBAAqB,QAAQ;;AAE5C;AACA,YAAY;AACZ;AACA;AACA;AACA,IAAI,QAAQ;;AAEZ;AACA,YAAY;AACZ;AACA;AACA;AACA,IAAI,QAAQ;;AAEZ,2BAA2B,UAAU;AACrC,4BAA4B,WAAW;AACvC,+BAA+B,cAAc;AAC7C,8BAA8B,aAAa;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD;AACA;AACA,2BAAa;AACb;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,OAAO;AAClB;AACA;AACA,2BAAa;;AAEb,yBAAyB,cAAc;AACvC;AACA,IAAI,QAAQ;AACZ,oCAAoC,OAAO;;AAE3C;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,6BAA6B,cAAc;AAC3C,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS,iBAAU;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,MAAM;AACnB,aAAa,MAAM;AACnB;AACA,YAAY,MAAM;AAClB,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,8BAA8B;AAC1C;AACA,2BAAa;AACb,eAAe,WAAW;;AAE1B;AACA;AACA,IAAI,gBAAgB;AACpB,IAAI,gBAAgB;AACpB,IAAI,gBAAgB;AACpB,GAAG;;AAEH;AACA;;AAEA;AACA,YAAY,gBAAgB;AAC5B;AACA,2BAAa;AACb;AACA;;AAEe,oFAAa,EAAC;;AAE7B,yC;;ACxVA;AACA;AACA;AAC4C;;AAEd;AACU;AACW;AACJ;AACkB;AAChC;AACmD;AACrC;;;AAG/C;AACA,aAAa,wEAAwE;AACrF;;;AAGA;AACA;AACA;AACA,QAAQ,2CAA2C;AACnD;AACA;AACA,IAAI,eAAU;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,SAAS;;AAExC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAM,eAAe;;AAErB,QAAQ,cAAO;AACf;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,0BAA0B,eAAe;AACzC;AACA;;AAEA;AACA;;AAEA,uBAAuB,gBAAS;AAChC,2BAA2B,yBAAyB;AACpD;;AAEA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA,2BAA2B,eAAe;;AAE1C;AACA;AACA,cAAc;AACd;AACA,8BAA8B,oBAAa;AAC3C;AACA;;AAEA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0BAA0B,KAAK;AAC/B;AACA,0BAA0B,KAAK;AAC/B;AACA,OAAO;AACP,uBAAuB,eAAe;AACtC;AACA;;AAEA,SAAS,cAAO;AAChB,mBAAmB,SAAS;AAC5B,KAAK;AACL;AACA;;AAEA,uCAAuC,0BAA0B;AACjE,yCAAyC,0BAA0B;AACnE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;;AAEA;AACA,mBAAmB,SAAS;AAC5B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,aAAiB;AACtC;AACA;AACA;;AAEA,mBAAmB,SAAS;AAC5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B,mBAAmB,SAAS;AAC5B;;AAEA;;AAEA;AACA;AACA;AACA,qBAAqB,SAAS,kBAAkB,SAAS;AACzD;;AAEA,gCAAgC,mCAAM,OAAO,4BAAS;AACtD;AACA;AACA,2BAA2B,SAAS;AACpC,6BAA6B,SAAS;AACtC,6BAA6B,SAAS;AACtC,gBAAgB,0CAAa;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,OAAO;;AAEP;AACA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sCAAsC,kCAAa;AACnD;AACA;;AAEA;AACA,CAAC,CAAC,OAAI;;;AAGS,+DAAU,EAAC;;AAE1B,gC;;ACvTA;AACA;AACA;AACoC;AACH;AACoB;;;AAGrD;AACA,WAAW,OAAO;AAClB,WAAW,yCAAyC;AACpD,YAAY,gCAAgC;AAC5C;AACO;AACP,kBAAkB,GAAG;AACrB,kBAAkB,GAAG;AACrB,kBAAkB,GAAG;AACrB,sBAAsB,IAAI;AAC1B;AACA;AACA,eAAe,mCAAmC;AAClD,eAAe,OAAO;AACtB,eAAe,uCAAuC;AACtD,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,YAAY,MAAM,YAAY,SAAS,GAAG;AAC1C;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,yCAAyC;AACpD,YAAY,gCAAgC;AAC5C;AACO;AACP;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;;;AAGA;AACA,WAAW,uCAAuC;AAClD,YAAY,gCAAgC;AAC5C;AACO;AACP;AACA;AACA;AACA;AACA;AACA,eAAe,mCAAmC;AAClD,eAAe,OAAO;AACtB,eAAe,uCAAuC;AACtD,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,OAAO;AACP,gBAAgB,cAAa;AAC7B,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,mCAAmC;AAC9C,WAAW,OAAO;AAClB,WAAW,uCAAuC;AAClD,YAAY,iBAAiB;AAC7B;AACO;AACP;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,YAAY,cAAc;AAC1B;AACO;AACP;AACA,iBAAiB,iBAAiB;AAClC;AACA;AACA;AACA;AACA;AACA,kCAAkC,0BAA0B;AAC5D;AACA;AACA;AACA;AACA,qBAAqB,aAAa;AAClC;AACA;AACA;AACA,wCAAwC,WAAW;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2C;;ACpIA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;;AAEf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC,EAAC;;AAEF,yC;;ACjCA;AACA;AACA;AACkC;AACM;AACkD;AACpC;AACP;AACL;;AAE1C;AACA,aAAa,OAAO;AACpB,cAAc,sCAAsC;AACpD,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,oCAAoC;AAClD,cAAc,6BAA6B;AAC3C,cAAc,0CAA0C;AACxD,cAAc,kCAAkC;AAChD,cAAc,OAAO;AACrB,cAAc,iCAAiC;AAC/C,cAAc,OAAO;AACrB,cAAc,cAAc;AAC5B,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAO;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,0FAA0F,mBAAmB;;AAE7G;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,oBAAoB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,qCAAqC;AAClD;AACA;AACA;AACA,0BAA0B,6BAA6B;AACvD,cAAc,8BAAM;AACpB;AACA;AACA,qBAAqB,SAAS;AAC9B;AACA,aAAa,aAAa;AAC1B,KAAK;AACL;AACA,0BAA0B,SAAS,SAAS,aAAa;AACzD,sBAAsB,SAAS,wBAAwB,SAAS;AAChE,UAAU,aAAa;AACvB;AACA;AACA,6BAA6B,eAAe;AAC5C;AACA;;AAEA;AACA;AACA,aAAa,kCAAkC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,iCAAiC;AAC9C,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,WAAU;;;AAGG,kEAAO,EAAC;;AAEvB,mC;;AC5NA;AACA;AACA;AAC+D;AAC7B;AACM;AACA;AACA;AACJ;AACW;AACa;AACjB;AACR;AACe;AAC0B;;AAE5E;AACA,aAAa,OAAO;AACpB,cAAc,sCAAsC;AACpD,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,YAAY;AAC1B;AACA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,oCAAoC;AAClD,cAAc,OAAO;AACrB;AACA,cAAc,6BAA6B;AAC3C,cAAc,yCAAyC;AACvD,eAAe,oCAAoC;AACnD,cAAc,0CAA0C;AACxD,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C,cAAc,OAAO,oCAAoC,EAAE,KAAK,EAAE,OAAO,GAAG,SAAS,EAAE;AACvF,OAAO,IAAI,2CAA2C,IAAI;AAC1D;AACA,cAAc,cAAc;AAC5B,cAAc,QAAQ;AACtB;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,mBAAS;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,0BAA0B,YAAS;;AAEnC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,0BAA0B;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,0BAA0B;AACnC;AACA;AACA;AACA;;AAEA,+EAA+E;AAC/E;AACA;AACA,uEAAuE;AACvE;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ,0BAA0B;AAClC,+CAA+C,UAAU;AACzD;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ,0BAA0B;AAClC,+CAA+C,UAAU;AACzD;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,0BAA0B;AACnC;AACA;AACA;AACA,uCAAuC,UAAU;AACjD;AACA,KAAK;AACL,oBAAoB,8BAAM;AAC1B;AACA,8CAA8C,gBAAwB;AACtE;AACA;AACA,mBAAmB,2CAA2C;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,0BAA0B;AACnC;AACA;AACA,wCAAwC,kBAAkB,UAAU;AACpE;AACA,KAAK;AACL,oBAAoB,8BAAM;AAC1B;AACA,mDAAmD,YAAS;AAC5D;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,wCAAwC;AACrD,aAAa,OAAO;AACpB,cAAc,8BAA8B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,SAAS,QAAQ,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA,IAAI,mCAAM,OAAO,4BAAS;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sCAAsC,yCAAyC;AAC/E,SAAS,0BAA0B;AACnC,4CAA4C,UAAU;AACtD;AACA,KAAK;AACL;AACA;AACA;AACA,yBAAyB,gBAAM;AAC/B;AACA,0BAA0B,8BAA8B;AACxD;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,0BAA0B,WAAU;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,yCAAyC;AACtD,cAAc,8BAA8B;AAC5C;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,SAAS,0BAA0B;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oCAAoC;AACjD,aAAa,0CAA0C;AACvD;AACA;AACA;AACA,QAAQ,0BAA0B;AAClC,iBAAiB,QAAa;AAC9B;AACA,sBAAsB,8BAAM;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,cAAO;;;AAGT;AACA,WAAW,UAAU;AACrB,WAAW,OAAO;AAClB;AACA;AACA,aAAa,kCAAkC;AAC/C;;AAEe,wEAAS,EAAC;;AAEzB,qC;;ACtZA;AACA;AACA;;AAEuC;AACwB;;AAE/D;AACA,aAAa,OAAO;AACpB,cAAc,sCAAsC;AACpD,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,YAAY;AAC1B;AACA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,oCAAoC;AAClD,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,0CAA0C;AACxD,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C,cAAc,iCAAiC;AAC/C;AACA;AACA,cAAc,OAAO,oCAAoC,EAAE,KAAK,EAAE,OAAO,GAAG;AAC5E,SAAS,EAAE,oBAAoB,IAAI,2CAA2C,IAAI;AAClF;AACA,cAAc,cAAc;AAC5B,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB;AACA,IAAI,iCAAiC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAG;AACP;AACA;AACA;AACA;;AAEA;AACA,MAAM,SAAS;AACf,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,gBAAS;;AAEI,sDAAG,EAAC;;AAEnB,+B;;AC5GA;AACA;AACA;;AAE2B;;;AAG3B;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACO,yBAAyB;AAChC;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,sCAAsC;AACpD,cAAc,OAAO;AACrB,cAAc,YAAY;AAC1B;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB;AACA,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO,gBAAgB,IAAI,yBAAyB,EAAE,EAAE,EAAE,EAAE,EAAE;AAC5E,kBAAkB,EAAE,KAAK,EAAE,OAAO,GAAG,SAAS,EAAE;AAChD,cAAc,QAAQ;AACtB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA,8BAA8B,IAAI,yBAAyB,EAAE,EAAE,EAAE,EAAE,EAAE;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,UAAG;;AAEU,kDAAG,EAAC;;AAEnB,+B;;AC1FA;AACA;AACA;AACiC;AACG;AACiE;;;AAGrG;AACA,aAAa,OAAO;AACpB,cAAc,oCAAoC;AAClD;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C,iBAAiB,2BAA2B;AAC5C,cAAc,oCAAoC;AAClD;AACA;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,oCAAoC;AAClD;AACA;AACA;AACA,cAAc,oCAAoC;AAClD;AACA,gDAAgD;AAChD,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,uBAAuB;AACvB;AACA;AACA,IAAI,cAAc;AAClB,IAAI,gCAAgC;AACpC;AACA;AACA;AACA;AACA;AACA,IAAI,qBAAa;;AAEjB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;;AAEA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,aAAa;AACxB,YAAY,sBAAsB;AAClC;AACA;AACA,qBAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mCAAmC;AAC9C;AACA;AACA,YAAY;AACZ;AACA;AACA,qBAAa;AACb,SAAS,gCAAM;AACf;AACA;AACA,GAAG;AACH;;AAEA;AACA,+CAA+C,mBAAmB;AAClE,YAAY,8BAA8B;AAC1C;AACA,qBAAa;AACb;AACA;;AAEA;AACA;AACA,YAAY,kCAAkC;AAC9C;AACA,qBAAa;AACb,SAAS,gCAAQ;AACjB;;AAEA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,aAAa;AACxB,YAAY,oCAAoC;AAChD;AACA,qBAAa;AACb,SAAS,gCAAQ;AACjB;;AAEA;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,WAAW,aAAa;AACxB,YAAY,2CAA2C;AACvD;AACA,qBAAa;AACb,SAAS,gCAAQ;AACjB;;AAEA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,aAAa;AACxB,YAAY,sCAAsC;AAClD;AACA,qBAAa;AACb,SAAS,gCAAQ;AACjB;;AAEA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,YAAY,wCAAwC;AACpD;AACA,qBAAa;AACb,SAAS,gCAAQ;AACjB;;AAEA;AACA;AACA;AACA;AACA,WAAW,gCAAgC;AAC3C,WAAW,cAAc;AACzB,YAAY,OAAO;AACnB;AACA,qBAAa;AACb,SAAS,gCAAQ;AACjB;;AAEA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,cAAc;AACzB,YAAY,OAAO;AACnB;AACA,qBAAa;AACb,SAAS,gCAAQ;AACjB;;AAEA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,cAAc;AACzB,YAAY,OAAO;AACnB;AACA,qBAAa;AACb,SAAS,gCAAQ;AACjB;;AAEe,wEAAa,EAAC;;AAE7B;AACA,WAAW,oEAAoE;AAC/E,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC,YAAY,oEAAoE;AAChF;AACO;AACP;AACA,IAAI,QAAa;AACjB;AACA,IAAI,QAAa;AACjB;AACA,YAAY;AACZ;AACA;AACA;AACA,OAAO,UAAoB;AAC3B;AACA;AACA;AACA,oBAAoB,eAAe;AACnC;AACA;AACA;AACA,KAAK;AACL,wCAAwC,mCAAmC;AAC3E;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,yCAAyC,aAAa;AACtD;AACA,wCAAwC,aAAa;AACrD;AACA;AACA,eAAe,cAAc;AAC7B,gBAAgB,cAAc;AAC9B;AACA;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA;AACA,+BAA+B,mCAAmC;AAClE;AACA;AACA;AACA;AACA;;AAEA,mC;;AC3QA;AACA;AACA;AACkC;;;AAGlC;AACA,eAAe,sCAAsC;AACrD,IAAI,0CAA0C;AAC9C;AACA,aAAa,OAAO;AACpB,cAAc,KAAK;AACnB;;;AAGA;AACA,aAAa,4BAA4B;AACzC;;;AAGA;AACA,aAAa,+BAA+B;AAC5C;;;AAGA;AACA;AACA,6BAA6B;AAC7B;AACA,UAAU;AACV;AACO;;;AAGP;AACA,UAAU;AACV;AACO;;;AAGP;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB;AACA,WAAW,cAAc;AACzB;AACA,YAAY,cAAc;AAC1B;AACO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA,6BAA6B,GAAG;AAChC;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;;;AAGA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,SAAS;AACrB;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA;AACA,WAAW,wDAAwD;AACnE,WAAW,GAAG;AACd,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;AACA,eAAe,KAAK;AACpB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,+BAA+B,SAAS;AACxC,QAAQ,MAAM;AACd;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,WAAW,GAAG;AACd,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,+BAA+B,SAAS;AACxC;AACA;AACA,KAAK;AACL;;;AAGA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,GAAG;AACd,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;AACA,eAAe,KAAK;AACpB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;;AAGA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;;;AAGA;AACA;AACA,WAAW,wCAAwC;AACnD,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA,KAAK;AACL;;;AAGA;AACA;AACA;AACA,IAAI,kCAAkC;AACtC,WAAW,qCAAqC;AAChD,WAAW,GAAG;AACd,YAAY,WAAW;AACvB;AACA;AACO;AACP;AACA;AACA,4BAA4B,cAAc;AAC1C;AACA;AACA;AACA;;;AAGA;AACA;AACA,IAAI,8BAA8B;AAClC;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,WAAW,GAAG;AACd,YAAY,WAAW;AACvB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,IAAI,8BAA8B,KAAK,wCAAwC;AAC/E;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY,iDAAiD;AAC7D;AACO;AACP;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,gBAAgB,KAAK;AACrB;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;;;AAGA;AACA;AACA,yBAAyB,8BAA8B;AACvD,IAAI,wCAAwC;AAC5C;AACA,UAAU;AACV;AACO;;;AAGP;AACA,gDAAgD,8BAA8B;AAC9E,IAAI,wCAAwC;AAC5C;AACA,WAAW,kBAAkB;AAC7B;AACA,WAAW,cAAc;AACzB,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACO;AACP;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,EAAE;AACb,WAAW,mBAAmB;AAC9B,YAAY,kBAAkB;AAC9B;AACA;AACO;AACP;AACA,YAAY;AACZ;AACA;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,uCAAuC;AAClD;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,GAAG;AACd;AACO;AACP;AACA,kCAAkC,GAAG;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,EAAE;AACb,WAAW,uCAAuC;AAClD;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,GAAG;AACd,YAAY,EAAE;AACd;AACA;AACO;AACP;AACA;AACA,oBAAoB,EAAE;AACtB;;;AAGA;AACA;AACA,WAAW,2CAA2C;AACtD;AACA,WAAW,qEAAqE;AAChF;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,gCAAgC;AAC3C,WAAW,SAAS;AACpB,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA;AACO;AACP;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,EAAE;AACb,WAAW,2CAA2C;AACtD;AACA,WAAW,qEAAqE;AAChF;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,gCAAgC;AAC3C,WAAW,SAAS;AACpB,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,YAAY,YAAY;AACxB;AACA;AACO;AACP;AACA;AACA,oBAAoB,YAAY;AAChC;;AAEA,+B;;ACjfA;AACA;AACA;AACoC;AACD;AACc;AACA;AACL;;AAE5C;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,IAAI,qBAAU;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA,aAAa,4BAA4B;AACzC,aAAa,oCAAoC;AACjD,cAAc,gCAAgC;AAC9C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,gBAAgB,KAAK;AACrB;AACA,KAAK,UAAU,UAAU;AACzB,qDAAqD,SAAS;AAC9D,KAAK;AACL,iDAAiD,KAAK;AACtD;AACA;;AAEA;AACA,aAAa,SAAS;AACtB,aAAa,oCAAoC;AACjD,cAAc,gCAAgC;AAC9C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,aAAa,KAAK;AAClB,aAAa,oCAAoC;AACjD,cAAc,gCAAgC;AAC9C;AACA;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA,aAAa,4BAA4B;AACzC,aAAa,oCAAoC;AACjD,cAAc,uCAAuC;AACrD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,gBAAgB,KAAK;AACrB;AACA,KAAK,UAAU,UAAU;AACzB;AACA,mBAAmB,SAAS;AAC5B,KAAK;AACL,kDAAkD,KAAK;AACvD;AACA;;AAEA;AACA,aAAa,SAAS;AACtB,aAAa,oCAAoC;AACjD;AACA,cAAc,uCAAuC;AACrD;AACA;AACA,eAAe,uCAAuC;AACtD;AACA,4BAA4B,KAAK,qBAAqB,GAAG;AACzD;AACA,QAAQ,MAAM;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,KAAK;AAClB,aAAa,oCAAoC;AACjD;AACA,cAAc,uCAAuC;AACrD;AACA;AACA,WAAW,gCAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,gBAAgB,KAAK;AACrB;AACA,KAAK,UAAU,UAAU;AACzB;AACA,mBAAmB,SAAS;AAC5B,KAAK;AACL,kDAAkD,KAAK;AACvD;AACA;;AAEA;AACA,aAAa,SAAS;AACtB,aAAa,oCAAoC;AACjD;AACA,cAAc,sCAAsC;AACpD;AACA;AACA,gBAAgB;AAChB;;AAEA;AACA,aAAa,KAAK;AAClB,aAAa,oCAAoC;AACjD;AACA,cAAc,sCAAsC;AACpD;AACA;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA,aAAa,4BAA4B;AACzC,cAAc,wCAAwC;AACtD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,gBAAgB,KAAK;AACrB;AACA,KAAK,UAAU,UAAU;AACzB,wDAAwD,SAAS;AACjE,KAAK;AACL,oDAAoD,KAAK;AACzD;AACA;;AAEA;AACA,aAAa,SAAS;AACtB;AACA,cAAc,wCAAwC;AACtD;AACA;AACA;AACA;;AAEA;AACA,aAAa,KAAK;AAClB;AACA,cAAc,wCAAwC;AACtD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,gCAAgC;AAC7C,aAAa,qCAAqC;AAClD;AACA,cAAc,KAAK;AACnB;AACA;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA,aAAa,uCAAuC;AACpD,aAAa,qCAAqC;AAClD,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,uCAAuC;AACpD,aAAa,qCAAqC;AAClD,cAAc,KAAK;AACnB;AACA;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,sCAAsC;AACnD,aAAa,qCAAqC;AAClD,cAAc,KAAK;AACnB;AACA;AACA,gBAAgB;AAChB;;AAEA;AACA,CAAC,CAAC,cAAa;;;AAGA,2EAAU,EAAC;;AAE1B,sC;;AC/QA;AACA;AACA;AACA;AACmC;AACC;AACc;AACT;AACc;AACR;AACV;AACI;AACP;AACc;AACW;;;AAG3D;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA;AACA,UAAU;AACV;AACA,kBAAkB,eAAe;AACjC;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA,UAAU;AACV;AACA,cAAc,eAAe;AAC7B;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,aAAM;AACV;AACA;;AAEA;AACA;AACA;AACA,0BAA0B,QAAa;AACvC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,eAAe;AACjC,iBAAiB;AACjB;AACA;AACA,OAAO;AACP;AACA,qBAAqB,uBAAuB;AAC5C,gCAAgC,OAAO;AACvC,mBAAmB,cAAc;AACjC;AACA,kDAAkD,QAAQ;AAC1D;AACA,UAAU,MAAM;AAChB;AACA;AACA;AACA;AACA,yBAAyB,YAAO,kBAAkB,cAAc;AAChE,SAAS;AACT,yBAAyB,eAAU,kBAAkB,cAAc;AACnE;AACA,QAAQ,oBAAoB;AAC5B,0BAA0B,UAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,iBAAU;;;AAGZ;AACA;AACA,UAAU;AACV;AACA,mBAAmB,eAAe;AAClC;AACA;AACA,GAAG;;;AAGH;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA,2BAA2B,mCAAmC;AAC9D,yBAAyB,OAAO;AAChC;AACA,aAAa,sCAAsC;AACnD;AACA;AACA;AACA;AACA;;AAEA,eAAe,eAAe;AAC9B;AACA,GAAG;AACH,OAAO,iCAAO;AACd,uBAAuB,UAAK;AAC5B,IAAI,oBAAoB;AACxB,sBAAsB,UAAO;AAC7B;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA,GAAG;AACH,yBAAyB,OAAO;AAChC;AACA;;;AAGA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;;;AAGA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;;;AAGe,+DAAM,EAAC;;AAEtB,kC;;AC5LA;AACA;AACA;AAC6B;AACkB;;;AAG/C;AACA,yEAAyE;AACzE;AACA;AACA,WAAW;AACX;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB;AACA,cAAc,4CAA4C;AAC1D,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;AACA,cAAc,OAAO;AACrB;AACA,cAAc,4BAA4B;AAC1C,cAAc,8BAA8B;AAC5C,cAAc,4BAA4B;AAC1C;AACA,cAAc,8BAA8B;AAC5C;AACA,cAAc,cAAc;AAC5B;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI,SAAI;;AAER;;AAEA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA,QAAQ,UAAI,EAAE,0BAA0B;;AAExC;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA,0EAA0E,aAAa;;AAEvF;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA,WAAW,KAAK;AAChB;AACA;AACA,SAAI;AACJ,aAAa,SAAI;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA,WAAW,4CAA4C;AACvD;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA,WAAW,cAAc;AACzB;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,UAAU,QAAQ;AAClB;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,UAAU,iBAAiB;AAC3B;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,UAAU,OAAO;AACjB;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,UAAU,OAAO;AACjB;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,UAAU,OAAO;AACjB;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,UAAU,4CAA4C;AACtD;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,UAAU,4BAA4B;AACtC;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,UAAU,iBAAiB;AAC3B;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,UAAU,iBAAiB;AAC3B;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,UAAU,8BAA8B;AACxC;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,UAAU,iBAAiB;AAC3B;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,UAAU,iBAAiB;AAC3B;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,UAAU,iBAAiB;AAC3B;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,UAAU,4BAA4B;AACtC;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,UAAU,8BAA8B;AACxC;AACA;AACA,SAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,UAAU,eAAe;AACzB;AACA;AACA,SAAI;AACJ;AACA;;AAEe,wDAAI,EAAC;;AAEpB,gC;;ACrfa;AACe;AACU;AACP;AACD;AAC8F;AAC3E;AACJ;AACS;AACK;AACnB;AACA;AACF;AACH;AACH;AACgB;AACH;AACE;AACM;AACE;AACd;AACoC;;;AAG7E,4BAA4B,UAAU;;AAEtC;;AAEA,IAAI,GAAK;AACT,YAAY,WAAQ;AACpB,CAAC;AACD,YAAY,MAAG;AACf;;AAEA,IAAI,UAAM;AACV;AACA,iBAAiB,WAAK;AACtB,eAAe,YAAM;AACrB;AACA;AACA,IAAI;AACJ,aAAa,UAAI;AACjB;AACA,IAAI;AACJ,GAAG;AACH,EAAE;AACF;AACA,YAAY,WAAK;AACjB;AACA,eAAe,YAAM;AACrB;AACA;AACA,IAAI;AACJ,aAAa,UAAI;AACjB;AACA,IAAI;AACJ,aAAa,UAAI;AACjB;AACA,cAAc,UAAI;AAClB;AACA,KAAK;AACL,gBAAgB,YAAM;AACtB;AACA;AACA,KAAK;AACL,IAAI;AACJ,GAAG;AACH,EAAE;AACF;AACA,iBAAiB,WAAK;AACtB,eAAe,YAAM;AACrB;AACA;AACA,IAAI;AACJ,GAAG;AACH,YAAY,WAAK;AACjB,eAAe,YAAM;AACrB;AACA;AACA,IAAI;AACJ,GAAG;AACH,EAAE;AACF;AACA,iCAAiC,WAAK;AACtC,eAAe,YAAM;AACrB;AACA;AACA,IAAI;AACJ,aAAa,UAAI;AACjB;AACA,IAAI;AACJ,aAAa,UAAI;AACjB;AACA,cAAc,UAAI;AAClB;AACA,KAAK;AACL,gBAAgB,YAAM;AACtB;AACA;AACA,KAAK;AACL,IAAI;AACJ,GAAG;AACH,EAAE;AACF;AACA,cAAc,WAAK;AACnB,cAAc,YAAW;AACzB;AACA,cAAc,UAAI;AAClB;AACA,SAAS;AACT;AACA,IAAI;AACJ,GAAG;AACH,EAAE;AACF;AACA,YAAY,WAAK;AACjB,aAAa,UAAI;AACjB;AACA,cAAc,UAAI;AAClB;AACA,KAAK;AACL,gBAAgB,YAAM;AACtB;AACA;AACA,KAAK;AACL,IAAI;AACJ,GAAG;AACH;AACA;;AAEA,IAAI,gBAAY,OAAO,MAAY;AACnC,aAAa,aAAM;AACnB;AACA,WAAW,mBAAW;AACtB,sBAAsB;AACtB,CAAC;;AAED,wBAAwB,MAAY;AACpC,uBAAuB,YAAW;AAClC;AACA;AACA,YAAY,WAAK;AACjB,YAAY,UAAI;AAChB;AACA,GAAG;AACH,cAAc,YAAM;AACpB;AACA;AACA,GAAG;AACH,aAAa,YAAW;AACxB;AACA,aAAa,UAAI;AACjB;AACA,IAAI;AACJ,GAAG;AACH,EAAE;AACF,CAAC;AACD,qBAAqB,UAAS;AAC9B;AACA;AACA,aAAa,UAAG;AAChB,qDAAqD,EAAE,EAAE,EAAE,EAAE,EAAE;AAC/D;AACA;AACA;AACA;AACA,EAAE;AACF,CAAC;;AAED,IAAI,eAAW,QAAQ,YAAW;AAClC;AACA,cAAc,gBAAY;AAC1B;AACA,wBAAwB,UAAM;AAC9B;AACA;AACA,+BAA+B,UAAM;AACrC;AACA,4BAA4B,UAAM;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;AAGD,mBAAmB,UAAS;AAC5B;AACA;AACA,aAAa,UAAG;AAChB,CAAC;;AAED,IAAI,OAAG;AACP;AACA,WAAW,QAAe;AAC1B,MAAM,0BAAa;AACnB,MAAM,iBAAgB;AACtB,MAAM,kBAAc,EAAE,uBAAuB;AAC7C;AACA;AACA;AACA;AACA,MAAM,KAAU;AAChB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,MAAM,KAAU;AAChB;AACA;AACA,IAAI,eAAW;AACf;AACA;AACA,GAAG;AACH;AACA,WAAW,OAAI;AACf;AACA;AACA,EAAE;AACF,CAAC;;;AAGD;;AAEA;AACA,mBAAmB;AACnB;;AAEA;AACA;;AAEA;AACA;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB,GAAG,iBAAiB;AACzD,KAAK;AACL,IAAI;AACJ,mBAAmB,iBAAiB,GAAG,oCAAoC;AAC3E;AACA;AACA;AACA,YAAY,cAAc,GAAG,iBAAiB;AAC9C;;AAEA,IAAI,UAAM,0BAA0B,eAAW;AAC/C;;AAEA;;AAEA;AACA;AACA;AACA;AACA,EAAE,OAAG,qBAAqB,UAAU;AACpC,EAAE,OAAG;AACL;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,UAAM;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA,OAAG;AACH;AACA,kBAAkB,QAAQ;AAC1B;AACA,oCAAoC,KAAK,GAAG,IAAI,GAAG,IAAI;AACvD;AACA,CAAC;;AAED;AACA,UAAM;AACN;AACA;AACA;AACA,EAAE,UAAM;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,EAAE;AACF,CAAC;;AAED;;AAEA,eAAe,OAAG","file":"main.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 25);\n","/**\n * @module ol/util\n */\n\n/**\n * @return {?} Any return.\n */\nexport function abstract() {\n return /** @type {?} */ ((function() {\n throw new Error('Unimplemented abstract method.');\n })());\n}\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * Usage:\n *\n * function ParentClass(a, b) { }\n * ParentClass.prototype.foo = function(a) { }\n *\n * function ChildClass(a, b, c) {\n * // Call parent constructor\n * ParentClass.call(this, a, b);\n * }\n * inherits(ChildClass, ParentClass);\n *\n * var child = new ChildClass('a', 'b', 'see');\n * child.foo(); // This works.\n *\n * @param {!Function} childCtor Child constructor.\n * @param {!Function} parentCtor Parent constructor.\n * @function module:ol.inherits\n * @deprecated\n * @api\n */\nexport function inherits(childCtor, parentCtor) {\n childCtor.prototype = Object.create(parentCtor.prototype);\n childCtor.prototype.constructor = childCtor;\n}\n\n/**\n * Counter for getUid.\n * @type {number}\n * @private\n */\nvar uidCounter_ = 0;\n\n/**\n * Gets a unique ID for an object. This mutates the object so that further calls\n * with the same object as a parameter returns the same value. Unique IDs are generated\n * as a strictly increasing sequence. Adapted from goog.getUid.\n *\n * @param {Object} obj The object to get the unique ID for.\n * @return {string} The unique ID for the object.\n * @function module:ol.getUid\n * @api\n */\nexport function getUid(obj) {\n return obj.ol_uid || (obj.ol_uid = String(++uidCounter_));\n}\n\n/**\n * OpenLayers version.\n * @type {string}\n */\nexport var VERSION = '5.3.3';\n\n//# sourceMappingURL=util.js.map","/**\n * @module ol/events\n */\nimport {clear} from './obj.js';\n\n\n/**\n * Key to use with {@link module:ol/Observable~Observable#unByKey}.\n * @typedef {Object} EventsKey\n * @property {Object} [bindTo]\n * @property {ListenerFunction} [boundListener]\n * @property {boolean} callOnce\n * @property {number} [deleteIndex]\n * @property {ListenerFunction} listener\n * @property {import(\"./events/Target.js\").EventTargetLike} target\n * @property {string} type\n * @api\n */\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/**\n * @param {EventsKey} listenerObj Listener object.\n * @return {ListenerFunction} Bound listener.\n */\nexport function bindListener(listenerObj) {\n var boundListener = function(evt) {\n var listener = listenerObj.listener;\n var bindTo = listenerObj.bindTo || listenerObj.target;\n if (listenerObj.callOnce) {\n unlistenByKey(listenerObj);\n }\n return listener.call(bindTo, evt);\n };\n listenerObj.boundListener = boundListener;\n return boundListener;\n}\n\n\n/**\n * Finds the matching {@link module:ol/events~EventsKey} in the given listener\n * array.\n *\n * @param {!Array<!EventsKey>} listeners Array of listeners.\n * @param {!Function} listener The listener function.\n * @param {Object=} opt_this The `this` value inside the listener.\n * @param {boolean=} opt_setDeleteIndex Set the deleteIndex on the matching\n * listener, for {@link module:ol/events~unlistenByKey}.\n * @return {EventsKey|undefined} The matching listener object.\n */\nexport function findListener(listeners, listener, opt_this, opt_setDeleteIndex) {\n var listenerObj;\n for (var i = 0, ii = listeners.length; i < ii; ++i) {\n listenerObj = listeners[i];\n if (listenerObj.listener === listener &&\n listenerObj.bindTo === opt_this) {\n if (opt_setDeleteIndex) {\n listenerObj.deleteIndex = i;\n }\n return listenerObj;\n }\n }\n return undefined;\n}\n\n\n/**\n * @param {import(\"./events/Target.js\").EventTargetLike} target Target.\n * @param {string} type Type.\n * @return {Array<EventsKey>|undefined} Listeners.\n */\nexport function getListeners(target, type) {\n var listenerMap = getListenerMap(target);\n return listenerMap ? listenerMap[type] : undefined;\n}\n\n\n/**\n * Get the lookup of listeners.\n * @param {Object} target Target.\n * @param {boolean=} opt_create If a map should be created if it doesn't exist.\n * @return {!Object<string, Array<EventsKey>>} Map of\n * listeners by event type.\n */\nfunction getListenerMap(target, opt_create) {\n var listenerMap = target.ol_lm;\n if (!listenerMap && opt_create) {\n listenerMap = target.ol_lm = {};\n }\n return listenerMap;\n}\n\n\n/**\n * Remove the listener map from a target.\n * @param {Object} target Target.\n */\nfunction removeListenerMap(target) {\n delete target.ol_lm;\n}\n\n\n/**\n * Clean up all listener objects of the given type. All properties on the\n * listener objects will be removed, and if no listeners remain in the listener\n * map, it will be removed from the target.\n * @param {import(\"./events/Target.js\").EventTargetLike} target Target.\n * @param {string} type Type.\n */\nfunction removeListeners(target, type) {\n var listeners = getListeners(target, type);\n if (listeners) {\n for (var i = 0, ii = listeners.length; i < ii; ++i) {\n /** @type {import(\"./events/Target.js\").default} */ (target).\n removeEventListener(type, listeners[i].boundListener);\n clear(listeners[i]);\n }\n listeners.length = 0;\n var listenerMap = getListenerMap(target);\n if (listenerMap) {\n delete listenerMap[type];\n if (Object.keys(listenerMap).length === 0) {\n removeListenerMap(target);\n }\n }\n }\n}\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 var listenerMap = getListenerMap(target, true);\n var listeners = listenerMap[type];\n if (!listeners) {\n listeners = listenerMap[type] = [];\n }\n var listenerObj = findListener(listeners, listener, opt_this, false);\n if (listenerObj) {\n if (!opt_once) {\n // Turn one-off listener into a permanent one.\n listenerObj.callOnce = false;\n }\n } else {\n listenerObj = /** @type {EventsKey} */ ({\n bindTo: opt_this,\n callOnce: !!opt_once,\n listener: listener,\n target: target,\n type: type\n });\n /** @type {import(\"./events/Target.js\").default} */ (target).\n addEventListener(type, bindListener(listenerObj));\n listeners.push(listenerObj);\n }\n\n return listenerObj;\n}\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/**\n * Unregisters 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 * To return a listener, this function needs to be called with the exact same\n * arguments that were used for a previous {@link module:ol/events~listen} call.\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 */\nexport function unlisten(target, type, listener, opt_this) {\n var listeners = getListeners(target, type);\n if (listeners) {\n var listenerObj = findListener(listeners, listener, opt_this, true);\n if (listenerObj) {\n unlistenByKey(listenerObj);\n }\n }\n}\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 /** @type {import(\"./events/Target.js\").default} */ (key.target).\n removeEventListener(key.type, key.boundListener);\n var listeners = getListeners(key.target, key.type);\n if (listeners) {\n var i = 'deleteIndex' in key ? key.deleteIndex : listeners.indexOf(key);\n if (i !== -1) {\n listeners.splice(i, 1);\n }\n if (listeners.length === 0) {\n removeListeners(key.target, key.type);\n }\n }\n clear(key);\n }\n}\n\n\n/**\n * Unregisters all 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 * @param {import(\"./events/Target.js\").EventTargetLike} target Target.\n */\nexport function unlistenAll(target) {\n var listenerMap = getListenerMap(target);\n if (listenerMap) {\n for (var type in listenerMap) {\n removeListeners(target, type);\n }\n }\n}\n\n//# sourceMappingURL=events.js.map","/**\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~Event#change\n * @api\n */\n CHANGE: 'change',\n\n CLEAR: 'clear',\n CONTEXTMENU: 'contextmenu',\n CLICK: 'click',\n DBLCLICK: 'dblclick',\n DRAGENTER: 'dragenter',\n DRAGOVER: 'dragover',\n DROP: 'drop',\n ERROR: 'error',\n KEYDOWN: 'keydown',\n KEYPRESS: 'keypress',\n LOAD: 'load',\n MOUSEDOWN: 'mousedown',\n MOUSEMOVE: 'mousemove',\n MOUSEOUT: 'mouseout',\n MOUSEUP: 'mouseup',\n MOUSEWHEEL: 'mousewheel',\n MSPOINTERDOWN: 'MSPointerDown',\n RESIZE: 'resize',\n TOUCHSTART: 'touchstart',\n TOUCHMOVE: 'touchmove',\n TOUCHEND: 'touchend',\n WHEEL: 'wheel'\n};\n\n//# sourceMappingURL=EventType.js.map","/**\n * @module ol/obj\n */\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 var assign = (typeof Object.assign === 'function') ? Object.assign : function(target, var_sources) {\n var arguments$1 = arguments;\n\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n for (var i = 1, ii = arguments.length; i < ii; ++i) {\n var source = arguments$1[i];\n if (source !== undefined && source !== null) {\n for (var key in source) {\n if (source.hasOwnProperty(key)) {\n output[key] = source[key];\n }\n }\n }\n }\n return output;\n};\n\n\n/**\n * Removes all properties from an object.\n * @param {Object} object The object to clear.\n */\nexport function clear(object) {\n for (var property in object) {\n delete object[property];\n }\n}\n\n\n/**\n * Get an array of property values from an object.\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 function getValues(object) {\n var values = [];\n for (var property in object) {\n values.push(object[property]);\n }\n return values;\n}\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 var property;\n for (property in object) {\n return false;\n }\n return !property;\n}\n\n//# sourceMappingURL=obj.js.map","/**\n * @module ol/dom\n */\n\n\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 * @return {CanvasRenderingContext2D} The context.\n */\nexport function createCanvasContext2D(opt_width, opt_height) {\n var canvas = /** @type {HTMLCanvasElement} */ (document.createElement('canvas'));\n if (opt_width) {\n canvas.width = opt_width;\n }\n if (opt_height) {\n canvas.height = opt_height;\n }\n return /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d'));\n}\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 var width = element.offsetWidth;\n var style = getComputedStyle(element);\n width += parseInt(style.marginLeft, 10) + parseInt(style.marginRight, 10);\n\n return width;\n}\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 var height = element.offsetHeight;\n var 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 var 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//# sourceMappingURL=dom.js.map","/**\n * @module ol/functions\n */\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//# sourceMappingURL=functions.js.map","/**\n * @module ol/Object\n */\nimport {getUid} from './util.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport Observable from './Observable.js';\nimport Event from './events/Event.js';\nimport {assign} from './obj.js';\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Object~BaseObject} instances are instances of this type.\n */\nexport var ObjectEvent = /*@__PURE__*/(function (Event) {\n function ObjectEvent(type, key, oldValue) {\n Event.call(this, 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 if ( Event ) ObjectEvent.__proto__ = Event;\n ObjectEvent.prototype = Object.create( Event && Event.prototype );\n ObjectEvent.prototype.constructor = ObjectEvent;\n\n return ObjectEvent;\n}(Event));\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 */\nvar BaseObject = /*@__PURE__*/(function (Observable) {\n function BaseObject(opt_values) {\n Observable.call(this);\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_ = {};\n\n if (opt_values !== undefined) {\n this.setProperties(opt_values);\n }\n }\n\n if ( Observable ) BaseObject.__proto__ = Observable;\n BaseObject.prototype = Object.create( Observable && Observable.prototype );\n BaseObject.prototype.constructor = BaseObject;\n\n /**\n * Gets a value.\n * @param {string} key Key name.\n * @return {*} Value.\n * @api\n */\n BaseObject.prototype.get = function get (key) {\n var value;\n if (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 BaseObject.prototype.getKeys = function getKeys () {\n return 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 BaseObject.prototype.getProperties = function getProperties () {\n return assign({}, this.values_);\n };\n\n /**\n * @param {string} key Key name.\n * @param {*} oldValue Old value.\n */\n BaseObject.prototype.notify = function notify (key, oldValue) {\n var eventType;\n eventType = getChangeEventType(key);\n this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n eventType = ObjectEventType.PROPERTYCHANGE;\n this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n };\n\n /**\n * Sets a value.\n * @param {string} key Key name.\n * @param {*} value Value.\n * @param {boolean=} opt_silent Update without triggering an event.\n * @api\n */\n BaseObject.prototype.set = function set (key, value, opt_silent) {\n if (opt_silent) {\n this.values_[key] = value;\n } else {\n var oldValue = this.values_[key];\n this.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 BaseObject.prototype.setProperties = function setProperties (values, opt_silent) {\n for (var key in values) {\n this.set(key, values[key], opt_silent);\n }\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 BaseObject.prototype.unset = function unset (key, opt_silent) {\n if (key in this.values_) {\n var oldValue = this.values_[key];\n delete this.values_[key];\n if (!opt_silent) {\n this.notify(key, oldValue);\n }\n }\n };\n\n return BaseObject;\n}(Observable));\n\n\n/**\n * @type {Object<string, string>}\n */\nvar changeEventTypeCache = {};\n\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\n\nexport default BaseObject;\n\n//# sourceMappingURL=Object.js.map","/**\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 */\nvar Event = function Event(type) {\n\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 */\nEvent.prototype.preventDefault = function preventDefault () {\n this.propagationStopped = true;\n};\n\n/**\n * Stop event propagation.\n * @api\n */\nEvent.prototype.stopPropagation = function 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/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function preventDefault(evt) {\n evt.preventDefault();\n}\n\nexport default Event;\n\n//# sourceMappingURL=Event.js.map","/**\n * @module ol/events/Target\n */\nimport Disposable from '../Disposable.js';\nimport {unlistenAll} from '../events.js';\nimport {VOID} from '../functions.js';\nimport Event from './Event.js';\n\n\n/**\n * @typedef {EventTarget|Target} EventTargetLike\n */\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 */\nvar Target = /*@__PURE__*/(function (Disposable) {\n function Target() {\n\n Disposable.call(this);\n\n /**\n * @private\n * @type {!Object<string, number>}\n */\n this.pendingRemovals_ = {};\n\n /**\n * @private\n * @type {!Object<string, number>}\n */\n this.dispatching_ = {};\n\n /**\n * @private\n * @type {!Object<string, Array<import(\"../events.js\").ListenerFunction>>}\n */\n this.listeners_ = {};\n\n }\n\n if ( Disposable ) Target.__proto__ = Disposable;\n Target.prototype = Object.create( Disposable && Disposable.prototype );\n Target.prototype.constructor = Target;\n\n /**\n * @param {string} type Type.\n * @param {import(\"../events.js\").ListenerFunction} listener Listener.\n */\n Target.prototype.addEventListener = function addEventListener (type, listener) {\n var listeners = this.listeners_[type];\n if (!listeners) {\n listeners = this.listeners_[type] = [];\n }\n if (listeners.indexOf(listener) === -1) {\n listeners.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 {{type: string,\n * target: (EventTargetLike|undefined),\n * propagationStopped: (boolean|undefined)}|\n * import(\"./Event.js\").default|string} event Event object.\n * @return {boolean|undefined} `false` if anyone called preventDefault on the\n * event object or if any of the listeners returned false.\n * @api\n */\n Target.prototype.dispatchEvent = function dispatchEvent (event) {\n var evt = typeof event === 'string' ? new Event(event) : event;\n var type = evt.type;\n evt.target = this;\n var listeners = this.listeners_[type];\n var propagate;\n if (listeners) {\n if (!(type in this.dispatching_)) {\n this.dispatching_[type] = 0;\n this.pendingRemovals_[type] = 0;\n }\n ++this.dispatching_[type];\n for (var i = 0, ii = listeners.length; i < ii; ++i) {\n if (listeners[i].call(this, evt) === false || evt.propagationStopped) {\n propagate = false;\n break;\n }\n }\n --this.dispatching_[type];\n if (this.dispatching_[type] === 0) {\n var pendingRemovals = this.pendingRemovals_[type];\n delete this.pendingRemovals_[type];\n while (pendingRemovals--) {\n this.removeEventListener(type, VOID);\n }\n delete this.dispatching_[type];\n }\n return propagate;\n }\n };\n\n /**\n * @inheritDoc\n */\n Target.prototype.disposeInternal = function disposeInternal () {\n unlistenAll(this);\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\").ListenerFunction>} Listeners.\n */\n Target.prototype.getListeners = function getListeners (type) {\n return this.listeners_[type];\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 Target.prototype.hasListener = function hasListener (opt_type) {\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\").ListenerFunction} listener Listener.\n */\n Target.prototype.removeEventListener = function removeEventListener (type, listener) {\n var listeners = this.listeners_[type];\n if (listeners) {\n var index = listeners.indexOf(listener);\n if (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 return Target;\n}(Disposable));\n\n\nexport default Target;\n\n//# sourceMappingURL=Target.js.map","/**\n * @module ol/control/Control\n */\nimport {VOID} from '../functions.js';\nimport MapEventType from '../MapEventType.js';\nimport BaseObject from '../Object.js';\nimport {removeNode} from '../dom.js';\nimport {listen, unlistenByKey} from '../events.js';\n\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)} [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/**\n * @classdesc\n * A control is a visible widget with a DOM element in a fixed position on the\n * screen. They can involve user input (buttons), or be informational only;\n * the position is determined using CSS. By default these are placed in the\n * container with CSS class name `ol-overlaycontainer-stopevent`, but can use\n * any outside DOM element.\n *\n * This is the base class for controls. You can use it for simple custom\n * controls by creating the element with listeners, creating an instance:\n * ```js\n * var myControl = new Control({element: myElement});\n * ```\n * and then adding this to the map.\n *\n * The main advantage of having this as a control rather than a simple separate\n * DOM element is that preventing propagation is handled for you. Controls\n * will also be objects in a {@link module:ol/Collection~Collection}, so you can use their methods.\n *\n * You can also extend this base for your own control class. See\n * examples/custom-controls for an example of how to do this.\n *\n * @api\n */\nvar Control = /*@__PURE__*/(function (BaseObject) {\n function Control(options) {\n\n BaseObject.call(this);\n\n /**\n * @protected\n * @type {HTMLElement}\n */\n this.element = options.element ? options.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 /**\n * @type {function(import(\"../MapEvent.js\").default)}\n */\n this.render = options.render ? options.render : VOID;\n\n if (options.target) {\n this.setTarget(options.target);\n }\n\n }\n\n if ( BaseObject ) Control.__proto__ = BaseObject;\n Control.prototype = Object.create( BaseObject && BaseObject.prototype );\n Control.prototype.constructor = Control;\n\n /**\n * @inheritDoc\n */\n Control.prototype.disposeInternal = function disposeInternal () {\n removeNode(this.element);\n BaseObject.prototype.disposeInternal.call(this);\n };\n\n /**\n * Get the map associated with this control.\n * @return {import(\"../PluggableMap.js\").default} Map.\n * @api\n */\n Control.prototype.getMap = function 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 Control.prototype.setMap = function setMap (map) {\n if (this.map_) {\n removeNode(this.element);\n }\n for (var i = 0, ii = this.listenerKeys.length; i < ii; ++i) {\n unlistenByKey(this.listenerKeys[i]);\n }\n this.listenerKeys.length = 0;\n this.map_ = map;\n if (this.map_) {\n var target = this.target_ ?\n this.target_ : map.getOverlayContainerStopEvent();\n target.appendChild(this.element);\n if (this.render !== VOID) {\n this.listenerKeys.push(listen(map,\n MapEventType.POSTRENDER, this.render, this));\n }\n map.render();\n }\n };\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 Control.prototype.setTarget = function setTarget (target) {\n this.target_ = typeof target === 'string' ?\n document.getElementById(target) :\n target;\n };\n\n return Control;\n}(BaseObject));\n\n\nexport default Control;\n\n//# sourceMappingURL=Control.js.map","/**\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//# sourceMappingURL=ObjectEventType.js.map","/**\n * @module ol/Disposable\n */\n\n/**\n * @classdesc\n * Objects that need to clean up after themselves.\n */\nvar Disposable = function Disposable() {\n /**\n * The object has already been disposed.\n * @type {boolean}\n * @private\n */\n this.disposed_ = false;\n};\n\n/**\n * Clean up.\n */\nDisposable.prototype.dispose = function 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 */\nDisposable.prototype.disposeInternal = function disposeInternal () {};\n\nexport default Disposable;\n\n//# sourceMappingURL=Disposable.js.map","/**\n * @module ol/MapEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n\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\n//# sourceMappingURL=MapEventType.js.map","/**\n * @module ol/Observable\n */\nimport {listen, unlistenByKey, unlisten, listenOnce} from './events.js';\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.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\").Event\n * @api\n */\nvar Observable = /*@__PURE__*/(function (EventTarget) {\n function Observable() {\n\n EventTarget.call(this);\n\n /**\n * @private\n * @type {number}\n */\n this.revision_ = 0;\n\n }\n\n if ( EventTarget ) Observable.__proto__ = EventTarget;\n Observable.prototype = Object.create( EventTarget && EventTarget.prototype );\n Observable.prototype.constructor = Observable;\n\n /**\n * Increases the revision counter and dispatches a 'change' event.\n * @api\n */\n Observable.prototype.changed = function 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 Observable.prototype.getRevision = function 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 Observable.prototype.on = function on (type, listener) {\n if (Array.isArray(type)) {\n var len = type.length;\n var keys = new Array(len);\n for (var i = 0; i < len; ++i) {\n keys[i] = listen(this, type[i], listener);\n }\n return keys;\n } 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 Observable.prototype.once = function once (type, listener) {\n if (Array.isArray(type)) {\n var len = type.length;\n var keys = new Array(len);\n for (var i = 0; i < len; ++i) {\n keys[i] = listenOnce(this, type[i], listener);\n }\n return keys;\n } else {\n return listenOnce(this, /** @type {string} */ (type), listener);\n }\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 Observable.prototype.un = function un (type, listener) {\n if (Array.isArray(type)) {\n for (var i = 0, ii = type.length; i < ii; ++i) {\n unlisten(this, type[i], listener);\n }\n return;\n } else {\n unlisten(this, /** @type {string} */ (type), listener);\n }\n };\n\n return Observable;\n}(EventTarget));\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 (var 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\n\nexport default Observable;\n\n//# sourceMappingURL=Observable.js.map","'use strict';\n\nmodule.exports = rbush;\nmodule.exports.default = rbush;\n\nvar quickselect = require('quickselect');\n\nfunction rbush(maxEntries, format) {\n if (!(this instanceof rbush)) return new rbush(maxEntries, format);\n\n // max entries in a node is 9 by default; min node fill is 40% for best performance\n this._maxEntries = Math.max(4, maxEntries || 9);\n this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));\n\n if (format) {\n this._initFormat(format);\n }\n\n this.clear();\n}\n\nrbush.prototype = {\n\n all: function () {\n return this._all(this.data, []);\n },\n\n search: function (bbox) {\n\n var node = this.data,\n result = [],\n toBBox = this.toBBox;\n\n if (!intersects(bbox, node)) return result;\n\n var nodesToSearch = [],\n i, len, child, childBBox;\n\n while (node) {\n for (i = 0, len = node.children.length; i < len; i++) {\n\n child = node.children[i];\n childBBox = node.leaf ? toBBox(child) : child;\n\n if (intersects(bbox, childBBox)) {\n if (node.leaf) result.push(child);\n else if (contains(bbox, childBBox)) this._all(child, result);\n else nodesToSearch.push(child);\n }\n }\n node = nodesToSearch.pop();\n }\n\n return result;\n },\n\n collides: function (bbox) {\n\n var node = this.data,\n toBBox = this.toBBox;\n\n if (!intersects(bbox, node)) return false;\n\n var nodesToSearch = [],\n i, len, child, childBBox;\n\n while (node) {\n for (i = 0, len = node.children.length; i < len; i++) {\n\n child = node.children[i];\n childBBox = node.leaf ? toBBox(child) : child;\n\n if (intersects(bbox, childBBox)) {\n if (node.leaf || contains(bbox, childBBox)) return true;\n nodesToSearch.push(child);\n }\n }\n node = nodesToSearch.pop();\n }\n\n return false;\n },\n\n load: function (data) {\n if (!(data && data.length)) return this;\n\n if (data.length < this._minEntries) {\n for (var i = 0, len = data.length; i < len; i++) {\n this.insert(data[i]);\n }\n return this;\n }\n\n // recursively build the tree with the given data from scratch using OMT algorithm\n var node = this._build(data.slice(), 0, data.length - 1, 0);\n\n if (!this.data.children.length) {\n // save as is if tree is empty\n this.data = node;\n\n } else if (this.data.height === node.height) {\n // split root if trees have the same height\n this._splitRoot(this.data, node);\n\n } else {\n if (this.data.height < node.height) {\n // swap trees if inserted one is bigger\n var tmpNode = this.data;\n this.data = node;\n node = tmpNode;\n }\n\n // insert the small tree into the large tree at appropriate level\n this._insert(node, this.data.height - node.height - 1, true);\n }\n\n return this;\n },\n\n insert: function (item) {\n if (item) this._insert(item, this.data.height - 1);\n return this;\n },\n\n clear: function () {\n this.data = createNode([]);\n return this;\n },\n\n remove: function (item, equalsFn) {\n if (!item) return this;\n\n var node = this.data,\n bbox = this.toBBox(item),\n path = [],\n indexes = [],\n i, parent, index, goingUp;\n\n // depth-first iterative tree traversal\n while (node || path.length) {\n\n if (!node) { // go up\n node = path.pop();\n parent = path[path.length - 1];\n i = indexes.pop();\n goingUp = true;\n }\n\n if (node.leaf) { // check current node\n index = findItem(item, node.children, equalsFn);\n\n if (index !== -1) {\n // item found, remove the item and condense tree upwards\n node.children.splice(index, 1);\n path.push(node);\n this._condense(path);\n return this;\n }\n }\n\n if (!goingUp && !node.leaf && contains(node, bbox)) { // go down\n path.push(node);\n indexes.push(i);\n i = 0;\n parent = node;\n node = node.children[0];\n\n } else if (parent) { // go right\n i++;\n node = parent.children[i];\n goingUp = false;\n\n } else node = null; // nothing found\n }\n\n return this;\n },\n\n toBBox: function (item) { return item; },\n\n compareMinX: compareNodeMinX,\n compareMinY: compareNodeMinY,\n\n toJSON: function () { return this.data; },\n\n fromJSON: function (data) {\n this.data = data;\n return this;\n },\n\n _all: function (node, result) {\n var nodesToSearch = [];\n while (node) {\n if (node.leaf) result.push.apply(result, node.children);\n else nodesToSearch.push.apply(nodesToSearch, node.children);\n\n node = nodesToSearch.pop();\n }\n return result;\n },\n\n _build: function (items, left, right, height) {\n\n var N = right - left + 1,\n M = this._maxEntries,\n node;\n\n if (N <= M) {\n // reached leaf level; return leaf\n node = createNode(items.slice(left, right + 1));\n calcBBox(node, this.toBBox);\n return node;\n }\n\n if (!height) {\n // target height of the bulk-loaded tree\n height = Math.ceil(Math.log(N) / Math.log(M));\n\n // target number of root entries to maximize storage utilization\n M = Math.ceil(N / Math.pow(M, height - 1));\n }\n\n node = createNode([]);\n node.leaf = false;\n node.height = height;\n\n // split the items into M mostly square tiles\n\n var N2 = Math.ceil(N / M),\n N1 = N2 * Math.ceil(Math.sqrt(M)),\n i, j, right2, right3;\n\n multiSelect(items, left, right, N1, this.compareMinX);\n\n for (i = left; i <= right; i += N1) {\n\n right2 = Math.min(i + N1 - 1, right);\n\n multiSelect(items, i, right2, N2, this.compareMinY);\n\n for (j = i; j <= right2; j += N2) {\n\n right3 = Math.min(j + N2 - 1, right2);\n\n // pack each entry recursively\n node.children.push(this._build(items, j, right3, height - 1));\n }\n }\n\n calcBBox(node, this.toBBox);\n\n return node;\n },\n\n _chooseSubtree: function (bbox, node, level, path) {\n\n var i, len, child, targetNode, area, enlargement, minArea, minEnlargement;\n\n while (true) {\n path.push(node);\n\n if (node.leaf || path.length - 1 === level) break;\n\n minArea = minEnlargement = Infinity;\n\n for (i = 0, len = node.children.length; i < len; i++) {\n child = node.children[i];\n area = bboxArea(child);\n enlargement = enlargedArea(bbox, child) - area;\n\n // choose entry with the least area enlargement\n if (enlargement < minEnlargement) {\n minEnlargement = enlargement;\n minArea = area < minArea ? area : minArea;\n targetNode = child;\n\n } else if (enlargement === minEnlargement) {\n // otherwise choose one with the smallest area\n if (area < minArea) {\n minArea = area;\n targetNode = child;\n }\n }\n }\n\n node = targetNode || node.children[0];\n }\n\n return node;\n },\n\n _insert: function (item, level, isNode) {\n\n var toBBox = this.toBBox,\n bbox = isNode ? item : toBBox(item),\n insertPath = [];\n\n // find the best node for accommodating the item, saving all nodes along the path too\n var node = this._chooseSubtree(bbox, this.data, level, insertPath);\n\n // put the item into the node\n node.children.push(item);\n extend(node, bbox);\n\n // split on node overflow; propagate upwards if necessary\n while (level >= 0) {\n if (insertPath[level].children.length > this._maxEntries) {\n this._split(insertPath, level);\n level--;\n } else break;\n }\n\n // adjust bboxes along the insertion path\n this._adjustParentBBoxes(bbox, insertPath, level);\n },\n\n // split overflowed node into two\n _split: function (insertPath, level) {\n\n var node = insertPath[level],\n M = node.children.length,\n m = this._minEntries;\n\n this._chooseSplitAxis(node, m, M);\n\n var splitIndex = this._chooseSplitIndex(node, m, M);\n\n var newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));\n newNode.height = node.height;\n newNode.leaf = node.leaf;\n\n calcBBox(node, this.toBBox);\n calcBBox(newNode, this.toBBox);\n\n if (level) insertPath[level - 1].children.push(newNode);\n else this._splitRoot(node, newNode);\n },\n\n _splitRoot: function (node, newNode) {\n // split root node\n this.data = createNode([node, newNode]);\n this.data.height = node.height + 1;\n this.data.leaf = false;\n calcBBox(this.data, this.toBBox);\n },\n\n _chooseSplitIndex: function (node, m, M) {\n\n var i, bbox1, bbox2, overlap, area, minOverlap, minArea, index;\n\n minOverlap = minArea = Infinity;\n\n for (i = m; i <= M - m; i++) {\n bbox1 = distBBox(node, 0, i, this.toBBox);\n bbox2 = distBBox(node, i, M, this.toBBox);\n\n overlap = intersectionArea(bbox1, bbox2);\n area = bboxArea(bbox1) + bboxArea(bbox2);\n\n // choose distribution with minimum overlap\n if (overlap < minOverlap) {\n minOverlap = overlap;\n index = i;\n\n minArea = area < minArea ? area : minArea;\n\n } else if (overlap === minOverlap) {\n // otherwise choose distribution with minimum area\n if (area < minArea) {\n minArea = area;\n index = i;\n }\n }\n }\n\n return index;\n },\n\n // sorts node children by the best axis for split\n _chooseSplitAxis: function (node, m, M) {\n\n var compareMinX = node.leaf ? this.compareMinX : compareNodeMinX,\n compareMinY = node.leaf ? this.compareMinY : compareNodeMinY,\n xMargin = this._allDistMargin(node, m, M, compareMinX),\n yMargin = this._allDistMargin(node, m, M, compareMinY);\n\n // if total distributions margin value is minimal for x, sort by minX,\n // otherwise it's already sorted by minY\n if (xMargin < yMargin) node.children.sort(compareMinX);\n },\n\n // total margin of all possible split distributions where each node is at least m full\n _allDistMargin: function (node, m, M, compare) {\n\n node.children.sort(compare);\n\n var toBBox = this.toBBox,\n leftBBox = distBBox(node, 0, m, toBBox),\n rightBBox = distBBox(node, M - m, M, toBBox),\n margin = bboxMargin(leftBBox) + bboxMargin(rightBBox),\n i, child;\n\n for (i = m; i < M - m; i++) {\n child = node.children[i];\n extend(leftBBox, node.leaf ? toBBox(child) : child);\n margin += bboxMargin(leftBBox);\n }\n\n for (i = M - m - 1; i >= m; i--) {\n child = node.children[i];\n extend(rightBBox, node.leaf ? toBBox(child) : child);\n margin += bboxMargin(rightBBox);\n }\n\n return margin;\n },\n\n _adjustParentBBoxes: function (bbox, path, level) {\n // adjust bboxes along the given tree path\n for (var i = level; i >= 0; i--) {\n extend(path[i], bbox);\n }\n },\n\n _condense: function (path) {\n // go through the path, removing empty nodes and updating bboxes\n for (var i = path.length - 1, siblings; i >= 0; i--) {\n if (path[i].children.length === 0) {\n if (i > 0) {\n siblings = path[i - 1].children;\n siblings.splice(siblings.indexOf(path[i]), 1);\n\n } else this.clear();\n\n } else calcBBox(path[i], this.toBBox);\n }\n },\n\n _initFormat: function (format) {\n // data format (minX, minY, maxX, maxY accessors)\n\n // uses eval-type function compilation instead of just accepting a toBBox function\n // because the algorithms are very sensitive to sorting functions performance,\n // so they should be dead simple and without inner calls\n\n var compareArr = ['return a', ' - b', ';'];\n\n this.compareMinX = new Function('a', 'b', compareArr.join(format[0]));\n this.compareMinY = new Function('a', 'b', compareArr.join(format[1]));\n\n this.toBBox = new Function('a',\n 'return {minX: a' + format[0] +\n ', minY: a' + format[1] +\n ', maxX: a' + format[2] +\n ', maxY: a' + format[3] + '};');\n }\n};\n\nfunction findItem(item, items, equalsFn) {\n if (!equalsFn) return items.indexOf(item);\n\n for (var i = 0; i < items.length; i++) {\n if (equalsFn(item, items[i])) return i;\n }\n return -1;\n}\n\n// calculate node's bbox from bboxes of its children\nfunction calcBBox(node, toBBox) {\n distBBox(node, 0, node.children.length, toBBox, node);\n}\n\n// min bounding rectangle of node children from k to p-1\nfunction distBBox(node, k, p, toBBox, destNode) {\n if (!destNode) destNode = createNode(null);\n destNode.minX = Infinity;\n destNode.minY = Infinity;\n destNode.maxX = -Infinity;\n destNode.maxY = -Infinity;\n\n for (var i = k, child; i < p; i++) {\n child = node.children[i];\n extend(destNode, node.leaf ? toBBox(child) : child);\n }\n\n return destNode;\n}\n\nfunction extend(a, b) {\n a.minX = Math.min(a.minX, b.minX);\n a.minY = Math.min(a.minY, b.minY);\n a.maxX = Math.max(a.maxX, b.maxX);\n a.maxY = Math.max(a.maxY, b.maxY);\n return a;\n}\n\nfunction compareNodeMinX(a, b) { return a.minX - b.minX; }\nfunction compareNodeMinY(a, b) { return a.minY - b.minY; }\n\nfunction bboxArea(a) { return (a.maxX - a.minX) * (a.maxY - a.minY); }\nfunction bboxMargin(a) { return (a.maxX - a.minX) + (a.maxY - a.minY); }\n\nfunction enlargedArea(a, b) {\n return (Math.max(b.maxX, a.maxX) - Math.min(b.minX, a.minX)) *\n (Math.max(b.maxY, a.maxY) - Math.min(b.minY, a.minY));\n}\n\nfunction intersectionArea(a, b) {\n var minX = Math.max(a.minX, b.minX),\n minY = Math.max(a.minY, b.minY),\n maxX = Math.min(a.maxX, b.maxX),\n maxY = Math.min(a.maxY, b.maxY);\n\n return Math.max(0, maxX - minX) *\n Math.max(0, maxY - minY);\n}\n\nfunction contains(a, b) {\n return a.minX <= b.minX &&\n a.minY <= b.minY &&\n b.maxX <= a.maxX &&\n b.maxY <= a.maxY;\n}\n\nfunction intersects(a, b) {\n return b.minX <= a.maxX &&\n b.minY <= a.maxY &&\n b.maxX >= a.minX &&\n b.maxY >= a.minY;\n}\n\nfunction createNode(children) {\n return {\n children: children,\n height: 1,\n leaf: true,\n minX: Infinity,\n minY: Infinity,\n maxX: -Infinity,\n maxY: -Infinity\n };\n}\n\n// sort an array so that items come in groups of n unsorted items, with groups sorted between each other;\n// combines selection algorithm with binary divide & conquer approach\n\nfunction multiSelect(arr, left, right, n, compare) {\n var stack = [left, right],\n mid;\n\n while (stack.length) {\n right = stack.pop();\n left = stack.pop();\n\n if (right - left <= n) continue;\n\n mid = left + Math.ceil((right - left) / n / 2) * n;\n quickselect(arr, mid, left, right, compare);\n\n stack.push(left, mid, mid, right);\n }\n}\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('ol/control/Control'), require('ol/Observable')) :\n\ttypeof define === 'function' && define.amd ? define(['ol/control/Control', 'ol/Observable'], factory) :\n\t(global.LayerSwitcher = factory(global.ol.control.Control,global.ol.Observable));\n}(this, (function (Control,ol_Observable) { 'use strict';\n\nControl = 'default' in Control ? Control['default'] : Control;\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\nvar CSS_PREFIX = 'layer-switcher-';\n\n/**\n * OpenLayers Layer Switcher Control.\n * See [the examples](./examples) for usage.\n * @constructor\n * @extends {ol/control/Control~Control}\n * @param {Object} opt_options Control options, extends ol/control/Control~Control#options adding:\n * @param {String} opt_options.tipLabel the button tooltip.\n * @param {String} opt_options.groupSelectStyle either `'none'` - groups don't get a checkbox,\n * `'children'` (default) groups have a checkbox and affect child visibility or\n * `'group'` groups have a checkbox but do not alter child visibility (like QGIS).\n */\n\nvar LayerSwitcher = function (_Control) {\n inherits(LayerSwitcher, _Control);\n\n function LayerSwitcher(opt_options) {\n classCallCheck(this, LayerSwitcher);\n\n\n var options = opt_options || {};\n\n var tipLabel = options.tipLabel ? options.tipLabel : 'Legend';\n\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.groupSelectStyle = ['none', 'children', 'group'].indexOf(options.groupSelectStyle) >= 0 ? options.groupSelectStyle : 'children';\n\n _this.mapListeners = [];\n\n _this.hiddenClassName = 'ol-unselectable ol-control layer-switcher';\n if (LayerSwitcher.isTouchDevice_()) {\n _this.hiddenClassName += ' touch';\n }\n _this.shownClassName = 'shown';\n\n element.className = _this.hiddenClassName;\n\n var button = document.createElement('button');\n button.setAttribute('title', tipLabel);\n element.appendChild(button);\n\n _this.panel = document.createElement('div');\n _this.panel.className = 'panel';\n element.appendChild(_this.panel);\n LayerSwitcher.enableTouchScroll_(_this.panel);\n\n var this_ = _this;\n\n button.onmouseover = function (e) {\n this_.showPanel();\n };\n\n button.onclick = function (e) {\n e = e || window.event;\n this_.showPanel();\n e.preventDefault();\n };\n\n this_.panel.onmouseout = function (e) {\n e = e || window.event;\n if (!this_.panel.contains(e.toElement || e.relatedTarget)) {\n this_.hidePanel();\n }\n };\n\n return _this;\n }\n\n /**\n * Set the map instance the control is associated with.\n * @param {ol/Map~Map} map The map instance.\n */\n\n\n createClass(LayerSwitcher, [{\n key: 'setMap',\n value: function setMap(map) {\n // Clean up listeners associated with the previous map\n for (var i = 0, key; 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 var this_ = this;\n this.mapListeners.push(map.on('pointerdown', function () {\n this_.hidePanel();\n }));\n this.renderPanel();\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 /**\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 /**\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 LayerSwitcher.renderPanel(this.getMap(), this.panel, {\n groupSelectStyle: this.groupSelectStyle\n });\n }\n\n /**\n * **Static** Re-draw the layer panel to represent the current state of the layers.\n * @param {ol/Map~Map} map The OpenLayers Map instance to render layers for\n * @param {Element} panel The DOM Element into which the layer tree will be rendered\n */\n\n }], [{\n key: 'renderPanel',\n value: function renderPanel(map, panel, options) {\n\n options = options || {};\n\n LayerSwitcher.ensureTopVisibleBaseLayerShown_(map);\n\n while (panel.firstChild) {\n panel.removeChild(panel.firstChild);\n }\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\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\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 // console.log('render');\n LayerSwitcher.renderPanel(map, panel, options);\n });\n }\n }, {\n key: 'isBaseGroup',\n value: function isBaseGroup(lyr) {\n var lyrs = lyr.getLayers ? lyr.getLayers().getArray() : [];\n return lyrs.length && lyrs[0].get('type') === 'base';\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.getLayers && !l.get('combine') && !LayerSwitcher.isBaseGroup(l);\n }).reverse();\n // console.log(groups.map(g => g.get('title')));\n groups.forEach(function (group) {\n // TODO Can we use getLayersArray, is it public in the esm build?\n var descendantVisibility = group.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 group.setVisible(true);\n group.set('indeterminate', false);\n } else if (descendantVisibility.every(function (v) {\n return v === false;\n })) {\n group.setVisible(false);\n group.set('indeterminate', false);\n } else {\n group.setVisible(true);\n group.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.getLayers && !l.get('combine') && !LayerSwitcher.isBaseGroup(l);\n });\n groups.forEach(function (group) {\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 // console.log('>', l.get('title'));\n l.set('indeterminate', false);\n if ((!groupVisible || groupIndeterminate) && l.getVisible()) {\n l.set('indeterminate', true);\n }\n });\n });\n }\n\n /**\n * **Static** Ensure only the top-most base layer is visible if more than one is visible.\n * @param {ol/Map~Map} map The map instance.\n * @private\n */\n\n }, {\n key: 'ensureTopVisibleBaseLayerShown_',\n value: function ensureTopVisibleBaseLayerShown_(map) {\n var lastVisibleBaseLyr;\n LayerSwitcher.forEachRecursive(map, function (l, idx, a) {\n if (l.get('type') === 'base' && l.getVisible()) {\n lastVisibleBaseLyr = l;\n }\n });\n if (lastVisibleBaseLyr) LayerSwitcher.setVisible_(map, lastVisibleBaseLyr, true);\n }\n }, {\n key: 'getGroupsAndLayers',\n value: function getGroupsAndLayers(lyr, filterFn) {\n var layers = [];\n filterFn = filterFn || function (l, idx, a) {\n return true;\n };\n LayerSwitcher.forEachRecursive(lyr, function (l, idx, a) {\n if (l.get('title')) {\n if (filterFn(l, idx, a)) {\n layers.push(l);\n }\n }\n });\n return layers;\n }\n\n /**\n * **Static** 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 * @private\n * @param {ol/Map~Map} map The map instance.\n * @param {ol/layer/Base~BaseLayer} The layer whose visibility will be toggled.\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, a) {\n if (l != lyr && l.get('type') === 'base') {\n l.setVisible(false);\n }\n });\n }\n if (lyr.getLayers && !lyr.get('combine') && groupSelectStyle === 'children') {\n lyr.getLayers().forEach(function (l) {\n LayerSwitcher.setVisible_(map, l, lyr.getVisible(), groupSelectStyle);\n });\n }\n }\n\n /**\n * **Static** Render all layers that are children of a group.\n * @private\n * @param {ol/Map~Map} map The map instance.\n * @param {ol/layer/Base~BaseLayer} lyr Layer to be rendered (should have a title property).\n * @param {Number} idx Position in parent group list.\n */\n\n }, {\n key: 'renderLayer_',\n value: function renderLayer_(map, lyr, idx, options, render) {\n\n var li = document.createElement('li');\n\n var lyrTitle = lyr.get('title');\n\n var checkboxId = LayerSwitcher.uuid();\n\n var label = document.createElement('label');\n\n if (lyr.getLayers && !lyr.get('combine')) {\n\n var isBaseGroup = LayerSwitcher.isBaseGroup(lyr);\n\n li.classList.add('group');\n if (isBaseGroup) {\n li.classList.add(CSS_PREFIX + 'base-group');\n }\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 LayerSwitcher.toggleFold_(lyr, li);\n };\n li.appendChild(btn);\n }\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 LayerSwitcher.setVisible_(map, lyr, e.target.checked, options.groupSelectStyle);\n render(lyr);\n };\n li.appendChild(_input);\n label.htmlFor = checkboxId;\n }\n\n label.innerHTML = lyrTitle;\n li.appendChild(label);\n var ul = document.createElement('ul');\n li.appendChild(ul);\n\n LayerSwitcher.renderLayers_(map, lyr, ul, options, render);\n } else {\n\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 LayerSwitcher.setVisible_(map, lyr, e.target.checked, options.groupSelectStyle);\n render(lyr);\n };\n li.appendChild(input);\n\n label.htmlFor = checkboxId;\n label.innerHTML = lyrTitle;\n\n var rsl = map.getView().getResolution();\n if (rsl > lyr.getMaxResolution() || rsl < lyr.getMinResolution()) {\n label.className += ' disabled';\n }\n\n li.appendChild(label);\n }\n\n return li;\n }\n\n /**\n * **Static** Render all layers that are children of a group.\n * @private\n * @param {ol/Map~Map} map The map instance.\n * @param {ol/layer/Group~LayerGroup} lyr Group layer whose children will be rendered.\n * @param {Element} elm DOM element that children will be appended to.\n */\n\n }, {\n key: 'renderLayers_',\n value: function renderLayers_(map, lyr, elm, options, render) {\n var lyrs = lyr.getLayers().getArray().slice().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 /**\n * **Static** Call the supplied function for each layer in the passed layer group\n * recursing nested groups.\n * @param {ol/layer/Group~LayerGroup} lyr The layer group to start iterating from.\n * @param {Function} fn Callback which will be called for each `ol/layer/Base~BaseLayer`\n * found under `lyr`. The signature for `fn` is the same as `ol/Collection~Collection#forEach`\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.getLayers) {\n LayerSwitcher.forEachRecursive(lyr, fn);\n }\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 /**\n * @private\n * @desc Apply workaround to enable scrolling of overflowing content within an\n * element. Adapted from https://gist.github.com/chrismbarr/4107472\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 /**\n * @private\n * @desc Determine if the current browser supports touch events. Adapted from\n * https://gist.github.com/chrismbarr/4107472\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 /**\n * Fold/unfold layer group\n * @private\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 return LayerSwitcher;\n}(Control);\n\nif (window.ol && window.ol.control) {\n window.ol.control.LayerSwitcher = LayerSwitcher;\n}\n\nreturn LayerSwitcher;\n\n})));\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.quickselect = factory());\n}(this, (function () { 'use strict';\n\nfunction quickselect(arr, k, left, right, compare) {\n quickselectStep(arr, k, left || 0, right || (arr.length - 1), compare || defaultCompare);\n}\n\nfunction quickselectStep(arr, k, left, right, compare) {\n\n while (right > left) {\n if (right - left > 600) {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n quickselectStep(arr, k, newLeft, newRight, compare);\n }\n\n var t = arr[k];\n var i = left;\n var j = right;\n\n swap(arr, left, k);\n if (compare(arr[right], t) > 0) swap(arr, left, right);\n\n while (i < j) {\n swap(arr, i, j);\n i++;\n j--;\n while (compare(arr[i], t) < 0) i++;\n while (compare(arr[j], t) > 0) j--;\n }\n\n if (compare(arr[left], t) === 0) swap(arr, left, j);\n else {\n j++;\n swap(arr, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\nfunction swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\nfunction defaultCompare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\nreturn quickselect;\n\n})));\n","// extracted by mini-css-extract-plugin","/**\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 */\nvar AssertionError = /*@__PURE__*/(function (Error) {\n function AssertionError(code) {\n var path = VERSION === 'latest' ? VERSION : 'v' + VERSION.split('-')[0];\n var message = 'Assertion failed. See https://openlayers.org/en/' + path +\n '/doc/errors/#' + code + ' for details.';\n\n Error.call(this, 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 if ( Error ) AssertionError.__proto__ = Error;\n AssertionError.prototype = Object.create( Error && Error.prototype );\n AssertionError.prototype.constructor = AssertionError;\n\n return AssertionError;\n}(Error));\n\nexport default AssertionError;\n\n//# sourceMappingURL=AssertionError.js.map","/**\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//# sourceMappingURL=CollectionEventType.js.map","/**\n * @module ol/Collection\n */\nimport AssertionError from './AssertionError.js';\nimport CollectionEventType from './CollectionEventType.js';\nimport BaseObject from './Object.js';\nimport Event from './events/Event.js';\n\n\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n LENGTH: 'length'\n};\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Collection~Collection} instances are instances of this\n * type.\n */\nexport var CollectionEvent = /*@__PURE__*/(function (Event) {\n function CollectionEvent(type, opt_element) {\n Event.call(this, 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\n if ( Event ) CollectionEvent.__proto__ = Event;\n CollectionEvent.prototype = Object.create( Event && Event.prototype );\n CollectionEvent.prototype.constructor = CollectionEvent;\n\n return CollectionEvent;\n}(Event));\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 */\nvar Collection = /*@__PURE__*/(function (BaseObject) {\n function Collection(opt_array, opt_options) {\n\n BaseObject.call(this);\n\n var 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 (var 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 if ( BaseObject ) Collection.__proto__ = BaseObject;\n Collection.prototype = Object.create( BaseObject && BaseObject.prototype );\n Collection.prototype.constructor = Collection;\n\n /**\n * Remove all elements from the collection.\n * @api\n */\n Collection.prototype.clear = function 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 Collection.prototype.extend = function extend (arr) {\n for (var 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 Collection.prototype.forEach = function forEach (f) {\n var array = this.array_;\n for (var i = 0, ii = array.length; i < ii; ++i) {\n f(array[i], i, array);\n }\n };\n\n /**\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 Collection.prototype.getArray = function 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 Collection.prototype.item = function 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 Collection.prototype.getLength = function 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 Collection.prototype.insertAt = function 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));\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 Collection.prototype.pop = function 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 Collection.prototype.push = function push (elem) {\n if (this.unique_) {\n this.assertUnique_(elem);\n }\n var n = this.getLength();\n this.insertAt(n, elem);\n return this.getLength();\n };\n\n /**\n * Remove the first occurrence of an element from the collection.\n * @param {T} elem Element.\n * @return {T|undefined} The removed element or undefined if none found.\n * @api\n */\n Collection.prototype.remove = function remove (elem) {\n var arr = this.array_;\n for (var i = 0, ii = arr.length; i < ii; ++i) {\n if (arr[i] === elem) {\n return this.removeAt(i);\n }\n }\n return undefined;\n };\n\n /**\n * Remove the element at the provided index and return it.\n * Return `undefined` if the collection does not contain this index.\n * @param {number} index Index.\n * @return {T|undefined} Value.\n * @api\n */\n Collection.prototype.removeAt = function removeAt (index) {\n var prev = this.array_[index];\n this.array_.splice(index, 1);\n this.updateLength_();\n this.dispatchEvent(new CollectionEvent(CollectionEventType.REMOVE, prev));\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 Collection.prototype.setAt = function setAt (index, elem) {\n var n = this.getLength();\n if (index < n) {\n if (this.unique_) {\n this.assertUnique_(elem, index);\n }\n var prev = this.array_[index];\n this.array_[index] = elem;\n this.dispatchEvent(\n new CollectionEvent(CollectionEventType.REMOVE, prev));\n this.dispatchEvent(\n new CollectionEvent(CollectionEventType.ADD, elem));\n } else {\n for (var j = n; j < index; ++j) {\n this.insertAt(j, undefined);\n }\n this.insertAt(index, elem);\n }\n };\n\n /**\n * @private\n */\n Collection.prototype.updateLength_ = function 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 Collection.prototype.assertUnique_ = function assertUnique_ (elem, opt_except) {\n for (var i = 0, ii = this.array_.length; i < ii; ++i) {\n if (this.array_[i] === elem && i !== opt_except) {\n throw new AssertionError(58);\n }\n }\n };\n\n return Collection;\n}(BaseObject));\n\n\nexport default Collection;\n\n//# sourceMappingURL=Collection.js.map","/**\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 */\nvar MapEvent = /*@__PURE__*/(function (Event) {\n function MapEvent(type, map, opt_frameState) {\n\n Event.call(this, 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\n if ( Event ) MapEvent.__proto__ = Event;\n MapEvent.prototype = Object.create( Event && Event.prototype );\n MapEvent.prototype.constructor = MapEvent;\n\n return MapEvent;\n}(Event));\n\nexport default MapEvent;\n\n//# sourceMappingURL=MapEvent.js.map","/**\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 */\nvar MapBrowserEvent = /*@__PURE__*/(function (MapEvent) {\n function MapBrowserEvent(type, map, browserEvent, opt_dragging, opt_frameState) {\n\n MapEvent.call(this, type, map, opt_frameState);\n\n /**\n * The original browser event.\n * @const\n * @type {Event}\n * @api\n */\n this.originalEvent = browserEvent;\n\n /**\n * The map pixel relative to the viewport corresponding to the original browser event.\n * @type {import(\"./pixel.js\").Pixel}\n * @api\n */\n this.pixel = map.getEventPixel(browserEvent);\n\n /**\n * The coordinate in view projection corresponding to the original browser event.\n * @type {import(\"./coordinate.js\").Coordinate}\n * @api\n */\n this.coordinate = map.getCoordinateFromPixel(this.pixel);\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 if ( MapEvent ) MapBrowserEvent.__proto__ = MapEvent;\n MapBrowserEvent.prototype = Object.create( MapEvent && MapEvent.prototype );\n MapBrowserEvent.prototype.constructor = MapBrowserEvent;\n\n /**\n * Prevents the default browser action.\n * See https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault.\n * @override\n * @api\n */\n MapBrowserEvent.prototype.preventDefault = function preventDefault () {\n MapEvent.prototype.preventDefault.call(this);\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 * @override\n * @api\n */\n MapBrowserEvent.prototype.stopPropagation = function stopPropagation () {\n MapEvent.prototype.stopPropagation.call(this);\n this.originalEvent.stopPropagation();\n };\n\n return MapBrowserEvent;\n}(MapEvent));\n\n\nexport default MapBrowserEvent;\n\n//# sourceMappingURL=MapBrowserEvent.js.map","/**\n * @module ol/has\n */\n\nvar ua = typeof navigator !== 'undefined' ?\n navigator.userAgent.toLowerCase() : '';\n\n/**\n * User agent string says we are dealing with Firefox as browser.\n * @type {boolean}\n */\nexport var FIREFOX = ua.indexOf('firefox') !== -1;\n\n/**\n * User agent string says we are dealing with Safari as browser.\n * @type {boolean}\n */\nexport var SAFARI = ua.indexOf('safari') !== -1 && ua.indexOf('chrom') == -1;\n\n/**\n * User agent string says we are dealing with a WebKit engine.\n * @type {boolean}\n */\nexport var WEBKIT = ua.indexOf('webkit') !== -1 && ua.indexOf('edge') == -1;\n\n/**\n * User agent string says we are dealing with a Mac as platform.\n * @type {boolean}\n */\nexport var MAC = ua.indexOf('macintosh') !== -1;\n\n\n/**\n * The ratio between physical pixels and device-independent pixels\n * (dips) on the device (`window.devicePixelRatio`).\n * @const\n * @type {number}\n * @api\n */\nexport var DEVICE_PIXEL_RATIO = window.devicePixelRatio || 1;\n\n\n/**\n * True if the browser's Canvas implementation implements {get,set}LineDash.\n * @type {boolean}\n */\nexport var CANVAS_LINE_DASH = function() {\n var has = false;\n try {\n has = !!document.createElement('canvas').getContext('2d').setLineDash;\n } catch (e) {\n // pass\n }\n return has;\n}();\n\n\n/**\n * Is HTML5 geolocation supported in the current browser?\n * @const\n * @type {boolean}\n * @api\n */\nexport var GEOLOCATION = 'geolocation' in navigator;\n\n\n/**\n * True if browser supports touch events.\n * @const\n * @type {boolean}\n * @api\n */\nexport var TOUCH = 'ontouchstart' in window;\n\n\n/**\n * True if browser supports pointer events.\n * @const\n * @type {boolean}\n */\nexport var POINTER = 'PointerEvent' in window;\n\n\n/**\n * True if browser supports ms pointer events (IE 10).\n * @const\n * @type {boolean}\n */\nexport var MSPOINTER = !!(navigator.msPointerEnabled);\n\n\nexport {HAS as WEBGL} from './webgl.js';\n\n//# sourceMappingURL=has.js.map","/**\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 /**\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//# sourceMappingURL=MapBrowserEventType.js.map","/**\n * @module ol/MapBrowserPointerEvent\n */\nimport MapBrowserEvent from './MapBrowserEvent.js';\n\nvar MapBrowserPointerEvent = /*@__PURE__*/(function (MapBrowserEvent) {\n function MapBrowserPointerEvent(type, map, pointerEvent, opt_dragging, opt_frameState) {\n\n MapBrowserEvent.call(this, type, map, pointerEvent.originalEvent, opt_dragging, opt_frameState);\n\n /**\n * @const\n * @type {import(\"./pointer/PointerEvent.js\").default}\n */\n this.pointerEvent = pointerEvent;\n\n }\n\n if ( MapBrowserEvent ) MapBrowserPointerEvent.__proto__ = MapBrowserEvent;\n MapBrowserPointerEvent.prototype = Object.create( MapBrowserEvent && MapBrowserEvent.prototype );\n MapBrowserPointerEvent.prototype.constructor = MapBrowserPointerEvent;\n\n return MapBrowserPointerEvent;\n}(MapBrowserEvent));\n\nexport default MapBrowserPointerEvent;\n\n//# sourceMappingURL=MapBrowserPointerEvent.js.map","/**\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//# sourceMappingURL=EventType.js.map","/**\n * @module ol/pointer/EventSource\n */\n\nvar EventSource = function EventSource(dispatcher, mapping) {\n\n /**\n * @type {import(\"./PointerEventHandler.js\").default}\n */\n this.dispatcher = dispatcher;\n\n /**\n * @private\n * @const\n * @type {!Object<string, function(Event)>}\n */\n this.mapping_ = mapping;\n};\n\n/**\n * List of events supported by this source.\n * @return {Array<string>} Event names\n */\nEventSource.prototype.getEvents = function getEvents () {\n return Object.keys(this.mapping_);\n};\n\n/**\n * Returns the handler that should handle a given event type.\n * @param {string} eventType The event type.\n * @return {function(Event)} Handler\n */\nEventSource.prototype.getHandlerForEvent = function getHandlerForEvent (eventType) {\n return this.mapping_[eventType];\n};\n\nexport default EventSource;\n\n//# sourceMappingURL=EventSource.js.map","/**\n * @module ol/pointer/MouseSource\n */\n\n// Based on https://github.com/Polymer/PointerEvents\n\n// Copyright (c) 2013 The Polymer Authors. 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\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY 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\nimport EventSource from './EventSource.js';\n\n\n/**\n * @type {number}\n */\nexport var POINTER_ID = 1;\n\n\n/**\n * @type {string}\n */\nexport var POINTER_TYPE = 'mouse';\n\n\n/**\n * Radius around touchend that swallows mouse events.\n *\n * @type {number}\n */\nvar DEDUP_DIST = 25;\n\n/**\n * Handler for `mousedown`.\n *\n * @this {MouseSource}\n * @param {MouseEvent} inEvent The in event.\n */\nfunction mousedown(inEvent) {\n if (!this.isEventSimulatedFromTouch_(inEvent)) {\n // TODO(dfreedman) workaround for some elements not sending mouseup\n // http://crbug/149091\n if (POINTER_ID.toString() in this.pointerMap) {\n this.cancel(inEvent);\n }\n var e = prepareEvent(inEvent, this.dispatcher);\n this.pointerMap[POINTER_ID.toString()] = inEvent;\n this.dispatcher.down(e, inEvent);\n }\n}\n\n/**\n * Handler for `mousemove`.\n *\n * @this {MouseSource}\n * @param {MouseEvent} inEvent The in event.\n */\nfunction mousemove(inEvent) {\n if (!this.isEventSimulatedFromTouch_(inEvent)) {\n var e = prepareEvent(inEvent, this.dispatcher);\n this.dispatcher.move(e, inEvent);\n }\n}\n\n/**\n * Handler for `mouseup`.\n *\n * @this {MouseSource}\n * @param {MouseEvent} inEvent The in event.\n */\nfunction mouseup(inEvent) {\n if (!this.isEventSimulatedFromTouch_(inEvent)) {\n var p = this.pointerMap[POINTER_ID.toString()];\n\n if (p && p.button === inEvent.button) {\n var e = prepareEvent(inEvent, this.dispatcher);\n this.dispatcher.up(e, inEvent);\n this.cleanupMouse();\n }\n }\n}\n\n/**\n * Handler for `mouseover`.\n *\n * @this {MouseSource}\n * @param {MouseEvent} inEvent The in event.\n */\nfunction mouseover(inEvent) {\n if (!this.isEventSimulatedFromTouch_(inEvent)) {\n var e = prepareEvent(inEvent, this.dispatcher);\n this.dispatcher.enterOver(e, inEvent);\n }\n}\n\n/**\n * Handler for `mouseout`.\n *\n * @this {MouseSource}\n * @param {MouseEvent} inEvent The in event.\n */\nfunction mouseout(inEvent) {\n if (!this.isEventSimulatedFromTouch_(inEvent)) {\n var e = prepareEvent(inEvent, this.dispatcher);\n this.dispatcher.leaveOut(e, inEvent);\n }\n}\n\n\nvar MouseSource = /*@__PURE__*/(function (EventSource) {\n function MouseSource(dispatcher) {\n var mapping = {\n 'mousedown': mousedown,\n 'mousemove': mousemove,\n 'mouseup': mouseup,\n 'mouseover': mouseover,\n 'mouseout': mouseout\n };\n EventSource.call(this, dispatcher, mapping);\n\n /**\n * @const\n * @type {!Object<string, Event|Object>}\n */\n this.pointerMap = dispatcher.pointerMap;\n\n /**\n * @const\n * @type {Array<import(\"../pixel.js\").Pixel>}\n */\n this.lastTouches = [];\n }\n\n if ( EventSource ) MouseSource.__proto__ = EventSource;\n MouseSource.prototype = Object.create( EventSource && EventSource.prototype );\n MouseSource.prototype.constructor = MouseSource;\n\n /**\n * Detect if a mouse event was simulated from a touch by\n * checking if previously there was a touch event at the\n * same position.\n *\n * FIXME - Known problem with the native Android browser on\n * Samsung GT-I9100 (Android 4.1.2):\n * In case the page is scrolled, this function does not work\n * correctly when a canvas is used (WebGL or canvas renderer).\n * Mouse listeners on canvas elements (for this browser), create\n * two mouse events: One 'good' and one 'bad' one (on other browsers or\n * when a div is used, there is only one event). For the 'bad' one,\n * clientX/clientY and also pageX/pageY are wrong when the page\n * is scrolled. Because of that, this function can not detect if\n * the events were simulated from a touch event. As result, a\n * pointer event at a wrong position is dispatched, which confuses\n * the map interactions.\n * It is unclear, how one can get the correct position for the event\n * or detect that the positions are invalid.\n *\n * @private\n * @param {MouseEvent} inEvent The in event.\n * @return {boolean} True, if the event was generated by a touch.\n */\n MouseSource.prototype.isEventSimulatedFromTouch_ = function isEventSimulatedFromTouch_ (inEvent) {\n var lts = this.lastTouches;\n var x = inEvent.clientX;\n var y = inEvent.clientY;\n for (var i = 0, l = lts.length, t = (void 0); i < l && (t = lts[i]); i++) {\n // simulated mouse events will be swallowed near a primary touchend\n var dx = Math.abs(x - t[0]);\n var dy = Math.abs(y - t[1]);\n if (dx <= DEDUP_DIST && dy <= DEDUP_DIST) {\n return true;\n }\n }\n return false;\n };\n\n /**\n * Dispatches a `pointercancel` event.\n *\n * @param {Event} inEvent The in event.\n */\n MouseSource.prototype.cancel = function cancel (inEvent) {\n var e = prepareEvent(inEvent, this.dispatcher);\n this.dispatcher.cancel(e, inEvent);\n this.cleanupMouse();\n };\n\n /**\n * Remove the mouse from the list of active pointers.\n */\n MouseSource.prototype.cleanupMouse = function cleanupMouse () {\n delete this.pointerMap[POINTER_ID.toString()];\n };\n\n return MouseSource;\n}(EventSource));\n\n\n/**\n * Creates a copy of the original event that will be used\n * for the fake pointer event.\n *\n * @param {Event} inEvent The in event.\n * @param {import(\"./PointerEventHandler.js\").default} dispatcher Event handler.\n * @return {Object} The copied event.\n */\nexport function prepareEvent(inEvent, dispatcher) {\n var e = dispatcher.cloneEvent(inEvent, inEvent);\n\n // forward mouse preventDefault\n var pd = e.preventDefault;\n e.preventDefault = function() {\n inEvent.preventDefault();\n pd();\n };\n\n e.pointerId = POINTER_ID;\n e.isPrimary = true;\n e.pointerType = POINTER_TYPE;\n\n return e;\n}\n\n\nexport default MouseSource;\n\n//# sourceMappingURL=MouseSource.js.map","/**\n * @module ol/pointer/MsSource\n */\n// Based on https://github.com/Polymer/PointerEvents\n\n// Copyright (c) 2013 The Polymer Authors. 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\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY 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\nimport EventSource from './EventSource.js';\n\n\n/**\n * @const\n * @type {Array<string>}\n */\nvar POINTER_TYPES = [\n '',\n 'unavailable',\n 'touch',\n 'pen',\n 'mouse'\n];\n\n/**\n * Handler for `msPointerDown`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msPointerDown(inEvent) {\n this.pointerMap[inEvent.pointerId.toString()] = inEvent;\n var e = this.prepareEvent_(inEvent);\n this.dispatcher.down(e, inEvent);\n}\n\n/**\n * Handler for `msPointerMove`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msPointerMove(inEvent) {\n var e = this.prepareEvent_(inEvent);\n this.dispatcher.move(e, inEvent);\n}\n\n/**\n * Handler for `msPointerUp`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msPointerUp(inEvent) {\n var e = this.prepareEvent_(inEvent);\n this.dispatcher.up(e, inEvent);\n this.cleanup(inEvent.pointerId);\n}\n\n/**\n * Handler for `msPointerOut`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msPointerOut(inEvent) {\n var e = this.prepareEvent_(inEvent);\n this.dispatcher.leaveOut(e, inEvent);\n}\n\n/**\n * Handler for `msPointerOver`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msPointerOver(inEvent) {\n var e = this.prepareEvent_(inEvent);\n this.dispatcher.enterOver(e, inEvent);\n}\n\n/**\n * Handler for `msPointerCancel`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msPointerCancel(inEvent) {\n var e = this.prepareEvent_(inEvent);\n this.dispatcher.cancel(e, inEvent);\n this.cleanup(inEvent.pointerId);\n}\n\n/**\n * Handler for `msLostPointerCapture`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msLostPointerCapture(inEvent) {\n var e = this.dispatcher.makeEvent('lostpointercapture', inEvent, inEvent);\n this.dispatcher.dispatchEvent(e);\n}\n\n/**\n * Handler for `msGotPointerCapture`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msGotPointerCapture(inEvent) {\n var e = this.dispatcher.makeEvent('gotpointercapture', inEvent, inEvent);\n this.dispatcher.dispatchEvent(e);\n}\n\nvar MsSource = /*@__PURE__*/(function (EventSource) {\n function MsSource(dispatcher) {\n var mapping = {\n 'MSPointerDown': msPointerDown,\n 'MSPointerMove': msPointerMove,\n 'MSPointerUp': msPointerUp,\n 'MSPointerOut': msPointerOut,\n 'MSPointerOver': msPointerOver,\n 'MSPointerCancel': msPointerCancel,\n 'MSGotPointerCapture': msGotPointerCapture,\n 'MSLostPointerCapture': msLostPointerCapture\n };\n EventSource.call(this, dispatcher, mapping);\n\n /**\n * @const\n * @type {!Object<string, MSPointerEvent|Object>}\n */\n this.pointerMap = dispatcher.pointerMap;\n }\n\n if ( EventSource ) MsSource.__proto__ = EventSource;\n MsSource.prototype = Object.create( EventSource && EventSource.prototype );\n MsSource.prototype.constructor = MsSource;\n\n /**\n * Creates a copy of the original event that will be used\n * for the fake pointer event.\n *\n * @private\n * @param {MSPointerEvent} inEvent The in event.\n * @return {Object} The copied event.\n */\n MsSource.prototype.prepareEvent_ = function prepareEvent_ (inEvent) {\n /** @type {MSPointerEvent|Object} */\n var e = inEvent;\n if (typeof inEvent.pointerType === 'number') {\n e = this.dispatcher.cloneEvent(inEvent, inEvent);\n e.pointerType = POINTER_TYPES[inEvent.pointerType];\n }\n\n return e;\n };\n\n /**\n * Remove this pointer from the list of active pointers.\n * @param {number} pointerId Pointer identifier.\n */\n MsSource.prototype.cleanup = function cleanup (pointerId) {\n delete this.pointerMap[pointerId.toString()];\n };\n\n return MsSource;\n}(EventSource));\n\nexport default MsSource;\n\n//# sourceMappingURL=MsSource.js.map","/**\n * @module ol/pointer/NativeSource\n */\n\n// Based on https://github.com/Polymer/PointerEvents\n\n// Copyright (c) 2013 The Polymer Authors. 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\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY 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\nimport EventSource from './EventSource.js';\n\n/**\n * Handler for `pointerdown`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction pointerDown(inEvent) {\n this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `pointermove`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction pointerMove(inEvent) {\n this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `pointerup`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction pointerUp(inEvent) {\n this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `pointerout`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction pointerOut(inEvent) {\n this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `pointerover`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction pointerOver(inEvent) {\n this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `pointercancel`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction pointerCancel(inEvent) {\n this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `lostpointercapture`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction lostPointerCapture(inEvent) {\n this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `gotpointercapture`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction gotPointerCapture(inEvent) {\n this.dispatcher.fireNativeEvent(inEvent);\n}\n\nvar NativeSource = /*@__PURE__*/(function (EventSource) {\n function NativeSource(dispatcher) {\n var mapping = {\n 'pointerdown': pointerDown,\n 'pointermove': pointerMove,\n 'pointerup': pointerUp,\n 'pointerout': pointerOut,\n 'pointerover': pointerOver,\n 'pointercancel': pointerCancel,\n 'gotpointercapture': gotPointerCapture,\n 'lostpointercapture': lostPointerCapture\n };\n EventSource.call(this, dispatcher, mapping);\n }\n\n if ( EventSource ) NativeSource.__proto__ = EventSource;\n NativeSource.prototype = Object.create( EventSource && EventSource.prototype );\n NativeSource.prototype.constructor = NativeSource;\n\n return NativeSource;\n}(EventSource));\n\nexport default NativeSource;\n\n//# sourceMappingURL=NativeSource.js.map","/**\n * @module ol/pointer/PointerEvent\n */\n\n// Based on https://github.com/Polymer/PointerEvents\n\n// Copyright (c) 2013 The Polymer Authors. 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\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY 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\nimport _Event from '../events/Event.js';\n\n\n/**\n * Is the `buttons` property supported?\n * @type {boolean}\n */\nvar HAS_BUTTONS = false;\n\n\nvar PointerEvent = /*@__PURE__*/(function (_Event) {\n function PointerEvent(type, originalEvent, opt_eventDict) {\n _Event.call(this, type);\n\n /**\n * @const\n * @type {Event}\n */\n this.originalEvent = originalEvent;\n\n var eventDict = opt_eventDict ? opt_eventDict : {};\n\n /**\n * @type {number}\n */\n this.buttons = getButtons(eventDict);\n\n /**\n * @type {number}\n */\n this.pressure = getPressure(eventDict, this.buttons);\n\n // MouseEvent related properties\n\n /**\n * @type {boolean}\n */\n this.bubbles = 'bubbles' in eventDict ? eventDict['bubbles'] : false;\n\n /**\n * @type {boolean}\n */\n this.cancelable = 'cancelable' in eventDict ? eventDict['cancelable'] : false;\n\n /**\n * @type {Object}\n */\n this.view = 'view' in eventDict ? eventDict['view'] : null;\n\n /**\n * @type {number}\n */\n this.detail = 'detail' in eventDict ? eventDict['detail'] : null;\n\n /**\n * @type {number}\n */\n this.screenX = 'screenX' in eventDict ? eventDict['screenX'] : 0;\n\n /**\n * @type {number}\n */\n this.screenY = 'screenY' in eventDict ? eventDict['screenY'] : 0;\n\n /**\n * @type {number}\n */\n this.clientX = 'clientX' in eventDict ? eventDict['clientX'] : 0;\n\n /**\n * @type {number}\n */\n this.clientY = 'clientY' in eventDict ? eventDict['clientY'] : 0;\n\n /**\n * @type {boolean}\n */\n this.ctrlKey = 'ctrlKey' in eventDict ? eventDict['ctrlKey'] : false;\n\n /**\n * @type {boolean}\n */\n this.altKey = 'altKey' in eventDict ? eventDict['altKey'] : false;\n\n /**\n * @type {boolean}\n */\n this.shiftKey = 'shiftKey' in eventDict ? eventDict['shiftKey'] : false;\n\n /**\n * @type {boolean}\n */\n this.metaKey = 'metaKey' in eventDict ? eventDict['metaKey'] : false;\n\n /**\n * @type {number}\n */\n this.button = 'button' in eventDict ? eventDict['button'] : 0;\n\n /**\n * @type {Node}\n */\n this.relatedTarget = 'relatedTarget' in eventDict ?\n eventDict['relatedTarget'] : null;\n\n // PointerEvent related properties\n\n /**\n * @const\n * @type {number}\n */\n this.pointerId = 'pointerId' in eventDict ? eventDict['pointerId'] : 0;\n\n /**\n * @type {number}\n */\n this.width = 'width' in eventDict ? eventDict['width'] : 0;\n\n /**\n * @type {number}\n */\n this.height = 'height' in eventDict ? eventDict['height'] : 0;\n\n /**\n * @type {number}\n */\n this.tiltX = 'tiltX' in eventDict ? eventDict['tiltX'] : 0;\n\n /**\n * @type {number}\n */\n this.tiltY = 'tiltY' in eventDict ? eventDict['tiltY'] : 0;\n\n /**\n * @type {string}\n */\n this.pointerType = 'pointerType' in eventDict ? eventDict['pointerType'] : '';\n\n /**\n * @type {number}\n */\n this.hwTimestamp = 'hwTimestamp' in eventDict ? eventDict['hwTimestamp'] : 0;\n\n /**\n * @type {boolean}\n */\n this.isPrimary = 'isPrimary' in eventDict ? eventDict['isPrimary'] : false;\n\n // keep the semantics of preventDefault\n if (originalEvent.preventDefault) {\n this.preventDefault = function() {\n originalEvent.preventDefault();\n };\n }\n }\n\n if ( _Event ) PointerEvent.__proto__ = _Event;\n PointerEvent.prototype = Object.create( _Event && _Event.prototype );\n PointerEvent.prototype.constructor = PointerEvent;\n\n return PointerEvent;\n}(_Event));\n\n\n/**\n * @param {Object<string, ?>} eventDict The event dictionary.\n * @return {number} Button indicator.\n */\nfunction getButtons(eventDict) {\n // According to the w3c spec,\n // http://www.w3.org/TR/DOM-Level-3-Events/#events-MouseEvent-button\n // MouseEvent.button == 0 can mean either no mouse button depressed, or the\n // left mouse button depressed.\n //\n // As of now, the only way to distinguish between the two states of\n // MouseEvent.button is by using the deprecated MouseEvent.which property, as\n // this maps mouse buttons to positive integers > 0, and uses 0 to mean that\n // no mouse button is held.\n //\n // MouseEvent.which is derived from MouseEvent.button at MouseEvent creation,\n // but initMouseEvent does not expose an argument with which to set\n // MouseEvent.which. Calling initMouseEvent with a buttonArg of 0 will set\n // MouseEvent.button == 0 and MouseEvent.which == 1, breaking the expectations\n // of app developers.\n //\n // The only way to propagate the correct state of MouseEvent.which and\n // MouseEvent.button to a new MouseEvent.button == 0 and MouseEvent.which == 0\n // is to call initMouseEvent with a buttonArg value of -1.\n //\n // This is fixed with DOM Level 4's use of buttons\n var buttons;\n if (eventDict.buttons || HAS_BUTTONS) {\n buttons = eventDict.buttons;\n } else {\n switch (eventDict.which) {\n case 1: buttons = 1; break;\n case 2: buttons = 4; break;\n case 3: buttons = 2; break;\n default: buttons = 0;\n }\n }\n return buttons;\n}\n\n\n/**\n * @param {Object<string, ?>} eventDict The event dictionary.\n * @param {number} buttons Button indicator.\n * @return {number} The pressure.\n */\nfunction getPressure(eventDict, buttons) {\n // Spec requires that pointers without pressure specified use 0.5 for down\n // state and 0 for up state.\n var pressure = 0;\n if (eventDict.pressure) {\n pressure = eventDict.pressure;\n } else {\n pressure = buttons ? 0.5 : 0;\n }\n return pressure;\n}\n\n\n/**\n * Checks if the `buttons` property is supported.\n */\n(function() {\n try {\n var ev = new MouseEvent('click', {buttons: 1});\n HAS_BUTTONS = ev.buttons === 1;\n } catch (e) {\n // pass\n }\n})();\n\nexport default PointerEvent;\n\n//# sourceMappingURL=PointerEvent.js.map","/**\n * @module ol/array\n */\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 var mid, cmp;\n var comparator = opt_comparator || numberSafeCompareFunction;\n var low = 0;\n var high = haystack.length;\n var 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) { /* Too low. */\n low = mid + 1;\n\n } else { /* 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/**\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/**\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/**\n * @param {Array<number>} arr Array.\n * @param {number} target Target.\n * @param {number} direction 0 means return the nearest, > 0\n * means return the largest nearest, < 0 means return the\n * smallest nearest.\n * @return {number} Index.\n */\nexport function linearFindNearest(arr, target, direction) {\n var n = arr.length;\n if (arr[0] <= target) {\n return 0;\n } else if (target <= arr[n - 1]) {\n return n - 1;\n } else {\n var 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/**\n * @param {Array<*>} arr Array.\n * @param {number} begin Begin index.\n * @param {number} end End index.\n */\nexport function reverseSubArray(arr, begin, end) {\n while (begin < end) {\n var tmp = arr[begin];\n arr[begin] = arr[end];\n arr[end] = tmp;\n ++begin;\n --end;\n }\n}\n\n\n/**\n * @param {Array<VALUE>} arr The array to modify.\n * @param {!Array<VALUE>|VALUE} data The elements or arrays of elements to add to arr.\n * @template VALUE\n */\nexport function extend(arr, data) {\n var extension = Array.isArray(data) ? data : [data];\n var length = extension.length;\n for (var i = 0; i < length; i++) {\n arr[arr.length] = extension[i];\n }\n}\n\n\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 var i = arr.indexOf(obj);\n var found = i > -1;\n if (found) {\n arr.splice(i, 1);\n }\n return found;\n}\n\n\n/**\n * @param {Array<VALUE>} arr The array to search in.\n * @param {function(VALUE, number, ?) : boolean} func The function to compare.\n * @template VALUE\n * @return {VALUE|null} The element found or null.\n */\nexport function find(arr, func) {\n var length = arr.length >>> 0;\n var value;\n\n for (var i = 0; i < length; i++) {\n value = arr[i];\n if (func(value, i, arr)) {\n return value;\n }\n }\n return null;\n}\n\n\n/**\n * @param {Array|Uint8ClampedArray} arr1 The first array to compare.\n * @param {Array|Uint8ClampedArray} arr2 The second array to compare.\n * @return {boolean} Whether the two arrays are equal.\n */\nexport function equals(arr1, arr2) {\n var len1 = arr1.length;\n if (len1 !== arr2.length) {\n return false;\n }\n for (var i = 0; i < len1; i++) {\n if (arr1[i] !== arr2[i]) {\n return false;\n }\n }\n return true;\n}\n\n\n/**\n * Sort the passed array such that the relative order of equal elements is preverved.\n * See https://en.wikipedia.org/wiki/Sorting_algorithm#Stability for details.\n * @param {Array<*>} arr The array to sort (modifies original).\n * @param {!function(*, *): number} compareFnc Comparison function.\n * @api\n */\nexport function stableSort(arr, compareFnc) {\n var length = arr.length;\n var tmp = Array(arr.length);\n var i;\n for (i = 0; i < length; i++) {\n tmp[i] = {index: i, value: arr[i]};\n }\n tmp.sort(function(a, b) {\n return compareFnc(a.value, b.value) || a.index - b.index;\n });\n for (i = 0; i < arr.length; i++) {\n arr[i] = tmp[i].value;\n }\n}\n\n\n/**\n * @param {Array<*>} arr The array to search in.\n * @param {Function} func Comparison function.\n * @return {number} Return index.\n */\nexport function findIndex(arr, func) {\n var index;\n var found = !arr.every(function(el, idx) {\n index = idx;\n return !func(el, idx, arr);\n });\n return found ? index : -1;\n}\n\n\n/**\n * @param {Array<*>} arr The array to test.\n * @param {Function=} opt_func Comparison function.\n * @param {boolean=} opt_strict Strictly sorted (default false).\n * @return {boolean} Return index.\n */\nexport function isSorted(arr, opt_func, opt_strict) {\n var compare = opt_func || numberSafeCompareFunction;\n return arr.every(function(currentVal, index) {\n if (index === 0) {\n return true;\n }\n var res = compare(arr[index - 1], currentVal);\n return !(res > 0 || opt_strict && res === 0);\n });\n}\n\n//# sourceMappingURL=array.js.map","/**\n * @module ol/pointer/TouchSource\n */\n\n// Based on https://github.com/Polymer/PointerEvents\n\n// Copyright (c) 2013 The Polymer Authors. 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\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY 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\nimport {remove} from '../array.js';\nimport EventSource from './EventSource.js';\nimport {POINTER_ID} from './MouseSource.js';\n\n\n/**\n * @type {number}\n */\nvar CLICK_COUNT_TIMEOUT = 200;\n\n/**\n * @type {string}\n */\nvar POINTER_TYPE = 'touch';\n\n/**\n * Handler for `touchstart`, triggers `pointerover`,\n * `pointerenter` and `pointerdown` events.\n *\n * @this {TouchSource}\n * @param {TouchEvent} inEvent The in event.\n */\nfunction touchstart(inEvent) {\n this.vacuumTouches_(inEvent);\n this.setPrimaryTouch_(inEvent.changedTouches[0]);\n this.dedupSynthMouse_(inEvent);\n this.clickCount_++;\n this.processTouches_(inEvent, this.overDown_);\n}\n\n/**\n * Handler for `touchmove`.\n *\n * @this {TouchSource}\n * @param {TouchEvent} inEvent The in event.\n */\nfunction touchmove(inEvent) {\n this.processTouches_(inEvent, this.moveOverOut_);\n}\n\n/**\n * Handler for `touchend`, triggers `pointerup`,\n * `pointerout` and `pointerleave` events.\n *\n * @this {TouchSource}\n * @param {TouchEvent} inEvent The event.\n */\nfunction touchend(inEvent) {\n this.dedupSynthMouse_(inEvent);\n this.processTouches_(inEvent, this.upOut_);\n}\n\n/**\n * Handler for `touchcancel`, triggers `pointercancel`,\n * `pointerout` and `pointerleave` events.\n *\n * @this {TouchSource}\n * @param {TouchEvent} inEvent The in event.\n */\nfunction touchcancel(inEvent) {\n this.processTouches_(inEvent, this.cancelOut_);\n}\n\n\nvar TouchSource = /*@__PURE__*/(function (EventSource) {\n function TouchSource(dispatcher, mouseSource) {\n var mapping = {\n 'touchstart': touchstart,\n 'touchmove': touchmove,\n 'touchend': touchend,\n 'touchcancel': touchcancel\n };\n EventSource.call(this, dispatcher, mapping);\n\n /**\n * @const\n * @type {!Object<string, Event|Object>}\n */\n this.pointerMap = dispatcher.pointerMap;\n\n /**\n * @const\n * @type {import(\"./MouseSource.js\").default}\n */\n this.mouseSource = mouseSource;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.firstTouchId_ = undefined;\n\n /**\n * @private\n * @type {number}\n */\n this.clickCount_ = 0;\n\n /**\n * @private\n * @type {?}\n */\n this.resetId_;\n\n /**\n * Mouse event timeout: This should be long enough to\n * ignore compat mouse events made by touch.\n * @private\n * @type {number}\n */\n this.dedupTimeout_ = 2500;\n }\n\n if ( EventSource ) TouchSource.__proto__ = EventSource;\n TouchSource.prototype = Object.create( EventSource && EventSource.prototype );\n TouchSource.prototype.constructor = TouchSource;\n\n /**\n * @private\n * @param {Touch} inTouch The in touch.\n * @return {boolean} True, if this is the primary touch.\n */\n TouchSource.prototype.isPrimaryTouch_ = function isPrimaryTouch_ (inTouch) {\n return this.firstTouchId_ === inTouch.identifier;\n };\n\n /**\n * Set primary touch if there are no pointers, or the only pointer is the mouse.\n * @param {Touch} inTouch The in touch.\n * @private\n */\n TouchSource.prototype.setPrimaryTouch_ = function setPrimaryTouch_ (inTouch) {\n var count = Object.keys(this.pointerMap).length;\n if (count === 0 || (count === 1 && POINTER_ID.toString() in this.pointerMap)) {\n this.firstTouchId_ = inTouch.identifier;\n this.cancelResetClickCount_();\n }\n };\n\n /**\n * @private\n * @param {PointerEvent} inPointer The in pointer object.\n */\n TouchSource.prototype.removePrimaryPointer_ = function removePrimaryPointer_ (inPointer) {\n if (inPointer.isPrimary) {\n this.firstTouchId_ = undefined;\n this.resetClickCount_();\n }\n };\n\n /**\n * @private\n */\n TouchSource.prototype.resetClickCount_ = function resetClickCount_ () {\n this.resetId_ = setTimeout(\n this.resetClickCountHandler_.bind(this),\n CLICK_COUNT_TIMEOUT);\n };\n\n /**\n * @private\n */\n TouchSource.prototype.resetClickCountHandler_ = function resetClickCountHandler_ () {\n this.clickCount_ = 0;\n this.resetId_ = undefined;\n };\n\n /**\n * @private\n */\n TouchSource.prototype.cancelResetClickCount_ = function cancelResetClickCount_ () {\n if (this.resetId_ !== undefined) {\n clearTimeout(this.resetId_);\n }\n };\n\n /**\n * @private\n * @param {TouchEvent} browserEvent Browser event\n * @param {Touch} inTouch Touch event\n * @return {PointerEvent} A pointer object.\n */\n TouchSource.prototype.touchToPointer_ = function touchToPointer_ (browserEvent, inTouch) {\n var e = this.dispatcher.cloneEvent(browserEvent, inTouch);\n // Spec specifies that pointerId 1 is reserved for Mouse.\n // Touch identifiers can start at 0.\n // Add 2 to the touch identifier for compatibility.\n e.pointerId = inTouch.identifier + 2;\n // TODO: check if this is necessary?\n //e.target = findTarget(e);\n e.bubbles = true;\n e.cancelable = true;\n e.detail = this.clickCount_;\n e.button = 0;\n e.buttons = 1;\n e.width = inTouch.radiusX || 0;\n e.height = inTouch.radiusY || 0;\n e.pressure = inTouch.force || 0.5;\n e.isPrimary = this.isPrimaryTouch_(inTouch);\n e.pointerType = POINTER_TYPE;\n\n // make sure that the properties that are different for\n // each `Touch` object are not copied from the BrowserEvent object\n e.clientX = inTouch.clientX;\n e.clientY = inTouch.clientY;\n e.screenX = inTouch.screenX;\n e.screenY = inTouch.screenY;\n\n return e;\n };\n\n /**\n * @private\n * @param {TouchEvent} inEvent Touch event\n * @param {function(TouchEvent, PointerEvent)} inFunction In function.\n */\n TouchSource.prototype.processTouches_ = function processTouches_ (inEvent, inFunction) {\n var touches = Array.prototype.slice.call(inEvent.changedTouches);\n var count = touches.length;\n function preventDefault() {\n inEvent.preventDefault();\n }\n for (var i = 0; i < count; ++i) {\n var pointer = this.touchToPointer_(inEvent, touches[i]);\n // forward touch preventDefaults\n pointer.preventDefault = preventDefault;\n inFunction.call(this, inEvent, pointer);\n }\n };\n\n /**\n * @private\n * @param {TouchList} touchList The touch list.\n * @param {number} searchId Search identifier.\n * @return {boolean} True, if the `Touch` with the given id is in the list.\n */\n TouchSource.prototype.findTouch_ = function findTouch_ (touchList, searchId) {\n var l = touchList.length;\n for (var i = 0; i < l; i++) {\n var touch = touchList[i];\n if (touch.identifier === searchId) {\n return true;\n }\n }\n return false;\n };\n\n /**\n * In some instances, a touchstart can happen without a touchend. This\n * leaves the pointermap in a broken state.\n * Therefore, on every touchstart, we remove the touches that did not fire a\n * touchend event.\n * To keep state globally consistent, we fire a pointercancel for\n * this \"abandoned\" touch\n *\n * @private\n * @param {TouchEvent} inEvent The in event.\n */\n TouchSource.prototype.vacuumTouches_ = function vacuumTouches_ (inEvent) {\n var touchList = inEvent.touches;\n // pointerMap.getCount() should be < touchList.length here,\n // as the touchstart has not been processed yet.\n var keys = Object.keys(this.pointerMap);\n var count = keys.length;\n if (count >= touchList.length) {\n var d = [];\n for (var i = 0; i < count; ++i) {\n var key = Number(keys[i]);\n var value = this.pointerMap[key];\n // Never remove pointerId == 1, which is mouse.\n // Touch identifiers are 2 smaller than their pointerId, which is the\n // index in pointermap.\n if (key != POINTER_ID && !this.findTouch_(touchList, key - 2)) {\n d.push(value.out);\n }\n }\n for (var i$1 = 0; i$1 < d.length; ++i$1) {\n this.cancelOut_(inEvent, d[i$1]);\n }\n }\n };\n\n /**\n * @private\n * @param {TouchEvent} browserEvent The event.\n * @param {PointerEvent} inPointer The in pointer object.\n */\n TouchSource.prototype.overDown_ = function overDown_ (browserEvent, inPointer) {\n this.pointerMap[inPointer.pointerId] = {\n target: inPointer.target,\n out: inPointer,\n outTarget: inPointer.target\n };\n this.dispatcher.over(inPointer, browserEvent);\n this.dispatcher.enter(inPointer, browserEvent);\n this.dispatcher.down(inPointer, browserEvent);\n };\n\n /**\n * @private\n * @param {TouchEvent} browserEvent The event.\n * @param {PointerEvent} inPointer The in pointer.\n */\n TouchSource.prototype.moveOverOut_ = function moveOverOut_ (browserEvent, inPointer) {\n var event = inPointer;\n var pointer = this.pointerMap[event.pointerId];\n // a finger drifted off the screen, ignore it\n if (!pointer) {\n return;\n }\n var outEvent = pointer.out;\n var outTarget = pointer.outTarget;\n this.dispatcher.move(event, browserEvent);\n if (outEvent && outTarget !== event.target) {\n outEvent.relatedTarget = event.target;\n /** @type {Object} */ (event).relatedTarget = outTarget;\n // recover from retargeting by shadow\n outEvent.target = outTarget;\n if (event.target) {\n this.dispatcher.leaveOut(outEvent, browserEvent);\n this.dispatcher.enterOver(event, browserEvent);\n } else {\n // clean up case when finger leaves the screen\n /** @type {Object} */ (event).target = outTarget;\n /** @type {Object} */ (event).relatedTarget = null;\n this.cancelOut_(browserEvent, event);\n }\n }\n pointer.out = event;\n pointer.outTarget = event.target;\n };\n\n /**\n * @private\n * @param {TouchEvent} browserEvent An event.\n * @param {PointerEvent} inPointer The inPointer object.\n */\n TouchSource.prototype.upOut_ = function upOut_ (browserEvent, inPointer) {\n this.dispatcher.up(inPointer, browserEvent);\n this.dispatcher.out(inPointer, browserEvent);\n this.dispatcher.leave(inPointer, browserEvent);\n this.cleanUpPointer_(inPointer);\n };\n\n /**\n * @private\n * @param {TouchEvent} browserEvent The event.\n * @param {PointerEvent} inPointer The in pointer.\n */\n TouchSource.prototype.cancelOut_ = function cancelOut_ (browserEvent, inPointer) {\n this.dispatcher.cancel(inPointer, browserEvent);\n this.dispatcher.out(inPointer, browserEvent);\n this.dispatcher.leave(inPointer, browserEvent);\n this.cleanUpPointer_(inPointer);\n };\n\n /**\n * @private\n * @param {PointerEvent} inPointer The inPointer object.\n */\n TouchSource.prototype.cleanUpPointer_ = function cleanUpPointer_ (inPointer) {\n delete this.pointerMap[inPointer.pointerId];\n this.removePrimaryPointer_(inPointer);\n };\n\n /**\n * Prevent synth mouse events from creating pointer events.\n *\n * @private\n * @param {TouchEvent} inEvent The in event.\n */\n TouchSource.prototype.dedupSynthMouse_ = function dedupSynthMouse_ (inEvent) {\n var lts = this.mouseSource.lastTouches;\n var t = inEvent.changedTouches[0];\n // only the primary finger will synth mouse events\n if (this.isPrimaryTouch_(t)) {\n // remember x/y of last touch\n var lt = [t.clientX, t.clientY];\n lts.push(lt);\n\n setTimeout(function() {\n // remove touch after timeout\n remove(lts, lt);\n }, this.dedupTimeout_);\n }\n };\n\n return TouchSource;\n}(EventSource));\n\nexport default TouchSource;\n\n//# sourceMappingURL=TouchSource.js.map","/**\n * @module ol/pointer/PointerEventHandler\n */\n\n// Based on https://github.com/Polymer/PointerEvents\n\n// Copyright (c) 2013 The Polymer Authors. 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\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY 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\nimport {listen, unlisten} from '../events.js';\nimport EventTarget from '../events/Target.js';\nimport {POINTER, MSPOINTER, TOUCH} from '../has.js';\nimport PointerEventType from './EventType.js';\nimport MouseSource, {prepareEvent as prepareMouseEvent} from './MouseSource.js';\nimport MsSource from './MsSource.js';\nimport NativeSource from './NativeSource.js';\nimport PointerEvent from './PointerEvent.js';\nimport TouchSource from './TouchSource.js';\n\n\n/**\n * Properties to copy when cloning an event, with default values.\n * @type {Array<Array>}\n */\nvar CLONE_PROPS = [\n // MouseEvent\n ['bubbles', false],\n ['cancelable', false],\n ['view', null],\n ['detail', null],\n ['screenX', 0],\n ['screenY', 0],\n ['clientX', 0],\n ['clientY', 0],\n ['ctrlKey', false],\n ['altKey', false],\n ['shiftKey', false],\n ['metaKey', false],\n ['button', 0],\n ['relatedTarget', null],\n // DOM Level 3\n ['buttons', 0],\n // PointerEvent\n ['pointerId', 0],\n ['width', 0],\n ['height', 0],\n ['pressure', 0],\n ['tiltX', 0],\n ['tiltY', 0],\n ['pointerType', ''],\n ['hwTimestamp', 0],\n ['isPrimary', false],\n // event instance\n ['type', ''],\n ['target', null],\n ['currentTarget', null],\n ['which', 0]\n];\n\n\nvar PointerEventHandler = /*@__PURE__*/(function (EventTarget) {\n function PointerEventHandler(element) {\n EventTarget.call(this);\n\n /**\n * @const\n * @private\n * @type {Element|HTMLDocument}\n */\n this.element_ = element;\n\n /**\n * @const\n * @type {!Object<string, Event|Object>}\n */\n this.pointerMap = {};\n\n /**\n * @type {Object<string, function(Event)>}\n * @private\n */\n this.eventMap_ = {};\n\n /**\n * @type {Array<import(\"./EventSource.js\").default>}\n * @private\n */\n this.eventSourceList_ = [];\n\n this.registerSources();\n }\n\n if ( EventTarget ) PointerEventHandler.__proto__ = EventTarget;\n PointerEventHandler.prototype = Object.create( EventTarget && EventTarget.prototype );\n PointerEventHandler.prototype.constructor = PointerEventHandler;\n\n /**\n * Set up the event sources (mouse, touch and native pointers)\n * that generate pointer events.\n */\n PointerEventHandler.prototype.registerSources = function registerSources () {\n if (POINTER) {\n this.registerSource('native', new NativeSource(this));\n } else if (MSPOINTER) {\n this.registerSource('ms', new MsSource(this));\n } else {\n var mouseSource = new MouseSource(this);\n this.registerSource('mouse', mouseSource);\n\n if (TOUCH) {\n this.registerSource('touch', new TouchSource(this, mouseSource));\n }\n }\n\n // register events on the viewport element\n this.register_();\n };\n\n /**\n * Add a new event source that will generate pointer events.\n *\n * @param {string} name A name for the event source\n * @param {import(\"./EventSource.js\").default} source The source event.\n */\n PointerEventHandler.prototype.registerSource = function registerSource (name, source) {\n var s = source;\n var newEvents = s.getEvents();\n\n if (newEvents) {\n newEvents.forEach(function(e) {\n var handler = s.getHandlerForEvent(e);\n\n if (handler) {\n this.eventMap_[e] = handler.bind(s);\n }\n }.bind(this));\n this.eventSourceList_.push(s);\n }\n };\n\n /**\n * Set up the events for all registered event sources.\n * @private\n */\n PointerEventHandler.prototype.register_ = function register_ () {\n var l = this.eventSourceList_.length;\n for (var i = 0; i < l; i++) {\n var eventSource = this.eventSourceList_[i];\n this.addEvents_(eventSource.getEvents());\n }\n };\n\n /**\n * Remove all registered events.\n * @private\n */\n PointerEventHandler.prototype.unregister_ = function unregister_ () {\n var l = this.eventSourceList_.length;\n for (var i = 0; i < l; i++) {\n var eventSource = this.eventSourceList_[i];\n this.removeEvents_(eventSource.getEvents());\n }\n };\n\n /**\n * Calls the right handler for a new event.\n * @private\n * @param {Event} inEvent Browser event.\n */\n PointerEventHandler.prototype.eventHandler_ = function eventHandler_ (inEvent) {\n var type = inEvent.type;\n var handler = this.eventMap_[type];\n if (handler) {\n handler(inEvent);\n }\n };\n\n /**\n * Setup listeners for the given events.\n * @private\n * @param {Array<string>} events List of events.\n */\n PointerEventHandler.prototype.addEvents_ = function addEvents_ (events) {\n events.forEach(function(eventName) {\n listen(this.element_, eventName, this.eventHandler_, this);\n }.bind(this));\n };\n\n /**\n * Unregister listeners for the given events.\n * @private\n * @param {Array<string>} events List of events.\n */\n PointerEventHandler.prototype.removeEvents_ = function removeEvents_ (events) {\n events.forEach(function(e) {\n unlisten(this.element_, e, this.eventHandler_, this);\n }.bind(this));\n };\n\n /**\n * Returns a snapshot of inEvent, with writable properties.\n *\n * @param {Event} event Browser event.\n * @param {Event|Touch} inEvent An event that contains\n * properties to copy.\n * @return {Object} An object containing shallow copies of\n * `inEvent`'s properties.\n */\n PointerEventHandler.prototype.cloneEvent = function cloneEvent (event, inEvent) {\n var eventCopy = {};\n for (var i = 0, ii = CLONE_PROPS.length; i < ii; i++) {\n var p = CLONE_PROPS[i][0];\n eventCopy[p] = event[p] || inEvent[p] || CLONE_PROPS[i][1];\n }\n\n return eventCopy;\n };\n\n // EVENTS\n\n\n /**\n * Triggers a 'pointerdown' event.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.down = function down (data, event) {\n this.fireEvent(PointerEventType.POINTERDOWN, data, event);\n };\n\n /**\n * Triggers a 'pointermove' event.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.move = function move (data, event) {\n this.fireEvent(PointerEventType.POINTERMOVE, data, event);\n };\n\n /**\n * Triggers a 'pointerup' event.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.up = function up (data, event) {\n this.fireEvent(PointerEventType.POINTERUP, data, event);\n };\n\n /**\n * Triggers a 'pointerenter' event.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.enter = function enter (data, event) {\n data.bubbles = false;\n this.fireEvent(PointerEventType.POINTERENTER, data, event);\n };\n\n /**\n * Triggers a 'pointerleave' event.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.leave = function leave (data, event) {\n data.bubbles = false;\n this.fireEvent(PointerEventType.POINTERLEAVE, data, event);\n };\n\n /**\n * Triggers a 'pointerover' event.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.over = function over (data, event) {\n data.bubbles = true;\n this.fireEvent(PointerEventType.POINTEROVER, data, event);\n };\n\n /**\n * Triggers a 'pointerout' event.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.out = function out (data, event) {\n data.bubbles = true;\n this.fireEvent(PointerEventType.POINTEROUT, data, event);\n };\n\n /**\n * Triggers a 'pointercancel' event.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.cancel = function cancel (data, event) {\n this.fireEvent(PointerEventType.POINTERCANCEL, data, event);\n };\n\n /**\n * Triggers a combination of 'pointerout' and 'pointerleave' events.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.leaveOut = function leaveOut (data, event) {\n this.out(data, event);\n if (!this.contains_(data.target, data.relatedTarget)) {\n this.leave(data, event);\n }\n };\n\n /**\n * Triggers a combination of 'pointerover' and 'pointerevents' events.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.enterOver = function enterOver (data, event) {\n this.over(data, event);\n if (!this.contains_(data.target, data.relatedTarget)) {\n this.enter(data, event);\n }\n };\n\n /**\n * @private\n * @param {Element} container The container element.\n * @param {Element} contained The contained element.\n * @return {boolean} Returns true if the container element\n * contains the other element.\n */\n PointerEventHandler.prototype.contains_ = function contains_ (container, contained) {\n if (!container || !contained) {\n return false;\n }\n return container.contains(contained);\n };\n\n // EVENT CREATION AND TRACKING\n /**\n * Creates a new Event of type `inType`, based on the information in\n * `data`.\n *\n * @param {string} inType A string representing the type of event to create.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n * @return {PointerEvent} A PointerEvent of type `inType`.\n */\n PointerEventHandler.prototype.makeEvent = function makeEvent (inType, data, event) {\n return new PointerEvent(inType, event, data);\n };\n\n /**\n * Make and dispatch an event in one call.\n * @param {string} inType A string representing the type of event.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.fireEvent = function fireEvent (inType, data, event) {\n var e = this.makeEvent(inType, data, event);\n this.dispatchEvent(e);\n };\n\n /**\n * Creates a pointer event from a native pointer event\n * and dispatches this event.\n * @param {Event} event A platform event with a target.\n */\n PointerEventHandler.prototype.fireNativeEvent = function fireNativeEvent (event) {\n var e = this.makeEvent(event.type, event, event);\n this.dispatchEvent(e);\n };\n\n /**\n * Wrap a native mouse event into a pointer event.\n * This proxy method is required for the legacy IE support.\n * @param {string} eventType The pointer event type.\n * @param {Event} event The event.\n * @return {PointerEvent} The wrapped event.\n */\n PointerEventHandler.prototype.wrapMouseEvent = function wrapMouseEvent (eventType, event) {\n var pointerEvent = this.makeEvent(\n eventType, prepareMouseEvent(event, this), event);\n return pointerEvent;\n };\n\n /**\n * @inheritDoc\n */\n PointerEventHandler.prototype.disposeInternal = function disposeInternal () {\n this.unregister_();\n EventTarget.prototype.disposeInternal.call(this);\n };\n\n return PointerEventHandler;\n}(EventTarget));\n\nexport default PointerEventHandler;\n\n//# sourceMappingURL=PointerEventHandler.js.map","/**\n * @module ol/MapBrowserEventHandler\n */\nimport {DEVICE_PIXEL_RATIO} from './has.js';\nimport MapBrowserEventType from './MapBrowserEventType.js';\nimport MapBrowserPointerEvent from './MapBrowserPointerEvent.js';\nimport {listen, unlistenByKey} from './events.js';\nimport EventTarget from './events/Target.js';\nimport PointerEventType from './pointer/EventType.js';\nimport PointerEventHandler from './pointer/PointerEventHandler.js';\n\nvar MapBrowserEventHandler = /*@__PURE__*/(function (EventTarget) {\n function MapBrowserEventHandler(map, moveTolerance) {\n\n EventTarget.call(this);\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 * @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 : DEVICE_PIXEL_RATIO;\n\n /**\n * The most recent \"down\" type event (or null if none have occurred).\n * Set on pointerdown.\n * @type {import(\"./pointer/PointerEvent.js\").default}\n * @private\n */\n this.down_ = null;\n\n var 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 /**\n * Event handler which generates pointer events for\n * the viewport element.\n *\n * @type {PointerEventHandler}\n * @private\n */\n this.pointerEventHandler_ = new PointerEventHandler(element);\n\n /**\n * Event handler which generates pointer events for\n * the document (used when dragging).\n *\n * @type {PointerEventHandler}\n * @private\n */\n this.documentPointerEventHandler_ = null;\n\n /**\n * @type {?import(\"./events.js\").EventsKey}\n * @private\n */\n this.pointerdownListenerKey_ = listen(this.pointerEventHandler_,\n PointerEventType.POINTERDOWN,\n this.handlePointerDown_, this);\n\n /**\n * @type {?import(\"./events.js\").EventsKey}\n * @private\n */\n this.relayedListenerKey_ = listen(this.pointerEventHandler_,\n PointerEventType.POINTERMOVE,\n this.relayEvent_, this);\n\n }\n\n if ( EventTarget ) MapBrowserEventHandler.__proto__ = EventTarget;\n MapBrowserEventHandler.prototype = Object.create( EventTarget && EventTarget.prototype );\n MapBrowserEventHandler.prototype.constructor = MapBrowserEventHandler;\n\n /**\n * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n * event.\n * @private\n */\n MapBrowserEventHandler.prototype.emulateClick_ = function emulateClick_ (pointerEvent) {\n var newEvent = new MapBrowserPointerEvent(\n MapBrowserEventType.CLICK, this.map_, pointerEvent);\n this.dispatchEvent(newEvent);\n if (this.clickTimeoutId_ !== undefined) {\n // double-click\n clearTimeout(this.clickTimeoutId_);\n this.clickTimeoutId_ = undefined;\n newEvent = new MapBrowserPointerEvent(\n MapBrowserEventType.DBLCLICK, this.map_, pointerEvent);\n this.dispatchEvent(newEvent);\n } else {\n // click\n this.clickTimeoutId_ = setTimeout(function() {\n this.clickTimeoutId_ = undefined;\n var newEvent = new MapBrowserPointerEvent(\n MapBrowserEventType.SINGLECLICK, this.map_, pointerEvent);\n this.dispatchEvent(newEvent);\n }.bind(this), 250);\n }\n };\n\n /**\n * Keeps track on how many pointers are currently active.\n *\n * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n * event.\n * @private\n */\n MapBrowserEventHandler.prototype.updateActivePointers_ = function updateActivePointers_ (pointerEvent) {\n var event = pointerEvent;\n\n if (event.type == MapBrowserEventType.POINTERUP ||\n event.type == MapBrowserEventType.POINTERCANCEL) {\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 {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n * event.\n * @private\n */\n MapBrowserEventHandler.prototype.handlePointerUp_ = function handlePointerUp_ (pointerEvent) {\n this.updateActivePointers_(pointerEvent);\n var newEvent = new MapBrowserPointerEvent(\n MapBrowserEventType.POINTERUP, this.map_, pointerEvent);\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 (!newEvent.propagationStopped && !this.dragging_ && this.isMouseActionButton_(pointerEvent)) {\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 this.documentPointerEventHandler_.dispose();\n this.documentPointerEventHandler_ = null;\n }\n };\n\n /**\n * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n * event.\n * @return {boolean} If the left mouse button was pressed.\n * @private\n */\n MapBrowserEventHandler.prototype.isMouseActionButton_ = function isMouseActionButton_ (pointerEvent) {\n return pointerEvent.button === 0;\n };\n\n /**\n * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n * event.\n * @private\n */\n MapBrowserEventHandler.prototype.handlePointerDown_ = function handlePointerDown_ (pointerEvent) {\n this.updateActivePointers_(pointerEvent);\n var newEvent = new MapBrowserPointerEvent(\n MapBrowserEventType.POINTERDOWN, this.map_, pointerEvent);\n this.dispatchEvent(newEvent);\n\n this.down_ = pointerEvent;\n\n if (this.dragListenerKeys_.length === 0) {\n /* Set up a pointer event handler on the `document`,\n * which is required when the pointer is moved outside\n * the viewport when dragging.\n */\n this.documentPointerEventHandler_ =\n new PointerEventHandler(document);\n\n this.dragListenerKeys_.push(\n listen(this.documentPointerEventHandler_,\n MapBrowserEventType.POINTERMOVE,\n this.handlePointerMove_, this),\n listen(this.documentPointerEventHandler_,\n MapBrowserEventType.POINTERUP,\n this.handlePointerUp_, this),\n /* Note that the listener for `pointercancel is set up on\n * `pointerEventHandler_` and not `documentPointerEventHandler_` like\n * the `pointerup` and `pointermove` listeners.\n *\n * The reason for this is the following: `TouchSource.vacuumTouches_()`\n * issues `pointercancel` events, when there was no `touchend` for a\n * `touchstart`. Now, let's say a first `touchstart` is registered on\n * `pointerEventHandler_`. The `documentPointerEventHandler_` is set up.\n * But `documentPointerEventHandler_` doesn't know about the first\n * `touchstart`. If there is no `touchend` for the `touchstart`, we can\n * only receive a `touchcancel` from `pointerEventHandler_`, because it is\n * only registered there.\n */\n listen(this.pointerEventHandler_,\n MapBrowserEventType.POINTERCANCEL,\n this.handlePointerUp_, this)\n );\n }\n };\n\n /**\n * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n * event.\n * @private\n */\n MapBrowserEventHandler.prototype.handlePointerMove_ = function 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 var newEvent = new MapBrowserPointerEvent(\n MapBrowserEventType.POINTERDRAG, this.map_, pointerEvent,\n this.dragging_);\n this.dispatchEvent(newEvent);\n }\n\n // Some native android browser triggers mousemove events during small period\n // of time. See: https://code.google.com/p/android/issues/detail?id=5491 or\n // https://code.google.com/p/android/issues/detail?id=19827\n // ex: Galaxy Tab P3110 + Android 4.1.1\n pointerEvent.preventDefault();\n };\n\n /**\n * Wrap and relay a pointer event. Note that this requires that the type\n * string for the MapBrowserPointerEvent matches the PointerEvent type.\n * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n * event.\n * @private\n */\n MapBrowserEventHandler.prototype.relayEvent_ = function relayEvent_ (pointerEvent) {\n var dragging = !!(this.down_ && this.isMoving_(pointerEvent));\n this.dispatchEvent(new MapBrowserPointerEvent(\n pointerEvent.type, this.map_, pointerEvent, dragging));\n };\n\n /**\n * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n * event.\n * @return {boolean} Is moving.\n * @private\n */\n MapBrowserEventHandler.prototype.isMoving_ = function isMoving_ (pointerEvent) {\n return this.dragging_ ||\n Math.abs(pointerEvent.clientX - this.down_.clientX) > this.moveTolerance_ ||\n Math.abs(pointerEvent.clientY - this.down_.clientY) > this.moveTolerance_;\n };\n\n /**\n * @inheritDoc\n */\n MapBrowserEventHandler.prototype.disposeInternal = function disposeInternal () {\n if (this.relayedListenerKey_) {\n unlistenByKey(this.relayedListenerKey_);\n this.relayedListenerKey_ = null;\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 if (this.documentPointerEventHandler_) {\n this.documentPointerEventHandler_.dispose();\n this.documentPointerEventHandler_ = null;\n }\n if (this.pointerEventHandler_) {\n this.pointerEventHandler_.dispose();\n this.pointerEventHandler_ = null;\n }\n EventTarget.prototype.disposeInternal.call(this);\n };\n\n return MapBrowserEventHandler;\n}(EventTarget));\n\n\nexport default MapBrowserEventHandler;\n\n//# sourceMappingURL=MapBrowserEventHandler.js.map","/**\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//# sourceMappingURL=MapProperty.js.map","/**\n * @module ol/render/EventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n /**\n * @event module:ol/render/Event~RenderEvent#postcompose\n * @api\n */\n POSTCOMPOSE: 'postcompose',\n /**\n * @event module:ol/render/Event~RenderEvent#precompose\n * @api\n */\n PRECOMPOSE: 'precompose',\n /**\n * @event module:ol/render/Event~RenderEvent#render\n * @api\n */\n RENDER: 'render',\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 * @event module:ol/render/Event~RenderEvent#rendercomplete\n * @api\n */\n RENDERCOMPLETE: 'rendercomplete'\n};\n\n//# sourceMappingURL=EventType.js.map","/**\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 ABORT: 5\n};\n\n//# sourceMappingURL=TileState.js.map","/**\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//# sourceMappingURL=asserts.js.map","/**\n * @module ol/structs/PriorityQueue\n */\nimport {assert} from '../asserts.js';\nimport {clear} from '../obj.js';\n\n\n/**\n * @type {number}\n */\nexport var DROP = Infinity;\n\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 */\nvar PriorityQueue = function PriorityQueue(priorityFunction, keyFunction) {\n\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/**\n * FIXME empty description for jsdoc\n */\nPriorityQueue.prototype.clear = function clear$1 () {\n this.elements_.length = 0;\n this.priorities_.length = 0;\n clear(this.queuedElements_);\n};\n\n\n/**\n * Remove and return the highest-priority element. O(log N).\n * @return {T} Element.\n */\nPriorityQueue.prototype.dequeue = function dequeue () {\n var elements = this.elements_;\n var priorities = this.priorities_;\n var element = elements[0];\n if (elements.length == 1) {\n elements.length = 0;\n priorities.length = 0;\n } else {\n elements[0] = elements.pop();\n priorities[0] = priorities.pop();\n this.siftUp_(0);\n }\n var elementKey = this.keyFunction_(element);\n delete this.queuedElements_[elementKey];\n return element;\n};\n\n\n/**\n * Enqueue an element. O(log N).\n * @param {T} element Element.\n * @return {boolean} The element was added to the queue.\n */\nPriorityQueue.prototype.enqueue = function enqueue (element) {\n assert(!(this.keyFunction_(element) in this.queuedElements_),\n 31); // Tried to enqueue an `element` that was already added to the queue\n var 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/**\n * @return {number} Count.\n */\nPriorityQueue.prototype.getCount = function getCount () {\n return this.elements_.length;\n};\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 */\nPriorityQueue.prototype.getLeftChildIndex_ = function getLeftChildIndex_ (index) {\n return index * 2 + 1;\n};\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 */\nPriorityQueue.prototype.getRightChildIndex_ = function getRightChildIndex_ (index) {\n return index * 2 + 2;\n};\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 */\nPriorityQueue.prototype.getParentIndex_ = function getParentIndex_ (index) {\n return (index - 1) >> 1;\n};\n\n\n/**\n * Make this a heap. O(N).\n * @private\n */\nPriorityQueue.prototype.heapify_ = function heapify_ () {\n var i;\n for (i = (this.elements_.length >> 1) - 1; i >= 0; i--) {\n this.siftUp_(i);\n }\n};\n\n\n/**\n * @return {boolean} Is empty.\n */\nPriorityQueue.prototype.isEmpty = function isEmpty () {\n return this.elements_.length === 0;\n};\n\n\n/**\n * @param {string} key Key.\n * @return {boolean} Is key queued.\n */\nPriorityQueue.prototype.isKeyQueued = function isKeyQueued (key) {\n return key in this.queuedElements_;\n};\n\n\n/**\n * @param {T} element Element.\n * @return {boolean} Is queued.\n */\nPriorityQueue.prototype.isQueued = function isQueued (element) {\n return this.isKeyQueued(this.keyFunction_(element));\n};\n\n\n/**\n * @param {number} index The index of the node to move down.\n * @private\n */\nPriorityQueue.prototype.siftUp_ = function siftUp_ (index) {\n var elements = this.elements_;\n var priorities = this.priorities_;\n var count = elements.length;\n var element = elements[index];\n var priority = priorities[index];\n var startIndex = index;\n\n while (index < (count >> 1)) {\n var lIndex = this.getLeftChildIndex_(index);\n var rIndex = this.getRightChildIndex_(index);\n\n var smallerChildIndex = rIndex < count &&\n priorities[rIndex] < priorities[lIndex] ?\n rIndex : 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/**\n * @param {number} startIndex The index of the root.\n * @param {number} index The index of the node to move up.\n * @private\n */\nPriorityQueue.prototype.siftDown_ = function siftDown_ (startIndex, index) {\n var elements = this.elements_;\n var priorities = this.priorities_;\n var element = elements[index];\n var priority = priorities[index];\n\n while (index > startIndex) {\n var parentIndex = this.getParentIndex_(index);\n if (priorities[parentIndex] > priority) {\n elements[index] = elements[parentIndex];\n priorities[index] = priorities[parentIndex];\n index = parentIndex;\n } else {\n break;\n }\n }\n elements[index] = element;\n priorities[index] = priority;\n};\n\n\n/**\n * FIXME empty description for jsdoc\n */\nPriorityQueue.prototype.reprioritize = function reprioritize () {\n var priorityFunction = this.priorityFunction_;\n var elements = this.elements_;\n var priorities = this.priorities_;\n var index = 0;\n var n = elements.length;\n var element, i, priority;\n for (i = 0; i < n; ++i) {\n element = elements[i];\n priority = priorityFunction(element);\n if (priority == DROP) {\n delete this.queuedElements_[this.keyFunction_(element)];\n } 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//# sourceMappingURL=PriorityQueue.js.map","/**\n * @module ol/TileQueue\n */\nimport TileState from './TileState.js';\nimport {listen, unlisten} from './events.js';\nimport EventType from './events/EventType.js';\nimport PriorityQueue from './structs/PriorityQueue.js';\n\n\n/**\n * @typedef {function(import(\"./Tile.js\").default, string, import(\"./coordinate.js\").Coordinate, number): number} PriorityFunction\n */\n\n\nvar TileQueue = /*@__PURE__*/(function (PriorityQueue) {\n function TileQueue(tilePriorityFunction, tileChangeCallback) {\n\n PriorityQueue.call(\n /**\n * @param {Array} element Element.\n * @return {number} Priority.\n */\n this, 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 * @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 if ( PriorityQueue ) TileQueue.__proto__ = PriorityQueue;\n TileQueue.prototype = Object.create( PriorityQueue && PriorityQueue.prototype );\n TileQueue.prototype.constructor = TileQueue;\n\n /**\n * @inheritDoc\n */\n TileQueue.prototype.enqueue = function enqueue (element) {\n var added = PriorityQueue.prototype.enqueue.call(this, element);\n if (added) {\n var tile = element[0];\n listen(tile, EventType.CHANGE, this.handleTileChange, this);\n }\n return added;\n };\n\n /**\n * @return {number} Number of tiles loading.\n */\n TileQueue.prototype.getTilesLoading = function getTilesLoading () {\n return this.tilesLoading_;\n };\n\n /**\n * @param {import(\"./events/Event.js\").default} event Event.\n * @protected\n */\n TileQueue.prototype.handleTileChange = function handleTileChange (event) {\n var tile = /** @type {import(\"./Tile.js\").default} */ (event.target);\n var state = tile.getState();\n if (state === TileState.LOADED || state === TileState.ERROR ||\n state === TileState.EMPTY || state === TileState.ABORT) {\n unlisten(tile, EventType.CHANGE, this.handleTileChange, this);\n var tileKey = tile.getKey();\n if (tileKey in this.tilesLoadingKeys_) {\n delete this.tilesLoadingKeys_[tileKey];\n --this.tilesLoading_;\n }\n this.tileChangeCallback_();\n }\n };\n\n /**\n * @param {number} maxTotalLoading Maximum number tiles to load simultaneously.\n * @param {number} maxNewLoads Maximum number of new tiles to load.\n */\n TileQueue.prototype.loadMoreTiles = function loadMoreTiles (maxTotalLoading, maxNewLoads) {\n var newLoads = 0;\n var abortedTiles = false;\n var state, tile, tileKey;\n while (this.tilesLoading_ < maxTotalLoading && newLoads < maxNewLoads &&\n this.getCount() > 0) {\n tile = /** @type {import(\"./Tile.js\").default} */ (this.dequeue()[0]);\n tileKey = tile.getKey();\n state = tile.getState();\n if (state === TileState.ABORT) {\n abortedTiles = true;\n } else if (state === TileState.IDLE && !(tileKey in this.tilesLoadingKeys_)) {\n this.tilesLoadingKeys_[tileKey] = true;\n ++this.tilesLoading_;\n ++newLoads;\n tile.load();\n }\n }\n if (newLoads === 0 && abortedTiles) {\n // Do not stop the render loop when all wanted tiles were aborted due to\n // a small, saturated tile cache.\n this.tileChangeCallback_();\n }\n };\n\n return TileQueue;\n}(PriorityQueue));\n\n\nexport default TileQueue;\n\n//# sourceMappingURL=TileQueue.js.map","/**\n * @module ol/tilegrid/common\n */\n\n/**\n * Default maximum zoom for default tile grids.\n * @type {number}\n */\nexport var DEFAULT_MAX_ZOOM = 42;\n\n/**\n * Default tile size.\n * @type {number}\n */\nexport var DEFAULT_TILE_SIZE = 256;\n\n//# sourceMappingURL=common.js.map","/**\n * @module ol/math\n */\nimport {assert} from './asserts.js';\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/**\n * Return the hyperbolic cosine of a given number. The method will use the\n * native `Math.cosh` function if it is available, otherwise the hyperbolic\n * cosine will be calculated via the reference implementation of the Mozilla\n * developer network.\n *\n * @param {number} x X.\n * @return {number} Hyperbolic cosine of x.\n */\nexport var cosh = (function() {\n // Wrapped in a iife, to save the overhead of checking for the native\n // implementation on every invocation.\n var cosh;\n if ('cosh' in Math) {\n // The environment supports the native Math.cosh function, use it…\n cosh = Math.cosh;\n } else {\n // … else, use the reference implementation of MDN:\n cosh = function(x) {\n var y = /** @type {Math} */ (Math).exp(x);\n return (y + 1 / y) / 2;\n };\n }\n return cosh;\n}());\n\n\n/**\n * @param {number} x X.\n * @return {number} The smallest power of two greater than or equal to x.\n */\nexport function roundUpToPowerOfTwo(x) {\n assert(0 < x, 29); // `x` must be greater than `0`\n return Math.pow(2, Math.ceil(Math.log(x) / Math.LN2));\n}\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 var dx = x2 - x1;\n var dy = y2 - y1;\n if (dx !== 0 || dy !== 0) {\n var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n if (t > 1) {\n x1 = x2;\n y1 = y2;\n } 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/**\n * Returns the square of the distance between the points (x1, y1) and (x2, y2).\n * @param {number} x1 X1.\n * @param {number} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.\n * @return {number} Squared distance.\n */\nexport function squaredDistance(x1, y1, x2, y2) {\n var dx = x2 - x1;\n var dy = y2 - y1;\n return dx * dx + dy * dy;\n}\n\n\n/**\n * Solves system of linear equations using Gaussian elimination method.\n *\n * @param {Array<Array<number>>} mat Augmented matrix (n x n + 1 column)\n * in row-major order.\n * @return {Array<number>} The resulting vector.\n */\nexport function solveLinearSystem(mat) {\n var n = mat.length;\n\n for (var i = 0; i < n; i++) {\n // Find max in the i-th column (ignoring i - 1 first rows)\n var maxRow = i;\n var maxEl = Math.abs(mat[i][i]);\n for (var r = i + 1; r < n; r++) {\n var absValue = Math.abs(mat[r][i]);\n if (absValue > maxEl) {\n maxEl = absValue;\n maxRow = r;\n }\n }\n\n if (maxEl === 0) {\n return null; // matrix is singular\n }\n\n // Swap max row with i-th (current) row\n var tmp = mat[maxRow];\n mat[maxRow] = mat[i];\n mat[i] = tmp;\n\n // Subtract the i-th row to make all the remaining rows 0 in the i-th column\n for (var j = i + 1; j < n; j++) {\n var coef = -mat[j][i] / mat[i][i];\n for (var k = i; k < n + 1; k++) {\n if (i == k) {\n mat[j][k] = 0;\n } 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 var x = new Array(n);\n for (var l = n - 1; l >= 0; l--) {\n x[l] = mat[l][n] / mat[l][l];\n for (var m = l - 1; m >= 0; m--) {\n mat[m][n] -= mat[m][l] * x[l];\n }\n }\n return x;\n}\n\n\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/**\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 var 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//# sourceMappingURL=math.js.map","/**\n * @module ol/centerconstraint\n */\nimport {clamp} from './math.js';\n\n\n/**\n * @typedef {function((import(\"./coordinate.js\").Coordinate|undefined)): (import(\"./coordinate.js\").Coordinate|undefined)} Type\n */\n\n\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @return {Type} The constraint.\n */\nexport function createExtent(extent) {\n return (\n /**\n * @param {import(\"./coordinate.js\").Coordinate=} center Center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n */\n function(center) {\n if (center) {\n return [\n clamp(center[0], extent[0], extent[2]),\n clamp(center[1], extent[1], extent[3])\n ];\n } else {\n return undefined;\n }\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//# sourceMappingURL=centerconstraint.js.map","/**\n * @module ol/resolutionconstraint\n */\nimport {linearFindNearest} from './array.js';\nimport {clamp} from './math.js';\n\n\n/**\n * @typedef {function((number|undefined), number, number): (number|undefined)} Type\n */\n\n\n/**\n * @param {Array<number>} resolutions Resolutions.\n * @return {Type} Zoom function.\n */\nexport function createSnapToResolutions(resolutions) {\n return (\n /**\n * @param {number|undefined} resolution Resolution.\n * @param {number} delta Delta.\n * @param {number} direction Direction.\n * @return {number|undefined} Resolution.\n */\n function(resolution, delta, direction) {\n if (resolution !== undefined) {\n var z = linearFindNearest(resolutions, resolution, direction);\n z = clamp(z + delta, 0, resolutions.length - 1);\n var index = Math.floor(z);\n if (z != index && index < resolutions.length - 1) {\n var power = resolutions[index] / resolutions[index + 1];\n return resolutions[index] / Math.pow(power, z - index);\n } else {\n return resolutions[index];\n }\n } else {\n return undefined;\n }\n }\n );\n}\n\n\n/**\n * @param {number} power Power.\n * @param {number} maxResolution Maximum resolution.\n * @param {number=} opt_maxLevel Maximum level.\n * @return {Type} Zoom function.\n */\nexport function createSnapToPower(power, maxResolution, opt_maxLevel) {\n return (\n /**\n * @param {number|undefined} resolution Resolution.\n * @param {number} delta Delta.\n * @param {number} direction Direction.\n * @return {number|undefined} Resolution.\n */\n function(resolution, delta, direction) {\n if (resolution !== undefined) {\n var offset = -direction / 2 + 0.5;\n var oldLevel = Math.floor(\n Math.log(maxResolution / resolution) / Math.log(power) + offset);\n var newLevel = Math.max(oldLevel + delta, 0);\n if (opt_maxLevel !== undefined) {\n newLevel = Math.min(newLevel, opt_maxLevel);\n }\n return maxResolution / Math.pow(power, newLevel);\n } else {\n return undefined;\n }\n });\n}\n\n//# sourceMappingURL=resolutionconstraint.js.map","/**\n * @module ol/rotationconstraint\n */\nimport {toRadians} from './math.js';\n\n\n/**\n * @typedef {function((number|undefined), number): (number|undefined)} Type\n */\n\n\n/**\n * @param {number|undefined} rotation Rotation.\n * @param {number} delta Delta.\n * @return {number|undefined} Rotation.\n */\nexport function disable(rotation, delta) {\n if (rotation !== undefined) {\n return 0;\n } else {\n return undefined;\n }\n}\n\n\n/**\n * @param {number|undefined} rotation Rotation.\n * @param {number} delta Delta.\n * @return {number|undefined} Rotation.\n */\nexport function none(rotation, delta) {\n if (rotation !== undefined) {\n return rotation + delta;\n } else {\n return undefined;\n }\n}\n\n\n/**\n * @param {number} n N.\n * @return {Type} Rotation constraint.\n */\nexport function createSnapToN(n) {\n var theta = 2 * Math.PI / n;\n return (\n /**\n * @param {number|undefined} rotation Rotation.\n * @param {number} delta Delta.\n * @return {number|undefined} Rotation.\n */\n function(rotation, delta) {\n if (rotation !== undefined) {\n rotation = Math.floor((rotation + delta) / 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 var tolerance = opt_tolerance || toRadians(5);\n return (\n /**\n * @param {number|undefined} rotation Rotation.\n * @param {number} delta Delta.\n * @return {number|undefined} Rotation.\n */\n function(rotation, delta) {\n if (rotation !== undefined) {\n if (Math.abs(rotation + delta) <= tolerance) {\n return 0;\n } else {\n return rotation + delta;\n }\n } else {\n return undefined;\n }\n });\n}\n\n//# sourceMappingURL=rotationconstraint.js.map","/**\n * @module ol/ViewHint\n */\n\n/**\n * @enum {number}\n */\nexport default {\n ANIMATING: 0,\n INTERACTING: 1\n};\n\n//# sourceMappingURL=ViewHint.js.map","/**\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//# sourceMappingURL=ViewProperty.js.map","/**\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 var numberString = opt_precision !== undefined ? number.toFixed(opt_precision) : '' + number;\n var decimal = numberString.indexOf('.');\n decimal = decimal === -1 ? numberString.length : decimal;\n return decimal > width ? numberString : new Array(1 + width - decimal).join('0') + numberString;\n}\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 var s1 = ('' + v1).split('.');\n var s2 = ('' + v2).split('.');\n\n for (var i = 0; i < Math.max(s1.length, s2.length); i++) {\n var n1 = parseInt(s1[i] || '0', 10);\n var n2 = parseInt(s2[i] || '0', 10);\n\n if (n1 > n2) {\n return 1;\n }\n if (n2 > n1) {\n return -1;\n }\n }\n\n return 0;\n}\n\n//# sourceMappingURL=string.js.map","/**\n * @module ol/coordinate\n */\nimport {modulo} from './math.js';\nimport {padNumber} from './string.js';\n\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/**\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/**\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/**\n * Calculates the point closest to the passed coordinate on the passed circle.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {import(\"./geom/Circle.js\").default} circle The circle.\n * @return {Coordinate} Closest point on the circumference.\n */\nexport function closestOnCircle(coordinate, circle) {\n var r = circle.getRadius();\n var center = circle.getCenter();\n var x0 = center[0];\n var y0 = center[1];\n var x1 = coordinate[0];\n var y1 = coordinate[1];\n\n var dx = x1 - x0;\n var dy = y1 - y0;\n if (dx === 0 && dy === 0) {\n dx = 1;\n }\n var d = Math.sqrt(dx * dx + dy * dy);\n\n var x = x0 + r * dx / d;\n var y = y0 + r * dy / d;\n\n return [x, y];\n}\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 var x0 = coordinate[0];\n var y0 = coordinate[1];\n var start = segment[0];\n var end = segment[1];\n var x1 = start[0];\n var y1 = start[1];\n var x2 = end[0];\n var y2 = end[1];\n var dx = x2 - x1;\n var dy = y2 - y1;\n var along = (dx === 0 && dy === 0) ? 0 :\n ((dx * (x0 - x1)) + (dy * (y0 - y1))) / ((dx * dx + dy * dy) || 0);\n var x, y;\n if (along <= 0) {\n x = x1;\n y = y1;\n } 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/**\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/**\n * @param {string} hemispheres Hemispheres.\n * @param {number} degrees Degrees.\n * @param {number=} opt_fractionDigits The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {string} String.\n */\nexport function degreesToStringHDMS(hemispheres, degrees, opt_fractionDigits) {\n var normalizedDegrees = modulo(degrees + 180, 360) - 180;\n var x = Math.abs(3600 * normalizedDegrees);\n var dflPrecision = opt_fractionDigits || 0;\n var precision = Math.pow(10, dflPrecision);\n\n var deg = Math.floor(x / 3600);\n var min = Math.floor((x - deg * 3600) / 60);\n var sec = x - (deg * 3600) - (min * 60);\n sec = Math.ceil(sec * precision) / precision;\n\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 deg + '\\u00b0 ' + padNumber(min, 2) + '\\u2032 ' +\n padNumber(sec, 2, dflPrecision) + '\\u2033' +\n (normalizedDegrees == 0 ? '' : ' ' + 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/**\n * @param {Coordinate} coordinate1 First coordinate.\n * @param {Coordinate} coordinate2 Second coordinate.\n * @return {boolean} The two coordinates are equal.\n */\nexport function equals(coordinate1, coordinate2) {\n var equals = true;\n for (var i = coordinate1.length - 1; i >= 0; --i) {\n if (coordinate1[i] != coordinate2[i]) {\n equals = false;\n break;\n }\n }\n return equals;\n}\n\n\n/**\n * Rotate `coordinate` by `angle`. `coordinate` is modified in place and\n * returned by the function.\n *\n * Example:\n *\n * import {rotate} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var rotateRadians = Math.PI / 2; // 90 degrees\n * rotate(coord, rotateRadians);\n * // coord is now [-47.983333, 7.85]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} angle Angle in radian.\n * @return {Coordinate} Coordinate.\n * @api\n */\nexport function rotate(coordinate, angle) {\n var cosAngle = Math.cos(angle);\n var sinAngle = Math.sin(angle);\n var x = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n var y = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n coordinate[0] = x;\n coordinate[1] = y;\n return coordinate;\n}\n\n\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/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Squared distance between coord1 and coord2.\n */\nexport function squaredDistance(coord1, coord2) {\n var dx = coord1[0] - coord2[0];\n var dy = coord1[1] - coord2[1];\n return dx * dx + dy * dy;\n}\n\n\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/**\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,\n closestOnSegment(coordinate, segment));\n}\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 degreesToStringHDMS('NS', coordinate[1], opt_fractionDigits) + ' ' +\n degreesToStringHDMS('EW', coordinate[0], opt_fractionDigits);\n } else {\n return '';\n }\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//# sourceMappingURL=coordinate.js.map","/**\n * @module ol/easing\n */\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/**\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/**\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/**\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/**\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//# sourceMappingURL=easing.js.map","/**\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//# sourceMappingURL=Corner.js.map","/**\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//# sourceMappingURL=Relationship.js.map","/**\n * @module ol/extent\n */\nimport {assert} from './asserts.js';\nimport Corner from './extent/Corner.js';\nimport Relationship from './extent/Relationship.js';\n\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 var extent = createEmpty();\n for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n extendCoordinate(extent, coordinates[i]);\n }\n return extent;\n}\n\n\n/**\n * @param {Array<number>} xs Xs.\n * @param {Array<number>} ys Ys.\n * @param {Extent=} opt_extent Destination extent.\n * @private\n * @return {Extent} Extent.\n */\nfunction _boundingExtentXYs(xs, ys, opt_extent) {\n var minX = Math.min.apply(null, xs);\n var minY = Math.min.apply(null, ys);\n var maxX = Math.max.apply(null, xs);\n var maxY = Math.max.apply(null, ys);\n return createOrUpdate(minX, minY, maxX, maxY, opt_extent);\n}\n\n\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/**\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/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {number} Closest squared distance.\n */\nexport function closestSquaredDistanceXY(extent, x, y) {\n var dx, dy;\n if (x < extent[0]) {\n dx = extent[0] - x;\n } 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/**\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/**\n * Check if one extent contains another.\n *\n * An extent is deemed contained if it lies completely within the other extent,\n * including if they share one or more edges.\n *\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {boolean} The second extent is contained by or on the edge of the\n * first.\n * @api\n */\nexport function containsExtent(extent1, extent2) {\n return extent1[0] <= extent2[0] && extent2[2] <= extent1[2] &&\n extent1[1] <= extent2[1] && 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/**\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 {Relationship} The relationship (bitwise compare with\n * import(\"./extent/Relationship.js\").Relationship).\n */\nexport function coordinateRelationship(extent, coordinate) {\n var minX = extent[0];\n var minY = extent[1];\n var maxX = extent[2];\n var maxY = extent[3];\n var x = coordinate[0];\n var y = coordinate[1];\n var relationship = Relationship.UNKNOWN;\n if (x < minX) {\n relationship = relationship | Relationship.LEFT;\n } 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/**\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/**\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/**\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(\n Infinity, Infinity, -Infinity, -Infinity, opt_extent);\n}\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 var x = coordinate[0];\n var y = coordinate[1];\n return createOrUpdate(x, y, x, y, opt_extent);\n}\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 var extent = createOrUpdateEmpty(opt_extent);\n return extendCoordinates(extent, coordinates);\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 {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromFlatCoordinates(flatCoordinates, offset, end, stride, opt_extent) {\n var extent = createOrUpdateEmpty(opt_extent);\n return extendFlatCoordinates(extent, flatCoordinates, offset, end, stride);\n}\n\n/**\n * @param {Array<Array<import(\"./coordinate.js\").Coordinate>>} rings Rings.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromRings(rings, opt_extent) {\n var extent = createOrUpdateEmpty(opt_extent);\n return extendRings(extent, rings);\n}\n\n\n/**\n * Determine if two extents are equivalent.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {boolean} The two extents are equivalent.\n * @api\n */\nexport function equals(extent1, extent2) {\n return extent1[0] == extent2[0] && extent1[2] == extent2[2] &&\n extent1[1] == extent2[1] && extent1[3] == extent2[3];\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/**\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/**\n * @param {Extent} extent Extent.\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @return {Extent} Extent.\n */\nexport function extendCoordinates(extent, coordinates) {\n for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n extendCoordinate(extent, coordinates[i]);\n }\n return extent;\n}\n\n\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(extent, flatCoordinates, offset, end, stride) {\n for (; offset < end; offset += stride) {\n extendXY(extent, flatCoordinates[offset], flatCoordinates[offset + 1]);\n }\n return extent;\n}\n\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array<Array<import(\"./coordinate.js\").Coordinate>>} rings Rings.\n * @return {Extent} Extent.\n */\nexport function extendRings(extent, rings) {\n for (var i = 0, ii = rings.length; i < ii; ++i) {\n extendCoordinates(extent, rings[i]);\n }\n return extent;\n}\n\n\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/**\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(this:T, import(\"./coordinate.js\").Coordinate): S} callback Callback.\n * @param {T=} opt_this Value to use as `this` when executing `callback`.\n * @return {S|boolean} Value.\n * @template S, T\n */\nexport function forEachCorner(extent, callback, opt_this) {\n var val;\n val = callback.call(opt_this, getBottomLeft(extent));\n if (val) {\n return val;\n }\n val = callback.call(opt_this, getBottomRight(extent));\n if (val) {\n return val;\n }\n val = callback.call(opt_this, getTopRight(extent));\n if (val) {\n return val;\n }\n val = callback.call(opt_this, getTopLeft(extent));\n if (val) {\n return val;\n }\n return false;\n}\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 var area = 0;\n if (!isEmpty(extent)) {\n area = getWidth(extent) * getHeight(extent);\n }\n return area;\n}\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/**\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/**\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/**\n * Get a corner coordinate of an extent.\n * @param {Extent} extent Extent.\n * @param {Corner} corner Corner.\n * @return {import(\"./coordinate.js\").Coordinate} Corner coordinate.\n */\nexport function getCorner(extent, corner) {\n var coordinate;\n if (corner === 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/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Enlarged area.\n */\nexport function getEnlargedArea(extent1, extent2) {\n var minX = Math.min(extent1[0], extent2[0]);\n var minY = Math.min(extent1[1], extent2[1]);\n var maxX = Math.max(extent1[2], extent2[2]);\n var maxY = Math.max(extent1[3], extent2[3]);\n return (maxX - minX) * (maxY - minY);\n}\n\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {import(\"./size.js\").Size} size Size.\n * @param {Extent=} opt_extent Destination extent.\n * @return {Extent} Extent.\n */\nexport function getForViewAndSize(center, resolution, rotation, size, opt_extent) {\n var dx = resolution * size[0] / 2;\n var dy = resolution * size[1] / 2;\n var cosRotation = Math.cos(rotation);\n var sinRotation = Math.sin(rotation);\n var xCos = dx * cosRotation;\n var xSin = dx * sinRotation;\n var yCos = dy * cosRotation;\n var ySin = dy * sinRotation;\n var x = center[0];\n var y = center[1];\n var x0 = x - xCos + ySin;\n var x1 = x - xCos - ySin;\n var x2 = x + xCos - ySin;\n var x3 = x + xCos + ySin;\n var y0 = y - xSin - yCos;\n var y1 = y - xSin + yCos;\n var y2 = y + xSin + yCos;\n var y3 = y + xSin - yCos;\n return createOrUpdate(\n Math.min(x0, x1, x2, x3), Math.min(y0, y1, y2, y3),\n Math.max(x0, x1, x2, x3), 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/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Intersection area.\n */\nexport function getIntersectionArea(extent1, extent2) {\n var intersection = getIntersection(extent1, extent2);\n return getArea(intersection);\n}\n\n\n/**\n * Get the intersection of two extents.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @param {Extent=} opt_extent Optional extent to populate with intersection.\n * @return {Extent} Intersecting extent.\n * @api\n */\nexport function getIntersection(extent1, extent2, opt_extent) {\n var intersection = opt_extent ? opt_extent : createEmpty();\n if (intersects(extent1, extent2)) {\n if (extent1[0] > extent2[0]) {\n intersection[0] = extent1[0];\n } 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/**\n * @param {Extent} extent Extent.\n * @return {number} Margin.\n */\nexport function getMargin(extent) {\n return getWidth(extent) + getHeight(extent);\n}\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/**\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/**\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/**\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/**\n * Determine if one extent intersects another.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent.\n * @return {boolean} The two extents intersect.\n * @api\n */\nexport function intersects(extent1, extent2) {\n return extent1[0] <= extent2[2] &&\n extent1[2] >= extent2[0] &&\n extent1[1] <= extent2[3] &&\n extent1[3] >= extent2[1];\n}\n\n\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/**\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/**\n * @param {Extent} extent Extent.\n * @param {number} value Value.\n */\nexport function scaleFromCenter(extent, value) {\n var deltaX = ((extent[2] - extent[0]) / 2) * (value - 1);\n var deltaY = ((extent[3] - extent[1]) / 2) * (value - 1);\n extent[0] -= deltaX;\n extent[2] += deltaX;\n extent[1] -= deltaY;\n extent[3] += deltaY;\n}\n\n\n/**\n * Determine if the segment between two coordinates intersects (crosses,\n * touches, or is contained by) the provided extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} start Segment start coordinate.\n * @param {import(\"./coordinate.js\").Coordinate} end Segment end coordinate.\n * @return {boolean} The segment intersects the extent.\n */\nexport function intersectsSegment(extent, start, end) {\n var intersects = false;\n var startRel = coordinateRelationship(extent, start);\n var endRel = coordinateRelationship(extent, end);\n if (startRel === Relationship.INTERSECTING ||\n endRel === Relationship.INTERSECTING) {\n intersects = true;\n } else {\n var minX = extent[0];\n var minY = extent[1];\n var maxX = extent[2];\n var maxY = extent[3];\n var startX = start[0];\n var startY = start[1];\n var endX = end[0];\n var endY = end[1];\n var slope = (endY - startY) / (endX - startX);\n var x, y;\n if (!!(endRel & Relationship.ABOVE) &&\n !(startRel & Relationship.ABOVE)) {\n // potentially intersects top\n x = endX - ((endY - maxY) / slope);\n intersects = x >= minX && x <= maxX;\n }\n if (!intersects && !!(endRel & Relationship.RIGHT) &&\n !(startRel & Relationship.RIGHT)) {\n // potentially intersects right\n y = endY - ((endX - maxX) * slope);\n intersects = y >= minY && y <= maxY;\n }\n if (!intersects && !!(endRel & Relationship.BELOW) &&\n !(startRel & Relationship.BELOW)) {\n // potentially intersects bottom\n x = endX - ((endY - minY) / slope);\n intersects = x >= minX && x <= maxX;\n }\n if (!intersects && !!(endRel & Relationship.LEFT) &&\n !(startRel & Relationship.LEFT)) {\n // potentially intersects left\n y = endY - ((endX - minX) * slope);\n intersects = y >= minY && y <= maxY;\n }\n\n }\n return intersects;\n}\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 * @return {Extent} Extent.\n * @api\n */\nexport function applyTransform(extent, transformFn, opt_extent) {\n var coordinates = [\n extent[0], extent[1],\n extent[0], extent[3],\n extent[2], extent[1],\n extent[2], extent[3]\n ];\n transformFn(coordinates, coordinates, 2);\n var xs = [coordinates[0], coordinates[2], coordinates[4], coordinates[6]];\n var ys = [coordinates[1], coordinates[3], coordinates[5], coordinates[7]];\n return _boundingExtentXYs(xs, ys, opt_extent);\n}\n\n//# sourceMappingURL=extent.js.map","/**\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//# sourceMappingURL=GeometryType.js.map","/**\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//# sourceMappingURL=GeometryLayout.js.map","/**\n * @module ol/geom/flat/transform\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 {import(\"../../transform.js\").Transform} transform Transform.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function transform2D(flatCoordinates, offset, end, stride, transform, opt_dest) {\n var dest = opt_dest ? opt_dest : [];\n var i = 0;\n for (var j = offset; j < end; j += stride) {\n var x = flatCoordinates[j];\n var y = flatCoordinates[j + 1];\n dest[i++] = transform[0] * x + transform[2] * y + transform[4];\n dest[i++] = transform[1] * x + transform[3] * y + transform[5];\n }\n if (opt_dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n\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(flatCoordinates, offset, end, stride, angle, anchor, opt_dest) {\n var dest = opt_dest ? opt_dest : [];\n var cos = Math.cos(angle);\n var sin = Math.sin(angle);\n var anchorX = anchor[0];\n var anchorY = anchor[1];\n var i = 0;\n for (var j = offset; j < end; j += stride) {\n var deltaX = flatCoordinates[j] - anchorX;\n var deltaY = flatCoordinates[j + 1] - anchorY;\n dest[i++] = anchorX + deltaX * cos - deltaY * sin;\n dest[i++] = anchorY + deltaX * sin + deltaY * cos;\n for (var k = j + 2; k < j + stride; ++k) {\n dest[i++] = flatCoordinates[k];\n }\n }\n if (opt_dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n\n/**\n * Scale the coordinates.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} sx Scale factor in the x-direction.\n * @param {number} sy Scale factor in the y-direction.\n * @param {Array<number>} anchor Scale anchor point.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function scale(flatCoordinates, offset, end, stride, sx, sy, anchor, opt_dest) {\n var dest = opt_dest ? opt_dest : [];\n var anchorX = anchor[0];\n var anchorY = anchor[1];\n var i = 0;\n for (var j = offset; j < end; j += stride) {\n var deltaX = flatCoordinates[j] - anchorX;\n var deltaY = flatCoordinates[j + 1] - anchorY;\n dest[i++] = anchorX + sx * deltaX;\n dest[i++] = anchorY + sy * deltaY;\n for (var k = j + 2; k < j + stride; ++k) {\n dest[i++] = flatCoordinates[k];\n }\n }\n if (opt_dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function translate(flatCoordinates, offset, end, stride, deltaX, deltaY, opt_dest) {\n var dest = opt_dest ? opt_dest : [];\n var i = 0;\n for (var j = offset; j < end; j += stride) {\n dest[i++] = flatCoordinates[j] + deltaX;\n dest[i++] = flatCoordinates[j + 1] + deltaY;\n for (var k = j + 2; k < j + stride; ++k) {\n dest[i++] = flatCoordinates[k];\n }\n }\n if (opt_dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n//# sourceMappingURL=transform.js.map","/**\n * @license\n * Latitude/longitude spherical geodesy formulae taken from\n * http://www.movable-type.co.uk/scripts/latlong.html\n * Licensed under CC-BY-3.0.\n */\n\n/**\n * @module ol/sphere\n */\nimport {toRadians, toDegrees} from './math.js';\nimport GeometryType from './geom/GeometryType.js';\n\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 radius of the\n * earth is used (Clarke 1866 Authalic Sphere).\n */\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 var DEFAULT_RADIUS = 6371008.8;\n\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 var radius = opt_radius || DEFAULT_RADIUS;\n var lat1 = toRadians(c1[1]);\n var lat2 = toRadians(c2[1]);\n var deltaLatBy2 = (lat2 - lat1) / 2;\n var deltaLonBy2 = toRadians(c2[0] - c1[0]) / 2;\n var a = Math.sin(deltaLatBy2) * Math.sin(deltaLatBy2) +\n Math.sin(deltaLonBy2) * Math.sin(deltaLonBy2) *\n Math.cos(lat1) * Math.cos(lat2);\n return 2 * radius * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n}\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 var length = 0;\n for (var i = 0, ii = coordinates.length; i < ii - 1; ++i) {\n length += getDistance(coordinates[i], coordinates[i + 1], radius);\n }\n return length;\n}\n\n\n/**\n * Get the spherical length of a geometry. This length is the sum of the\n * great circle distances between coordinates. For polygons, the length is\n * the sum of all rings. For points, the length is zero. For multi-part\n * geometries, the length is the sum of the length of each part.\n * @param {import(\"./geom/Geometry.js\").default} geometry A geometry.\n * @param {SphereMetricOptions=} opt_options Options for the\n * length calculation. By default, geometries are assumed to be in 'EPSG:3857'.\n * You can change this by providing a `projection` option.\n * @return {number} The spherical length (in meters).\n * @api\n */\nexport function getLength(geometry, opt_options) {\n var options = opt_options || {};\n var radius = options.radius || DEFAULT_RADIUS;\n var projection = options.projection || 'EPSG:3857';\n var type = geometry.getType();\n if (type !== GeometryType.GEOMETRY_COLLECTION) {\n geometry = geometry.clone().transform(projection, 'EPSG:4326');\n }\n var length = 0;\n var coordinates, coords, i, ii, j, jj;\n switch (type) {\n case GeometryType.POINT:\n case GeometryType.MULTI_POINT: {\n break;\n }\n case GeometryType.LINE_STRING:\n case GeometryType.LINEAR_RING: {\n coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n length = getLengthInternal(coordinates, radius);\n break;\n }\n case GeometryType.MULTI_LINE_STRING:\n case GeometryType.POLYGON: {\n coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n for (i = 0, ii = coordinates.length; i < ii; ++i) {\n length += getLengthInternal(coordinates[i], radius);\n }\n break;\n }\n case GeometryType.MULTI_POLYGON: {\n coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n for (i = 0, ii = coordinates.length; i < ii; ++i) {\n coords = coordinates[i];\n for (j = 0, jj = coords.length; j < jj; ++j) {\n length += getLengthInternal(coords[j], radius);\n }\n }\n break;\n }\n case GeometryType.GEOMETRY_COLLECTION: {\n var geometries = /** @type {import(\"./geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n for (i = 0, ii = geometries.length; i < ii; ++i) {\n length += getLength(geometries[i], opt_options);\n }\n break;\n }\n default: {\n throw new Error('Unsupported geometry type: ' + type);\n }\n }\n return length;\n}\n\n\n/**\n * Returns the spherical area for a list of coordinates.\n *\n * [Reference](https://trs-new.jpl.nasa.gov/handle/2014/40409)\n * Robert. G. Chamberlain and William H. Duquette, \"Some Algorithms for\n * Polygons on a Sphere\", JPL Publication 07-03, Jet Propulsion\n * Laboratory, Pasadena, CA, June 2007\n *\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates List of coordinates of a linear\n * ring. If the ring is oriented clockwise, the area will be positive,\n * otherwise it will be negative.\n * @param {number} radius The sphere radius.\n * @return {number} Area (in square meters).\n */\nfunction getAreaInternal(coordinates, radius) {\n var area = 0;\n var len = coordinates.length;\n var x1 = coordinates[len - 1][0];\n var y1 = coordinates[len - 1][1];\n for (var i = 0; i < len; i++) {\n var x2 = coordinates[i][0];\n var y2 = coordinates[i][1];\n area += toRadians(x2 - x1) *\n (2 + Math.sin(toRadians(y1)) +\n Math.sin(toRadians(y2)));\n x1 = x2;\n y1 = y2;\n }\n return area * radius * radius / 2.0;\n}\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 var options = opt_options || {};\n var radius = options.radius || DEFAULT_RADIUS;\n var projection = options.projection || 'EPSG:3857';\n var type = geometry.getType();\n if (type !== GeometryType.GEOMETRY_COLLECTION) {\n geometry = geometry.clone().transform(projection, 'EPSG:4326');\n }\n var area = 0;\n var coordinates, coords, i, ii, j, jj;\n switch (type) {\n case GeometryType.POINT:\n case GeometryType.MULTI_POINT:\n case GeometryType.LINE_STRING:\n case GeometryType.MULTI_LINE_STRING:\n case GeometryType.LINEAR_RING: {\n break;\n }\n case GeometryType.POLYGON: {\n coordinates = /** @type {import(\"./geom/Polygon.js\").default} */ (geometry).getCoordinates();\n area = Math.abs(getAreaInternal(coordinates[0], radius));\n for (i = 1, ii = coordinates.length; i < ii; ++i) {\n area -= Math.abs(getAreaInternal(coordinates[i], radius));\n }\n break;\n }\n case GeometryType.MULTI_POLYGON: {\n coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n for (i = 0, ii = coordinates.length; i < ii; ++i) {\n coords = coordinates[i];\n area += Math.abs(getAreaInternal(coords[0], radius));\n for (j = 1, jj = coords.length; j < jj; ++j) {\n area -= Math.abs(getAreaInternal(coords[j], radius));\n }\n }\n break;\n }\n case GeometryType.GEOMETRY_COLLECTION: {\n var geometries = /** @type {import(\"./geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n for (i = 0, ii = geometries.length; i < ii; ++i) {\n area += getArea(geometries[i], opt_options);\n }\n break;\n }\n default: {\n throw new Error('Unsupported geometry type: ' + type);\n }\n }\n return area;\n}\n\n\n/**\n * Returns the coordinate at the given distance and bearing from `c1`.\n *\n * @param {import(\"./coordinate.js\").Coordinate} c1 The origin point (`[lon, lat]` in degrees).\n * @param {number} distance The great-circle distance between the origin\n * point and the target point.\n * @param {number} bearing The bearing (in radians).\n * @param {number=} opt_radius The sphere radius to use. Defaults to the Earth's\n * mean radius using the WGS84 ellipsoid.\n * @return {import(\"./coordinate.js\").Coordinate} The target point.\n */\nexport function offset(c1, distance, bearing, opt_radius) {\n var radius = opt_radius || DEFAULT_RADIUS;\n var lat1 = toRadians(c1[1]);\n var lon1 = toRadians(c1[0]);\n var dByR = distance / radius;\n var lat = Math.asin(\n Math.sin(lat1) * Math.cos(dByR) +\n Math.cos(lat1) * Math.sin(dByR) * Math.cos(bearing));\n var lon = lon1 + Math.atan2(\n Math.sin(bearing) * Math.sin(dByR) * Math.cos(lat1),\n Math.cos(dByR) - Math.sin(lat1) * Math.sin(lat));\n return [toDegrees(lon), toDegrees(lat)];\n}\n\n//# sourceMappingURL=sphere.js.map","/**\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 */\nvar Units = {\n DEGREES: 'degrees',\n FEET: 'ft',\n METERS: 'm',\n PIXELS: 'pixels',\n TILE_PIXELS: 'tile-pixels',\n USFEET: 'us-ft'\n};\n\n\n/**\n * Meters per unit lookup table.\n * @const\n * @type {Object<Units, number>}\n * @api\n */\nexport var METERS_PER_UNIT = {};\n// use the radius of the Normal sphere\nMETERS_PER_UNIT[Units.DEGREES] = 2 * Math.PI * 6370997 / 360;\nMETERS_PER_UNIT[Units.FEET] = 0.3048;\nMETERS_PER_UNIT[Units.METERS] = 1;\nMETERS_PER_UNIT[Units.USFEET] = 1200 / 3937;\n\nexport default Units;\n\n//# sourceMappingURL=Units.js.map","/**\n * @module ol/proj/Projection\n */\nimport {METERS_PER_UNIT} from './Units.js';\n\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 at the passed coordinate. If this is `undefined`,\n * the default {@link module:ol/proj#getPointResolution} function will be used.\n */\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 */\nvar Projection = function Projection(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_ = options.worldExtent !== undefined ?\n options.worldExtent : null;\n\n /**\n * @private\n * @type {string}\n */\n this.axisOrientation_ = options.axisOrientation !== undefined ?\n 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 */\nProjection.prototype.canWrapX = function 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 */\nProjection.prototype.getCode = function 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 */\nProjection.prototype.getExtent = function 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 */\nProjection.prototype.getUnits = function 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 */\nProjection.prototype.getMetersPerUnit = function 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 */\nProjection.prototype.getWorldExtent = function 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 */\nProjection.prototype.getAxisOrientation = function 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 */\nProjection.prototype.isGlobal = function 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 */\nProjection.prototype.setGlobal = function 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 */\nProjection.prototype.getDefaultTileGrid = function getDefaultTileGrid () {\n return this.defaultTileGrid_;\n};\n\n/**\n * @param {import(\"../tilegrid/TileGrid.js\").default} tileGrid The default tile grid.\n */\nProjection.prototype.setDefaultTileGrid = function 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 */\nProjection.prototype.setExtent = function 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 */\nProjection.prototype.setWorldExtent = function 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 */\nProjection.prototype.setGetPointResolution = function 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 */\nProjection.prototype.getPointResolutionFunc = function getPointResolutionFunc () {\n return this.getPointResolutionFunc_;\n};\n\nexport default Projection;\n\n//# sourceMappingURL=Projection.js.map","/**\n * @module ol/proj/epsg3857\n */\nimport {cosh} from '../math.js';\nimport Projection from './Projection.js';\nimport Units from './Units.js';\n\n\n/**\n * Radius of WGS84 sphere\n *\n * @const\n * @type {number}\n */\nexport var RADIUS = 6378137;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var HALF_SIZE = Math.PI * RADIUS;\n\n\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport var EXTENT = [\n -HALF_SIZE, -HALF_SIZE,\n HALF_SIZE, HALF_SIZE\n];\n\n\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport var WORLD_EXTENT = [-180, -85, 180, 85];\n\n\n/**\n * @classdesc\n * Projection object for web/spherical Mercator (EPSG:3857).\n */\nvar EPSG3857Projection = /*@__PURE__*/(function (Projection) {\n function EPSG3857Projection(code) {\n Projection.call(this, {\n code: code,\n units: Units.METERS,\n extent: EXTENT,\n global: true,\n worldExtent: WORLD_EXTENT,\n getPointResolution: function(resolution, point) {\n return resolution / cosh(point[1] / RADIUS);\n }\n });\n\n }\n\n if ( Projection ) EPSG3857Projection.__proto__ = Projection;\n EPSG3857Projection.prototype = Object.create( Projection && Projection.prototype );\n EPSG3857Projection.prototype.constructor = EPSG3857Projection;\n\n return EPSG3857Projection;\n}(Projection));\n\n\n/**\n * Projections equal to EPSG:3857.\n *\n * @const\n * @type {Array<import(\"./Projection.js\").default>}\n */\nexport var PROJECTIONS = [\n new EPSG3857Projection('EPSG:3857'),\n new EPSG3857Projection('EPSG:102100'),\n new EPSG3857Projection('EPSG:102113'),\n new EPSG3857Projection('EPSG:900913'),\n new EPSG3857Projection('urn:ogc:def:crs:EPSG:6.18:3:3857'),\n new EPSG3857Projection('urn:ogc:def:crs:EPSG::3857'),\n new EPSG3857Projection('http://www.opengis.net/gml/srs/epsg.xml#3857')\n];\n\n\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 var length = input.length;\n var dimension = opt_dimension > 1 ? opt_dimension : 2;\n var output = opt_output;\n if (output === undefined) {\n if (dimension > 2) {\n // preserve values beyond second dimension\n output = input.slice();\n } else {\n output = new Array(length);\n }\n }\n var halfSize = HALF_SIZE;\n for (var i = 0; i < length; i += dimension) {\n output[i] = halfSize * input[i] / 180;\n var y = RADIUS *\n Math.log(Math.tan(Math.PI * (input[i + 1] + 90) / 360));\n if (y > halfSize) {\n y = halfSize;\n } else if (y < -halfSize) {\n y = -halfSize;\n }\n output[i + 1] = y;\n }\n return output;\n}\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 var length = input.length;\n var dimension = opt_dimension > 1 ? opt_dimension : 2;\n var output = opt_output;\n if (output === undefined) {\n if (dimension > 2) {\n // preserve values beyond second dimension\n output = input.slice();\n } else {\n output = new Array(length);\n }\n }\n for (var i = 0; i < length; i += dimension) {\n output[i] = 180 * input[i] / HALF_SIZE;\n output[i + 1] = 360 * Math.atan(\n Math.exp(input[i + 1] / RADIUS)) / Math.PI - 90;\n }\n return output;\n}\n\n//# sourceMappingURL=epsg3857.js.map","/**\n * @module ol/proj/epsg4326\n */\nimport Projection from './Projection.js';\nimport Units from './Units.js';\n\n\n/**\n * Semi-major radius of the WGS84 ellipsoid.\n *\n * @const\n * @type {number}\n */\nexport var RADIUS = 6378137;\n\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 var EXTENT = [-180, -90, 180, 90];\n\n\n/**\n * @const\n * @type {number}\n */\nexport var METERS_PER_UNIT = Math.PI * RADIUS / 180;\n\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 */\nvar EPSG4326Projection = /*@__PURE__*/(function (Projection) {\n function EPSG4326Projection(code, opt_axisOrientation) {\n Projection.call(this, {\n code: code,\n units: Units.DEGREES,\n extent: EXTENT,\n axisOrientation: opt_axisOrientation,\n global: true,\n metersPerUnit: METERS_PER_UNIT,\n worldExtent: EXTENT\n });\n\n }\n\n if ( Projection ) EPSG4326Projection.__proto__ = Projection;\n EPSG4326Projection.prototype = Object.create( Projection && Projection.prototype );\n EPSG4326Projection.prototype.constructor = EPSG4326Projection;\n\n return EPSG4326Projection;\n}(Projection));\n\n\n/**\n * Projections equal to EPSG:4326.\n *\n * @const\n * @type {Array<import(\"./Projection.js\").default>}\n */\nexport var PROJECTIONS = [\n new EPSG4326Projection('CRS:84'),\n new EPSG4326Projection('EPSG:4326', 'neu'),\n new EPSG4326Projection('urn:ogc:def:crs:EPSG::4326', 'neu'),\n new EPSG4326Projection('urn:ogc:def:crs:EPSG:6.6:4326', 'neu'),\n new EPSG4326Projection('urn:ogc:def:crs:OGC:1.3:CRS84'),\n new EPSG4326Projection('urn:ogc:def:crs:OGC:2:84'),\n new EPSG4326Projection('http://www.opengis.net/gml/srs/epsg.xml#4326', 'neu'),\n new EPSG4326Projection('urn:x-ogc:def:crs:EPSG:4326', 'neu')\n];\n\n//# sourceMappingURL=epsg4326.js.map","/**\n * @module ol/proj/projections\n */\n\n\n/**\n * @type {Object<string, import(\"./Projection.js\").default>}\n */\nvar cache = {};\n\n\n/**\n * Clear the projections cache.\n */\nexport function clear() {\n cache = {};\n}\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 cache[code] || 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//# sourceMappingURL=projections.js.map","/**\n * @module ol/proj/transforms\n */\nimport {isEmpty} from '../obj.js';\n\n\n/**\n * @private\n * @type {!Object<string, Object<string, import(\"../proj.js\").TransformFunction>>}\n */\nvar transforms = {};\n\n\n/**\n * Clear the transform cache.\n */\nexport function clear() {\n transforms = {};\n}\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 var sourceCode = source.getCode();\n var destinationCode = destination.getCode();\n if (!(sourceCode in transforms)) {\n transforms[sourceCode] = {};\n }\n transforms[sourceCode][destinationCode] = transformFn;\n}\n\n\n/**\n * Unregisters the conversion function to convert coordinates from the source\n * projection to the destination projection. This method is used to clean up\n * cached transforms during testing.\n *\n * @param {import(\"./Projection.js\").default} source Source projection.\n * @param {import(\"./Projection.js\").default} destination Destination projection.\n * @return {import(\"../proj.js\").TransformFunction} transformFn The unregistered transform.\n */\nexport function remove(source, destination) {\n var sourceCode = source.getCode();\n var destinationCode = destination.getCode();\n var transform = transforms[sourceCode][destinationCode];\n delete transforms[sourceCode][destinationCode];\n if (isEmpty(transforms[sourceCode])) {\n delete transforms[sourceCode];\n }\n return transform;\n}\n\n\n/**\n * Get a transform given a source code and a destination code.\n * @param {string} sourceCode The code for the source projection.\n * @param {string} destinationCode The code for the destination projection.\n * @return {import(\"../proj.js\").TransformFunction|undefined} The transform function (if found).\n */\nexport function get(sourceCode, destinationCode) {\n var transform;\n if (sourceCode in transforms && destinationCode in transforms[sourceCode]) {\n transform = transforms[sourceCode][destinationCode];\n }\n return transform;\n}\n\n//# sourceMappingURL=transforms.js.map","/**\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 {getDistance} from './sphere.js';\nimport {applyTransform} from './extent.js';\nimport {modulo} from './math.js';\nimport {toEPSG4326, fromEPSG4326, PROJECTIONS as EPSG3857_PROJECTIONS} from './proj/epsg3857.js';\nimport {PROJECTIONS as EPSG4326_PROJECTIONS} from './proj/epsg4326.js';\nimport Projection from './proj/Projection.js';\nimport Units, {METERS_PER_UNIT} from './proj/Units.js';\nimport * as projections from './proj/projections.js';\nimport {add as addTransformFunc, clear as clearTransformFuncs, get as getTransformFunc} from './proj/transforms.js';\n\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/**\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\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 var output;\n if (opt_output !== undefined) {\n for (var i = 0, ii = input.length; i < ii; ++i) {\n opt_output[i] = input[i];\n }\n output = opt_output;\n } else {\n output = input.slice();\n }\n return output;\n}\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 (var i = 0, ii = input.length; i < ii; ++i) {\n opt_output[i] = input[i];\n }\n input = opt_output;\n }\n return input;\n}\n\n\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 projections.add(projection.getCode(), projection);\n addTransformFunc(projection, projection, cloneTransform);\n}\n\n\n/**\n * @param {Array<Projection>} projections Projections.\n */\nexport function addProjections(projections) {\n projections.forEach(addProjection);\n}\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 projections.get(/** @type {string} */ (projectionLike)) :\n (/** @type {Projection} */ (projectionLike) || null);\n}\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 {Units=} opt_units Units to get the point resolution in.\n * Default is the projection's units.\n * @return {number} Point resolution.\n * @api\n */\nexport function getPointResolution(projection, resolution, point, opt_units) {\n projection = get(projection);\n var pointResolution;\n var getter = projection.getPointResolutionFunc();\n if (getter) {\n pointResolution = getter(resolution, point);\n } else {\n var 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 var toEPSG4326 = getTransformFromProjections(projection, get('EPSG:4326'));\n var vertices = [\n point[0] - resolution / 2, point[1],\n point[0] + resolution / 2, point[1],\n point[0], point[1] - resolution / 2,\n point[0], point[1] + resolution / 2\n ];\n vertices = toEPSG4326(vertices, vertices, 2);\n var width = getDistance(vertices.slice(0, 2), vertices.slice(2, 4));\n var height = getDistance(vertices.slice(4, 6), vertices.slice(6, 8));\n pointResolution = (width + height) / 2;\n var metersPerUnit = opt_units ?\n METERS_PER_UNIT[opt_units] :\n projection.getMetersPerUnit();\n if (metersPerUnit !== undefined) {\n pointResolution /= metersPerUnit;\n }\n }\n }\n return pointResolution;\n}\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/**\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(projections1, projections2, forwardTransform, inverseTransform) {\n projections1.forEach(function(projection1) {\n projections2.forEach(function(projection2) {\n addTransformFunc(projection1, projection2, forwardTransform);\n addTransformFunc(projection2, projection1, inverseTransform);\n });\n });\n}\n\n\n/**\n * Clear all cached projections and transforms.\n */\nexport function clearAllProjections() {\n projections.clear();\n clearTransformFuncs();\n}\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 (\n /** @type {Projection} */ (projection)\n );\n }\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 var length = input.length;\n var dimension = opt_dimension !== undefined ? opt_dimension : 2;\n var output = opt_output !== undefined ? opt_output : new Array(length);\n for (var i = 0; i < length; i += dimension) {\n var point = coordTransform([input[i], input[i + 1]]);\n output[i] = point[0];\n output[i + 1] = point[1];\n for (var j = dimension - 1; j >= 2; --j) {\n output[i + j] = input[i + j];\n }\n }\n return output;\n });\n}\n\n\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 var sourceProj = get(source);\n var destProj = get(destination);\n addTransformFunc(sourceProj, destProj, createTransformFromCoordinateTransform(forward));\n addTransformFunc(destProj, sourceProj, 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(coordinate, '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 var lonLat = transform(coordinate,\n opt_projection !== undefined ? opt_projection : 'EPSG:3857', 'EPSG:4326');\n var lon = lonLat[0];\n if (lon < -180 || lon > 180) {\n lonLat[0] = modulo(lon + 180, 360) - 180;\n }\n return lonLat;\n}\n\n\n/**\n * Checks if two projections are the same, that is every coordinate in one\n * projection does represent the same geographic point as the same coordinate in\n * the other projection.\n *\n * @param {Projection} projection1 Projection 1.\n * @param {Projection} projection2 Projection 2.\n * @return {boolean} Equivalent.\n * @api\n */\nexport function equivalent(projection1, projection2) {\n if (projection1 === projection2) {\n return true;\n }\n var equalUnits = projection1.getUnits() === projection2.getUnits();\n if (projection1.getCode() === projection2.getCode()) {\n return equalUnits;\n } else {\n var transformFunc = getTransformFromProjections(projection1, projection2);\n return transformFunc === cloneTransform && equalUnits;\n }\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(sourceProjection, destinationProjection) {\n var sourceCode = sourceProjection.getCode();\n var destinationCode = destinationProjection.getCode();\n var transformFunc = getTransformFunc(sourceCode, destinationCode);\n if (!transformFunc) {\n transformFunc = identityTransform;\n }\n return transformFunc;\n}\n\n\n/**\n * Given the projection-like objects, searches for a transformation\n * function to convert a coordinates array from the source projection to the\n * destination projection.\n *\n * @param {ProjectionLike} source Source.\n * @param {ProjectionLike} destination Destination.\n * @return {TransformFunction} Transform function.\n * @api\n */\nexport function getTransform(source, destination) {\n var sourceProjection = get(source);\n var destinationProjection = get(destination);\n return getTransformFromProjections(sourceProjection, destinationProjection);\n}\n\n\n/**\n * Transforms a coordinate from source projection to destination projection.\n * This returns a new coordinate (and does not modify the original).\n *\n * See {@link module:ol/proj~transformExtent} for extent transformation.\n * See the transform method of {@link module:ol/geom/Geometry~Geometry} and its\n * subclasses for geometry transforms.\n *\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {ProjectionLike} source Source projection-like.\n * @param {ProjectionLike} destination Destination projection-like.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n * @api\n */\nexport function transform(coordinate, source, destination) {\n var transformFunc = getTransform(source, destination);\n return transformFunc(coordinate, undefined, coordinate.length);\n}\n\n\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 * @return {import(\"./extent.js\").Extent} The transformed extent.\n * @api\n */\nexport function transformExtent(extent, source, destination) {\n var transformFunc = getTransform(source, destination);\n return applyTransform(extent, transformFunc);\n}\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(point, sourceProjection, destinationProjection) {\n var transformFunc = getTransformFromProjections(sourceProjection, destinationProjection);\n return transformFunc(point);\n}\n\n/**\n * Add transforms to and from EPSG:4326 and EPSG:3857. This function is called\n * by when this module is executed and should only need to be called again after\n * `clearAllProjections()` is called (e.g. in tests).\n */\nexport function addCommon() {\n // Add transformations that don't alter coordinates to convert within set of\n // projections with equal meaning.\n addEquivalentProjections(EPSG3857_PROJECTIONS);\n addEquivalentProjections(EPSG4326_PROJECTIONS);\n // Add transformations to convert EPSG:4326 like coordinates to EPSG:3857 like\n // coordinates and back.\n addEquivalentTransforms(EPSG4326_PROJECTIONS, EPSG3857_PROJECTIONS, fromEPSG4326, toEPSG4326);\n}\n\naddCommon();\n\n//# sourceMappingURL=proj.js.map","/**\n * @module ol/transform\n */\nimport {assert} from './asserts.js';\n\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 */\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/**\n * @private\n * @type {Transform}\n */\nvar tmp_ = new Array(6);\n\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/**\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/**\n * Multiply the underlying matrices of two transforms and return the result in\n * the first transform.\n * @param {!Transform} transform1 Transform parameters of matrix 1.\n * @param {!Transform} transform2 Transform parameters of matrix 2.\n * @return {!Transform} transform1 multiplied with transform2.\n */\nexport function multiply(transform1, transform2) {\n var a1 = transform1[0];\n var b1 = transform1[1];\n var c1 = transform1[2];\n var d1 = transform1[3];\n var e1 = transform1[4];\n var f1 = transform1[5];\n var a2 = transform2[0];\n var b2 = transform2[1];\n var c2 = transform2[2];\n var d2 = transform2[3];\n var e2 = transform2[4];\n var f2 = transform2[5];\n\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/**\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/**\n * Transforms the given coordinate with the given transform returning the\n * resulting, transformed coordinate. The coordinate will be modified in-place.\n *\n * @param {Transform} transform The transformation.\n * @param {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} coordinate The coordinate to transform.\n * @return {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} return coordinate so that operations can be\n * chained together.\n */\nexport function apply(transform, coordinate) {\n var x = coordinate[0];\n var y = coordinate[1];\n coordinate[0] = transform[0] * x + transform[2] * y + transform[4];\n coordinate[1] = transform[1] * x + transform[3] * y + transform[5];\n return coordinate;\n}\n\n\n/**\n * Applies rotation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} angle Angle in radians.\n * @return {!Transform} The rotated transform.\n */\nexport function rotate(transform, angle) {\n var cos = Math.cos(angle);\n var sin = Math.sin(angle);\n return multiply(transform, set(tmp_, cos, sin, -sin, cos, 0, 0));\n}\n\n\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/**\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/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative).\n * @param {!Transform} transform The transform (will be modified in place).\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 Final translation x.\n * @param {number} dy2 Final translation y.\n * @return {!Transform} The composite transform.\n */\nexport function compose(transform, dx1, dy1, sx, sy, angle, dx2, dy2) {\n var sin = Math.sin(angle);\n var cos = Math.cos(angle);\n transform[0] = sx * cos;\n transform[1] = sy * sin;\n transform[2] = -sx * sin;\n transform[3] = sy * cos;\n transform[4] = dx2 * sx * cos - dy2 * sx * sin + dx1;\n transform[5] = dx2 * sy * sin + dy2 * sy * cos + dy1;\n return transform;\n}\n\n\n/**\n * Invert the given transform.\n * @param {!Transform} transform Transform.\n * @return {!Transform} Inverse of the transform.\n */\nexport function invert(transform) {\n var det = determinant(transform);\n assert(det !== 0, 32); // Transformation matrix cannot be inverted\n\n var a = transform[0];\n var b = transform[1];\n var c = transform[2];\n var d = transform[3];\n var e = transform[4];\n var f = transform[5];\n\n transform[0] = d / det;\n transform[1] = -b / det;\n transform[2] = -c / det;\n transform[3] = a / det;\n transform[4] = (c * f - d * e) / det;\n transform[5] = -(a * f - b * e) / det;\n\n return transform;\n}\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//# sourceMappingURL=transform.js.map","/**\n * @module ol/geom/Geometry\n */\nimport {abstract} from '../util.js';\nimport BaseObject from '../Object.js';\nimport {createEmpty, getHeight, returnOrUpdate} from '../extent.js';\nimport {transform2D} from './flat/transform.js';\nimport {get as getProjection, getTransform} from '../proj.js';\nimport Units from '../proj/Units.js';\nimport {create as createTransform, compose as composeTransform} from '../transform.js';\n\n\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nvar tmpTransform = createTransform();\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 vector geometries.\n *\n * To get notified of changes to the geometry, register a listener for the\n * generic `change` event on your geometry instance.\n *\n * @abstract\n * @api\n */\nvar Geometry = /*@__PURE__*/(function (BaseObject) {\n function Geometry() {\n\n BaseObject.call(this);\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 {Object<string, Geometry>}\n */\n this.simplifiedGeometryCache = {};\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\n if ( BaseObject ) Geometry.__proto__ = BaseObject;\n Geometry.prototype = Object.create( BaseObject && BaseObject.prototype );\n Geometry.prototype.constructor = Geometry;\n\n /**\n * Make a complete copy of the geometry.\n * @abstract\n * @return {!Geometry} Clone.\n */\n Geometry.prototype.clone = function 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 Geometry.prototype.closestPointXY = function 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 Geometry.prototype.containsXY = function containsXY (x, y) {\n return false;\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 Geometry.prototype.getClosestPoint = function getClosestPoint (point, opt_closestPoint) {\n var closestPoint = opt_closestPoint ? opt_closestPoint : [NaN, NaN];\n this.closestPointXY(point[0], point[1], closestPoint, Infinity);\n return closestPoint;\n };\n\n /**\n * Returns true if this geometry includes the specified coordinate. If the\n * coordinate is on the boundary of the geometry, returns false.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} Contains coordinate.\n * @api\n */\n Geometry.prototype.intersectsCoordinate = function 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 Geometry.prototype.computeExtent = function 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 Geometry.prototype.getExtent = function getExtent (opt_extent) {\n if (this.extentRevision_ != this.getRevision()) {\n this.extent_ = this.computeExtent(this.extent_);\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 Geometry.prototype.rotate = function 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\n * sx).\n * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor The scale origin (defaults to the center\n * of the geometry extent).\n * @api\n */\n Geometry.prototype.scale = function 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 the {@link\n * https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm\n * Douglas Peucker} algorithm. For polygons, a quantization-based\n * simplification is used to preserve topology.\n * @param {number} tolerance The tolerance distance for simplification.\n * @return {Geometry} A new, simplified version of the original geometry.\n * @api\n */\n Geometry.prototype.simplify = function 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 Geometry.prototype.getSimplifiedGeometry = function 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 Geometry.prototype.getType = function getType () {\n return abstract();\n };\n\n /**\n * Apply a transform function to each coordinate 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.\n */\n Geometry.prototype.applyTransform = function 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 Geometry.prototype.intersectsExtent = function 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 Geometry.prototype.translate = function 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 Geometry.prototype.transform = function transform (source, destination) {\n /** @type {import(\"../proj/Projection.js\").default} */\n var sourceProj = getProjection(source);\n var transformFn = sourceProj.getUnits() == Units.TILE_PIXELS ?\n function(inCoordinates, outCoordinates, stride) {\n var pixelExtent = sourceProj.getExtent();\n var projectedExtent = sourceProj.getWorldExtent();\n var scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n composeTransform(tmpTransform,\n projectedExtent[0], projectedExtent[3],\n scale, -scale, 0,\n 0, 0);\n transform2D(inCoordinates, 0, inCoordinates.length, stride,\n tmpTransform, outCoordinates);\n return getTransform(sourceProj, destination)(inCoordinates, outCoordinates, stride);\n } :\n getTransform(sourceProj, destination);\n this.applyTransform(transformFn);\n return this;\n };\n\n return Geometry;\n}(BaseObject));\n\n\nexport default Geometry;\n\n//# sourceMappingURL=Geometry.js.map","/**\n * @module ol/geom/SimpleGeometry\n */\nimport {abstract} from '../util.js';\nimport {createOrUpdateFromFlatCoordinates, getCenter} from '../extent.js';\nimport Geometry from './Geometry.js';\nimport GeometryLayout from './GeometryLayout.js';\nimport {rotate, scale, translate, transform2D} from './flat/transform.js';\nimport {clear} from '../obj.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 */\nvar SimpleGeometry = /*@__PURE__*/(function (Geometry) {\n function SimpleGeometry() {\n\n Geometry.call(this);\n\n /**\n * @protected\n * @type {GeometryLayout}\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 if ( Geometry ) SimpleGeometry.__proto__ = Geometry;\n SimpleGeometry.prototype = Object.create( Geometry && Geometry.prototype );\n SimpleGeometry.prototype.constructor = SimpleGeometry;\n\n /**\n * @inheritDoc\n */\n SimpleGeometry.prototype.computeExtent = function computeExtent (extent) {\n return createOrUpdateFromFlatCoordinates(this.flatCoordinates,\n 0, this.flatCoordinates.length, this.stride, extent);\n };\n\n /**\n * @abstract\n * @return {Array} Coordinates.\n */\n SimpleGeometry.prototype.getCoordinates = function 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 SimpleGeometry.prototype.getFirstCoordinate = function getFirstCoordinate () {\n return this.flatCoordinates.slice(0, this.stride);\n };\n\n /**\n * @return {Array<number>} Flat coordinates.\n */\n SimpleGeometry.prototype.getFlatCoordinates = function 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 SimpleGeometry.prototype.getLastCoordinate = function getLastCoordinate () {\n return this.flatCoordinates.slice(this.flatCoordinates.length - this.stride);\n };\n\n /**\n * Return the {@link module:ol/geom/GeometryLayout layout} of the geometry.\n * @return {GeometryLayout} Layout.\n * @api\n */\n SimpleGeometry.prototype.getLayout = function getLayout () {\n return this.layout;\n };\n\n /**\n * @inheritDoc\n */\n SimpleGeometry.prototype.getSimplifiedGeometry = function getSimplifiedGeometry (squaredTolerance) {\n if (this.simplifiedGeometryRevision != this.getRevision()) {\n clear(this.simplifiedGeometryCache);\n this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n this.simplifiedGeometryRevision = this.getRevision();\n }\n // If squaredTolerance is negative or if we know that simplification will not\n // have any effect then just return this.\n if (squaredTolerance < 0 ||\n (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n squaredTolerance <= this.simplifiedGeometryMaxMinSquaredTolerance)) {\n return this;\n }\n var key = squaredTolerance.toString();\n if (this.simplifiedGeometryCache.hasOwnProperty(key)) {\n return this.simplifiedGeometryCache[key];\n } else {\n var simplifiedGeometry =\n this.getSimplifiedGeometryInternal(squaredTolerance);\n var simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates();\n if (simplifiedFlatCoordinates.length < this.flatCoordinates.length) {\n this.simplifiedGeometryCache[key] = simplifiedGeometry;\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 /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {SimpleGeometry} Simplified geometry.\n * @protected\n */\n SimpleGeometry.prototype.getSimplifiedGeometryInternal = function getSimplifiedGeometryInternal (squaredTolerance) {\n return this;\n };\n\n /**\n * @return {number} Stride.\n */\n SimpleGeometry.prototype.getStride = function getStride () {\n return this.stride;\n };\n\n /**\n * @param {GeometryLayout} layout Layout.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n */\n SimpleGeometry.prototype.setFlatCoordinates = function 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 {GeometryLayout=} opt_layout Layout.\n */\n SimpleGeometry.prototype.setCoordinates = function setCoordinates (coordinates, opt_layout) {\n abstract();\n };\n\n /**\n * @param {GeometryLayout|undefined} layout Layout.\n * @param {Array} coordinates Coordinates.\n * @param {number} nesting Nesting.\n * @protected\n */\n SimpleGeometry.prototype.setLayout = function setLayout (layout, coordinates, nesting) {\n /** @type {number} */\n var stride;\n if (layout) {\n stride = getStrideForLayout(layout);\n } else {\n for (var i = 0; i < nesting; ++i) {\n if (coordinates.length === 0) {\n this.layout = GeometryLayout.XY;\n this.stride = 2;\n return;\n } 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 * @inheritDoc\n * @api\n */\n SimpleGeometry.prototype.applyTransform = function applyTransform (transformFn) {\n if (this.flatCoordinates) {\n transformFn(this.flatCoordinates, this.flatCoordinates, this.stride);\n this.changed();\n }\n };\n\n /**\n * @inheritDoc\n * @api\n */\n SimpleGeometry.prototype.rotate = function rotate$1 (angle, anchor) {\n var flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n var stride = this.getStride();\n rotate(\n flatCoordinates, 0, flatCoordinates.length,\n stride, angle, anchor, flatCoordinates);\n this.changed();\n }\n };\n\n /**\n * @inheritDoc\n * @api\n */\n SimpleGeometry.prototype.scale = function scale$1 (sx, opt_sy, opt_anchor) {\n var sy = opt_sy;\n if (sy === undefined) {\n sy = sx;\n }\n var anchor = opt_anchor;\n if (!anchor) {\n anchor = getCenter(this.getExtent());\n }\n var flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n var stride = this.getStride();\n scale(\n flatCoordinates, 0, flatCoordinates.length,\n stride, sx, sy, anchor, flatCoordinates);\n this.changed();\n }\n };\n\n /**\n * @inheritDoc\n * @api\n */\n SimpleGeometry.prototype.translate = function translate$1 (deltaX, deltaY) {\n var flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n var stride = this.getStride();\n translate(\n flatCoordinates, 0, flatCoordinates.length, stride,\n deltaX, deltaY, flatCoordinates);\n this.changed();\n }\n };\n\n return SimpleGeometry;\n}(Geometry));\n\n\n/**\n * @param {number} stride Stride.\n * @return {GeometryLayout} layout Layout.\n */\nfunction getLayoutForStride(stride) {\n var 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 (\n /** @type {GeometryLayout} */ (layout)\n );\n}\n\n\n/**\n * @param {GeometryLayout} layout Layout.\n * @return {number} Stride.\n */\nexport function getStrideForLayout(layout) {\n var 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/**\n * @param {SimpleGeometry} simpleGeometry Simple geometry.\n * @param {import(\"../transform.js\").Transform} transform Transform.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed flat coordinates.\n */\nexport function transformGeom2D(simpleGeometry, transform, opt_dest) {\n var flatCoordinates = simpleGeometry.getFlatCoordinates();\n if (!flatCoordinates) {\n return null;\n } else {\n var stride = simpleGeometry.getStride();\n return transform2D(\n flatCoordinates, 0, flatCoordinates.length, stride,\n transform, opt_dest);\n }\n}\n\nexport default SimpleGeometry;\n\n//# sourceMappingURL=SimpleGeometry.js.map","/**\n * @module ol/geom/flat/area\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 * @return {number} Area.\n */\nexport function linearRing(flatCoordinates, offset, end, stride) {\n var twiceArea = 0;\n var x1 = flatCoordinates[end - stride];\n var y1 = flatCoordinates[end - stride + 1];\n for (; offset < end; offset += stride) {\n var x2 = flatCoordinates[offset];\n var y2 = flatCoordinates[offset + 1];\n twiceArea += y1 * x2 - x1 * y2;\n x1 = x2;\n y1 = y2;\n }\n return twiceArea / 2;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRings(flatCoordinates, offset, ends, stride) {\n var area = 0;\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n area += linearRing(flatCoordinates, offset, end, stride);\n offset = end;\n }\n return area;\n}\n\n\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 var area = 0;\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n area += linearRings(flatCoordinates, offset, ends, stride);\n offset = ends[ends.length - 1];\n }\n return area;\n}\n\n//# sourceMappingURL=area.js.map","/**\n * @module ol/geom/flat/closest\n */\nimport {lerp, squaredDistance as squaredDx} from '../../math.js';\n\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(flatCoordinates, offset1, offset2, stride, x, y, closestPoint) {\n var x1 = flatCoordinates[offset1];\n var y1 = flatCoordinates[offset1 + 1];\n var dx = flatCoordinates[offset2] - x1;\n var dy = flatCoordinates[offset2 + 1] - y1;\n var offset;\n if (dx === 0 && dy === 0) {\n offset = offset1;\n } else {\n var 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 (var i = 0; i < stride; ++i) {\n closestPoint[i] = lerp(flatCoordinates[offset1 + i],\n flatCoordinates[offset2 + i], t);\n }\n closestPoint.length = stride;\n return;\n } else {\n offset = offset1;\n }\n }\n for (var i$1 = 0; i$1 < stride; ++i$1) {\n closestPoint[i$1] = flatCoordinates[offset + i$1];\n }\n closestPoint.length = stride;\n}\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 var x1 = flatCoordinates[offset];\n var y1 = flatCoordinates[offset + 1];\n for (offset += stride; offset < end; offset += stride) {\n var x2 = flatCoordinates[offset];\n var y2 = flatCoordinates[offset + 1];\n var squaredDelta = squaredDx(x1, y1, x2, y2);\n if (squaredDelta > max) {\n max = squaredDelta;\n }\n x1 = x2;\n y1 = y2;\n }\n return max;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max) {\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n max = maxSquaredDelta(\n flatCoordinates, offset, end, stride, max);\n offset = end;\n }\n return max;\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 {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function multiArrayMaxSquaredDelta(flatCoordinates, offset, endss, stride, max) {\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n max = arrayMaxSquaredDelta(\n flatCoordinates, offset, ends, stride, max);\n offset = ends[ends.length - 1];\n }\n return max;\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 {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(flatCoordinates, offset, end,\n stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance,\n opt_tmpPoint) {\n if (offset == end) {\n return minSquaredDistance;\n }\n var i, squaredDistance;\n if (maxDelta === 0) {\n // All points are identical, so just test the first point.\n squaredDistance = squaredDx(\n x, y, flatCoordinates[offset], flatCoordinates[offset + 1]);\n if (squaredDistance < minSquaredDistance) {\n for (i = 0; i < stride; ++i) {\n closestPoint[i] = flatCoordinates[offset + i];\n }\n closestPoint.length = stride;\n return squaredDistance;\n } else {\n return minSquaredDistance;\n }\n }\n var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n var index = offset + stride;\n while (index < end) {\n assignClosest(\n flatCoordinates, index - stride, index, stride, x, y, tmpPoint);\n squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n if (squaredDistance < minSquaredDistance) {\n minSquaredDistance = squaredDistance;\n for (i = 0; i < stride; ++i) {\n closestPoint[i] = tmpPoint[i];\n }\n closestPoint.length = stride;\n index += stride;\n } 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 += stride * Math.max(\n ((Math.sqrt(squaredDistance) -\n Math.sqrt(minSquaredDistance)) / maxDelta) | 0, 1);\n }\n }\n if (isRing) {\n // Check the closing segment.\n assignClosest(\n flatCoordinates, end - stride, offset, stride, x, y, tmpPoint);\n squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n if (squaredDistance < minSquaredDistance) {\n minSquaredDistance = squaredDistance;\n for (i = 0; i < stride; ++i) {\n closestPoint[i] = tmpPoint[i];\n }\n closestPoint.length = stride;\n }\n }\n return minSquaredDistance;\n}\n\n\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(flatCoordinates, offset, ends,\n stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance,\n opt_tmpPoint) {\n var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n minSquaredDistance = assignClosestPoint(\n flatCoordinates, offset, end, stride,\n maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);\n offset = end;\n }\n return minSquaredDistance;\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 {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>=} opt_tmpPoint Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestMultiArrayPoint(flatCoordinates, offset,\n endss, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance,\n opt_tmpPoint) {\n var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n minSquaredDistance = assignClosestArrayPoint(\n flatCoordinates, offset, ends, stride,\n maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);\n offset = ends[ends.length - 1];\n }\n return minSquaredDistance;\n}\n\n//# sourceMappingURL=closest.js.map","/**\n * @module ol/geom/flat/deflate\n */\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 (var i = 0, ii = coordinate.length; i < ii; ++i) {\n flatCoordinates[offset++] = coordinate[i];\n }\n return offset;\n}\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(flatCoordinates, offset, coordinates, stride) {\n for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n var coordinate = coordinates[i];\n for (var j = 0; j < stride; ++j) {\n flatCoordinates[offset++] = coordinate[j];\n }\n }\n return offset;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<import(\"../../coordinate.js\").Coordinate>>} coordinatess Coordinatess.\n * @param {number} stride Stride.\n * @param {Array<number>=} opt_ends Ends.\n * @return {Array<number>} Ends.\n */\nexport function deflateCoordinatesArray(flatCoordinates, offset, coordinatess, stride, opt_ends) {\n var ends = opt_ends ? opt_ends : [];\n var i = 0;\n for (var j = 0, jj = coordinatess.length; j < jj; ++j) {\n var end = deflateCoordinates(\n flatCoordinates, offset, coordinatess[j], stride);\n ends[i++] = end;\n offset = end;\n }\n ends.length = i;\n return ends;\n}\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(flatCoordinates, offset, coordinatesss, stride, opt_endss) {\n var endss = opt_endss ? opt_endss : [];\n var i = 0;\n for (var j = 0, jj = coordinatesss.length; j < jj; ++j) {\n var ends = deflateCoordinatesArray(\n flatCoordinates, offset, coordinatesss[j], stride, endss[i]);\n endss[i++] = ends;\n offset = ends[ends.length - 1];\n }\n endss.length = i;\n return endss;\n}\n\n//# sourceMappingURL=deflate.js.map","/**\n * @module ol/geom/flat/inflate\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 {Array<import(\"../../coordinate.js\").Coordinate>=} opt_coordinates Coordinates.\n * @return {Array<import(\"../../coordinate.js\").Coordinate>} Coordinates.\n */\nexport function inflateCoordinates(flatCoordinates, offset, end, stride, opt_coordinates) {\n var coordinates = opt_coordinates !== undefined ? opt_coordinates : [];\n var i = 0;\n for (var j = offset; j < end; j += stride) {\n coordinates[i++] = flatCoordinates.slice(j, j + stride);\n }\n coordinates.length = i;\n return coordinates;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Array<Array<import(\"../../coordinate.js\").Coordinate>>=} opt_coordinatess Coordinatess.\n * @return {Array<Array<import(\"../../coordinate.js\").Coordinate>>} Coordinatess.\n */\nexport function inflateCoordinatesArray(flatCoordinates, offset, ends, stride, opt_coordinatess) {\n var coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : [];\n var i = 0;\n for (var j = 0, jj = ends.length; j < jj; ++j) {\n var end = ends[j];\n coordinatess[i++] = inflateCoordinates(\n flatCoordinates, offset, end, stride, coordinatess[i]);\n offset = end;\n }\n coordinatess.length = i;\n return coordinatess;\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<Array<Array<import(\"../../coordinate.js\").Coordinate>>>=} opt_coordinatesss\n * Coordinatesss.\n * @return {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>} Coordinatesss.\n */\nexport function inflateMultiCoordinatesArray(flatCoordinates, offset, endss, stride, opt_coordinatesss) {\n var coordinatesss = opt_coordinatesss !== undefined ? opt_coordinatesss : [];\n var i = 0;\n for (var j = 0, jj = endss.length; j < jj; ++j) {\n var ends = endss[j];\n coordinatesss[i++] = inflateCoordinatesArray(\n flatCoordinates, offset, ends, stride, coordinatesss[i]);\n offset = ends[ends.length - 1];\n }\n coordinatesss.length = i;\n return coordinatesss;\n}\n\n//# sourceMappingURL=inflate.js.map","/**\n * @module ol/geom/flat/simplify\n */\n// Based on simplify-js https://github.com/mourner/simplify-js\n// Copyright (c) 2012, Vladimir Agafonkin\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// 1. Redistributions of source code must retain the above copyright notice,\n// this list of conditions and the following disclaimer.\n//\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n\nimport {squaredSegmentDistance, squaredDistance} from '../../math.js';\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 {boolean} highQuality Highest quality.\n * @param {Array<number>=} opt_simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @return {Array<number>} Simplified line string.\n */\nexport function simplifyLineString(flatCoordinates, offset, end,\n stride, squaredTolerance, highQuality, opt_simplifiedFlatCoordinates) {\n var simplifiedFlatCoordinates = opt_simplifiedFlatCoordinates !== undefined ?\n opt_simplifiedFlatCoordinates : [];\n if (!highQuality) {\n end = radialDistance(flatCoordinates, offset, end,\n stride, squaredTolerance,\n simplifiedFlatCoordinates, 0);\n flatCoordinates = simplifiedFlatCoordinates;\n offset = 0;\n stride = 2;\n }\n simplifiedFlatCoordinates.length = douglasPeucker(\n flatCoordinates, offset, end, stride, squaredTolerance,\n simplifiedFlatCoordinates, 0);\n return simplifiedFlatCoordinates;\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 {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(flatCoordinates, offset, end,\n stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n var n = (end - offset) / stride;\n if (n < 3) {\n for (; offset < end; offset += stride) {\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset];\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + 1];\n }\n return simplifiedOffset;\n }\n /** @type {Array<number>} */\n var markers = new Array(n);\n markers[0] = 1;\n markers[n - 1] = 1;\n /** @type {Array<number>} */\n var stack = [offset, end - stride];\n var index = 0;\n while (stack.length > 0) {\n var last = stack.pop();\n var first = stack.pop();\n var maxSquaredDistance = 0;\n var x1 = flatCoordinates[first];\n var y1 = flatCoordinates[first + 1];\n var x2 = flatCoordinates[last];\n var y2 = flatCoordinates[last + 1];\n for (var i = first + stride; i < last; i += stride) {\n var x = flatCoordinates[i];\n var y = flatCoordinates[i + 1];\n var squaredDistance = squaredSegmentDistance(\n 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 (var i$1 = 0; i$1 < n; ++i$1) {\n if (markers[i$1]) {\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + i$1 * stride];\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + i$1 * stride + 1];\n }\n }\n return simplifiedOffset;\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 {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<number>} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerArray(flatCoordinates, offset,\n ends, stride, squaredTolerance, simplifiedFlatCoordinates,\n simplifiedOffset, simplifiedEnds) {\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n simplifiedOffset = douglasPeucker(\n flatCoordinates, offset, end, stride, squaredTolerance,\n simplifiedFlatCoordinates, simplifiedOffset);\n simplifiedEnds.push(simplifiedOffset);\n offset = end;\n }\n return simplifiedOffset;\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 {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, offset, endss, stride, squaredTolerance,\n simplifiedFlatCoordinates, simplifiedOffset, simplifiedEndss) {\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n var simplifiedEnds = [];\n simplifiedOffset = douglasPeuckerArray(\n flatCoordinates, offset, ends, stride, squaredTolerance,\n simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds);\n simplifiedEndss.push(simplifiedEnds);\n offset = ends[ends.length - 1];\n }\n return simplifiedOffset;\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 {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function radialDistance(flatCoordinates, offset, end,\n stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n if (end <= offset + stride) {\n // zero or one point, no simplification possible, so copy and return\n for (; offset < end; offset += stride) {\n simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + 1];\n }\n return simplifiedOffset;\n }\n var x1 = flatCoordinates[offset];\n var y1 = flatCoordinates[offset + 1];\n // copy first point\n simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n var x2 = x1;\n var y2 = y1;\n for (offset += stride; offset < end; offset += stride) {\n x2 = flatCoordinates[offset];\n y2 = flatCoordinates[offset + 1];\n if (squaredDistance(x1, y1, x2, y2) > squaredTolerance) {\n // copy point at offset\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n x1 = x2;\n y1 = y2;\n }\n }\n if (x2 != x1 || y2 != y1) {\n // copy last point\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n }\n return simplifiedOffset;\n}\n\n\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/**\n * Simplifies a line string using an algorithm designed by Tim Schaub.\n * Coordinates are snapped to the nearest value in a virtual grid and\n * consecutive duplicate coordinates are discarded. This effectively preserves\n * topology as the simplification of any subsection of a line string is\n * independent of the rest of the line string. This means that, for examples,\n * the common edge between two polygons will be simplified to the same line\n * string independently in both polygons. This implementation uses a single\n * pass over the coordinates and eliminates intermediate collinear points.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function quantize(flatCoordinates, offset, end, stride,\n tolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n // do nothing if the line is empty\n if (offset == end) {\n return simplifiedOffset;\n }\n // snap the first coordinate (P1)\n var x1 = snap(flatCoordinates[offset], tolerance);\n var y1 = snap(flatCoordinates[offset + 1], tolerance);\n offset += stride;\n // add the first coordinate to the output\n simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n // find the next coordinate that does not snap to the same value as the first\n // coordinate (P2)\n var x2, y2;\n do {\n x2 = snap(flatCoordinates[offset], tolerance);\n y2 = snap(flatCoordinates[offset + 1], tolerance);\n offset += stride;\n if (offset == end) {\n // all coordinates snap to the same value, the line collapses to a point\n // push the last snapped value anyway to ensure that the output contains\n // at least two points\n // FIXME should we really return at least two points anyway?\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n return simplifiedOffset;\n }\n } while (x2 == x1 && y2 == y1);\n while (offset < end) {\n // snap the next coordinate (P3)\n var x3 = snap(flatCoordinates[offset], tolerance);\n var y3 = snap(flatCoordinates[offset + 1], tolerance);\n offset += stride;\n // skip P3 if it is equal to P2\n if (x3 == x2 && y3 == y2) {\n continue;\n }\n // calculate the delta between P1 and P2\n var dx1 = x2 - x1;\n var dy1 = y2 - y1;\n // calculate the delta between P3 and P1\n var dx2 = x3 - x1;\n var dy2 = y3 - y1;\n // if P1, P2, and P3 are colinear and P3 is further from P1 than P2 is from\n // P1 in the same direction then P2 is on the straight line between P1 and\n // P3\n if ((dx1 * dy2 == dy1 * dx2) &&\n ((dx1 < 0 && dx2 < dx1) || dx1 == dx2 || (dx1 > 0 && dx2 > dx1)) &&\n ((dy1 < 0 && dy2 < dy1) || dy1 == dy2 || (dy1 > 0 && dy2 > dy1))) {\n // discard P2 and set P2 = P3\n x2 = x3;\n y2 = y3;\n continue;\n }\n // either P1, P2, and P3 are not colinear, or they are colinear but P3 is\n // between P3 and P1 or on the opposite half of the line to P2. add P2,\n // and continue with P1 = P2 and P2 = P3\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n x1 = x2;\n y1 = y2;\n x2 = x3;\n y2 = y3;\n }\n // add the last point (P2)\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n return simplifiedOffset;\n}\n\n\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, offset, ends, stride,\n tolerance,\n simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds) {\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n simplifiedOffset = quantize(\n flatCoordinates, offset, end, stride,\n tolerance,\n simplifiedFlatCoordinates, simplifiedOffset);\n simplifiedEnds.push(simplifiedOffset);\n offset = end;\n }\n return simplifiedOffset;\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 {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, offset, endss, stride,\n tolerance,\n simplifiedFlatCoordinates, simplifiedOffset, simplifiedEndss) {\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n var simplifiedEnds = [];\n simplifiedOffset = quantizeArray(\n flatCoordinates, offset, ends, stride,\n tolerance,\n simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds);\n simplifiedEndss.push(simplifiedEnds);\n offset = ends[ends.length - 1];\n }\n return simplifiedOffset;\n}\n\n//# sourceMappingURL=simplify.js.map","/**\n * @module ol/geom/LinearRing\n */\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {linearRing as linearRingArea} from './flat/area.js';\nimport {assignClosestPoint, maxSquaredDelta} from './flat/closest.js';\nimport {deflateCoordinates} from './flat/deflate.js';\nimport {inflateCoordinates} from './flat/inflate.js';\nimport {douglasPeucker} from './flat/simplify.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 */\nvar LinearRing = /*@__PURE__*/(function (SimpleGeometry) {\n function LinearRing(coordinates, opt_layout) {\n\n SimpleGeometry.call(this);\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(opt_layout, /** @type {Array<number>} */ (coordinates));\n } else {\n this.setCoordinates(/** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates), opt_layout);\n }\n\n }\n\n if ( SimpleGeometry ) LinearRing.__proto__ = SimpleGeometry;\n LinearRing.prototype = Object.create( SimpleGeometry && SimpleGeometry.prototype );\n LinearRing.prototype.constructor = LinearRing;\n\n /**\n * Make a complete copy of the geometry.\n * @return {!LinearRing} Clone.\n * @override\n * @api\n */\n LinearRing.prototype.clone = function clone () {\n return new LinearRing(this.flatCoordinates.slice(), this.layout);\n };\n\n /**\n * @inheritDoc\n */\n LinearRing.prototype.closestPointXY = function 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(maxSquaredDelta(\n this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestPoint(\n this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,\n this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\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 LinearRing.prototype.getArea = function getArea () {\n return linearRingArea(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n };\n\n /**\n * Return the coordinates of the linear ring.\n * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n * @override\n * @api\n */\n LinearRing.prototype.getCoordinates = function getCoordinates () {\n return inflateCoordinates(\n this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n };\n\n /**\n * @inheritDoc\n */\n LinearRing.prototype.getSimplifiedGeometryInternal = function getSimplifiedGeometryInternal (squaredTolerance) {\n var simplifiedFlatCoordinates = [];\n simplifiedFlatCoordinates.length = douglasPeucker(\n this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,\n squaredTolerance, simplifiedFlatCoordinates, 0);\n return new LinearRing(simplifiedFlatCoordinates, GeometryLayout.XY);\n };\n\n /**\n * @inheritDoc\n * @api\n */\n LinearRing.prototype.getType = function getType () {\n return GeometryType.LINEAR_RING;\n };\n\n /**\n * @inheritDoc\n */\n LinearRing.prototype.intersectsExtent = function 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 {GeometryLayout=} opt_layout Layout.\n * @override\n * @api\n */\n LinearRing.prototype.setCoordinates = function 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, 0, coordinates, this.stride);\n this.changed();\n };\n\n return LinearRing;\n}(SimpleGeometry));\n\n\nexport default LinearRing;\n\n//# sourceMappingURL=LinearRing.js.map","/**\n * @module ol/geom/Point\n */\nimport {createOrUpdateFromCoordinate, containsXY} from '../extent.js';\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.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 */\nvar Point = /*@__PURE__*/(function (SimpleGeometry) {\n function Point(coordinates, opt_layout) {\n SimpleGeometry.call(this);\n this.setCoordinates(coordinates, opt_layout);\n }\n\n if ( SimpleGeometry ) Point.__proto__ = SimpleGeometry;\n Point.prototype = Object.create( SimpleGeometry && SimpleGeometry.prototype );\n Point.prototype.constructor = Point;\n\n /**\n * Make a complete copy of the geometry.\n * @return {!Point} Clone.\n * @override\n * @api\n */\n Point.prototype.clone = function clone () {\n var point = new Point(this.flatCoordinates.slice(), this.layout);\n return point;\n };\n\n /**\n * @inheritDoc\n */\n Point.prototype.closestPointXY = function closestPointXY (x, y, closestPoint, minSquaredDistance) {\n var flatCoordinates = this.flatCoordinates;\n var squaredDistance = squaredDx(x, y, flatCoordinates[0], flatCoordinates[1]);\n if (squaredDistance < minSquaredDistance) {\n var stride = this.stride;\n for (var i = 0; i < stride; ++i) {\n closestPoint[i] = flatCoordinates[i];\n }\n closestPoint.length = stride;\n return squaredDistance;\n } else {\n return minSquaredDistance;\n }\n };\n\n /**\n * Return the coordinate of the point.\n * @return {import(\"../coordinate.js\").Coordinate} Coordinates.\n * @override\n * @api\n */\n Point.prototype.getCoordinates = function getCoordinates () {\n return !this.flatCoordinates ? [] : this.flatCoordinates.slice();\n };\n\n /**\n * @inheritDoc\n */\n Point.prototype.computeExtent = function computeExtent (extent) {\n return createOrUpdateFromCoordinate(this.flatCoordinates, extent);\n };\n\n /**\n * @inheritDoc\n * @api\n */\n Point.prototype.getType = function getType () {\n return GeometryType.POINT;\n };\n\n /**\n * @inheritDoc\n * @api\n */\n Point.prototype.intersectsExtent = function intersectsExtent (extent) {\n return containsXY(extent, this.flatCoordinates[0], this.flatCoordinates[1]);\n };\n\n /**\n * @inheritDoc\n * @api\n */\n Point.prototype.setCoordinates = function 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, 0, coordinates, this.stride);\n this.changed();\n };\n\n return Point;\n}(SimpleGeometry));\n\n\nexport default Point;\n\n//# sourceMappingURL=Point.js.map","/**\n * @module ol/geom/flat/contains\n */\nimport {forEachCorner} from '../../extent.js';\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} Contains extent.\n */\nexport function linearRingContainsExtent(flatCoordinates, offset, end, stride, extent) {\n var outside = forEachCorner(extent,\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} Contains (x, y).\n */\n function(coordinate) {\n return !linearRingContainsXY(flatCoordinates, offset, end, stride, coordinate[0], coordinate[1]);\n });\n return !outside;\n}\n\n\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(flatCoordinates, offset, end, stride, x, y) {\n // http://geomalgorithms.com/a03-_inclusion.html\n // Copyright 2000 softSurfer, 2012 Dan Sunday\n // This code may be freely used and modified for any purpose\n // providing that this copyright notice is included with it.\n // SoftSurfer makes no warranty for this code, and cannot be held\n // liable for any real or imagined damage resulting from its use.\n // Users of this code must verify correctness for their application.\n var wn = 0;\n var x1 = flatCoordinates[end - stride];\n var y1 = flatCoordinates[end - stride + 1];\n for (; offset < end; offset += stride) {\n var x2 = flatCoordinates[offset];\n var y2 = flatCoordinates[offset + 1];\n if (y1 <= y) {\n if (y2 > y && ((x2 - x1) * (y - y1)) - ((x - x1) * (y2 - y1)) > 0) {\n wn++;\n }\n } 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/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y) {\n if (ends.length === 0) {\n return false;\n }\n if (!linearRingContainsXY(flatCoordinates, offset, ends[0], stride, x, y)) {\n return false;\n }\n for (var i = 1, ii = ends.length; i < ii; ++i) {\n if (linearRingContainsXY(flatCoordinates, ends[i - 1], ends[i], stride, x, y)) {\n return false;\n }\n }\n return true;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingssContainsXY(flatCoordinates, offset, endss, stride, x, y) {\n if (endss.length === 0) {\n return false;\n }\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n return true;\n }\n offset = ends[ends.length - 1];\n }\n return false;\n}\n\n//# sourceMappingURL=contains.js.map","/**\n * @module ol/geom/flat/interiorpoint\n */\nimport {numberSafeCompareFunction} from '../../array.js';\nimport {linearRingsContainsXY} from './contains.js';\n\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(flatCoordinates, offset,\n ends, stride, flatCenters, flatCentersOffset, opt_dest) {\n var i, ii, x, x1, x2, y1, y2;\n var y = flatCenters[flatCentersOffset + 1];\n /** @type {Array<number>} */\n var intersections = [];\n // Calculate intersections with the horizontal line\n for (var r = 0, rr = ends.length; r < rr; ++r) {\n var end = ends[r];\n x1 = flatCoordinates[end - stride];\n y1 = flatCoordinates[end - stride + 1];\n for (i = offset; i < end; i += stride) {\n x2 = flatCoordinates[i];\n y2 = flatCoordinates[i + 1];\n if ((y <= y1 && y2 <= y) || (y1 <= y && y <= y2)) {\n x = (y - y1) / (y2 - y1) * (x2 - x1) + x1;\n intersections.push(x);\n }\n x1 = x2;\n y1 = y2;\n }\n }\n // Find the longest segment of the horizontal line that has its center point\n // inside the linear ring.\n var pointX = NaN;\n var maxSegmentLength = -Infinity;\n intersections.sort(numberSafeCompareFunction);\n x1 = intersections[0];\n for (i = 1, ii = intersections.length; i < ii; ++i) {\n x2 = intersections[i];\n var segmentLength = Math.abs(x2 - x1);\n if (segmentLength > maxSegmentLength) {\n x = (x1 + x2) / 2;\n if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n pointX = x;\n maxSegmentLength = segmentLength;\n }\n }\n x1 = x2;\n }\n if (isNaN(pointX)) {\n // There is no horizontal line that has its center point inside the linear\n // ring. Use the center of the the linear ring's extent.\n pointX = flatCenters[flatCentersOffset];\n }\n if (opt_dest) {\n opt_dest.push(pointX, y, maxSegmentLength);\n return opt_dest;\n } else {\n return [pointX, y, maxSegmentLength];\n }\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(flatCoordinates, offset, endss, stride, flatCenters) {\n var interiorPoints = [];\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n interiorPoints = getInteriorPointOfArray(flatCoordinates,\n offset, ends, stride, flatCenters, 2 * i, interiorPoints);\n offset = ends[ends.length - 1];\n }\n return interiorPoints;\n}\n\n//# sourceMappingURL=interiorpoint.js.map","/**\n * @module ol/geom/flat/segments\n */\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(this: S, import(\"../../coordinate.js\").Coordinate, import(\"../../coordinate.js\").Coordinate): T} callback Function\n * called for each segment.\n * @param {S=} opt_this The object to be used as the value of 'this'\n * within callback.\n * @return {T|boolean} Value.\n * @template T,S\n */\nexport function forEach(flatCoordinates, offset, end, stride, callback, opt_this) {\n var point1 = [flatCoordinates[offset], flatCoordinates[offset + 1]];\n var point2 = [];\n var ret;\n for (; (offset + stride) < end; offset += stride) {\n point2[0] = flatCoordinates[offset + stride];\n point2[1] = flatCoordinates[offset + stride + 1];\n ret = callback.call(opt_this, 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//# sourceMappingURL=segments.js.map","/**\n * @module ol/geom/flat/intersectsextent\n */\nimport {containsExtent, createEmpty, extendFlatCoordinates, intersects, intersectsSegment} from '../../extent.js';\nimport {linearRingContainsXY, linearRingContainsExtent} from './contains.js';\nimport {forEach as forEachSegment} from './segments.js';\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 intersectsLineString(flatCoordinates, offset, end, stride, extent) {\n var coordinatesExtent = extendFlatCoordinates(\n createEmpty(), flatCoordinates, offset, end, stride);\n if (!intersects(extent, coordinatesExtent)) {\n return false;\n }\n if (containsExtent(extent, coordinatesExtent)) {\n return true;\n }\n if (coordinatesExtent[0] >= extent[0] &&\n coordinatesExtent[2] <= extent[2]) {\n return true;\n }\n if (coordinatesExtent[1] >= extent[1] &&\n coordinatesExtent[3] <= extent[3]) {\n return true;\n }\n return forEachSegment(flatCoordinates, offset, end, stride,\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} point1 Start point.\n * @param {import(\"../../coordinate.js\").Coordinate} point2 End point.\n * @return {boolean} `true` if the segment and the extent intersect,\n * `false` otherwise.\n */\n function(point1, point2) {\n return intersectsSegment(extent, point1, point2);\n });\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineStringArray(flatCoordinates, offset, ends, stride, extent) {\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n if (intersectsLineString(\n flatCoordinates, offset, ends[i], stride, extent)) {\n return true;\n }\n offset = ends[i];\n }\n return false;\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 {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRing(flatCoordinates, offset, end, stride, extent) {\n if (intersectsLineString(\n flatCoordinates, offset, end, stride, extent)) {\n return true;\n }\n if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[0], extent[1])) {\n return true;\n }\n if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[0], extent[3])) {\n return true;\n }\n if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[2], extent[1])) {\n return true;\n }\n if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[2], extent[3])) {\n return true;\n }\n return false;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent) {\n if (!intersectsLinearRing(\n flatCoordinates, offset, ends[0], stride, extent)) {\n return false;\n }\n if (ends.length === 1) {\n return true;\n }\n for (var i = 1, ii = ends.length; i < ii; ++i) {\n if (linearRingContainsExtent(flatCoordinates, ends[i - 1], ends[i], stride, extent)) {\n if (!intersectsLineString(flatCoordinates, ends[i - 1], ends[i], stride, extent)) {\n return false;\n }\n }\n }\n return true;\n}\n\n\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(flatCoordinates, offset, endss, stride, extent) {\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n if (intersectsLinearRingArray(\n flatCoordinates, offset, ends, stride, extent)) {\n return true;\n }\n offset = ends[ends.length - 1];\n }\n return false;\n}\n\n//# sourceMappingURL=intersectsextent.js.map","/**\n * @module ol/geom/flat/reverse\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 */\nexport function coordinates(flatCoordinates, offset, end, stride) {\n while (offset < end - stride) {\n for (var i = 0; i < stride; ++i) {\n var tmp = flatCoordinates[offset + i];\n flatCoordinates[offset + i] = flatCoordinates[end - stride + i];\n flatCoordinates[end - stride + i] = tmp;\n }\n offset += stride;\n end -= stride;\n }\n}\n\n//# sourceMappingURL=reverse.js.map","/**\n * @module ol/geom/flat/orient\n */\nimport {coordinates as reverseCoordinates} from './reverse.js';\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 {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 var edge = 0;\n var x1 = flatCoordinates[end - stride];\n var y1 = flatCoordinates[end - stride + 1];\n for (; offset < end; offset += stride) {\n var x2 = flatCoordinates[offset];\n var y2 = flatCoordinates[offset + 1];\n edge += (x2 - x1) * (y2 + y1);\n x1 = x2;\n y1 = y2;\n }\n return edge > 0;\n}\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 linearRingIsOriented(flatCoordinates, offset, ends, stride, opt_right) {\n var right = opt_right !== undefined ? opt_right : false;\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n var isClockwise = linearRingIsClockwise(\n flatCoordinates, offset, end, stride);\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/**\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 linearRingsAreOriented(flatCoordinates, offset, endss, stride, opt_right) {\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n if (!linearRingIsOriented(\n flatCoordinates, offset, endss[i], stride, opt_right)) {\n return false;\n }\n }\n return true;\n}\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(flatCoordinates, offset, ends, stride, opt_right) {\n var right = opt_right !== undefined ? opt_right : false;\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n var isClockwise = linearRingIsClockwise(\n flatCoordinates, offset, end, stride);\n var reverse = i === 0 ?\n (right && isClockwise) || (!right && !isClockwise) :\n (right && !isClockwise) || (!right && isClockwise);\n if (reverse) {\n reverseCoordinates(flatCoordinates, offset, end, stride);\n }\n offset = end;\n }\n return offset;\n}\n\n\n/**\n * Orient coordinates in a flat array of linear rings. By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings). To orient according to the\n * right-hand rule, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRingsArray(flatCoordinates, offset, endss, stride, opt_right) {\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n offset = orientLinearRings(\n flatCoordinates, offset, endss[i], stride, opt_right);\n }\n return offset;\n}\n\n//# sourceMappingURL=orient.js.map","/**\n * @module ol/geom/Polygon\n */\nimport {extend} from '../array.js';\nimport {closestSquaredDistanceXY, getCenter} from '../extent.js';\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 {offset as sphereOffset} from '../sphere.js';\nimport {linearRings as linearRingsArea} from './flat/area.js';\nimport {assignClosestArrayPoint, arrayMaxSquaredDelta} from './flat/closest.js';\nimport {linearRingsContainsXY} from './flat/contains.js';\nimport {deflateCoordinatesArray} from './flat/deflate.js';\nimport {inflateCoordinatesArray} from './flat/inflate.js';\nimport {getInteriorPointOfArray} from './flat/interiorpoint.js';\nimport {intersectsLinearRingArray} from './flat/intersectsextent.js';\nimport {linearRingIsOriented, orientLinearRings} from './flat/orient.js';\nimport {quantizeArray} from './flat/simplify.js';\nimport {modulo} from '../math.js';\n\n/**\n * @classdesc\n * Polygon geometry.\n *\n * @api\n */\nvar Polygon = /*@__PURE__*/(function (SimpleGeometry) {\n function Polygon(coordinates, opt_layout, opt_ends) {\n\n SimpleGeometry.call(this);\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(opt_layout, /** @type {Array<number>} */ (coordinates));\n this.ends_ = opt_ends;\n } else {\n this.setCoordinates(/** @type {Array<Array<import(\"../coordinate.js\").Coordinate>>} */ (coordinates), opt_layout);\n }\n\n }\n\n if ( SimpleGeometry ) Polygon.__proto__ = SimpleGeometry;\n Polygon.prototype = Object.create( SimpleGeometry && SimpleGeometry.prototype );\n Polygon.prototype.constructor = Polygon;\n\n /**\n * Append the passed linear ring to this polygon.\n * @param {LinearRing} linearRing Linear ring.\n * @api\n */\n Polygon.prototype.appendLinearRing = function 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 * @override\n * @api\n */\n Polygon.prototype.clone = function clone () {\n return new Polygon(this.flatCoordinates.slice(), this.layout, this.ends_.slice());\n };\n\n /**\n * @inheritDoc\n */\n Polygon.prototype.closestPointXY = function 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(arrayMaxSquaredDelta(\n this.flatCoordinates, 0, this.ends_, this.stride, 0));\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestArrayPoint(\n this.flatCoordinates, 0, this.ends_, this.stride,\n this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n };\n\n /**\n * @inheritDoc\n */\n Polygon.prototype.containsXY = function containsXY (x, y) {\n return linearRingsContainsXY(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, x, y);\n };\n\n /**\n * Return the area of the polygon on projected plane.\n * @return {number} Area (on projected plane).\n * @api\n */\n Polygon.prototype.getArea = function getArea () {\n return linearRingsArea(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride);\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 * @override\n * @api\n */\n Polygon.prototype.getCoordinates = function getCoordinates (opt_right) {\n var flatCoordinates;\n if (opt_right !== undefined) {\n flatCoordinates = this.getOrientedFlatCoordinates().slice();\n orientLinearRings(\n flatCoordinates, 0, this.ends_, this.stride, opt_right);\n } else {\n flatCoordinates = this.flatCoordinates;\n }\n\n return inflateCoordinatesArray(\n flatCoordinates, 0, this.ends_, this.stride);\n };\n\n /**\n * @return {Array<number>} Ends.\n */\n Polygon.prototype.getEnds = function getEnds () {\n return this.ends_;\n };\n\n /**\n * @return {Array<number>} Interior point.\n */\n Polygon.prototype.getFlatInteriorPoint = function getFlatInteriorPoint () {\n if (this.flatInteriorPointRevision_ != this.getRevision()) {\n var flatCenter = getCenter(this.getExtent());\n this.flatInteriorPoint_ = getInteriorPointOfArray(\n this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride,\n flatCenter, 0);\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 Polygon.prototype.getInteriorPoint = function 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 Polygon.prototype.getLinearRingCount = function 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 Polygon.prototype.getLinearRing = function getLinearRing (index) {\n if (index < 0 || this.ends_.length <= index) {\n return null;\n }\n return new LinearRing(this.flatCoordinates.slice(\n index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]), this.layout);\n };\n\n /**\n * Return the linear rings of the polygon.\n * @return {Array<LinearRing>} Linear rings.\n * @api\n */\n Polygon.prototype.getLinearRings = function getLinearRings () {\n var layout = this.layout;\n var flatCoordinates = this.flatCoordinates;\n var ends = this.ends_;\n var linearRings = [];\n var offset = 0;\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n var linearRing = new LinearRing(flatCoordinates.slice(offset, end), layout);\n linearRings.push(linearRing);\n offset = end;\n }\n return linearRings;\n };\n\n /**\n * @return {Array<number>} Oriented flat coordinates.\n */\n Polygon.prototype.getOrientedFlatCoordinates = function getOrientedFlatCoordinates () {\n if (this.orientedRevision_ != this.getRevision()) {\n var flatCoordinates = this.flatCoordinates;\n if (linearRingIsOriented(\n flatCoordinates, 0, this.ends_, this.stride)) {\n this.orientedFlatCoordinates_ = flatCoordinates;\n } else {\n this.orientedFlatCoordinates_ = flatCoordinates.slice();\n this.orientedFlatCoordinates_.length =\n orientLinearRings(\n this.orientedFlatCoordinates_, 0, this.ends_, this.stride);\n }\n this.orientedRevision_ = this.getRevision();\n }\n return this.orientedFlatCoordinates_;\n };\n\n /**\n * @inheritDoc\n */\n Polygon.prototype.getSimplifiedGeometryInternal = function getSimplifiedGeometryInternal (squaredTolerance) {\n var simplifiedFlatCoordinates = [];\n var simplifiedEnds = [];\n simplifiedFlatCoordinates.length = quantizeArray(\n this.flatCoordinates, 0, this.ends_, this.stride,\n Math.sqrt(squaredTolerance),\n simplifiedFlatCoordinates, 0, simplifiedEnds);\n return new Polygon(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEnds);\n };\n\n /**\n * @inheritDoc\n * @api\n */\n Polygon.prototype.getType = function getType () {\n return GeometryType.POLYGON;\n };\n\n /**\n * @inheritDoc\n * @api\n */\n Polygon.prototype.intersectsExtent = function intersectsExtent (extent) {\n return intersectsLinearRingArray(\n this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, extent);\n };\n\n /**\n * Set the coordinates of the polygon.\n * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>} coordinates Coordinates.\n * @param {GeometryLayout=} opt_layout Layout.\n * @override\n * @api\n */\n Polygon.prototype.setCoordinates = function setCoordinates (coordinates, opt_layout) {\n this.setLayout(opt_layout, coordinates, 2);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n var ends = deflateCoordinatesArray(\n this.flatCoordinates, 0, coordinates, this.stride, this.ends_);\n this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n this.changed();\n };\n\n return Polygon;\n}(SimpleGeometry));\n\n\nexport default Polygon;\n\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 var n = opt_n ? opt_n : 32;\n /** @type {Array<number>} */\n var flatCoordinates = [];\n for (var i = 0; i < n; ++i) {\n extend(flatCoordinates, sphereOffset(center, radius, 2 * Math.PI * i / n, opt_sphereRadius));\n }\n flatCoordinates.push(flatCoordinates[0], flatCoordinates[1]);\n return new Polygon(flatCoordinates, GeometryLayout.XY, [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 var minX = extent[0];\n var minY = extent[1];\n var maxX = extent[2];\n var maxY = extent[3];\n var flatCoordinates =\n [minX, minY, minX, maxY, maxX, maxY, maxX, minY, minX, minY];\n return new Polygon(flatCoordinates, GeometryLayout.XY, [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 * radians. Default is 0.\n * @return {Polygon} Polygon geometry.\n * @api\n */\nexport function fromCircle(circle, opt_sides, opt_angle) {\n var sides = opt_sides ? opt_sides : 32;\n var stride = circle.getStride();\n var layout = circle.getLayout();\n var center = circle.getCenter();\n var arrayLength = stride * (sides + 1);\n var flatCoordinates = new Array(arrayLength);\n for (var i = 0; i < arrayLength; i += stride) {\n flatCoordinates[i] = 0;\n flatCoordinates[i + 1] = 0;\n for (var j = 2; j < stride; j++) {\n flatCoordinates[i + j] = center[j];\n }\n }\n var ends = [flatCoordinates.length];\n var polygon = new Polygon(flatCoordinates, layout, ends);\n makeRegular(polygon, center, circle.getRadius(), opt_angle);\n return polygon;\n}\n\n\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 * radians. Default is 0.\n */\nexport function makeRegular(polygon, center, radius, opt_angle) {\n var flatCoordinates = polygon.getFlatCoordinates();\n var stride = polygon.getStride();\n var sides = flatCoordinates.length / stride - 1;\n var startAngle = opt_angle ? opt_angle : 0;\n for (var i = 0; i <= sides; ++i) {\n var offset = i * stride;\n var angle = startAngle + (modulo(i, sides) * 2 * Math.PI / sides);\n flatCoordinates[offset] = center[0] + (radius * Math.cos(angle));\n flatCoordinates[offset + 1] = center[1] + (radius * Math.sin(angle));\n }\n polygon.changed();\n}\n\n//# sourceMappingURL=Polygon.js.map","/**\n * @module ol/View\n */\nimport {DEFAULT_TILE_SIZE} from './tilegrid/common.js';\nimport {getUid} from './util.js';\nimport {VOID} from './functions.js';\nimport {createExtent, none as centerNone} from './centerconstraint.js';\nimport BaseObject from './Object.js';\nimport {createSnapToResolutions, createSnapToPower} from './resolutionconstraint.js';\nimport {createSnapToZero, createSnapToN, none as rotationNone, disable} from './rotationconstraint.js';\nimport ViewHint from './ViewHint.js';\nimport ViewProperty from './ViewProperty.js';\nimport {linearFindNearest} from './array.js';\nimport {assert} from './asserts.js';\nimport {add as addCoordinate, rotate as rotateCoordinate, equals as coordinatesEqual} from './coordinate.js';\nimport {inAndOut} from './easing.js';\nimport {getForViewAndSize, getCenter, getHeight, getWidth, isEmpty} from './extent.js';\nimport GeometryType from './geom/GeometryType.js';\nimport {fromExtent as polygonFromExtent} from './geom/Polygon.js';\nimport {clamp, modulo} from './math.js';\nimport {assign} from './obj.js';\nimport {createProjection, METERS_PER_UNIT} from './proj.js';\nimport Units from './proj/Units.js';\n\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)} callback\n */\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/**\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} [constrainResolution=true] Constrain the resolution.\n * @property {boolean} [nearest=false] If `constrainResolution` is `true`, get\n * 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)} [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/**\n * @typedef {Object} ViewOptions\n * @property {import(\"./coordinate.js\").Coordinate} [center] The initial center for\n * the view. The coordinate system for the center is specified with the\n * `projection` option. Layer sources will not be fetched if this is not set,\n * 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 * center, in other words, center cannot be set outside this 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 {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. The initial\n * resolution is determined using the {@link #constrainResolution} method.\n * @property {number} [zoomFactor=2] The zoom factor used to determine the\n * resolution constraint.\n */\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 remained 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/**\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/**\n * Default min zoom level for the map view.\n * @type {number}\n */\nvar DEFAULT_MIN_ZOOM = 0;\n\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 * ### The view states\n *\n * An 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 * An 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 constraints\n *\n * `setCenter`, `setResolution` and `setRotation` can be used to change the\n * states of the view. Any value can be passed to the setters. And the value\n * that is passed to a setter will effectively be the value set in the view,\n * and returned by the corresponding getter.\n *\n * But a View object also has a *resolution constraint*, a\n * *rotation constraint* and a *center constraint*.\n *\n * As said above, no constraints are applied when the setters are used to set\n * new states for the view. Applying constraints is done explicitly through\n * the use of the `constrain*` functions (`constrainResolution` and\n * `constrainRotation` and `constrainCenter`).\n *\n * The main users of the constraints are the interactions and the\n * controls. For example, double-clicking on the map changes the view to\n * the \"next\" resolution. And releasing the fingers after pinch-zooming\n * snaps to the closest resolution (with an animation).\n *\n * The *resolution constraint* snaps to specific resolutions. It is\n * determined by the following options: `resolutions`, `maxResolution`,\n * `maxZoom`, and `zoomFactor`. If `resolutions` is set, the other three\n * options are ignored. See documentation for each option for more\n * information.\n *\n * The *rotation constraint* snaps to specific angles. It is determined\n * by the following options: `enableRotation` and `constrainRotation`.\n * By default the rotation 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 center is not constrained at all.\n *\n * @api\n */\nvar View = /*@__PURE__*/(function (BaseObject) {\n function View(opt_options) {\n BaseObject.call(this);\n\n var 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 this.updateAnimations_ = this.updateAnimations_.bind(this);\n\n /**\n * @private\n * @const\n * @type {import(\"./proj/Projection.js\").default}\n */\n this.projection_ = createProjection(options.projection, 'EPSG:3857');\n\n this.applyOptions_(options);\n }\n\n if ( BaseObject ) View.__proto__ = BaseObject;\n View.prototype = Object.create( BaseObject && BaseObject.prototype );\n View.prototype.constructor = View;\n\n /**\n * Set up the view with the given options.\n * @param {ViewOptions} options View options.\n */\n View.prototype.applyOptions_ = function applyOptions_ (options) {\n\n /**\n * @type {Object<string, *>}\n */\n var properties = {};\n properties[ViewProperty.CENTER] = options.center !== undefined ?\n options.center : null;\n\n var 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 * @private\n * @type {number}\n */\n this.minZoom_ = resolutionConstraintInfo.minZoom;\n\n var centerConstraint = createCenterConstraint(options);\n var resolutionConstraint = resolutionConstraintInfo.constraint;\n var 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 if (options.resolution !== undefined) {\n properties[ViewProperty.RESOLUTION] = options.resolution;\n } else if (options.zoom !== undefined) {\n properties[ViewProperty.RESOLUTION] = this.constrainResolution(\n this.maxResolution_, options.zoom - this.minZoom_);\n\n if (this.resolutions_) { // in case map zoom is out of min/max zoom range\n properties[ViewProperty.RESOLUTION] = clamp(\n Number(this.getResolution() || properties[ViewProperty.RESOLUTION]),\n this.minResolution_, this.maxResolution_);\n }\n }\n properties[ViewProperty.ROTATION] = options.rotation !== undefined ? options.rotation : 0;\n this.setProperties(properties);\n\n /**\n * @private\n * @type {ViewOptions}\n */\n this.options_ = options;\n\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 View.prototype.getUpdatedOptions_ = function getUpdatedOptions_ (newOptions) {\n var 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.getCenter();\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))} 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 View.prototype.animate = function animate (var_args) {\n var arguments$1 = arguments;\n\n var animationCount = arguments.length;\n var callback;\n if (animationCount > 1 && typeof arguments[animationCount - 1] === 'function') {\n callback = arguments[animationCount - 1];\n --animationCount;\n }\n if (!this.isDef()) {\n // if view properties are not yet set, shortcut to the final state\n var state = arguments[animationCount - 1];\n if (state.center) {\n this.setCenter(state.center);\n }\n if (state.zoom !== undefined) {\n this.setZoom(state.zoom);\n }\n if (state.rotation !== undefined) {\n this.setRotation(state.rotation);\n }\n if (callback) {\n animationCallback(callback, true);\n }\n return;\n }\n var start = Date.now();\n var center = this.getCenter().slice();\n var resolution = this.getResolution();\n var rotation = this.getRotation();\n var series = [];\n for (var i = 0; i < animationCount; ++i) {\n var options = /** @type {AnimationOptions} */ (arguments$1[i]);\n\n var animation = /** @type {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 });\n\n if (options.center) {\n animation.sourceCenter = center;\n animation.targetCenter = options.center;\n center = animation.targetCenter;\n }\n\n if (options.zoom !== undefined) {\n animation.sourceResolution = resolution;\n animation.targetResolution = this.constrainResolution(\n this.maxResolution_, options.zoom - this.minZoom_, 0);\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 var delta = modulo(options.rotation - rotation + Math.PI, 2 * Math.PI) - Math.PI;\n animation.targetRotation = rotation + delta;\n rotation = animation.targetRotation;\n }\n\n animation.callback = callback;\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 View.prototype.getAnimating = function 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 View.prototype.getInteracting = function getInteracting () {\n return this.hints_[ViewHint.INTERACTING] > 0;\n };\n\n /**\n * Cancel any ongoing animations.\n * @api\n */\n View.prototype.cancelAnimations = function cancelAnimations () {\n this.setHint(ViewHint.ANIMATING, -this.hints_[ViewHint.ANIMATING]);\n for (var i = 0, ii = this.animations_.length; i < ii; ++i) {\n var series = this.animations_[i];\n if (series[0].callback) {\n animationCallback(series[0].callback, false);\n }\n }\n this.animations_.length = 0;\n };\n\n /**\n * Update all animations.\n */\n View.prototype.updateAnimations_ = function updateAnimations_ () {\n if (this.updateAnimationKey_ !== undefined) {\n cancelAnimationFrame(this.updateAnimationKey_);\n this.updateAnimationKey_ = undefined;\n }\n if (!this.getAnimating()) {\n return;\n }\n var now = Date.now();\n var more = false;\n for (var i = this.animations_.length - 1; i >= 0; --i) {\n var series = this.animations_[i];\n var seriesComplete = true;\n for (var j = 0, jj = series.length; j < jj; ++j) {\n var animation = series[j];\n if (animation.complete) {\n continue;\n }\n var elapsed = now - animation.start;\n var fraction = animation.duration > 0 ? elapsed / animation.duration : 1;\n if (fraction >= 1) {\n animation.complete = true;\n fraction = 1;\n } else {\n seriesComplete = false;\n }\n var progress = animation.easing(fraction);\n if (animation.sourceCenter) {\n var x0 = animation.sourceCenter[0];\n var y0 = animation.sourceCenter[1];\n var x1 = animation.targetCenter[0];\n var y1 = animation.targetCenter[1];\n var x = x0 + progress * (x1 - x0);\n var y = y0 + progress * (y1 - y0);\n this.set(ViewProperty.CENTER, [x, y]);\n }\n if (animation.sourceResolution && animation.targetResolution) {\n var resolution = progress === 1 ?\n animation.targetResolution :\n animation.sourceResolution + progress * (animation.targetResolution - animation.sourceResolution);\n if (animation.anchor) {\n this.set(ViewProperty.CENTER,\n this.calculateCenterZoom(resolution, animation.anchor));\n }\n this.set(ViewProperty.RESOLUTION, resolution);\n }\n if (animation.sourceRotation !== undefined && animation.targetRotation !== undefined) {\n var rotation = progress === 1 ?\n modulo(animation.targetRotation + Math.PI, 2 * Math.PI) - Math.PI :\n animation.sourceRotation + progress * (animation.targetRotation - animation.sourceRotation);\n if (animation.anchor) {\n this.set(ViewProperty.CENTER,\n this.calculateCenterRotate(rotation, animation.anchor));\n }\n this.set(ViewProperty.ROTATION, rotation);\n }\n more = true;\n if (!animation.complete) {\n break;\n }\n }\n if (seriesComplete) {\n this.animations_[i] = null;\n this.setHint(ViewHint.ANIMATING, -1);\n var callback = series[0].callback;\n if (callback) {\n animationCallback(callback, true);\n }\n }\n }\n // prune completed series\n this.animations_ = this.animations_.filter(Boolean);\n if (more && this.updateAnimationKey_ === undefined) {\n this.updateAnimationKey_ = requestAnimationFrame(this.updateAnimations_);\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 View.prototype.calculateCenterRotate = function calculateCenterRotate (rotation, anchor) {\n var center;\n var currentCenter = this.getCenter();\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 View.prototype.calculateCenterZoom = function calculateCenterZoom (resolution, anchor) {\n var center;\n var currentCenter = this.getCenter();\n var currentResolution = this.getResolution();\n if (currentCenter !== undefined && currentResolution !== undefined) {\n var x = anchor[0] - resolution * (anchor[0] - currentCenter[0]) / currentResolution;\n var y = anchor[1] - resolution * (anchor[1] - currentCenter[1]) / currentResolution;\n center = [x, y];\n }\n return center;\n };\n\n /**\n * @private\n * @return {import(\"./size.js\").Size} Viewport size or `[100, 100]` when no viewport is found.\n */\n View.prototype.getSizeFromViewport_ = function getSizeFromViewport_ () {\n var size = [100, 100];\n var selector = '.ol-viewport[data-view=\"' + getUid(this) + '\"]';\n var element = document.querySelector(selector);\n if (element) {\n var metrics = getComputedStyle(element);\n size[0] = parseInt(metrics.width, 10);\n size[1] = parseInt(metrics.height, 10);\n }\n return size;\n };\n\n /**\n * Get the constrained center of this view.\n * @param {import(\"./coordinate.js\").Coordinate|undefined} center Center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Constrained center.\n * @api\n */\n View.prototype.constrainCenter = function constrainCenter (center) {\n return this.constraints_.center(center);\n };\n\n /**\n * Get the constrained resolution of this view.\n * @param {number|undefined} resolution Resolution.\n * @param {number=} opt_delta Delta. Default is `0`.\n * @param {number=} opt_direction Direction. Default is `0`.\n * @return {number|undefined} Constrained resolution.\n * @api\n */\n View.prototype.constrainResolution = function constrainResolution (resolution, opt_delta, opt_direction) {\n var delta = opt_delta || 0;\n var direction = opt_direction || 0;\n return this.constraints_.resolution(resolution, delta, direction);\n };\n\n /**\n * Get the constrained rotation of this view.\n * @param {number|undefined} rotation Rotation.\n * @param {number=} opt_delta Delta. Default is `0`.\n * @return {number|undefined} Constrained rotation.\n * @api\n */\n View.prototype.constrainRotation = function constrainRotation (rotation, opt_delta) {\n var delta = opt_delta || 0;\n return this.constraints_.rotation(rotation, delta);\n };\n\n /**\n * Get the view center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The center of the view.\n * @observable\n * @api\n */\n View.prototype.getCenter = function getCenter () {\n return (\n /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (this.get(ViewProperty.CENTER))\n );\n };\n\n /**\n * @return {Constraints} Constraints.\n */\n View.prototype.getConstraints = function getConstraints () {\n return this.constraints_;\n };\n\n /**\n * @param {Array<number>=} opt_hints Destination array.\n * @return {Array<number>} Hint.\n */\n View.prototype.getHints = function 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 of the\n * first map that uses this view will be used.\n * @return {import(\"./extent.js\").Extent} Extent.\n * @api\n */\n View.prototype.calculateExtent = function calculateExtent (opt_size) {\n var size = opt_size || this.getSizeFromViewport_();\n var center = /** @type {!import(\"./coordinate.js\").Coordinate} */ (this.getCenter());\n assert(center, 1); // The view center is not defined\n var resolution = /** @type {!number} */ (this.getResolution());\n assert(resolution !== undefined, 2); // The view resolution is not defined\n var rotation = /** @type {!number} */ (this.getRotation());\n assert(rotation !== undefined, 3); // The view rotation is not defined\n\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 View.prototype.getMaxResolution = function 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 View.prototype.getMinResolution = function 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 View.prototype.getMaxZoom = function getMaxZoom () {\n return /** @type {number} */ (this.getZoomForResolution(this.minResolution_));\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 View.prototype.setMaxZoom = function 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 View.prototype.getMinZoom = function getMinZoom () {\n return /** @type {number} */ (this.getZoomForResolution(this.maxResolution_));\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 View.prototype.setMinZoom = function setMinZoom (zoom) {\n this.applyOptions_(this.getUpdatedOptions_({minZoom: zoom}));\n };\n\n /**\n * Get the view projection.\n * @return {import(\"./proj/Projection.js\").default} The projection of the view.\n * @api\n */\n View.prototype.getProjection = function 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 View.prototype.getResolution = function 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 View.prototype.getResolutions = function 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 View.prototype.getResolutionForExtent = function getResolutionForExtent (extent, opt_size) {\n var size = opt_size || this.getSizeFromViewport_();\n var xResolution = getWidth(extent) / size[0];\n var 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 View.prototype.getResolutionForValueFunction = function getResolutionForValueFunction (opt_power) {\n var power = opt_power || 2;\n var maxResolution = this.maxResolution_;\n var minResolution = this.minResolution_;\n var max = Math.log(maxResolution / minResolution) / Math.log(power);\n return (\n /**\n * @param {number} value Value.\n * @return {number} Resolution.\n */\n function(value) {\n var resolution = maxResolution / Math.pow(power, value * max);\n return resolution;\n });\n };\n\n /**\n * Get the view rotation.\n * @return {number} The rotation of the view in radians.\n * @observable\n * @api\n */\n View.prototype.getRotation = function 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 View.prototype.getValueForResolutionFunction = function getValueForResolutionFunction (opt_power) {\n var power = opt_power || 2;\n var maxResolution = this.maxResolution_;\n var minResolution = this.minResolution_;\n var max = Math.log(maxResolution / minResolution) / Math.log(power);\n return (\n /**\n * @param {number} resolution Resolution.\n * @return {number} Value.\n */\n function(resolution) {\n var value = (Math.log(maxResolution / resolution) / Math.log(power)) / max;\n return value;\n });\n };\n\n /**\n * @param {number} pixelRatio Pixel ratio for center rounding.\n * @return {State} View state.\n */\n View.prototype.getState = function getState (pixelRatio) {\n var center = /** @type {import(\"./coordinate.js\").Coordinate} */ (this.getCenter());\n var projection = this.getProjection();\n var resolution = /** @type {number} */ (this.getResolution());\n var pixelResolution = resolution / pixelRatio;\n var rotation = this.getRotation();\n return (\n /** @type {State} */ ({\n center: [\n Math.round(center[0] / pixelResolution) * pixelResolution,\n Math.round(center[1] / pixelResolution) * pixelResolution\n ],\n projection: projection !== undefined ? projection : null,\n resolution: resolution,\n rotation: rotation,\n zoom: this.getZoom()\n })\n );\n };\n\n /**\n * Get the current zoom level. If you configured your view with a resolutions\n * array (this is rare), this method may return non-integer zoom levels (so\n * the zoom level is not safe to use as an index into a resolutions array).\n * @return {number|undefined} Zoom.\n * @api\n */\n View.prototype.getZoom = function getZoom () {\n var zoom;\n var 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 View.prototype.getZoomForResolution = function getZoomForResolution (resolution) {\n var offset = this.minZoom_ || 0;\n var max, zoomFactor;\n if (this.resolutions_) {\n var nearest = linearFindNearest(this.resolutions_, resolution, 1);\n offset = nearest;\n max = this.resolutions_[nearest];\n if (nearest == this.resolutions_.length - 1) {\n zoomFactor = 2;\n } 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 View.prototype.getResolutionForZoom = function getResolutionForZoom (zoom) {\n return /** @type {number} */ (this.constrainResolution(\n this.maxResolution_, zoom - this.minZoom_, 0));\n };\n\n /**\n * Fit the given geometry or extent based on the given map size and border.\n * The size is pixel dimensions of the box to fit the extent into.\n * In most cases you will want to use the map size, that is `map.getSize()`.\n * Takes care of the map angle.\n * @param {import(\"./geom/SimpleGeometry.js\").default|import(\"./extent.js\").Extent} geometryOrExtent The geometry or\n * extent to fit the view to.\n * @param {FitOptions=} opt_options Options.\n * @api\n */\n View.prototype.fit = function fit (geometryOrExtent, opt_options) {\n var options = opt_options || {};\n var size = options.size;\n if (!size) {\n size = this.getSizeFromViewport_();\n }\n /** @type {import(\"./geom/SimpleGeometry.js\").default} */\n var geometry;\n assert(Array.isArray(geometryOrExtent) || typeof /** @type {?} */ (geometryOrExtent).getSimplifiedGeometry === 'function',\n 24); // Invalid extent or geometry provided as `geometry`\n if (Array.isArray(geometryOrExtent)) {\n assert(!isEmpty(geometryOrExtent),\n 25); // Cannot fit empty extent provided as `geometry`\n geometry = polygonFromExtent(geometryOrExtent);\n } else if (geometryOrExtent.getType() === GeometryType.CIRCLE) {\n geometryOrExtent = geometryOrExtent.getExtent();\n geometry = polygonFromExtent(geometryOrExtent);\n geometry.rotate(this.getRotation(), getCenter(geometryOrExtent));\n } else {\n geometry = geometryOrExtent;\n }\n\n var padding = options.padding !== undefined ? options.padding : [0, 0, 0, 0];\n var constrainResolution = options.constrainResolution !== undefined ?\n options.constrainResolution : true;\n var nearest = options.nearest !== undefined ? options.nearest : false;\n var minResolution;\n if (options.minResolution !== undefined) {\n minResolution = options.minResolution;\n } else if (options.maxZoom !== undefined) {\n minResolution = this.constrainResolution(\n this.maxResolution_, options.maxZoom - this.minZoom_, 0);\n } else {\n minResolution = 0;\n }\n var coords = geometry.getFlatCoordinates();\n\n // calculate rotated extent\n var rotation = this.getRotation();\n var cosAngle = Math.cos(-rotation);\n var sinAngle = Math.sin(-rotation);\n var minRotX = +Infinity;\n var minRotY = +Infinity;\n var maxRotX = -Infinity;\n var maxRotY = -Infinity;\n var stride = geometry.getStride();\n for (var i = 0, ii = coords.length; i < ii; i += stride) {\n var rotX = coords[i] * cosAngle - coords[i + 1] * sinAngle;\n var rotY = coords[i] * sinAngle + coords[i + 1] * cosAngle;\n minRotX = Math.min(minRotX, rotX);\n minRotY = Math.min(minRotY, rotY);\n maxRotX = Math.max(maxRotX, rotX);\n maxRotY = Math.max(maxRotY, rotY);\n }\n\n // calculate resolution\n var resolution = this.getResolutionForExtent(\n [minRotX, minRotY, maxRotX, maxRotY],\n [size[0] - padding[1] - padding[3], size[1] - padding[0] - padding[2]]);\n resolution = isNaN(resolution) ? minResolution :\n Math.max(resolution, minResolution);\n if (constrainResolution) {\n var constrainedResolution = this.constrainResolution(resolution, 0, 0);\n if (!nearest && constrainedResolution < resolution) {\n constrainedResolution = this.constrainResolution(\n constrainedResolution, -1, 0);\n }\n resolution = constrainedResolution;\n }\n\n // calculate center\n sinAngle = -sinAngle; // go back to original rotation\n var centerRotX = (minRotX + maxRotX) / 2;\n var centerRotY = (minRotY + maxRotY) / 2;\n centerRotX += (padding[1] - padding[3]) / 2 * resolution;\n centerRotY += (padding[0] - padding[2]) / 2 * resolution;\n var centerX = centerRotX * cosAngle - centerRotY * sinAngle;\n var centerY = centerRotY * cosAngle + centerRotX * sinAngle;\n var center = [centerX, centerY];\n var callback = options.callback ? options.callback : VOID;\n\n if (options.duration !== undefined) {\n this.animate({\n resolution: resolution,\n center: center,\n duration: options.duration,\n easing: options.easing\n }, callback);\n } else {\n this.setResolution(resolution);\n this.setCenter(center);\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 View.prototype.centerOn = function centerOn (coordinate, size, position) {\n // calculate rotated position\n var rotation = this.getRotation();\n var cosAngle = Math.cos(-rotation);\n var sinAngle = Math.sin(-rotation);\n var rotX = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n var rotY = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n var resolution = this.getResolution();\n rotX += (size[0] / 2 - position[0]) * resolution;\n rotY += (position[1] - size[1] / 2) * resolution;\n\n // go back to original angle\n sinAngle = -sinAngle; // go back to original rotation\n var centerX = rotX * cosAngle - rotY * sinAngle;\n var centerY = rotY * cosAngle + rotX * sinAngle;\n\n this.setCenter([centerX, centerY]);\n };\n\n /**\n * @return {boolean} Is defined.\n */\n View.prototype.isDef = function isDef () {\n return !!this.getCenter() && this.getResolution() !== undefined;\n };\n\n /**\n * Rotate the view around a given coordinate.\n * @param {number} rotation New rotation value for the view.\n * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The rotation center.\n * @api\n */\n View.prototype.rotate = function rotate (rotation, opt_anchor) {\n if (opt_anchor !== undefined) {\n var center = this.calculateCenterRotate(rotation, opt_anchor);\n this.setCenter(center);\n }\n this.setRotation(rotation);\n };\n\n /**\n * Set the center of the current view.\n * @param {import(\"./coordinate.js\").Coordinate|undefined} center The center of the view.\n * @observable\n * @api\n */\n View.prototype.setCenter = function setCenter (center) {\n this.set(ViewProperty.CENTER, center);\n if (this.getAnimating()) {\n this.cancelAnimations();\n }\n };\n\n /**\n * @param {ViewHint} hint Hint.\n * @param {number} delta Delta.\n * @return {number} New value.\n */\n View.prototype.setHint = function 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.\n * @param {number|undefined} resolution The resolution of the view.\n * @observable\n * @api\n */\n View.prototype.setResolution = function setResolution (resolution) {\n this.set(ViewProperty.RESOLUTION, resolution);\n if (this.getAnimating()) {\n this.cancelAnimations();\n }\n };\n\n /**\n * Set the rotation for this view.\n * @param {number} rotation The rotation of the view in radians.\n * @observable\n * @api\n */\n View.prototype.setRotation = function setRotation (rotation) {\n this.set(ViewProperty.ROTATION, rotation);\n if (this.getAnimating()) {\n this.cancelAnimations();\n }\n };\n\n /**\n * Zoom to a specific zoom level.\n * @param {number} zoom Zoom level.\n * @api\n */\n View.prototype.setZoom = function setZoom (zoom) {\n this.setResolution(this.getResolutionForZoom(zoom));\n };\n\n return View;\n}(BaseObject));\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/**\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 return createExtent(options.extent);\n } else {\n return centerNone;\n }\n}\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 var resolutionConstraint;\n var maxResolution;\n var minResolution;\n\n // TODO: move these to be ol constants\n // see https://github.com/openlayers/openlayers/issues/2076\n var defaultMaxZoom = 28;\n var defaultZoomFactor = 2;\n\n var minZoom = options.minZoom !== undefined ?\n options.minZoom : DEFAULT_MIN_ZOOM;\n\n var maxZoom = options.maxZoom !== undefined ?\n options.maxZoom : defaultMaxZoom;\n\n var zoomFactor = options.zoomFactor !== undefined ?\n options.zoomFactor : defaultZoomFactor;\n\n if (options.resolutions !== undefined) {\n var resolutions = options.resolutions;\n maxResolution = resolutions[minZoom];\n minResolution = resolutions[maxZoom] !== undefined ?\n resolutions[maxZoom] : resolutions[resolutions.length - 1];\n resolutionConstraint = createSnapToResolutions(\n resolutions);\n } else {\n // calculate the default min and max resolution\n var projection = createProjection(options.projection, 'EPSG:3857');\n var extent = projection.getExtent();\n var size = !extent ?\n // use an extent that can fit the whole world if need be\n 360 * METERS_PER_UNIT[Units.DEGREES] /\n projection.getMetersPerUnit() :\n Math.max(getWidth(extent), getHeight(extent));\n\n var defaultMaxResolution = size / DEFAULT_TILE_SIZE / Math.pow(\n defaultZoomFactor, DEFAULT_MIN_ZOOM);\n\n var defaultMinResolution = defaultMaxResolution / Math.pow(\n 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 = minZoom + Math.floor(\n Math.log(maxResolution / minResolution) / Math.log(zoomFactor));\n minResolution = maxResolution / Math.pow(zoomFactor, maxZoom - minZoom);\n\n resolutionConstraint = createSnapToPower(\n zoomFactor, maxResolution, maxZoom - minZoom);\n }\n return {constraint: resolutionConstraint, maxResolution: maxResolution,\n minResolution: minResolution, minZoom: minZoom, 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 var enableRotation = options.enableRotation !== undefined ?\n options.enableRotation : true;\n if (enableRotation) {\n var 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/**\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\nexport default View;\n\n//# sourceMappingURL=View.js.map","/**\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 SOURCE: 'source'\n};\n\n//# sourceMappingURL=Property.js.map","/**\n * @module ol/layer/Base\n */\nimport {abstract} from '../util.js';\nimport BaseObject from '../Object.js';\nimport LayerProperty from './Property.js';\nimport {clamp} from '../math.js';\nimport {assign} from '../obj.js';\n\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 */\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 */\nvar BaseLayer = /*@__PURE__*/(function (BaseObject) {\n function BaseLayer(options) {\n\n BaseObject.call(this);\n\n /**\n * @type {Object<string, *>}\n */\n var properties = assign({}, options);\n properties[LayerProperty.OPACITY] =\n options.opacity !== undefined ? options.opacity : 1;\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\n this.setProperties(properties);\n\n /**\n * @type {import(\"./Layer.js\").State}\n * @private\n */\n this.state_ = null;\n\n /**\n * The layer type.\n * @type {import(\"../LayerType.js\").default}\n * @protected;\n */\n this.type;\n\n }\n\n if ( BaseObject ) BaseLayer.__proto__ = BaseObject;\n BaseLayer.prototype = Object.create( BaseObject && BaseObject.prototype );\n BaseLayer.prototype.constructor = BaseLayer;\n\n /**\n * Get the layer type (used when creating a layer renderer).\n * @return {import(\"../LayerType.js\").default} The layer type.\n */\n BaseLayer.prototype.getType = function getType () {\n return this.type;\n };\n\n /**\n * @return {import(\"./Layer.js\").State} Layer state.\n */\n BaseLayer.prototype.getLayerState = function getLayerState () {\n /** @type {import(\"./Layer.js\").State} */\n var state = this.state_ || /** @type {?} */ ({\n layer: this,\n managed: true\n });\n state.opacity = clamp(this.getOpacity(), 0, 1);\n state.sourceState = this.getSourceState();\n state.visible = this.getVisible();\n state.extent = this.getExtent();\n state.zIndex = this.getZIndex() || 0;\n state.maxResolution = this.getMaxResolution();\n state.minResolution = Math.max(this.getMinResolution(), 0);\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 BaseLayer.prototype.getLayersArray = function 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 BaseLayer.prototype.getLayerStatesArray = function 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 BaseLayer.prototype.getExtent = function getExtent () {\n return (\n /** @type {import(\"../extent.js\").Extent|undefined} */ (this.get(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 BaseLayer.prototype.getMaxResolution = function 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 BaseLayer.prototype.getMinResolution = function getMinResolution () {\n return /** @type {number} */ (this.get(LayerProperty.MIN_RESOLUTION));\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 BaseLayer.prototype.getOpacity = function 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 BaseLayer.prototype.getSourceState = function 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 BaseLayer.prototype.getVisible = function 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 BaseLayer.prototype.getZIndex = function 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 BaseLayer.prototype.setExtent = function 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 BaseLayer.prototype.setMaxResolution = function 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 BaseLayer.prototype.setMinResolution = function setMinResolution (minResolution) {\n this.set(LayerProperty.MIN_RESOLUTION, minResolution);\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 BaseLayer.prototype.setOpacity = function setOpacity (opacity) {\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 BaseLayer.prototype.setVisible = function 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 BaseLayer.prototype.setZIndex = function setZIndex (zindex) {\n this.set(LayerProperty.Z_INDEX, zindex);\n };\n\n return BaseLayer;\n}(BaseObject));\n\n\nexport default BaseLayer;\n\n//# sourceMappingURL=Base.js.map","/**\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//# sourceMappingURL=State.js.map","/**\n * @module ol/layer/Group\n */\nimport {getUid} from '../util.js';\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport {getChangeEventType} from '../Object.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport {assert} from '../asserts.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {getIntersection} from '../extent.js';\nimport BaseLayer from './Base.js';\nimport {assign, clear} from '../obj.js';\nimport SourceState from '../source/State.js';\n\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 {Array<import(\"./Base.js\").default>|import(\"../Collection.js\").default<import(\"./Base.js\").default>} [layers] Child layers.\n */\n\n\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n LAYERS: 'layers'\n};\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 */\nvar LayerGroup = /*@__PURE__*/(function (BaseLayer) {\n function LayerGroup(opt_options) {\n\n var options = opt_options || {};\n var baseOptions = /** @type {Options} */ (assign({}, options));\n delete baseOptions.layers;\n\n var layers = options.layers;\n\n BaseLayer.call(this, 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 listen(this,\n getChangeEventType(Property.LAYERS),\n this.handleLayersChanged_, this);\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',\n 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 if ( BaseLayer ) LayerGroup.__proto__ = BaseLayer;\n LayerGroup.prototype = Object.create( BaseLayer && BaseLayer.prototype );\n LayerGroup.prototype.constructor = LayerGroup;\n\n /**\n * @private\n */\n LayerGroup.prototype.handleLayerChange_ = function handleLayerChange_ () {\n this.changed();\n };\n\n /**\n * @private\n */\n LayerGroup.prototype.handleLayersChanged_ = function handleLayersChanged_ () {\n this.layersListenerKeys_.forEach(unlistenByKey);\n this.layersListenerKeys_.length = 0;\n\n var 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 (var id in this.listenerKeys_) {\n this.listenerKeys_[id].forEach(unlistenByKey);\n }\n clear(this.listenerKeys_);\n\n var layersArray = layers.getArray();\n for (var i = 0, ii = layersArray.length; i < ii; i++) {\n var layer = layersArray[i];\n this.listenerKeys_[getUid(layer)] = [\n listen(layer, ObjectEventType.PROPERTYCHANGE, this.handleLayerChange_, this),\n listen(layer, EventType.CHANGE, this.handleLayerChange_, this)\n ];\n }\n\n this.changed();\n };\n\n /**\n * @param {import(\"../Collection.js\").CollectionEvent} collectionEvent CollectionEvent.\n * @private\n */\n LayerGroup.prototype.handleLayersAdd_ = function handleLayersAdd_ (collectionEvent) {\n var layer = /** @type {import(\"./Base.js\").default} */ (collectionEvent.element);\n this.listenerKeys_[getUid(layer)] = [\n listen(layer, ObjectEventType.PROPERTYCHANGE, this.handleLayerChange_, this),\n listen(layer, EventType.CHANGE, this.handleLayerChange_, this)\n ];\n this.changed();\n };\n\n /**\n * @param {import(\"../Collection.js\").CollectionEvent} collectionEvent CollectionEvent.\n * @private\n */\n LayerGroup.prototype.handleLayersRemove_ = function handleLayersRemove_ (collectionEvent) {\n var layer = /** @type {import(\"./Base.js\").default} */ (collectionEvent.element);\n var key = getUid(layer);\n this.listenerKeys_[key].forEach(unlistenByKey);\n delete this.listenerKeys_[key];\n this.changed();\n };\n\n /**\n * Returns the {@link module:ol/Collection collection} of {@link module:ol/layer/Layer~Layer layers}\n * in this group.\n * @return {!import(\"../Collection.js\").default<import(\"./Base.js\").default>} Collection of\n * {@link module:ol/layer/Base layers} that are part of this group.\n * @observable\n * @api\n */\n LayerGroup.prototype.getLayers = function getLayers () {\n return (\n /** @type {!import(\"../Collection.js\").default<import(\"./Base.js\").default>} */ (this.get(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 LayerGroup.prototype.setLayers = function setLayers (layers) {\n this.set(Property.LAYERS, layers);\n };\n\n /**\n * @inheritDoc\n */\n LayerGroup.prototype.getLayersArray = function getLayersArray (opt_array) {\n var array = opt_array !== undefined ? opt_array : [];\n this.getLayers().forEach(function(layer) {\n layer.getLayersArray(array);\n });\n return array;\n };\n\n /**\n * @inheritDoc\n */\n LayerGroup.prototype.getLayerStatesArray = function getLayerStatesArray (opt_states) {\n var states = opt_states !== undefined ? opt_states : [];\n\n var pos = states.length;\n\n this.getLayers().forEach(function(layer) {\n layer.getLayerStatesArray(states);\n });\n\n var ownLayerState = this.getLayerState();\n for (var i = pos, ii = states.length; i < ii; i++) {\n var layerState = states[i];\n layerState.opacity *= ownLayerState.opacity;\n layerState.visible = layerState.visible && ownLayerState.visible;\n layerState.maxResolution = Math.min(\n layerState.maxResolution, ownLayerState.maxResolution);\n layerState.minResolution = Math.max(\n layerState.minResolution, ownLayerState.minResolution);\n if (ownLayerState.extent !== undefined) {\n if (layerState.extent !== undefined) {\n layerState.extent = getIntersection(layerState.extent, ownLayerState.extent);\n } else {\n layerState.extent = ownLayerState.extent;\n }\n }\n }\n\n return states;\n };\n\n /**\n * @inheritDoc\n */\n LayerGroup.prototype.getSourceState = function getSourceState () {\n return SourceState.READY;\n };\n\n return LayerGroup;\n}(BaseLayer));\n\n\nexport default LayerGroup;\n\n//# sourceMappingURL=Group.js.map","/**\n * @module ol/size\n */\n\n\n/**\n * An array of numbers representing a size: `[width, height]`.\n * @typedef {Array<number>} Size\n * @api\n */\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/**\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/**\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/**\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] = opt_size[1] = /** @type {number} */ (size);\n }\n return opt_size;\n }\n}\n\n//# sourceMappingURL=size.js.map","/**\n * @module ol/PluggableMap\n */\nimport {getUid} from './util.js';\nimport Collection from './Collection.js';\nimport CollectionEventType from './CollectionEventType.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 RenderEventType from './render/EventType.js';\nimport BaseObject, {getChangeEventType} from './Object.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport TileQueue from './TileQueue.js';\nimport View from './View.js';\nimport ViewHint from './ViewHint.js';\nimport {assert} from './asserts.js';\nimport {removeNode} from './dom.js';\nimport {listen, unlistenByKey, unlisten} from './events.js';\nimport {stopPropagation} from './events/Event.js';\nimport EventType from './events/EventType.js';\nimport {createEmpty, clone, createOrUpdateEmpty, equals, getForViewAndSize, isEmpty} from './extent.js';\nimport {TRUE} from './functions.js';\nimport {DEVICE_PIXEL_RATIO, TOUCH} from './has.js';\nimport LayerGroup from './layer/Group.js';\nimport {hasArea} from './size.js';\nimport {DROP} from './structs/PriorityQueue.js';\nimport {create as createTransform, apply as applyTransform} from './transform.js';\n\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 {null|import(\"./extent.js\").Extent} extent\n * @property {import(\"./coordinate.js\").Coordinate} focus\n * @property {number} index\n * @property {Object<string, import(\"./layer/Layer.js\").State>} layerStates\n * @property {Array<import(\"./layer/Layer.js\").State>} layerStatesArray\n * @property {import(\"./transform.js\").Transform} pixelToCoordinateTransform\n * @property {Array<PostRenderFunction>} postRenderFunctions\n * @property {import(\"./size.js\").Size} size\n * @property {!Object<string, boolean>} skippedFeatureUids\n * @property {TileQueue} tileQueue\n * @property {Object<string, Object<string, import(\"./TileRange.js\").default>>} usedTiles\n * @property {Array<number>} viewHints\n * @property {!Object<string, Object<string, boolean>>} wantedTiles\n */\n\n\n/**\n * @typedef {function(PluggableMap, ?FrameState): boolean} PostRenderFunction\n */\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 pixels. Pixels\n * inside the radius around the given position will be checked for features. This only\n * works for the canvas renderer and not for WebGL.\n */\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/**\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 {boolean} [loadTilesWhileAnimating=false] When set to `true`, tiles\n * will be loaded during animations. This may improve the user experience, but\n * can also make animations stutter on devices with slow memory.\n * @property {boolean} [loadTilesWhileInteracting=false] When set to `true`,\n * tiles will be loaded while interacting with the map. This may improve the\n * user experience, but can also make map panning and zooming choppy on devices\n * with slow memory.\n * @property {number} [moveTolerance=1] The minimum distance in pixels the\n * cursor must move to be detected as a map move event instead of a click.\n * Increasing this value can make it easier to click on the map.\n * @property {Collection<import(\"./Overlay.js\").default>|Array<import(\"./Overlay.js\").default>} [overlays]\n * Overlays initially added to the map. By default, no overlays are added.\n * @property {HTMLElement|string} [target] The container for the map, either the\n * element itself or the `id` of the element. If not specified at construction\n * time, {@link module:ol/Map~Map#setTarget} must be called for the map to be\n * rendered.\n * @property {View} [view] The map's view. No layer sources will be\n * fetched unless this is specified at construction time or through\n * {@link module:ol/Map~Map#setView}.\n */\n\n\n/**\n * @fires import(\"./MapBrowserEvent.js\").MapBrowserEvent\n * @fires import(\"./MapEvent.js\").MapEvent\n * @fires module:ol/render/Event~RenderEvent#postcompose\n * @fires module:ol/render/Event~RenderEvent#precompose\n * @fires module:ol/render/Event~RenderEvent#rendercomplete\n * @api\n */\nvar PluggableMap = /*@__PURE__*/(function (BaseObject) {\n function PluggableMap(options) {\n\n BaseObject.call(this);\n\n var optionsInternal = createOptionsInternal(options);\n\n /**\n * @type {number}\n * @private\n */\n this.maxTilesLoading_ = options.maxTilesLoading !== undefined ? options.maxTilesLoading : 16;\n\n /**\n * @type {boolean}\n * @private\n */\n this.loadTilesWhileAnimating_ =\n options.loadTilesWhileAnimating !== undefined ?\n options.loadTilesWhileAnimating : false;\n\n /**\n * @type {boolean}\n * @private\n */\n this.loadTilesWhileInteracting_ =\n options.loadTilesWhileInteracting !== undefined ?\n options.loadTilesWhileInteracting : false;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = options.pixelRatio !== undefined ?\n options.pixelRatio : DEVICE_PIXEL_RATIO;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.animationDelayKey_;\n\n /**\n * @private\n */\n this.animationDelay_ = function() {\n this.animationDelayKey_ = undefined;\n this.renderFrame_.call(this, 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 = 'ol-viewport' + (TOUCH ? ' 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 // prevent page zoom on IE >= 10 browsers\n this.viewport_.style.msTouchAction = 'none';\n this.viewport_.style.touchAction = 'none';\n\n /**\n * @private\n * @type {!HTMLElement}\n */\n this.overlayContainer_ = document.createElement('div');\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_.className = 'ol-overlaycontainer-stopevent';\n var overlayEvents = [\n EventType.CLICK,\n EventType.DBLCLICK,\n EventType.MOUSEDOWN,\n EventType.TOUCHSTART,\n EventType.MSPOINTERDOWN,\n MapBrowserEventType.POINTERDOWN,\n EventType.MOUSEWHEEL,\n EventType.WHEEL\n ];\n for (var i = 0, ii = overlayEvents.length; i < ii; ++i) {\n listen(this.overlayContainerStopEvent_, overlayEvents[i], stopPropagation);\n }\n this.viewport_.appendChild(this.overlayContainerStopEvent_);\n\n /**\n * @private\n * @type {MapBrowserEventHandler}\n */\n this.mapBrowserEventHandler_ = new MapBrowserEventHandler(this, options.moveTolerance);\n for (var key in MapBrowserEventType) {\n listen(this.mapBrowserEventHandler_, MapBrowserEventType[key],\n this.handleMapBrowserEvent, this);\n }\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 listen(this.viewport_, EventType.CONTEXTMENU, this.handleBrowserEvent, this);\n listen(this.viewport_, EventType.WHEEL, this.handleBrowserEvent, this);\n listen(this.viewport_, EventType.MOUSEWHEEL, this.handleBrowserEvent, this);\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_ = this.createRenderer();\n\n /**\n * @type {function(Event)|undefined}\n * @private\n */\n this.handleResize_;\n\n /**\n * @private\n * @type {import(\"./coordinate.js\").Coordinate}\n */\n this.focus_ = null;\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 * Uids of features to skip at rendering time.\n * @type {Object<string, boolean>}\n * @private\n */\n this.skippedFeatureUids_ = {};\n\n listen(\n this, getChangeEventType(MapProperty.LAYERGROUP),\n this.handleLayerGroupChanged_, this);\n listen(this, getChangeEventType(MapProperty.VIEW),\n this.handleViewChanged_, this);\n listen(this, getChangeEventType(MapProperty.SIZE),\n this.handleSizeChanged_, this);\n listen(this, getChangeEventType(MapProperty.TARGET),\n this.handleTargetChanged_, this);\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 listen(this.controls, CollectionEventType.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function(event) {\n event.element.setMap(this);\n }, this);\n\n listen(this.controls, CollectionEventType.REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function(event) {\n event.element.setMap(null);\n }, this);\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 listen(this.interactions, CollectionEventType.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function(event) {\n event.element.setMap(this);\n }, this);\n\n listen(this.interactions, CollectionEventType.REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function(event) {\n event.element.setMap(null);\n }, this);\n\n this.overlays_.forEach(this.addOverlayInternal_.bind(this));\n\n listen(this.overlays_, CollectionEventType.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function(event) {\n this.addOverlayInternal_(/** @type {import(\"./Overlay.js\").default} */ (event.element));\n }, this);\n\n listen(this.overlays_, CollectionEventType.REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function(event) {\n var overlay = /** @type {import(\"./Overlay.js\").default} */ (event.element);\n var id = overlay.getId();\n if (id !== undefined) {\n delete this.overlayIdIndex_[id.toString()];\n }\n event.element.setMap(null);\n }, this);\n\n }\n\n if ( BaseObject ) PluggableMap.__proto__ = BaseObject;\n PluggableMap.prototype = Object.create( BaseObject && BaseObject.prototype );\n PluggableMap.prototype.constructor = PluggableMap;\n\n /**\n * @abstract\n * @return {import(\"./renderer/Map.js\").default} The map renderer\n */\n PluggableMap.prototype.createRenderer = function 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 PluggableMap.prototype.addControl = function addControl (control) {\n this.getControls().push(control);\n };\n\n /**\n * Add the given interaction to the map.\n * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to add.\n * @api\n */\n PluggableMap.prototype.addInteraction = function 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 PluggableMap.prototype.addLayer = function addLayer (layer) {\n var 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 PluggableMap.prototype.addOverlay = function 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 PluggableMap.prototype.addOverlayInternal_ = function addOverlayInternal_ (overlay) {\n var id = overlay.getId();\n if (id !== undefined) {\n this.overlayIdIndex_[id.toString()] = overlay;\n }\n overlay.setMap(this);\n };\n\n /**\n *\n * @inheritDoc\n */\n PluggableMap.prototype.disposeInternal = function disposeInternal () {\n this.mapBrowserEventHandler_.dispose();\n unlisten(this.viewport_, EventType.CONTEXTMENU, this.handleBrowserEvent, this);\n unlisten(this.viewport_, EventType.WHEEL, this.handleBrowserEvent, this);\n unlisten(this.viewport_, EventType.MOUSEWHEEL, this.handleBrowserEvent, this);\n if (this.handleResize_ !== undefined) {\n removeEventListener(EventType.RESIZE, this.handleResize_, false);\n this.handleResize_ = undefined;\n }\n if (this.animationDelayKey_) {\n cancelAnimationFrame(this.animationDelayKey_);\n this.animationDelayKey_ = undefined;\n }\n this.setTarget(null);\n BaseObject.prototype.disposeInternal.call(this);\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(this: S, import(\"./Feature.js\").FeatureLike,\n * import(\"./layer/Layer.js\").default): T} callback Feature callback. The callback will be\n * called with two arguments. The first argument is one\n * {@link module:ol/Feature feature} or\n * {@link module:ol/render/Feature render feature} at the pixel, the second is\n * the {@link module:ol/layer/Layer layer} of the feature and will be null for\n * unmanaged layers. To stop detection, callback functions can return a\n * truthy value.\n * @param {AtPixelOptions=} opt_options Optional options.\n * @return {T|undefined} Callback result, i.e. the return value of last\n * callback execution, or the first truthy callback return value.\n * @template S,T\n * @api\n */\n PluggableMap.prototype.forEachFeatureAtPixel = function forEachFeatureAtPixel (pixel, callback, opt_options) {\n if (!this.frameState_) {\n return;\n }\n var coordinate = this.getCoordinateFromPixel(pixel);\n opt_options = opt_options !== undefined ? opt_options :\n /** @type {AtPixelOptions} */ ({});\n var hitTolerance = opt_options.hitTolerance !== undefined ?\n opt_options.hitTolerance * this.frameState_.pixelRatio : 0;\n var layerFilter = opt_options.layerFilter !== undefined ?\n opt_options.layerFilter : TRUE;\n return this.renderer_.forEachFeatureAtCoordinate(\n coordinate, this.frameState_, hitTolerance, callback, null,\n layerFilter, null);\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 * `null` if none were found.\n * @api\n */\n PluggableMap.prototype.getFeaturesAtPixel = function getFeaturesAtPixel (pixel, opt_options) {\n var features = null;\n this.forEachFeatureAtPixel(pixel, function(feature) {\n if (!features) {\n features = [];\n }\n features.push(feature);\n }, opt_options);\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 * @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 PluggableMap.prototype.forEachLayerAtPixel = function forEachLayerAtPixel (pixel, callback, opt_options) {\n if (!this.frameState_) {\n return;\n }\n var options = opt_options || /** @type {AtPixelOptions} */ ({});\n var hitTolerance = options.hitTolerance !== undefined ?\n opt_options.hitTolerance * this.frameState_.pixelRatio : 0;\n var layerFilter = options.layerFilter || TRUE;\n return this.renderer_.forEachLayerAtPixel(\n pixel, this.frameState_, hitTolerance, callback, null, layerFilter, null);\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 * @template U\n * @api\n */\n PluggableMap.prototype.hasFeatureAtPixel = function hasFeatureAtPixel (pixel, opt_options) {\n if (!this.frameState_) {\n return false;\n }\n var coordinate = this.getCoordinateFromPixel(pixel);\n opt_options = opt_options !== undefined ? opt_options :\n /** @type {AtPixelOptions} */ ({});\n var layerFilter = opt_options.layerFilter !== undefined ? opt_options.layerFilter : TRUE;\n var hitTolerance = opt_options.hitTolerance !== undefined ?\n opt_options.hitTolerance * this.frameState_.pixelRatio : 0;\n return this.renderer_.hasFeatureAtCoordinate(\n coordinate, this.frameState_, hitTolerance, layerFilter, null);\n };\n\n /**\n * Returns the coordinate in view projection for a browser event.\n * @param {Event} event Event.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n * @api\n */\n PluggableMap.prototype.getEventCoordinate = function getEventCoordinate (event) {\n return this.getCoordinateFromPixel(this.getEventPixel(event));\n };\n\n /**\n * Returns the map pixel position for a browser event relative to the viewport.\n * @param {Event|TouchEvent} event Event.\n * @return {import(\"./pixel.js\").Pixel} Pixel.\n * @api\n */\n PluggableMap.prototype.getEventPixel = function getEventPixel (event) {\n var viewportPosition = this.viewport_.getBoundingClientRect();\n var eventPosition = '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 PluggableMap.prototype.getTarget = function getTarget () {\n return /** @type {HTMLElement|string|undefined} */ (this.get(MapProperty.TARGET));\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 PluggableMap.prototype.getTargetElement = function getTargetElement () {\n var target = this.getTarget();\n if (target !== undefined) {\n return typeof target === 'string' ? document.getElementById(target) : 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 * 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 * @api\n */\n PluggableMap.prototype.getCoordinateFromPixel = function getCoordinateFromPixel (pixel) {\n var frameState = this.frameState_;\n if (!frameState) {\n return null;\n } else {\n return applyTransform(frameState.pixelToCoordinateTransform, pixel.slice());\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 PluggableMap.prototype.getControls = function 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 PluggableMap.prototype.getOverlays = function 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 PluggableMap.prototype.getOverlayById = function getOverlayById (id) {\n var 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 PluggableMap.prototype.getInteractions = function 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 PluggableMap.prototype.getLayerGroup = function getLayerGroup () {\n return (\n /** @type {LayerGroup} */ (this.get(MapProperty.LAYERGROUP))\n );\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 PluggableMap.prototype.getLayers = function getLayers () {\n var layers = this.getLayerGroup().getLayers();\n return layers;\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 * @api\n */\n PluggableMap.prototype.getPixelFromCoordinate = function getPixelFromCoordinate (coordinate) {\n var frameState = this.frameState_;\n if (!frameState) {\n return null;\n } else {\n return applyTransform(frameState.coordinateToPixelTransform, coordinate.slice(0, 2));\n }\n };\n\n /**\n * Get the map renderer.\n * @return {import(\"./renderer/Map.js\").default} Renderer\n */\n PluggableMap.prototype.getRenderer = function 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 PluggableMap.prototype.getSize = function getSize () {\n return (\n /** @type {import(\"./size.js\").Size|undefined} */ (this.get(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 PluggableMap.prototype.getView = function getView () {\n return (\n /** @type {View} */ (this.get(MapProperty.VIEW))\n );\n };\n\n /**\n * Get the element that serves as the map viewport.\n * @return {HTMLElement} Viewport.\n * @api\n */\n PluggableMap.prototype.getViewport = function 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 PluggableMap.prototype.getOverlayContainer = function 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 PluggableMap.prototype.getOverlayContainerStopEvent = function getOverlayContainerStopEvent () {\n return this.overlayContainerStopEvent_;\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 PluggableMap.prototype.getTilePriority = function getTilePriority (tile, tileSourceKey, tileCenter, tileResolution) {\n // Filter out tiles at higher zoom levels than the current zoom level, or that\n // are outside the visible extent.\n var frameState = this.frameState_;\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\n // between the center of the tile and the focus. The factor of 65536 means\n // that the prioritization should behave as desired for tiles up to\n // 65536 * Math.log(2) = 45426 pixels from the focus.\n var deltaX = tileCenter[0] - frameState.focus[0];\n var deltaY = tileCenter[1] - frameState.focus[1];\n return 65536 * Math.log(tileResolution) +\n Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution;\n };\n\n /**\n * @param {Event} browserEvent Browser event.\n * @param {string=} opt_type Type.\n */\n PluggableMap.prototype.handleBrowserEvent = function handleBrowserEvent (browserEvent, opt_type) {\n var type = opt_type || browserEvent.type;\n var mapBrowserEvent = new MapBrowserEvent(type, this, browserEvent);\n this.handleMapBrowserEvent(mapBrowserEvent);\n };\n\n /**\n * @param {MapBrowserEvent} mapBrowserEvent The event to handle.\n */\n PluggableMap.prototype.handleMapBrowserEvent = function 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 this.focus_ = mapBrowserEvent.coordinate;\n mapBrowserEvent.frameState = this.frameState_;\n var interactionsArray = this.getInteractions().getArray();\n if (this.dispatchEvent(mapBrowserEvent) !== false) {\n for (var i = interactionsArray.length - 1; i >= 0; i--) {\n var interaction = interactionsArray[i];\n if (!interaction.getActive()) {\n continue;\n }\n var cont = interaction.handleEvent(mapBrowserEvent);\n if (!cont) {\n break;\n }\n }\n }\n };\n\n /**\n * @protected\n */\n PluggableMap.prototype.handlePostRender = function handlePostRender () {\n\n var 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 var tileQueue = this.tileQueue_;\n if (!tileQueue.isEmpty()) {\n var maxTotalLoading = this.maxTilesLoading_;\n var maxNewLoads = maxTotalLoading;\n if (frameState) {\n var hints = frameState.viewHints;\n if (hints[ViewHint.ANIMATING]) {\n maxTotalLoading = this.loadTilesWhileAnimating_ ? 8 : 0;\n maxNewLoads = 2;\n }\n if (hints[ViewHint.INTERACTING]) {\n maxTotalLoading = this.loadTilesWhileInteracting_ ? 8 : 0;\n maxNewLoads = 2;\n }\n }\n if (tileQueue.getTilesLoading() < maxTotalLoading) {\n tileQueue.reprioritize(); // FIXME only call if view has changed\n tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads);\n }\n }\n if (frameState && this.hasListener(RenderEventType.RENDERCOMPLETE) && !frameState.animate &&\n !this.tileQueue_.getTilesLoading() && !getLoading(this.getLayers().getArray())) {\n this.renderer_.dispatchRenderEvent(RenderEventType.RENDERCOMPLETE, frameState);\n }\n\n var postRenderFunctions = this.postRenderFunctions_;\n for (var i = 0, ii = postRenderFunctions.length; i < ii; ++i) {\n postRenderFunctions[i](this, frameState);\n }\n postRenderFunctions.length = 0;\n };\n\n /**\n * @private\n */\n PluggableMap.prototype.handleSizeChanged_ = function handleSizeChanged_ () {\n this.render();\n };\n\n /**\n * @private\n */\n PluggableMap.prototype.handleTargetChanged_ = function 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 var targetElement;\n if (this.getTarget()) {\n targetElement = this.getTargetElement();\n }\n\n if (this.keyHandlerKeys_) {\n for (var i = 0, ii = this.keyHandlerKeys_.length; i < ii; ++i) {\n unlistenByKey(this.keyHandlerKeys_[i]);\n }\n this.keyHandlerKeys_ = null;\n }\n\n if (!targetElement) {\n this.renderer_.removeLayerRenderers();\n removeNode(this.viewport_);\n if (this.handleResize_ !== undefined) {\n removeEventListener(EventType.RESIZE, this.handleResize_, false);\n this.handleResize_ = undefined;\n }\n } else {\n targetElement.appendChild(this.viewport_);\n\n var keyboardEventTarget = !this.keyboardEventTarget_ ?\n targetElement : this.keyboardEventTarget_;\n this.keyHandlerKeys_ = [\n listen(keyboardEventTarget, EventType.KEYDOWN, this.handleBrowserEvent, this),\n listen(keyboardEventTarget, EventType.KEYPRESS, this.handleBrowserEvent, this)\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 PluggableMap.prototype.handleTileChange_ = function handleTileChange_ () {\n this.render();\n };\n\n /**\n * @private\n */\n PluggableMap.prototype.handleViewPropertyChanged_ = function handleViewPropertyChanged_ () {\n this.render();\n };\n\n /**\n * @private\n */\n PluggableMap.prototype.handleViewChanged_ = function 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 var view = this.getView();\n if (view) {\n this.viewport_.setAttribute('data-view', getUid(view));\n this.viewPropertyListenerKey_ = listen(\n view, ObjectEventType.PROPERTYCHANGE,\n this.handleViewPropertyChanged_, this);\n this.viewChangeListenerKey_ = listen(\n view, EventType.CHANGE,\n this.handleViewPropertyChanged_, this);\n }\n this.render();\n };\n\n /**\n * @private\n */\n PluggableMap.prototype.handleLayerGroupChanged_ = function handleLayerGroupChanged_ () {\n if (this.layerGroupPropertyListenerKeys_) {\n this.layerGroupPropertyListenerKeys_.forEach(unlistenByKey);\n this.layerGroupPropertyListenerKeys_ = null;\n }\n var layerGroup = this.getLayerGroup();\n if (layerGroup) {\n this.layerGroupPropertyListenerKeys_ = [\n listen(\n layerGroup, ObjectEventType.PROPERTYCHANGE,\n this.render, this),\n listen(\n layerGroup, EventType.CHANGE,\n this.render, this)\n ];\n }\n this.render();\n };\n\n /**\n * @return {boolean} Is rendered.\n */\n PluggableMap.prototype.isRendered = function isRendered () {\n return !!this.frameState_;\n };\n\n /**\n * Requests an immediate render in a synchronous manner.\n * @api\n */\n PluggableMap.prototype.renderSync = function renderSync () {\n if (this.animationDelayKey_) {\n cancelAnimationFrame(this.animationDelayKey_);\n }\n this.animationDelay_();\n };\n\n /**\n * Request a map rendering (at the next animation frame).\n * @api\n */\n PluggableMap.prototype.render = function render () {\n if (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 PluggableMap.prototype.removeControl = function 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 PluggableMap.prototype.removeInteraction = function 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 PluggableMap.prototype.removeLayer = function removeLayer (layer) {\n var 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 PluggableMap.prototype.removeOverlay = function removeOverlay (overlay) {\n return this.getOverlays().remove(overlay);\n };\n\n /**\n * @param {number} time Time.\n * @private\n */\n PluggableMap.prototype.renderFrame_ = function renderFrame_ (time) {\n var viewState;\n\n var size = this.getSize();\n var view = this.getView();\n var extent = createEmpty();\n var previousFrameState = this.frameState_;\n /** @type {?FrameState} */\n var frameState = null;\n if (size !== undefined && hasArea(size) && view && view.isDef()) {\n var viewHints = view.getHints(this.frameState_ ? this.frameState_.viewHints : undefined);\n var layerStatesArray = this.getLayerGroup().getLayerStatesArray();\n var layerStates = {};\n for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n layerStates[getUid(layerStatesArray[i].layer)] = layerStatesArray[i];\n }\n viewState = view.getState(this.pixelRatio_);\n frameState = /** @type {FrameState} */ ({\n animate: false,\n coordinateToPixelTransform: this.coordinateToPixelTransform_,\n extent: extent,\n focus: this.focus_ ? this.focus_ : viewState.center,\n index: this.frameIndex_++,\n layerStates: layerStates,\n layerStatesArray: layerStatesArray,\n pixelRatio: this.pixelRatio_,\n pixelToCoordinateTransform: this.pixelToCoordinateTransform_,\n postRenderFunctions: [],\n size: size,\n skippedFeatureUids: this.skippedFeatureUids_,\n tileQueue: this.tileQueue_,\n time: time,\n usedTiles: {},\n viewState: viewState,\n viewHints: viewHints,\n wantedTiles: {}\n });\n }\n\n if (frameState) {\n frameState.extent = getForViewAndSize(viewState.center,\n viewState.resolution, viewState.rotation, frameState.size, extent);\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(this.postRenderFunctions_, frameState.postRenderFunctions);\n\n if (previousFrameState) {\n var moveStart = !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 this.previousExtent_ = createOrUpdateEmpty(this.previousExtent_);\n }\n }\n\n var idle = 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(new MapEvent(MapEventType.MOVEEND, this, frameState));\n clone(frameState.extent, this.previousExtent_);\n }\n }\n\n this.dispatchEvent(new MapEvent(MapEventType.POSTRENDER, this, frameState));\n\n setTimeout(this.handlePostRender.bind(this), 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 PluggableMap.prototype.setLayerGroup = function 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 PluggableMap.prototype.setSize = function 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 PluggableMap.prototype.setTarget = function 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 PluggableMap.prototype.setView = function setView (view) {\n this.set(MapProperty.VIEW, view);\n };\n\n /**\n * @param {import(\"./Feature.js\").default} feature Feature.\n */\n PluggableMap.prototype.skipFeature = function skipFeature (feature) {\n this.skippedFeatureUids_[getUid(feature)] = true;\n this.render();\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 PluggableMap.prototype.updateSize = function updateSize () {\n var targetElement = this.getTargetElement();\n\n if (!targetElement) {\n this.setSize(undefined);\n } else {\n var computedStyle = getComputedStyle(targetElement);\n this.setSize([\n targetElement.offsetWidth -\n parseFloat(computedStyle['borderLeftWidth']) -\n parseFloat(computedStyle['paddingLeft']) -\n parseFloat(computedStyle['paddingRight']) -\n parseFloat(computedStyle['borderRightWidth']),\n targetElement.offsetHeight -\n parseFloat(computedStyle['borderTopWidth']) -\n parseFloat(computedStyle['paddingTop']) -\n parseFloat(computedStyle['paddingBottom']) -\n parseFloat(computedStyle['borderBottomWidth'])\n ]);\n }\n };\n\n /**\n * @param {import(\"./Feature.js\").default} feature Feature.\n */\n PluggableMap.prototype.unskipFeature = function unskipFeature (feature) {\n delete this.skippedFeatureUids_[getUid(feature)];\n this.render();\n };\n\n return PluggableMap;\n}(BaseObject));\n\n\n/**\n * @param {MapOptions} options Map options.\n * @return {MapOptionsInternal} Internal map options.\n */\nfunction createOptionsInternal(options) {\n\n /**\n * @type {HTMLElement|Document}\n */\n var keyboardEventTarget = null;\n if (options.keyboardEventTarget !== undefined) {\n keyboardEventTarget = typeof options.keyboardEventTarget === 'string' ?\n document.getElementById(options.keyboardEventTarget) :\n options.keyboardEventTarget;\n }\n\n /**\n * @type {Object<string, *>}\n */\n var values = {};\n\n var layerGroup = options.layers && typeof /** @type {?} */ (options.layers).getLayers === 'function' ?\n /** @type {LayerGroup} */ (options.layers) : new LayerGroup({layers: /** @type {Collection} */ (options.layers)});\n values[MapProperty.LAYERGROUP] = layerGroup;\n\n values[MapProperty.TARGET] = options.target;\n\n values[MapProperty.VIEW] = options.view !== undefined ?\n options.view : new View();\n\n var controls;\n if (options.controls !== undefined) {\n if (Array.isArray(options.controls)) {\n controls = new Collection(options.controls.slice());\n } else {\n assert(typeof /** @type {?} */ (options.controls).getArray === 'function',\n 47); // Expected `controls` to be an array or an `import(\"./Collection.js\").Collection`\n controls = /** @type {Collection} */ (options.controls);\n }\n }\n\n var interactions;\n if (options.interactions !== undefined) {\n if (Array.isArray(options.interactions)) {\n interactions = new Collection(options.interactions.slice());\n } else {\n assert(typeof /** @type {?} */ (options.interactions).getArray === 'function',\n 48); // Expected `interactions` to be an array or an `import(\"./Collection.js\").Collection`\n interactions = /** @type {Collection} */ (options.interactions);\n }\n }\n\n var overlays;\n if (options.overlays !== undefined) {\n if (Array.isArray(options.overlays)) {\n overlays = new Collection(options.overlays.slice());\n } else {\n assert(typeof /** @type {?} */ (options.overlays).getArray === 'function',\n 49); // 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\n}\nexport default PluggableMap;\n\n/**\n * @param {Array<import(\"./layer/Base.js\").default>} layers Layers.\n * @return {boolean} Layers have sources that are still loading.\n */\nfunction getLoading(layers) {\n for (var i = 0, ii = layers.length; i < ii; ++i) {\n var layer = layers[i];\n if (typeof /** @type {?} */ (layer).getLayers === 'function') {\n return getLoading(/** @type {LayerGroup} */ (layer).getLayers().getArray());\n } else {\n var source = /** @type {import(\"./layer/Layer.js\").default} */ (\n layer).getSource();\n if (source && source.loading) {\n return true;\n }\n }\n }\n return false;\n}\n\n//# sourceMappingURL=PluggableMap.js.map","/**\n * @module ol/css\n */\n\n\n/**\n * The CSS class for hidden feature.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_HIDDEN = 'ol-hidden';\n\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 var CLASS_SELECTABLE = 'ol-selectable';\n\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 var CLASS_UNSELECTABLE = 'ol-unselectable';\n\n\n/**\n * The CSS class for unsupported feature.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_UNSUPPORTED = 'ol-unsupported';\n\n\n/**\n * The CSS class for controls.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_CONTROL = 'ol-control';\n\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 var CLASS_COLLAPSED = 'ol-collapsed';\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} The CSS font property.\n * @return {Object<string>} The font families (or null if the input spec is invalid).\n */\nexport var getFontFamilies = (function() {\n var style;\n var cache = {};\n return function(font) {\n if (!style) {\n style = document.createElement('div').style;\n }\n if (!(font in cache)) {\n style.font = font;\n var family = style.fontFamily;\n style.font = '';\n if (!family) {\n return null;\n }\n cache[font] = family.split(/,\\s?/);\n }\n return cache[font];\n };\n})();\n\n//# sourceMappingURL=css.js.map","/**\n * @module ol/layer/Layer\n */\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {getUid} from '../util.js';\nimport {getChangeEventType} from '../Object.js';\nimport BaseLayer from './Base.js';\nimport LayerProperty from './Property.js';\nimport {assign} from '../obj.js';\nimport RenderEventType from '../render/EventType.js';\nimport SourceState from '../source/State.js';\n\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 {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 */\n\n\n/**\n * @typedef {Object} State\n * @property {import(\"./Base.js\").default} layer\n * @property {number} opacity\n * @property {SourceState} 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 */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\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 * @fires import(\"../render/Event.js\").RenderEvent\n */\nvar Layer = /*@__PURE__*/(function (BaseLayer) {\n function Layer(options) {\n\n var baseOptions = assign({}, options);\n delete baseOptions.source;\n\n BaseLayer.call(this, 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 if (options.map) {\n this.setMap(options.map);\n }\n\n listen(this,\n getChangeEventType(LayerProperty.SOURCE),\n this.handleSourcePropertyChange_, this);\n\n var source = options.source ? options.source : null;\n this.setSource(source);\n }\n\n if ( BaseLayer ) Layer.__proto__ = BaseLayer;\n Layer.prototype = Object.create( BaseLayer && BaseLayer.prototype );\n Layer.prototype.constructor = Layer;\n\n /**\n * @inheritDoc\n */\n Layer.prototype.getLayersArray = function getLayersArray (opt_array) {\n var array = opt_array ? opt_array : [];\n array.push(this);\n return array;\n };\n\n /**\n * @inheritDoc\n */\n Layer.prototype.getLayerStatesArray = function getLayerStatesArray (opt_states) {\n var states = opt_states ? opt_states : [];\n states.push(this.getLayerState());\n return states;\n };\n\n /**\n * Get the layer source.\n * @return {import(\"../source/Source.js\").default} The layer source (or `null` if not yet set).\n * @observable\n * @api\n */\n Layer.prototype.getSource = function getSource () {\n var source = this.get(LayerProperty.SOURCE);\n return (\n /** @type {import(\"../source/Source.js\").default} */ (source) || null\n );\n };\n\n /**\n * @inheritDoc\n */\n Layer.prototype.getSourceState = function getSourceState () {\n var source = this.getSource();\n return !source ? SourceState.UNDEFINED : source.getState();\n };\n\n /**\n * @private\n */\n Layer.prototype.handleSourceChange_ = function handleSourceChange_ () {\n this.changed();\n };\n\n /**\n * @private\n */\n Layer.prototype.handleSourcePropertyChange_ = function handleSourcePropertyChange_ () {\n if (this.sourceChangeKey_) {\n unlistenByKey(this.sourceChangeKey_);\n this.sourceChangeKey_ = null;\n }\n var source = this.getSource();\n if (source) {\n this.sourceChangeKey_ = listen(source,\n EventType.CHANGE, this.handleSourceChange_, this);\n }\n this.changed();\n };\n\n /**\n * Sets the layer to be rendered on top of other layers on a map. The map will\n * not manage this layer in its layers collection, and the callback in\n * {@link module:ol/Map#forEachLayerAtPixel} will receive `null` as layer. This\n * is useful for temporary layers. To remove an unmanaged layer from the map,\n * use `#setMap(null)`.\n *\n * To add the layer to a map and have it managed by the map, use\n * {@link module:ol/Map#addLayer} instead.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @api\n */\n Layer.prototype.setMap = function 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(map, RenderEventType.PRECOMPOSE, function(evt) {\n var renderEvent = /** @type {import(\"../render/Event.js\").default} */ (evt);\n var layerState = this.getLayerState();\n layerState.managed = false;\n if (this.getZIndex() === undefined) {\n layerState.zIndex = Infinity;\n }\n renderEvent.frameState.layerStatesArray.push(layerState);\n renderEvent.frameState.layerStates[getUid(this)] = layerState;\n }, this);\n this.mapRenderKey_ = listen(this, EventType.CHANGE, map.render, map);\n this.changed();\n }\n };\n\n /**\n * Set the layer source.\n * @param {import(\"../source/Source.js\").default} source The layer source.\n * @observable\n * @api\n */\n Layer.prototype.setSource = function setSource (source) {\n this.set(LayerProperty.SOURCE, source);\n };\n\n return Layer;\n}(BaseLayer));\n\n\n/**\n * Return `true` if the layer is visible, and if the passed resolution is\n * between the layer's minResolution and maxResolution. The comparison is\n * inclusive for `minResolution` and exclusive for `maxResolution`.\n * @param {State} layerState Layer state.\n * @param {number} resolution Resolution.\n * @return {boolean} The layer is visible at the given resolution.\n */\nexport function visibleAtResolution(layerState, resolution) {\n return layerState.visible && resolution >= layerState.minResolution &&\n resolution < layerState.maxResolution;\n}\n\n\nexport default Layer;\n\n//# sourceMappingURL=Layer.js.map","/**\n * @module ol/control/Attribution\n */\nimport {equals} from '../array.js';\nimport Control from './Control.js';\nimport {CLASS_CONTROL, CLASS_UNSELECTABLE, CLASS_COLLAPSED} from '../css.js';\nimport {removeChildren, replaceNode} from '../dom.js';\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {visibleAtResolution} from '../layer/Layer.js';\n\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|HTMLElement} [collapseLabel='»'] Text label to use\n * for the expanded attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {function(import(\"../MapEvent.js\").default)} [render] Function called when\n * the control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n */\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 */\nvar Attribution = /*@__PURE__*/(function (Control) {\n function Attribution(opt_options) {\n\n var options = opt_options ? opt_options : {};\n\n Control.call(this, {\n element: document.createElement('div'),\n render: options.render || 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_ = options.collapsed !== undefined ? options.collapsed : true;\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_ = options.collapsible !== undefined ?\n options.collapsible : true;\n\n if (!this.collapsible_) {\n this.collapsed_ = false;\n }\n\n var className = options.className !== undefined ? options.className : 'ol-attribution';\n\n var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Attributions';\n\n var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\\u00BB';\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 var 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 } else {\n this.label_ = label;\n }\n\n\n var activeLabel = (this.collapsible_ && !this.collapsed_) ?\n this.collapseLabel_ : this.label_;\n var button = document.createElement('button');\n button.setAttribute('type', 'button');\n button.title = tipLabel;\n button.appendChild(activeLabel);\n\n listen(button, EventType.CLICK, this.handleClick_, this);\n\n var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL +\n (this.collapsed_ && this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') +\n (this.collapsible_ ? '' : ' ol-uncollapsible');\n var element = this.element;\n element.className = cssClasses;\n element.appendChild(this.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 if ( Control ) Attribution.__proto__ = Control;\n Attribution.prototype = Object.create( Control && Control.prototype );\n Attribution.prototype.constructor = Attribution;\n\n /**\n * Collect a list of visible attributions and set the collapsible state.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @return {Array<string>} Attributions.\n * @private\n */\n Attribution.prototype.collectSourceAttributions_ = function collectSourceAttributions_ (frameState) {\n /**\n * Used to determine if an attribution already exists.\n * @type {!Object<string, boolean>}\n */\n var lookup = {};\n\n /**\n * A list of visible attributions.\n * @type {Array<string>}\n */\n var visibleAttributions = [];\n\n var layerStatesArray = frameState.layerStatesArray;\n var resolution = frameState.viewState.resolution;\n for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n var layerState = layerStatesArray[i];\n if (!visibleAtResolution(layerState, resolution)) {\n continue;\n }\n\n var source = /** @type {import(\"../layer/Layer.js\").default} */ (layerState.layer).getSource();\n if (!source) {\n continue;\n }\n\n var attributionGetter = source.getAttributions();\n if (!attributionGetter) {\n continue;\n }\n\n var attributions = attributionGetter(frameState);\n if (!attributions) {\n continue;\n }\n\n if (!this.overrideCollapsible_ && source.getAttributionsCollapsible() === false) {\n this.setCollapsible(false);\n }\n\n if (Array.isArray(attributions)) {\n for (var j = 0, jj = attributions.length; j < jj; ++j) {\n if (!(attributions[j] in lookup)) {\n visibleAttributions.push(attributions[j]);\n lookup[attributions[j]] = true;\n }\n }\n } else {\n if (!(attributions in lookup)) {\n visibleAttributions.push(attributions);\n lookup[attributions] = true;\n }\n }\n }\n return visibleAttributions;\n };\n\n /**\n * @private\n * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n */\n Attribution.prototype.updateElement_ = function 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 var attributions = this.collectSourceAttributions_(frameState);\n\n var 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 (var i = 0, ii = attributions.length; i < ii; ++i) {\n var element = document.createElement('li');\n element.innerHTML = attributions[i];\n this.ulElement_.appendChild(element);\n }\n\n this.renderedAttributions_ = attributions;\n };\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n Attribution.prototype.handleClick_ = function handleClick_ (event) {\n event.preventDefault();\n this.handleToggle_();\n };\n\n /**\n * @private\n */\n Attribution.prototype.handleToggle_ = function 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 Attribution.prototype.getCollapsible = function 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 Attribution.prototype.setCollapsible = function 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 attribution according to the passed parameter. Will\n * not do anything if the attribution isn't collapsible or if the current\n * collapsed state is already the one requested.\n * @param {boolean} collapsed True if the widget is collapsed.\n * @api\n */\n Attribution.prototype.setCollapsed = function setCollapsed (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 Attribution.prototype.getCollapsed = function getCollapsed () {\n return this.collapsed_;\n };\n\n return Attribution;\n}(Control));\n\n\n/**\n * Update the attribution element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @this {Attribution}\n * @api\n */\nexport function render(mapEvent) {\n this.updateElement_(mapEvent.frameState);\n}\n\n\nexport default Attribution;\n\n//# sourceMappingURL=Attribution.js.map","/**\n * @module ol/control/Rotate\n */\nimport Control from './Control.js';\nimport {CLASS_CONTROL, CLASS_HIDDEN, CLASS_UNSELECTABLE} from '../css.js';\nimport {easeOut} from '../easing.js';\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\n\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 {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)} [render] Function called when the control should\n * be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {function()} [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/**\n * @classdesc\n * A button control to reset rotation to 0.\n * To style this control use css selector `.ol-rotate`. A `.ol-hidden` css\n * selector is added to the button when the rotation is 0.\n *\n * @api\n */\nvar Rotate = /*@__PURE__*/(function (Control) {\n function Rotate(opt_options) {\n\n var options = opt_options ? opt_options : {};\n\n Control.call(this, {\n element: document.createElement('div'),\n render: options.render || render,\n target: options.target\n });\n\n var className = options.className !== undefined ? options.className : 'ol-rotate';\n\n var label = options.label !== undefined ? options.label : '\\u21E7';\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 = 'ol-compass';\n this.label_.textContent = label;\n } else {\n this.label_ = label;\n this.label_.classList.add('ol-compass');\n }\n\n var tipLabel = options.tipLabel ? options.tipLabel : 'Reset rotation';\n\n var button = document.createElement('button');\n button.className = className + '-reset';\n button.setAttribute('type', 'button');\n button.title = tipLabel;\n button.appendChild(this.label_);\n\n listen(button, EventType.CLICK, this.handleClick_, this);\n\n var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n var 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 if ( Control ) Rotate.__proto__ = Control;\n Rotate.prototype = Object.create( Control && Control.prototype );\n Rotate.prototype.constructor = Rotate;\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n Rotate.prototype.handleClick_ = function 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 Rotate.prototype.resetNorth_ = function resetNorth_ () {\n var map = this.getMap();\n var view = map.getView();\n if (!view) {\n // the map does not have a view, so we can't act\n // upon it\n return;\n }\n if (view.getRotation() !== undefined) {\n if (this.duration_ > 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 return Rotate;\n}(Control));\n\n\n/**\n * Update the rotate control element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @this {Rotate}\n * @api\n */\nexport function render(mapEvent) {\n var frameState = mapEvent.frameState;\n if (!frameState) {\n return;\n }\n var rotation = frameState.viewState.rotation;\n if (rotation != this.rotation_) {\n var transform = 'rotate(' + rotation + 'rad)';\n if (this.autoHide_) {\n var contains = this.element.classList.contains(CLASS_HIDDEN);\n if (!contains && rotation === 0) {\n this.element.classList.add(CLASS_HIDDEN);\n } else if (contains && rotation !== 0) {\n this.element.classList.remove(CLASS_HIDDEN);\n }\n }\n this.label_.style.msTransform = transform;\n this.label_.style.webkitTransform = transform;\n this.label_.style.transform = transform;\n }\n this.rotation_ = rotation;\n}\n\nexport default Rotate;\n\n//# sourceMappingURL=Rotate.js.map","/**\n * @module ol/control/Zoom\n */\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport Control from './Control.js';\nimport {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';\nimport {easeOut} from '../easing.js';\n\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|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/**\n * @classdesc\n * A control with 2 buttons, one for zoom in and one for zoom out.\n * This control is one of the default controls of a map. To style this control\n * use css selectors `.ol-zoom-in` and `.ol-zoom-out`.\n *\n * @api\n */\nvar Zoom = /*@__PURE__*/(function (Control) {\n function Zoom(opt_options) {\n\n var options = opt_options ? opt_options : {};\n\n Control.call(this, {\n element: document.createElement('div'),\n target: options.target\n });\n\n var className = options.className !== undefined ? options.className : 'ol-zoom';\n\n var delta = options.delta !== undefined ? options.delta : 1;\n\n var zoomInLabel = options.zoomInLabel !== undefined ? options.zoomInLabel : '+';\n var zoomOutLabel = options.zoomOutLabel !== undefined ? options.zoomOutLabel : '\\u2212';\n\n var zoomInTipLabel = options.zoomInTipLabel !== undefined ?\n options.zoomInTipLabel : 'Zoom in';\n var zoomOutTipLabel = options.zoomOutTipLabel !== undefined ?\n options.zoomOutTipLabel : 'Zoom out';\n\n var inElement = document.createElement('button');\n inElement.className = className + '-in';\n inElement.setAttribute('type', 'button');\n inElement.title = zoomInTipLabel;\n inElement.appendChild(\n typeof zoomInLabel === 'string' ? document.createTextNode(zoomInLabel) : zoomInLabel\n );\n\n listen(inElement, EventType.CLICK, this.handleClick_.bind(this, delta));\n\n var outElement = document.createElement('button');\n outElement.className = className + '-out';\n outElement.setAttribute('type', 'button');\n outElement.title = zoomOutTipLabel;\n outElement.appendChild(\n typeof zoomOutLabel === 'string' ? document.createTextNode(zoomOutLabel) : zoomOutLabel\n );\n\n listen(outElement, EventType.CLICK, this.handleClick_.bind(this, -delta));\n\n var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n var element = this.element;\n element.className = cssClasses;\n element.appendChild(inElement);\n element.appendChild(outElement);\n\n /**\n * @type {number}\n * @private\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n }\n\n if ( Control ) Zoom.__proto__ = Control;\n Zoom.prototype = Object.create( Control && Control.prototype );\n Zoom.prototype.constructor = Zoom;\n\n /**\n * @param {number} delta Zoom delta.\n * @param {MouseEvent} event The event to handle\n * @private\n */\n Zoom.prototype.handleClick_ = function handleClick_ (delta, event) {\n event.preventDefault();\n this.zoomByDelta_(delta);\n };\n\n /**\n * @param {number} delta Zoom delta.\n * @private\n */\n Zoom.prototype.zoomByDelta_ = function zoomByDelta_ (delta) {\n var map = this.getMap();\n var view = map.getView();\n if (!view) {\n // the map does not have a view, so we can't act\n // upon it\n return;\n }\n var currentResolution = view.getResolution();\n if (currentResolution) {\n var newResolution = view.constrainResolution(currentResolution, delta);\n if (this.duration_ > 0) {\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n view.animate({\n resolution: newResolution,\n duration: this.duration_,\n easing: easeOut\n });\n } else {\n view.setResolution(newResolution);\n }\n }\n };\n\n return Zoom;\n}(Control));\n\n\nexport default Zoom;\n\n//# sourceMappingURL=Zoom.js.map","/**\n * @module ol/control/util\n */\nimport Collection from '../Collection.js';\nimport Attribution from './Attribution.js';\nimport Rotate from './Rotate.js';\nimport Zoom from './Zoom.js';\n\n\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [attribution=true] Include\n * {@link module:ol/control/Attribution~Attribution}.\n * @property {import(\"./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(\"./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(\"./Zoom.js\").Options} [zoomOptions] Options for\n * {@link module:ol/control/Zoom~Zoom}.\n * @api\n */\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.js\").default>}\n * Controls.\n * @function module:ol/control.defaults\n * @api\n */\nexport function defaults(opt_options) {\n\n var options = opt_options ? opt_options : {};\n\n var controls = new Collection();\n\n var zoomControl = options.zoom !== undefined ? options.zoom : true;\n if (zoomControl) {\n controls.push(new Zoom(options.zoomOptions));\n }\n\n var rotateControl = options.rotate !== undefined ? options.rotate : true;\n if (rotateControl) {\n controls.push(new Rotate(options.rotateOptions));\n }\n\n var attributionControl = options.attribution !== undefined ?\n options.attribution : true;\n if (attributionControl) {\n controls.push(new Attribution(options.attributionOptions));\n }\n\n return controls;\n}\n\n//# sourceMappingURL=util.js.map","/**\n * @module ol/Kinetic\n */\n\n/**\n * @classdesc\n * Implementation of inertial deceleration for map movement.\n *\n * @api\n */\nvar Kinetic = function Kinetic(decay, minVelocity, delay) {\n\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 */\nKinetic.prototype.begin = function 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 */\nKinetic.prototype.update = function update (x, y) {\n this.points_.push(x, y, Date.now());\n};\n\n/**\n * @return {boolean} Whether we should do kinetic animation.\n */\nKinetic.prototype.end = function 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 var delay = Date.now() - this.delay_;\n var lastIndex = this.points_.length - 3;\n if (this.points_[lastIndex + 2] < delay) {\n // the last tracked point is too old, which means that the user stopped\n // panning before releasing the map\n return false;\n }\n\n // get the first point which still falls into the delay time\n var firstIndex = lastIndex - 3;\n while (firstIndex > 0 && this.points_[firstIndex + 2] > delay) {\n firstIndex -= 3;\n }\n\n var duration = this.points_[lastIndex + 2] - this.points_[firstIndex + 2];\n // we don't want a duration of 0 (divide by zero)\n // we also make sure the user panned for a duration of at least one frame\n // (1/60s) to compute sane displacement values\n if (duration < 1000 / 60) {\n return false;\n }\n\n var dx = this.points_[lastIndex] - this.points_[firstIndex];\n var dy = this.points_[lastIndex + 1] - this.points_[firstIndex + 1];\n this.angle_ = Math.atan2(dy, dx);\n this.initialVelocity_ = Math.sqrt(dx * dx + dy * dy) / duration;\n return this.initialVelocity_ > this.minVelocity_;\n};\n\n/**\n * @return {number} Total distance travelled (pixels).\n */\nKinetic.prototype.getDistance = function getDistance () {\n return (this.minVelocity_ - this.initialVelocity_) / this.decay_;\n};\n\n/**\n * @return {number} Angle of the kinetic panning animation (radians).\n */\nKinetic.prototype.getAngle = function getAngle () {\n return this.angle_;\n};\n\nexport default Kinetic;\n\n//# sourceMappingURL=Kinetic.js.map","/**\n * @module ol/interaction/Property\n */\n\n/**\n * @enum {string}\n */\nexport default {\n ACTIVE: 'active'\n};\n\n//# sourceMappingURL=Property.js.map","/**\n * @module ol/interaction/Interaction\n */\nimport BaseObject from '../Object.js';\nimport {easeOut, linear} from '../easing.js';\nimport InteractionProperty from './Property.js';\nimport {clamp} from '../math.js';\n\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).\n */\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 */\nvar Interaction = /*@__PURE__*/(function (BaseObject) {\n function Interaction(options) {\n BaseObject.call(this);\n\n if (options.handleEvent) {\n this.handleEvent = 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 if ( BaseObject ) Interaction.__proto__ = BaseObject;\n Interaction.prototype = Object.create( BaseObject && BaseObject.prototype );\n Interaction.prototype.constructor = Interaction;\n\n /**\n * Return whether the interaction is currently active.\n * @return {boolean} `true` if the interaction is active, `false` otherwise.\n * @observable\n * @api\n */\n Interaction.prototype.getActive = function 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 Interaction.prototype.getMap = function 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 Interaction.prototype.handleEvent = function 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 Interaction.prototype.setActive = function 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 Interaction.prototype.setMap = function setMap (map) {\n this.map_ = map;\n };\n\n return Interaction;\n}(BaseObject));\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 var currentCenter = view.getCenter();\n if (currentCenter) {\n var center = view.constrainCenter(\n [currentCenter[0] + delta[0], currentCenter[1] + delta[1]]);\n if (opt_duration) {\n view.animate({\n duration: opt_duration,\n easing: linear,\n center: center\n });\n } else {\n view.setCenter(center);\n }\n }\n}\n\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number|undefined} rotation Rotation.\n * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor Anchor coordinate.\n * @param {number=} opt_duration Duration.\n */\nexport function rotate(view, rotation, opt_anchor, opt_duration) {\n rotation = view.constrainRotation(rotation, 0);\n rotateWithoutConstraints(view, rotation, opt_anchor, opt_duration);\n}\n\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number|undefined} rotation Rotation.\n * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor Anchor coordinate.\n * @param {number=} opt_duration Duration.\n */\nexport function rotateWithoutConstraints(view, rotation, opt_anchor, opt_duration) {\n if (rotation !== undefined) {\n var currentRotation = view.getRotation();\n var currentCenter = view.getCenter();\n if (currentRotation !== undefined && currentCenter && opt_duration > 0) {\n view.animate({\n rotation: rotation,\n anchor: opt_anchor,\n duration: opt_duration,\n easing: easeOut\n });\n } else {\n view.rotate(rotation, opt_anchor);\n }\n }\n}\n\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number|undefined} resolution Resolution to go to.\n * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor Anchor coordinate.\n * @param {number=} opt_duration Duration.\n * @param {number=} opt_direction Zooming direction; > 0 indicates\n * zooming out, in which case the constraints system will select\n * the largest nearest resolution; < 0 indicates zooming in, in\n * which case the constraints system will select the smallest\n * nearest resolution; == 0 indicates that the zooming direction\n * is unknown/not relevant, in which case the constraints system\n * will select the nearest resolution. If not defined 0 is\n * assumed.\n */\nexport function zoom(view, resolution, opt_anchor, opt_duration, opt_direction) {\n resolution = view.constrainResolution(resolution, 0, opt_direction);\n zoomWithoutConstraints(view, resolution, opt_anchor, opt_duration);\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.\n * @param {number=} opt_duration Duration.\n */\nexport function zoomByDelta(view, delta, opt_anchor, opt_duration) {\n var currentResolution = view.getResolution();\n var resolution = view.constrainResolution(currentResolution, delta, 0);\n\n if (resolution !== undefined) {\n var resolutions = view.getResolutions();\n resolution = clamp(\n resolution,\n view.getMinResolution() || resolutions[resolutions.length - 1],\n view.getMaxResolution() || resolutions[0]);\n }\n\n // If we have a constraint on center, we need to change the anchor so that the\n // new center is within the extent. We first calculate the new center, apply\n // the constraint to it, and then calculate back the anchor\n if (opt_anchor && resolution !== undefined && resolution !== currentResolution) {\n var currentCenter = view.getCenter();\n var center = view.calculateCenterZoom(resolution, opt_anchor);\n center = view.constrainCenter(center);\n\n opt_anchor = [\n (resolution * currentCenter[0] - currentResolution * center[0]) /\n (resolution - currentResolution),\n (resolution * currentCenter[1] - currentResolution * center[1]) /\n (resolution - currentResolution)\n ];\n }\n\n zoomWithoutConstraints(view, resolution, opt_anchor, opt_duration);\n}\n\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number|undefined} resolution Resolution to go to.\n * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor Anchor coordinate.\n * @param {number=} opt_duration Duration.\n */\nexport function zoomWithoutConstraints(view, resolution, opt_anchor, opt_duration) {\n if (resolution) {\n var currentResolution = view.getResolution();\n var currentCenter = view.getCenter();\n if (currentResolution !== undefined && currentCenter &&\n resolution !== currentResolution && opt_duration) {\n view.animate({\n resolution: resolution,\n anchor: opt_anchor,\n duration: opt_duration,\n easing: easeOut\n });\n } else {\n if (opt_anchor) {\n var center = view.calculateCenterZoom(resolution, opt_anchor);\n view.setCenter(center);\n }\n view.setResolution(resolution);\n }\n }\n}\n\nexport default Interaction;\n\n//# sourceMappingURL=Interaction.js.map","/**\n * @module ol/interaction/DoubleClickZoom\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport Interaction, {zoomByDelta} from './Interaction.js';\n\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/**\n * @classdesc\n * Allows the user to zoom by double-clicking on the map.\n * @api\n */\nvar DoubleClickZoom = /*@__PURE__*/(function (Interaction) {\n function DoubleClickZoom(opt_options) {\n Interaction.call(this, {\n handleEvent: handleEvent\n });\n\n var 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 if ( Interaction ) DoubleClickZoom.__proto__ = Interaction;\n DoubleClickZoom.prototype = Object.create( Interaction && Interaction.prototype );\n DoubleClickZoom.prototype.constructor = DoubleClickZoom;\n\n return DoubleClickZoom;\n}(Interaction));\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 * @this {DoubleClickZoom}\n */\nfunction handleEvent(mapBrowserEvent) {\n var stopEvent = false;\n if (mapBrowserEvent.type == MapBrowserEventType.DBLCLICK) {\n var browserEvent = /** @type {MouseEvent} */ (mapBrowserEvent.originalEvent);\n var map = mapBrowserEvent.map;\n var anchor = mapBrowserEvent.coordinate;\n var delta = browserEvent.shiftKey ? -this.delta_ : this.delta_;\n var view = map.getView();\n zoomByDelta(view, delta, anchor, this.duration_);\n mapBrowserEvent.preventDefault();\n stopEvent = true;\n }\n return !stopEvent;\n}\n\nexport default DoubleClickZoom;\n\n//# sourceMappingURL=DoubleClickZoom.js.map","/**\n * @module ol/events/condition\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport {assert} from '../asserts.js';\nimport {TRUE, FALSE} from '../functions.js';\nimport {WEBKIT, MAC} from '../has.js';\n\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/**\n * Return `true` if only the alt-key is pressed, `false` otherwise (e.g. when\n * additionally the shift-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the alt key is pressed.\n * @api\n */\nexport var altKeyOnly = function(mapBrowserEvent) {\n var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n return (\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 var altShiftKeysOnly = function(mapBrowserEvent) {\n var 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 var focus = function(event) {\n return event.target.getTargetElement() === document.activeElement;\n};\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 var always = TRUE;\n\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 var click = function(mapBrowserEvent) {\n return mapBrowserEvent.type == MapBrowserEventType.CLICK;\n};\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 var mouseActionButton = function(mapBrowserEvent) {\n var originalEvent = /** @type {MouseEvent} */ (mapBrowserEvent.originalEvent);\n return originalEvent.button == 0 &&\n !(WEBKIT && MAC && originalEvent.ctrlKey);\n};\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 var never = FALSE;\n\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 var pointerMove = function(mapBrowserEvent) {\n return mapBrowserEvent.type == 'pointermove';\n};\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 var singleClick = function(mapBrowserEvent) {\n return mapBrowserEvent.type == MapBrowserEventType.SINGLECLICK;\n};\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 var doubleClick = function(mapBrowserEvent) {\n return mapBrowserEvent.type == MapBrowserEventType.DBLCLICK;\n};\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 var noModifierKeys = function(mapBrowserEvent) {\n var 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 var platformModifierKeyOnly = function(mapBrowserEvent) {\n var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n return !originalEvent.altKey &&\n (MAC ? originalEvent.metaKey : originalEvent.ctrlKey) &&\n !originalEvent.shiftKey;\n};\n\n\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 var shiftKeyOnly = function(mapBrowserEvent) {\n var 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 var targetNotEditable = function(mapBrowserEvent) {\n var target = mapBrowserEvent.originalEvent.target;\n var tagName = /** @type {Element} */ (target).tagName;\n return (\n tagName !== 'INPUT' &&\n tagName !== 'SELECT' &&\n tagName !== 'TEXTAREA');\n};\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 var mouseOnly = function(mapBrowserEvent) {\n var pointerEvent = /** @type {import(\"../MapBrowserPointerEvent\").default} */ (mapBrowserEvent).pointerEvent;\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/**\n * Return `true` if the event originates from a primary pointer in\n * contact with the surface or if the left mouse button is pressed.\n * See http://www.w3.org/TR/pointerevents/#button-states.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a primary pointer.\n * @api\n */\nexport var primaryAction = function(mapBrowserEvent) {\n var pointerEvent = /** @type {import(\"../MapBrowserPointerEvent\").default} */ (mapBrowserEvent).pointerEvent;\n assert(pointerEvent !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n return pointerEvent.isPrimary && pointerEvent.button === 0;\n};\n\n//# sourceMappingURL=condition.js.map","/**\n * @module ol/interaction/Pointer\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport Interaction from './Interaction.js';\nimport {getValues} from '../obj.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {function(import(\"../MapBrowserPointerEvent.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(\"../MapBrowserPointerEvent.js\").default)} [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(\"../MapBrowserPointerEvent.js\").default)} [handleMoveEvent]\n * Function handling \"move\" events. This function is called on \"move\" events,\n * also during a drag sequence (so during a drag sequence both the\n * `handleDragEvent` function and this function are called).\n * @property {function(import(\"../MapBrowserPointerEvent.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/**\n * @classdesc\n * Base class that calls user-defined functions on `down`, `move` and `up`\n * events. This class also manages \"drag sequences\".\n *\n * When the `handleDownEvent` user function returns `true` a drag sequence is\n * started. During a drag sequence the `handleDragEvent` user function is\n * called on `move` events. The drag sequence ends when the `handleUpEvent`\n * user function is called and returns `false`.\n * @api\n */\nvar PointerInteraction = /*@__PURE__*/(function (Interaction) {\n function PointerInteraction(opt_options) {\n\n var options = opt_options ? opt_options : {};\n\n Interaction.call(/** @type {import(\"./Interaction.js\").InteractionOptions} */ this, (options));\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, import(\"../pointer/PointerEvent.js\").default>}\n * @private\n */\n this.trackedPointers_ = {};\n\n /**\n * @type {Array<import(\"../pointer/PointerEvent.js\").default>}\n * @protected\n */\n this.targetPointers = [];\n\n }\n\n if ( Interaction ) PointerInteraction.__proto__ = Interaction;\n PointerInteraction.prototype = Object.create( Interaction && Interaction.prototype );\n PointerInteraction.prototype.constructor = PointerInteraction;\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserPointerEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @protected\n */\n PointerInteraction.prototype.handleDownEvent = function handleDownEvent (mapBrowserEvent) {\n return false;\n };\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserPointerEvent.js\").default} mapBrowserEvent Event.\n * @protected\n */\n PointerInteraction.prototype.handleDragEvent = function 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 * @override\n * @api\n */\n PointerInteraction.prototype.handleEvent = function handleEvent (mapBrowserEvent) {\n if (!(/** @type {import(\"../MapBrowserPointerEvent.js\").default} */ (mapBrowserEvent).pointerEvent)) {\n return true;\n }\n\n var stopEvent = false;\n this.updateTrackedPointers_(mapBrowserEvent);\n if (this.handlingDownUpSequence) {\n if (mapBrowserEvent.type == MapBrowserEventType.POINTERDRAG) {\n this.handleDragEvent(mapBrowserEvent);\n } else if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {\n var handledUp = this.handleUpEvent(mapBrowserEvent);\n this.handlingDownUpSequence = handledUp && this.targetPointers.length > 0;\n }\n } else {\n if (mapBrowserEvent.type == MapBrowserEventType.POINTERDOWN) {\n var handled = this.handleDownEvent(mapBrowserEvent);\n if (handled) {\n mapBrowserEvent.preventDefault();\n }\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(\"../MapBrowserPointerEvent.js\").default} mapBrowserEvent Event.\n * @protected\n */\n PointerInteraction.prototype.handleMoveEvent = function handleMoveEvent (mapBrowserEvent) {};\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserPointerEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @protected\n */\n PointerInteraction.prototype.handleUpEvent = function 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 PointerInteraction.prototype.stopDown = function stopDown (handled) {\n return handled;\n };\n\n /**\n * @param {import(\"../MapBrowserPointerEvent.js\").default} mapBrowserEvent Event.\n * @private\n */\n PointerInteraction.prototype.updateTrackedPointers_ = function updateTrackedPointers_ (mapBrowserEvent) {\n if (isPointerDraggingEvent(mapBrowserEvent)) {\n var event = mapBrowserEvent.pointerEvent;\n\n var id = event.pointerId.toString();\n if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {\n delete this.trackedPointers_[id];\n } else if (mapBrowserEvent.type ==\n 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 return PointerInteraction;\n}(Interaction));\n\n\n/**\n * @param {Array<import(\"../pointer/PointerEvent.js\").default>} pointerEvents List of events.\n * @return {import(\"../pixel.js\").Pixel} Centroid pixel.\n */\nexport function centroid(pointerEvents) {\n var length = pointerEvents.length;\n var clientX = 0;\n var clientY = 0;\n for (var i = 0; i < length; i++) {\n clientX += pointerEvents[i].clientX;\n clientY += pointerEvents[i].clientY;\n }\n return [clientX / length, clientY / length];\n}\n\n\n/**\n * @param {import(\"../MapBrowserPointerEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} Whether the event is a pointerdown, pointerdrag\n * or pointerup event.\n */\nfunction isPointerDraggingEvent(mapBrowserEvent) {\n var type = mapBrowserEvent.type;\n return type === MapBrowserEventType.POINTERDOWN ||\n type === MapBrowserEventType.POINTERDRAG ||\n type === MapBrowserEventType.POINTERUP;\n}\n\n\nexport default PointerInteraction;\n\n//# sourceMappingURL=Pointer.js.map","/**\n * @module ol/interaction/DragPan\n */\nimport ViewHint from '../ViewHint.js';\nimport {scale as scaleCoordinate, rotate as rotateCoordinate, add as addCoordinate} from '../coordinate.js';\nimport {easeOut} from '../easing.js';\nimport {noModifierKeys} from '../events/condition.js';\nimport {FALSE} from '../functions.js';\nimport PointerInteraction, {centroid as centroidFromPointers} from './Pointer.js';\n\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}.\n * @property {import(\"../Kinetic.js\").default} [kinetic] Kinetic inertia to apply to the pan.\n */\n\n\n/**\n * @classdesc\n * Allows the user to pan the map by dragging the map.\n * @api\n */\nvar DragPan = /*@__PURE__*/(function (PointerInteraction) {\n function DragPan(opt_options) {\n\n PointerInteraction.call(this, {\n stopDown: FALSE\n });\n\n var 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 /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : noModifierKeys;\n\n /**\n * @private\n * @type {boolean}\n */\n this.noKinetic_ = false;\n\n }\n\n if ( PointerInteraction ) DragPan.__proto__ = PointerInteraction;\n DragPan.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n DragPan.prototype.constructor = DragPan;\n\n /**\n * @inheritDoc\n */\n DragPan.prototype.handleDragEvent = function handleDragEvent (mapBrowserEvent) {\n if (!this.panning_) {\n this.panning_ = true;\n this.getMap().getView().setHint(ViewHint.INTERACTING, 1);\n }\n var targetPointers = this.targetPointers;\n var centroid = centroidFromPointers(targetPointers);\n if (targetPointers.length == this.lastPointersCount_) {\n if (this.kinetic_) {\n this.kinetic_.update(centroid[0], centroid[1]);\n }\n if (this.lastCentroid) {\n var deltaX = this.lastCentroid[0] - centroid[0];\n var deltaY = centroid[1] - this.lastCentroid[1];\n var map = mapBrowserEvent.map;\n var view = map.getView();\n var center = [deltaX, deltaY];\n scaleCoordinate(center, view.getResolution());\n rotateCoordinate(center, view.getRotation());\n addCoordinate(center, view.getCenter());\n center = view.constrainCenter(center);\n view.setCenter(center);\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 };\n\n /**\n * @inheritDoc\n */\n DragPan.prototype.handleUpEvent = function handleUpEvent (mapBrowserEvent) {\n var map = mapBrowserEvent.map;\n var view = map.getView();\n if (this.targetPointers.length === 0) {\n if (!this.noKinetic_ && this.kinetic_ && this.kinetic_.end()) {\n var distance = this.kinetic_.getDistance();\n var angle = this.kinetic_.getAngle();\n var center = /** @type {!import(\"../coordinate.js\").Coordinate} */ (view.getCenter());\n var centerpx = map.getPixelFromCoordinate(center);\n var dest = map.getCoordinateFromPixel([\n centerpx[0] - distance * Math.cos(angle),\n centerpx[1] - distance * Math.sin(angle)\n ]);\n view.animate({\n center: view.constrainCenter(dest),\n duration: 500,\n easing: easeOut\n });\n }\n if (this.panning_) {\n this.panning_ = false;\n view.setHint(ViewHint.INTERACTING, -1);\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 * @inheritDoc\n */\n DragPan.prototype.handleDownEvent = function handleDownEvent (mapBrowserEvent) {\n if (this.targetPointers.length > 0 && this.condition_(mapBrowserEvent)) {\n var map = mapBrowserEvent.map;\n var view = map.getView();\n this.lastCentroid = null;\n // stop any current animation\n if (view.getAnimating()) {\n view.setCenter(mapBrowserEvent.frameState.viewState.center);\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 return DragPan;\n}(PointerInteraction));\n\nexport default DragPan;\n\n//# sourceMappingURL=DragPan.js.map","/**\n * @module ol/interaction/DragRotate\n */\nimport {disable} from '../rotationconstraint.js';\nimport ViewHint from '../ViewHint.js';\nimport {altShiftKeysOnly, mouseOnly, mouseActionButton} from '../events/condition.js';\nimport {FALSE} from '../functions.js';\nimport {rotate, rotateWithoutConstraints} from './Interaction.js';\nimport PointerInteraction from './Pointer.js';\n\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/**\n * @classdesc\n * Allows the user to rotate the map by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n * it to when the alt and shift keys are held down.\n *\n * This interaction is only supported for mouse devices.\n * @api\n */\nvar DragRotate = /*@__PURE__*/(function (PointerInteraction) {\n function DragRotate(opt_options) {\n\n var options = opt_options ? opt_options : {};\n\n PointerInteraction.call(this, {\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 if ( PointerInteraction ) DragRotate.__proto__ = PointerInteraction;\n DragRotate.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n DragRotate.prototype.constructor = DragRotate;\n\n /**\n * @inheritDoc\n */\n DragRotate.prototype.handleDragEvent = function handleDragEvent (mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return;\n }\n\n var map = mapBrowserEvent.map;\n var view = map.getView();\n if (view.getConstraints().rotation === disable) {\n return;\n }\n var size = map.getSize();\n var offset = mapBrowserEvent.pixel;\n var theta =\n Math.atan2(size[1] / 2 - offset[1], offset[0] - size[0] / 2);\n if (this.lastAngle_ !== undefined) {\n var delta = theta - this.lastAngle_;\n var rotation = view.getRotation();\n rotateWithoutConstraints(view, rotation - delta);\n }\n this.lastAngle_ = theta;\n };\n\n\n /**\n * @inheritDoc\n */\n DragRotate.prototype.handleUpEvent = function handleUpEvent (mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return true;\n }\n\n var map = mapBrowserEvent.map;\n var view = map.getView();\n view.setHint(ViewHint.INTERACTING, -1);\n var rotation = view.getRotation();\n rotate(view, rotation, undefined, this.duration_);\n return false;\n };\n\n\n /**\n * @inheritDoc\n */\n DragRotate.prototype.handleDownEvent = function handleDownEvent (mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return false;\n }\n\n if (mouseActionButton(mapBrowserEvent) && this.condition_(mapBrowserEvent)) {\n var map = mapBrowserEvent.map;\n map.getView().setHint(ViewHint.INTERACTING, 1);\n this.lastAngle_ = undefined;\n return true;\n } else {\n return false;\n }\n };\n\n return DragRotate;\n}(PointerInteraction));\n\nexport default DragRotate;\n\n//# sourceMappingURL=DragRotate.js.map","/**\n * @module ol/render/Box\n */\n\nimport Disposable from '../Disposable.js';\nimport Polygon from '../geom/Polygon.js';\n\nvar RenderBox = /*@__PURE__*/(function (Disposable) {\n function RenderBox(className) {\n Disposable.call(this);\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_ = /** @type {HTMLDivElement} */ (document.createElement('div'));\n this.element_.style.position = 'absolute';\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 if ( Disposable ) RenderBox.__proto__ = Disposable;\n RenderBox.prototype = Object.create( Disposable && Disposable.prototype );\n RenderBox.prototype.constructor = RenderBox;\n\n /**\n * @inheritDoc\n */\n RenderBox.prototype.disposeInternal = function disposeInternal () {\n this.setMap(null);\n };\n\n /**\n * @private\n */\n RenderBox.prototype.render_ = function render_ () {\n var startPixel = this.startPixel_;\n var endPixel = this.endPixel_;\n var px = 'px';\n var style = this.element_.style;\n style.left = Math.min(startPixel[0], endPixel[0]) + px;\n style.top = Math.min(startPixel[1], endPixel[1]) + px;\n 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 RenderBox.prototype.setMap = function setMap (map) {\n if (this.map_) {\n this.map_.getOverlayContainer().removeChild(this.element_);\n var style = this.element_.style;\n style.left = style.top = style.width = 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 RenderBox.prototype.setPixels = function 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 RenderBox.prototype.createOrUpdateGeometry = function createOrUpdateGeometry () {\n var startPixel = this.startPixel_;\n var endPixel = this.endPixel_;\n var pixels = [\n startPixel,\n [startPixel[0], endPixel[1]],\n endPixel,\n [endPixel[0], startPixel[1]]\n ];\n var coordinates = pixels.map(this.map_.getCoordinateFromPixel, this.map_);\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 RenderBox.prototype.getGeometry = function getGeometry () {\n return this.geometry_;\n };\n\n return RenderBox;\n}(Disposable));\n\n\nexport default RenderBox;\n\n//# sourceMappingURL=Box.js.map","/**\n * @module ol/interaction/DragBox\n */\n// FIXME draw drag box\nimport Event from '../events/Event.js';\nimport {always, mouseOnly, mouseActionButton} from '../events/condition.js';\nimport {VOID} from '../functions.js';\nimport PointerInteraction from './Pointer.js';\nimport RenderBox from '../render/Box.js';\n\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/**\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~always}.\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)} onBoxEnd Code to execute just\n * before `boxend` is fired.\n */\n\n\n/**\n * @enum {string}\n */\nvar DragBoxEventType = {\n /**\n * Triggered upon drag box start.\n * @event DragBoxEvent#boxstart\n * @api\n */\n BOXSTART: 'boxstart',\n\n /**\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\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/DragBox~DragBox} instances are instances of\n * this type.\n */\nvar DragBoxEvent = /*@__PURE__*/(function (Event) {\n function DragBoxEvent(type, coordinate, mapBrowserEvent) {\n Event.call(this, 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 if ( Event ) DragBoxEvent.__proto__ = Event;\n DragBoxEvent.prototype = Object.create( Event && Event.prototype );\n DragBoxEvent.prototype.constructor = DragBoxEvent;\n\n return DragBoxEvent;\n}(Event));\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 * This interaction is only supported for mouse devices.\n *\n * @fires DragBoxEvent\n * @api\n */\nvar DragBox = /*@__PURE__*/(function (PointerInteraction) {\n function DragBox(opt_options) {\n\n PointerInteraction.call(this);\n\n var 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 /**\n * Function to execute just before `onboxend` is fired\n * @type {function(this:DragBox, import(\"../MapBrowserEvent.js\").default)}\n * @private\n */\n this.onBoxEnd_ = options.onBoxEnd ? options.onBoxEnd : VOID;\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 : always;\n\n /**\n * @private\n * @type {EndCondition}\n */\n this.boxEndCondition_ = options.boxEndCondition ?\n options.boxEndCondition : this.defaultBoxEndCondition;\n }\n\n if ( PointerInteraction ) DragBox.__proto__ = PointerInteraction;\n DragBox.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n DragBox.prototype.constructor = DragBox;\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 DragBox.prototype.defaultBoxEndCondition = function defaultBoxEndCondition (mapBrowserEvent, startPixel, endPixel) {\n var width = endPixel[0] - startPixel[0];\n var height = endPixel[1] - startPixel[1];\n return width * width + height * height >= this.minArea_;\n };\n\n /**\n * Returns geometry of last drawn box.\n * @return {import(\"../geom/Polygon.js\").default} Geometry.\n * @api\n */\n DragBox.prototype.getGeometry = function getGeometry () {\n return this.box_.getGeometry();\n };\n\n /**\n * @inheritDoc\n */\n DragBox.prototype.handleDragEvent = function handleDragEvent (mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return;\n }\n\n this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel);\n\n this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXDRAG,\n mapBrowserEvent.coordinate, mapBrowserEvent));\n };\n\n /**\n * @inheritDoc\n */\n DragBox.prototype.handleUpEvent = function handleUpEvent (mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return true;\n }\n\n this.box_.setMap(null);\n\n if (this.boxEndCondition_(mapBrowserEvent, this.startPixel_, mapBrowserEvent.pixel)) {\n this.onBoxEnd_(mapBrowserEvent);\n this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXEND,\n mapBrowserEvent.coordinate, mapBrowserEvent));\n }\n return false;\n };\n\n /**\n * @inheritDoc\n */\n DragBox.prototype.handleDownEvent = function handleDownEvent (mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return false;\n }\n\n if (mouseActionButton(mapBrowserEvent) &&\n this.condition_(mapBrowserEvent)) {\n this.startPixel_ = mapBrowserEvent.pixel;\n this.box_.setMap(mapBrowserEvent.map);\n this.box_.setPixels(this.startPixel_, this.startPixel_);\n this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXSTART,\n mapBrowserEvent.coordinate, mapBrowserEvent));\n return true;\n } else {\n return false;\n }\n };\n\n return DragBox;\n}(PointerInteraction));\n\n\nexport default DragBox;\n\n//# sourceMappingURL=DragBox.js.map","/**\n * @module ol/interaction/DragZoom\n */\nimport {easeOut} from '../easing.js';\nimport {shiftKeyOnly} from '../events/condition.js';\nimport {createOrUpdateFromCoordinates, getBottomLeft, getCenter, getTopRight, scaleFromCenter} from '../extent.js';\nimport DragBox from './DragBox.js';\n\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 */\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 */\nvar DragZoom = /*@__PURE__*/(function (DragBox) {\n function DragZoom(opt_options) {\n var options = opt_options ? opt_options : {};\n\n var condition = options.condition ? options.condition : shiftKeyOnly;\n\n DragBox.call(this, {\n condition: condition,\n className: options.className || 'ol-dragzoom',\n onBoxEnd: onBoxEnd\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 if ( DragBox ) DragZoom.__proto__ = DragBox;\n DragZoom.prototype = Object.create( DragBox && DragBox.prototype );\n DragZoom.prototype.constructor = DragZoom;\n\n return DragZoom;\n}(DragBox));\n\n\n/**\n * @this {DragZoom}\n */\nfunction onBoxEnd() {\n var map = this.getMap();\n var view = /** @type {!import(\"../View.js\").default} */ (map.getView());\n var size = /** @type {!import(\"../size.js\").Size} */ (map.getSize());\n var extent = this.getGeometry().getExtent();\n\n if (this.out_) {\n var mapExtent = view.calculateExtent(size);\n var boxPixelExtent = createOrUpdateFromCoordinates([\n map.getPixelFromCoordinate(getBottomLeft(extent)),\n map.getPixelFromCoordinate(getTopRight(extent))]);\n var factor = view.getResolutionForExtent(boxPixelExtent, size);\n\n scaleFromCenter(mapExtent, 1 / factor);\n extent = mapExtent;\n }\n\n var resolution = view.constrainResolution(\n view.getResolutionForExtent(extent, size));\n\n var center = getCenter(extent);\n center = view.constrainCenter(center);\n\n view.animate({\n resolution: resolution,\n center: center,\n duration: this.duration_,\n easing: easeOut\n });\n}\n\n\nexport default DragZoom;\n\n//# sourceMappingURL=DragZoom.js.map","/**\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//# sourceMappingURL=KeyCode.js.map","/**\n * @module ol/interaction/KeyboardPan\n */\nimport {rotate as rotateCoordinate} from '../coordinate.js';\nimport EventType from '../events/EventType.js';\nimport KeyCode from '../events/KeyCode.js';\nimport {noModifierKeys, targetNotEditable} from '../events/condition.js';\nimport Interaction, {pan} from './Interaction.js';\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~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/**\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 */\nvar KeyboardPan = /*@__PURE__*/(function (Interaction) {\n function KeyboardPan(opt_options) {\n\n Interaction.call(this, {\n handleEvent: handleEvent\n });\n\n var 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 noModifierKeys(mapBrowserEvent) &&\n targetNotEditable(mapBrowserEvent);\n };\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition !== undefined ?\n options.condition : 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_ = options.pixelDelta !== undefined ?\n options.pixelDelta : 128;\n\n }\n\n if ( Interaction ) KeyboardPan.__proto__ = Interaction;\n KeyboardPan.prototype = Object.create( Interaction && Interaction.prototype );\n KeyboardPan.prototype.constructor = KeyboardPan;\n\n return KeyboardPan;\n}(Interaction));\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 */\nfunction handleEvent(mapBrowserEvent) {\n var stopEvent = false;\n if (mapBrowserEvent.type == EventType.KEYDOWN) {\n var keyEvent = /** @type {KeyboardEvent} */ (mapBrowserEvent.originalEvent);\n var keyCode = keyEvent.keyCode;\n if (this.condition_(mapBrowserEvent) &&\n (keyCode == KeyCode.DOWN ||\n keyCode == KeyCode.LEFT ||\n keyCode == KeyCode.RIGHT ||\n keyCode == KeyCode.UP)) {\n var map = mapBrowserEvent.map;\n var view = map.getView();\n var mapUnitsDelta = view.getResolution() * this.pixelDelta_;\n var deltaX = 0, deltaY = 0;\n if (keyCode == KeyCode.DOWN) {\n deltaY = -mapUnitsDelta;\n } else if (keyCode == KeyCode.LEFT) {\n deltaX = -mapUnitsDelta;\n } else if (keyCode == KeyCode.RIGHT) {\n deltaX = mapUnitsDelta;\n } else {\n deltaY = mapUnitsDelta;\n }\n var delta = [deltaX, deltaY];\n rotateCoordinate(delta, view.getRotation());\n pan(view, delta, this.duration_);\n mapBrowserEvent.preventDefault();\n stopEvent = true;\n }\n }\n return !stopEvent;\n}\n\nexport default KeyboardPan;\n\n//# sourceMappingURL=KeyboardPan.js.map","/**\n * @module ol/interaction/KeyboardZoom\n */\nimport EventType from '../events/EventType.js';\nimport {targetNotEditable} from '../events/condition.js';\nimport Interaction, {zoomByDelta} from './Interaction.js';\n\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/**\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 */\nvar KeyboardZoom = /*@__PURE__*/(function (Interaction) {\n function KeyboardZoom(opt_options) {\n\n Interaction.call(this, {\n handleEvent: handleEvent\n });\n\n var 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 if ( Interaction ) KeyboardZoom.__proto__ = Interaction;\n KeyboardZoom.prototype = Object.create( Interaction && Interaction.prototype );\n KeyboardZoom.prototype.constructor = KeyboardZoom;\n\n return KeyboardZoom;\n}(Interaction));\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 */\nfunction handleEvent(mapBrowserEvent) {\n var stopEvent = false;\n if (mapBrowserEvent.type == EventType.KEYDOWN ||\n mapBrowserEvent.type == EventType.KEYPRESS) {\n var keyEvent = /** @type {KeyboardEvent} */ (mapBrowserEvent.originalEvent);\n var charCode = keyEvent.charCode;\n if (this.condition_(mapBrowserEvent) &&\n (charCode == '+'.charCodeAt(0) || charCode == '-'.charCodeAt(0))) {\n var map = mapBrowserEvent.map;\n var delta = (charCode == '+'.charCodeAt(0)) ? this.delta_ : -this.delta_;\n var view = map.getView();\n zoomByDelta(view, delta, undefined, this.duration_);\n mapBrowserEvent.preventDefault();\n stopEvent = true;\n }\n }\n return !stopEvent;\n}\n\nexport default KeyboardZoom;\n\n//# sourceMappingURL=KeyboardZoom.js.map","/**\n * @module ol/interaction/MouseWheelZoom\n */\nimport ViewHint from '../ViewHint.js';\nimport {always} from '../events/condition.js';\nimport {easeOut} from '../easing.js';\nimport EventType from '../events/EventType.js';\nimport {DEVICE_PIXEL_RATIO, FIREFOX, SAFARI} from '../has.js';\nimport Interaction, {zoomByDelta} from './Interaction.js';\nimport {clamp} from '../math.js';\n\n\n/**\n * Maximum mouse wheel delta.\n * @type {number}\n */\nvar MAX_DELTA = 1;\n\n\n/**\n * @enum {string}\n */\nexport var Mode = {\n TRACKPAD: 'trackpad',\n WHEEL: 'wheel'\n};\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 {number} [duration=250] Animation duration in milliseconds.\n * @property {number} [timeout=80] Mouse wheel timeout duration in milliseconds.\n * @property {boolean} [constrainResolution=false] When using a trackpad or\n * magic mouse, zoom to the closest integer zoom level after the scroll gesture\n * ends.\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 */\n\n\n/**\n * @classdesc\n * Allows the user to zoom the map by scrolling the mouse wheel.\n * @api\n */\nvar MouseWheelZoom = /*@__PURE__*/(function (Interaction) {\n function MouseWheelZoom(opt_options) {\n\n var options = opt_options ? opt_options : {};\n\n Interaction.call(/** @type {import(\"./Interaction.js\").InteractionOptions} */ this, (options));\n\n /**\n * @private\n * @type {number}\n */\n this.delta_ = 0;\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_ = options.useAnchor !== undefined ? options.useAnchor : true;\n\n /**\n * @private\n * @type {boolean}\n */\n this.constrainResolution_ = options.constrainResolution || false;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : always;\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.trackpadDeltaPerZoom_ = 300;\n\n /**\n * The zoom factor by which scroll zooming is allowed to exceed the limits.\n * @private\n * @type {number}\n */\n this.trackpadZoomBuffer_ = 1.5;\n\n }\n\n if ( Interaction ) MouseWheelZoom.__proto__ = Interaction;\n MouseWheelZoom.prototype = Object.create( Interaction && Interaction.prototype );\n MouseWheelZoom.prototype.constructor = MouseWheelZoom;\n\n /**\n * @private\n */\n MouseWheelZoom.prototype.decrementInteractingHint_ = function decrementInteractingHint_ () {\n this.trackpadTimeoutId_ = undefined;\n var view = this.getMap().getView();\n view.setHint(ViewHint.INTERACTING, -1);\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 * @override\n */\n MouseWheelZoom.prototype.handleEvent = function handleEvent (mapBrowserEvent) {\n if (!this.condition_(mapBrowserEvent)) {\n return true;\n }\n var type = mapBrowserEvent.type;\n if (type !== EventType.WHEEL && type !== EventType.MOUSEWHEEL) {\n return true;\n }\n\n mapBrowserEvent.preventDefault();\n\n var map = mapBrowserEvent.map;\n var wheelEvent = /** @type {WheelEvent} */ (mapBrowserEvent.originalEvent);\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 var delta;\n if (mapBrowserEvent.type == EventType.WHEEL) {\n delta = wheelEvent.deltaY;\n if (FIREFOX &&\n 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 } else if (mapBrowserEvent.type == EventType.MOUSEWHEEL) {\n delta = -wheelEvent.wheelDeltaY;\n if (SAFARI) {\n delta /= 3;\n }\n }\n\n if (delta === 0) {\n return false;\n }\n\n var 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 ?\n Mode.TRACKPAD :\n Mode.WHEEL;\n }\n\n if (this.mode_ === Mode.TRACKPAD) {\n var view = map.getView();\n if (this.trackpadTimeoutId_) {\n clearTimeout(this.trackpadTimeoutId_);\n } else {\n view.setHint(ViewHint.INTERACTING, 1);\n }\n this.trackpadTimeoutId_ = setTimeout(this.decrementInteractingHint_.bind(this), this.trackpadEventGap_);\n var resolution = view.getResolution() * Math.pow(2, delta / this.trackpadDeltaPerZoom_);\n var minResolution = view.getMinResolution();\n var maxResolution = view.getMaxResolution();\n var rebound = 0;\n if (resolution < minResolution) {\n resolution = Math.max(resolution, minResolution / this.trackpadZoomBuffer_);\n rebound = 1;\n } else if (resolution > maxResolution) {\n resolution = Math.min(resolution, maxResolution * this.trackpadZoomBuffer_);\n rebound = -1;\n }\n if (this.lastAnchor_) {\n var center = view.calculateCenterZoom(resolution, this.lastAnchor_);\n view.setCenter(view.constrainCenter(center));\n }\n view.setResolution(resolution);\n\n if (rebound === 0 && this.constrainResolution_) {\n view.animate({\n resolution: view.constrainResolution(resolution, delta > 0 ? -1 : 1),\n easing: easeOut,\n anchor: this.lastAnchor_,\n duration: this.duration_\n });\n }\n\n if (rebound > 0) {\n view.animate({\n resolution: minResolution,\n easing: easeOut,\n anchor: this.lastAnchor_,\n duration: 500\n });\n } else if (rebound < 0) {\n view.animate({\n resolution: maxResolution,\n easing: easeOut,\n anchor: this.lastAnchor_,\n duration: 500\n });\n }\n this.startTime_ = now;\n return false;\n }\n\n this.delta_ += delta;\n\n var timeLeft = Math.max(this.timeout_ - (now - this.startTime_), 0);\n\n clearTimeout(this.timeoutId_);\n this.timeoutId_ = setTimeout(this.handleWheelZoom_.bind(this, map), timeLeft);\n\n return false;\n };\n\n /**\n * @private\n * @param {import(\"../PluggableMap.js\").default} map Map.\n */\n MouseWheelZoom.prototype.handleWheelZoom_ = function handleWheelZoom_ (map) {\n var view = map.getView();\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n var maxDelta = MAX_DELTA;\n var delta = clamp(this.delta_, -maxDelta, maxDelta);\n zoomByDelta(view, -delta, this.lastAnchor_, this.duration_);\n this.mode_ = undefined;\n this.delta_ = 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 MouseWheelZoom.prototype.setMouseAnchor = function setMouseAnchor (useAnchor) {\n this.useAnchor_ = useAnchor;\n if (!useAnchor) {\n this.lastAnchor_ = null;\n }\n };\n\n return MouseWheelZoom;\n}(Interaction));\n\nexport default MouseWheelZoom;\n\n//# sourceMappingURL=MouseWheelZoom.js.map","/**\n * @module ol/interaction/PinchRotate\n */\nimport ViewHint from '../ViewHint.js';\nimport {FALSE} from '../functions.js';\nimport {rotate, rotateWithoutConstraints} from './Interaction.js';\nimport PointerInteraction, {centroid as centroidFromPointers} from './Pointer.js';\nimport {disable} from '../rotationconstraint.js';\n\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/**\n * @classdesc\n * Allows the user to rotate the map by twisting with two fingers\n * on a touch screen.\n * @api\n */\nvar PinchRotate = /*@__PURE__*/(function (PointerInteraction) {\n function PinchRotate(opt_options) {\n\n var options = opt_options ? opt_options : {};\n\n var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n\n if (!pointerOptions.stopDown) {\n pointerOptions.stopDown = FALSE;\n }\n\n PointerInteraction.call(this, 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 if ( PointerInteraction ) PinchRotate.__proto__ = PointerInteraction;\n PinchRotate.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n PinchRotate.prototype.constructor = PinchRotate;\n\n /**\n * @inheritDoc\n */\n PinchRotate.prototype.handleDragEvent = function handleDragEvent (mapBrowserEvent) {\n var rotationDelta = 0.0;\n\n var touch0 = this.targetPointers[0];\n var touch1 = this.targetPointers[1];\n\n // angle between touches\n var angle = Math.atan2(\n touch1.clientY - touch0.clientY,\n touch1.clientX - touch0.clientX);\n\n if (this.lastAngle_ !== undefined) {\n var delta = angle - this.lastAngle_;\n this.rotationDelta_ += delta;\n if (!this.rotating_ &&\n Math.abs(this.rotationDelta_) > this.threshold_) {\n this.rotating_ = true;\n }\n rotationDelta = delta;\n }\n this.lastAngle_ = angle;\n\n var map = mapBrowserEvent.map;\n var 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 var viewportPosition = map.getViewport().getBoundingClientRect();\n var centroid = centroidFromPointers(this.targetPointers);\n centroid[0] -= viewportPosition.left;\n centroid[1] -= viewportPosition.top;\n this.anchor_ = map.getCoordinateFromPixel(centroid);\n\n // rotate\n if (this.rotating_) {\n var rotation = view.getRotation();\n map.render();\n rotateWithoutConstraints(view, rotation + rotationDelta, this.anchor_);\n }\n };\n\n /**\n * @inheritDoc\n */\n PinchRotate.prototype.handleUpEvent = function handleUpEvent (mapBrowserEvent) {\n if (this.targetPointers.length < 2) {\n var map = mapBrowserEvent.map;\n var view = map.getView();\n view.setHint(ViewHint.INTERACTING, -1);\n if (this.rotating_) {\n var rotation = view.getRotation();\n rotate(view, rotation, this.anchor_, this.duration_);\n }\n return false;\n } else {\n return true;\n }\n };\n\n /**\n * @inheritDoc\n */\n PinchRotate.prototype.handleDownEvent = function handleDownEvent (mapBrowserEvent) {\n if (this.targetPointers.length >= 2) {\n var map = mapBrowserEvent.map;\n this.anchor_ = null;\n this.lastAngle_ = undefined;\n this.rotating_ = false;\n this.rotationDelta_ = 0.0;\n if (!this.handlingDownUpSequence) {\n map.getView().setHint(ViewHint.INTERACTING, 1);\n }\n return true;\n } else {\n return false;\n }\n };\n\n return PinchRotate;\n}(PointerInteraction));\n\nexport default PinchRotate;\n\n//# sourceMappingURL=PinchRotate.js.map","/**\n * @module ol/interaction/PinchZoom\n */\nimport ViewHint from '../ViewHint.js';\nimport {FALSE} from '../functions.js';\nimport {zoom, zoomWithoutConstraints} from './Interaction.js';\nimport PointerInteraction, {centroid as centroidFromPointers} from './Pointer.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=400] Animation duration in milliseconds.\n * @property {boolean} [constrainResolution=false] Zoom to the closest integer\n * zoom level after the pinch gesture ends.\n */\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 */\nvar PinchZoom = /*@__PURE__*/(function (PointerInteraction) {\n function PinchZoom(opt_options) {\n\n var options = opt_options ? opt_options : {};\n\n var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n\n if (!pointerOptions.stopDown) {\n pointerOptions.stopDown = FALSE;\n }\n\n PointerInteraction.call(this, pointerOptions);\n\n /**\n * @private\n * @type {boolean}\n */\n this.constrainResolution_ = options.constrainResolution || false;\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 if ( PointerInteraction ) PinchZoom.__proto__ = PointerInteraction;\n PinchZoom.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n PinchZoom.prototype.constructor = PinchZoom;\n\n /**\n * @inheritDoc\n */\n PinchZoom.prototype.handleDragEvent = function handleDragEvent (mapBrowserEvent) {\n var scaleDelta = 1.0;\n\n var touch0 = this.targetPointers[0];\n var touch1 = this.targetPointers[1];\n var dx = touch0.clientX - touch1.clientX;\n var dy = touch0.clientY - touch1.clientY;\n\n // distance between touches\n var 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\n var map = mapBrowserEvent.map;\n var view = map.getView();\n var resolution = view.getResolution();\n var maxResolution = view.getMaxResolution();\n var minResolution = view.getMinResolution();\n var newResolution = resolution * scaleDelta;\n if (newResolution > maxResolution) {\n scaleDelta = maxResolution / resolution;\n newResolution = maxResolution;\n } else if (newResolution < minResolution) {\n scaleDelta = minResolution / resolution;\n newResolution = minResolution;\n }\n\n if (scaleDelta != 1.0) {\n this.lastScaleDelta_ = scaleDelta;\n }\n\n // scale anchor point.\n var viewportPosition = map.getViewport().getBoundingClientRect();\n var centroid = centroidFromPointers(this.targetPointers);\n centroid[0] -= viewportPosition.left;\n centroid[1] -= viewportPosition.top;\n this.anchor_ = map.getCoordinateFromPixel(centroid);\n\n // scale, bypass the resolution constraint\n map.render();\n zoomWithoutConstraints(view, newResolution, this.anchor_);\n };\n\n /**\n * @inheritDoc\n */\n PinchZoom.prototype.handleUpEvent = function handleUpEvent (mapBrowserEvent) {\n if (this.targetPointers.length < 2) {\n var map = mapBrowserEvent.map;\n var view = map.getView();\n view.setHint(ViewHint.INTERACTING, -1);\n var resolution = view.getResolution();\n if (this.constrainResolution_ ||\n resolution < view.getMinResolution() ||\n resolution > view.getMaxResolution()) {\n // Zoom to final resolution, with an animation, and provide a\n // direction not to zoom out/in if user was pinching in/out.\n // Direction is > 0 if pinching out, and < 0 if pinching in.\n var direction = this.lastScaleDelta_ - 1;\n zoom(view, resolution, this.anchor_, this.duration_, direction);\n }\n return false;\n } else {\n return true;\n }\n };\n\n /**\n * @inheritDoc\n */\n PinchZoom.prototype.handleDownEvent = function handleDownEvent (mapBrowserEvent) {\n if (this.targetPointers.length >= 2) {\n var map = mapBrowserEvent.map;\n this.anchor_ = null;\n this.lastDistance_ = undefined;\n this.lastScaleDelta_ = 1;\n if (!this.handlingDownUpSequence) {\n map.getView().setHint(ViewHint.INTERACTING, 1);\n }\n return true;\n } else {\n return false;\n }\n };\n\n return PinchZoom;\n}(PointerInteraction));\n\nexport default PinchZoom;\n\n//# sourceMappingURL=PinchZoom.js.map","/**\n * @module ol/interaction\n */\nimport Collection from './Collection.js';\nimport Kinetic from './Kinetic.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 MouseWheelZoom from './interaction/MouseWheelZoom.js';\nimport PinchRotate from './interaction/PinchRotate.js';\nimport PinchZoom from './interaction/PinchZoom.js';\nimport {focus} from './events/condition.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/**\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} [constrainResolution=false] Zoom to the closest integer\n * zoom level after the wheel/trackpad or pinch gesture ends.\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\n * mousewheel zoom.\n * @property {number} [zoomDuration] Duration of the zoom animation in\n * milliseconds.\n */\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. The default set of\n * 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\n var options = opt_options ? opt_options : {};\n\n var interactions = new Collection();\n\n var kinetic = new Kinetic(-0.005, 0.05, 100);\n\n var altShiftDragRotate = options.altShiftDragRotate !== undefined ?\n options.altShiftDragRotate : true;\n if (altShiftDragRotate) {\n interactions.push(new DragRotate());\n }\n\n var doubleClickZoom = options.doubleClickZoom !== undefined ?\n options.doubleClickZoom : true;\n if (doubleClickZoom) {\n interactions.push(new DoubleClickZoom({\n delta: options.zoomDelta,\n duration: options.zoomDuration\n }));\n }\n\n var dragPan = options.dragPan !== undefined ? options.dragPan : true;\n if (dragPan) {\n interactions.push(new DragPan({\n condition: options.onFocusOnly ? focus : undefined,\n kinetic: kinetic\n }));\n }\n\n var pinchRotate = options.pinchRotate !== undefined ? options.pinchRotate :\n true;\n if (pinchRotate) {\n interactions.push(new PinchRotate());\n }\n\n var pinchZoom = options.pinchZoom !== undefined ? options.pinchZoom : true;\n if (pinchZoom) {\n interactions.push(new PinchZoom({\n constrainResolution: options.constrainResolution,\n duration: options.zoomDuration\n }));\n }\n\n var keyboard = options.keyboard !== undefined ? options.keyboard : true;\n if (keyboard) {\n interactions.push(new KeyboardPan());\n interactions.push(new KeyboardZoom({\n delta: options.zoomDelta,\n duration: options.zoomDuration\n }));\n }\n\n var mouseWheelZoom = options.mouseWheelZoom !== undefined ?\n options.mouseWheelZoom : true;\n if (mouseWheelZoom) {\n interactions.push(new MouseWheelZoom({\n condition: options.onFocusOnly ? focus : undefined,\n constrainResolution: options.constrainResolution,\n duration: options.zoomDuration\n }));\n }\n\n var shiftDragZoom = options.shiftDragZoom !== undefined ?\n options.shiftDragZoom : true;\n if (shiftDragZoom) {\n interactions.push(new DragZoom({\n duration: options.zoomDuration\n }));\n }\n\n return interactions;\n\n}\n\n//# sourceMappingURL=interaction.js.map","/**\n * @module ol/reproj/common\n */\n\n/**\n * Default maximum allowed threshold (in pixels) for reprojection\n * triangulation.\n * @type {number}\n */\nexport var ERROR_THRESHOLD = 0.5;\n\n/**\n * Enable automatic reprojection of raster sources. Default is `true`.\n * TODO: decide if we want to expose this as a build flag or remove it\n * @type {boolean}\n */\nexport var ENABLE_RASTER_REPROJECTION = true;\n\n//# sourceMappingURL=common.js.map","/**\n * @module ol/ImageBase\n */\nimport {abstract} from './util.js';\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\n\n/**\n * @abstract\n */\nvar ImageBase = /*@__PURE__*/(function (EventTarget) {\n function ImageBase(extent, resolution, pixelRatio, state) {\n\n EventTarget.call(this);\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 if ( EventTarget ) ImageBase.__proto__ = EventTarget;\n ImageBase.prototype = Object.create( EventTarget && EventTarget.prototype );\n ImageBase.prototype.constructor = ImageBase;\n\n /**\n * @protected\n */\n ImageBase.prototype.changed = function changed () {\n this.dispatchEvent(EventType.CHANGE);\n };\n\n /**\n * @return {import(\"./extent.js\").Extent} Extent.\n */\n ImageBase.prototype.getExtent = function getExtent () {\n return this.extent;\n };\n\n /**\n * @abstract\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n */\n ImageBase.prototype.getImage = function getImage () {\n return abstract();\n };\n\n /**\n * @return {number} PixelRatio.\n */\n ImageBase.prototype.getPixelRatio = function getPixelRatio () {\n return this.pixelRatio_;\n };\n\n /**\n * @return {number} Resolution.\n */\n ImageBase.prototype.getResolution = function getResolution () {\n return /** @type {number} */ (this.resolution);\n };\n\n /**\n * @return {import(\"./ImageState.js\").default} State.\n */\n ImageBase.prototype.getState = function getState () {\n return this.state;\n };\n\n /**\n * Load not yet loaded URI.\n * @abstract\n */\n ImageBase.prototype.load = function load () {\n abstract();\n };\n\n return ImageBase;\n}(EventTarget));\n\n\nexport default ImageBase;\n\n//# sourceMappingURL=ImageBase.js.map","/**\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};\n\n//# sourceMappingURL=ImageState.js.map","/**\n * @module ol/ImageCanvas\n */\nimport ImageBase from './ImageBase.js';\nimport ImageState from './ImageState.js';\n\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=))} Loader\n */\n\n\nvar ImageCanvas = /*@__PURE__*/(function (ImageBase) {\n function ImageCanvas(extent, resolution, pixelRatio, canvas, opt_loader) {\n\n var state = opt_loader !== undefined ? ImageState.IDLE : ImageState.LOADED;\n\n ImageBase.call(this, 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 if ( ImageBase ) ImageCanvas.__proto__ = ImageBase;\n ImageCanvas.prototype = Object.create( ImageBase && ImageBase.prototype );\n ImageCanvas.prototype.constructor = ImageCanvas;\n\n /**\n * Get any error associated with asynchronous rendering.\n * @return {Error} Any error that occurred during rendering.\n */\n ImageCanvas.prototype.getError = function 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 ImageCanvas.prototype.handleLoad_ = function 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 * @inheritDoc\n */\n ImageCanvas.prototype.load = function 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 ImageCanvas.prototype.getImage = function getImage () {\n return this.canvas_;\n };\n\n return ImageCanvas;\n}(ImageBase));\n\n\nexport default ImageCanvas;\n\n//# sourceMappingURL=ImageCanvas.js.map","/**\n * @module ol/LayerType\n */\n\n/**\n * A layer type used when creating layer renderers.\n * @enum {string}\n */\nexport default {\n IMAGE: 'IMAGE',\n TILE: 'TILE',\n VECTOR_TILE: 'VECTOR_TILE',\n VECTOR: 'VECTOR'\n};\n\n//# sourceMappingURL=LayerType.js.map","/**\n * @module ol/layer/VectorRenderType\n */\n\n/**\n * @enum {string}\n * Render mode for vector layers:\n * * `'image'`: Vector layers 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 * * `'vector'`: Vector layers are rendered as vectors. Most accurate rendering\n * even during animations, but slower performance.\n * @api\n */\nexport default {\n IMAGE: 'image',\n VECTOR: 'vector'\n};\n\n//# sourceMappingURL=VectorRenderType.js.map","/**\n * @module ol/render/Event\n */\n\nimport Event from '../events/Event.js';\n\nvar RenderEvent = /*@__PURE__*/(function (Event) {\n function RenderEvent(type, opt_vectorContext, opt_frameState, opt_context, opt_glContext) {\n\n Event.call(this, type);\n\n /**\n * For canvas, this is an instance of {@link module:ol/render/canvas/Immediate}.\n * @type {import(\"./VectorContext.js\").default|undefined}\n * @api\n */\n this.vectorContext = opt_vectorContext;\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. Only available when a Canvas renderer is used, null\n * otherwise.\n * @type {CanvasRenderingContext2D|null|undefined}\n * @api\n */\n this.context = opt_context;\n\n /**\n * WebGL context. Only available when a WebGL renderer is used, null\n * otherwise.\n * @type {import(\"../webgl/Context.js\").default|null|undefined}\n * @api\n */\n this.glContext = opt_glContext;\n\n }\n\n if ( Event ) RenderEvent.__proto__ = Event;\n RenderEvent.prototype = Object.create( Event && Event.prototype );\n RenderEvent.prototype.constructor = RenderEvent;\n\n return RenderEvent;\n}(Event));\n\nexport default RenderEvent;\n\n//# sourceMappingURL=Event.js.map","/**\n * @module ol/structs/LRUCache\n */\n\nimport {assert} from '../asserts.js';\nimport EventTarget from '../events/Target.js';\nimport EventType from '../events/EventType.js';\n\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/**\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\").Event\n * @template T\n */\nvar LRUCache = /*@__PURE__*/(function (EventTarget) {\n function LRUCache(opt_highWaterMark) {\n\n EventTarget.call(this);\n\n /**\n * @type {number}\n */\n this.highWaterMark = 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 if ( EventTarget ) LRUCache.__proto__ = EventTarget;\n LRUCache.prototype = Object.create( EventTarget && EventTarget.prototype );\n LRUCache.prototype.constructor = LRUCache;\n\n\n /**\n * @return {boolean} Can expire cache.\n */\n LRUCache.prototype.canExpireCache = function canExpireCache () {\n return this.getCount() > this.highWaterMark;\n };\n\n\n /**\n * FIXME empty description for jsdoc\n */\n LRUCache.prototype.clear = function clear () {\n this.count_ = 0;\n this.entries_ = {};\n this.oldest_ = null;\n this.newest_ = null;\n this.dispatchEvent(EventType.CLEAR);\n };\n\n\n /**\n * @param {string} key Key.\n * @return {boolean} Contains key.\n */\n LRUCache.prototype.containsKey = function containsKey (key) {\n return this.entries_.hasOwnProperty(key);\n };\n\n\n /**\n * @param {function(this: S, T, string, LRUCache): ?} 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 * @param {S=} opt_this The object to use as `this` in `f`.\n * @template S\n */\n LRUCache.prototype.forEach = function forEach (f, opt_this) {\n var entry = this.oldest_;\n while (entry) {\n f.call(opt_this, entry.value_, entry.key_, this);\n entry = entry.newer;\n }\n };\n\n\n /**\n * @param {string} key Key.\n * @return {T} Value.\n */\n LRUCache.prototype.get = function get (key) {\n var entry = this.entries_[key];\n assert(entry !== undefined,\n 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 /**\n * Remove an entry from the cache.\n * @param {string} key The entry key.\n * @return {T} The removed entry.\n */\n LRUCache.prototype.remove = function remove (key) {\n var entry = this.entries_[key];\n assert(entry !== undefined, 15); // Tried to get a value for a key that does not exist in the cache\n if (entry === this.newest_) {\n this.newest_ = /** @type {Entry} */ (entry.older);\n if (this.newest_) {\n this.newest_.newer = null;\n }\n } 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 /**\n * @return {number} Count.\n */\n LRUCache.prototype.getCount = function getCount () {\n return this.count_;\n };\n\n\n /**\n * @return {Array<string>} Keys.\n */\n LRUCache.prototype.getKeys = function getKeys () {\n var keys = new Array(this.count_);\n var i = 0;\n var entry;\n for (entry = this.newest_; entry; entry = entry.older) {\n keys[i++] = entry.key_;\n }\n return keys;\n };\n\n\n /**\n * @return {Array<T>} Values.\n */\n LRUCache.prototype.getValues = function getValues () {\n var values = new Array(this.count_);\n var i = 0;\n var entry;\n for (entry = this.newest_; entry; entry = entry.older) {\n values[i++] = entry.value_;\n }\n return values;\n };\n\n\n /**\n * @return {T} Last value.\n */\n LRUCache.prototype.peekLast = function peekLast () {\n return this.oldest_.value_;\n };\n\n\n /**\n * @return {string} Last key.\n */\n LRUCache.prototype.peekLastKey = function peekLastKey () {\n return this.oldest_.key_;\n };\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 LRUCache.prototype.peekFirstKey = function peekFirstKey () {\n return this.newest_.key_;\n };\n\n\n /**\n * @return {T} value Value.\n */\n LRUCache.prototype.pop = function pop () {\n var entry = this.oldest_;\n delete this.entries_[entry.key_];\n if (entry.newer) {\n entry.newer.older = null;\n }\n this.oldest_ = /** @type {Entry} */ (entry.newer);\n if (!this.oldest_) {\n this.newest_ = null;\n }\n --this.count_;\n return entry.value_;\n };\n\n\n /**\n * @param {string} key Key.\n * @param {T} value Value.\n */\n LRUCache.prototype.replace = function replace (key, value) {\n this.get(key); // update `newest_`\n this.entries_[key].value_ = value;\n };\n\n\n /**\n * @param {string} key Key.\n * @param {T} value Value.\n */\n LRUCache.prototype.set = function set (key, value) {\n assert(!(key in this.entries_),\n 16); // Tried to set a value for a key that is used already\n var entry = /** @type {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 /**\n * Set a maximum number of entries for the cache.\n * @param {number} size Cache size.\n * @api\n */\n LRUCache.prototype.setSize = function setSize (size) {\n this.highWaterMark = size;\n };\n\n\n /**\n * Prune the cache.\n */\n LRUCache.prototype.prune = function prune () {\n while (this.canExpireCache()) {\n this.pop();\n }\n };\n\n return LRUCache;\n}(EventTarget));\n\nexport default LRUCache;\n\n//# sourceMappingURL=LRUCache.js.map","/**\n * @module ol/render/canvas\n */\nimport {getFontFamilies} from '../css.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {clear} from '../obj.js';\nimport LRUCache from '../structs/LRUCache.js';\nimport {create as createTransform} from '../transform.js';\n\n\n/**\n * @typedef {Object} FillState\n * @property {import(\"../colorlike.js\").ColorLike} fillStyle\n */\n\n\n/**\n * @typedef {Object} FillStrokeState\n * @property {import(\"../colorlike.js\").ColorLike} [currentFillStyle]\n * @property {import(\"../colorlike.js\").ColorLike} [currentStrokeStyle]\n * @property {string} [currentLineCap]\n * @property {Array<number>} currentLineDash\n * @property {number} [currentLineDashOffset]\n * @property {string} [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 {string} [lineCap]\n * @property {Array<number>} lineDash\n * @property {number} [lineDashOffset]\n * @property {string} [lineJoin]\n * @property {number} [lineWidth]\n * @property {number} [miterLimit]\n */\n\n\n/**\n * @typedef {Object} StrokeState\n * @property {string} lineCap\n * @property {Array<number>} lineDash\n * @property {number} lineDashOffset\n * @property {string} lineJoin\n * @property {number} lineWidth\n * @property {number} miterLimit\n * @property {import(\"../colorlike.js\").ColorLike} strokeStyle\n */\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 {number} [scale]\n * @property {Array<number>} [padding]\n */\n\n\n/**\n * Container for decluttered replay instructions that need to be rendered or\n * omitted together, i.e. when styles render both an image and text, or for the\n * characters that form text along lines. The basic elements of this array are\n * `[minX, minY, maxX, maxY, count]`, where the first four entries are the\n * rendered extent of the group in pixel space. `count` is the number of styles\n * in the group, i.e. 2 when an image and a text are grouped, or 1 otherwise.\n * In addition to these four elements, declutter instruction arrays (i.e. the\n * arguments to {@link module:ol/render/canvas~drawImage} are appended to the array.\n * @typedef {Array<*>} DeclutterGroup\n */\n\n\n/**\n * @const\n * @type {string}\n */\nexport var defaultFont = '10px sans-serif';\n\n\n/**\n * @const\n * @type {import(\"../color.js\").Color}\n */\nexport var defaultFillStyle = [0, 0, 0, 1];\n\n\n/**\n * @const\n * @type {string}\n */\nexport var defaultLineCap = 'round';\n\n\n/**\n * @const\n * @type {Array<number>}\n */\nexport var defaultLineDash = [];\n\n\n/**\n * @const\n * @type {number}\n */\nexport var defaultLineDashOffset = 0;\n\n\n/**\n * @const\n * @type {string}\n */\nexport var defaultLineJoin = 'round';\n\n\n/**\n * @const\n * @type {number}\n */\nexport var defaultMiterLimit = 10;\n\n\n/**\n * @const\n * @type {import(\"../color.js\").Color}\n */\nexport var defaultStrokeStyle = [0, 0, 0, 1];\n\n\n/**\n * @const\n * @type {string}\n */\nexport var defaultTextAlign = 'center';\n\n\n/**\n * @const\n * @type {string}\n */\nexport var defaultTextBaseline = 'middle';\n\n\n/**\n * @const\n * @type {Array<number>}\n */\nexport var defaultPadding = [0, 0, 0, 0];\n\n\n/**\n * @const\n * @type {number}\n */\nexport var defaultLineWidth = 1;\n\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 * @type {LRUCache<HTMLCanvasElement>}\n * @api\n */\nexport var labelCache = new LRUCache();\n\n\n/**\n * @type {!Object<string, number>}\n */\nexport var checkedFonts = {};\n\n\n/**\n * @type {CanvasRenderingContext2D}\n */\nvar measureContext = null;\n\n\n/**\n * @type {!Object<string, number>}\n */\nexport var textHeights = {};\n\n\n/**\n * Clears the label cache when a font becomes available.\n * @param {string} fontSpec CSS font spec.\n */\nexport var checkFont = (function() {\n var retries = 60;\n var checked = checkedFonts;\n var size = '32px ';\n var referenceFonts = ['monospace', 'serif'];\n var len = referenceFonts.length;\n var text = 'wmytzilWMYTZIL@#/&?$%10\\uF013';\n var interval, referenceWidth;\n\n function isAvailable(font) {\n var context = getMeasureContext();\n // Check weight ranges according to\n // https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#Fallback_weights\n for (var weight = 100; weight <= 700; weight += 300) {\n var fontWeight = weight + ' ';\n var available = true;\n for (var i = 0; i < len; ++i) {\n var referenceFont = referenceFonts[i];\n context.font = fontWeight + size + referenceFont;\n referenceWidth = context.measureText(text).width;\n if (font != referenceFont) {\n context.font = fontWeight + size + font + ',' + referenceFont;\n var width = context.measureText(text).width;\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 // Consider font available when it is available in one weight range.\n //FIXME With this we miss rare corner cases, so we should consider\n //FIXME checking availability for each requested weight range.\n return true;\n }\n }\n return false;\n }\n\n function check() {\n var done = true;\n for (var font in checked) {\n if (checked[font] < retries) {\n if (isAvailable(font)) {\n checked[font] = retries;\n clear(textHeights);\n // Make sure that loaded fonts are picked up by Safari\n measureContext = null;\n labelCache.clear();\n } else {\n ++checked[font];\n done = false;\n }\n }\n }\n if (done) {\n clearInterval(interval);\n interval = undefined;\n }\n }\n\n return function(fontSpec) {\n var fontFamilies = getFontFamilies(fontSpec);\n if (!fontFamilies) {\n return;\n }\n for (var i = 0, ii = fontFamilies.length; i < ii; ++i) {\n var fontFamily = fontFamilies[i];\n if (!(fontFamily in checked)) {\n checked[fontFamily] = retries;\n if (!isAvailable(fontFamily)) {\n checked[fontFamily] = 0;\n if (interval === undefined) {\n interval = setInterval(check, 32);\n }\n }\n }\n }\n };\n})();\n\n\n/**\n * @return {CanvasRenderingContext2D} Measure context.\n */\nfunction getMeasureContext() {\n if (!measureContext) {\n measureContext = createCanvasContext2D(1, 1);\n }\n return measureContext;\n}\n\n\n/**\n * @param {string} font Font to use for measuring.\n * @return {import(\"../size.js\").Size} Measurement.\n */\nexport var measureTextHeight = (function() {\n var span;\n var heights = textHeights;\n return function(font) {\n var height = heights[font];\n if (height == undefined) {\n if (!span) {\n span = document.createElement('span');\n span.textContent = 'M';\n span.style.margin = span.style.padding = '0 !important';\n span.style.position = 'absolute !important';\n span.style.left = '-99999px !important';\n }\n span.style.font = font;\n document.body.appendChild(span);\n height = heights[font] = span.offsetHeight;\n document.body.removeChild(span);\n }\n return height;\n };\n})();\n\n\n/**\n * @param {string} font Font.\n * @param {string} text Text.\n * @return {number} Width.\n */\nexport function measureTextWidth(font, text) {\n var measureContext = getMeasureContext();\n if (font != measureContext.font) {\n measureContext.font = font;\n }\n return measureContext.measureText(text).width;\n}\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\nexport var resetTransform = createTransform();\n\n\n/**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../transform.js\").Transform|null} transform Transform.\n * @param {number} opacity Opacity.\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} image Image.\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 {number} scale Scale.\n */\nexport function drawImage(context,\n transform, opacity, image, originX, originY, w, h, x, y, scale) {\n var alpha;\n if (opacity != 1) {\n alpha = context.globalAlpha;\n context.globalAlpha = alpha * opacity;\n }\n if (transform) {\n context.setTransform.apply(context, transform);\n }\n\n context.drawImage(image, originX, originY, w, h, x, y, w * scale, h * scale);\n\n if (alpha) {\n context.globalAlpha = alpha;\n }\n if (transform) {\n context.setTransform.apply(context, resetTransform);\n }\n}\n\n//# sourceMappingURL=canvas.js.map","/**\n * @module ol/color\n */\nimport {assert} from './asserts.js';\nimport {clamp} from './math.js';\n\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/**\n * This RegExp matches # followed by 3, 4, 6, or 8 hex digits.\n * @const\n * @type {RegExp}\n * @private\n */\nvar HEX_COLOR_RE_ = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i;\n\n\n/**\n * Regular expression for matching potential named color style strings.\n * @const\n * @type {RegExp}\n * @private\n */\nvar NAMED_COLOR_RE_ = /^([a-z]*)$/i;\n\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 var el = document.createElement('div');\n el.style.color = color;\n if (el.style.color !== '') {\n document.body.appendChild(el);\n var rgb = getComputedStyle(el).color;\n document.body.removeChild(el);\n return rgb;\n } else {\n return '';\n }\n}\n\n\n/**\n * @param {string} s String.\n * @return {Color} Color.\n */\nexport var fromString = (\n function() {\n\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 var MAX_CACHE_SIZE = 1024;\n\n /**\n * @type {Object<string, Color>}\n */\n var cache = {};\n\n /**\n * @type {number}\n */\n var cacheSize = 0;\n\n return (\n /**\n * @param {string} s String.\n * @return {Color} Color.\n */\n function(s) {\n var color;\n if (cache.hasOwnProperty(s)) {\n color = cache[s];\n } else {\n if (cacheSize >= MAX_CACHE_SIZE) {\n var i = 0;\n for (var key in cache) {\n if ((i++ & 3) === 0) {\n delete cache[key];\n --cacheSize;\n }\n }\n }\n color = fromStringInternal_(s);\n cache[s] = color;\n ++cacheSize;\n }\n return color;\n }\n );\n\n })();\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 var 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)) { // hex\n var n = s.length - 1; // number of hex digits\n var d; // number of digits per channel\n if (n <= 4) {\n d = 1;\n } else {\n d = 2;\n }\n var hasAlpha = n === 4 || n === 8;\n r = parseInt(s.substr(1 + 0 * d, d), 16);\n g = parseInt(s.substr(1 + 1 * d, d), 16);\n b = parseInt(s.substr(1 + 2 * d, d), 16);\n if (hasAlpha) {\n a = parseInt(s.substr(1 + 3 * d, d), 16);\n } 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) { // rgba()\n color = s.slice(5, -1).split(',').map(Number);\n normalize(color);\n } else if (s.indexOf('rgb(') == 0) { // 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/**\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/**\n * @param {Color} color Color.\n * @return {string} String.\n */\nexport function toString(color) {\n var r = color[0];\n if (r != (r | 0)) {\n r = (r + 0.5) | 0;\n }\n var g = color[1];\n if (g != (g | 0)) {\n g = (g + 0.5) | 0;\n }\n var b = color[2];\n if (b != (b | 0)) {\n b = (b + 0.5) | 0;\n }\n var a = color[3] === undefined ? 1 : color[3];\n return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n}\n\n//# sourceMappingURL=color.js.map","/**\n * @module ol/colorlike\n */\nimport {toString} from './color.js';\n\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/**\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//# sourceMappingURL=colorlike.js.map","/**\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 */\nvar VectorContext = function VectorContext () {};\n\nVectorContext.prototype.drawCustom = function drawCustom (geometry, feature, renderer) {};\n\n/**\n * Render a geometry.\n *\n * @param {import(\"../geom/Geometry.js\").default} geometry The geometry to render.\n */\nVectorContext.prototype.drawGeometry = function drawGeometry (geometry) {};\n\n/**\n * Set the rendering style.\n *\n * @param {import(\"../style/Style.js\").default} style The rendering style.\n */\nVectorContext.prototype.setStyle = function setStyle (style) {};\n\n/**\n * @param {import(\"../geom/Circle.js\").default} circleGeometry Circle geometry.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawCircle = function drawCircle (circleGeometry, feature) {};\n\n/**\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n */\nVectorContext.prototype.drawFeature = function drawFeature (feature, style) {};\n\n/**\n * @param {import(\"../geom/GeometryCollection.js\").default} geometryCollectionGeometry Geometry collection.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawGeometryCollection = function 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\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawLineString = function drawLineString (lineStringGeometry, feature) {};\n\n/**\n * @param {import(\"../geom/MultiLineString.js\").default|import(\"./Feature.js\").default} multiLineStringGeometry MultiLineString geometry.\n * @param {import(\"../Feature.js\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawMultiLineString = function drawMultiLineString (multiLineStringGeometry, feature) {};\n\n/**\n * @param {import(\"../geom/MultiPoint.js\").default|import(\"./Feature.js\").default} multiPointGeometry MultiPoint geometry.\n * @param {import(\"../Feature.js\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawMultiPoint = function drawMultiPoint (multiPointGeometry, feature) {};\n\n/**\n * @param {import(\"../geom/MultiPolygon.js\").default} multiPolygonGeometry MultiPolygon geometry.\n * @param {import(\"../Feature.js\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawMultiPolygon = function drawMultiPolygon (multiPolygonGeometry, feature) {};\n\n/**\n * @param {import(\"../geom/Point.js\").default|import(\"./Feature.js\").default} pointGeometry Point geometry.\n * @param {import(\"../Feature.js\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawPoint = function drawPoint (pointGeometry, feature) {};\n\n/**\n * @param {import(\"../geom/Polygon.js\").default|import(\"./Feature.js\").default} polygonGeometry Polygon geometry.\n * @param {import(\"../Feature.js\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawPolygon = function drawPolygon (polygonGeometry, feature) {};\n\n/**\n * @param {import(\"../geom/Geometry.js\").default|import(\"./Feature.js\").default} geometry Geometry.\n * @param {import(\"../Feature.js\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawText = function 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 */\nVectorContext.prototype.setFillStrokeStyle = function setFillStrokeStyle (fillStyle, strokeStyle) {};\n\n/**\n * @param {import(\"../style/Image.js\").default} imageStyle Image style.\n * @param {import(\"./canvas.js\").DeclutterGroup=} opt_declutterGroup Declutter.\n */\nVectorContext.prototype.setImageStyle = function setImageStyle (imageStyle, opt_declutterGroup) {};\n\n/**\n * @param {import(\"../style/Text.js\").default} textStyle Text style.\n * @param {import(\"./canvas.js\").DeclutterGroup=} opt_declutterGroup Declutter.\n */\nVectorContext.prototype.setTextStyle = function setTextStyle (textStyle, opt_declutterGroup) {};\n\nexport default VectorContext;\n\n//# sourceMappingURL=VectorContext.js.map","/**\n * @module ol/render/canvas/Immediate\n */\n// FIXME test, especially polygons with holes and multipolygons\n// FIXME need to handle large thick features (where pixel size matters)\n// FIXME add offset and end to ol/geom/flat/transform~transform2D?\n\nimport {equals} from '../../array.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {intersects} from '../../extent.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport {transformGeom2D} from '../../geom/SimpleGeometry.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {CANVAS_LINE_DASH} from '../../has.js';\nimport VectorContext from '../VectorContext.js';\nimport {defaultTextAlign, defaultFillStyle, defaultLineCap, defaultLineDash, defaultLineDashOffset, defaultLineJoin, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, defaultTextBaseline, defaultFont} from '../canvas.js';\nimport {create as createTransform, compose as composeTransform} from '../../transform.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 */\nvar CanvasImmediateRenderer = /*@__PURE__*/(function (VectorContext) {\n function CanvasImmediateRenderer(context, pixelRatio, extent, transform, viewRotation) {\n VectorContext.call(this);\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 {?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 {number}\n */\n this.imageScale_ = 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 {number}\n */\n this.textScale_ = 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 if ( VectorContext ) CanvasImmediateRenderer.__proto__ = VectorContext;\n CanvasImmediateRenderer.prototype = Object.create( VectorContext && VectorContext.prototype );\n CanvasImmediateRenderer.prototype.constructor = CanvasImmediateRenderer;\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @private\n */\n CanvasImmediateRenderer.prototype.drawImages_ = function drawImages_ (flatCoordinates, offset, end, stride) {\n if (!this.image_) {\n return;\n }\n var pixelCoordinates = transform2D(\n flatCoordinates, offset, end, 2, this.transform_,\n this.pixelCoordinates_);\n var context = this.context_;\n var localTransform = this.tmpLocalTransform_;\n var alpha = context.globalAlpha;\n if (this.imageOpacity_ != 1) {\n context.globalAlpha = alpha * this.imageOpacity_;\n }\n var rotation = this.imageRotation_;\n if (this.imageRotateWithView_) {\n rotation += this.viewRotation_;\n }\n for (var i = 0, ii = pixelCoordinates.length; i < ii; i += 2) {\n var x = pixelCoordinates[i] - this.imageAnchorX_;\n var y = pixelCoordinates[i + 1] - this.imageAnchorY_;\n if (rotation !== 0 || this.imageScale_ != 1) {\n var centerX = x + this.imageAnchorX_;\n var centerY = y + this.imageAnchorY_;\n composeTransform(localTransform,\n centerX, centerY,\n this.imageScale_, this.imageScale_,\n rotation,\n -centerX, -centerY);\n context.setTransform.apply(context, localTransform);\n }\n context.drawImage(this.image_, this.imageOriginX_, this.imageOriginY_,\n this.imageWidth_, this.imageHeight_, x, y,\n this.imageWidth_, this.imageHeight_);\n }\n if (rotation !== 0 || this.imageScale_ != 1) {\n context.setTransform(1, 0, 0, 1, 0, 0);\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 CanvasImmediateRenderer.prototype.drawText_ = function 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 var pixelCoordinates = transform2D(\n flatCoordinates, offset, end, stride, this.transform_,\n this.pixelCoordinates_);\n var context = this.context_;\n var rotation = this.textRotation_;\n if (this.textRotateWithView_) {\n rotation += this.viewRotation_;\n }\n for (; offset < end; offset += stride) {\n var x = pixelCoordinates[offset] + this.textOffsetX_;\n var y = pixelCoordinates[offset + 1] + this.textOffsetY_;\n if (rotation !== 0 || this.textScale_ != 1) {\n var localTransform = composeTransform(this.tmpLocalTransform_,\n x, y,\n this.textScale_, this.textScale_,\n rotation,\n -x, -y);\n context.setTransform.apply(context, localTransform);\n }\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 if (rotation !== 0 || this.textScale_ != 1) {\n context.setTransform(1, 0, 0, 1, 0, 0);\n }\n };\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {boolean} close Close.\n * @private\n * @return {number} end End.\n */\n CanvasImmediateRenderer.prototype.moveToLineTo_ = function moveToLineTo_ (flatCoordinates, offset, end, stride, close) {\n var context = this.context_;\n var pixelCoordinates = transform2D(\n flatCoordinates, offset, end, stride, this.transform_,\n this.pixelCoordinates_);\n context.moveTo(pixelCoordinates[0], pixelCoordinates[1]);\n var length = pixelCoordinates.length;\n if (close) {\n length -= 2;\n }\n for (var i = 2; i < length; i += 2) {\n context.lineTo(pixelCoordinates[i], pixelCoordinates[i + 1]);\n }\n if (close) {\n context.closePath();\n }\n return end;\n };\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @private\n * @return {number} End.\n */\n CanvasImmediateRenderer.prototype.drawRings_ = function drawRings_ (flatCoordinates, offset, ends, stride) {\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n offset = this.moveToLineTo_(flatCoordinates, offset, ends[i], stride, true);\n }\n return offset;\n };\n\n /**\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 * @override\n * @api\n */\n CanvasImmediateRenderer.prototype.drawCircle = function 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 var pixelCoordinates = transformGeom2D(\n geometry, this.transform_, this.pixelCoordinates_);\n var dx = pixelCoordinates[2] - pixelCoordinates[0];\n var dy = pixelCoordinates[3] - pixelCoordinates[1];\n var radius = Math.sqrt(dx * dx + dy * dy);\n var context = this.context_;\n context.beginPath();\n context.arc(\n pixelCoordinates[0], pixelCoordinates[1], radius, 0, 2 * Math.PI);\n if (this.fillState_) {\n context.fill();\n }\n if (this.strokeState_) {\n context.stroke();\n }\n }\n if (this.text_ !== '') {\n this.drawText_(geometry.getCenter(), 0, 2, 2);\n }\n };\n\n /**\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 * @override\n * @api\n */\n CanvasImmediateRenderer.prototype.setStyle = function setStyle (style) {\n this.setFillStrokeStyle(style.getFill(), style.getStroke());\n this.setImageStyle(style.getImage());\n this.setTextStyle(style.getText());\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 * @override\n * @api\n */\n CanvasImmediateRenderer.prototype.drawGeometry = function drawGeometry (geometry) {\n var type = geometry.getType();\n switch (type) {\n case GeometryType.POINT:\n this.drawPoint(/** @type {import(\"../../geom/Point.js\").default} */ (geometry));\n break;\n case GeometryType.LINE_STRING:\n this.drawLineString(/** @type {import(\"../../geom/LineString.js\").default} */ (geometry));\n break;\n case GeometryType.POLYGON:\n this.drawPolygon(/** @type {import(\"../../geom/Polygon.js\").default} */ (geometry));\n break;\n case GeometryType.MULTI_POINT:\n this.drawMultiPoint(/** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry));\n break;\n case GeometryType.MULTI_LINE_STRING:\n this.drawMultiLineString(/** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry));\n break;\n case GeometryType.MULTI_POLYGON:\n this.drawMultiPolygon(/** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry));\n break;\n case GeometryType.GEOMETRY_COLLECTION:\n this.drawGeometryCollection(/** @type {import(\"../../geom/GeometryCollection.js\").default} */ (geometry));\n break;\n case GeometryType.CIRCLE:\n this.drawCircle(/** @type {import(\"../../geom/Circle.js\").default} */ (geometry));\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 * @override\n * @api\n */\n CanvasImmediateRenderer.prototype.drawFeature = function drawFeature (feature, style) {\n var geometry = style.getGeometryFunction()(feature);\n if (!geometry || !intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n this.setStyle(style);\n this.drawGeometry(geometry);\n };\n\n /**\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 * @override\n */\n CanvasImmediateRenderer.prototype.drawGeometryCollection = function drawGeometryCollection (geometry) {\n var geometries = geometry.getGeometriesArray();\n for (var i = 0, ii = geometries.length; i < ii; ++i) {\n this.drawGeometry(geometries[i]);\n }\n };\n\n /**\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 * @override\n */\n CanvasImmediateRenderer.prototype.drawPoint = function drawPoint (geometry) {\n var flatCoordinates = geometry.getFlatCoordinates();\n var stride = geometry.getStride();\n if (this.image_) {\n this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n }\n if (this.text_ !== '') {\n this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n }\n };\n\n /**\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 * @override\n */\n CanvasImmediateRenderer.prototype.drawMultiPoint = function drawMultiPoint (geometry) {\n var flatCoordinates = geometry.getFlatCoordinates();\n var stride = geometry.getStride();\n if (this.image_) {\n this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n }\n if (this.text_ !== '') {\n this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n }\n };\n\n /**\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 * @override\n */\n CanvasImmediateRenderer.prototype.drawLineString = function drawLineString (geometry) {\n if (!intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n var context = this.context_;\n var flatCoordinates = geometry.getFlatCoordinates();\n context.beginPath();\n this.moveToLineTo_(flatCoordinates, 0, flatCoordinates.length,\n geometry.getStride(), false);\n context.stroke();\n }\n if (this.text_ !== '') {\n var flatMidpoint = geometry.getFlatMidpoint();\n this.drawText_(flatMidpoint, 0, 2, 2);\n }\n };\n\n /**\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 * @override\n */\n CanvasImmediateRenderer.prototype.drawMultiLineString = function drawMultiLineString (geometry) {\n var geometryExtent = geometry.getExtent();\n if (!intersects(this.extent_, geometryExtent)) {\n return;\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n var context = this.context_;\n var flatCoordinates = geometry.getFlatCoordinates();\n var offset = 0;\n var ends = /** @type {Array<number>} */ (geometry.getEnds());\n var stride = geometry.getStride();\n context.beginPath();\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n offset = this.moveToLineTo_(flatCoordinates, offset, ends[i], stride, false);\n }\n context.stroke();\n }\n if (this.text_ !== '') {\n var flatMidpoints = geometry.getFlatMidpoints();\n this.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 * @override\n */\n CanvasImmediateRenderer.prototype.drawPolygon = function drawPolygon (geometry) {\n if (!intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n if (this.strokeState_ || this.fillState_) {\n if (this.fillState_) {\n this.setContextFillState_(this.fillState_);\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n }\n var context = this.context_;\n context.beginPath();\n this.drawRings_(geometry.getOrientedFlatCoordinates(),\n 0, /** @type {Array<number>} */ (geometry.getEnds()), geometry.getStride());\n if (this.fillState_) {\n context.fill();\n }\n if (this.strokeState_) {\n context.stroke();\n }\n }\n if (this.text_ !== '') {\n var flatInteriorPoint = geometry.getFlatInteriorPoint();\n this.drawText_(flatInteriorPoint, 0, 2, 2);\n }\n };\n\n /**\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 * @override\n */\n CanvasImmediateRenderer.prototype.drawMultiPolygon = function drawMultiPolygon (geometry) {\n if (!intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n if (this.strokeState_ || this.fillState_) {\n if (this.fillState_) {\n this.setContextFillState_(this.fillState_);\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n }\n var context = this.context_;\n var flatCoordinates = geometry.getOrientedFlatCoordinates();\n var offset = 0;\n var endss = geometry.getEndss();\n var stride = geometry.getStride();\n context.beginPath();\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n offset = this.drawRings_(flatCoordinates, offset, ends, stride);\n }\n if (this.fillState_) {\n context.fill();\n }\n if (this.strokeState_) {\n context.stroke();\n }\n }\n if (this.text_ !== '') {\n var flatInteriorPoints = geometry.getFlatInteriorPoints();\n this.drawText_(flatInteriorPoints, 0, flatInteriorPoints.length, 2);\n }\n };\n\n /**\n * @param {import(\"../canvas.js\").FillState} fillState Fill state.\n * @private\n */\n CanvasImmediateRenderer.prototype.setContextFillState_ = function setContextFillState_ (fillState) {\n var context = this.context_;\n var contextFillState = this.contextFillState_;\n if (!contextFillState) {\n context.fillStyle = fillState.fillStyle;\n this.contextFillState_ = {\n fillStyle: fillState.fillStyle\n };\n } else {\n if (contextFillState.fillStyle != fillState.fillStyle) {\n contextFillState.fillStyle = context.fillStyle = fillState.fillStyle;\n }\n }\n };\n\n /**\n * @param {import(\"../canvas.js\").StrokeState} strokeState Stroke state.\n * @private\n */\n CanvasImmediateRenderer.prototype.setContextStrokeState_ = function setContextStrokeState_ (strokeState) {\n var context = this.context_;\n var contextStrokeState = this.contextStrokeState_;\n if (!contextStrokeState) {\n context.lineCap = /** @type {CanvasLineCap} */ (strokeState.lineCap);\n if (CANVAS_LINE_DASH) {\n context.setLineDash(strokeState.lineDash);\n context.lineDashOffset = strokeState.lineDashOffset;\n }\n context.lineJoin = /** @type {CanvasLineJoin} */ (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 = context.lineCap = /** @type {CanvasLineCap} */ (strokeState.lineCap);\n }\n if (CANVAS_LINE_DASH) {\n if (!equals(contextStrokeState.lineDash, strokeState.lineDash)) {\n context.setLineDash(contextStrokeState.lineDash = strokeState.lineDash);\n }\n if (contextStrokeState.lineDashOffset != strokeState.lineDashOffset) {\n contextStrokeState.lineDashOffset = context.lineDashOffset =\n strokeState.lineDashOffset;\n }\n }\n if (contextStrokeState.lineJoin != strokeState.lineJoin) {\n contextStrokeState.lineJoin = context.lineJoin = /** @type {CanvasLineJoin} */ (strokeState.lineJoin);\n }\n if (contextStrokeState.lineWidth != strokeState.lineWidth) {\n contextStrokeState.lineWidth = context.lineWidth = strokeState.lineWidth;\n }\n if (contextStrokeState.miterLimit != strokeState.miterLimit) {\n contextStrokeState.miterLimit = context.miterLimit =\n strokeState.miterLimit;\n }\n if (contextStrokeState.strokeStyle != strokeState.strokeStyle) {\n contextStrokeState.strokeStyle = context.strokeStyle =\n strokeState.strokeStyle;\n }\n }\n };\n\n /**\n * @param {import(\"../canvas.js\").TextState} textState Text state.\n * @private\n */\n CanvasImmediateRenderer.prototype.setContextTextState_ = function setContextTextState_ (textState) {\n var context = this.context_;\n var contextTextState = this.contextTextState_;\n var textAlign = textState.textAlign ?\n textState.textAlign : 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 = context.font = textState.font;\n }\n if (contextTextState.textAlign != textAlign) {\n contextTextState.textAlign = context.textAlign = /** @type {CanvasTextAlign} */ (textAlign);\n }\n if (contextTextState.textBaseline != textState.textBaseline) {\n contextTextState.textBaseline = context.textBaseline =\n /** @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 * @override\n */\n CanvasImmediateRenderer.prototype.setFillStrokeStyle = function setFillStrokeStyle (fillStyle, strokeStyle) {\n if (!fillStyle) {\n this.fillState_ = null;\n } else {\n var fillStyleColor = fillStyle.getColor();\n this.fillState_ = {\n fillStyle: asColorLike(fillStyleColor ?\n fillStyleColor : defaultFillStyle)\n };\n }\n if (!strokeStyle) {\n this.strokeState_ = null;\n } else {\n var strokeStyleColor = strokeStyle.getColor();\n var strokeStyleLineCap = strokeStyle.getLineCap();\n var strokeStyleLineDash = strokeStyle.getLineDash();\n var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n var strokeStyleLineJoin = strokeStyle.getLineJoin();\n var strokeStyleWidth = strokeStyle.getWidth();\n var strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n this.strokeState_ = {\n lineCap: strokeStyleLineCap !== undefined ?\n strokeStyleLineCap : defaultLineCap,\n lineDash: strokeStyleLineDash ?\n strokeStyleLineDash : defaultLineDash,\n lineDashOffset: strokeStyleLineDashOffset ?\n strokeStyleLineDashOffset : defaultLineDashOffset,\n lineJoin: strokeStyleLineJoin !== undefined ?\n strokeStyleLineJoin : defaultLineJoin,\n lineWidth: this.pixelRatio_ * (strokeStyleWidth !== undefined ?\n strokeStyleWidth : defaultLineWidth),\n miterLimit: strokeStyleMiterLimit !== undefined ?\n strokeStyleMiterLimit : defaultMiterLimit,\n strokeStyle: asColorLike(strokeStyleColor ?\n strokeStyleColor : defaultStrokeStyle)\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 * @override\n */\n CanvasImmediateRenderer.prototype.setImageStyle = function setImageStyle (imageStyle) {\n if (!imageStyle) {\n this.image_ = null;\n } else {\n var imageAnchor = imageStyle.getAnchor();\n // FIXME pixel ratio\n var imageImage = imageStyle.getImage(1);\n var imageOrigin = imageStyle.getOrigin();\n var imageSize = imageStyle.getSize();\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_ = imageStyle.getScale() * this.pixelRatio_;\n this.imageWidth_ = imageSize[0];\n }\n };\n\n /**\n * Set the text style for subsequent draw operations. Pass null to\n * remove the text style.\n *\n * @param {import(\"../../style/Text.js\").default} textStyle Text style.\n * @override\n */\n CanvasImmediateRenderer.prototype.setTextStyle = function setTextStyle (textStyle) {\n if (!textStyle) {\n this.text_ = '';\n } else {\n var textFillStyle = textStyle.getFill();\n if (!textFillStyle) {\n this.textFillState_ = null;\n } else {\n var textFillStyleColor = textFillStyle.getColor();\n this.textFillState_ = {\n fillStyle: asColorLike(textFillStyleColor ?\n textFillStyleColor : defaultFillStyle)\n };\n }\n var textStrokeStyle = textStyle.getStroke();\n if (!textStrokeStyle) {\n this.textStrokeState_ = null;\n } else {\n var textStrokeStyleColor = textStrokeStyle.getColor();\n var textStrokeStyleLineCap = textStrokeStyle.getLineCap();\n var textStrokeStyleLineDash = textStrokeStyle.getLineDash();\n var textStrokeStyleLineDashOffset = textStrokeStyle.getLineDashOffset();\n var textStrokeStyleLineJoin = textStrokeStyle.getLineJoin();\n var textStrokeStyleWidth = textStrokeStyle.getWidth();\n var textStrokeStyleMiterLimit = textStrokeStyle.getMiterLimit();\n this.textStrokeState_ = {\n lineCap: textStrokeStyleLineCap !== undefined ?\n textStrokeStyleLineCap : defaultLineCap,\n lineDash: textStrokeStyleLineDash ?\n textStrokeStyleLineDash : defaultLineDash,\n lineDashOffset: textStrokeStyleLineDashOffset ?\n textStrokeStyleLineDashOffset : defaultLineDashOffset,\n lineJoin: textStrokeStyleLineJoin !== undefined ?\n textStrokeStyleLineJoin : defaultLineJoin,\n lineWidth: textStrokeStyleWidth !== undefined ?\n textStrokeStyleWidth : defaultLineWidth,\n miterLimit: textStrokeStyleMiterLimit !== undefined ?\n textStrokeStyleMiterLimit : defaultMiterLimit,\n strokeStyle: asColorLike(textStrokeStyleColor ?\n textStrokeStyleColor : defaultStrokeStyle)\n };\n }\n var textFont = textStyle.getFont();\n var textOffsetX = textStyle.getOffsetX();\n var textOffsetY = textStyle.getOffsetY();\n var textRotateWithView = textStyle.getRotateWithView();\n var textRotation = textStyle.getRotation();\n var textScale = textStyle.getScale();\n var textText = textStyle.getText();\n var textTextAlign = textStyle.getTextAlign();\n var textTextBaseline = textStyle.getTextBaseline();\n this.textState_ = {\n font: textFont !== undefined ?\n textFont : defaultFont,\n textAlign: textTextAlign !== undefined ?\n textTextAlign : defaultTextAlign,\n textBaseline: textTextBaseline !== undefined ?\n textTextBaseline : 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_ = textRotateWithView !== undefined ? textRotateWithView : false;\n this.textRotation_ = textRotation !== undefined ? textRotation : 0;\n this.textScale_ = this.pixelRatio_ * (textScale !== undefined ?\n textScale : 1);\n }\n };\n\n return CanvasImmediateRenderer;\n}(VectorContext));\n\n\nexport default CanvasImmediateRenderer;\n\n//# sourceMappingURL=Immediate.js.map","/**\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 */\nvar IconImageCache = function IconImageCache() {\n\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*/\nIconImageCache.prototype.clear = function clear () {\n this.cache_ = {};\n this.cacheSize_ = 0;\n};\n\n/**\n* FIXME empty description for jsdoc\n*/\nIconImageCache.prototype.expire = function expire () {\n if (this.cacheSize_ > this.maxCacheSize_) {\n var i = 0;\n for (var key in this.cache_) {\n var 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*/\nIconImageCache.prototype.get = function get (src, crossOrigin, color) {\n var 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*/\nIconImageCache.prototype.set = function set (src, crossOrigin, color, iconImage) {\n var 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*/\nIconImageCache.prototype.setSize = function 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 var colorString = color ? asString(color) : 'null';\n return crossOrigin + ':' + src + ':' + colorString;\n}\n\n\nexport default IconImageCache;\n\n\n/**\n * The {@link module:ol/style/IconImageCache~IconImageCache} for\n * {@link module:ol/style/Icon~Icon} images.\n * @api\n */\nexport var shared = new IconImageCache();\n\n//# sourceMappingURL=IconImageCache.js.map","/**\n * @module ol/renderer/Map\n */\nimport {abstract, getUid} from '../util.js';\nimport Disposable from '../Disposable.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {getWidth} from '../extent.js';\nimport {TRUE} from '../functions.js';\nimport {visibleAtResolution} from '../layer/Layer.js';\nimport {shared as iconImageCache} from '../style/IconImageCache.js';\nimport {compose as composeTransform, invert as invertTransform, setFromArray as transformSetFromArray} from '../transform.js';\n\n/**\n * @abstract\n */\nvar MapRenderer = /*@__PURE__*/(function (Disposable) {\n function MapRenderer(map) {\n Disposable.call(this);\n\n /**\n * @private\n * @type {import(\"../PluggableMap.js\").default}\n */\n this.map_ = map;\n\n /**\n * @private\n * @type {!Object<string, import(\"./Layer.js\").default>}\n */\n this.layerRenderers_ = {};\n\n /**\n * @private\n * @type {Object<string, import(\"../events.js\").EventsKey>}\n */\n this.layerRendererListeners_ = {};\n\n /**\n * @private\n * @type {Array<typeof import(\"./Layer.js\").default>}\n */\n this.layerRendererConstructors_ = [];\n\n }\n\n if ( Disposable ) MapRenderer.__proto__ = Disposable;\n MapRenderer.prototype = Object.create( Disposable && Disposable.prototype );\n MapRenderer.prototype.constructor = MapRenderer;\n\n /**\n * @abstract\n * @param {import(\"../render/EventType.js\").default} type Event type.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n */\n MapRenderer.prototype.dispatchRenderEvent = function dispatchRenderEvent (type, frameState) {\n abstract();\n };\n\n /**\n * Register layer renderer constructors.\n * @param {Array<typeof import(\"./Layer.js\").default>} constructors Layer renderers.\n */\n MapRenderer.prototype.registerLayerRenderers = function registerLayerRenderers (constructors) {\n this.layerRendererConstructors_.push.apply(this.layerRendererConstructors_, constructors);\n };\n\n /**\n * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n * @protected\n */\n MapRenderer.prototype.calculateMatrices2D = function calculateMatrices2D (frameState) {\n var viewState = frameState.viewState;\n var coordinateToPixelTransform = frameState.coordinateToPixelTransform;\n var pixelToCoordinateTransform = frameState.pixelToCoordinateTransform;\n\n composeTransform(coordinateToPixelTransform,\n frameState.size[0] / 2, frameState.size[1] / 2,\n 1 / viewState.resolution, -1 / viewState.resolution,\n -viewState.rotation,\n -viewState.center[0], -viewState.center[1]);\n\n invertTransform(\n transformSetFromArray(pixelToCoordinateTransform, coordinateToPixelTransform));\n };\n\n /**\n * Removes all layer renderers.\n */\n MapRenderer.prototype.removeLayerRenderers = function removeLayerRenderers () {\n for (var key in this.layerRenderers_) {\n this.removeLayerRendererByKey_(key).dispose();\n }\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 {function(this: S, import(\"../Feature.js\").FeatureLike,\n * import(\"../layer/Layer.js\").default): T} callback Feature callback.\n * @param {S} thisArg Value to use as `this` when executing `callback`.\n * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n * function, only layers which are visible and for which this function\n * returns `true` will be tested for features. By default, all visible\n * layers will be tested.\n * @param {U} thisArg2 Value to use as `this` when executing `layerFilter`.\n * @return {T|undefined} Callback result.\n * @template S,T,U\n */\n MapRenderer.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (\n coordinate,\n frameState,\n hitTolerance,\n callback,\n thisArg,\n layerFilter,\n thisArg2\n ) {\n var result;\n var viewState = frameState.viewState;\n var viewResolution = viewState.resolution;\n\n /**\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../layer/Layer.js\").default} layer Layer.\n * @return {?} Callback result.\n */\n function forEachFeatureAtCoordinate(feature, layer) {\n var managed = frameState.layerStates[getUid(layer)].managed;\n if (!(getUid(feature) in frameState.skippedFeatureUids && !managed)) {\n return callback.call(thisArg, feature, managed ? layer : null);\n }\n }\n\n var projection = viewState.projection;\n\n var translatedCoordinate = coordinate;\n if (projection.canWrapX()) {\n var projectionExtent = projection.getExtent();\n var worldWidth = getWidth(projectionExtent);\n var x = coordinate[0];\n if (x < projectionExtent[0] || x > projectionExtent[2]) {\n var worldsAway = Math.ceil((projectionExtent[0] - x) / worldWidth);\n translatedCoordinate = [x + worldWidth * worldsAway, coordinate[1]];\n }\n }\n\n var layerStates = frameState.layerStatesArray;\n var numLayers = layerStates.length;\n var i;\n for (i = numLayers - 1; i >= 0; --i) {\n var layerState = layerStates[i];\n var layer = layerState.layer;\n if (visibleAtResolution(layerState, viewResolution) && layerFilter.call(thisArg2, layer)) {\n var layerRenderer = this.getLayerRenderer(layer);\n var source = /** @type {import(\"../layer/Layer.js\").default} */ (layer).getSource();\n if (source) {\n result = layerRenderer.forEachFeatureAtCoordinate(\n source.getWrapX() ? translatedCoordinate : coordinate,\n frameState, hitTolerance, forEachFeatureAtCoordinate);\n }\n if (result) {\n return result;\n }\n }\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 * @param {function(this: S, import(\"../layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer\n * callback.\n * @param {S} thisArg Value to use as `this` when executing `callback`.\n * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n * function, only layers which are visible and for which this function\n * returns `true` will be tested for features. By default, all visible\n * layers will be tested.\n * @param {U} thisArg2 Value to use as `this` when executing `layerFilter`.\n * @return {T|undefined} Callback result.\n * @template S,T,U\n */\n MapRenderer.prototype.forEachLayerAtPixel = function forEachLayerAtPixel (pixel, frameState, hitTolerance, callback, thisArg, layerFilter, thisArg2) {\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 {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n * function, only layers which are visible and for which this function\n * returns `true` will be tested for features. By default, all visible\n * layers will be tested.\n * @param {U} thisArg Value to use as `this` when executing `layerFilter`.\n * @return {boolean} Is there a feature at the given coordinate?\n * @template U\n */\n MapRenderer.prototype.hasFeatureAtCoordinate = function hasFeatureAtCoordinate (coordinate, frameState, hitTolerance, layerFilter, thisArg) {\n var hasFeature = this.forEachFeatureAtCoordinate(\n coordinate, frameState, hitTolerance, TRUE, this, layerFilter, thisArg);\n\n return hasFeature !== undefined;\n };\n\n /**\n * @param {import(\"../layer/Base.js\").default} layer Layer.\n * @protected\n * @return {import(\"./Layer.js\").default} Layer renderer.\n */\n MapRenderer.prototype.getLayerRenderer = function getLayerRenderer (layer) {\n var layerKey = getUid(layer);\n if (layerKey in this.layerRenderers_) {\n return this.layerRenderers_[layerKey];\n } else {\n var renderer;\n for (var i = 0, ii = this.layerRendererConstructors_.length; i < ii; ++i) {\n var candidate = this.layerRendererConstructors_[i];\n if (candidate['handles'](layer)) {\n renderer = candidate['create'](this, layer);\n break;\n }\n }\n if (renderer) {\n this.layerRenderers_[layerKey] = renderer;\n this.layerRendererListeners_[layerKey] = listen(renderer,\n EventType.CHANGE, this.handleLayerRendererChange_, this);\n } else {\n throw new Error('Unable to create renderer for layer: ' + layer.getType());\n }\n return renderer;\n }\n };\n\n /**\n * @param {string} layerKey Layer key.\n * @protected\n * @return {import(\"./Layer.js\").default} Layer renderer.\n */\n MapRenderer.prototype.getLayerRendererByKey = function getLayerRendererByKey (layerKey) {\n return this.layerRenderers_[layerKey];\n };\n\n /**\n * @protected\n * @return {Object<string, import(\"./Layer.js\").default>} Layer renderers.\n */\n MapRenderer.prototype.getLayerRenderers = function getLayerRenderers () {\n return this.layerRenderers_;\n };\n\n /**\n * @return {import(\"../PluggableMap.js\").default} Map.\n */\n MapRenderer.prototype.getMap = function getMap () {\n return this.map_;\n };\n\n /**\n * Handle changes in a layer renderer.\n * @private\n */\n MapRenderer.prototype.handleLayerRendererChange_ = function handleLayerRendererChange_ () {\n this.map_.render();\n };\n\n /**\n * @param {string} layerKey Layer key.\n * @return {import(\"./Layer.js\").default} Layer renderer.\n * @private\n */\n MapRenderer.prototype.removeLayerRendererByKey_ = function removeLayerRendererByKey_ (layerKey) {\n var layerRenderer = this.layerRenderers_[layerKey];\n delete this.layerRenderers_[layerKey];\n\n unlistenByKey(this.layerRendererListeners_[layerKey]);\n delete this.layerRendererListeners_[layerKey];\n\n return layerRenderer;\n };\n\n /**\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @private\n */\n MapRenderer.prototype.removeUnusedLayerRenderers_ = function removeUnusedLayerRenderers_ (map, frameState) {\n for (var layerKey in this.layerRenderers_) {\n if (!frameState || !(layerKey in frameState.layerStates)) {\n this.removeLayerRendererByKey_(layerKey).dispose();\n }\n }\n };\n\n /**\n * Render.\n * @abstract\n * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n */\n MapRenderer.prototype.renderFrame = function renderFrame (frameState) {\n abstract();\n };\n\n /**\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @protected\n */\n MapRenderer.prototype.scheduleExpireIconCache = function scheduleExpireIconCache (frameState) {\n frameState.postRenderFunctions.push(/** @type {import(\"../PluggableMap.js\").PostRenderFunction} */ (expireIconCache));\n };\n\n /**\n * @param {!import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @protected\n */\n MapRenderer.prototype.scheduleRemoveUnusedLayerRenderers = function scheduleRemoveUnusedLayerRenderers (frameState) {\n for (var layerKey in this.layerRenderers_) {\n if (!(layerKey in frameState.layerStates)) {\n frameState.postRenderFunctions.push(\n /** @type {import(\"../PluggableMap.js\").PostRenderFunction} */ (this.removeUnusedLayerRenderers_.bind(this))\n );\n return;\n }\n }\n };\n\n return MapRenderer;\n}(Disposable));\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\n\n/**\n * @param {import(\"../layer/Layer.js\").State} state1 First layer state.\n * @param {import(\"../layer/Layer.js\").State} state2 Second layer state.\n * @return {number} The zIndex difference.\n */\nexport function sortByZIndex(state1, state2) {\n return state1.zIndex - state2.zIndex;\n}\nexport default MapRenderer;\n\n//# sourceMappingURL=Map.js.map","/**\n * @module ol/renderer/canvas/Map\n */\nimport {create as createTransform, apply as applyTransform, compose as composeTransform} from '../../transform.js';\nimport {includes, stableSort} from '../../array.js';\nimport {CLASS_UNSELECTABLE} from '../../css.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {visibleAtResolution} from '../../layer/Layer.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport {rotateAtOffset} from '../../render/canvas.js';\nimport CanvasImmediateRenderer from '../../render/canvas/Immediate.js';\nimport MapRenderer, {sortByZIndex} from '../Map.js';\nimport SourceState from '../../source/State.js';\n\n\n/**\n * @type {Array<typeof import(\"../Layer.js\").default>}\n */\nexport var layerRendererConstructors = [];\n\n/**\n * @classdesc\n * Canvas map renderer.\n * @api\n */\nvar CanvasMapRenderer = /*@__PURE__*/(function (MapRenderer) {\n function CanvasMapRenderer(map) {\n MapRenderer.call(this, map);\n\n var container = map.getViewport();\n\n /**\n * @private\n * @type {CanvasRenderingContext2D}\n */\n this.context_ = createCanvasContext2D();\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.canvas_ = this.context_.canvas;\n\n this.canvas_.style.width = '100%';\n this.canvas_.style.height = '100%';\n this.canvas_.style.display = 'block';\n this.canvas_.className = CLASS_UNSELECTABLE;\n container.insertBefore(this.canvas_, container.childNodes[0] || null);\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderedVisible_ = true;\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.transform_ = createTransform();\n\n }\n\n if ( MapRenderer ) CanvasMapRenderer.__proto__ = MapRenderer;\n CanvasMapRenderer.prototype = Object.create( MapRenderer && MapRenderer.prototype );\n CanvasMapRenderer.prototype.constructor = CanvasMapRenderer;\n\n /**\n * @param {import(\"../../render/EventType.js\").default} type Event type.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n */\n CanvasMapRenderer.prototype.dispatchRenderEvent = function dispatchRenderEvent (type, frameState) {\n var map = this.getMap();\n var context = this.context_;\n if (map.hasListener(type)) {\n var extent = frameState.extent;\n var pixelRatio = frameState.pixelRatio;\n var viewState = frameState.viewState;\n var rotation = viewState.rotation;\n\n var transform = this.getTransform(frameState);\n\n var vectorContext = new CanvasImmediateRenderer(context, pixelRatio,\n extent, transform, rotation);\n var composeEvent = new RenderEvent(type, vectorContext,\n frameState, context, null);\n map.dispatchEvent(composeEvent);\n }\n };\n\n /**\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @protected\n * @return {!import(\"../../transform.js\").Transform} Transform.\n */\n CanvasMapRenderer.prototype.getTransform = function getTransform (frameState) {\n var viewState = frameState.viewState;\n var dx1 = this.canvas_.width / 2;\n var dy1 = this.canvas_.height / 2;\n var sx = frameState.pixelRatio / viewState.resolution;\n var sy = -sx;\n var angle = -viewState.rotation;\n var dx2 = -viewState.center[0];\n var dy2 = -viewState.center[1];\n return composeTransform(this.transform_, dx1, dy1, sx, sy, angle, dx2, dy2);\n };\n\n /**\n * @inheritDoc\n */\n CanvasMapRenderer.prototype.renderFrame = function renderFrame (frameState) {\n\n if (!frameState) {\n if (this.renderedVisible_) {\n this.canvas_.style.display = 'none';\n this.renderedVisible_ = false;\n }\n return;\n }\n\n var context = this.context_;\n var pixelRatio = frameState.pixelRatio;\n var width = Math.round(frameState.size[0] * pixelRatio);\n var height = Math.round(frameState.size[1] * pixelRatio);\n if (this.canvas_.width != width || this.canvas_.height != height) {\n this.canvas_.width = width;\n this.canvas_.height = height;\n } else {\n context.clearRect(0, 0, width, height);\n }\n\n var rotation = frameState.viewState.rotation;\n\n this.calculateMatrices2D(frameState);\n\n this.dispatchRenderEvent(RenderEventType.PRECOMPOSE, frameState);\n\n var layerStatesArray = frameState.layerStatesArray;\n stableSort(layerStatesArray, sortByZIndex);\n\n if (rotation) {\n context.save();\n rotateAtOffset(context, rotation, width / 2, height / 2);\n }\n\n var viewResolution = frameState.viewState.resolution;\n var i, ii;\n for (i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n var layerState = layerStatesArray[i];\n var layer = layerState.layer;\n var layerRenderer = /** @type {import(\"./Layer.js\").default} */ (this.getLayerRenderer(layer));\n if (!visibleAtResolution(layerState, viewResolution) ||\n layerState.sourceState != SourceState.READY) {\n continue;\n }\n if (layerRenderer.prepareFrame(frameState, layerState)) {\n layerRenderer.composeFrame(frameState, layerState, context);\n }\n }\n\n if (rotation) {\n context.restore();\n }\n\n this.dispatchRenderEvent(RenderEventType.POSTCOMPOSE, frameState);\n\n if (!this.renderedVisible_) {\n this.canvas_.style.display = '';\n this.renderedVisible_ = true;\n }\n\n this.scheduleRemoveUnusedLayerRenderers(frameState);\n this.scheduleExpireIconCache(frameState);\n };\n\n /**\n * @inheritDoc\n */\n CanvasMapRenderer.prototype.forEachLayerAtPixel = function forEachLayerAtPixel (pixel, frameState, hitTolerance, callback, thisArg, layerFilter, thisArg2) {\n var result;\n var viewState = frameState.viewState;\n var viewResolution = viewState.resolution;\n\n var layerStates = frameState.layerStatesArray;\n var numLayers = layerStates.length;\n\n var coordinate = applyTransform(\n frameState.pixelToCoordinateTransform, pixel.slice());\n\n var i;\n for (i = numLayers - 1; i >= 0; --i) {\n var layerState = layerStates[i];\n var layer = layerState.layer;\n if (visibleAtResolution(layerState, viewResolution) && layerFilter.call(thisArg2, layer)) {\n var layerRenderer = /** @type {import(\"./Layer.js\").default} */ (this.getLayerRenderer(layer));\n result = layerRenderer.forEachLayerAtCoordinate(\n coordinate, frameState, hitTolerance, callback, thisArg);\n if (result) {\n return result;\n }\n }\n }\n return undefined;\n };\n\n /**\n * @inheritDoc\n */\n CanvasMapRenderer.prototype.registerLayerRenderers = function registerLayerRenderers (constructors) {\n MapRenderer.prototype.registerLayerRenderers.call(this, constructors);\n for (var i = 0, ii = constructors.length; i < ii; ++i) {\n var ctor = constructors[i];\n if (!includes(layerRendererConstructors, ctor)) {\n layerRendererConstructors.push(ctor);\n }\n }\n };\n\n return CanvasMapRenderer;\n}(MapRenderer));\n\n\nexport default CanvasMapRenderer;\n\n//# sourceMappingURL=Map.js.map","/**\n * @module ol/renderer/Layer\n */\nimport {getUid} from '../util.js';\nimport ImageState from '../ImageState.js';\nimport Observable from '../Observable.js';\nimport TileState from '../TileState.js';\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport SourceState from '../source/State.js';\n\nvar LayerRenderer = /*@__PURE__*/(function (Observable) {\n function LayerRenderer(layer) {\n\n Observable.call(this);\n\n /**\n * @private\n * @type {import(\"../layer/Layer.js\").default}\n */\n this.layer_ = layer;\n\n }\n\n if ( Observable ) LayerRenderer.__proto__ = Observable;\n LayerRenderer.prototype = Object.create( Observable && Observable.prototype );\n LayerRenderer.prototype.constructor = LayerRenderer;\n\n /**\n * Create a function that adds loaded tiles to the tile lookup.\n * @param {import(\"../source/Tile.js\").default} source Tile source.\n * @param {import(\"../proj/Projection.js\").default} projection Projection of the tiles.\n * @param {Object<number, Object<string, import(\"../Tile.js\").default>>} tiles Lookup of loaded tiles by zoom level.\n * @return {function(number, import(\"../TileRange.js\").default):boolean} A function that can be\n * called with a zoom level and a tile range to add loaded tiles to the lookup.\n * @protected\n */\n LayerRenderer.prototype.createLoadedTileFinder = function 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 */\n function(zoom, tileRange) {\n /**\n * @param {import(\"../Tile.js\").default} tile Tile.\n */\n function callback(tile) {\n if (!tiles[zoom]) {\n tiles[zoom] = {};\n }\n tiles[zoom][tile.tileCoord.toString()] = tile;\n }\n return source.forEachLoadedTile(projection, zoom, tileRange, callback);\n }\n );\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 {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default): T} callback Feature callback.\n * @return {T|void} Callback result.\n * @template T\n */\n LayerRenderer.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (coordinate, frameState, hitTolerance, callback) {};\n\n /**\n * @return {import(\"../layer/Layer.js\").default} Layer.\n */\n LayerRenderer.prototype.getLayer = function getLayer () {\n return this.layer_;\n };\n\n /**\n * Handle changes in image state.\n * @param {import(\"../events/Event.js\").default} event Image change event.\n * @private\n */\n LayerRenderer.prototype.handleImageChange_ = function handleImageChange_ (event) {\n var image = /** @type {import(\"../Image.js\").default} */ (event.target);\n if (image.getState() === ImageState.LOADED) {\n this.renderIfReadyAndVisible();\n }\n };\n\n /**\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @return {boolean} Is there a feature at the given coordinate?\n */\n LayerRenderer.prototype.hasFeatureAtCoordinate = function hasFeatureAtCoordinate (coordinate, frameState) {\n return false;\n };\n\n /**\n * Load the image if not already loaded, and register the image change\n * listener if needed.\n * @param {import(\"../ImageBase.js\").default} image Image.\n * @return {boolean} `true` if the image is already loaded, `false` otherwise.\n * @protected\n */\n LayerRenderer.prototype.loadImage = function loadImage (image) {\n var imageState = image.getState();\n if (imageState != ImageState.LOADED && imageState != ImageState.ERROR) {\n listen(image, EventType.CHANGE, this.handleImageChange_, this);\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 LayerRenderer.prototype.renderIfReadyAndVisible = function renderIfReadyAndVisible () {\n var layer = this.getLayer();\n if (layer.getVisible() && layer.getSourceState() == SourceState.READY) {\n this.changed();\n }\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 LayerRenderer.prototype.scheduleExpireCache = function 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 var postRenderFunction = function(tileSource, map, frameState) {\n var tileSourceKey = getUid(tileSource);\n if (tileSourceKey in frameState.usedTiles) {\n tileSource.expireCache(frameState.viewState.projection,\n frameState.usedTiles[tileSourceKey]);\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, import(\"../TileRange.js\").default>>} usedTiles Used tiles.\n * @param {import(\"../source/Tile.js\").default} tileSource Tile source.\n * @param {number} z Z.\n * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n * @protected\n */\n LayerRenderer.prototype.updateUsedTiles = function updateUsedTiles (usedTiles, tileSource, z, tileRange) {\n // FIXME should we use tilesToDrawByZ instead?\n var tileSourceKey = getUid(tileSource);\n var zKey = z.toString();\n if (tileSourceKey in usedTiles) {\n if (zKey in usedTiles[tileSourceKey]) {\n usedTiles[tileSourceKey][zKey].extend(tileRange);\n } else {\n usedTiles[tileSourceKey][zKey] = tileRange;\n }\n } else {\n usedTiles[tileSourceKey] = {};\n usedTiles[tileSourceKey][zKey] = tileRange;\n }\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(this: T, import(\"../Tile.js\").default)=} opt_tileCallback Tile callback.\n * @param {T=} opt_this Object to use as `this` in `opt_tileCallback`.\n * @protected\n * @template T\n */\n LayerRenderer.prototype.manageTilePyramid = function manageTilePyramid (\n frameState,\n tileSource,\n tileGrid,\n pixelRatio,\n projection,\n extent,\n currentZ,\n preload,\n opt_tileCallback,\n opt_this\n ) {\n var tileSourceKey = getUid(tileSource);\n if (!(tileSourceKey in frameState.wantedTiles)) {\n frameState.wantedTiles[tileSourceKey] = {};\n }\n var wantedTiles = frameState.wantedTiles[tileSourceKey];\n var tileQueue = frameState.tileQueue;\n var minZoom = tileGrid.getMinZoom();\n var 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 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([tile, tileSourceKey,\n tileGrid.getTileCoordCenter(tile.tileCoord), tileResolution]);\n }\n }\n if (opt_tileCallback !== undefined) {\n opt_tileCallback.call(opt_this, tile);\n }\n } else {\n tileSource.useTile(z, x, y, projection);\n }\n }\n }\n }\n };\n\n return LayerRenderer;\n}(Observable));\n\nexport default LayerRenderer;\n\n//# sourceMappingURL=Layer.js.map","/**\n * @module ol/renderer/canvas/Layer\n */\nimport {abstract} from '../../util.js';\nimport {getBottomLeft, getBottomRight, getTopLeft, getTopRight} from '../../extent.js';\nimport {TRUE} from '../../functions.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport {rotateAtOffset} from '../../render/canvas.js';\nimport CanvasImmediateRenderer from '../../render/canvas/Immediate.js';\nimport LayerRenderer from '../Layer.js';\nimport {create as createTransform, apply as applyTransform, compose as composeTransform} from '../../transform.js';\n\n/**\n * @abstract\n */\nvar CanvasLayerRenderer = /*@__PURE__*/(function (LayerRenderer) {\n function CanvasLayerRenderer(layer) {\n\n LayerRenderer.call(this, layer);\n\n /**\n * @protected\n * @type {number}\n */\n this.renderedResolution;\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.transform_ = createTransform();\n\n }\n\n if ( LayerRenderer ) CanvasLayerRenderer.__proto__ = LayerRenderer;\n CanvasLayerRenderer.prototype = Object.create( LayerRenderer && LayerRenderer.prototype );\n CanvasLayerRenderer.prototype.constructor = CanvasLayerRenderer;\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../extent.js\").Extent} extent Clip extent.\n * @protected\n */\n CanvasLayerRenderer.prototype.clip = function clip (context, frameState, extent) {\n var pixelRatio = frameState.pixelRatio;\n var width = frameState.size[0] * pixelRatio;\n var height = frameState.size[1] * pixelRatio;\n var rotation = frameState.viewState.rotation;\n var topLeft = getTopLeft(extent);\n var topRight = getTopRight(extent);\n var bottomRight = getBottomRight(extent);\n var 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, width / 2, height / 2);\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, width / 2, height / 2);\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 * @param {import(\"../../transform.js\").Transform=} opt_transform Transform.\n * @private\n */\n CanvasLayerRenderer.prototype.dispatchComposeEvent_ = function dispatchComposeEvent_ (type, context, frameState, opt_transform) {\n var layer = this.getLayer();\n if (layer.hasListener(type)) {\n var width = frameState.size[0] * frameState.pixelRatio;\n var height = frameState.size[1] * frameState.pixelRatio;\n var rotation = frameState.viewState.rotation;\n rotateAtOffset(context, -rotation, width / 2, height / 2);\n var transform = opt_transform !== undefined ?\n opt_transform : this.getTransform(frameState, 0);\n var render = new CanvasImmediateRenderer(\n context, frameState.pixelRatio, frameState.extent, transform,\n frameState.viewState.rotation);\n var composeEvent = new RenderEvent(type, render, frameState,\n context, null);\n layer.dispatchEvent(composeEvent);\n rotateAtOffset(context, rotation, width / 2, height / 2);\n }\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 {function(this: S, import(\"../../layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer\n * callback.\n * @param {S} thisArg Value to use as `this` when executing `callback`.\n * @return {T|undefined} Callback result.\n * @template S,T,U\n */\n CanvasLayerRenderer.prototype.forEachLayerAtCoordinate = function forEachLayerAtCoordinate (coordinate, frameState, hitTolerance, callback, thisArg) {\n var hasFeature = this.forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, TRUE);\n\n if (hasFeature) {\n return callback.call(thisArg, this.getLayer(), null);\n } else {\n return undefined;\n }\n };\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../layer/Layer.js\").State} layerState Layer state.\n * @param {import(\"../../transform.js\").Transform=} opt_transform Transform.\n * @protected\n */\n CanvasLayerRenderer.prototype.postCompose = function postCompose (context, frameState, layerState, opt_transform) {\n this.dispatchComposeEvent_(RenderEventType.POSTCOMPOSE, context, frameState, opt_transform);\n };\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../transform.js\").Transform=} opt_transform Transform.\n * @protected\n */\n CanvasLayerRenderer.prototype.preCompose = function preCompose (context, frameState, opt_transform) {\n this.dispatchComposeEvent_(RenderEventType.PRECOMPOSE, context, frameState, opt_transform);\n };\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../transform.js\").Transform=} opt_transform Transform.\n * @protected\n */\n CanvasLayerRenderer.prototype.dispatchRenderEvent = function dispatchRenderEvent (context, frameState, opt_transform) {\n this.dispatchComposeEvent_(RenderEventType.RENDER, context, frameState, opt_transform);\n };\n\n /**\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {number} offsetX Offset on the x-axis in view coordinates.\n * @protected\n * @return {!import(\"../../transform.js\").Transform} Transform.\n */\n CanvasLayerRenderer.prototype.getTransform = function getTransform (frameState, offsetX) {\n var viewState = frameState.viewState;\n var pixelRatio = frameState.pixelRatio;\n var dx1 = pixelRatio * frameState.size[0] / 2;\n var dy1 = pixelRatio * frameState.size[1] / 2;\n var sx = pixelRatio / viewState.resolution;\n var sy = -sx;\n var angle = -viewState.rotation;\n var dx2 = -viewState.center[0] + offsetX;\n var dy2 = -viewState.center[1];\n return composeTransform(this.transform_, dx1, dy1, sx, sy, angle, dx2, dy2);\n };\n\n /**\n * @abstract\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../layer/Layer.js\").State} layerState Layer state.\n * @param {CanvasRenderingContext2D} context Context.\n */\n CanvasLayerRenderer.prototype.composeFrame = function composeFrame (frameState, layerState, context) {\n abstract();\n };\n\n /**\n * @abstract\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../layer/Layer.js\").State} layerState Layer state.\n * @return {boolean} whether composeFrame should be called.\n */\n CanvasLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState) {\n return abstract();\n };\n\n return CanvasLayerRenderer;\n}(LayerRenderer));\n\nexport default CanvasLayerRenderer;\n\n//# sourceMappingURL=Layer.js.map","/**\n * @module ol/renderer/canvas/IntermediateCanvas\n */\nimport {abstract} from '../../util.js';\nimport {scale as scaleCoordinate} from '../../coordinate.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {containsExtent, intersects} from '../../extent.js';\nimport CanvasLayerRenderer from './Layer.js';\nimport {create as createTransform, apply as applyTransform} from '../../transform.js';\n\n/**\n * @abstract\n */\nvar IntermediateCanvasRenderer = /*@__PURE__*/(function (CanvasLayerRenderer) {\n function IntermediateCanvasRenderer(layer) {\n\n CanvasLayerRenderer.call(this, layer);\n\n /**\n * @protected\n * @type {import(\"../../transform.js\").Transform}\n */\n this.coordinateToCanvasPixelTransform = createTransform();\n\n /**\n * @private\n * @type {CanvasRenderingContext2D}\n */\n this.hitCanvasContext_ = null;\n\n }\n\n if ( CanvasLayerRenderer ) IntermediateCanvasRenderer.__proto__ = CanvasLayerRenderer;\n IntermediateCanvasRenderer.prototype = Object.create( CanvasLayerRenderer && CanvasLayerRenderer.prototype );\n IntermediateCanvasRenderer.prototype.constructor = IntermediateCanvasRenderer;\n\n /**\n * @inheritDoc\n */\n IntermediateCanvasRenderer.prototype.composeFrame = function composeFrame (frameState, layerState, context) {\n\n this.preCompose(context, frameState);\n\n var image = this.getImage();\n if (image) {\n\n // clipped rendering if layer extent is set\n var extent = layerState.extent;\n var clipped = extent !== undefined &&\n !containsExtent(extent, frameState.extent) &&\n intersects(extent, frameState.extent);\n if (clipped) {\n this.clip(context, frameState, /** @type {import(\"../../extent.js\").Extent} */ (extent));\n }\n\n var imageTransform = this.getImageTransform();\n // for performance reasons, context.save / context.restore is not used\n // to save and restore the transformation matrix and the opacity.\n // see http://jsperf.com/context-save-restore-versus-variable\n var alpha = context.globalAlpha;\n context.globalAlpha = layerState.opacity;\n\n // for performance reasons, context.setTransform is only used\n // when the view is rotated. see http://jsperf.com/canvas-transform\n var dx = imageTransform[4];\n var dy = imageTransform[5];\n var dw = image.width * imageTransform[0];\n var dh = image.height * imageTransform[3];\n if (dw >= 0.5 && dh >= 0.5) {\n context.drawImage(image, 0, 0, +image.width, +image.height,\n Math.round(dx), Math.round(dy), Math.round(dw), Math.round(dh));\n }\n context.globalAlpha = alpha;\n\n if (clipped) {\n context.restore();\n }\n }\n\n this.postCompose(context, frameState, layerState);\n };\n\n /**\n * @abstract\n * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Canvas.\n */\n IntermediateCanvasRenderer.prototype.getImage = function getImage () {\n return abstract();\n };\n\n /**\n * @abstract\n * @return {!import(\"../../transform.js\").Transform} Image transform.\n */\n IntermediateCanvasRenderer.prototype.getImageTransform = function getImageTransform () {\n return abstract();\n };\n\n /**\n * @inheritDoc\n */\n IntermediateCanvasRenderer.prototype.forEachLayerAtCoordinate = function forEachLayerAtCoordinate (coordinate, frameState, hitTolerance, callback, thisArg) {\n if (!this.getImage()) {\n return undefined;\n }\n\n var pixel = applyTransform(this.coordinateToCanvasPixelTransform, coordinate.slice());\n scaleCoordinate(pixel, frameState.viewState.resolution / this.renderedResolution);\n\n if (!this.hitCanvasContext_) {\n this.hitCanvasContext_ = createCanvasContext2D(1, 1);\n }\n\n this.hitCanvasContext_.clearRect(0, 0, 1, 1);\n this.hitCanvasContext_.drawImage(this.getImage(), pixel[0], pixel[1], 1, 1, 0, 0, 1, 1);\n\n var imageData = this.hitCanvasContext_.getImageData(0, 0, 1, 1).data;\n if (imageData[3] > 0) {\n return callback.call(thisArg, this.getLayer(), imageData);\n } else {\n return undefined;\n }\n };\n\n return IntermediateCanvasRenderer;\n}(CanvasLayerRenderer));\n\n\nexport default IntermediateCanvasRenderer;\n\n//# sourceMappingURL=IntermediateCanvas.js.map","/**\n * @module ol/renderer/canvas/ImageLayer\n */\nimport {ENABLE_RASTER_REPROJECTION} from '../../reproj/common.js';\nimport ImageCanvas from '../../ImageCanvas.js';\nimport LayerType from '../../LayerType.js';\nimport ViewHint from '../../ViewHint.js';\nimport {equals} from '../../array.js';\nimport {getHeight, getIntersection, getWidth, isEmpty} from '../../extent.js';\nimport VectorRenderType from '../../layer/VectorRenderType.js';\nimport {assign} from '../../obj.js';\nimport {layerRendererConstructors} from './Map.js';\nimport IntermediateCanvasRenderer from './IntermediateCanvas.js';\nimport {create as createTransform, compose as composeTransform} from '../../transform.js';\n\n/**\n * @classdesc\n * Canvas renderer for image layers.\n * @api\n */\nvar CanvasImageLayerRenderer = /*@__PURE__*/(function (IntermediateCanvasRenderer) {\n function CanvasImageLayerRenderer(imageLayer) {\n\n IntermediateCanvasRenderer.call(this, imageLayer);\n\n /**\n * @private\n * @type {?import(\"../../ImageBase.js\").default}\n */\n this.image_ = null;\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.imageTransform_ = createTransform();\n\n /**\n * @type {!Array<string>}\n */\n this.skippedFeatures_ = [];\n\n /**\n * @private\n * @type {import(\"./VectorLayer.js\").default}\n */\n this.vectorRenderer_ = null;\n\n if (imageLayer.getType() === LayerType.VECTOR) {\n for (var i = 0, ii = layerRendererConstructors.length; i < ii; ++i) {\n var ctor = layerRendererConstructors[i];\n if (ctor !== CanvasImageLayerRenderer && ctor['handles'](imageLayer)) {\n this.vectorRenderer_ = /** @type {import(\"./VectorLayer.js\").default} */ (new ctor(imageLayer));\n break;\n }\n }\n }\n\n }\n\n if ( IntermediateCanvasRenderer ) CanvasImageLayerRenderer.__proto__ = IntermediateCanvasRenderer;\n CanvasImageLayerRenderer.prototype = Object.create( IntermediateCanvasRenderer && IntermediateCanvasRenderer.prototype );\n CanvasImageLayerRenderer.prototype.constructor = CanvasImageLayerRenderer;\n\n /**\n * @inheritDoc\n */\n CanvasImageLayerRenderer.prototype.disposeInternal = function disposeInternal () {\n if (this.vectorRenderer_) {\n this.vectorRenderer_.dispose();\n }\n IntermediateCanvasRenderer.prototype.disposeInternal.call(this);\n };\n\n /**\n * @inheritDoc\n */\n CanvasImageLayerRenderer.prototype.getImage = function getImage () {\n return !this.image_ ? null : this.image_.getImage();\n };\n\n /**\n * @inheritDoc\n */\n CanvasImageLayerRenderer.prototype.getImageTransform = function getImageTransform () {\n return this.imageTransform_;\n };\n\n /**\n * @inheritDoc\n */\n CanvasImageLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState) {\n\n var pixelRatio = frameState.pixelRatio;\n var size = frameState.size;\n var viewState = frameState.viewState;\n var viewCenter = viewState.center;\n var viewResolution = viewState.resolution;\n\n var image;\n var imageLayer = /** @type {import(\"../../layer/Image.js\").default} */ (this.getLayer());\n var imageSource = /** @type {import(\"../../source/Image.js\").default} */ (imageLayer.getSource());\n\n var hints = frameState.viewHints;\n\n var vectorRenderer = this.vectorRenderer_;\n var renderedExtent = frameState.extent;\n if (!vectorRenderer && layerState.extent !== undefined) {\n renderedExtent = getIntersection(renderedExtent, layerState.extent);\n }\n\n if (!hints[ViewHint.ANIMATING] && !hints[ViewHint.INTERACTING] &&\n !isEmpty(renderedExtent)) {\n var projection = viewState.projection;\n if (!ENABLE_RASTER_REPROJECTION) {\n var sourceProjection = imageSource.getProjection();\n if (sourceProjection) {\n projection = sourceProjection;\n }\n }\n var skippedFeatures = this.skippedFeatures_;\n if (vectorRenderer) {\n var context = vectorRenderer.context;\n var imageFrameState = /** @type {import(\"../../PluggableMap.js\").FrameState} */ (assign({}, frameState, {\n size: [\n getWidth(renderedExtent) / viewResolution,\n getHeight(renderedExtent) / viewResolution\n ],\n viewState: /** @type {import(\"../../View.js\").State} */ (assign({}, frameState.viewState, {\n rotation: 0\n }))\n }));\n var newSkippedFeatures = Object.keys(imageFrameState.skippedFeatureUids).sort();\n image = new ImageCanvas(renderedExtent, viewResolution, pixelRatio, context.canvas, function(callback) {\n if (vectorRenderer.prepareFrame(imageFrameState, layerState) &&\n (vectorRenderer.replayGroupChanged ||\n !equals(skippedFeatures, newSkippedFeatures))) {\n context.canvas.width = imageFrameState.size[0] * pixelRatio;\n context.canvas.height = imageFrameState.size[1] * pixelRatio;\n vectorRenderer.compose(context, imageFrameState, layerState);\n skippedFeatures = newSkippedFeatures;\n callback();\n }\n });\n } else {\n image = imageSource.getImage(\n renderedExtent, viewResolution, pixelRatio, projection);\n }\n if (image && this.loadImage(image)) {\n this.image_ = image;\n this.skippedFeatures_ = skippedFeatures;\n }\n }\n\n if (this.image_) {\n image = this.image_;\n var imageExtent = image.getExtent();\n var imageResolution = image.getResolution();\n var imagePixelRatio = image.getPixelRatio();\n var scale = pixelRatio * imageResolution /\n (viewResolution * imagePixelRatio);\n var transform = composeTransform(this.imageTransform_,\n pixelRatio * size[0] / 2, pixelRatio * size[1] / 2,\n scale, scale,\n 0,\n imagePixelRatio * (imageExtent[0] - viewCenter[0]) / imageResolution,\n imagePixelRatio * (viewCenter[1] - imageExtent[3]) / imageResolution);\n composeTransform(this.coordinateToCanvasPixelTransform,\n pixelRatio * size[0] / 2 - transform[4], pixelRatio * size[1] / 2 - transform[5],\n pixelRatio / viewResolution, -pixelRatio / viewResolution,\n 0,\n -viewCenter[0], -viewCenter[1]);\n\n this.renderedResolution = imageResolution * pixelRatio / imagePixelRatio;\n }\n\n return !!this.image_;\n };\n\n /**\n * @inheritDoc\n */\n CanvasImageLayerRenderer.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (coordinate, frameState, hitTolerance, callback) {\n if (this.vectorRenderer_) {\n return this.vectorRenderer_.forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, callback);\n } else {\n return IntermediateCanvasRenderer.prototype.forEachFeatureAtCoordinate.call(this, coordinate, frameState, hitTolerance, callback);\n }\n };\n\n return CanvasImageLayerRenderer;\n}(IntermediateCanvasRenderer));\n\n\n/**\n * Determine if this renderer handles the provided layer.\n * @param {import(\"../../layer/Layer.js\").default} layer The candidate layer.\n * @return {boolean} The renderer can render the layer.\n */\nCanvasImageLayerRenderer['handles'] = function(layer) {\n return layer.getType() === LayerType.IMAGE ||\n layer.getType() === LayerType.VECTOR &&\n /** @type {import(\"../../layer/Vector.js\").default} */ (layer).getRenderMode() === VectorRenderType.IMAGE;\n};\n\n\n/**\n * Create a layer renderer.\n * @param {import(\"../Map.js\").default} mapRenderer The map renderer.\n * @param {import(\"../../layer/Layer.js\").default} layer The layer to be rendererd.\n * @return {CanvasImageLayerRenderer} The layer renderer.\n */\nCanvasImageLayerRenderer['create'] = function(mapRenderer, layer) {\n return new CanvasImageLayerRenderer(/** @type {import(\"../../layer/Image.js\").default} */ (layer));\n};\n\n\nexport default CanvasImageLayerRenderer;\n\n//# sourceMappingURL=ImageLayer.js.map","/**\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 */\nvar TileRange = function TileRange(minX, maxX, minY, maxY) {\n\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/**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @return {boolean} Contains tile coordinate.\n */\nTileRange.prototype.contains = function contains (tileCoord) {\n return this.containsXY(tileCoord[1], tileCoord[2]);\n};\n\n/**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Contains.\n */\nTileRange.prototype.containsTileRange = function containsTileRange (tileRange) {\n return this.minX <= tileRange.minX && tileRange.maxX <= this.maxX &&\n this.minY <= tileRange.minY && tileRange.maxY <= this.maxY;\n};\n\n/**\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @return {boolean} Contains coordinate.\n */\nTileRange.prototype.containsXY = function 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 */\nTileRange.prototype.equals = function equals (tileRange) {\n return this.minX == tileRange.minX && this.minY == tileRange.minY &&\n this.maxX == tileRange.maxX && this.maxY == tileRange.maxY;\n};\n\n/**\n * @param {TileRange} tileRange Tile range.\n */\nTileRange.prototype.extend = function 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 */\nTileRange.prototype.getHeight = function getHeight () {\n return this.maxY - this.minY + 1;\n};\n\n/**\n * @return {import(\"./size.js\").Size} Size.\n */\nTileRange.prototype.getSize = function getSize () {\n return [this.getWidth(), this.getHeight()];\n};\n\n/**\n * @return {number} Width.\n */\nTileRange.prototype.getWidth = function getWidth () {\n return this.maxX - this.minX + 1;\n};\n\n/**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Intersects.\n */\nTileRange.prototype.intersects = function intersects (tileRange) {\n return this.minX <= tileRange.maxX &&\n this.maxX >= tileRange.minX &&\n this.minY <= tileRange.maxY &&\n this.maxY >= tileRange.minY;\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\n\nexport default TileRange;\n\n//# sourceMappingURL=TileRange.js.map","/**\n * @module ol/renderer/canvas/TileLayer\n */\nimport {getUid} from '../../util.js';\nimport LayerType from '../../LayerType.js';\nimport TileRange from '../../TileRange.js';\nimport TileState from '../../TileState.js';\nimport ViewHint from '../../ViewHint.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {containsExtent, createEmpty, equals, getIntersection, isEmpty} from '../../extent.js';\nimport IntermediateCanvasRenderer from './IntermediateCanvas.js';\nimport {create as createTransform, compose as composeTransform} from '../../transform.js';\n\n/**\n * @classdesc\n * Canvas renderer for tile layers.\n * @api\n */\nvar CanvasTileLayerRenderer = /*@__PURE__*/(function (IntermediateCanvasRenderer) {\n function CanvasTileLayerRenderer(tileLayer, opt_noContext) {\n\n IntermediateCanvasRenderer.call(this, tileLayer);\n\n /**\n * @protected\n * @type {CanvasRenderingContext2D}\n */\n this.context = opt_noContext ? null : createCanvasContext2D();\n\n /**\n * @private\n * @type {number}\n */\n this.oversampling_;\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.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 * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.imageTransform_ = createTransform();\n\n /**\n * @protected\n * @type {number}\n */\n this.zDirection = 0;\n\n }\n\n if ( IntermediateCanvasRenderer ) CanvasTileLayerRenderer.__proto__ = IntermediateCanvasRenderer;\n CanvasTileLayerRenderer.prototype = Object.create( IntermediateCanvasRenderer && IntermediateCanvasRenderer.prototype );\n CanvasTileLayerRenderer.prototype.constructor = CanvasTileLayerRenderer;\n\n /**\n * @private\n * @param {import(\"../../Tile.js\").default} tile Tile.\n * @return {boolean} Tile is drawable.\n */\n CanvasTileLayerRenderer.prototype.isDrawableTile_ = function isDrawableTile_ (tile) {\n var tileLayer = /** @type {import(\"../../layer/Tile.js\").default} */ (this.getLayer());\n var tileState = tile.getState();\n var useInterimTilesOnError = tileLayer.getUseInterimTilesOnError();\n return tileState == TileState.LOADED ||\n tileState == TileState.EMPTY ||\n tileState == TileState.ERROR && !useInterimTilesOnError;\n };\n\n /**\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 CanvasTileLayerRenderer.prototype.getTile = function getTile (z, x, y, pixelRatio, projection) {\n var tileLayer = /** @type {import(\"../../layer/Tile.js\").default} */ (this.getLayer());\n var tileSource = /** @type {import(\"../../source/Tile.js\").default} */ (tileLayer.getSource());\n var tile = tileSource.getTile(z, x, y, pixelRatio, projection);\n if (tile.getState() == TileState.ERROR) {\n if (!tileLayer.getUseInterimTilesOnError()) {\n // When useInterimTilesOnError is false, we consider the error tile as loaded.\n tile.setState(TileState.LOADED);\n } 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 * @inheritDoc\n */\n CanvasTileLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState) {\n\n var pixelRatio = frameState.pixelRatio;\n var size = frameState.size;\n var viewState = frameState.viewState;\n var projection = viewState.projection;\n var viewResolution = viewState.resolution;\n var viewCenter = viewState.center;\n\n var tileLayer = /** @type {import(\"../../layer/Tile.js\").default} */ (this.getLayer());\n var tileSource = /** @type {import(\"../../source/Tile.js\").default} */ (tileLayer.getSource());\n var sourceRevision = tileSource.getRevision();\n var tileGrid = tileSource.getTileGridForProjection(projection);\n var z = tileGrid.getZForResolution(viewResolution, this.zDirection);\n var tileResolution = tileGrid.getResolution(z);\n var oversampling = Math.round(viewResolution / tileResolution) || 1;\n var extent = frameState.extent;\n\n if (layerState.extent !== undefined) {\n extent = getIntersection(extent, layerState.extent);\n }\n if (isEmpty(extent)) {\n // Return false to prevent the rendering of the layer.\n return false;\n }\n\n var tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n var imageExtent = tileGrid.getTileRangeExtent(z, tileRange);\n\n var tilePixelRatio = tileSource.getTilePixelRatio(pixelRatio);\n\n /**\n * @type {Object<number, Object<string, import(\"../../Tile.js\").default>>}\n */\n var tilesToDrawByZ = {};\n tilesToDrawByZ[z] = {};\n\n var findLoadedTiles = this.createLoadedTileFinder(\n tileSource, projection, tilesToDrawByZ);\n\n var hints = frameState.viewHints;\n var animatingOrInteracting = hints[ViewHint.ANIMATING] || hints[ViewHint.INTERACTING];\n\n var tmpExtent = this.tmpExtent;\n var tmpTileRange = this.tmpTileRange_;\n this.newTiles_ = false;\n var tile, x, y;\n for (x = tileRange.minX; x <= tileRange.maxX; ++x) {\n for (y = tileRange.minY; y <= tileRange.maxY; ++y) {\n if (Date.now() - frameState.time > 16 && animatingOrInteracting) {\n continue;\n }\n tile = this.getTile(z, x, y, pixelRatio, projection);\n if (this.isDrawableTile_(tile)) {\n var uid = getUid(this);\n if (tile.getState() == TileState.LOADED) {\n tilesToDrawByZ[z][tile.tileCoord.toString()] = tile;\n var inTransition = tile.inTransition(uid);\n if (!this.newTiles_ && (inTransition || this.renderedTiles.indexOf(tile) === -1)) {\n this.newTiles_ = true;\n }\n }\n if (tile.getAlpha(uid, frameState.time) === 1) {\n // don't look for alt tiles if alpha is 1\n continue;\n }\n }\n\n var childTileRange = tileGrid.getTileCoordChildTileRange(\n tile.tileCoord, tmpTileRange, tmpExtent);\n var covered = false;\n if (childTileRange) {\n covered = findLoadedTiles(z + 1, childTileRange);\n }\n if (!covered) {\n tileGrid.forEachTileCoordParentTileRange(\n tile.tileCoord, findLoadedTiles, null, tmpTileRange, tmpExtent);\n }\n\n }\n }\n\n var renderedResolution = tileResolution * pixelRatio / tilePixelRatio * oversampling;\n if (!(this.renderedResolution && Date.now() - frameState.time > 16 && animatingOrInteracting) && (\n this.newTiles_ ||\n !(this.renderedExtent_ && containsExtent(this.renderedExtent_, extent)) ||\n this.renderedRevision != sourceRevision ||\n oversampling != this.oversampling_ ||\n !animatingOrInteracting && renderedResolution != this.renderedResolution\n )) {\n\n var context = this.context;\n if (context) {\n var tilePixelSize = tileSource.getTilePixelSize(z, pixelRatio, projection);\n var width = Math.round(tileRange.getWidth() * tilePixelSize[0] / oversampling);\n var height = Math.round(tileRange.getHeight() * tilePixelSize[1] / oversampling);\n var canvas = context.canvas;\n if (canvas.width != width || canvas.height != height) {\n this.oversampling_ = oversampling;\n canvas.width = width;\n canvas.height = height;\n } else {\n if ((this.renderedExtent_ && !equals(imageExtent, this.renderedExtent_)) ||\n this.renderedRevision != sourceRevision) {\n context.clearRect(0, 0, width, height);\n }\n oversampling = this.oversampling_;\n }\n }\n\n this.renderedTiles.length = 0;\n /** @type {Array<number>} */\n var zs = Object.keys(tilesToDrawByZ).map(Number);\n zs.sort(function(a, b) {\n if (a === z) {\n return 1;\n } else if (b === z) {\n return -1;\n } else {\n return a > b ? 1 : a < b ? -1 : 0;\n }\n });\n var currentResolution, currentScale, currentTilePixelSize, currentZ, i, ii;\n var tileExtent, tileGutter, tilesToDraw, w, h;\n for (i = 0, ii = zs.length; i < ii; ++i) {\n currentZ = zs[i];\n currentTilePixelSize = tileSource.getTilePixelSize(currentZ, pixelRatio, projection);\n currentResolution = tileGrid.getResolution(currentZ);\n currentScale = currentResolution / tileResolution;\n tileGutter = tilePixelRatio * tileSource.getGutterForProjection(projection);\n tilesToDraw = tilesToDrawByZ[currentZ];\n for (var tileCoordKey in tilesToDraw) {\n tile = tilesToDraw[tileCoordKey];\n tileExtent = tileGrid.getTileCoordExtent(tile.getTileCoord(), tmpExtent);\n x = (tileExtent[0] - imageExtent[0]) / tileResolution * tilePixelRatio / oversampling;\n y = (imageExtent[3] - tileExtent[3]) / tileResolution * tilePixelRatio / oversampling;\n w = currentTilePixelSize[0] * currentScale / oversampling;\n h = currentTilePixelSize[1] * currentScale / oversampling;\n this.drawTileImage(tile, frameState, layerState, x, y, w, h, tileGutter, z === currentZ);\n this.renderedTiles.push(tile);\n }\n }\n\n this.renderedRevision = sourceRevision;\n this.renderedResolution = tileResolution * pixelRatio / tilePixelRatio * oversampling;\n this.renderedExtent_ = imageExtent;\n }\n\n var scale = this.renderedResolution / viewResolution;\n var transform = composeTransform(this.imageTransform_,\n pixelRatio * size[0] / 2, pixelRatio * size[1] / 2,\n scale, scale,\n 0,\n (this.renderedExtent_[0] - viewCenter[0]) / this.renderedResolution * pixelRatio,\n (viewCenter[1] - this.renderedExtent_[3]) / this.renderedResolution * pixelRatio);\n composeTransform(this.coordinateToCanvasPixelTransform,\n pixelRatio * size[0] / 2 - transform[4], pixelRatio * size[1] / 2 - transform[5],\n pixelRatio / viewResolution, -pixelRatio / viewResolution,\n 0,\n -viewCenter[0], -viewCenter[1]);\n\n\n this.updateUsedTiles(frameState.usedTiles, tileSource, z, tileRange);\n this.manageTilePyramid(frameState, tileSource, tileGrid, pixelRatio,\n projection, extent, z, tileLayer.getPreload());\n this.scheduleExpireCache(frameState, tileSource);\n\n return this.renderedTiles.length > 0;\n };\n\n /**\n * @param {import(\"../../Tile.js\").default} tile Tile.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../layer/Layer.js\").State} layerState Layer state.\n * @param {number} x Left of the tile.\n * @param {number} y Top of the tile.\n * @param {number} w Width of the tile.\n * @param {number} h Height of the tile.\n * @param {number} gutter Tile gutter.\n * @param {boolean} transition Apply an alpha transition.\n */\n CanvasTileLayerRenderer.prototype.drawTileImage = function drawTileImage (tile, frameState, layerState, x, y, w, h, gutter, transition) {\n var image = this.getTileImage(tile);\n if (!image) {\n return;\n }\n var uid = getUid(this);\n var alpha = transition ? tile.getAlpha(uid, frameState.time) : 1;\n var tileLayer = /** @type {import(\"../../layer/Tile.js\").default} */ (this.getLayer());\n var tileSource = /** @type {import(\"../../source/Tile.js\").default} */ (tileLayer.getSource());\n if (alpha === 1 && !tileSource.getOpaque(frameState.viewState.projection)) {\n this.context.clearRect(x, y, w, h);\n }\n var alphaChanged = alpha !== this.context.globalAlpha;\n if (alphaChanged) {\n this.context.save();\n this.context.globalAlpha = alpha;\n }\n this.context.drawImage(image, gutter, gutter,\n image.width - 2 * gutter, image.height - 2 * gutter, x, y, w, h);\n\n if (alphaChanged) {\n this.context.restore();\n }\n if (alpha !== 1) {\n frameState.animate = true;\n } else if (transition) {\n tile.endTransition(uid);\n }\n };\n\n /**\n * @inheritDoc\n */\n CanvasTileLayerRenderer.prototype.getImage = function getImage () {\n var context = this.context;\n return context ? context.canvas : null;\n };\n\n /**\n * @inheritDoc\n */\n CanvasTileLayerRenderer.prototype.getImageTransform = function getImageTransform () {\n return this.imageTransform_;\n };\n\n /**\n * Get the image from a tile.\n * @param {import(\"../../Tile.js\").default} tile Tile.\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n * @protected\n */\n CanvasTileLayerRenderer.prototype.getTileImage = function getTileImage (tile) {\n return /** @type {import(\"../../ImageTile.js\").default} */ (tile).getImage();\n };\n\n return CanvasTileLayerRenderer;\n}(IntermediateCanvasRenderer));\n\n\n/**\n * Determine if this renderer handles the provided layer.\n * @param {import(\"../../layer/Layer.js\").default} layer The candidate layer.\n * @return {boolean} The renderer can render the layer.\n */\nCanvasTileLayerRenderer['handles'] = function(layer) {\n return layer.getType() === LayerType.TILE;\n};\n\n\n/**\n * Create a layer renderer.\n * @param {import(\"../Map.js\").default} mapRenderer The map renderer.\n * @param {import(\"../../layer/Layer.js\").default} layer The layer to be rendererd.\n * @return {CanvasTileLayerRenderer} The layer renderer.\n */\nCanvasTileLayerRenderer['create'] = function(mapRenderer, layer) {\n return new CanvasTileLayerRenderer(/** @type {import(\"../../layer/Tile.js\").default} */ (layer));\n};\n\n\n/**\n * @function\n * @return {import(\"../../layer/Tile.js\").default|import(\"../../layer/VectorTile.js\").default}\n */\nCanvasTileLayerRenderer.prototype.getLayer;\n\n\nexport default CanvasTileLayerRenderer;\n\n//# sourceMappingURL=TileLayer.js.map","/**\n * @module ol/render/ReplayGroup\n */\nimport {abstract} from '../util.js';\n\n/**\n * Base class for replay groups.\n */\nvar ReplayGroup = function ReplayGroup () {};\n\nReplayGroup.prototype.getReplay = function getReplay (zIndex, replayType) {\n return abstract();\n};\n\n/**\n * @abstract\n * @return {boolean} Is empty.\n */\nReplayGroup.prototype.isEmpty = function isEmpty () {\n return abstract();\n};\n\n/**\n * @abstract\n * @param {boolean} group Group with previous replay\n * @return {Array<*>} The resulting instruction group\n */\nReplayGroup.prototype.addDeclutter = function addDeclutter (group) {\n return abstract();\n};\n\nexport default ReplayGroup;\n\n//# sourceMappingURL=ReplayGroup.js.map","/**\n * @module ol/render/ReplayType\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//# sourceMappingURL=ReplayType.js.map","/**\n * @module ol/geom/flat/length\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 * @return {number} Length.\n */\nexport function lineStringLength(flatCoordinates, offset, end, stride) {\n var x1 = flatCoordinates[offset];\n var y1 = flatCoordinates[offset + 1];\n var length = 0;\n for (var i = offset + stride; i < end; i += stride) {\n var x2 = flatCoordinates[i];\n var y2 = flatCoordinates[i + 1];\n length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n x1 = x2;\n y1 = y2;\n }\n return length;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Perimeter.\n */\nexport function linearRingLength(flatCoordinates, offset, end, stride) {\n var perimeter = lineStringLength(flatCoordinates, offset, end, stride);\n var dx = flatCoordinates[end - stride] - flatCoordinates[offset];\n var dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];\n perimeter += Math.sqrt(dx * dx + dy * dy);\n return perimeter;\n}\n\n//# sourceMappingURL=length.js.map","/**\n * @module ol/geom/flat/textpath\n */\nimport {lerp} from '../../math.js';\n\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 {function(string):number} measure Measure function returning the\n * width of the character passed as 1st argument.\n * @param {number} startM m along the path where the text starts.\n * @param {number} maxAngle Max angle between adjacent chars in radians.\n * @return {Array<Array<*>>} The result array of null if `maxAngle` was\n * exceeded. Entries of the array are x, y, anchorX, angle, chunk.\n */\nexport function drawTextOnPath(\n flatCoordinates, offset, end, stride, text, measure, startM, maxAngle) {\n var result = [];\n\n // Keep text upright\n var reverse = flatCoordinates[offset] > flatCoordinates[end - stride];\n\n var numChars = text.length;\n\n var x1 = flatCoordinates[offset];\n var y1 = flatCoordinates[offset + 1];\n offset += stride;\n var x2 = flatCoordinates[offset];\n var y2 = flatCoordinates[offset + 1];\n var segmentM = 0;\n var segmentLength = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n\n var chunk = '';\n var chunkLength = 0;\n var data, index, previousAngle;\n for (var i = 0; i < numChars; ++i) {\n index = reverse ? numChars - i - 1 : i;\n var char = text.charAt(index);\n chunk = reverse ? char + chunk : chunk + char;\n var charLength = measure(chunk) - chunkLength;\n chunkLength += charLength;\n var charM = startM + charLength / 2;\n while (offset < end - stride && segmentM + segmentLength < charM) {\n x1 = x2;\n y1 = y2;\n offset += stride;\n x2 = flatCoordinates[offset];\n y2 = flatCoordinates[offset + 1];\n segmentM += segmentLength;\n segmentLength = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n }\n var segmentPos = charM - segmentM;\n var angle = Math.atan2(y2 - y1, x2 - x1);\n if (reverse) {\n angle += angle > 0 ? -Math.PI : Math.PI;\n }\n if (previousAngle !== undefined) {\n var delta = angle - previousAngle;\n delta += (delta > Math.PI) ? -2 * Math.PI : (delta < -Math.PI) ? 2 * Math.PI : 0;\n if (Math.abs(delta) > maxAngle) {\n return null;\n }\n }\n var interpolate = segmentPos / segmentLength;\n var x = lerp(x1, x2, interpolate);\n var y = lerp(y1, y2, interpolate);\n if (previousAngle == angle) {\n if (reverse) {\n data[0] = x;\n data[1] = y;\n data[2] = charLength / 2;\n }\n data[4] = chunk;\n } else {\n chunk = char;\n chunkLength = charLength;\n data = [x, y, charLength / 2, angle, chunk];\n if (reverse) {\n result.unshift(data);\n } else {\n result.push(data);\n }\n previousAngle = angle;\n }\n startM += charLength;\n }\n return result;\n}\n\n//# sourceMappingURL=textpath.js.map","/**\n * @module ol/render/canvas/Instruction\n */\n\n/**\n * @enum {number}\n */\nvar Instruction = {\n BEGIN_GEOMETRY: 0,\n BEGIN_PATH: 1,\n CIRCLE: 2,\n CLOSE_PATH: 3,\n CUSTOM: 4,\n DRAW_CHARS: 5,\n DRAW_IMAGE: 6,\n END_GEOMETRY: 7,\n FILL: 8,\n MOVE_TO_LINE_TO: 9,\n SET_FILL_STYLE: 10,\n SET_STROKE_STYLE: 11,\n STROKE: 12\n};\n\n\n/**\n * @type {Array<Instruction>}\n */\nexport var fillInstruction = [Instruction.FILL];\n\n\n/**\n * @type {Array<Instruction>}\n */\nexport var strokeInstruction = [Instruction.STROKE];\n\n\n/**\n * @type {Array<Instruction>}\n */\nexport var beginPathInstruction = [Instruction.BEGIN_PATH];\n\n\n/**\n * @type {Array<Instruction>}\n */\nexport var closePathInstruction = [Instruction.CLOSE_PATH];\n\n\nexport default Instruction;\n\n//# sourceMappingURL=Instruction.js.map","/**\n * @module ol/render/replay\n */\nimport ReplayType from './ReplayType.js';\n\n\n/**\n * @const\n * @type {Array<ReplayType>}\n */\nexport var ORDER = [\n ReplayType.POLYGON,\n ReplayType.CIRCLE,\n ReplayType.LINE_STRING,\n ReplayType.IMAGE,\n ReplayType.TEXT,\n ReplayType.DEFAULT\n];\n\n/**\n * @const\n * @enum {number}\n */\nexport var TEXT_ALIGN = {};\nTEXT_ALIGN['left'] = 0;\nTEXT_ALIGN['end'] = 0;\nTEXT_ALIGN['center'] = 0.5;\nTEXT_ALIGN['right'] = 1;\nTEXT_ALIGN['start'] = 1;\nTEXT_ALIGN['top'] = 0;\nTEXT_ALIGN['middle'] = 0.5;\nTEXT_ALIGN['hanging'] = 0.2;\nTEXT_ALIGN['alphabetic'] = 0.8;\nTEXT_ALIGN['ideographic'] = 0.8;\nTEXT_ALIGN['bottom'] = 1;\n\n//# sourceMappingURL=replay.js.map","/**\n * @module ol/render/canvas/Replay\n */\nimport {getUid} from '../../util.js';\nimport {equals, reverseSubArray} from '../../array.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {buffer, clone, coordinateRelationship, createEmpty, createOrUpdate,\n createOrUpdateEmpty, extend, extendCoordinate, intersects} from '../../extent.js';\nimport Relationship from '../../extent/Relationship.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport {inflateCoordinates, inflateCoordinatesArray, inflateMultiCoordinatesArray} from '../../geom/flat/inflate.js';\nimport {lineStringLength} from '../../geom/flat/length.js';\nimport {drawTextOnPath} from '../../geom/flat/textpath.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {CANVAS_LINE_DASH} from '../../has.js';\nimport {isEmpty} from '../../obj.js';\nimport VectorContext from '../VectorContext.js';\nimport {drawImage, resetTransform, defaultPadding, defaultFillStyle, defaultStrokeStyle,\n defaultMiterLimit, defaultLineWidth, defaultLineJoin, defaultLineDashOffset,\n defaultLineDash, defaultLineCap} from '../canvas.js';\nimport CanvasInstruction from './Instruction.js';\nimport {TEXT_ALIGN} from '../replay.js';\nimport {\n create as createTransform,\n compose as composeTransform,\n apply as applyTransform,\n setFromArray as transformSetFromArray\n} from '../../transform.js';\n\n\n/**\n * @type {import(\"../../extent.js\").Extent}\n */\nvar tmpExtent = createEmpty();\n\n\n/**\n * @type {!import(\"../../transform.js\").Transform}\n */\nvar tmpTransform = createTransform();\n\n\nvar CanvasReplay = /*@__PURE__*/(function (VectorContext) {\n function CanvasReplay(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {\n VectorContext.call(this);\n\n /**\n * @type {?}\n */\n this.declutterTree = declutterTree;\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 {boolean}\n */\n this.overlaps = overlaps;\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 {boolean}\n */\n this.alignFill_;\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 {!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(\"../../transform.js\").Transform}\n */\n this.renderedTransform_ = createTransform();\n\n /**\n * @protected\n * @type {Array<*>}\n */\n this.hitDetectionInstructions = [];\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.pixelCoordinates_ = null;\n\n /**\n * @protected\n * @type {import(\"../canvas.js\").FillStrokeState}\n */\n this.state = /** @type {import(\"../canvas.js\").FillStrokeState} */ ({});\n\n /**\n * @private\n * @type {number}\n */\n this.viewRotation_ = 0;\n\n }\n\n if ( VectorContext ) CanvasReplay.__proto__ = VectorContext;\n CanvasReplay.prototype = Object.create( VectorContext && VectorContext.prototype );\n CanvasReplay.prototype.constructor = CanvasReplay;\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 CanvasReplay.prototype.replayTextBackground_ = function replayTextBackground_ (context, p1, p2, p3, p4, fillInstruction, strokeInstruction) {\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_(context, /** @type {Array<*>} */ (strokeInstruction));\n context.stroke();\n }\n };\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} image Image.\n * @param {number} anchorX Anchor X.\n * @param {number} anchorY Anchor Y.\n * @param {import(\"../canvas.js\").DeclutterGroup} declutterGroup Declutter group.\n * @param {number} height Height.\n * @param {number} opacity Opacity.\n * @param {number} originX Origin X.\n * @param {number} originY Origin Y.\n * @param {number} rotation Rotation.\n * @param {number} scale Scale.\n * @param {boolean} snapToPixel Snap to pixel.\n * @param {number} width Width.\n * @param {Array<number>} padding Padding.\n * @param {Array<*>} fillInstruction Fill instruction.\n * @param {Array<*>} strokeInstruction Stroke instruction.\n */\n CanvasReplay.prototype.replayImage_ = function replayImage_ (\n context,\n x,\n y,\n image,\n anchorX,\n anchorY,\n declutterGroup,\n height,\n opacity,\n originX,\n originY,\n rotation,\n scale,\n snapToPixel,\n width,\n padding,\n fillInstruction,\n strokeInstruction\n ) {\n var fillStroke = fillInstruction || strokeInstruction;\n anchorX *= scale;\n anchorY *= scale;\n x -= anchorX;\n y -= anchorY;\n\n var w = (width + originX > image.width) ? image.width - originX : width;\n var h = (height + originY > image.height) ? image.height - originY : height;\n var boxW = padding[3] + w * scale + padding[1];\n var boxH = padding[0] + h * scale + padding[2];\n var boxX = x - padding[3];\n var boxY = y - padding[0];\n\n /** @type {import(\"../../coordinate.js\").Coordinate} */\n var p1;\n /** @type {import(\"../../coordinate.js\").Coordinate} */\n var p2;\n /** @type {import(\"../../coordinate.js\").Coordinate} */\n var p3;\n /** @type {import(\"../../coordinate.js\").Coordinate} */\n var p4;\n if (fillStroke || rotation !== 0) {\n p1 = [boxX, boxY];\n p2 = [boxX + boxW, boxY];\n p3 = [boxX + boxW, boxY + boxH];\n p4 = [boxX, boxY + boxH];\n }\n\n var transform = null;\n if (rotation !== 0) {\n var centerX = x + anchorX;\n var centerY = y + anchorY;\n transform = composeTransform(tmpTransform, centerX, centerY, 1, 1, rotation, -centerX, -centerY);\n\n createOrUpdateEmpty(tmpExtent);\n extendCoordinate(tmpExtent, applyTransform(tmpTransform, p1));\n extendCoordinate(tmpExtent, applyTransform(tmpTransform, p2));\n extendCoordinate(tmpExtent, applyTransform(tmpTransform, p3));\n extendCoordinate(tmpExtent, applyTransform(tmpTransform, p4));\n } else {\n createOrUpdate(boxX, boxY, boxX + boxW, boxY + boxH, tmpExtent);\n }\n var canvas = context.canvas;\n var strokePadding = strokeInstruction ? (strokeInstruction[2] * scale / 2) : 0;\n var intersects =\n tmpExtent[0] - strokePadding <= canvas.width && tmpExtent[2] + strokePadding >= 0 &&\n tmpExtent[1] - strokePadding <= canvas.height && tmpExtent[3] + strokePadding >= 0;\n\n if (snapToPixel) {\n x = Math.round(x);\n y = Math.round(y);\n }\n\n if (declutterGroup) {\n if (!intersects && declutterGroup[4] == 1) {\n return;\n }\n extend(declutterGroup, tmpExtent);\n var declutterArgs = intersects ?\n [context, transform ? transform.slice(0) : null, opacity, image, originX, originY, w, h, x, y, scale] :\n null;\n if (declutterArgs && fillStroke) {\n declutterArgs.push(fillInstruction, strokeInstruction, p1, p2, p3, p4);\n }\n declutterGroup.push(declutterArgs);\n } else if (intersects) {\n if (fillStroke) {\n this.replayTextBackground_(context, p1, p2, p3, p4,\n /** @type {Array<*>} */ (fillInstruction),\n /** @type {Array<*>} */ (strokeInstruction));\n }\n drawImage(context, transform, opacity, image, originX, originY, w, h, x, y, scale);\n }\n };\n\n /**\n * @protected\n * @param {Array<number>} dashArray Dash array.\n * @return {Array<number>} Dash array with pixel ratio applied\n */\n CanvasReplay.prototype.applyPixelRatio = function applyPixelRatio (dashArray) {\n var pixelRatio = this.pixelRatio;\n return pixelRatio == 1 ? dashArray : dashArray.map(function(dash) {\n return dash * pixelRatio;\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} closed Last input coordinate equals first.\n * @param {boolean} skipFirst Skip first coordinate.\n * @protected\n * @return {number} My end.\n */\n CanvasReplay.prototype.appendFlatCoordinates = function appendFlatCoordinates (flatCoordinates, offset, end, stride, closed, skipFirst) {\n\n var myEnd = this.coordinates.length;\n var extent = this.getBufferedMaxExtent();\n if (skipFirst) {\n offset += stride;\n }\n var lastCoord = [flatCoordinates[offset], flatCoordinates[offset + 1]];\n var nextCoord = [NaN, NaN];\n var skipped = true;\n\n var i, lastRel, nextRel;\n for (i = offset + stride; i < end; i += stride) {\n nextCoord[0] = flatCoordinates[i];\n nextCoord[1] = flatCoordinates[i + 1];\n nextRel = coordinateRelationship(extent, nextCoord);\n if (nextRel !== lastRel) {\n if (skipped) {\n this.coordinates[myEnd++] = lastCoord[0];\n this.coordinates[myEnd++] = lastCoord[1];\n }\n this.coordinates[myEnd++] = nextCoord[0];\n this.coordinates[myEnd++] = nextCoord[1];\n skipped = false;\n } else if (nextRel === Relationship.INTERSECTING) {\n this.coordinates[myEnd++] = nextCoord[0];\n this.coordinates[myEnd++] = nextCoord[1];\n skipped = false;\n } else {\n skipped = true;\n }\n lastCoord[0] = nextCoord[0];\n lastCoord[1] = 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 this.coordinates[myEnd++] = lastCoord[0];\n this.coordinates[myEnd++] = lastCoord[1];\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>} replayEnds Replay ends.\n * @return {number} Offset.\n */\n CanvasReplay.prototype.drawCustomCoordinates_ = function drawCustomCoordinates_ (flatCoordinates, offset, ends, stride, replayEnds) {\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n var replayEnd = this.appendFlatCoordinates(flatCoordinates, offset, end, stride, false, false);\n replayEnds.push(replayEnd);\n offset = end;\n }\n return offset;\n };\n\n /**\n * @inheritDoc.\n */\n CanvasReplay.prototype.drawCustom = function drawCustom (geometry, feature, renderer) {\n this.beginGeometry(geometry, feature);\n var type = geometry.getType();\n var stride = geometry.getStride();\n var replayBegin = this.coordinates.length;\n var flatCoordinates, replayEnd, replayEnds, replayEndss;\n var offset;\n if (type == GeometryType.MULTI_POLYGON) {\n geometry = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry);\n flatCoordinates = geometry.getOrientedFlatCoordinates();\n replayEndss = [];\n var endss = geometry.getEndss();\n offset = 0;\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var myEnds = [];\n offset = this.drawCustomCoordinates_(flatCoordinates, offset, endss[i], stride, myEnds);\n replayEndss.push(myEnds);\n }\n this.instructions.push([CanvasInstruction.CUSTOM,\n replayBegin, replayEndss, geometry, renderer, inflateMultiCoordinatesArray]);\n } else if (type == GeometryType.POLYGON || type == GeometryType.MULTI_LINE_STRING) {\n replayEnds = [];\n flatCoordinates = (type == GeometryType.POLYGON) ?\n /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry).getOrientedFlatCoordinates() :\n geometry.getFlatCoordinates();\n offset = this.drawCustomCoordinates_(flatCoordinates, 0,\n /** @type {import(\"../../geom/Polygon.js\").default|import(\"../../geom/MultiLineString.js\").default} */ (geometry).getEnds(),\n stride, replayEnds);\n this.instructions.push([CanvasInstruction.CUSTOM,\n replayBegin, replayEnds, geometry, renderer, inflateCoordinatesArray]);\n } else if (type == GeometryType.LINE_STRING || type == GeometryType.MULTI_POINT) {\n flatCoordinates = geometry.getFlatCoordinates();\n replayEnd = this.appendFlatCoordinates(\n flatCoordinates, 0, flatCoordinates.length, stride, false, false);\n this.instructions.push([CanvasInstruction.CUSTOM,\n replayBegin, replayEnd, geometry, renderer, inflateCoordinates]);\n } else if (type == GeometryType.POINT) {\n flatCoordinates = geometry.getFlatCoordinates();\n this.coordinates.push(flatCoordinates[0], flatCoordinates[1]);\n replayEnd = this.coordinates.length;\n this.instructions.push([CanvasInstruction.CUSTOM,\n replayBegin, replayEnd, geometry, renderer]);\n }\n this.endGeometry(geometry, feature);\n };\n\n /**\n * @protected\n * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n * @param {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} feature Feature.\n */\n CanvasReplay.prototype.beginGeometry = function beginGeometry (geometry, feature) {\n this.beginGeometryInstruction1_ = [CanvasInstruction.BEGIN_GEOMETRY, feature, 0];\n this.instructions.push(this.beginGeometryInstruction1_);\n this.beginGeometryInstruction2_ = [CanvasInstruction.BEGIN_GEOMETRY, feature, 0];\n this.hitDetectionInstructions.push(this.beginGeometryInstruction2_);\n };\n\n /**\n * FIXME empty description for jsdoc\n */\n CanvasReplay.prototype.finish = function finish () {};\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} context Context.\n */\n CanvasReplay.prototype.fill_ = function fill_ (context) {\n if (this.alignFill_) {\n var origin = applyTransform(this.renderedTransform_, [0, 0]);\n var repeatSize = 512 * this.pixelRatio;\n context.translate(origin[0] % repeatSize, origin[1] % repeatSize);\n context.rotate(this.viewRotation_);\n }\n context.fill();\n if (this.alignFill_) {\n context.setTransform.apply(context, resetTransform);\n }\n };\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} context Context.\n * @param {Array<*>} instruction Instruction.\n */\n CanvasReplay.prototype.setStrokeStyle_ = function setStrokeStyle_ (context, instruction) {\n context.strokeStyle = /** @type {import(\"../../colorlike.js\").ColorLike} */ (instruction[1]);\n context.lineWidth = /** @type {number} */ (instruction[2]);\n context.lineCap = /** @type {CanvasLineCap} */ (instruction[3]);\n context.lineJoin = /** @type {CanvasLineJoin} */ (instruction[4]);\n context.miterLimit = /** @type {number} */ (instruction[5]);\n if (CANVAS_LINE_DASH) {\n context.lineDashOffset = /** @type {number} */ (instruction[7]);\n context.setLineDash(/** @type {Array<number>} */ (instruction[6]));\n }\n };\n\n /**\n * @param {import(\"../canvas.js\").DeclutterGroup} declutterGroup Declutter group.\n * @param {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} feature Feature.\n */\n CanvasReplay.prototype.renderDeclutter_ = function renderDeclutter_ (declutterGroup, feature) {\n if (declutterGroup && declutterGroup.length > 5) {\n var groupCount = declutterGroup[4];\n if (groupCount == 1 || groupCount == declutterGroup.length - 5) {\n /** @type {import(\"../../structs/RBush.js\").Entry} */\n var box = {\n minX: /** @type {number} */ (declutterGroup[0]),\n minY: /** @type {number} */ (declutterGroup[1]),\n maxX: /** @type {number} */ (declutterGroup[2]),\n maxY: /** @type {number} */ (declutterGroup[3]),\n value: feature\n };\n if (!this.declutterTree.collides(box)) {\n this.declutterTree.insert(box);\n for (var j = 5, jj = declutterGroup.length; j < jj; ++j) {\n var declutterData = /** @type {Array} */ (declutterGroup[j]);\n if (declutterData) {\n if (declutterData.length > 11) {\n this.replayTextBackground_(declutterData[0],\n declutterData[13], declutterData[14], declutterData[15], declutterData[16],\n declutterData[11], declutterData[12]);\n }\n drawImage.apply(undefined, declutterData);\n }\n }\n }\n declutterGroup.length = 5;\n createOrUpdateEmpty(declutterGroup);\n }\n }\n };\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {Object<string, boolean>} skippedFeaturesHash Ids of features\n * to skip.\n * @param {Array<*>} instructions Instructions array.\n * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T|undefined} featureCallback Feature callback.\n * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Only check features that intersect this\n * extent.\n * @return {T|undefined} Callback result.\n * @template T\n */\n CanvasReplay.prototype.replay_ = function replay_ (\n context,\n transform,\n skippedFeaturesHash,\n instructions,\n snapToPixel,\n featureCallback,\n opt_hitExtent\n ) {\n /** @type {Array<number>} */\n var 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, 0, this.coordinates.length, 2,\n transform, this.pixelCoordinates_);\n transformSetFromArray(this.renderedTransform_, transform);\n }\n var skipFeatures = !isEmpty(skippedFeaturesHash);\n var i = 0; // instruction index\n var ii = instructions.length; // end of instructions\n var d = 0; // data index\n var dd; // end of per-instruction data\n var anchorX, anchorY, prevX, prevY, roundX, roundY, declutterGroup, image;\n var pendingFill = 0;\n var pendingStroke = 0;\n var lastFillInstruction = null;\n var lastStrokeInstruction = null;\n var coordinateCache = this.coordinateCache_;\n var viewRotation = this.viewRotation_;\n\n var 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 var batchSize = this.instructions != instructions || this.overlaps ? 0 : 200;\n var /** @type {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} */ feature;\n var x, y;\n while (i < ii) {\n var instruction = instructions[i];\n var type = /** @type {CanvasInstruction} */ (instruction[0]);\n switch (type) {\n case CanvasInstruction.BEGIN_GEOMETRY:\n feature = /** @type {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} */ (instruction[1]);\n if ((skipFeatures && skippedFeaturesHash[getUid(feature)]) || !feature.getGeometry()) {\n i = /** @type {number} */ (instruction[2]);\n } else if (opt_hitExtent !== undefined && !intersects(\n opt_hitExtent, feature.getGeometry().getExtent())) {\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 = prevY = NaN;\n }\n ++i;\n break;\n case CanvasInstruction.CIRCLE:\n d = /** @type {number} */ (instruction[1]);\n var x1 = pixelCoordinates[d];\n var y1 = pixelCoordinates[d + 1];\n var x2 = pixelCoordinates[d + 2];\n var y2 = pixelCoordinates[d + 3];\n var dx = x2 - x1;\n var dy = y2 - y1;\n var r = Math.sqrt(dx * dx + dy * dy);\n context.moveTo(x1 + r, y1);\n context.arc(x1, y1, r, 0, 2 * Math.PI, true);\n ++i;\n break;\n case CanvasInstruction.CLOSE_PATH:\n context.closePath();\n ++i;\n break;\n case CanvasInstruction.CUSTOM:\n d = /** @type {number} */ (instruction[1]);\n dd = instruction[2];\n var geometry = /** @type {import(\"../../geom/SimpleGeometry.js\").default} */ (instruction[3]);\n var renderer = instruction[4];\n var fn = instruction.length == 6 ? instruction[5] : undefined;\n state.geometry = geometry;\n state.feature = feature;\n if (!(i in coordinateCache)) {\n coordinateCache[i] = [];\n }\n var coords = coordinateCache[i];\n if (fn) {\n fn(pixelCoordinates, d, dd, 2, coords);\n } 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} */\n (instruction[3]);\n // Remaining arguments in DRAW_IMAGE are in alphabetical order\n anchorX = /** @type {number} */ (instruction[4]);\n anchorY = /** @type {number} */ (instruction[5]);\n declutterGroup = featureCallback ? null : /** @type {import(\"../canvas.js\").DeclutterGroup} */ (instruction[6]);\n var height = /** @type {number} */ (instruction[7]);\n var opacity = /** @type {number} */ (instruction[8]);\n var originX = /** @type {number} */ (instruction[9]);\n var originY = /** @type {number} */ (instruction[10]);\n var rotateWithView = /** @type {boolean} */ (instruction[11]);\n var rotation = /** @type {number} */ (instruction[12]);\n var scale = /** @type {number} */ (instruction[13]);\n var width = /** @type {number} */ (instruction[14]);\n\n var padding = (void 0), backgroundFill = (void 0), backgroundStroke = (void 0);\n if (instruction.length > 16) {\n padding = /** @type {Array<number>} */ (instruction[15]);\n backgroundFill = /** @type {boolean} */ (instruction[16]);\n backgroundStroke = /** @type {boolean} */ (instruction[17]);\n } else {\n padding = defaultPadding;\n backgroundFill = backgroundStroke = false;\n }\n\n if (rotateWithView) {\n rotation += viewRotation;\n }\n for (; d < dd; d += 2) {\n this.replayImage_(context,\n pixelCoordinates[d], pixelCoordinates[d + 1], image, anchorX, anchorY,\n declutterGroup, height, opacity, originX, originY, rotation, scale,\n snapToPixel, width, padding,\n backgroundFill ? /** @type {Array<*>} */ (lastFillInstruction) : null,\n backgroundStroke ? /** @type {Array<*>} */ (lastStrokeInstruction) : null);\n }\n this.renderDeclutter_(declutterGroup, feature);\n ++i;\n break;\n case CanvasInstruction.DRAW_CHARS:\n var begin = /** @type {number} */ (instruction[1]);\n var end = /** @type {number} */ (instruction[2]);\n var baseline = /** @type {number} */ (instruction[3]);\n declutterGroup = featureCallback ? null : /** @type {import(\"../canvas.js\").DeclutterGroup} */ (instruction[4]);\n var overflow = /** @type {number} */ (instruction[5]);\n var fillKey = /** @type {string} */ (instruction[6]);\n var maxAngle = /** @type {number} */ (instruction[7]);\n var measure = /** @type {function(string):number} */ (instruction[8]);\n var offsetY = /** @type {number} */ (instruction[9]);\n var strokeKey = /** @type {string} */ (instruction[10]);\n var strokeWidth = /** @type {number} */ (instruction[11]);\n var text = /** @type {string} */ (instruction[12]);\n var textKey = /** @type {string} */ (instruction[13]);\n var textScale = /** @type {number} */ (instruction[14]);\n\n var pathLength = lineStringLength(pixelCoordinates, begin, end, 2);\n var textLength = measure(text);\n if (overflow || textLength <= pathLength) {\n /** @type {import(\"./TextReplay.js\").default} */\n var textReplay = /** @type {?} */ (this);\n var textAlign = textReplay.textStates[textKey].textAlign;\n var startM = (pathLength - textLength) * TEXT_ALIGN[textAlign];\n var parts = drawTextOnPath(\n pixelCoordinates, begin, end, 2, text, measure, startM, maxAngle);\n if (parts) {\n var c = (void 0), cc = (void 0), chars = (void 0), label = (void 0), part = (void 0);\n if (strokeKey) {\n for (c = 0, cc = parts.length; c < cc; ++c) {\n part = parts[c]; // x, y, anchorX, rotation, chunk\n chars = /** @type {string} */ (part[4]);\n label = textReplay.getImage(chars, textKey, '', strokeKey);\n anchorX = /** @type {number} */ (part[2]) + strokeWidth;\n anchorY = baseline * label.height + (0.5 - baseline) * 2 * strokeWidth - offsetY;\n this.replayImage_(context,\n /** @type {number} */ (part[0]), /** @type {number} */ (part[1]), label,\n anchorX, anchorY, declutterGroup, label.height, 1, 0, 0,\n /** @type {number} */ (part[3]), textScale, false, label.width,\n defaultPadding, null, null);\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 = textReplay.getImage(chars, textKey, fillKey, '');\n anchorX = /** @type {number} */ (part[2]);\n anchorY = baseline * label.height - offsetY;\n this.replayImage_(context,\n /** @type {number} */ (part[0]), /** @type {number} */ (part[1]), label,\n anchorX, anchorY, declutterGroup, label.height, 1, 0, 0,\n /** @type {number} */ (part[3]), textScale, false, label.width,\n defaultPadding, null, null);\n }\n }\n }\n }\n this.renderDeclutter_(declutterGroup, feature);\n ++i;\n break;\n case CanvasInstruction.END_GEOMETRY:\n if (featureCallback !== undefined) {\n feature = /** @type {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} */ (instruction[1]);\n var result = featureCallback(feature);\n if (result) {\n return result;\n }\n }\n ++i;\n break;\n case CanvasInstruction.FILL:\n if (batchSize) {\n pendingFill++;\n } 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 {import(\"../../transform.js\").Transform} transform Transform.\n * @param {number} viewRotation View rotation.\n * @param {Object<string, boolean>} skippedFeaturesHash Ids of features\n * to skip.\n * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n */\n CanvasReplay.prototype.replay = function replay (context, transform, viewRotation, skippedFeaturesHash, snapToPixel) {\n this.viewRotation_ = viewRotation;\n this.replay_(context, transform,\n skippedFeaturesHash, this.instructions, snapToPixel, undefined, undefined);\n };\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {number} viewRotation View rotation.\n * @param {Object<string, boolean>} skippedFeaturesHash Ids of features\n * to skip.\n * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T=} opt_featureCallback\n * Feature callback.\n * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Only check features that intersect this\n * extent.\n * @return {T|undefined} Callback result.\n * @template T\n */\n CanvasReplay.prototype.replayHitDetection = function replayHitDetection (\n context,\n transform,\n viewRotation,\n skippedFeaturesHash,\n opt_featureCallback,\n opt_hitExtent\n ) {\n this.viewRotation_ = viewRotation;\n return this.replay_(context, transform, skippedFeaturesHash,\n this.hitDetectionInstructions, true, opt_featureCallback, opt_hitExtent);\n };\n\n /**\n * Reverse the hit detection instructions.\n */\n CanvasReplay.prototype.reverseHitDetectionInstructions = function reverseHitDetectionInstructions () {\n var hitDetectionInstructions = this.hitDetectionInstructions;\n // step 1 - reverse array\n hitDetectionInstructions.reverse();\n // step 2 - reverse instructions within geometry blocks\n var i;\n var n = hitDetectionInstructions.length;\n var instruction;\n var type;\n var begin = -1;\n for (i = 0; i < n; ++i) {\n instruction = hitDetectionInstructions[i];\n type = /** @type {CanvasInstruction} */ (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 * @inheritDoc\n */\n CanvasReplay.prototype.setFillStrokeStyle = function setFillStrokeStyle (fillStyle, strokeStyle) {\n var state = this.state;\n if (fillStyle) {\n var fillStyleColor = fillStyle.getColor();\n state.fillStyle = asColorLike(fillStyleColor ?\n fillStyleColor : defaultFillStyle);\n } else {\n state.fillStyle = undefined;\n }\n if (strokeStyle) {\n var strokeStyleColor = strokeStyle.getColor();\n state.strokeStyle = asColorLike(strokeStyleColor ?\n strokeStyleColor : defaultStrokeStyle);\n var strokeStyleLineCap = strokeStyle.getLineCap();\n state.lineCap = strokeStyleLineCap !== undefined ?\n strokeStyleLineCap : defaultLineCap;\n var strokeStyleLineDash = strokeStyle.getLineDash();\n state.lineDash = strokeStyleLineDash ?\n strokeStyleLineDash.slice() : defaultLineDash;\n var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n state.lineDashOffset = strokeStyleLineDashOffset ?\n strokeStyleLineDashOffset : defaultLineDashOffset;\n var strokeStyleLineJoin = strokeStyle.getLineJoin();\n state.lineJoin = strokeStyleLineJoin !== undefined ?\n strokeStyleLineJoin : defaultLineJoin;\n var strokeStyleWidth = strokeStyle.getWidth();\n state.lineWidth = strokeStyleWidth !== undefined ?\n strokeStyleWidth : defaultLineWidth;\n var strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n state.miterLimit = strokeStyleMiterLimit !== undefined ?\n strokeStyleMiterLimit : 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 * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n * @return {Array<*>} Fill instruction.\n */\n CanvasReplay.prototype.createFill = function createFill (state, geometry) {\n var fillStyle = state.fillStyle;\n /** @type {Array<*>} */\n var fillInstruction = [CanvasInstruction.SET_FILL_STYLE, fillStyle];\n if (typeof fillStyle !== 'string') {\n // Fill is a pattern or gradient - align it!\n fillInstruction.push(true);\n }\n return fillInstruction;\n };\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n */\n CanvasReplay.prototype.applyStroke = function 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 CanvasReplay.prototype.createStroke = function createStroke (state) {\n return [\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle, state.lineWidth * this.pixelRatio, state.lineCap,\n state.lineJoin, state.miterLimit,\n this.applyPixelRatio(state.lineDash), state.lineDashOffset * this.pixelRatio\n ];\n };\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @param {function(this:CanvasReplay, import(\"../canvas.js\").FillStrokeState, (import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default)):Array<*>} createFill Create fill.\n * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n */\n CanvasReplay.prototype.updateFillStyle = function updateFillStyle (state, createFill, geometry) {\n var fillStyle = state.fillStyle;\n if (typeof fillStyle !== 'string' || state.currentFillStyle != fillStyle) {\n if (fillStyle !== undefined) {\n this.instructions.push(createFill.call(this, state, geometry));\n }\n state.currentFillStyle = fillStyle;\n }\n };\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @param {function(this:CanvasReplay, import(\"../canvas.js\").FillStrokeState)} applyStroke Apply stroke.\n */\n CanvasReplay.prototype.updateStrokeStyle = function updateStrokeStyle (state, applyStroke) {\n var strokeStyle = state.strokeStyle;\n var lineCap = state.lineCap;\n var lineDash = state.lineDash;\n var lineDashOffset = state.lineDashOffset;\n var lineJoin = state.lineJoin;\n var lineWidth = state.lineWidth;\n var miterLimit = state.miterLimit;\n if (state.currentStrokeStyle != strokeStyle ||\n state.currentLineCap != lineCap ||\n (lineDash != state.currentLineDash && !equals(state.currentLineDash, lineDash)) ||\n state.currentLineDashOffset != lineDashOffset ||\n state.currentLineJoin != lineJoin ||\n state.currentLineWidth != lineWidth ||\n state.currentMiterLimit != miterLimit) {\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(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n * @param {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} feature Feature.\n */\n CanvasReplay.prototype.endGeometry = function endGeometry (geometry, feature) {\n this.beginGeometryInstruction1_[2] = this.instructions.length;\n this.beginGeometryInstruction1_ = null;\n this.beginGeometryInstruction2_[2] = this.hitDetectionInstructions.length;\n this.beginGeometryInstruction2_ = null;\n var endGeometryInstruction = [CanvasInstruction.END_GEOMETRY, feature];\n this.instructions.push(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 CanvasReplay.prototype.getBufferedMaxExtent = function getBufferedMaxExtent () {\n if (!this.bufferedMaxExtent_) {\n this.bufferedMaxExtent_ = clone(this.maxExtent);\n if (this.maxLineWidth > 0) {\n var width = this.resolution * (this.maxLineWidth + 1) / 2;\n buffer(this.bufferedMaxExtent_, width, this.bufferedMaxExtent_);\n }\n }\n return this.bufferedMaxExtent_;\n };\n\n return CanvasReplay;\n}(VectorContext));\n\n\nexport default CanvasReplay;\n\n//# sourceMappingURL=Replay.js.map","/**\n * @module ol/render/canvas/ImageReplay\n */\nimport CanvasInstruction from './Instruction.js';\nimport CanvasReplay from './Replay.js';\n\nvar CanvasImageReplay = /*@__PURE__*/(function (CanvasReplay) {\n function CanvasImageReplay(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {\n CanvasReplay.call(this, tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);\n\n /**\n * @private\n * @type {import(\"../canvas.js\").DeclutterGroup}\n */\n this.declutterGroup_ = null;\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.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 {number|undefined}\n */\n this.scale_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.width_ = undefined;\n\n }\n\n if ( CanvasReplay ) CanvasImageReplay.__proto__ = CanvasReplay;\n CanvasImageReplay.prototype = Object.create( CanvasReplay && CanvasReplay.prototype );\n CanvasImageReplay.prototype.constructor = CanvasImageReplay;\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @private\n * @return {number} My end.\n */\n CanvasImageReplay.prototype.drawCoordinates_ = function drawCoordinates_ (flatCoordinates, offset, end, stride) {\n return this.appendFlatCoordinates(flatCoordinates, offset, end, stride, false, false);\n };\n\n /**\n * @inheritDoc\n */\n CanvasImageReplay.prototype.drawPoint = function drawPoint (pointGeometry, feature) {\n if (!this.image_) {\n return;\n }\n this.beginGeometry(pointGeometry, feature);\n var flatCoordinates = pointGeometry.getFlatCoordinates();\n var stride = pointGeometry.getStride();\n var myBegin = this.coordinates.length;\n var myEnd = this.drawCoordinates_(flatCoordinates, 0, flatCoordinates.length, stride);\n this.instructions.push([\n CanvasInstruction.DRAW_IMAGE, myBegin, myEnd, this.image_,\n // Remaining arguments to DRAW_IMAGE are in alphabetical order\n this.anchorX_, this.anchorY_, this.declutterGroup_, this.height_, this.opacity_,\n this.originX_, this.originY_, this.rotateWithView_, this.rotation_,\n this.scale_ * this.pixelRatio, this.width_\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.DRAW_IMAGE, myBegin, myEnd, this.hitDetectionImage_,\n // Remaining arguments to DRAW_IMAGE are in alphabetical order\n this.anchorX_, this.anchorY_, this.declutterGroup_, this.height_, this.opacity_,\n this.originX_, this.originY_, this.rotateWithView_, this.rotation_,\n this.scale_, this.width_\n ]);\n this.endGeometry(pointGeometry, feature);\n };\n\n /**\n * @inheritDoc\n */\n CanvasImageReplay.prototype.drawMultiPoint = function drawMultiPoint (multiPointGeometry, feature) {\n if (!this.image_) {\n return;\n }\n this.beginGeometry(multiPointGeometry, feature);\n var flatCoordinates = multiPointGeometry.getFlatCoordinates();\n var stride = multiPointGeometry.getStride();\n var myBegin = this.coordinates.length;\n var myEnd = this.drawCoordinates_(\n flatCoordinates, 0, flatCoordinates.length, stride);\n this.instructions.push([\n CanvasInstruction.DRAW_IMAGE, myBegin, myEnd, this.image_,\n // Remaining arguments to DRAW_IMAGE are in alphabetical order\n this.anchorX_, this.anchorY_, this.declutterGroup_, this.height_, this.opacity_,\n this.originX_, this.originY_, this.rotateWithView_, this.rotation_,\n this.scale_ * this.pixelRatio, this.width_\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.DRAW_IMAGE, myBegin, myEnd, this.hitDetectionImage_,\n // Remaining arguments to DRAW_IMAGE are in alphabetical order\n this.anchorX_, this.anchorY_, this.declutterGroup_, this.height_, this.opacity_,\n this.originX_, this.originY_, this.rotateWithView_, this.rotation_,\n this.scale_, this.width_\n ]);\n this.endGeometry(multiPointGeometry, feature);\n };\n\n /**\n * @inheritDoc\n */\n CanvasImageReplay.prototype.finish = function 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.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 };\n\n /**\n * @inheritDoc\n */\n CanvasImageReplay.prototype.setImageStyle = function setImageStyle (imageStyle, declutterGroup) {\n var anchor = imageStyle.getAnchor();\n var size = imageStyle.getSize();\n var hitDetectionImage = imageStyle.getHitDetectionImage(1);\n var image = imageStyle.getImage(1);\n var origin = imageStyle.getOrigin();\n this.anchorX_ = anchor[0];\n this.anchorY_ = anchor[1];\n this.declutterGroup_ = /** @type {import(\"../canvas.js\").DeclutterGroup} */ (declutterGroup);\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.getScale();\n this.width_ = size[0];\n };\n\n return CanvasImageReplay;\n}(CanvasReplay));\n\n\nexport default CanvasImageReplay;\n\n//# sourceMappingURL=ImageReplay.js.map","/**\n * @module ol/render/canvas/LineStringReplay\n */\nimport CanvasInstruction, {strokeInstruction, beginPathInstruction} from './Instruction.js';\nimport CanvasReplay from './Replay.js';\n\nvar CanvasLineStringReplay = /*@__PURE__*/(function (CanvasReplay) {\n function CanvasLineStringReplay(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {\n CanvasReplay.call(this, tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);\n }\n\n if ( CanvasReplay ) CanvasLineStringReplay.__proto__ = CanvasReplay;\n CanvasLineStringReplay.prototype = Object.create( CanvasReplay && CanvasReplay.prototype );\n CanvasLineStringReplay.prototype.constructor = CanvasLineStringReplay;\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 CanvasLineStringReplay.prototype.drawFlatCoordinates_ = function drawFlatCoordinates_ (flatCoordinates, offset, end, stride) {\n var myBegin = this.coordinates.length;\n var myEnd = this.appendFlatCoordinates(\n flatCoordinates, offset, end, stride, false, false);\n var moveToLineToInstruction = [CanvasInstruction.MOVE_TO_LINE_TO, myBegin, myEnd];\n this.instructions.push(moveToLineToInstruction);\n this.hitDetectionInstructions.push(moveToLineToInstruction);\n return end;\n };\n\n /**\n * @inheritDoc\n */\n CanvasLineStringReplay.prototype.drawLineString = function drawLineString (lineStringGeometry, feature) {\n var state = this.state;\n var strokeStyle = state.strokeStyle;\n var lineWidth = state.lineWidth;\n if (strokeStyle === undefined || lineWidth === undefined) {\n return;\n }\n this.updateStrokeStyle(state, this.applyStroke);\n this.beginGeometry(lineStringGeometry, feature);\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,\n state.miterLimit, state.lineDash, state.lineDashOffset\n ], beginPathInstruction);\n var flatCoordinates = lineStringGeometry.getFlatCoordinates();\n var stride = lineStringGeometry.getStride();\n this.drawFlatCoordinates_(flatCoordinates, 0, flatCoordinates.length, stride);\n this.hitDetectionInstructions.push(strokeInstruction);\n this.endGeometry(lineStringGeometry, feature);\n };\n\n /**\n * @inheritDoc\n */\n CanvasLineStringReplay.prototype.drawMultiLineString = function drawMultiLineString (multiLineStringGeometry, feature) {\n var state = this.state;\n var strokeStyle = state.strokeStyle;\n var lineWidth = state.lineWidth;\n if (strokeStyle === undefined || lineWidth === undefined) {\n return;\n }\n this.updateStrokeStyle(state, this.applyStroke);\n this.beginGeometry(multiLineStringGeometry, feature);\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,\n state.miterLimit, state.lineDash, state.lineDashOffset\n ], beginPathInstruction);\n var ends = multiLineStringGeometry.getEnds();\n var flatCoordinates = multiLineStringGeometry.getFlatCoordinates();\n var stride = multiLineStringGeometry.getStride();\n var offset = 0;\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n offset = this.drawFlatCoordinates_(flatCoordinates, offset, ends[i], stride);\n }\n this.hitDetectionInstructions.push(strokeInstruction);\n this.endGeometry(multiLineStringGeometry, feature);\n };\n\n /**\n * @inheritDoc\n */\n CanvasLineStringReplay.prototype.finish = function finish () {\n var state = this.state;\n if (state.lastStroke != undefined && state.lastStroke != this.coordinates.length) {\n this.instructions.push(strokeInstruction);\n }\n this.reverseHitDetectionInstructions();\n this.state = null;\n };\n\n /**\n * @inheritDoc.\n */\n CanvasLineStringReplay.prototype.applyStroke = function applyStroke (state) {\n if (state.lastStroke != undefined && state.lastStroke != this.coordinates.length) {\n this.instructions.push(strokeInstruction);\n state.lastStroke = this.coordinates.length;\n }\n state.lastStroke = 0;\n CanvasReplay.prototype.applyStroke.call(this, state);\n this.instructions.push(beginPathInstruction);\n };\n\n return CanvasLineStringReplay;\n}(CanvasReplay));\n\n\nexport default CanvasLineStringReplay;\n\n//# sourceMappingURL=LineStringReplay.js.map","/**\n * @module ol/render/canvas/PolygonReplay\n */\nimport {asString} from '../../color.js';\nimport {snap} from '../../geom/flat/simplify.js';\nimport {defaultFillStyle} from '../canvas.js';\nimport CanvasInstruction, {\n fillInstruction, strokeInstruction, beginPathInstruction, closePathInstruction\n} from './Instruction.js';\nimport CanvasReplay from './Replay.js';\n\n\nvar CanvasPolygonReplay = /*@__PURE__*/(function (CanvasReplay) {\n function CanvasPolygonReplay(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {\n CanvasReplay.call(this, tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);\n }\n\n if ( CanvasReplay ) CanvasPolygonReplay.__proto__ = CanvasReplay;\n CanvasPolygonReplay.prototype = Object.create( CanvasReplay && CanvasReplay.prototype );\n CanvasPolygonReplay.prototype.constructor = CanvasPolygonReplay;\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 CanvasPolygonReplay.prototype.drawFlatCoordinatess_ = function drawFlatCoordinatess_ (flatCoordinates, offset, ends, stride) {\n var state = this.state;\n var fill = state.fillStyle !== undefined;\n var stroke = state.strokeStyle != undefined;\n var numEnds = ends.length;\n this.instructions.push(beginPathInstruction);\n this.hitDetectionInstructions.push(beginPathInstruction);\n for (var i = 0; i < numEnds; ++i) {\n var end = ends[i];\n var myBegin = this.coordinates.length;\n var myEnd = this.appendFlatCoordinates(flatCoordinates, offset, end, stride, true, !stroke);\n var moveToLineToInstruction = [CanvasInstruction.MOVE_TO_LINE_TO, myBegin, myEnd];\n this.instructions.push(moveToLineToInstruction);\n this.hitDetectionInstructions.push(moveToLineToInstruction);\n if (stroke) {\n // Performance optimization: only call closePath() when we have a stroke.\n // Otherwise the ring is closed already (see appendFlatCoordinates above).\n this.instructions.push(closePathInstruction);\n this.hitDetectionInstructions.push(closePathInstruction);\n }\n offset = end;\n }\n if (fill) {\n this.instructions.push(fillInstruction);\n this.hitDetectionInstructions.push(fillInstruction);\n }\n if (stroke) {\n this.instructions.push(strokeInstruction);\n this.hitDetectionInstructions.push(strokeInstruction);\n }\n return offset;\n };\n\n /**\n * @inheritDoc\n */\n CanvasPolygonReplay.prototype.drawCircle = function drawCircle (circleGeometry, feature) {\n var state = this.state;\n var fillStyle = state.fillStyle;\n var strokeStyle = state.strokeStyle;\n if (fillStyle === undefined && strokeStyle === undefined) {\n return;\n }\n this.setFillStrokeStyles_(circleGeometry);\n this.beginGeometry(circleGeometry, feature);\n if (state.fillStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_FILL_STYLE,\n asString(defaultFillStyle)\n ]);\n }\n if (state.strokeStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,\n state.miterLimit, state.lineDash, state.lineDashOffset\n ]);\n }\n var flatCoordinates = circleGeometry.getFlatCoordinates();\n var stride = circleGeometry.getStride();\n var myBegin = this.coordinates.length;\n this.appendFlatCoordinates(\n flatCoordinates, 0, flatCoordinates.length, stride, false, false);\n var circleInstruction = [CanvasInstruction.CIRCLE, myBegin];\n this.instructions.push(beginPathInstruction, circleInstruction);\n this.hitDetectionInstructions.push(beginPathInstruction, circleInstruction);\n this.hitDetectionInstructions.push(fillInstruction);\n if (state.fillStyle !== undefined) {\n this.instructions.push(fillInstruction);\n }\n if (state.strokeStyle !== undefined) {\n this.instructions.push(strokeInstruction);\n this.hitDetectionInstructions.push(strokeInstruction);\n }\n this.endGeometry(circleGeometry, feature);\n };\n\n /**\n * @inheritDoc\n */\n CanvasPolygonReplay.prototype.drawPolygon = function drawPolygon (polygonGeometry, feature) {\n var state = this.state;\n var fillStyle = state.fillStyle;\n var strokeStyle = state.strokeStyle;\n if (fillStyle === undefined && strokeStyle === undefined) {\n return;\n }\n this.setFillStrokeStyles_(polygonGeometry);\n this.beginGeometry(polygonGeometry, feature);\n if (state.fillStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_FILL_STYLE,\n asString(defaultFillStyle)\n ]);\n }\n if (state.strokeStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,\n state.miterLimit, state.lineDash, state.lineDashOffset\n ]);\n }\n var ends = polygonGeometry.getEnds();\n var flatCoordinates = polygonGeometry.getOrientedFlatCoordinates();\n var stride = polygonGeometry.getStride();\n this.drawFlatCoordinatess_(flatCoordinates, 0, ends, stride);\n this.endGeometry(polygonGeometry, feature);\n };\n\n /**\n * @inheritDoc\n */\n CanvasPolygonReplay.prototype.drawMultiPolygon = function drawMultiPolygon (multiPolygonGeometry, feature) {\n var state = this.state;\n var fillStyle = state.fillStyle;\n var strokeStyle = state.strokeStyle;\n if (fillStyle === undefined && strokeStyle === undefined) {\n return;\n }\n this.setFillStrokeStyles_(multiPolygonGeometry);\n this.beginGeometry(multiPolygonGeometry, feature);\n if (state.fillStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_FILL_STYLE,\n asString(defaultFillStyle)\n ]);\n }\n if (state.strokeStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,\n state.miterLimit, state.lineDash, state.lineDashOffset\n ]);\n }\n var endss = multiPolygonGeometry.getEndss();\n var flatCoordinates = multiPolygonGeometry.getOrientedFlatCoordinates();\n var stride = multiPolygonGeometry.getStride();\n var offset = 0;\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n offset = this.drawFlatCoordinatess_(flatCoordinates, offset, endss[i], stride);\n }\n this.endGeometry(multiPolygonGeometry, feature);\n };\n\n /**\n * @inheritDoc\n */\n CanvasPolygonReplay.prototype.finish = function 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 var tolerance = this.tolerance;\n if (tolerance !== 0) {\n var coordinates = this.coordinates;\n for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n coordinates[i] = snap(coordinates[i], tolerance);\n }\n }\n };\n\n /**\n * @private\n * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n */\n CanvasPolygonReplay.prototype.setFillStrokeStyles_ = function setFillStrokeStyles_ (geometry) {\n var state = this.state;\n var fillStyle = state.fillStyle;\n if (fillStyle !== undefined) {\n this.updateFillStyle(state, this.createFill, geometry);\n }\n if (state.strokeStyle !== undefined) {\n this.updateStrokeStyle(state, this.applyStroke);\n }\n };\n\n return CanvasPolygonReplay;\n}(CanvasReplay));\n\n\nexport default CanvasPolygonReplay;\n\n//# sourceMappingURL=PolygonReplay.js.map","/**\n * @module ol/geom/flat/straightchunk\n */\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 var chunkStart = offset;\n var chunkEnd = offset;\n var chunkM = 0;\n var m = 0;\n var start = offset;\n var acos, i, m12, m23, x1, y1, x12, y12, x23, y23;\n for (i = offset; i < end; i += stride) {\n var x2 = flatCoordinates[i];\n var y2 = flatCoordinates[i + 1];\n if (x1 !== undefined) {\n x23 = x2 - x1;\n y23 = y2 - y1;\n m23 = Math.sqrt(x23 * x23 + y23 * y23);\n if (x12 !== undefined) {\n m += m12;\n acos = Math.acos((x12 * x23 + y12 * y23) / (m12 * m23));\n if (acos > maxAngle) {\n if (m > chunkM) {\n chunkM = m;\n chunkStart = start;\n chunkEnd = i;\n }\n m = 0;\n start = i - stride;\n }\n }\n m12 = m23;\n x12 = x23;\n y12 = y23;\n }\n x1 = x2;\n y1 = y2;\n }\n m += m23;\n return m > chunkM ? [start, i] : [chunkStart, chunkEnd];\n}\n\n//# sourceMappingURL=straightchunk.js.map","/**\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//# sourceMappingURL=TextPlacement.js.map","/**\n * @module ol/render/canvas/TextReplay\n */\nimport {getUid} from '../../util.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {intersects} from '../../extent.js';\nimport {matchingChunk} from '../../geom/flat/straightchunk.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport {CANVAS_LINE_DASH} from '../../has.js';\nimport {labelCache, measureTextWidth, defaultTextAlign, measureTextHeight, defaultPadding, defaultLineCap, defaultLineDashOffset, defaultLineDash, defaultLineJoin, defaultFillStyle, checkFont, defaultFont, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, defaultTextBaseline} from '../canvas.js';\nimport CanvasInstruction from './Instruction.js';\nimport CanvasReplay from './Replay.js';\nimport {TEXT_ALIGN} from '../replay.js';\nimport TextPlacement from '../../style/TextPlacement.js';\n\nvar CanvasTextReplay = /*@__PURE__*/(function (CanvasReplay) {\n function CanvasTextReplay(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {\n CanvasReplay.call(this, tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);\n\n /**\n * @private\n * @type {import(\"../canvas.js\").DeclutterGroup}\n */\n this.declutterGroup_;\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 * @private\n * @type {Object<string, Object<string, number>>}\n */\n this.widths_ = {};\n\n labelCache.prune();\n\n }\n\n if ( CanvasReplay ) CanvasTextReplay.__proto__ = CanvasReplay;\n CanvasTextReplay.prototype = Object.create( CanvasReplay && CanvasReplay.prototype );\n CanvasTextReplay.prototype.constructor = CanvasTextReplay;\n\n /**\n * @inheritDoc\n */\n CanvasTextReplay.prototype.drawText = function drawText (geometry, feature) {\n var fillState = this.textFillState_;\n var strokeState = this.textStrokeState_;\n var textState = this.textState_;\n if (this.text_ === '' || !textState || (!fillState && !strokeState)) {\n return;\n }\n\n var begin = this.coordinates.length;\n\n var geometryType = geometry.getType();\n var flatCoordinates = null;\n var end = 2;\n var stride = 2;\n var i, ii;\n\n if (textState.placement === TextPlacement.LINE) {\n if (!intersects(this.getBufferedMaxExtent(), geometry.getExtent())) {\n return;\n }\n var ends;\n flatCoordinates = geometry.getFlatCoordinates();\n stride = geometry.getStride();\n if (geometryType == GeometryType.LINE_STRING) {\n ends = [flatCoordinates.length];\n } else if (geometryType == GeometryType.MULTI_LINE_STRING) {\n ends = geometry.getEnds();\n } else if (geometryType == GeometryType.POLYGON) {\n ends = geometry.getEnds().slice(0, 1);\n } else if (geometryType == GeometryType.MULTI_POLYGON) {\n var endss = geometry.getEndss();\n ends = [];\n for (i = 0, ii = endss.length; i < ii; ++i) {\n ends.push(endss[i][0]);\n }\n }\n this.beginGeometry(geometry, feature);\n var textAlign = textState.textAlign;\n var flatOffset = 0;\n var flatEnd;\n for (var o = 0, oo = ends.length; o < oo; ++o) {\n if (textAlign == undefined) {\n var range = matchingChunk(textState.maxAngle, flatCoordinates, flatOffset, ends[o], stride);\n flatOffset = range[0];\n flatEnd = range[1];\n } else {\n flatEnd = ends[o];\n }\n for (i = flatOffset; i < flatEnd; i += stride) {\n this.coordinates.push(flatCoordinates[i], flatCoordinates[i + 1]);\n }\n end = this.coordinates.length;\n flatOffset = ends[o];\n this.drawChars_(begin, end, this.declutterGroup_);\n begin = end;\n }\n this.endGeometry(geometry, feature);\n\n } else {\n var label = this.getImage(this.text_, this.textKey_, this.fillKey_, this.strokeKey_);\n var width = label.width / this.pixelRatio;\n switch (geometryType) {\n case GeometryType.POINT:\n case GeometryType.MULTI_POINT:\n flatCoordinates = geometry.getFlatCoordinates();\n end = flatCoordinates.length;\n break;\n case GeometryType.LINE_STRING:\n flatCoordinates = /** @type {import(\"../../geom/LineString.js\").default} */ (geometry).getFlatMidpoint();\n break;\n case GeometryType.CIRCLE:\n flatCoordinates = /** @type {import(\"../../geom/Circle.js\").default} */ (geometry).getCenter();\n break;\n case GeometryType.MULTI_LINE_STRING:\n flatCoordinates = /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry).getFlatMidpoints();\n end = flatCoordinates.length;\n break;\n case GeometryType.POLYGON:\n flatCoordinates = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry).getFlatInteriorPoint();\n if (!textState.overflow && flatCoordinates[2] / this.resolution < width) {\n return;\n }\n stride = 3;\n break;\n case GeometryType.MULTI_POLYGON:\n var interiorPoints = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getFlatInteriorPoints();\n flatCoordinates = [];\n for (i = 0, ii = interiorPoints.length; i < ii; i += 3) {\n if (textState.overflow || interiorPoints[i + 2] / this.resolution >= width) {\n flatCoordinates.push(interiorPoints[i], interiorPoints[i + 1]);\n }\n }\n end = flatCoordinates.length;\n if (end == 0) {\n return;\n }\n break;\n default:\n }\n end = this.appendFlatCoordinates(flatCoordinates, 0, end, stride, false, false);\n if (textState.backgroundFill || textState.backgroundStroke) {\n this.setFillStrokeStyle(textState.backgroundFill, textState.backgroundStroke);\n if (textState.backgroundFill) {\n this.updateFillStyle(this.state, this.createFill, geometry);\n this.hitDetectionInstructions.push(this.createFill(this.state, geometry));\n }\n if (textState.backgroundStroke) {\n this.updateStrokeStyle(this.state, this.applyStroke);\n this.hitDetectionInstructions.push(this.createStroke(this.state));\n }\n }\n this.beginGeometry(geometry, feature);\n this.drawTextImage_(label, begin, end);\n this.endGeometry(geometry, feature);\n }\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 {HTMLCanvasElement} Image.\n */\n CanvasTextReplay.prototype.getImage = function getImage (text, textKey, fillKey, strokeKey) {\n var label;\n var key = strokeKey + textKey + text + fillKey + this.pixelRatio;\n\n if (!labelCache.containsKey(key)) {\n var strokeState = strokeKey ? this.strokeStates[strokeKey] || this.textStrokeState_ : null;\n var fillState = fillKey ? this.fillStates[fillKey] || this.textFillState_ : null;\n var textState = this.textStates[textKey] || this.textState_;\n var pixelRatio = this.pixelRatio;\n var scale = textState.scale * pixelRatio;\n var align = TEXT_ALIGN[textState.textAlign || defaultTextAlign];\n var strokeWidth = strokeKey && strokeState.lineWidth ? strokeState.lineWidth : 0;\n\n var lines = text.split('\\n');\n var numLines = lines.length;\n var widths = [];\n var width = measureTextWidths(textState.font, lines, widths);\n var lineHeight = measureTextHeight(textState.font);\n var height = lineHeight * numLines;\n var renderWidth = (width + strokeWidth);\n var context = createCanvasContext2D(\n Math.ceil(renderWidth * scale),\n Math.ceil((height + strokeWidth) * scale));\n label = context.canvas;\n labelCache.set(key, label);\n if (scale != 1) {\n context.scale(scale, scale);\n }\n context.font = textState.font;\n if (strokeKey) {\n context.strokeStyle = strokeState.strokeStyle;\n context.lineWidth = strokeWidth;\n context.lineCap = /** @type {CanvasLineCap} */ (strokeState.lineCap);\n context.lineJoin = /** @type {CanvasLineJoin} */ (strokeState.lineJoin);\n context.miterLimit = strokeState.miterLimit;\n if (CANVAS_LINE_DASH && strokeState.lineDash.length) {\n context.setLineDash(strokeState.lineDash);\n context.lineDashOffset = strokeState.lineDashOffset;\n }\n }\n if (fillKey) {\n context.fillStyle = fillState.fillStyle;\n }\n context.textBaseline = 'middle';\n context.textAlign = 'center';\n var leftRight = (0.5 - align);\n var x = align * label.width / scale + leftRight * strokeWidth;\n var i;\n if (strokeKey) {\n for (i = 0; i < numLines; ++i) {\n context.strokeText(lines[i], x + leftRight * widths[i], 0.5 * (strokeWidth + lineHeight) + i * lineHeight);\n }\n }\n if (fillKey) {\n for (i = 0; i < numLines; ++i) {\n context.fillText(lines[i], x + leftRight * widths[i], 0.5 * (strokeWidth + lineHeight) + i * lineHeight);\n }\n }\n }\n return labelCache.get(key);\n };\n\n /**\n * @private\n * @param {HTMLCanvasElement} label Label.\n * @param {number} begin Begin.\n * @param {number} end End.\n */\n CanvasTextReplay.prototype.drawTextImage_ = function drawTextImage_ (label, begin, end) {\n var textState = this.textState_;\n var strokeState = this.textStrokeState_;\n var pixelRatio = this.pixelRatio;\n var align = TEXT_ALIGN[textState.textAlign || defaultTextAlign];\n var baseline = TEXT_ALIGN[textState.textBaseline];\n var strokeWidth = strokeState && strokeState.lineWidth ? strokeState.lineWidth : 0;\n\n var anchorX = align * label.width / pixelRatio + 2 * (0.5 - align) * strokeWidth;\n var anchorY = baseline * label.height / pixelRatio + 2 * (0.5 - baseline) * strokeWidth;\n this.instructions.push([CanvasInstruction.DRAW_IMAGE, begin, end,\n label, (anchorX - this.textOffsetX_) * pixelRatio, (anchorY - this.textOffsetY_) * pixelRatio,\n this.declutterGroup_, label.height, 1, 0, 0, this.textRotateWithView_, this.textRotation_,\n 1, label.width,\n textState.padding == defaultPadding ?\n defaultPadding : textState.padding.map(function(p) {\n return p * pixelRatio;\n }),\n !!textState.backgroundFill, !!textState.backgroundStroke\n ]);\n this.hitDetectionInstructions.push([CanvasInstruction.DRAW_IMAGE, begin, end,\n label, (anchorX - this.textOffsetX_) * pixelRatio, (anchorY - this.textOffsetY_) * pixelRatio,\n this.declutterGroup_, label.height, 1, 0, 0, this.textRotateWithView_, this.textRotation_,\n 1 / pixelRatio, label.width, textState.padding,\n !!textState.backgroundFill, !!textState.backgroundStroke\n ]);\n };\n\n /**\n * @private\n * @param {number} begin Begin.\n * @param {number} end End.\n * @param {import(\"../canvas.js\").DeclutterGroup} declutterGroup Declutter group.\n */\n CanvasTextReplay.prototype.drawChars_ = function drawChars_ (begin, end, declutterGroup) {\n var strokeState = this.textStrokeState_;\n var textState = this.textState_;\n var fillState = this.textFillState_;\n\n var strokeKey = this.strokeKey_;\n if (strokeState) {\n if (!(strokeKey in this.strokeStates)) {\n this.strokeStates[strokeKey] = /** @type {import(\"../canvas.js\").StrokeState} */ ({\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 var textKey = this.textKey_;\n if (!(this.textKey_ in this.textStates)) {\n this.textStates[this.textKey_] = /** @type {import(\"../canvas.js\").TextState} */ ({\n font: textState.font,\n textAlign: textState.textAlign || defaultTextAlign,\n scale: textState.scale\n });\n }\n var fillKey = this.fillKey_;\n if (fillState) {\n if (!(fillKey in this.fillStates)) {\n this.fillStates[fillKey] = /** @type {import(\"../canvas.js\").FillState} */ ({\n fillStyle: fillState.fillStyle\n });\n }\n }\n\n var pixelRatio = this.pixelRatio;\n var baseline = TEXT_ALIGN[textState.textBaseline];\n\n var offsetY = this.textOffsetY_ * pixelRatio;\n var text = this.text_;\n var font = textState.font;\n var textScale = textState.scale;\n var strokeWidth = strokeState ? strokeState.lineWidth * textScale / 2 : 0;\n var widths = this.widths_[font];\n if (!widths) {\n this.widths_[font] = widths = {};\n }\n this.instructions.push([CanvasInstruction.DRAW_CHARS,\n begin, end, baseline, declutterGroup,\n textState.overflow, fillKey, textState.maxAngle,\n function(text) {\n var width = widths[text];\n if (!width) {\n width = widths[text] = measureTextWidth(font, text);\n }\n return width * textScale * pixelRatio;\n },\n offsetY, strokeKey, strokeWidth * pixelRatio, text, textKey, 1\n ]);\n this.hitDetectionInstructions.push([CanvasInstruction.DRAW_CHARS,\n begin, end, baseline, declutterGroup,\n textState.overflow, fillKey, textState.maxAngle,\n function(text) {\n var width = widths[text];\n if (!width) {\n width = widths[text] = measureTextWidth(font, text);\n }\n return width * textScale;\n },\n offsetY, strokeKey, strokeWidth, text, textKey, 1 / pixelRatio\n ]);\n };\n\n /**\n * @inheritDoc\n */\n CanvasTextReplay.prototype.setTextStyle = function setTextStyle (textStyle, declutterGroup) {\n var textState, fillState, strokeState;\n if (!textStyle) {\n this.text_ = '';\n } else {\n this.declutterGroup_ = /** @type {import(\"../canvas.js\").DeclutterGroup} */ (declutterGroup);\n\n var textFillStyle = textStyle.getFill();\n if (!textFillStyle) {\n fillState = this.textFillState_ = null;\n } else {\n fillState = this.textFillState_;\n if (!fillState) {\n fillState = this.textFillState_ = /** @type {import(\"../canvas.js\").FillState} */ ({});\n }\n fillState.fillStyle = asColorLike(\n textFillStyle.getColor() || defaultFillStyle);\n }\n\n var textStrokeStyle = textStyle.getStroke();\n if (!textStrokeStyle) {\n strokeState = this.textStrokeState_ = null;\n } else {\n strokeState = this.textStrokeState_;\n if (!strokeState) {\n strokeState = this.textStrokeState_ = /** @type {import(\"../canvas.js\").StrokeState} */ ({});\n }\n var lineDash = textStrokeStyle.getLineDash();\n var lineDashOffset = textStrokeStyle.getLineDashOffset();\n var lineWidth = textStrokeStyle.getWidth();\n var miterLimit = textStrokeStyle.getMiterLimit();\n strokeState.lineCap = textStrokeStyle.getLineCap() || defaultLineCap;\n strokeState.lineDash = lineDash ? lineDash.slice() : defaultLineDash;\n strokeState.lineDashOffset =\n lineDashOffset === undefined ? defaultLineDashOffset : lineDashOffset;\n strokeState.lineJoin = textStrokeStyle.getLineJoin() || defaultLineJoin;\n strokeState.lineWidth =\n lineWidth === undefined ? defaultLineWidth : lineWidth;\n strokeState.miterLimit =\n miterLimit === undefined ? defaultMiterLimit : miterLimit;\n strokeState.strokeStyle = asColorLike(\n textStrokeStyle.getColor() || defaultStrokeStyle);\n }\n\n textState = this.textState_;\n var font = textStyle.getFont() || defaultFont;\n checkFont(font);\n var textScale = textStyle.getScale();\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 = 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 : textScale;\n\n var textOffsetX = textStyle.getOffsetX();\n var textOffsetY = textStyle.getOffsetY();\n var textRotateWithView = textStyle.getRotateWithView();\n var textRotation = textStyle.getRotation();\n this.text_ = textStyle.getText() || '';\n this.textOffsetX_ = textOffsetX === undefined ? 0 : textOffsetX;\n this.textOffsetY_ = textOffsetY === undefined ? 0 : textOffsetY;\n this.textRotateWithView_ = textRotateWithView === undefined ? false : textRotateWithView;\n this.textRotation_ = textRotation === undefined ? 0 : textRotation;\n\n this.strokeKey_ = strokeState ?\n (typeof strokeState.strokeStyle == 'string' ? strokeState.strokeStyle : getUid(strokeState.strokeStyle)) +\n strokeState.lineCap + strokeState.lineDashOffset + '|' + strokeState.lineWidth +\n strokeState.lineJoin + strokeState.miterLimit + '[' + strokeState.lineDash.join() + ']' :\n '';\n this.textKey_ = textState.font + textState.scale + (textState.textAlign || '?');\n this.fillKey_ = fillState ?\n (typeof fillState.fillStyle == 'string' ? fillState.fillStyle : ('|' + getUid(fillState.fillStyle))) :\n '';\n }\n };\n\n return CanvasTextReplay;\n}(CanvasReplay));\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 var numLines = lines.length;\n var width = 0;\n for (var i = 0; i < numLines; ++i) {\n var currentWidth = measureTextWidth(font, lines[i]);\n width = Math.max(width, currentWidth);\n widths.push(currentWidth);\n }\n return width;\n}\n\n\nexport default CanvasTextReplay;\n\n//# sourceMappingURL=TextReplay.js.map","/**\n * @module ol/render/canvas/ReplayGroup\n */\n\nimport {numberSafeCompareFunction} from '../../array.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {buffer, createEmpty, extendCoordinate} from '../../extent.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {isEmpty} from '../../obj.js';\nimport ReplayGroup from '../ReplayGroup.js';\nimport ReplayType from '../ReplayType.js';\nimport CanvasReplay from './Replay.js';\nimport CanvasImageReplay from './ImageReplay.js';\nimport CanvasLineStringReplay from './LineStringReplay.js';\nimport CanvasPolygonReplay from './PolygonReplay.js';\nimport CanvasTextReplay from './TextReplay.js';\nimport {ORDER} from '../replay.js';\nimport {create as createTransform, compose as composeTransform} from '../../transform.js';\n\n\n/**\n * @type {Object<ReplayType, typeof CanvasReplay>}\n */\nvar BATCH_CONSTRUCTORS = {\n 'Circle': CanvasPolygonReplay,\n 'Default': CanvasReplay,\n 'Image': CanvasImageReplay,\n 'LineString': CanvasLineStringReplay,\n 'Polygon': CanvasPolygonReplay,\n 'Text': CanvasTextReplay\n};\n\n\nvar CanvasReplayGroup = /*@__PURE__*/(function (ReplayGroup) {\n function CanvasReplayGroup(\n tolerance,\n maxExtent,\n resolution,\n pixelRatio,\n overlaps,\n declutterTree,\n opt_renderBuffer\n ) {\n ReplayGroup.call(this);\n\n /**\n * Declutter tree.\n * @private\n */\n this.declutterTree_ = declutterTree;\n\n /**\n * @type {import(\"../canvas.js\").DeclutterGroup}\n * @private\n */\n this.declutterGroup_ = null;\n\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 {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<ReplayType, CanvasReplay>>}\n */\n this.replaysByZIndex_ = {};\n\n /**\n * @private\n * @type {CanvasRenderingContext2D}\n */\n this.hitDetectionContext_ = createCanvasContext2D(1, 1);\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.hitDetectionTransform_ = createTransform();\n }\n\n if ( ReplayGroup ) CanvasReplayGroup.__proto__ = ReplayGroup;\n CanvasReplayGroup.prototype = Object.create( ReplayGroup && ReplayGroup.prototype );\n CanvasReplayGroup.prototype.constructor = CanvasReplayGroup;\n\n /**\n * @inheritDoc\n */\n CanvasReplayGroup.prototype.addDeclutter = function addDeclutter (group) {\n var declutter = null;\n if (this.declutterTree_) {\n if (group) {\n declutter = this.declutterGroup_;\n /** @type {number} */ (declutter[4])++;\n } else {\n declutter = this.declutterGroup_ = createEmpty();\n declutter.push(1);\n }\n }\n return declutter;\n };\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n */\n CanvasReplayGroup.prototype.clip = function clip (context, transform) {\n var flatClipCoords = this.getClipCoords(transform);\n context.beginPath();\n context.moveTo(flatClipCoords[0], flatClipCoords[1]);\n context.lineTo(flatClipCoords[2], flatClipCoords[3]);\n context.lineTo(flatClipCoords[4], flatClipCoords[5]);\n context.lineTo(flatClipCoords[6], flatClipCoords[7]);\n context.clip();\n };\n\n /**\n * @param {Array<ReplayType>} replays Replays.\n * @return {boolean} Has replays of the provided types.\n */\n CanvasReplayGroup.prototype.hasReplays = function hasReplays (replays) {\n for (var zIndex in this.replaysByZIndex_) {\n var candidates = this.replaysByZIndex_[zIndex];\n for (var i = 0, ii = replays.length; i < ii; ++i) {\n if (replays[i] in candidates) {\n return true;\n }\n }\n }\n return false;\n };\n\n /**\n * FIXME empty description for jsdoc\n */\n CanvasReplayGroup.prototype.finish = function finish () {\n for (var zKey in this.replaysByZIndex_) {\n var replays = this.replaysByZIndex_[zKey];\n for (var replayKey in replays) {\n replays[replayKey].finish();\n }\n }\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 {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T} callback Feature callback.\n * @param {Object<string, import(\"../canvas.js\").DeclutterGroup>} declutterReplays Declutter replays.\n * @return {T|undefined} Callback result.\n * @template T\n */\n CanvasReplayGroup.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (\n coordinate,\n resolution,\n rotation,\n hitTolerance,\n skippedFeaturesHash,\n callback,\n declutterReplays\n ) {\n\n hitTolerance = Math.round(hitTolerance);\n var contextSize = hitTolerance * 2 + 1;\n var transform = composeTransform(this.hitDetectionTransform_,\n hitTolerance + 0.5, hitTolerance + 0.5,\n 1 / resolution, -1 / resolution,\n -rotation,\n -coordinate[0], -coordinate[1]);\n var context = this.hitDetectionContext_;\n\n if (context.canvas.width !== contextSize || context.canvas.height !== contextSize) {\n context.canvas.width = contextSize;\n context.canvas.height = contextSize;\n } else {\n context.clearRect(0, 0, contextSize, contextSize);\n }\n\n /**\n * @type {import(\"../../extent.js\").Extent}\n */\n var hitExtent;\n if (this.renderBuffer_ !== undefined) {\n hitExtent = createEmpty();\n extendCoordinate(hitExtent, coordinate);\n buffer(hitExtent, resolution * (this.renderBuffer_ + hitTolerance), hitExtent);\n }\n\n var mask = getCircleArray(hitTolerance);\n var declutteredFeatures;\n if (this.declutterTree_) {\n declutteredFeatures = this.declutterTree_.all().map(function(entry) {\n return entry.value;\n });\n }\n\n var replayType;\n\n /**\n * @param {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} feature Feature.\n * @return {?} Callback result.\n */\n function featureCallback(feature) {\n var imageData = context.getImageData(0, 0, contextSize, contextSize).data;\n for (var i = 0; i < contextSize; i++) {\n for (var j = 0; j < contextSize; j++) {\n if (mask[i][j]) {\n if (imageData[(j * contextSize + i) * 4 + 3] > 0) {\n var result = (void 0);\n if (!(declutteredFeatures && (replayType == ReplayType.IMAGE || replayType == ReplayType.TEXT)) ||\n declutteredFeatures.indexOf(feature) !== -1) {\n result = callback(feature);\n }\n if (result) {\n return result;\n } else {\n context.clearRect(0, 0, contextSize, contextSize);\n return undefined;\n }\n }\n }\n }\n }\n }\n\n /** @type {Array<number>} */\n var zs = Object.keys(this.replaysByZIndex_).map(Number);\n zs.sort(numberSafeCompareFunction);\n\n var i, j, replays, replay, result;\n for (i = zs.length - 1; i >= 0; --i) {\n var zIndexKey = zs[i].toString();\n replays = this.replaysByZIndex_[zIndexKey];\n for (j = ORDER.length - 1; j >= 0; --j) {\n replayType = ORDER[j];\n replay = replays[replayType];\n if (replay !== undefined) {\n if (declutterReplays &&\n (replayType == ReplayType.IMAGE || replayType == ReplayType.TEXT)) {\n var declutter = declutterReplays[zIndexKey];\n if (!declutter) {\n declutterReplays[zIndexKey] = [replay, transform.slice(0)];\n } else {\n declutter.push(replay, transform.slice(0));\n }\n } else {\n result = replay.replayHitDetection(context, transform, rotation,\n skippedFeaturesHash, featureCallback, hitExtent);\n if (result) {\n return result;\n }\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 CanvasReplayGroup.prototype.getClipCoords = function getClipCoords (transform) {\n var maxExtent = this.maxExtent_;\n var minX = maxExtent[0];\n var minY = maxExtent[1];\n var maxX = maxExtent[2];\n var maxY = maxExtent[3];\n var flatClipCoords = [minX, minY, minX, maxY, maxX, maxY, maxX, minY];\n transform2D(\n flatClipCoords, 0, 8, 2, transform, flatClipCoords);\n return flatClipCoords;\n };\n\n /**\n * @inheritDoc\n */\n CanvasReplayGroup.prototype.getReplay = function getReplay (zIndex, replayType) {\n var zIndexKey = zIndex !== undefined ? zIndex.toString() : '0';\n var replays = this.replaysByZIndex_[zIndexKey];\n if (replays === undefined) {\n replays = {};\n this.replaysByZIndex_[zIndexKey] = replays;\n }\n var replay = replays[replayType];\n if (replay === undefined) {\n var Constructor = BATCH_CONSTRUCTORS[replayType];\n replay = new Constructor(this.tolerance_, this.maxExtent_,\n this.resolution_, this.pixelRatio_, this.overlaps_, this.declutterTree_);\n replays[replayType] = replay;\n }\n return replay;\n };\n\n /**\n * @return {Object<string, Object<ReplayType, CanvasReplay>>} Replays.\n */\n CanvasReplayGroup.prototype.getReplays = function getReplays () {\n return this.replaysByZIndex_;\n };\n\n /**\n * @inheritDoc\n */\n CanvasReplayGroup.prototype.isEmpty = function isEmpty$1 () {\n return isEmpty(this.replaysByZIndex_);\n };\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {number} viewRotation View rotation.\n * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n * @param {boolean} snapToPixel Snap point symbols and test to integer pixel.\n * @param {Array<ReplayType>=} opt_replayTypes Ordered replay types to replay.\n * Default is {@link module:ol/render/replay~ORDER}\n * @param {Object<string, import(\"../canvas.js\").DeclutterGroup>=} opt_declutterReplays Declutter replays.\n */\n CanvasReplayGroup.prototype.replay = function replay (\n context,\n transform,\n viewRotation,\n skippedFeaturesHash,\n snapToPixel,\n opt_replayTypes,\n opt_declutterReplays\n ) {\n\n /** @type {Array<number>} */\n var zs = Object.keys(this.replaysByZIndex_).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 context.save();\n this.clip(context, transform);\n\n var replayTypes = opt_replayTypes ? opt_replayTypes : ORDER;\n var i, ii, j, jj, replays, replay;\n for (i = 0, ii = zs.length; i < ii; ++i) {\n var zIndexKey = zs[i].toString();\n replays = this.replaysByZIndex_[zIndexKey];\n for (j = 0, jj = replayTypes.length; j < jj; ++j) {\n var replayType = replayTypes[j];\n replay = replays[replayType];\n if (replay !== undefined) {\n if (opt_declutterReplays &&\n (replayType == ReplayType.IMAGE || replayType == ReplayType.TEXT)) {\n var declutter = opt_declutterReplays[zIndexKey];\n if (!declutter) {\n opt_declutterReplays[zIndexKey] = [replay, transform.slice(0)];\n } else {\n declutter.push(replay, transform.slice(0));\n }\n } else {\n replay.replay(context, transform, viewRotation, skippedFeaturesHash, snapToPixel);\n }\n }\n }\n }\n\n context.restore();\n };\n\n return CanvasReplayGroup;\n}(ReplayGroup));\n\n\n/**\n * This cache is used for storing calculated pixel circles for increasing performance.\n * It is a static property to allow each Replaygroup to access it.\n * @type {Object<number, Array<Array<(boolean|undefined)>>>}\n */\nvar circleArrayCache = {\n 0: [[true]]\n};\n\n\n/**\n * This method fills a row in the array from the given coordinate to the\n * middle with `true`.\n * @param {Array<Array<(boolean|undefined)>>} array The array that will be altered.\n * @param {number} x X coordinate.\n * @param {number} y Y coordinate.\n */\nfunction fillCircleArrayRowToMiddle(array, x, y) {\n var i;\n var radius = Math.floor(array.length / 2);\n if (x >= radius) {\n for (i = radius; i < x; i++) {\n array[i][y] = true;\n }\n } else if (x < radius) {\n for (i = x + 1; i < radius; i++) {\n array[i][y] = true;\n }\n }\n}\n\n\n/**\n * This methods creates a circle inside a fitting array. Points inside the\n * circle are marked by true, points on the outside are undefined.\n * It uses the midpoint circle algorithm.\n * A cache is used to increase performance.\n * @param {number} radius Radius.\n * @returns {Array<Array<(boolean|undefined)>>} An array with marked circle points.\n */\nexport function getCircleArray(radius) {\n if (circleArrayCache[radius] !== undefined) {\n return circleArrayCache[radius];\n }\n\n var arraySize = radius * 2 + 1;\n var arr = new Array(arraySize);\n for (var i = 0; i < arraySize; i++) {\n arr[i] = new Array(arraySize);\n }\n\n var x = radius;\n var y = 0;\n var error = 0;\n\n while (x >= y) {\n fillCircleArrayRowToMiddle(arr, radius + x, radius + y);\n fillCircleArrayRowToMiddle(arr, radius + y, radius + x);\n fillCircleArrayRowToMiddle(arr, radius - y, radius + x);\n fillCircleArrayRowToMiddle(arr, radius - x, radius + y);\n fillCircleArrayRowToMiddle(arr, radius - x, radius - y);\n fillCircleArrayRowToMiddle(arr, radius - y, radius - x);\n fillCircleArrayRowToMiddle(arr, radius + y, radius - x);\n fillCircleArrayRowToMiddle(arr, radius + x, radius - y);\n\n y++;\n error += 1 + 2 * y;\n if (2 * (error - x) + 1 > 0) {\n x -= 1;\n error += 1 - 2 * x;\n }\n }\n\n circleArrayCache[radius] = arr;\n return arr;\n}\n\n\n/**\n * @param {!Object<string, Array<*>>} declutterReplays Declutter replays.\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} rotation Rotation.\n * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n */\nexport function replayDeclutter(declutterReplays, context, rotation, snapToPixel) {\n var zs = Object.keys(declutterReplays).map(Number).sort(numberSafeCompareFunction);\n var skippedFeatureUids = {};\n for (var z = 0, zz = zs.length; z < zz; ++z) {\n var replayData = declutterReplays[zs[z].toString()];\n for (var i = 0, ii = replayData.length; i < ii;) {\n var replay = replayData[i++];\n var transform = replayData[i++];\n replay.replay(context, transform, rotation, skippedFeatureUids, snapToPixel);\n }\n }\n}\n\n\nexport default CanvasReplayGroup;\n\n//# sourceMappingURL=ReplayGroup.js.map","/**\n * @module ol/renderer/vector\n */\nimport {getUid} from '../util.js';\nimport ImageState from '../ImageState.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport ReplayType from '../render/ReplayType.js';\n\n\n/**\n * Tolerance for geometry simplification in device pixels.\n * @type {number}\n */\nvar SIMPLIFY_TOLERANCE = 0.5;\n\n\n/**\n * @const\n * @type {Object<import(\"../geom/GeometryType.js\").default,\n * function(import(\"../render/ReplayGroup.js\").default, import(\"../geom/Geometry.js\").default,\n * import(\"../style/Style.js\").default, Object)>}\n */\nvar GEOMETRY_RENDERERS = {\n 'Point': renderPointGeometry,\n 'LineString': renderLineStringGeometry,\n 'Polygon': renderPolygonGeometry,\n 'MultiPoint': renderMultiPointGeometry,\n 'MultiLineString': renderMultiLineStringGeometry,\n 'MultiPolygon': renderMultiPolygonGeometry,\n 'GeometryCollection': renderGeometryCollectionGeometry,\n 'Circle': renderCircleGeometry\n};\n\n\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/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Squared pixel tolerance.\n */\nexport function getSquaredTolerance(resolution, pixelRatio) {\n var tolerance = getTolerance(resolution, pixelRatio);\n return tolerance * tolerance;\n}\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/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\nfunction renderCircleGeometry(replayGroup, geometry, style, feature) {\n var fillStyle = style.getFill();\n var strokeStyle = style.getStroke();\n if (fillStyle || strokeStyle) {\n var circleReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.CIRCLE);\n circleReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n circleReplay.drawCircle(geometry, feature);\n }\n var textStyle = style.getText();\n if (textStyle) {\n var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false));\n textReplay.drawText(geometry, feature);\n }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.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(this: T, import(\"../events/Event.js\").default)} listener Listener function.\n * @param {T} thisArg Value to use as `this` when executing `listener`.\n * @return {boolean} `true` if style is loading.\n * @template T\n */\nexport function renderFeature(replayGroup, feature, style, squaredTolerance, listener, thisArg) {\n var loading = false;\n var imageStyle = style.getImage();\n if (imageStyle) {\n var imageState = imageStyle.getImageState();\n if (imageState == ImageState.LOADED || imageState == ImageState.ERROR) {\n imageStyle.unlistenImageChange(listener, thisArg);\n } else {\n if (imageState == ImageState.IDLE) {\n imageStyle.load();\n }\n imageState = imageStyle.getImageState();\n imageStyle.listenImageChange(listener, thisArg);\n loading = true;\n }\n }\n renderFeatureInternal(replayGroup, feature, style, squaredTolerance);\n\n return loading;\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.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 */\nfunction renderFeatureInternal(replayGroup, feature, style, squaredTolerance) {\n var geometry = style.getGeometryFunction()(feature);\n if (!geometry) {\n return;\n }\n var simplifiedGeometry = geometry.getSimplifiedGeometry(squaredTolerance);\n var renderer = style.getRenderer();\n if (renderer) {\n renderGeometry(replayGroup, simplifiedGeometry, style, feature);\n } else {\n var geometryRenderer = GEOMETRY_RENDERERS[simplifiedGeometry.getType()];\n geometryRenderer(replayGroup, simplifiedGeometry, style, feature);\n }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderGeometry(replayGroup, geometry, style, feature) {\n if (geometry.getType() == GeometryType.GEOMETRY_COLLECTION) {\n var geometries = /** @type {import(\"../geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n for (var i = 0, ii = geometries.length; i < ii; ++i) {\n renderGeometry(replayGroup, geometries[i], style, feature);\n }\n return;\n }\n var replay = replayGroup.getReplay(style.getZIndex(), ReplayType.DEFAULT);\n replay.drawCustom(/** @type {import(\"../geom/SimpleGeometry.js\").default} */ (geometry), feature, style.getRenderer());\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.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 */\nfunction renderGeometryCollectionGeometry(replayGroup, geometry, style, feature) {\n var geometries = geometry.getGeometriesArray();\n var i, ii;\n for (i = 0, ii = geometries.length; i < ii; ++i) {\n var geometryRenderer =\n GEOMETRY_RENDERERS[geometries[i].getType()];\n geometryRenderer(replayGroup, geometries[i], style, feature);\n }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/LineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderLineStringGeometry(replayGroup, geometry, style, feature) {\n var strokeStyle = style.getStroke();\n if (strokeStyle) {\n var lineStringReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.LINE_STRING);\n lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n lineStringReplay.drawLineString(geometry, feature);\n }\n var textStyle = style.getText();\n if (textStyle) {\n var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false));\n textReplay.drawText(geometry, feature);\n }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/MultiLineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderMultiLineStringGeometry(replayGroup, geometry, style, feature) {\n var strokeStyle = style.getStroke();\n if (strokeStyle) {\n var lineStringReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.LINE_STRING);\n lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n lineStringReplay.drawMultiLineString(geometry, feature);\n }\n var textStyle = style.getText();\n if (textStyle) {\n var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false));\n textReplay.drawText(geometry, feature);\n }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\nfunction renderMultiPolygonGeometry(replayGroup, geometry, style, feature) {\n var fillStyle = style.getFill();\n var strokeStyle = style.getStroke();\n if (strokeStyle || fillStyle) {\n var polygonReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.POLYGON);\n polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n polygonReplay.drawMultiPolygon(geometry, feature);\n }\n var textStyle = style.getText();\n if (textStyle) {\n var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false));\n textReplay.drawText(geometry, feature);\n }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/Point.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderPointGeometry(replayGroup, geometry, style, feature) {\n var imageStyle = style.getImage();\n if (imageStyle) {\n if (imageStyle.getImageState() != ImageState.LOADED) {\n return;\n }\n var imageReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.IMAGE);\n imageReplay.setImageStyle(imageStyle, replayGroup.addDeclutter(false));\n imageReplay.drawPoint(geometry, feature);\n }\n var textStyle = style.getText();\n if (textStyle) {\n var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(!!imageStyle));\n textReplay.drawText(geometry, feature);\n }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/MultiPoint.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderMultiPointGeometry(replayGroup, geometry, style, feature) {\n var imageStyle = style.getImage();\n if (imageStyle) {\n if (imageStyle.getImageState() != ImageState.LOADED) {\n return;\n }\n var imageReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.IMAGE);\n imageReplay.setImageStyle(imageStyle, replayGroup.addDeclutter(false));\n imageReplay.drawMultiPoint(geometry, feature);\n }\n var textStyle = style.getText();\n if (textStyle) {\n var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(!!imageStyle));\n textReplay.drawText(geometry, feature);\n }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup 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 */\nfunction renderPolygonGeometry(replayGroup, geometry, style, feature) {\n var fillStyle = style.getFill();\n var strokeStyle = style.getStroke();\n if (fillStyle || strokeStyle) {\n var polygonReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.POLYGON);\n polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n polygonReplay.drawPolygon(geometry, feature);\n }\n var textStyle = style.getText();\n if (textStyle) {\n var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false));\n textReplay.drawText(geometry, feature);\n }\n}\n\n//# sourceMappingURL=vector.js.map","/**\n * @module ol/renderer/canvas/VectorLayer\n */\nimport {getUid} from '../../util.js';\nimport LayerType from '../../LayerType.js';\nimport ViewHint from '../../ViewHint.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {listen, unlisten} from '../../events.js';\nimport EventType from '../../events/EventType.js';\nimport rbush from 'rbush';\nimport {buffer, createEmpty, containsExtent, getWidth} from '../../extent.js';\nimport RenderEventType from '../../render/EventType.js';\nimport {labelCache, rotateAtOffset} from '../../render/canvas.js';\nimport CanvasReplayGroup from '../../render/canvas/ReplayGroup.js';\nimport CanvasLayerRenderer from './Layer.js';\nimport {defaultOrder as defaultRenderOrder, getTolerance as getRenderTolerance, getSquaredTolerance as getSquaredRenderTolerance, renderFeature} from '../vector.js';\n\n/**\n * @classdesc\n * Canvas renderer for vector layers.\n * @api\n */\nvar CanvasVectorLayerRenderer = /*@__PURE__*/(function (CanvasLayerRenderer) {\n function CanvasVectorLayerRenderer(vectorLayer) {\n\n CanvasLayerRenderer.call(this, vectorLayer);\n\n /**\n * Declutter tree.\n * @private\n */\n this.declutterTree_ = vectorLayer.getDeclutter() ? rbush(9, undefined) : null;\n\n /**\n * @private\n * @type {boolean}\n */\n this.dirty_ = false;\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 {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/ReplayGroup.js\").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 {CanvasRenderingContext2D}\n */\n this.context = createCanvasContext2D();\n\n listen(labelCache, EventType.CLEAR, this.handleFontsChanged_, this);\n\n }\n\n if ( CanvasLayerRenderer ) CanvasVectorLayerRenderer.__proto__ = CanvasLayerRenderer;\n CanvasVectorLayerRenderer.prototype = Object.create( CanvasLayerRenderer && CanvasLayerRenderer.prototype );\n CanvasVectorLayerRenderer.prototype.constructor = CanvasVectorLayerRenderer;\n\n /**\n * @inheritDoc\n */\n CanvasVectorLayerRenderer.prototype.disposeInternal = function disposeInternal () {\n unlisten(labelCache, EventType.CLEAR, this.handleFontsChanged_, this);\n CanvasLayerRenderer.prototype.disposeInternal.call(this);\n };\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../layer/Layer.js\").State} layerState Layer state.\n */\n CanvasVectorLayerRenderer.prototype.compose = function compose (context, frameState, layerState) {\n var extent = frameState.extent;\n var pixelRatio = frameState.pixelRatio;\n var skippedFeatureUids = layerState.managed ?\n frameState.skippedFeatureUids : {};\n var viewState = frameState.viewState;\n var projection = viewState.projection;\n var rotation = viewState.rotation;\n var projectionExtent = projection.getExtent();\n var vectorSource = /** @type {import(\"../../source/Vector.js\").default} */ (this.getLayer().getSource());\n\n var transform = this.getTransform(frameState, 0);\n\n // clipped rendering if layer extent is set\n var clipExtent = layerState.extent;\n var clipped = clipExtent !== undefined;\n if (clipped) {\n this.clip(context, frameState, /** @type {import(\"../../extent.js\").Extent} */ (clipExtent));\n }\n var replayGroup = this.replayGroup_;\n if (replayGroup && !replayGroup.isEmpty()) {\n if (this.declutterTree_) {\n this.declutterTree_.clear();\n }\n var layer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n var drawOffsetX = 0;\n var drawOffsetY = 0;\n var replayContext;\n var transparentLayer = layerState.opacity !== 1;\n var hasRenderListeners = layer.hasListener(RenderEventType.RENDER);\n if (transparentLayer || hasRenderListeners) {\n var drawWidth = context.canvas.width;\n var drawHeight = context.canvas.height;\n if (rotation) {\n var drawSize = Math.round(Math.sqrt(drawWidth * drawWidth + drawHeight * drawHeight));\n drawOffsetX = (drawSize - drawWidth) / 2;\n drawOffsetY = (drawSize - drawHeight) / 2;\n drawWidth = drawHeight = drawSize;\n }\n // resize and clear\n this.context.canvas.width = drawWidth;\n this.context.canvas.height = drawHeight;\n replayContext = this.context;\n } else {\n replayContext = context;\n }\n\n var alpha = replayContext.globalAlpha;\n if (!transparentLayer) {\n // for performance reasons, context.save / context.restore is not used\n // to save and restore the transformation matrix and the opacity.\n // see http://jsperf.com/context-save-restore-versus-variable\n replayContext.globalAlpha = layerState.opacity;\n }\n\n if (replayContext != context) {\n replayContext.translate(drawOffsetX, drawOffsetY);\n }\n\n var viewHints = frameState.viewHints;\n var snapToPixel = !(viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]);\n var width = frameState.size[0] * pixelRatio;\n var height = frameState.size[1] * pixelRatio;\n rotateAtOffset(replayContext, -rotation,\n width / 2, height / 2);\n replayGroup.replay(replayContext, transform, rotation, skippedFeatureUids, snapToPixel);\n if (vectorSource.getWrapX() && projection.canWrapX() &&\n !containsExtent(projectionExtent, extent)) {\n var startX = extent[0];\n var worldWidth = getWidth(projectionExtent);\n var world = 0;\n var offsetX;\n while (startX < projectionExtent[0]) {\n --world;\n offsetX = worldWidth * world;\n transform = this.getTransform(frameState, offsetX);\n replayGroup.replay(replayContext, transform, rotation, skippedFeatureUids, snapToPixel);\n startX += worldWidth;\n }\n world = 0;\n startX = extent[2];\n while (startX > projectionExtent[2]) {\n ++world;\n offsetX = worldWidth * world;\n transform = this.getTransform(frameState, offsetX);\n replayGroup.replay(replayContext, transform, rotation, skippedFeatureUids, snapToPixel);\n startX -= worldWidth;\n }\n }\n rotateAtOffset(replayContext, rotation,\n width / 2, height / 2);\n\n if (hasRenderListeners) {\n this.dispatchRenderEvent(replayContext, frameState, transform);\n }\n if (replayContext != context) {\n if (transparentLayer) {\n var mainContextAlpha = context.globalAlpha;\n context.globalAlpha = layerState.opacity;\n context.drawImage(replayContext.canvas, -drawOffsetX, -drawOffsetY);\n context.globalAlpha = mainContextAlpha;\n } else {\n context.drawImage(replayContext.canvas, -drawOffsetX, -drawOffsetY);\n }\n replayContext.translate(-drawOffsetX, -drawOffsetY);\n }\n\n if (!transparentLayer) {\n replayContext.globalAlpha = alpha;\n }\n }\n\n if (clipped) {\n context.restore();\n }\n };\n\n /**\n * @inheritDoc\n */\n CanvasVectorLayerRenderer.prototype.composeFrame = function composeFrame (frameState, layerState, context) {\n var transform = this.getTransform(frameState, 0);\n this.preCompose(context, frameState, transform);\n this.compose(context, frameState, layerState);\n this.postCompose(context, frameState, layerState, transform);\n };\n\n /**\n * @inheritDoc\n */\n CanvasVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (coordinate, frameState, hitTolerance, callback, thisArg) {\n if (!this.replayGroup_) {\n return undefined;\n } else {\n var resolution = frameState.viewState.resolution;\n var rotation = frameState.viewState.rotation;\n var layer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n /** @type {!Object<string, boolean>} */\n var features = {};\n var result = this.replayGroup_.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {},\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @return {?} Callback result.\n */\n function(feature) {\n var key = getUid(feature);\n if (!(key in features)) {\n features[key] = true;\n return callback.call(thisArg, feature, layer);\n }\n }, null);\n return result;\n }\n };\n\n /**\n * @param {import(\"../../events/Event.js\").default} event Event.\n */\n CanvasVectorLayerRenderer.prototype.handleFontsChanged_ = function handleFontsChanged_ (event) {\n var 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 CanvasVectorLayerRenderer.prototype.handleStyleImageChange_ = function handleStyleImageChange_ (event) {\n this.renderIfReadyAndVisible();\n };\n\n /**\n * @inheritDoc\n */\n CanvasVectorLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState) {\n var vectorLayer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n var vectorSource = /** @type {import(\"../../source/Vector.js\").default} */ (vectorLayer.getSource());\n\n var animating = frameState.viewHints[ViewHint.ANIMATING];\n var interacting = frameState.viewHints[ViewHint.INTERACTING];\n var updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();\n var updateWhileInteracting = vectorLayer.getUpdateWhileInteracting();\n\n if (!this.dirty_ && (!updateWhileAnimating && animating) ||\n (!updateWhileInteracting && interacting)) {\n return true;\n }\n\n var frameStateExtent = frameState.extent;\n var viewState = frameState.viewState;\n var projection = viewState.projection;\n var resolution = viewState.resolution;\n var pixelRatio = frameState.pixelRatio;\n var vectorLayerRevision = vectorLayer.getRevision();\n var vectorLayerRenderBuffer = vectorLayer.getRenderBuffer();\n var vectorLayerRenderOrder = vectorLayer.getRenderOrder();\n\n if (vectorLayerRenderOrder === undefined) {\n vectorLayerRenderOrder = defaultRenderOrder;\n }\n\n var extent = buffer(frameStateExtent,\n vectorLayerRenderBuffer * resolution);\n var projectionExtent = viewState.projection.getExtent();\n\n if (vectorSource.getWrapX() && viewState.projection.canWrapX() &&\n !containsExtent(projectionExtent, frameState.extent)) {\n // For the replay group, we need an extent that intersects the real world\n // (-180° to +180°). To support geometries in a coordinate range from -540°\n // to +540°, we add at least 1 world width on each side of the projection\n // extent. If the viewport is wider than the world, we need to add half of\n // the viewport width to make sure we cover the whole viewport.\n var worldWidth = getWidth(projectionExtent);\n var gutter = Math.max(getWidth(extent) / 2, worldWidth);\n extent[0] = projectionExtent[0] - gutter;\n extent[2] = projectionExtent[2] + gutter;\n }\n\n if (!this.dirty_ &&\n this.renderedResolution_ == resolution &&\n this.renderedRevision_ == vectorLayerRevision &&\n this.renderedRenderOrder_ == vectorLayerRenderOrder &&\n containsExtent(this.renderedExtent_, extent)) {\n this.replayGroupChanged = false;\n return true;\n }\n\n this.replayGroup_ = null;\n\n this.dirty_ = false;\n\n var replayGroup = new CanvasReplayGroup(\n getRenderTolerance(resolution, pixelRatio), extent, resolution,\n pixelRatio, vectorSource.getOverlaps(), this.declutterTree_, vectorLayer.getRenderBuffer());\n vectorSource.loadFeatures(extent, resolution, projection);\n /**\n * @param {import(\"../../Feature.js\").default} feature Feature.\n * @this {CanvasVectorLayerRenderer}\n */\n var render = function(feature) {\n var styles;\n var styleFunction = feature.getStyleFunction() || vectorLayer.getStyleFunction();\n if (styleFunction) {\n styles = styleFunction(feature, resolution);\n }\n if (styles) {\n var dirty = this.renderFeature(\n feature, resolution, pixelRatio, styles, replayGroup);\n this.dirty_ = this.dirty_ || dirty;\n }\n }.bind(this);\n if (vectorLayerRenderOrder) {\n /** @type {Array<import(\"../../Feature.js\").default>} */\n var features = [];\n vectorSource.forEachFeatureInExtent(extent,\n /**\n * @param {import(\"../../Feature.js\").default} feature Feature.\n */\n function(feature) {\n features.push(feature);\n });\n features.sort(vectorLayerRenderOrder);\n for (var i = 0, ii = features.length; i < ii; ++i) {\n render(features[i]);\n }\n } else {\n vectorSource.forEachFeatureInExtent(extent, render);\n }\n replayGroup.finish();\n\n this.renderedResolution_ = resolution;\n this.renderedRevision_ = vectorLayerRevision;\n this.renderedRenderOrder_ = vectorLayerRenderOrder;\n this.renderedExtent_ = extent;\n this.replayGroup_ = replayGroup;\n\n this.replayGroupChanged = true;\n return true;\n };\n\n /**\n * @param {import(\"../../Feature.js\").default} feature Feature.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\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/ReplayGroup.js\").default} replayGroup Replay group.\n * @return {boolean} `true` if an image is loading.\n */\n CanvasVectorLayerRenderer.prototype.renderFeature = function renderFeature$1 (feature, resolution, pixelRatio, styles, replayGroup) {\n if (!styles) {\n return false;\n }\n var loading = false;\n if (Array.isArray(styles)) {\n for (var i = 0, ii = styles.length; i < ii; ++i) {\n loading = renderFeature(\n replayGroup, feature, styles[i],\n getSquaredRenderTolerance(resolution, pixelRatio),\n this.handleStyleImageChange_, this) || loading;\n }\n } else {\n loading = renderFeature(\n replayGroup, feature, styles,\n getSquaredRenderTolerance(resolution, pixelRatio),\n this.handleStyleImageChange_, this);\n }\n return loading;\n };\n\n return CanvasVectorLayerRenderer;\n}(CanvasLayerRenderer));\n\n\n/**\n * Determine if this renderer handles the provided layer.\n * @param {import(\"../../layer/Layer.js\").default} layer The candidate layer.\n * @return {boolean} The renderer can render the layer.\n */\nCanvasVectorLayerRenderer['handles'] = function(layer) {\n return layer.getType() === LayerType.VECTOR;\n};\n\n\n/**\n * Create a layer renderer.\n * @param {import(\"../Map.js\").default} mapRenderer The map renderer.\n * @param {import(\"../../layer/Layer.js\").default} layer The layer to be rendererd.\n * @return {CanvasVectorLayerRenderer} The layer renderer.\n */\nCanvasVectorLayerRenderer['create'] = function(mapRenderer, layer) {\n return new CanvasVectorLayerRenderer(/** @type {import(\"../../layer/Vector.js\").default} */ (layer));\n};\n\n\nexport default CanvasVectorLayerRenderer;\n\n//# sourceMappingURL=VectorLayer.js.map","/**\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'`: Vector tiles are rendered as vectors. Most accurate rendering\n * even during animations, but slower performance than the other options.\n * @api\n */\nexport default {\n IMAGE: 'image',\n HYBRID: 'hybrid',\n VECTOR: 'vector'\n};\n\n//# sourceMappingURL=VectorTileRenderType.js.map","/**\n * @module ol/renderer/canvas/VectorTileLayer\n */\nimport {getUid} from '../../util.js';\nimport LayerType from '../../LayerType.js';\nimport TileState from '../../TileState.js';\nimport ViewHint from '../../ViewHint.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {listen, unlisten} from '../../events.js';\nimport EventType from '../../events/EventType.js';\nimport rbush from 'rbush';\nimport {buffer, containsCoordinate, equals, getIntersection, getTopLeft, intersects} from '../../extent.js';\nimport VectorTileRenderType from '../../layer/VectorTileRenderType.js';\nimport {equivalent as equivalentProjection} from '../../proj.js';\nimport Units from '../../proj/Units.js';\nimport ReplayType from '../../render/ReplayType.js';\nimport {labelCache, rotateAtOffset} from '../../render/canvas.js';\nimport CanvasReplayGroup, {replayDeclutter} from '../../render/canvas/ReplayGroup.js';\nimport {ORDER} from '../../render/replay.js';\nimport CanvasTileLayerRenderer from './TileLayer.js';\nimport {getSquaredTolerance as getSquaredRenderTolerance, renderFeature} from '../vector.js';\nimport {\n create as createTransform,\n compose as composeTransform,\n reset as resetTransform,\n scale as scaleTransform,\n translate as translateTransform\n} from '../../transform.js';\n\n\n/**\n * @type {!Object<string, Array<import(\"../../render/ReplayType.js\").default>>}\n */\nvar IMAGE_REPLAYS = {\n 'image': [ReplayType.POLYGON, ReplayType.CIRCLE,\n ReplayType.LINE_STRING, ReplayType.IMAGE, ReplayType.TEXT],\n 'hybrid': [ReplayType.POLYGON, ReplayType.LINE_STRING]\n};\n\n\n/**\n * @type {!Object<string, Array<import(\"../../render/ReplayType.js\").default>>}\n */\nvar VECTOR_REPLAYS = {\n 'image': [ReplayType.DEFAULT],\n 'hybrid': [ReplayType.IMAGE, ReplayType.TEXT, ReplayType.DEFAULT],\n 'vector': ORDER\n};\n\n\n/**\n * @classdesc\n * Canvas renderer for vector tile layers.\n * @api\n */\nvar CanvasVectorTileLayerRenderer = /*@__PURE__*/(function (CanvasTileLayerRenderer) {\n function CanvasVectorTileLayerRenderer(layer) {\n\n CanvasTileLayerRenderer.call(this, layer, true);\n\n /**\n * Declutter tree.\n * @private\n */\n this.declutterTree_ = layer.getDeclutter() ? rbush(9, undefined) : null;\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.js\").Transform}\n */\n this.tmpTransform_ = createTransform();\n\n var renderMode = layer.getRenderMode();\n\n // Use lower resolution for pure vector rendering. Closest resolution otherwise.\n this.zDirection = renderMode === VectorTileRenderType.VECTOR ? 1 : 0;\n\n if (renderMode !== VectorTileRenderType.VECTOR) {\n this.context = createCanvasContext2D();\n }\n\n\n listen(labelCache, EventType.CLEAR, this.handleFontsChanged_, this);\n\n }\n\n if ( CanvasTileLayerRenderer ) CanvasVectorTileLayerRenderer.__proto__ = CanvasTileLayerRenderer;\n CanvasVectorTileLayerRenderer.prototype = Object.create( CanvasTileLayerRenderer && CanvasTileLayerRenderer.prototype );\n CanvasVectorTileLayerRenderer.prototype.constructor = CanvasVectorTileLayerRenderer;\n\n /**\n * @inheritDoc\n */\n CanvasVectorTileLayerRenderer.prototype.disposeInternal = function disposeInternal () {\n unlisten(labelCache, EventType.CLEAR, this.handleFontsChanged_, this);\n CanvasTileLayerRenderer.prototype.disposeInternal.call(this);\n };\n\n /**\n * @inheritDoc\n */\n CanvasVectorTileLayerRenderer.prototype.getTile = function getTile (z, x, y, pixelRatio, projection) {\n var tile = CanvasTileLayerRenderer.prototype.getTile.call(this, z, x, y, pixelRatio, projection);\n if (tile.getState() === TileState.LOADED) {\n this.createReplayGroup_(/** @type {import(\"../../VectorImageTile.js\").default} */ (tile), pixelRatio, projection);\n if (this.context) {\n this.renderTileImage_(/** @type {import(\"../../VectorImageTile.js\").default} */ (tile), pixelRatio, projection);\n }\n }\n return tile;\n };\n\n /**\n * @inheritDoc\n */\n CanvasVectorTileLayerRenderer.prototype.getTileImage = function getTileImage (tile) {\n var tileLayer = /** @type {import(\"../../layer/Tile.js\").default} */ (this.getLayer());\n return /** @type {import(\"../../VectorImageTile.js\").default} */ (tile).getImage(tileLayer);\n };\n\n /**\n * @inheritDoc\n */\n CanvasVectorTileLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState) {\n var layer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n var layerRevision = layer.getRevision();\n if (this.renderedLayerRevision_ != layerRevision) {\n this.renderedTiles.length = 0;\n }\n this.renderedLayerRevision_ = layerRevision;\n return CanvasTileLayerRenderer.prototype.prepareFrame.call(this, frameState, layerState);\n };\n\n /**\n * @param {import(\"../../VectorImageTile.js\").default} tile Tile.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @private\n */\n CanvasVectorTileLayerRenderer.prototype.createReplayGroup_ = function createReplayGroup_ (tile, pixelRatio, projection) {\n var this$1 = this;\n\n var layer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n var revision = layer.getRevision();\n var renderOrder = /** @type {import(\"../../render.js\").OrderFunction} */ (layer.getRenderOrder()) || null;\n\n var replayState = tile.getReplayState(layer);\n if (!replayState.dirty && replayState.renderedRevision == revision &&\n replayState.renderedRenderOrder == renderOrder) {\n return;\n }\n\n var source = /** @type {import(\"../../source/VectorTile.js\").default} */ (layer.getSource());\n var sourceTileGrid = source.getTileGrid();\n var tileGrid = source.getTileGridForProjection(projection);\n var resolution = tileGrid.getResolution(tile.tileCoord[0]);\n var tileExtent = tile.extent;\n\n var loop = function ( t, tt ) {\n var sourceTile = tile.getTile(tile.tileKeys[t]);\n if (sourceTile.getState() != TileState.LOADED) {\n return;\n }\n\n var sourceTileCoord = sourceTile.tileCoord;\n var sourceTileExtent = sourceTileGrid.getTileCoordExtent(sourceTileCoord);\n var sharedExtent = getIntersection(tileExtent, sourceTileExtent);\n var bufferedExtent = equals(sourceTileExtent, sharedExtent) ? null :\n buffer(sharedExtent, layer.getRenderBuffer() * resolution, this$1.tmpExtent);\n var tileProjection = sourceTile.getProjection();\n var reproject = false;\n if (!equivalentProjection(projection, tileProjection)) {\n reproject = true;\n sourceTile.setProjection(projection);\n }\n replayState.dirty = false;\n var replayGroup = new CanvasReplayGroup(0, sharedExtent, resolution,\n pixelRatio, source.getOverlaps(), this$1.declutterTree_, layer.getRenderBuffer());\n var squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio);\n\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @this {CanvasVectorTileLayerRenderer}\n */\n var render = function(feature) {\n var styles;\n var styleFunction = feature.getStyleFunction() || layer.getStyleFunction();\n if (styleFunction) {\n styles = styleFunction(feature, resolution);\n }\n if (styles) {\n var dirty = this.renderFeature(feature, squaredTolerance, styles, replayGroup);\n this.dirty_ = this.dirty_ || dirty;\n replayState.dirty = replayState.dirty || dirty;\n }\n };\n\n var features = sourceTile.getFeatures();\n if (renderOrder && renderOrder !== replayState.renderedRenderOrder) {\n features.sort(renderOrder);\n }\n for (var i = 0, ii = features.length; i < ii; ++i) {\n var feature = features[i];\n if (reproject) {\n if (tileProjection.getUnits() == Units.TILE_PIXELS) {\n // projected tile extent\n tileProjection.setWorldExtent(sourceTileExtent);\n // tile extent in tile pixel space\n tileProjection.setExtent(sourceTile.getExtent());\n }\n feature.getGeometry().transform(tileProjection, projection);\n }\n if (!bufferedExtent || intersects(bufferedExtent, feature.getGeometry().getExtent())) {\n render.call(this$1, feature);\n }\n }\n replayGroup.finish();\n sourceTile.setReplayGroup(layer, tile.tileCoord.toString(), replayGroup);\n };\n\n for (var t = 0, tt = tile.tileKeys.length; t < tt; ++t) loop( t, tt );\n replayState.renderedRevision = revision;\n replayState.renderedRenderOrder = renderOrder;\n };\n\n /**\n * @inheritDoc\n */\n CanvasVectorTileLayerRenderer.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (coordinate, frameState, hitTolerance, callback, thisArg) {\n var resolution = frameState.viewState.resolution;\n var rotation = frameState.viewState.rotation;\n hitTolerance = hitTolerance == undefined ? 0 : hitTolerance;\n var layer = this.getLayer();\n /** @type {!Object<string, boolean>} */\n var features = {};\n\n var renderedTiles = /** @type {Array<import(\"../../VectorImageTile.js\").default>} */ (this.renderedTiles);\n\n var bufferedExtent, found;\n var i, ii;\n for (i = 0, ii = renderedTiles.length; i < ii; ++i) {\n var tile = renderedTiles[i];\n bufferedExtent = buffer(tile.extent, hitTolerance * resolution, bufferedExtent);\n if (!containsCoordinate(bufferedExtent, coordinate)) {\n continue;\n }\n for (var t = 0, tt = tile.tileKeys.length; t < tt; ++t) {\n var sourceTile = tile.getTile(tile.tileKeys[t]);\n if (sourceTile.getState() != TileState.LOADED) {\n continue;\n }\n var replayGroup = /** @type {CanvasReplayGroup} */ (sourceTile.getReplayGroup(layer,\n tile.tileCoord.toString()));\n found = found || replayGroup.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {},\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @return {?} Callback result.\n */\n function(feature) {\n var key = getUid(feature);\n if (!(key in features)) {\n features[key] = true;\n return callback.call(thisArg, feature, layer);\n }\n }, null);\n }\n }\n return found;\n };\n\n /**\n * @param {import(\"../../VectorTile.js\").default} tile Tile.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @return {import(\"../../transform.js\").Transform} transform Transform.\n * @private\n */\n CanvasVectorTileLayerRenderer.prototype.getReplayTransform_ = function getReplayTransform_ (tile, frameState) {\n var layer = this.getLayer();\n var source = /** @type {import(\"../../source/VectorTile.js\").default} */ (layer.getSource());\n var tileGrid = source.getTileGrid();\n var tileCoord = tile.tileCoord;\n var tileResolution = tileGrid.getResolution(tileCoord[0]);\n var viewState = frameState.viewState;\n var pixelRatio = frameState.pixelRatio;\n var renderResolution = viewState.resolution / pixelRatio;\n var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent);\n var center = viewState.center;\n var origin = getTopLeft(tileExtent);\n var size = frameState.size;\n var offsetX = Math.round(pixelRatio * size[0] / 2);\n var offsetY = Math.round(pixelRatio * size[1] / 2);\n return composeTransform(this.tmpTransform_,\n offsetX, offsetY,\n tileResolution / renderResolution, tileResolution / renderResolution,\n viewState.rotation,\n (origin[0] - center[0]) / tileResolution,\n (center[1] - origin[1]) / tileResolution);\n };\n\n /**\n * @param {import(\"../../events/Event.js\").default} event Event.\n */\n CanvasVectorTileLayerRenderer.prototype.handleFontsChanged_ = function handleFontsChanged_ (event) {\n var 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 CanvasVectorTileLayerRenderer.prototype.handleStyleImageChange_ = function handleStyleImageChange_ (event) {\n this.renderIfReadyAndVisible();\n };\n\n /**\n * @inheritDoc\n */\n CanvasVectorTileLayerRenderer.prototype.postCompose = function postCompose (context, frameState, layerState) {\n var layer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n var renderMode = layer.getRenderMode();\n if (renderMode != VectorTileRenderType.IMAGE) {\n var declutterReplays = layer.getDeclutter() ? {} : null;\n var source = /** @type {import(\"../../source/VectorTile.js\").default} */ (layer.getSource());\n var replayTypes = VECTOR_REPLAYS[renderMode];\n var pixelRatio = frameState.pixelRatio;\n var rotation = frameState.viewState.rotation;\n var size = frameState.size;\n var offsetX, offsetY;\n if (rotation) {\n offsetX = Math.round(pixelRatio * size[0] / 2);\n offsetY = Math.round(pixelRatio * size[1] / 2);\n rotateAtOffset(context, -rotation, offsetX, offsetY);\n }\n if (declutterReplays) {\n this.declutterTree_.clear();\n }\n var viewHints = frameState.viewHints;\n var snapToPixel = !(viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]);\n var tiles = this.renderedTiles;\n var tileGrid = source.getTileGridForProjection(frameState.viewState.projection);\n var clips = [];\n var zs = [];\n for (var i = tiles.length - 1; i >= 0; --i) {\n var tile = /** @type {import(\"../../VectorImageTile.js\").default} */ (tiles[i]);\n if (tile.getState() == TileState.ABORT) {\n continue;\n }\n var tileCoord = tile.tileCoord;\n var worldOffset = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent)[0] - tile.extent[0];\n var transform = undefined;\n for (var t = 0, tt = tile.tileKeys.length; t < tt; ++t) {\n var sourceTile = tile.getTile(tile.tileKeys[t]);\n if (sourceTile.getState() != TileState.LOADED) {\n continue;\n }\n var replayGroup = /** @type {CanvasReplayGroup} */ (sourceTile.getReplayGroup(layer, tileCoord.toString()));\n if (!replayGroup || !replayGroup.hasReplays(replayTypes)) {\n // sourceTile was not yet loaded when this.createReplayGroup_() was\n // called, or it has no replays of the types we want to render\n continue;\n }\n if (!transform) {\n transform = this.getTransform(frameState, worldOffset);\n }\n var currentZ = sourceTile.tileCoord[0];\n var currentClip = replayGroup.getClipCoords(transform);\n context.save();\n context.globalAlpha = layerState.opacity;\n // Create a clip mask for regions in this low resolution tile that are\n // already filled by a higher resolution tile\n for (var j = 0, jj = clips.length; j < jj; ++j) {\n var clip = clips[j];\n if (currentZ < zs[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 replayGroup.replay(context, transform, rotation, {}, snapToPixel, replayTypes, declutterReplays);\n context.restore();\n clips.push(currentClip);\n zs.push(currentZ);\n }\n }\n if (declutterReplays) {\n replayDeclutter(declutterReplays, context, rotation, snapToPixel);\n }\n if (rotation) {\n rotateAtOffset(context, rotation,\n /** @type {number} */ (offsetX), /** @type {number} */ (offsetY));\n }\n }\n CanvasTileLayerRenderer.prototype.postCompose.call(this, context, frameState, layerState);\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/ReplayGroup.js\").default} replayGroup Replay group.\n * @return {boolean} `true` if an image is loading.\n */\n CanvasVectorTileLayerRenderer.prototype.renderFeature = function renderFeature$1 (feature, squaredTolerance, styles, replayGroup) {\n if (!styles) {\n return false;\n }\n var loading = false;\n if (Array.isArray(styles)) {\n for (var i = 0, ii = styles.length; i < ii; ++i) {\n loading = renderFeature(\n replayGroup, feature, styles[i], squaredTolerance,\n this.handleStyleImageChange_, this) || loading;\n }\n } else {\n loading = renderFeature(\n replayGroup, feature, styles, squaredTolerance,\n this.handleStyleImageChange_, this);\n }\n return loading;\n };\n\n /**\n * @param {import(\"../../VectorImageTile.js\").default} tile Tile.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @private\n */\n CanvasVectorTileLayerRenderer.prototype.renderTileImage_ = function renderTileImage_ (tile, pixelRatio, projection) {\n var layer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n var replayState = tile.getReplayState(layer);\n var revision = layer.getRevision();\n var replays = IMAGE_REPLAYS[layer.getRenderMode()];\n if (replays && replayState.renderedTileRevision !== revision) {\n replayState.renderedTileRevision = revision;\n var tileCoord = tile.wrappedTileCoord;\n var z = tileCoord[0];\n var source = /** @type {import(\"../../source/VectorTile.js\").default} */ (layer.getSource());\n var tileGrid = source.getTileGridForProjection(projection);\n var resolution = tileGrid.getResolution(z);\n var context = tile.getContext(layer);\n var size = source.getTilePixelSize(z, pixelRatio, projection);\n context.canvas.width = size[0];\n context.canvas.height = size[1];\n var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent);\n for (var i = 0, ii = tile.tileKeys.length; i < ii; ++i) {\n var sourceTile = tile.getTile(tile.tileKeys[i]);\n if (sourceTile.getState() != TileState.LOADED) {\n continue;\n }\n var pixelScale = pixelRatio / resolution;\n var transform = resetTransform(this.tmpTransform_);\n scaleTransform(transform, pixelScale, -pixelScale);\n translateTransform(transform, -tileExtent[0], -tileExtent[3]);\n var replayGroup = /** @type {CanvasReplayGroup} */ (sourceTile.getReplayGroup(layer,\n tile.tileCoord.toString()));\n replayGroup.replay(context, transform, 0, {}, true, replays);\n }\n }\n };\n\n return CanvasVectorTileLayerRenderer;\n}(CanvasTileLayerRenderer));\n\n\n/**\n * Determine if this renderer handles the provided layer.\n * @param {import(\"../../layer/Layer.js\").default} layer The candidate layer.\n * @return {boolean} The renderer can render the layer.\n */\nCanvasVectorTileLayerRenderer['handles'] = function(layer) {\n return layer.getType() === LayerType.VECTOR_TILE;\n};\n\n\n/**\n * Create a layer renderer.\n * @param {import(\"../Map.js\").default} mapRenderer The map renderer.\n * @param {import(\"../../layer/Layer.js\").default} layer The layer to be rendererd.\n * @return {CanvasVectorTileLayerRenderer} The layer renderer.\n */\nCanvasVectorTileLayerRenderer['create'] = function(mapRenderer, layer) {\n return new CanvasVectorTileLayerRenderer(/** @type {import(\"../../layer/VectorTile.js\").default} */ (layer));\n};\n\n\nexport default CanvasVectorTileLayerRenderer;\n\n//# sourceMappingURL=VectorTileLayer.js.map","/**\n * @module ol/Map\n */\nimport PluggableMap from './PluggableMap.js';\nimport {defaults as defaultControls} from './control/util.js';\nimport {defaults as defaultInteractions} from './interaction.js';\nimport {assign} from './obj.js';\nimport CanvasImageLayerRenderer from './renderer/canvas/ImageLayer.js';\nimport CanvasMapRenderer from './renderer/canvas/Map.js';\nimport CanvasTileLayerRenderer from './renderer/canvas/TileLayer.js';\nimport CanvasVectorLayerRenderer from './renderer/canvas/VectorLayer.js';\nimport CanvasVectorTileLayerRenderer from './renderer/canvas/VectorTileLayer.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 * @fires import(\"./MapBrowserEvent.js\").MapBrowserEvent\n * @fires import(\"./MapEvent.js\").MapEvent\n * @fires module:ol/render/Event~RenderEvent#postcompose\n * @fires module:ol/render/Event~RenderEvent#precompose\n * @api\n */\nvar Map = /*@__PURE__*/(function (PluggableMap) {\n function Map(options) {\n options = assign({}, options);\n if (!options.controls) {\n options.controls = defaultControls();\n }\n if (!options.interactions) {\n options.interactions = defaultInteractions();\n }\n\n PluggableMap.call(this, options);\n }\n\n if ( PluggableMap ) Map.__proto__ = PluggableMap;\n Map.prototype = Object.create( PluggableMap && PluggableMap.prototype );\n Map.prototype.constructor = Map;\n\n Map.prototype.createRenderer = function createRenderer () {\n var renderer = new CanvasMapRenderer(this);\n renderer.registerLayerRenderers([\n CanvasImageLayerRenderer,\n CanvasTileLayerRenderer,\n CanvasVectorLayerRenderer,\n CanvasVectorTileLayerRenderer\n ]);\n return renderer;\n };\n\n return Map;\n}(PluggableMap));\n\n\nexport default Map;\n\n//# sourceMappingURL=Map.js.map","/**\n * @module ol/webgl\n */\n\n\n/**\n * Constants taken from goog.webgl\n */\n\n\n/**\n * @const\n * @type {number}\n */\nexport var ONE = 1;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var SRC_ALPHA = 0x0302;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var COLOR_ATTACHMENT0 = 0x8CE0;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var COLOR_BUFFER_BIT = 0x00004000;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var TRIANGLES = 0x0004;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var TRIANGLE_STRIP = 0x0005;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var ONE_MINUS_SRC_ALPHA = 0x0303;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var ARRAY_BUFFER = 0x8892;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var ELEMENT_ARRAY_BUFFER = 0x8893;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var STREAM_DRAW = 0x88E0;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var STATIC_DRAW = 0x88E4;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var DYNAMIC_DRAW = 0x88E8;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var CULL_FACE = 0x0B44;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var BLEND = 0x0BE2;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var STENCIL_TEST = 0x0B90;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var DEPTH_TEST = 0x0B71;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var SCISSOR_TEST = 0x0C11;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var UNSIGNED_BYTE = 0x1401;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var UNSIGNED_SHORT = 0x1403;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var UNSIGNED_INT = 0x1405;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var FLOAT = 0x1406;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var RGBA = 0x1908;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var FRAGMENT_SHADER = 0x8B30;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var VERTEX_SHADER = 0x8B31;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var LINK_STATUS = 0x8B82;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var LINEAR = 0x2601;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var TEXTURE_MAG_FILTER = 0x2800;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var TEXTURE_MIN_FILTER = 0x2801;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var TEXTURE_WRAP_S = 0x2802;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var TEXTURE_WRAP_T = 0x2803;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var TEXTURE_2D = 0x0DE1;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var TEXTURE0 = 0x84C0;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var CLAMP_TO_EDGE = 0x812F;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var COMPILE_STATUS = 0x8B81;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var FRAMEBUFFER = 0x8D40;\n\n\n/** end of goog.webgl constants\n */\n\n\n/**\n * @const\n * @type {Array<string>}\n */\nvar CONTEXT_IDS = [\n 'experimental-webgl',\n 'webgl',\n 'webkit-3d',\n 'moz-webgl'\n];\n\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 var ii = CONTEXT_IDS.length;\n for (var i = 0; i < ii; ++i) {\n try {\n var context = canvas.getContext(CONTEXT_IDS[i], opt_attributes);\n if (context) {\n return /** @type {!WebGLRenderingContext} */ (context);\n }\n } catch (e) {\n // pass\n }\n }\n return null;\n}\n\n\n/**\n * Include debuggable shader sources. Default is `true`. This should be set to\n * `false` for production builds.\n * @type {boolean}\n */\nexport var DEBUG = true;\n\n\n/**\n * The maximum supported WebGL texture size in pixels. If WebGL is not\n * supported, the value is set to `undefined`.\n * @type {number|undefined}\n */\nvar MAX_TEXTURE_SIZE; // value is set below\n\n\n/**\n * List of supported WebGL extensions.\n * @type {Array<string>}\n */\nvar EXTENSIONS; // value is set below\n\n\n/**\n * True if both OpenLayers and browser support WebGL.\n * @type {boolean}\n * @api\n */\nvar HAS = false;\n\n//TODO Remove side effects\nif (typeof window !== 'undefined' && 'WebGLRenderingContext' in window) {\n try {\n var canvas = /** @type {HTMLCanvasElement} */ (document.createElement('canvas'));\n var gl = getContext(canvas, {failIfMajorPerformanceCaveat: true});\n if (gl) {\n HAS = true;\n MAX_TEXTURE_SIZE = /** @type {number} */ (gl.getParameter(gl.MAX_TEXTURE_SIZE));\n EXTENSIONS = gl.getSupportedExtensions();\n }\n } catch (e) {\n // pass\n }\n}\n\nexport {HAS, MAX_TEXTURE_SIZE, EXTENSIONS};\n\n//# sourceMappingURL=webgl.js.map","/**\n * @module ol/webgl/Shader\n */\nimport {abstract} from '../util.js';\n\n/**\n * @abstract\n */\nvar WebGLShader = function WebGLShader(source) {\n\n /**\n * @private\n * @type {string}\n */\n this.source_ = source;\n\n};\n\n/**\n * @return {boolean} Is animated?\n */\nWebGLShader.prototype.isAnimated = function isAnimated () {\n return false;\n};\n\n/**\n * @abstract\n * @return {number} Type.\n */\nWebGLShader.prototype.getType = function getType () {\n return abstract();\n};\n\n/**\n * @return {string} Source.\n */\nWebGLShader.prototype.getSource = function getSource () {\n return this.source_;\n};\n\n\nexport default WebGLShader;\n\n//# sourceMappingURL=Shader.js.map","/**\n * @module ol/webgl/Fragment\n */\n\nimport {FRAGMENT_SHADER} from '../webgl.js';\nimport WebGLShader from '../webgl/Shader.js';\n\nvar WebGLFragment = /*@__PURE__*/(function (WebGLShader) {\n function WebGLFragment(source) {\n WebGLShader.call(this, source);\n }\n\n if ( WebGLShader ) WebGLFragment.__proto__ = WebGLShader;\n WebGLFragment.prototype = Object.create( WebGLShader && WebGLShader.prototype );\n WebGLFragment.prototype.constructor = WebGLFragment;\n\n /**\n * @inheritDoc\n */\n WebGLFragment.prototype.getType = function getType () {\n return FRAGMENT_SHADER;\n };\n\n return WebGLFragment;\n}(WebGLShader));\n\n\nexport default WebGLFragment;\n\n//# sourceMappingURL=Fragment.js.map","/**\n * @module ol/webgl/Vertex\n */\n\nimport {VERTEX_SHADER} from '../webgl.js';\nimport WebGLShader from '../webgl/Shader.js';\n\nvar WebGLVertex = /*@__PURE__*/(function (WebGLShader) {\n function WebGLVertex(source) {\n WebGLShader.call(this, source);\n }\n\n if ( WebGLShader ) WebGLVertex.__proto__ = WebGLShader;\n WebGLVertex.prototype = Object.create( WebGLShader && WebGLShader.prototype );\n WebGLVertex.prototype.constructor = WebGLVertex;\n\n /**\n * @inheritDoc\n */\n WebGLVertex.prototype.getType = function getType () {\n return VERTEX_SHADER;\n };\n\n return WebGLVertex;\n}(WebGLShader));\n\n\nexport default WebGLVertex;\n\n//# sourceMappingURL=Vertex.js.map","/**\n * @module ol/render/webgl/circlereplay/defaultshader\n */\n// This file is automatically generated, do not edit.\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../../webgl.js';\nimport WebGLFragment from '../../../webgl/Fragment.js';\nimport WebGLVertex from '../../../webgl/Vertex.js';\n\nexport var fragment = new WebGLFragment(DEBUG_WEBGL ?\n 'precision mediump float;\\nvarying vec2 v_center;\\nvarying vec2 v_offset;\\nvarying float v_halfWidth;\\nvarying float v_pixelRatio;\\n\\n\\n\\nuniform float u_opacity;\\nuniform vec4 u_fillColor;\\nuniform vec4 u_strokeColor;\\nuniform vec2 u_size;\\n\\nvoid main(void) {\\n vec2 windowCenter = vec2((v_center.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\\n (v_center.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\\n vec2 windowOffset = vec2((v_offset.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\\n (v_offset.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\\n float radius = length(windowCenter - windowOffset);\\n float dist = length(windowCenter - gl_FragCoord.xy);\\n if (dist > radius + v_halfWidth) {\\n if (u_strokeColor.a == 0.0) {\\n gl_FragColor = u_fillColor;\\n } else {\\n gl_FragColor = u_strokeColor;\\n }\\n gl_FragColor.a = gl_FragColor.a - (dist - (radius + v_halfWidth));\\n } else if (u_fillColor.a == 0.0) {\\n // Hooray, no fill, just stroke. We can use real antialiasing.\\n gl_FragColor = u_strokeColor;\\n if (dist < radius - v_halfWidth) {\\n gl_FragColor.a = gl_FragColor.a - (radius - v_halfWidth - dist);\\n }\\n } else {\\n gl_FragColor = u_fillColor;\\n float strokeDist = radius - v_halfWidth;\\n float antialias = 2.0 * v_pixelRatio;\\n if (dist > strokeDist) {\\n gl_FragColor = u_strokeColor;\\n } else if (dist >= strokeDist - antialias) {\\n float step = smoothstep(strokeDist - antialias, strokeDist, dist);\\n gl_FragColor = mix(u_fillColor, u_strokeColor, step);\\n }\\n }\\n gl_FragColor.a = gl_FragColor.a * u_opacity;\\n if (gl_FragColor.a <= 0.0) {\\n discard;\\n }\\n}\\n' :\n 'precision mediump float;varying vec2 a;varying vec2 b;varying float c;varying float d;uniform float m;uniform vec4 n;uniform vec4 o;uniform vec2 p;void main(void){vec2 windowCenter=vec2((a.x+1.0)/2.0*p.x*d,(a.y+1.0)/2.0*p.y*d);vec2 windowOffset=vec2((b.x+1.0)/2.0*p.x*d,(b.y+1.0)/2.0*p.y*d);float radius=length(windowCenter-windowOffset);float dist=length(windowCenter-gl_FragCoord.xy);if(dist>radius+c){if(o.a==0.0){gl_FragColor=n;}else{gl_FragColor=o;}gl_FragColor.a=gl_FragColor.a-(dist-(radius+c));}else if(n.a==0.0){gl_FragColor=o;if(dist<radius-c){gl_FragColor.a=gl_FragColor.a-(radius-c-dist);}} else{gl_FragColor=n;float strokeDist=radius-c;float antialias=2.0*d;if(dist>strokeDist){gl_FragColor=o;}else if(dist>=strokeDist-antialias){float step=smoothstep(strokeDist-antialias,strokeDist,dist);gl_FragColor=mix(n,o,step);}} gl_FragColor.a=gl_FragColor.a*m;if(gl_FragColor.a<=0.0){discard;}}');\n\nexport var vertex = new WebGLVertex(DEBUG_WEBGL ?\n 'varying vec2 v_center;\\nvarying vec2 v_offset;\\nvarying float v_halfWidth;\\nvarying float v_pixelRatio;\\n\\n\\nattribute vec2 a_position;\\nattribute float a_instruction;\\nattribute float a_radius;\\n\\nuniform mat4 u_projectionMatrix;\\nuniform mat4 u_offsetScaleMatrix;\\nuniform mat4 u_offsetRotateMatrix;\\nuniform float u_lineWidth;\\nuniform float u_pixelRatio;\\n\\nvoid main(void) {\\n mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\\n v_center = vec4(u_projectionMatrix * vec4(a_position, 0.0, 1.0)).xy;\\n v_pixelRatio = u_pixelRatio;\\n float lineWidth = u_lineWidth * u_pixelRatio;\\n v_halfWidth = lineWidth / 2.0;\\n if (lineWidth == 0.0) {\\n lineWidth = 2.0 * u_pixelRatio;\\n }\\n vec2 offset;\\n // Radius with anitaliasing (roughly).\\n float radius = a_radius + 3.0 * u_pixelRatio;\\n // Until we get gl_VertexID in WebGL, we store an instruction.\\n if (a_instruction == 0.0) {\\n // Offsetting the edges of the triangle by lineWidth / 2 is necessary, however\\n // we should also leave some space for the antialiasing, thus we offset by lineWidth.\\n offset = vec2(-1.0, 1.0);\\n } else if (a_instruction == 1.0) {\\n offset = vec2(-1.0, -1.0);\\n } else if (a_instruction == 2.0) {\\n offset = vec2(1.0, -1.0);\\n } else {\\n offset = vec2(1.0, 1.0);\\n }\\n\\n gl_Position = u_projectionMatrix * vec4(a_position + offset * radius, 0.0, 1.0) +\\n offsetMatrix * vec4(offset * lineWidth, 0.0, 0.0);\\n v_offset = vec4(u_projectionMatrix * vec4(a_position.x + a_radius, a_position.y,\\n 0.0, 1.0)).xy;\\n\\n if (distance(v_center, v_offset) > 20000.0) {\\n gl_Position = vec4(v_center, 0.0, 1.0);\\n }\\n}\\n\\n\\n' :\n 'varying vec2 a;varying vec2 b;varying float c;varying float d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;void main(void){mat4 offsetMatrix=i*j;a=vec4(h*vec4(e,0.0,1.0)).xy;d=l;float lineWidth=k*l;c=lineWidth/2.0;if(lineWidth==0.0){lineWidth=2.0*l;}vec2 offset;float radius=g+3.0*l;if(f==0.0){offset=vec2(-1.0,1.0);}else if(f==1.0){offset=vec2(-1.0,-1.0);}else if(f==2.0){offset=vec2(1.0,-1.0);}else{offset=vec2(1.0,1.0);}gl_Position=h*vec4(e+offset*radius,0.0,1.0)+offsetMatrix*vec4(offset*lineWidth,0.0,0.0);b=vec4(h*vec4(e.x+g,e.y,0.0,1.0)).xy;if(distance(a,b)>20000.0){gl_Position=vec4(a,0.0,1.0);}}');\n\n//# sourceMappingURL=defaultshader.js.map","/**\n * @module ol/render/webgl/circlereplay/defaultshader/Locations\n */\n// This file is automatically generated, do not edit\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../../../webgl.js';\n\nvar Locations = function Locations(gl, program) {\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_projectionMatrix = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_offsetScaleMatrix = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_offsetRotateMatrix = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_lineWidth = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_lineWidth' : 'k');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_pixelRatio = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_pixelRatio' : 'l');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_opacity = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_opacity' : 'm');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_fillColor = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_fillColor' : 'n');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_strokeColor = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_strokeColor' : 'o');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_size = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_size' : 'p');\n\n /**\n * @type {number}\n */\n this.a_position = gl.getAttribLocation(\n program, DEBUG_WEBGL ? 'a_position' : 'e');\n\n /**\n * @type {number}\n */\n this.a_instruction = gl.getAttribLocation(\n program, DEBUG_WEBGL ? 'a_instruction' : 'f');\n\n /**\n * @type {number}\n */\n this.a_radius = gl.getAttribLocation(\n program, DEBUG_WEBGL ? 'a_radius' : 'g');\n\n};\n\nexport default Locations;\n\n//# sourceMappingURL=Locations.js.map","/**\n * @module ol/vec/mat4\n */\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/**\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//# sourceMappingURL=mat4.js.map","/**\n * @module ol/render/webgl/Replay\n */\nimport {abstract} from '../../util.js';\nimport {getCenter} from '../../extent.js';\nimport VectorContext from '../VectorContext.js';\nimport {\n create as createTransform,\n reset as resetTransform,\n rotate as rotateTransform,\n scale as scaleTransform,\n translate as translateTransform\n} from '../../transform.js';\nimport {create, fromTransform} from '../../vec/mat4.js';\nimport {ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER, TRIANGLES,\n UNSIGNED_INT, UNSIGNED_SHORT} from '../../webgl.js';\n\nvar WebGLReplay = /*@__PURE__*/(function (VectorContext) {\n function WebGLReplay(tolerance, maxExtent) {\n VectorContext.call(this);\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 * The origin of the coordinate system for the point coordinates sent to\n * the GPU. To eliminate jitter caused by precision problems in the GPU\n * we use the \"Rendering Relative to Eye\" technique described in the \"3D\n * Engine Design for Virtual Globes\" book.\n * @protected\n * @type {import(\"../../coordinate.js\").Coordinate}\n */\n this.origin = getCenter(maxExtent);\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.projectionMatrix_ = createTransform();\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 * @protected\n * @type {Array<number>}\n */\n this.indices = [];\n\n /**\n * @protected\n * @type {?import(\"../../webgl/Buffer.js\").default}\n */\n this.indicesBuffer = null;\n\n /**\n * Start index per feature (the index).\n * @protected\n * @type {Array<number>}\n */\n this.startIndices = [];\n\n /**\n * Start index per feature (the feature).\n * @protected\n * @type {Array<import(\"../../Feature.js\").default|import(\"../Feature.js\").default>}\n */\n this.startIndicesFeature = [];\n\n /**\n * @protected\n * @type {Array<number>}\n */\n this.vertices = [];\n\n /**\n * @protected\n * @type {?import(\"../../webgl/Buffer.js\").default}\n */\n this.verticesBuffer = null;\n\n /**\n * Optional parameter for PolygonReplay instances.\n * @protected\n * @type {import(\"./LineStringReplay.js\").default|undefined}\n */\n this.lineStringReplay = undefined;\n\n }\n\n if ( VectorContext ) WebGLReplay.__proto__ = VectorContext;\n WebGLReplay.prototype = Object.create( VectorContext && VectorContext.prototype );\n WebGLReplay.prototype.constructor = WebGLReplay;\n\n /**\n * @abstract\n * @param {import(\"../../webgl/Context.js\").default} context WebGL context.\n * @return {function()} Delete resources function.\n */\n WebGLReplay.prototype.getDeleteResourcesFunction = function getDeleteResourcesFunction (context) {\n return abstract();\n };\n\n /**\n * @abstract\n * @param {import(\"../../webgl/Context.js\").default} context Context.\n */\n WebGLReplay.prototype.finish = function finish (context) {\n abstract();\n };\n\n /**\n * @abstract\n * @protected\n * @param {WebGLRenderingContext} gl gl.\n * @param {import(\"../../webgl/Context.js\").default} context Context.\n * @param {import(\"../../size.js\").Size} size Size.\n * @param {number} pixelRatio Pixel ratio.\n * @return {import(\"./circlereplay/defaultshader/Locations.js\").default|\n import(\"./linestringreplay/defaultshader/Locations.js\").default|\n import(\"./polygonreplay/defaultshader/Locations.js\").default|\n import(\"./texturereplay/defaultshader/Locations.js\").default} Locations.\n */\n WebGLReplay.prototype.setUpProgram = function setUpProgram (gl, context, size, pixelRatio) {\n return abstract();\n };\n\n /**\n * @abstract\n * @protected\n * @param {WebGLRenderingContext} gl gl.\n * @param {import(\"./circlereplay/defaultshader/Locations.js\").default|\n import(\"./linestringreplay/defaultshader/Locations.js\").default|\n import(\"./polygonreplay/defaultshader/Locations.js\").default|\n import(\"./texturereplay/defaultshader/Locations.js\").default} locations Locations.\n */\n WebGLReplay.prototype.shutDownProgram = function shutDownProgram (gl, locations) {\n abstract();\n };\n\n /**\n * @abstract\n * @protected\n * @param {WebGLRenderingContext} gl gl.\n * @param {import(\"../../webgl/Context.js\").default} context Context.\n * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n * @param {boolean} hitDetection Hit detection mode.\n */\n WebGLReplay.prototype.drawReplay = function drawReplay (gl, context, skippedFeaturesHash, hitDetection) {\n abstract();\n };\n\n /**\n * @abstract\n * @protected\n * @param {WebGLRenderingContext} gl gl.\n * @param {import(\"../../webgl/Context.js\").default} context Context.\n * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T|undefined} featureCallback Feature callback.\n * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Hit extent: Only features intersecting this extent are checked.\n * @return {T|undefined} Callback result.\n * @template T\n */\n WebGLReplay.prototype.drawHitDetectionReplayOneByOne = function drawHitDetectionReplayOneByOne (gl, context, skippedFeaturesHash, featureCallback, opt_hitExtent) {\n return abstract();\n };\n\n /**\n * @protected\n * @param {WebGLRenderingContext} gl gl.\n * @param {import(\"../../webgl/Context.js\").default} context Context.\n * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T|undefined} featureCallback Feature callback.\n * @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.\n * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Hit extent: Only features intersecting this extent are checked.\n * @return {T|undefined} Callback result.\n * @template T\n */\n WebGLReplay.prototype.drawHitDetectionReplay = function drawHitDetectionReplay (gl, context, skippedFeaturesHash, featureCallback, oneByOne, opt_hitExtent) {\n if (!oneByOne) {\n // draw all hit-detection features in \"once\" (by texture group)\n return this.drawHitDetectionReplayAll(gl, context,\n skippedFeaturesHash, featureCallback);\n } else {\n // draw hit-detection features one by one\n return this.drawHitDetectionReplayOneByOne(gl, context,\n skippedFeaturesHash, featureCallback, opt_hitExtent);\n }\n };\n\n /**\n * @protected\n * @param {WebGLRenderingContext} gl gl.\n * @param {import(\"../../webgl/Context.js\").default} context Context.\n * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T|undefined} featureCallback Feature callback.\n * @return {T|undefined} Callback result.\n * @template T\n */\n WebGLReplay.prototype.drawHitDetectionReplayAll = function drawHitDetectionReplayAll (gl, context, skippedFeaturesHash, featureCallback) {\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n this.drawReplay(gl, context, skippedFeaturesHash, true);\n\n var result = featureCallback(null);\n if (result) {\n return result;\n } else {\n return undefined;\n }\n };\n\n /**\n * @param {import(\"../../webgl/Context.js\").default} context Context.\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 {number} pixelRatio Pixel ratio.\n * @param {number} opacity Global opacity.\n * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T|undefined} featureCallback Feature callback.\n * @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.\n * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Hit extent: Only features intersecting this extent are checked.\n * @return {T|undefined} Callback result.\n * @template T\n */\n WebGLReplay.prototype.replay = function replay (\n context,\n center,\n resolution,\n rotation,\n size,\n pixelRatio,\n opacity,\n skippedFeaturesHash,\n featureCallback,\n oneByOne,\n opt_hitExtent\n ) {\n var gl = context.getGL();\n var tmpStencil, tmpStencilFunc, tmpStencilMaskVal, tmpStencilRef, tmpStencilMask,\n tmpStencilOpFail, tmpStencilOpPass, tmpStencilOpZFail;\n\n if (this.lineStringReplay) {\n tmpStencil = gl.isEnabled(gl.STENCIL_TEST);\n tmpStencilFunc = gl.getParameter(gl.STENCIL_FUNC);\n tmpStencilMaskVal = gl.getParameter(gl.STENCIL_VALUE_MASK);\n tmpStencilRef = gl.getParameter(gl.STENCIL_REF);\n tmpStencilMask = gl.getParameter(gl.STENCIL_WRITEMASK);\n tmpStencilOpFail = gl.getParameter(gl.STENCIL_FAIL);\n tmpStencilOpPass = gl.getParameter(gl.STENCIL_PASS_DEPTH_PASS);\n tmpStencilOpZFail = gl.getParameter(gl.STENCIL_PASS_DEPTH_FAIL);\n\n gl.enable(gl.STENCIL_TEST);\n gl.clear(gl.STENCIL_BUFFER_BIT);\n gl.stencilMask(255);\n gl.stencilFunc(gl.ALWAYS, 1, 255);\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.REPLACE);\n\n this.lineStringReplay.replay(context,\n center, resolution, rotation, size, pixelRatio,\n opacity, skippedFeaturesHash,\n featureCallback, oneByOne, opt_hitExtent);\n\n gl.stencilMask(0);\n gl.stencilFunc(gl.NOTEQUAL, 1, 255);\n }\n\n context.bindBuffer(ARRAY_BUFFER, this.verticesBuffer);\n\n context.bindBuffer(ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n\n var locations = this.setUpProgram(gl, context, size, pixelRatio);\n\n // set the \"uniform\" values\n var projectionMatrix = resetTransform(this.projectionMatrix_);\n scaleTransform(projectionMatrix, 2 / (resolution * size[0]), 2 / (resolution * size[1]));\n rotateTransform(projectionMatrix, -rotation);\n translateTransform(projectionMatrix, -(center[0] - this.origin[0]), -(center[1] - this.origin[1]));\n\n var offsetScaleMatrix = resetTransform(this.offsetScaleMatrix_);\n scaleTransform(offsetScaleMatrix, 2 / size[0], 2 / size[1]);\n\n var offsetRotateMatrix = resetTransform(this.offsetRotateMatrix_);\n if (rotation !== 0) {\n rotateTransform(offsetRotateMatrix, -rotation);\n }\n\n gl.uniformMatrix4fv(locations.u_projectionMatrix, false,\n fromTransform(this.tmpMat4_, projectionMatrix));\n gl.uniformMatrix4fv(locations.u_offsetScaleMatrix, false,\n fromTransform(this.tmpMat4_, offsetScaleMatrix));\n gl.uniformMatrix4fv(locations.u_offsetRotateMatrix, false,\n fromTransform(this.tmpMat4_, offsetRotateMatrix));\n gl.uniform1f(locations.u_opacity, opacity);\n\n // draw!\n var result;\n if (featureCallback === undefined) {\n this.drawReplay(gl, context, skippedFeaturesHash, false);\n } else {\n // draw feature by feature for the hit-detection\n result = this.drawHitDetectionReplay(gl, context, skippedFeaturesHash,\n featureCallback, oneByOne, opt_hitExtent);\n }\n\n // disable the vertex attrib arrays\n this.shutDownProgram(gl, locations);\n\n if (this.lineStringReplay) {\n if (!tmpStencil) {\n gl.disable(gl.STENCIL_TEST);\n }\n gl.clear(gl.STENCIL_BUFFER_BIT);\n gl.stencilFunc(/** @type {number} */ (tmpStencilFunc),\n /** @type {number} */ (tmpStencilRef), /** @type {number} */ (tmpStencilMaskVal));\n gl.stencilMask(/** @type {number} */ (tmpStencilMask));\n gl.stencilOp(/** @type {number} */ (tmpStencilOpFail),\n /** @type {number} */ (tmpStencilOpZFail), /** @type {number} */ (tmpStencilOpPass));\n }\n\n return result;\n };\n\n /**\n * @protected\n * @param {WebGLRenderingContext} gl gl.\n * @param {import(\"../../webgl/Context.js\").default} context Context.\n * @param {number} start Start index.\n * @param {number} end End index.\n */\n WebGLReplay.prototype.drawElements = function drawElements (gl, context, start, end) {\n var elementType = context.hasOESElementIndexUint ?\n UNSIGNED_INT : UNSIGNED_SHORT;\n var elementSize = context.hasOESElementIndexUint ? 4 : 2;\n\n var numItems = end - start;\n var offsetInBytes = start * elementSize;\n gl.drawElements(TRIANGLES, numItems, elementType, offsetInBytes);\n };\n\n return WebGLReplay;\n}(VectorContext));\n\n\nexport default WebGLReplay;\n\n//# sourceMappingURL=Replay.js.map","/**\n * @module ol/render/webgl\n */\n\n\n/**\n * @const\n * @type {string}\n */\nexport var DEFAULT_FONT = '10px sans-serif';\n\n\n/**\n * @const\n * @type {import(\"../color.js\").Color}\n */\nexport var DEFAULT_FILLSTYLE = [0.0, 0.0, 0.0, 1.0];\n\n\n/**\n * @const\n * @type {string}\n */\nexport var DEFAULT_LINECAP = 'round';\n\n\n/**\n * @const\n * @type {Array<number>}\n */\nexport var DEFAULT_LINEDASH = [];\n\n\n/**\n * @const\n * @type {number}\n */\nexport var DEFAULT_LINEDASHOFFSET = 0;\n\n\n/**\n * @const\n * @type {string}\n */\nexport var DEFAULT_LINEJOIN = 'round';\n\n\n/**\n * @const\n * @type {number}\n */\nexport var DEFAULT_MITERLIMIT = 10;\n\n/**\n * @const\n * @type {import(\"../color.js\").Color}\n */\nexport var DEFAULT_STROKESTYLE = [0.0, 0.0, 0.0, 1.0];\n\n\n/**\n * @const\n * @type {number}\n */\nexport var DEFAULT_TEXTALIGN = 0.5;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var DEFAULT_TEXTBASELINE = 0.5;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var DEFAULT_LINEWIDTH = 1;\n\n/**\n * @const\n * @type {number}\n */\nexport var EPSILON = Number.EPSILON || 2.220446049250313e-16;\n\n/**\n * Calculates the orientation of a triangle based on the determinant method.\n * @param {number} x1 First X coordinate.\n * @param {number} y1 First Y coordinate.\n * @param {number} x2 Second X coordinate.\n * @param {number} y2 Second Y coordinate.\n * @param {number} x3 Third X coordinate.\n * @param {number} y3 Third Y coordinate.\n * @return {boolean|undefined} Triangle is clockwise.\n */\nexport var triangleIsCounterClockwise = function(x1, y1, x2, y2, x3, y3) {\n var area = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);\n return (area <= EPSILON && area >= -EPSILON) ?\n undefined : area > 0;\n};\n\n\n//# sourceMappingURL=webgl.js.map","/**\n * @module ol/webgl/Buffer\n */\nimport {STATIC_DRAW, STREAM_DRAW, DYNAMIC_DRAW} from '../webgl.js';\n\n/**\n * @enum {number}\n */\nvar BufferUsage = {\n STATIC_DRAW: STATIC_DRAW,\n STREAM_DRAW: STREAM_DRAW,\n DYNAMIC_DRAW: DYNAMIC_DRAW\n};\n\n\nvar WebGLBuffer = function WebGLBuffer(opt_arr, opt_usage) {\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.arr_ = opt_arr !== undefined ? opt_arr : [];\n\n /**\n * @private\n * @type {number}\n */\n this.usage_ = opt_usage !== undefined ? opt_usage : BufferUsage.STATIC_DRAW;\n\n};\n\n/**\n * @return {Array<number>} Array.\n */\nWebGLBuffer.prototype.getArray = function getArray () {\n return this.arr_;\n};\n\n/**\n * @return {number} Usage.\n */\nWebGLBuffer.prototype.getUsage = function getUsage () {\n return this.usage_;\n};\n\nexport default WebGLBuffer;\n\n//# sourceMappingURL=Buffer.js.map","/**\n * @module ol/render/webgl/CircleReplay\n */\nimport {getUid} from '../../util.js';\nimport {equals} from '../../array.js';\nimport {asArray} from '../../color.js';\nimport {intersects} from '../../extent.js';\nimport {isEmpty} from '../../obj.js';\nimport {translate} from '../../geom/flat/transform.js';\nimport {fragment, vertex} from './circlereplay/defaultshader.js';\nimport Locations from './circlereplay/defaultshader/Locations.js';\nimport WebGLReplay from './Replay.js';\nimport {DEFAULT_LINEDASH, DEFAULT_LINEDASHOFFSET, DEFAULT_STROKESTYLE,\n DEFAULT_FILLSTYLE, DEFAULT_LINEWIDTH} from '../webgl.js';\nimport {FLOAT} from '../../webgl.js';\nimport WebGLBuffer from '../../webgl/Buffer.js';\n\nvar WebGLCircleReplay = /*@__PURE__*/(function (WebGLReplay) {\n function WebGLCircleReplay(tolerance, maxExtent) {\n WebGLReplay.call(this, tolerance, maxExtent);\n\n /**\n * @private\n * @type {import(\"./circlereplay/defaultshader/Locations.js\").default}\n */\n this.defaultLocations_ = null;\n\n /**\n * @private\n * @type {Array<Array<Array<number>|number>>}\n */\n this.styles_ = [];\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.styleIndices_ = [];\n\n /**\n * @private\n * @type {number}\n */\n this.radius_ = 0;\n\n /**\n * @private\n * @type {{fillColor: (Array<number>|null),\n * strokeColor: (Array<number>|null),\n * lineDash: Array<number>,\n * lineDashOffset: (number|undefined),\n * lineWidth: (number|undefined),\n * changed: boolean}|null}\n */\n this.state_ = {\n fillColor: null,\n strokeColor: null,\n lineDash: null,\n lineDashOffset: undefined,\n lineWidth: undefined,\n changed: false\n };\n\n }\n\n if ( WebGLReplay ) WebGLCircleReplay.__proto__ = WebGLReplay;\n WebGLCircleReplay.prototype = Object.create( WebGLReplay && WebGLReplay.prototype );\n WebGLCircleReplay.prototype.constructor = WebGLCircleReplay;\n\n /**\n * @private\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n */\n WebGLCircleReplay.prototype.drawCoordinates_ = function drawCoordinates_ (flatCoordinates, offset, end, stride) {\n var numVertices = this.vertices.length;\n var numIndices = this.indices.length;\n var n = numVertices / 4;\n var i, ii;\n for (i = offset, ii = end; i < ii; i += stride) {\n this.vertices[numVertices++] = flatCoordinates[i];\n this.vertices[numVertices++] = flatCoordinates[i + 1];\n this.vertices[numVertices++] = 0;\n this.vertices[numVertices++] = this.radius_;\n\n this.vertices[numVertices++] = flatCoordinates[i];\n this.vertices[numVertices++] = flatCoordinates[i + 1];\n this.vertices[numVertices++] = 1;\n this.vertices[numVertices++] = this.radius_;\n\n this.vertices[numVertices++] = flatCoordinates[i];\n this.vertices[numVertices++] = flatCoordinates[i + 1];\n this.vertices[numVertices++] = 2;\n this.vertices[numVertices++] = this.radius_;\n\n this.vertices[numVertices++] = flatCoordinates[i];\n this.vertices[numVertices++] = flatCoordinates[i + 1];\n this.vertices[numVertices++] = 3;\n this.vertices[numVertices++] = this.radius_;\n\n this.indices[numIndices++] = n;\n this.indices[numIndices++] = n + 1;\n this.indices[numIndices++] = n + 2;\n\n this.indices[numIndices++] = n + 2;\n this.indices[numIndices++] = n + 3;\n this.indices[numIndices++] = n;\n\n n += 4;\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLCircleReplay.prototype.drawCircle = function drawCircle (circleGeometry, feature) {\n var radius = circleGeometry.getRadius();\n var stride = circleGeometry.getStride();\n if (radius) {\n this.startIndices.push(this.indices.length);\n this.startIndicesFeature.push(feature);\n if (this.state_.changed) {\n this.styleIndices_.push(this.indices.length);\n this.state_.changed = false;\n }\n\n this.radius_ = radius;\n var flatCoordinates = circleGeometry.getFlatCoordinates();\n flatCoordinates = translate(flatCoordinates, 0, 2,\n stride, -this.origin[0], -this.origin[1]);\n this.drawCoordinates_(flatCoordinates, 0, 2, stride);\n } else {\n if (this.state_.changed) {\n this.styles_.pop();\n if (this.styles_.length) {\n var lastState = this.styles_[this.styles_.length - 1];\n this.state_.fillColor = /** @type {Array<number>} */ (lastState[0]);\n this.state_.strokeColor = /** @type {Array<number>} */ (lastState[1]);\n this.state_.lineWidth = /** @type {number} */ (lastState[2]);\n this.state_.changed = false;\n }\n }\n }\n };\n\n /**\n * @inheritDoc\n **/\n WebGLCircleReplay.prototype.finish = function finish (context) {\n // create, bind, and populate the vertices buffer\n this.verticesBuffer = new WebGLBuffer(this.vertices);\n\n // create, bind, and populate the indices buffer\n this.indicesBuffer = new WebGLBuffer(this.indices);\n\n this.startIndices.push(this.indices.length);\n\n //Clean up, if there is nothing to draw\n if (this.styleIndices_.length === 0 && this.styles_.length > 0) {\n this.styles_ = [];\n }\n\n this.vertices = null;\n this.indices = null;\n };\n\n /**\n * @inheritDoc\n */\n WebGLCircleReplay.prototype.getDeleteResourcesFunction = function getDeleteResourcesFunction (context) {\n // We only delete our stuff here. The shaders and the program may\n // be used by other CircleReplay instances (for other layers). And\n // they will be deleted when disposing of the import(\"../../webgl/Context.js\").WebGLContext\n // object.\n var verticesBuffer = this.verticesBuffer;\n var indicesBuffer = this.indicesBuffer;\n return function() {\n context.deleteBuffer(verticesBuffer);\n context.deleteBuffer(indicesBuffer);\n };\n };\n\n /**\n * @inheritDoc\n */\n WebGLCircleReplay.prototype.setUpProgram = function setUpProgram (gl, context, size, pixelRatio) {\n // get the program\n var program = context.getProgram(fragment, vertex);\n\n // get the locations\n var locations;\n if (!this.defaultLocations_) {\n locations = new Locations(gl, program);\n this.defaultLocations_ = locations;\n } else {\n locations = this.defaultLocations_;\n }\n\n context.useProgram(program);\n\n // enable the vertex attrib arrays\n gl.enableVertexAttribArray(locations.a_position);\n gl.vertexAttribPointer(locations.a_position, 2, FLOAT,\n false, 16, 0);\n\n gl.enableVertexAttribArray(locations.a_instruction);\n gl.vertexAttribPointer(locations.a_instruction, 1, FLOAT,\n false, 16, 8);\n\n gl.enableVertexAttribArray(locations.a_radius);\n gl.vertexAttribPointer(locations.a_radius, 1, FLOAT,\n false, 16, 12);\n\n // Enable renderer specific uniforms.\n gl.uniform2fv(locations.u_size, size);\n gl.uniform1f(locations.u_pixelRatio, pixelRatio);\n\n return locations;\n };\n\n /**\n * @inheritDoc\n */\n WebGLCircleReplay.prototype.shutDownProgram = function shutDownProgram (gl, locations) {\n gl.disableVertexAttribArray(locations.a_position);\n gl.disableVertexAttribArray(locations.a_instruction);\n gl.disableVertexAttribArray(locations.a_radius);\n };\n\n /**\n * @inheritDoc\n */\n WebGLCircleReplay.prototype.drawReplay = function drawReplay (gl, context, skippedFeaturesHash, hitDetection) {\n if (!isEmpty(skippedFeaturesHash)) {\n this.drawReplaySkipping_(gl, context, skippedFeaturesHash);\n } else {\n //Draw by style groups to minimize drawElements() calls.\n var i, start, end, nextStyle;\n end = this.startIndices[this.startIndices.length - 1];\n for (i = this.styleIndices_.length - 1; i >= 0; --i) {\n start = this.styleIndices_[i];\n nextStyle = this.styles_[i];\n this.setFillStyle_(gl, /** @type {Array<number>} */ (nextStyle[0]));\n this.setStrokeStyle_(gl, /** @type {Array<number>} */ (nextStyle[1]),\n /** @type {number} */ (nextStyle[2]));\n this.drawElements(gl, context, start, end);\n end = start;\n }\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLCircleReplay.prototype.drawHitDetectionReplayOneByOne = function drawHitDetectionReplayOneByOne (gl, context, skippedFeaturesHash, featureCallback, opt_hitExtent) {\n var i, start, end, nextStyle, groupStart, feature, featureIndex;\n featureIndex = this.startIndices.length - 2;\n end = this.startIndices[featureIndex + 1];\n for (i = this.styleIndices_.length - 1; i >= 0; --i) {\n nextStyle = this.styles_[i];\n this.setFillStyle_(gl, /** @type {Array<number>} */ (nextStyle[0]));\n this.setStrokeStyle_(gl, /** @type {Array<number>} */ (nextStyle[1]),\n /** @type {number} */ (nextStyle[2]));\n groupStart = this.styleIndices_[i];\n\n while (featureIndex >= 0 &&\n this.startIndices[featureIndex] >= groupStart) {\n start = this.startIndices[featureIndex];\n feature = this.startIndicesFeature[featureIndex];\n\n if (skippedFeaturesHash[getUid(feature)] === undefined &&\n feature.getGeometry() &&\n (opt_hitExtent === undefined || intersects(\n /** @type {Array<number>} */ (opt_hitExtent),\n feature.getGeometry().getExtent()))) {\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n this.drawElements(gl, context, start, end);\n\n var result = featureCallback(feature);\n\n if (result) {\n return result;\n }\n\n }\n featureIndex--;\n end = start;\n }\n }\n return undefined;\n };\n\n /**\n * @private\n * @param {WebGLRenderingContext} gl gl.\n * @param {import(\"../../webgl/Context.js\").default} context Context.\n * @param {Object} skippedFeaturesHash Ids of features to skip.\n */\n WebGLCircleReplay.prototype.drawReplaySkipping_ = function drawReplaySkipping_ (gl, context, skippedFeaturesHash) {\n var i, start, end, nextStyle, groupStart, feature, featureIndex, featureStart;\n featureIndex = this.startIndices.length - 2;\n end = start = this.startIndices[featureIndex + 1];\n for (i = this.styleIndices_.length - 1; i >= 0; --i) {\n nextStyle = this.styles_[i];\n this.setFillStyle_(gl, /** @type {Array<number>} */ (nextStyle[0]));\n this.setStrokeStyle_(gl, /** @type {Array<number>} */ (nextStyle[1]),\n /** @type {number} */ (nextStyle[2]));\n groupStart = this.styleIndices_[i];\n\n while (featureIndex >= 0 &&\n this.startIndices[featureIndex] >= groupStart) {\n featureStart = this.startIndices[featureIndex];\n feature = this.startIndicesFeature[featureIndex];\n\n if (skippedFeaturesHash[getUid(feature)]) {\n if (start !== end) {\n this.drawElements(gl, context, start, end);\n }\n end = featureStart;\n }\n featureIndex--;\n start = featureStart;\n }\n if (start !== end) {\n this.drawElements(gl, context, start, end);\n }\n start = end = groupStart;\n }\n };\n\n /**\n * @private\n * @param {WebGLRenderingContext} gl gl.\n * @param {Array<number>} color Color.\n */\n WebGLCircleReplay.prototype.setFillStyle_ = function setFillStyle_ (gl, color) {\n gl.uniform4fv(this.defaultLocations_.u_fillColor, color);\n };\n\n /**\n * @private\n * @param {WebGLRenderingContext} gl gl.\n * @param {Array<number>} color Color.\n * @param {number} lineWidth Line width.\n */\n WebGLCircleReplay.prototype.setStrokeStyle_ = function setStrokeStyle_ (gl, color, lineWidth) {\n gl.uniform4fv(this.defaultLocations_.u_strokeColor, color);\n gl.uniform1f(this.defaultLocations_.u_lineWidth, lineWidth);\n };\n\n /**\n * @inheritDoc\n */\n WebGLCircleReplay.prototype.setFillStrokeStyle = function setFillStrokeStyle (fillStyle, strokeStyle) {\n var strokeStyleColor, strokeStyleWidth;\n if (strokeStyle) {\n var strokeStyleLineDash = strokeStyle.getLineDash();\n this.state_.lineDash = strokeStyleLineDash ?\n strokeStyleLineDash : DEFAULT_LINEDASH;\n var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n this.state_.lineDashOffset = strokeStyleLineDashOffset ?\n strokeStyleLineDashOffset : DEFAULT_LINEDASHOFFSET;\n strokeStyleColor = strokeStyle.getColor();\n if (!(strokeStyleColor instanceof CanvasGradient) &&\n !(strokeStyleColor instanceof CanvasPattern)) {\n strokeStyleColor = asArray(strokeStyleColor).map(function(c, i) {\n return i != 3 ? c / 255 : c;\n }) || DEFAULT_STROKESTYLE;\n } else {\n strokeStyleColor = DEFAULT_STROKESTYLE;\n }\n strokeStyleWidth = strokeStyle.getWidth();\n strokeStyleWidth = strokeStyleWidth !== undefined ?\n strokeStyleWidth : DEFAULT_LINEWIDTH;\n } else {\n strokeStyleColor = [0, 0, 0, 0];\n strokeStyleWidth = 0;\n }\n var fillStyleColor = fillStyle ? fillStyle.getColor() : [0, 0, 0, 0];\n if (!(fillStyleColor instanceof CanvasGradient) &&\n !(fillStyleColor instanceof CanvasPattern)) {\n fillStyleColor = asArray(fillStyleColor).map(function(c, i) {\n return i != 3 ? c / 255 : c;\n }) || DEFAULT_FILLSTYLE;\n } else {\n fillStyleColor = DEFAULT_FILLSTYLE;\n }\n if (!this.state_.strokeColor || !equals(this.state_.strokeColor, strokeStyleColor) ||\n !this.state_.fillColor || !equals(this.state_.fillColor, fillStyleColor) ||\n this.state_.lineWidth !== strokeStyleWidth) {\n this.state_.changed = true;\n this.state_.fillColor = fillStyleColor;\n this.state_.strokeColor = strokeStyleColor;\n this.state_.lineWidth = strokeStyleWidth;\n this.styles_.push([fillStyleColor, strokeStyleColor, strokeStyleWidth]);\n }\n };\n\n return WebGLCircleReplay;\n}(WebGLReplay));\n\n\nexport default WebGLCircleReplay;\n\n//# sourceMappingURL=CircleReplay.js.map","/**\n * @module ol/render/webgl/texturereplay/defaultshader\n */\n// This file is automatically generated, do not edit.\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../../webgl.js';\nimport WebGLFragment from '../../../webgl/Fragment.js';\nimport WebGLVertex from '../../../webgl/Vertex.js';\n\nexport var fragment = new WebGLFragment(DEBUG_WEBGL ?\n 'precision mediump float;\\nvarying vec2 v_texCoord;\\nvarying float v_opacity;\\n\\nuniform float u_opacity;\\nuniform sampler2D u_image;\\n\\nvoid main(void) {\\n vec4 texColor = texture2D(u_image, v_texCoord);\\n gl_FragColor.rgb = texColor.rgb;\\n float alpha = texColor.a * v_opacity * u_opacity;\\n if (alpha == 0.0) {\\n discard;\\n }\\n gl_FragColor.a = alpha;\\n}\\n' :\n 'precision mediump float;varying vec2 a;varying float b;uniform float k;uniform sampler2D l;void main(void){vec4 texColor=texture2D(l,a);gl_FragColor.rgb=texColor.rgb;float alpha=texColor.a*b*k;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}');\n\nexport var vertex = new WebGLVertex(DEBUG_WEBGL ?\n 'varying vec2 v_texCoord;\\nvarying float v_opacity;\\n\\nattribute vec2 a_position;\\nattribute vec2 a_texCoord;\\nattribute vec2 a_offsets;\\nattribute float a_opacity;\\nattribute float a_rotateWithView;\\n\\nuniform mat4 u_projectionMatrix;\\nuniform mat4 u_offsetScaleMatrix;\\nuniform mat4 u_offsetRotateMatrix;\\n\\nvoid main(void) {\\n mat4 offsetMatrix = u_offsetScaleMatrix;\\n if (a_rotateWithView == 1.0) {\\n offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\\n }\\n vec4 offsets = offsetMatrix * vec4(a_offsets, 0.0, 0.0);\\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\\n v_texCoord = a_texCoord;\\n v_opacity = a_opacity;\\n}\\n\\n\\n' :\n 'varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.0,0.0);gl_Position=h*vec4(c,0.0,1.0)+offsets;a=d;b=f;}');\n\n//# sourceMappingURL=defaultshader.js.map","/**\n * @module ol/render/webgl/texturereplay/defaultshader/Locations\n */\n// This file is automatically generated, do not edit\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../../../webgl.js';\n\nvar Locations = function Locations(gl, program) {\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_projectionMatrix = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_offsetScaleMatrix = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_offsetRotateMatrix = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_opacity = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_opacity' : 'k');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_image = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_image' : 'l');\n\n /**\n * @type {number}\n */\n this.a_position = gl.getAttribLocation(\n program, DEBUG_WEBGL ? 'a_position' : 'c');\n\n /**\n * @type {number}\n */\n this.a_texCoord = gl.getAttribLocation(\n program, DEBUG_WEBGL ? 'a_texCoord' : 'd');\n\n /**\n * @type {number}\n */\n this.a_offsets = gl.getAttribLocation(\n program, DEBUG_WEBGL ? 'a_offsets' : 'e');\n\n /**\n * @type {number}\n */\n this.a_opacity = gl.getAttribLocation(\n program, DEBUG_WEBGL ? 'a_opacity' : 'f');\n\n /**\n * @type {number}\n */\n this.a_rotateWithView = gl.getAttribLocation(\n program, DEBUG_WEBGL ? 'a_rotateWithView' : 'g');\n\n};\n\nexport default Locations;\n\n//# sourceMappingURL=Locations.js.map","/**\n * @module ol/webgl/ContextEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n LOST: 'webglcontextlost',\n RESTORED: 'webglcontextrestored'\n};\n\n//# sourceMappingURL=ContextEventType.js.map","/**\n * @module ol/webgl/Context\n */\nimport {getUid} from '../util.js';\nimport {EXTENSIONS as WEBGL_EXTENSIONS} from '../webgl.js';\nimport Disposable from '../Disposable.js';\nimport {includes} from '../array.js';\nimport {listen, unlistenAll} from '../events.js';\nimport {clear} from '../obj.js';\nimport {ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER, TEXTURE_2D, TEXTURE_WRAP_S, TEXTURE_WRAP_T} from '../webgl.js';\nimport ContextEventType from '../webgl/ContextEventType.js';\n\n\n/**\n * @typedef {Object} BufferCacheEntry\n * @property {import(\"./Buffer.js\").default} buf\n * @property {WebGLBuffer} buffer\n */\n\n\n/**\n * @classdesc\n * A WebGL context for accessing low-level WebGL capabilities.\n */\nvar WebGLContext = /*@__PURE__*/(function (Disposable) {\n function WebGLContext(canvas, gl) {\n Disposable.call(this);\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.canvas_ = canvas;\n\n /**\n * @private\n * @type {WebGLRenderingContext}\n */\n this.gl_ = gl;\n\n /**\n * @private\n * @type {!Object<string, BufferCacheEntry>}\n */\n this.bufferCache_ = {};\n\n /**\n * @private\n * @type {!Object<string, WebGLShader>}\n */\n this.shaderCache_ = {};\n\n /**\n * @private\n * @type {!Object<string, WebGLProgram>}\n */\n this.programCache_ = {};\n\n /**\n * @private\n * @type {WebGLProgram}\n */\n this.currentProgram_ = null;\n\n /**\n * @private\n * @type {WebGLFramebuffer}\n */\n this.hitDetectionFramebuffer_ = null;\n\n /**\n * @private\n * @type {WebGLTexture}\n */\n this.hitDetectionTexture_ = null;\n\n /**\n * @private\n * @type {WebGLRenderbuffer}\n */\n this.hitDetectionRenderbuffer_ = null;\n\n /**\n * @type {boolean}\n */\n this.hasOESElementIndexUint = includes(WEBGL_EXTENSIONS, 'OES_element_index_uint');\n\n // use the OES_element_index_uint extension if available\n if (this.hasOESElementIndexUint) {\n gl.getExtension('OES_element_index_uint');\n }\n\n listen(this.canvas_, ContextEventType.LOST,\n this.handleWebGLContextLost, this);\n listen(this.canvas_, ContextEventType.RESTORED,\n this.handleWebGLContextRestored, this);\n\n }\n\n if ( Disposable ) WebGLContext.__proto__ = Disposable;\n WebGLContext.prototype = Object.create( Disposable && Disposable.prototype );\n WebGLContext.prototype.constructor = WebGLContext;\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 {number} target Target.\n * @param {import(\"./Buffer.js\").default} buf Buffer.\n */\n WebGLContext.prototype.bindBuffer = function bindBuffer (target, buf) {\n var gl = this.getGL();\n var arr = buf.getArray();\n var bufferKey = getUid(buf);\n if (bufferKey in this.bufferCache_) {\n var bufferCacheEntry = this.bufferCache_[bufferKey];\n gl.bindBuffer(target, bufferCacheEntry.buffer);\n } else {\n var buffer = gl.createBuffer();\n gl.bindBuffer(target, buffer);\n var /** @type {ArrayBufferView} */ arrayBuffer;\n if (target == ARRAY_BUFFER) {\n arrayBuffer = new Float32Array(arr);\n } else if (target == ELEMENT_ARRAY_BUFFER) {\n arrayBuffer = this.hasOESElementIndexUint ?\n new Uint32Array(arr) : new Uint16Array(arr);\n }\n gl.bufferData(target, arrayBuffer, buf.getUsage());\n this.bufferCache_[bufferKey] = {\n buf: buf,\n buffer: buffer\n };\n }\n };\n\n /**\n * @param {import(\"./Buffer.js\").default} buf Buffer.\n */\n WebGLContext.prototype.deleteBuffer = function deleteBuffer (buf) {\n var gl = this.getGL();\n var bufferKey = getUid(buf);\n var bufferCacheEntry = this.bufferCache_[bufferKey];\n if (!gl.isContextLost()) {\n gl.deleteBuffer(bufferCacheEntry.buffer);\n }\n delete this.bufferCache_[bufferKey];\n };\n\n /**\n * @inheritDoc\n */\n WebGLContext.prototype.disposeInternal = function disposeInternal () {\n unlistenAll(this.canvas_);\n var gl = this.getGL();\n if (!gl.isContextLost()) {\n for (var key in this.bufferCache_) {\n gl.deleteBuffer(this.bufferCache_[key].buffer);\n }\n for (var key$1 in this.programCache_) {\n gl.deleteProgram(this.programCache_[key$1]);\n }\n for (var key$2 in this.shaderCache_) {\n gl.deleteShader(this.shaderCache_[key$2]);\n }\n // delete objects for hit-detection\n gl.deleteFramebuffer(this.hitDetectionFramebuffer_);\n gl.deleteRenderbuffer(this.hitDetectionRenderbuffer_);\n gl.deleteTexture(this.hitDetectionTexture_);\n }\n };\n\n /**\n * @return {HTMLCanvasElement} Canvas.\n */\n WebGLContext.prototype.getCanvas = function getCanvas () {\n return this.canvas_;\n };\n\n /**\n * Get the WebGL rendering context\n * @return {WebGLRenderingContext} The rendering context.\n * @api\n */\n WebGLContext.prototype.getGL = function getGL () {\n return this.gl_;\n };\n\n /**\n * Get the frame buffer for hit detection.\n * @return {WebGLFramebuffer} The hit detection frame buffer.\n */\n WebGLContext.prototype.getHitDetectionFramebuffer = function getHitDetectionFramebuffer () {\n if (!this.hitDetectionFramebuffer_) {\n this.initHitDetectionFramebuffer_();\n }\n return this.hitDetectionFramebuffer_;\n };\n\n /**\n * Get shader from the cache if it's in the cache. Otherwise, create\n * the WebGL shader, compile it, and add entry to cache.\n * @param {import(\"./Shader.js\").default} shaderObject Shader object.\n * @return {WebGLShader} Shader.\n */\n WebGLContext.prototype.getShader = function getShader (shaderObject) {\n var shaderKey = getUid(shaderObject);\n if (shaderKey in this.shaderCache_) {\n return this.shaderCache_[shaderKey];\n } else {\n var gl = this.getGL();\n var shader = gl.createShader(shaderObject.getType());\n gl.shaderSource(shader, shaderObject.getSource());\n gl.compileShader(shader);\n this.shaderCache_[shaderKey] = shader;\n return shader;\n }\n };\n\n /**\n * Get the program from the cache if it's in the cache. Otherwise create\n * the WebGL program, attach the shaders to it, and add an entry to the\n * cache.\n * @param {import(\"./Fragment.js\").default} fragmentShaderObject Fragment shader.\n * @param {import(\"./Vertex.js\").default} vertexShaderObject Vertex shader.\n * @return {WebGLProgram} Program.\n */\n WebGLContext.prototype.getProgram = function getProgram (fragmentShaderObject, vertexShaderObject) {\n var programKey = getUid(fragmentShaderObject) + '/' + getUid(vertexShaderObject);\n if (programKey in this.programCache_) {\n return this.programCache_[programKey];\n } else {\n var gl = this.getGL();\n var program = gl.createProgram();\n gl.attachShader(program, this.getShader(fragmentShaderObject));\n gl.attachShader(program, this.getShader(vertexShaderObject));\n gl.linkProgram(program);\n this.programCache_[programKey] = program;\n return program;\n }\n };\n\n /**\n * FIXME empty description for jsdoc\n */\n WebGLContext.prototype.handleWebGLContextLost = function handleWebGLContextLost () {\n clear(this.bufferCache_);\n clear(this.shaderCache_);\n clear(this.programCache_);\n this.currentProgram_ = null;\n this.hitDetectionFramebuffer_ = null;\n this.hitDetectionTexture_ = null;\n this.hitDetectionRenderbuffer_ = null;\n };\n\n /**\n * FIXME empty description for jsdoc\n */\n WebGLContext.prototype.handleWebGLContextRestored = function handleWebGLContextRestored () {\n };\n\n /**\n * Creates a 1x1 pixel framebuffer for the hit-detection.\n * @private\n */\n WebGLContext.prototype.initHitDetectionFramebuffer_ = function initHitDetectionFramebuffer_ () {\n var gl = this.gl_;\n var framebuffer = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);\n\n var texture = createEmptyTexture(gl, 1, 1);\n var renderbuffer = gl.createRenderbuffer();\n gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer);\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, 1, 1);\n gl.framebufferTexture2D(\n gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT,\n gl.RENDERBUFFER, renderbuffer);\n\n gl.bindTexture(gl.TEXTURE_2D, null);\n gl.bindRenderbuffer(gl.RENDERBUFFER, null);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\n this.hitDetectionFramebuffer_ = framebuffer;\n this.hitDetectionTexture_ = texture;\n this.hitDetectionRenderbuffer_ = renderbuffer;\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 WebGLContext.prototype.useProgram = function useProgram (program) {\n if (program == this.currentProgram_) {\n return false;\n } else {\n var gl = this.getGL();\n gl.useProgram(program);\n this.currentProgram_ = program;\n return true;\n }\n };\n\n return WebGLContext;\n}(Disposable));\n\n\n/**\n * @param {WebGLRenderingContext} gl WebGL rendering context.\n * @param {number=} opt_wrapS wrapS.\n * @param {number=} opt_wrapT wrapT.\n * @return {WebGLTexture} The texture.\n */\nfunction createTextureInternal(gl, opt_wrapS, opt_wrapT) {\n var texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n\n if (opt_wrapS !== undefined) {\n gl.texParameteri(\n TEXTURE_2D, TEXTURE_WRAP_S, opt_wrapS);\n }\n if (opt_wrapT !== undefined) {\n gl.texParameteri(\n TEXTURE_2D, TEXTURE_WRAP_T, opt_wrapT);\n }\n\n return texture;\n}\n\n\n/**\n * @param {WebGLRenderingContext} gl WebGL rendering context.\n * @param {number} width Width.\n * @param {number} height Height.\n * @param {number=} opt_wrapS wrapS.\n * @param {number=} opt_wrapT wrapT.\n * @return {WebGLTexture} The texture.\n */\nexport function createEmptyTexture(gl, width, height, opt_wrapS, opt_wrapT) {\n var texture = createTextureInternal(gl, opt_wrapS, opt_wrapT);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);\n return texture;\n}\n\n\n/**\n * @param {WebGLRenderingContext} gl WebGL rendering context.\n * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image.\n * @param {number=} opt_wrapS wrapS.\n * @param {number=} opt_wrapT wrapT.\n * @return {WebGLTexture} The texture.\n */\nexport function createTexture(gl, image, opt_wrapS, opt_wrapT) {\n var texture = createTextureInternal(gl, opt_wrapS, opt_wrapT);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);\n return texture;\n}\n\nexport default WebGLContext;\n\n//# sourceMappingURL=Context.js.map","/**\n * @module ol/render/webgl/TextureReplay\n */\nimport {abstract, getUid} from '../../util.js';\nimport {intersects} from '../../extent.js';\nimport {isEmpty} from '../../obj.js';\nimport {fragment, vertex} from './texturereplay/defaultshader.js';\nimport Locations from './texturereplay/defaultshader/Locations.js';\nimport WebGLReplay from './Replay.js';\nimport {CLAMP_TO_EDGE, FLOAT, TEXTURE_2D} from '../../webgl.js';\nimport {createTexture} from '../../webgl/Context.js';\n\nvar WebGLTextureReplay = /*@__PURE__*/(function (WebGLReplay) {\n function WebGLTextureReplay(tolerance, maxExtent) {\n WebGLReplay.call(this, tolerance, maxExtent);\n\n /**\n * @type {number|undefined}\n * @protected\n */\n this.anchorX = undefined;\n\n /**\n * @type {number|undefined}\n * @protected\n */\n this.anchorY = undefined;\n\n /**\n * @type {Array<number>}\n * @protected\n */\n this.groupIndices = [];\n\n /**\n * @type {Array<number>}\n * @protected\n */\n this.hitDetectionGroupIndices = [];\n\n /**\n * @type {number|undefined}\n * @protected\n */\n this.height = undefined;\n\n /**\n * @type {number|undefined}\n * @protected\n */\n this.imageHeight = undefined;\n\n /**\n * @type {number|undefined}\n * @protected\n */\n this.imageWidth = undefined;\n\n /**\n * @protected\n * @type {import(\"./texturereplay/defaultshader/Locations.js\").default}\n */\n this.defaultLocations = null;\n\n /**\n * @protected\n * @type {number|undefined}\n */\n this.opacity = undefined;\n\n /**\n * @type {number|undefined}\n * @protected\n */\n this.originX = undefined;\n\n /**\n * @type {number|undefined}\n * @protected\n */\n this.originY = undefined;\n\n /**\n * @protected\n * @type {boolean|undefined}\n */\n this.rotateWithView = undefined;\n\n /**\n * @protected\n * @type {number|undefined}\n */\n this.rotation = undefined;\n\n /**\n * @protected\n * @type {number|undefined}\n */\n this.scale = undefined;\n\n /**\n * @type {number|undefined}\n * @protected\n */\n this.width = undefined;\n }\n\n if ( WebGLReplay ) WebGLTextureReplay.__proto__ = WebGLReplay;\n WebGLTextureReplay.prototype = Object.create( WebGLReplay && WebGLReplay.prototype );\n WebGLTextureReplay.prototype.constructor = WebGLTextureReplay;\n\n /**\n * @inheritDoc\n */\n WebGLTextureReplay.prototype.getDeleteResourcesFunction = function getDeleteResourcesFunction (context) {\n var verticesBuffer = this.verticesBuffer;\n var indicesBuffer = this.indicesBuffer;\n var textures = this.getTextures(true);\n var gl = context.getGL();\n return function() {\n if (!gl.isContextLost()) {\n var i, ii;\n for (i = 0, ii = textures.length; i < ii; ++i) {\n gl.deleteTexture(textures[i]);\n }\n }\n context.deleteBuffer(verticesBuffer);\n context.deleteBuffer(indicesBuffer);\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 * @return {number} My end.\n * @protected\n */\n WebGLTextureReplay.prototype.drawCoordinates = function drawCoordinates (flatCoordinates, offset, end, stride) {\n var anchorX = /** @type {number} */ (this.anchorX);\n var anchorY = /** @type {number} */ (this.anchorY);\n var height = /** @type {number} */ (this.height);\n var imageHeight = /** @type {number} */ (this.imageHeight);\n var imageWidth = /** @type {number} */ (this.imageWidth);\n var opacity = /** @type {number} */ (this.opacity);\n var originX = /** @type {number} */ (this.originX);\n var originY = /** @type {number} */ (this.originY);\n var rotateWithView = this.rotateWithView ? 1.0 : 0.0;\n // this.rotation_ is anti-clockwise, but rotation is clockwise\n var rotation = /** @type {number} */ (-this.rotation);\n var scale = /** @type {number} */ (this.scale);\n var width = /** @type {number} */ (this.width);\n var cos = Math.cos(rotation);\n var sin = Math.sin(rotation);\n var numIndices = this.indices.length;\n var numVertices = this.vertices.length;\n var i, n, offsetX, offsetY, x, y;\n for (i = offset; i < end; i += stride) {\n x = flatCoordinates[i] - this.origin[0];\n y = flatCoordinates[i + 1] - this.origin[1];\n\n // There are 4 vertices per [x, y] point, one for each corner of the\n // rectangle we're going to draw. We'd use 1 vertex per [x, y] point if\n // WebGL supported Geometry Shaders (which can emit new vertices), but that\n // is not currently the case.\n //\n // And each vertex includes 8 values: the x and y coordinates, the x and\n // y offsets used to calculate the position of the corner, the u and\n // v texture coordinates for the corner, the opacity, and whether the\n // the image should be rotated with the view (rotateWithView).\n\n n = numVertices / 8;\n\n // bottom-left corner\n offsetX = -scale * anchorX;\n offsetY = -scale * (height - anchorY);\n this.vertices[numVertices++] = x;\n this.vertices[numVertices++] = y;\n this.vertices[numVertices++] = offsetX * cos - offsetY * sin;\n this.vertices[numVertices++] = offsetX * sin + offsetY * cos;\n this.vertices[numVertices++] = originX / imageWidth;\n this.vertices[numVertices++] = (originY + height) / imageHeight;\n this.vertices[numVertices++] = opacity;\n this.vertices[numVertices++] = rotateWithView;\n\n // bottom-right corner\n offsetX = scale * (width - anchorX);\n offsetY = -scale * (height - anchorY);\n this.vertices[numVertices++] = x;\n this.vertices[numVertices++] = y;\n this.vertices[numVertices++] = offsetX * cos - offsetY * sin;\n this.vertices[numVertices++] = offsetX * sin + offsetY * cos;\n this.vertices[numVertices++] = (originX + width) / imageWidth;\n this.vertices[numVertices++] = (originY + height) / imageHeight;\n this.vertices[numVertices++] = opacity;\n this.vertices[numVertices++] = rotateWithView;\n\n // top-right corner\n offsetX = scale * (width - anchorX);\n offsetY = scale * anchorY;\n this.vertices[numVertices++] = x;\n this.vertices[numVertices++] = y;\n this.vertices[numVertices++] = offsetX * cos - offsetY * sin;\n this.vertices[numVertices++] = offsetX * sin + offsetY * cos;\n this.vertices[numVertices++] = (originX + width) / imageWidth;\n this.vertices[numVertices++] = originY / imageHeight;\n this.vertices[numVertices++] = opacity;\n this.vertices[numVertices++] = rotateWithView;\n\n // top-left corner\n offsetX = -scale * anchorX;\n offsetY = scale * anchorY;\n this.vertices[numVertices++] = x;\n this.vertices[numVertices++] = y;\n this.vertices[numVertices++] = offsetX * cos - offsetY * sin;\n this.vertices[numVertices++] = offsetX * sin + offsetY * cos;\n this.vertices[numVertices++] = originX / imageWidth;\n this.vertices[numVertices++] = originY / imageHeight;\n this.vertices[numVertices++] = opacity;\n this.vertices[numVertices++] = rotateWithView;\n\n this.indices[numIndices++] = n;\n this.indices[numIndices++] = n + 1;\n this.indices[numIndices++] = n + 2;\n this.indices[numIndices++] = n;\n this.indices[numIndices++] = n + 2;\n this.indices[numIndices++] = n + 3;\n }\n\n return numVertices;\n };\n\n /**\n * @protected\n * @param {Array<WebGLTexture>} textures Textures.\n * @param {Array<HTMLCanvasElement|HTMLImageElement|HTMLVideoElement>} images Images.\n * @param {!Object<string, WebGLTexture>} texturePerImage Texture cache.\n * @param {WebGLRenderingContext} gl Gl.\n */\n WebGLTextureReplay.prototype.createTextures = function createTextures (textures, images, texturePerImage, gl) {\n var texture, image, uid, i;\n var ii = images.length;\n for (i = 0; i < ii; ++i) {\n image = images[i];\n\n uid = getUid(image);\n if (uid in texturePerImage) {\n texture = texturePerImage[uid];\n } else {\n texture = createTexture(\n gl, image, CLAMP_TO_EDGE, CLAMP_TO_EDGE);\n texturePerImage[uid] = texture;\n }\n textures[i] = texture;\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLTextureReplay.prototype.setUpProgram = function setUpProgram (gl, context, size, pixelRatio) {\n // get the program\n var program = context.getProgram(fragment, vertex);\n\n // get the locations\n var locations;\n if (!this.defaultLocations) {\n locations = new Locations(gl, program);\n this.defaultLocations = locations;\n } else {\n locations = this.defaultLocations;\n }\n\n // use the program (FIXME: use the return value)\n context.useProgram(program);\n\n // enable the vertex attrib arrays\n gl.enableVertexAttribArray(locations.a_position);\n gl.vertexAttribPointer(locations.a_position, 2, FLOAT,\n false, 32, 0);\n\n gl.enableVertexAttribArray(locations.a_offsets);\n gl.vertexAttribPointer(locations.a_offsets, 2, FLOAT,\n false, 32, 8);\n\n gl.enableVertexAttribArray(locations.a_texCoord);\n gl.vertexAttribPointer(locations.a_texCoord, 2, FLOAT,\n false, 32, 16);\n\n gl.enableVertexAttribArray(locations.a_opacity);\n gl.vertexAttribPointer(locations.a_opacity, 1, FLOAT,\n false, 32, 24);\n\n gl.enableVertexAttribArray(locations.a_rotateWithView);\n gl.vertexAttribPointer(locations.a_rotateWithView, 1, FLOAT,\n false, 32, 28);\n\n return locations;\n };\n\n /**\n * @inheritDoc\n */\n WebGLTextureReplay.prototype.shutDownProgram = function shutDownProgram (gl, locations) {\n gl.disableVertexAttribArray(locations.a_position);\n gl.disableVertexAttribArray(locations.a_offsets);\n gl.disableVertexAttribArray(locations.a_texCoord);\n gl.disableVertexAttribArray(locations.a_opacity);\n gl.disableVertexAttribArray(locations.a_rotateWithView);\n };\n\n /**\n * @inheritDoc\n */\n WebGLTextureReplay.prototype.drawReplay = function drawReplay (gl, context, skippedFeaturesHash, hitDetection) {\n var textures = hitDetection ? this.getHitDetectionTextures() : this.getTextures();\n var groupIndices = hitDetection ? this.hitDetectionGroupIndices : this.groupIndices;\n\n if (!isEmpty(skippedFeaturesHash)) {\n this.drawReplaySkipping(gl, context, skippedFeaturesHash, textures, groupIndices);\n } else {\n var i, ii, start;\n for (i = 0, ii = textures.length, start = 0; i < ii; ++i) {\n gl.bindTexture(TEXTURE_2D, textures[i]);\n var end = groupIndices[i];\n this.drawElements(gl, context, start, end);\n start = end;\n }\n }\n };\n\n /**\n * Draw the replay while paying attention to skipped features.\n *\n * This functions creates groups of features that can be drawn to together,\n * so that the number of `drawElements` calls is minimized.\n *\n * For example given the following texture groups:\n *\n * Group 1: A B C\n * Group 2: D [E] F G\n *\n * If feature E should be skipped, the following `drawElements` calls will be\n * made:\n *\n * drawElements with feature A, B and C\n * drawElements with feature D\n * drawElements with feature F and G\n *\n * @protected\n * @param {WebGLRenderingContext} gl gl.\n * @param {import(\"../../webgl/Context.js\").default} context Context.\n * @param {Object<string, boolean>} skippedFeaturesHash Ids of features\n * to skip.\n * @param {Array<WebGLTexture>} textures Textures.\n * @param {Array<number>} groupIndices Texture group indices.\n */\n WebGLTextureReplay.prototype.drawReplaySkipping = function drawReplaySkipping (gl, context, skippedFeaturesHash, textures, groupIndices) {\n var featureIndex = 0;\n\n var i, ii;\n for (i = 0, ii = textures.length; i < ii; ++i) {\n gl.bindTexture(TEXTURE_2D, textures[i]);\n var groupStart = (i > 0) ? groupIndices[i - 1] : 0;\n var groupEnd = groupIndices[i];\n\n var start = groupStart;\n var end = groupStart;\n while (featureIndex < this.startIndices.length &&\n this.startIndices[featureIndex] <= groupEnd) {\n var feature = this.startIndicesFeature[featureIndex];\n\n if (skippedFeaturesHash[getUid(feature)] !== undefined) {\n // feature should be skipped\n if (start !== end) {\n // draw the features so far\n this.drawElements(gl, context, start, end);\n }\n // continue with the next feature\n start = (featureIndex === this.startIndices.length - 1) ?\n groupEnd : this.startIndices[featureIndex + 1];\n end = start;\n } else {\n // the feature is not skipped, augment the end index\n end = (featureIndex === this.startIndices.length - 1) ?\n groupEnd : this.startIndices[featureIndex + 1];\n }\n featureIndex++;\n }\n\n if (start !== end) {\n // draw the remaining features (in case there was no skipped feature\n // in this texture group, all features of a group are drawn together)\n this.drawElements(gl, context, start, end);\n }\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLTextureReplay.prototype.drawHitDetectionReplayOneByOne = function drawHitDetectionReplayOneByOne (gl, context, skippedFeaturesHash, featureCallback, opt_hitExtent) {\n var i, groupStart, start, end, feature;\n var featureIndex = this.startIndices.length - 1;\n var hitDetectionTextures = this.getHitDetectionTextures();\n for (i = hitDetectionTextures.length - 1; i >= 0; --i) {\n gl.bindTexture(TEXTURE_2D, hitDetectionTextures[i]);\n groupStart = (i > 0) ? this.hitDetectionGroupIndices[i - 1] : 0;\n end = this.hitDetectionGroupIndices[i];\n\n // draw all features for this texture group\n while (featureIndex >= 0 &&\n this.startIndices[featureIndex] >= groupStart) {\n start = this.startIndices[featureIndex];\n feature = this.startIndicesFeature[featureIndex];\n\n if (skippedFeaturesHash[getUid(feature)] === undefined &&\n feature.getGeometry() &&\n (opt_hitExtent === undefined || intersects(\n /** @type {Array<number>} */ (opt_hitExtent),\n feature.getGeometry().getExtent()))) {\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n this.drawElements(gl, context, start, end);\n\n var result = featureCallback(feature);\n if (result) {\n return result;\n }\n }\n\n end = start;\n featureIndex--;\n }\n }\n return undefined;\n };\n\n /**\n * @inheritDoc\n */\n WebGLTextureReplay.prototype.finish = function finish (context) {\n this.anchorX = undefined;\n this.anchorY = undefined;\n this.height = undefined;\n this.imageHeight = undefined;\n this.imageWidth = undefined;\n this.indices = null;\n this.opacity = undefined;\n this.originX = undefined;\n this.originY = undefined;\n this.rotateWithView = undefined;\n this.rotation = undefined;\n this.scale = undefined;\n this.vertices = null;\n this.width = undefined;\n };\n\n /**\n * @abstract\n * @protected\n * @param {boolean=} opt_all Return hit detection textures with regular ones.\n * @return {Array<WebGLTexture>} Textures.\n */\n WebGLTextureReplay.prototype.getTextures = function getTextures (opt_all) {\n return abstract();\n };\n\n /**\n * @abstract\n * @protected\n * @return {Array<WebGLTexture>} Textures.\n */\n WebGLTextureReplay.prototype.getHitDetectionTextures = function getHitDetectionTextures () {\n return abstract();\n };\n\n return WebGLTextureReplay;\n}(WebGLReplay));\n\n\nexport default WebGLTextureReplay;\n\n//# sourceMappingURL=TextureReplay.js.map","/**\n * @module ol/render/webgl/ImageReplay\n */\nimport {getUid} from '../../util.js';\nimport WebGLTextureReplay from './TextureReplay.js';\nimport WebGLBuffer from '../../webgl/Buffer.js';\n\nvar WebGLImageReplay = /*@__PURE__*/(function (WebGLTextureReplay) {\n function WebGLImageReplay(tolerance, maxExtent) {\n WebGLTextureReplay.call(this, tolerance, maxExtent);\n\n /**\n * @type {Array<HTMLCanvasElement|HTMLImageElement|HTMLVideoElement>}\n * @protected\n */\n this.images_ = [];\n\n /**\n * @type {Array<HTMLCanvasElement|HTMLImageElement|HTMLVideoElement>}\n * @protected\n */\n this.hitDetectionImages_ = [];\n\n /**\n * @type {Array<WebGLTexture>}\n * @private\n */\n this.textures_ = [];\n\n /**\n * @type {Array<WebGLTexture>}\n * @private\n */\n this.hitDetectionTextures_ = [];\n\n }\n\n if ( WebGLTextureReplay ) WebGLImageReplay.__proto__ = WebGLTextureReplay;\n WebGLImageReplay.prototype = Object.create( WebGLTextureReplay && WebGLTextureReplay.prototype );\n WebGLImageReplay.prototype.constructor = WebGLImageReplay;\n\n /**\n * @inheritDoc\n */\n WebGLImageReplay.prototype.drawMultiPoint = function drawMultiPoint (multiPointGeometry, feature) {\n this.startIndices.push(this.indices.length);\n this.startIndicesFeature.push(feature);\n var flatCoordinates = multiPointGeometry.getFlatCoordinates();\n var stride = multiPointGeometry.getStride();\n this.drawCoordinates(\n flatCoordinates, 0, flatCoordinates.length, stride);\n };\n\n /**\n * @inheritDoc\n */\n WebGLImageReplay.prototype.drawPoint = function drawPoint (pointGeometry, feature) {\n this.startIndices.push(this.indices.length);\n this.startIndicesFeature.push(feature);\n var flatCoordinates = pointGeometry.getFlatCoordinates();\n var stride = pointGeometry.getStride();\n this.drawCoordinates(\n flatCoordinates, 0, flatCoordinates.length, stride);\n };\n\n /**\n * @inheritDoc\n */\n WebGLImageReplay.prototype.finish = function finish (context) {\n var gl = context.getGL();\n\n this.groupIndices.push(this.indices.length);\n this.hitDetectionGroupIndices.push(this.indices.length);\n\n // create, bind, and populate the vertices buffer\n this.verticesBuffer = new WebGLBuffer(this.vertices);\n\n var indices = this.indices;\n\n // create, bind, and populate the indices buffer\n this.indicesBuffer = new WebGLBuffer(indices);\n\n // create textures\n /** @type {Object<string, WebGLTexture>} */\n var texturePerImage = {};\n\n this.createTextures(this.textures_, this.images_, texturePerImage, gl);\n\n this.createTextures(this.hitDetectionTextures_, this.hitDetectionImages_,\n texturePerImage, gl);\n\n this.images_ = null;\n this.hitDetectionImages_ = null;\n WebGLTextureReplay.prototype.finish.call(this, context);\n };\n\n /**\n * @inheritDoc\n */\n WebGLImageReplay.prototype.setImageStyle = function setImageStyle (imageStyle) {\n var anchor = imageStyle.getAnchor();\n var image = imageStyle.getImage(1);\n var imageSize = imageStyle.getImageSize();\n var hitDetectionImage = imageStyle.getHitDetectionImage(1);\n var opacity = imageStyle.getOpacity();\n var origin = imageStyle.getOrigin();\n var rotateWithView = imageStyle.getRotateWithView();\n var rotation = imageStyle.getRotation();\n var size = imageStyle.getSize();\n var scale = imageStyle.getScale();\n\n var currentImage;\n if (this.images_.length === 0) {\n this.images_.push(image);\n } else {\n currentImage = this.images_[this.images_.length - 1];\n if (getUid(currentImage) != getUid(image)) {\n this.groupIndices.push(this.indices.length);\n this.images_.push(image);\n }\n }\n\n if (this.hitDetectionImages_.length === 0) {\n this.hitDetectionImages_.push(hitDetectionImage);\n } else {\n currentImage =\n this.hitDetectionImages_[this.hitDetectionImages_.length - 1];\n if (getUid(currentImage) != getUid(hitDetectionImage)) {\n this.hitDetectionGroupIndices.push(this.indices.length);\n this.hitDetectionImages_.push(hitDetectionImage);\n }\n }\n\n this.anchorX = anchor[0];\n this.anchorY = anchor[1];\n this.height = size[1];\n this.imageHeight = imageSize[1];\n this.imageWidth = imageSize[0];\n this.opacity = opacity;\n this.originX = origin[0];\n this.originY = origin[1];\n this.rotation = rotation;\n this.rotateWithView = rotateWithView;\n this.scale = scale;\n this.width = size[0];\n };\n\n /**\n * @inheritDoc\n */\n WebGLImageReplay.prototype.getTextures = function getTextures (opt_all) {\n return opt_all ? this.textures_.concat(this.hitDetectionTextures_) : this.textures_;\n };\n\n /**\n * @inheritDoc\n */\n WebGLImageReplay.prototype.getHitDetectionTextures = function getHitDetectionTextures () {\n return this.hitDetectionTextures_;\n };\n\n return WebGLImageReplay;\n}(WebGLTextureReplay));\n\n\nexport default WebGLImageReplay;\n\n//# sourceMappingURL=ImageReplay.js.map","/**\n * @module ol/geom/flat/topology\n */\nimport {linearRing as linearRingArea} from './area.js';\n\n/**\n * Check if the linestring is a boundary.\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} The linestring is a boundary.\n */\nexport function lineStringIsClosed(flatCoordinates, offset, end, stride) {\n var lastCoord = end - stride;\n if (flatCoordinates[offset] === flatCoordinates[lastCoord] &&\n flatCoordinates[offset + 1] === flatCoordinates[lastCoord + 1] && (end - offset) / stride > 3) {\n return !!linearRingArea(flatCoordinates, offset, end, stride);\n }\n return false;\n}\n\n//# sourceMappingURL=topology.js.map","/**\n * @module ol/render/webgl/linestringreplay/defaultshader\n */\n// This file is automatically generated, do not edit.\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../../webgl.js';\nimport WebGLFragment from '../../../webgl/Fragment.js';\nimport WebGLVertex from '../../../webgl/Vertex.js';\n\nexport var fragment = new WebGLFragment(DEBUG_WEBGL ?\n 'precision mediump float;\\nvarying float v_round;\\nvarying vec2 v_roundVertex;\\nvarying float v_halfWidth;\\n\\n\\n\\nuniform float u_opacity;\\nuniform vec4 u_color;\\nuniform vec2 u_size;\\nuniform float u_pixelRatio;\\n\\nvoid main(void) {\\n if (v_round > 0.0) {\\n vec2 windowCoords = vec2((v_roundVertex.x + 1.0) / 2.0 * u_size.x * u_pixelRatio,\\n (v_roundVertex.y + 1.0) / 2.0 * u_size.y * u_pixelRatio);\\n if (length(windowCoords - gl_FragCoord.xy) > v_halfWidth * u_pixelRatio) {\\n discard;\\n }\\n }\\n gl_FragColor = u_color;\\n float alpha = u_color.a * u_opacity;\\n if (alpha == 0.0) {\\n discard;\\n }\\n gl_FragColor.a = alpha;\\n}\\n' :\n 'precision mediump float;varying float a;varying vec2 aVertex;varying float c;uniform float m;uniform vec4 n;uniform vec2 o;uniform float p;void main(void){if(a>0.0){vec2 windowCoords=vec2((aVertex.x+1.0)/2.0*o.x*p,(aVertex.y+1.0)/2.0*o.y*p);if(length(windowCoords-gl_FragCoord.xy)>c*p){discard;}} gl_FragColor=n;float alpha=n.a*m;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}');\n\nexport var vertex = new WebGLVertex(DEBUG_WEBGL ?\n 'varying float v_round;\\nvarying vec2 v_roundVertex;\\nvarying float v_halfWidth;\\n\\n\\nattribute vec2 a_lastPos;\\nattribute vec2 a_position;\\nattribute vec2 a_nextPos;\\nattribute float a_direction;\\n\\nuniform mat4 u_projectionMatrix;\\nuniform mat4 u_offsetScaleMatrix;\\nuniform mat4 u_offsetRotateMatrix;\\nuniform float u_lineWidth;\\nuniform float u_miterLimit;\\n\\nbool nearlyEquals(in float value, in float ref) {\\n float epsilon = 0.000000000001;\\n return value >= ref - epsilon && value <= ref + epsilon;\\n}\\n\\nvoid alongNormal(out vec2 offset, in vec2 nextP, in float turnDir, in float direction) {\\n vec2 dirVect = nextP - a_position;\\n vec2 normal = normalize(vec2(-turnDir * dirVect.y, turnDir * dirVect.x));\\n offset = u_lineWidth / 2.0 * normal * direction;\\n}\\n\\nvoid miterUp(out vec2 offset, out float round, in bool isRound, in float direction) {\\n float halfWidth = u_lineWidth / 2.0;\\n vec2 tangent = normalize(normalize(a_nextPos - a_position) + normalize(a_position - a_lastPos));\\n vec2 normal = vec2(-tangent.y, tangent.x);\\n vec2 dirVect = a_nextPos - a_position;\\n vec2 tmpNormal = normalize(vec2(-dirVect.y, dirVect.x));\\n float miterLength = abs(halfWidth / dot(normal, tmpNormal));\\n offset = normal * direction * miterLength;\\n round = 0.0;\\n if (isRound) {\\n round = 1.0;\\n } else if (miterLength > u_miterLimit + u_lineWidth) {\\n offset = halfWidth * tmpNormal * direction;\\n }\\n}\\n\\nbool miterDown(out vec2 offset, in vec4 projPos, in mat4 offsetMatrix, in float direction) {\\n bool degenerate = false;\\n vec2 tangent = normalize(normalize(a_nextPos - a_position) + normalize(a_position - a_lastPos));\\n vec2 normal = vec2(-tangent.y, tangent.x);\\n vec2 dirVect = a_lastPos - a_position;\\n vec2 tmpNormal = normalize(vec2(-dirVect.y, dirVect.x));\\n vec2 longOffset, shortOffset, longVertex;\\n vec4 shortProjVertex;\\n float halfWidth = u_lineWidth / 2.0;\\n if (length(a_nextPos - a_position) > length(a_lastPos - a_position)) {\\n longOffset = tmpNormal * direction * halfWidth;\\n shortOffset = normalize(vec2(dirVect.y, -dirVect.x)) * direction * halfWidth;\\n longVertex = a_nextPos;\\n shortProjVertex = u_projectionMatrix * vec4(a_lastPos, 0.0, 1.0);\\n } else {\\n shortOffset = tmpNormal * direction * halfWidth;\\n longOffset = normalize(vec2(dirVect.y, -dirVect.x)) * direction * halfWidth;\\n longVertex = a_lastPos;\\n shortProjVertex = u_projectionMatrix * vec4(a_nextPos, 0.0, 1.0);\\n }\\n //Intersection algorithm based on theory by Paul Bourke (http://paulbourke.net/geometry/pointlineplane/).\\n vec4 p1 = u_projectionMatrix * vec4(longVertex, 0.0, 1.0) + offsetMatrix * vec4(longOffset, 0.0, 0.0);\\n vec4 p2 = projPos + offsetMatrix * vec4(longOffset, 0.0, 0.0);\\n vec4 p3 = shortProjVertex + offsetMatrix * vec4(-shortOffset, 0.0, 0.0);\\n vec4 p4 = shortProjVertex + offsetMatrix * vec4(shortOffset, 0.0, 0.0);\\n float denom = (p4.y - p3.y) * (p2.x - p1.x) - (p4.x - p3.x) * (p2.y - p1.y);\\n float firstU = ((p4.x - p3.x) * (p1.y - p3.y) - (p4.y - p3.y) * (p1.x - p3.x)) / denom;\\n float secondU = ((p2.x - p1.x) * (p1.y - p3.y) - (p2.y - p1.y) * (p1.x - p3.x)) / denom;\\n float epsilon = 0.000000000001;\\n if (firstU > epsilon && firstU < 1.0 - epsilon && secondU > epsilon && secondU < 1.0 - epsilon) {\\n shortProjVertex.x = p1.x + firstU * (p2.x - p1.x);\\n shortProjVertex.y = p1.y + firstU * (p2.y - p1.y);\\n offset = shortProjVertex.xy;\\n degenerate = true;\\n } else {\\n float miterLength = abs(halfWidth / dot(normal, tmpNormal));\\n offset = normal * direction * miterLength;\\n }\\n return degenerate;\\n}\\n\\nvoid squareCap(out vec2 offset, out float round, in bool isRound, in vec2 nextP,\\n in float turnDir, in float direction) {\\n round = 0.0;\\n vec2 dirVect = a_position - nextP;\\n vec2 firstNormal = normalize(dirVect);\\n vec2 secondNormal = vec2(turnDir * firstNormal.y * direction, -turnDir * firstNormal.x * direction);\\n vec2 hypotenuse = normalize(firstNormal - secondNormal);\\n vec2 normal = vec2(turnDir * hypotenuse.y * direction, -turnDir * hypotenuse.x * direction);\\n float length = sqrt(v_halfWidth * v_halfWidth * 2.0);\\n offset = normal * length;\\n if (isRound) {\\n round = 1.0;\\n }\\n}\\n\\nvoid main(void) {\\n bool degenerate = false;\\n float direction = float(sign(a_direction));\\n mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\\n vec2 offset;\\n vec4 projPos = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\\n bool round = nearlyEquals(mod(a_direction, 2.0), 0.0);\\n\\n v_round = 0.0;\\n v_halfWidth = u_lineWidth / 2.0;\\n v_roundVertex = projPos.xy;\\n\\n if (nearlyEquals(mod(a_direction, 3.0), 0.0) || nearlyEquals(mod(a_direction, 17.0), 0.0)) {\\n alongNormal(offset, a_nextPos, 1.0, direction);\\n } else if (nearlyEquals(mod(a_direction, 5.0), 0.0) || nearlyEquals(mod(a_direction, 13.0), 0.0)) {\\n alongNormal(offset, a_lastPos, -1.0, direction);\\n } else if (nearlyEquals(mod(a_direction, 23.0), 0.0)) {\\n miterUp(offset, v_round, round, direction);\\n } else if (nearlyEquals(mod(a_direction, 19.0), 0.0)) {\\n degenerate = miterDown(offset, projPos, offsetMatrix, direction);\\n } else if (nearlyEquals(mod(a_direction, 7.0), 0.0)) {\\n squareCap(offset, v_round, round, a_nextPos, 1.0, direction);\\n } else if (nearlyEquals(mod(a_direction, 11.0), 0.0)) {\\n squareCap(offset, v_round, round, a_lastPos, -1.0, direction);\\n }\\n if (!degenerate) {\\n vec4 offsets = offsetMatrix * vec4(offset, 0.0, 0.0);\\n gl_Position = projPos + offsets;\\n } else {\\n gl_Position = vec4(offset, 0.0, 1.0);\\n }\\n}\\n\\n\\n' :\n 'varying float a;varying vec2 aVertex;varying float c;attribute vec2 d;attribute vec2 e;attribute vec2 f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;bool nearlyEquals(in float value,in float ref){float epsilon=0.000000000001;return value>=ref-epsilon&&value<=ref+epsilon;}void alongNormal(out vec2 offset,in vec2 nextP,in float turnDir,in float direction){vec2 dirVect=nextP-e;vec2 normal=normalize(vec2(-turnDir*dirVect.y,turnDir*dirVect.x));offset=k/2.0*normal*direction;}void miterUp(out vec2 offset,out float round,in bool isRound,in float direction){float halfWidth=k/2.0;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=f-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;round=0.0;if(isRound){round=1.0;}else if(miterLength>l+k){offset=halfWidth*tmpNormal*direction;}} bool miterDown(out vec2 offset,in vec4 projPos,in mat4 offsetMatrix,in float direction){bool degenerate=false;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=d-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));vec2 longOffset,shortOffset,longVertex;vec4 shortProjVertex;float halfWidth=k/2.0;if(length(f-e)>length(d-e)){longOffset=tmpNormal*direction*halfWidth;shortOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=f;shortProjVertex=h*vec4(d,0.0,1.0);}else{shortOffset=tmpNormal*direction*halfWidth;longOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=d;shortProjVertex=h*vec4(f,0.0,1.0);}vec4 p1=h*vec4(longVertex,0.0,1.0)+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p2=projPos+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p3=shortProjVertex+offsetMatrix*vec4(-shortOffset,0.0,0.0);vec4 p4=shortProjVertex+offsetMatrix*vec4(shortOffset,0.0,0.0);float denom=(p4.y-p3.y)*(p2.x-p1.x)-(p4.x-p3.x)*(p2.y-p1.y);float firstU=((p4.x-p3.x)*(p1.y-p3.y)-(p4.y-p3.y)*(p1.x-p3.x))/denom;float secondU=((p2.x-p1.x)*(p1.y-p3.y)-(p2.y-p1.y)*(p1.x-p3.x))/denom;float epsilon=0.000000000001;if(firstU>epsilon&&firstU<1.0-epsilon&&secondU>epsilon&&secondU<1.0-epsilon){shortProjVertex.x=p1.x+firstU*(p2.x-p1.x);shortProjVertex.y=p1.y+firstU*(p2.y-p1.y);offset=shortProjVertex.xy;degenerate=true;}else{float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;}return degenerate;}void squareCap(out vec2 offset,out float round,in bool isRound,in vec2 nextP,in float turnDir,in float direction){round=0.0;vec2 dirVect=e-nextP;vec2 firstNormal=normalize(dirVect);vec2 secondNormal=vec2(turnDir*firstNormal.y*direction,-turnDir*firstNormal.x*direction);vec2 hypotenuse=normalize(firstNormal-secondNormal);vec2 normal=vec2(turnDir*hypotenuse.y*direction,-turnDir*hypotenuse.x*direction);float length=sqrt(c*c*2.0);offset=normal*length;if(isRound){round=1.0;}} void main(void){bool degenerate=false;float direction=float(sign(g));mat4 offsetMatrix=i*j;vec2 offset;vec4 projPos=h*vec4(e,0.0,1.0);bool round=nearlyEquals(mod(g,2.0),0.0);a=0.0;c=k/2.0;aVertex=projPos.xy;if(nearlyEquals(mod(g,3.0),0.0)||nearlyEquals(mod(g,17.0),0.0)){alongNormal(offset,f,1.0,direction);}else if(nearlyEquals(mod(g,5.0),0.0)||nearlyEquals(mod(g,13.0),0.0)){alongNormal(offset,d,-1.0,direction);}else if(nearlyEquals(mod(g,23.0),0.0)){miterUp(offset,a,round,direction);}else if(nearlyEquals(mod(g,19.0),0.0)){degenerate=miterDown(offset,projPos,offsetMatrix,direction);}else if(nearlyEquals(mod(g,7.0),0.0)){squareCap(offset,a,round,f,1.0,direction);}else if(nearlyEquals(mod(g,11.0),0.0)){squareCap(offset,a,round,d,-1.0,direction);}if(!degenerate){vec4 offsets=offsetMatrix*vec4(offset,0.0,0.0);gl_Position=projPos+offsets;}else{gl_Position=vec4(offset,0.0,1.0);}}');\n\n//# sourceMappingURL=defaultshader.js.map","/**\n * @module ol/render/webgl/linestringreplay/defaultshader/Locations\n */\n// This file is automatically generated, do not edit\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../../../webgl.js';\n\nvar Locations = function Locations(gl, program) {\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_projectionMatrix = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_offsetScaleMatrix = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_offsetRotateMatrix = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_lineWidth = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_lineWidth' : 'k');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_miterLimit = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_miterLimit' : 'l');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_opacity = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_opacity' : 'm');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_color = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_color' : 'n');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_size = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_size' : 'o');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_pixelRatio = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_pixelRatio' : 'p');\n\n /**\n * @type {number}\n */\n this.a_lastPos = gl.getAttribLocation(\n program, DEBUG_WEBGL ? 'a_lastPos' : 'd');\n\n /**\n * @type {number}\n */\n this.a_position = gl.getAttribLocation(\n program, DEBUG_WEBGL ? 'a_position' : 'e');\n\n /**\n * @type {number}\n */\n this.a_nextPos = gl.getAttribLocation(\n program, DEBUG_WEBGL ? 'a_nextPos' : 'f');\n\n /**\n * @type {number}\n */\n this.a_direction = gl.getAttribLocation(\n program, DEBUG_WEBGL ? 'a_direction' : 'g');\n\n};\n\nexport default Locations;\n\n//# sourceMappingURL=Locations.js.map","/**\n * @module ol/render/webgl/LineStringReplay\n */\nimport {getUid} from '../../util.js';\nimport {equals} from '../../array.js';\nimport {asArray} from '../../color.js';\nimport {intersects} from '../../extent.js';\nimport {linearRingIsClockwise} from '../../geom/flat/orient.js';\nimport {translate} from '../../geom/flat/transform.js';\nimport {lineStringIsClosed} from '../../geom/flat/topology.js';\nimport {isEmpty} from '../../obj.js';\nimport {DEFAULT_LINECAP, DEFAULT_LINEDASH, DEFAULT_LINEDASHOFFSET,\n DEFAULT_LINEJOIN, DEFAULT_LINEWIDTH, DEFAULT_MITERLIMIT, DEFAULT_STROKESTYLE,\n triangleIsCounterClockwise} from '../webgl.js';\nimport WebGLReplay from './Replay.js';\nimport {fragment, vertex} from './linestringreplay/defaultshader.js';\nimport Locations from './linestringreplay/defaultshader/Locations.js';\nimport {FLOAT} from '../../webgl.js';\nimport WebGLBuffer from '../../webgl/Buffer.js';\n\n\n/**\n * @enum {number}\n */\nvar Instruction = {\n ROUND: 2,\n BEGIN_LINE: 3,\n END_LINE: 5,\n BEGIN_LINE_CAP: 7,\n END_LINE_CAP: 11,\n BEVEL_FIRST: 13,\n BEVEL_SECOND: 17,\n MITER_BOTTOM: 19,\n MITER_TOP: 23\n};\n\n\nvar WebGLLineStringReplay = /*@__PURE__*/(function (WebGLReplay) {\n function WebGLLineStringReplay(tolerance, maxExtent) {\n WebGLReplay.call(this, tolerance, maxExtent);\n\n /**\n * @private\n * @type {import(\"./linestringreplay/defaultshader/Locations.js\").default}\n */\n this.defaultLocations_ = null;\n\n /**\n * @private\n * @type {Array<Array<?>>}\n */\n this.styles_ = [];\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.styleIndices_ = [];\n\n /**\n * @private\n * @type {{strokeColor: (Array<number>|null),\n * lineCap: (string|undefined),\n * lineDash: Array<number>,\n * lineDashOffset: (number|undefined),\n * lineJoin: (string|undefined),\n * lineWidth: (number|undefined),\n * miterLimit: (number|undefined),\n * changed: boolean}|null}\n */\n this.state_ = {\n strokeColor: null,\n lineCap: undefined,\n lineDash: null,\n lineDashOffset: undefined,\n lineJoin: undefined,\n lineWidth: undefined,\n miterLimit: undefined,\n changed: false\n };\n\n }\n\n if ( WebGLReplay ) WebGLLineStringReplay.__proto__ = WebGLReplay;\n WebGLLineStringReplay.prototype = Object.create( WebGLReplay && WebGLReplay.prototype );\n WebGLLineStringReplay.prototype.constructor = WebGLLineStringReplay;\n\n /**\n * Draw one segment.\n * @private\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n */\n WebGLLineStringReplay.prototype.drawCoordinates_ = function drawCoordinates_ (flatCoordinates, offset, end, stride) {\n\n var i, ii;\n var numVertices = this.vertices.length;\n var numIndices = this.indices.length;\n //To save a vertex, the direction of a point is a product of the sign (1 or -1), a prime from\n //Instruction, and a rounding factor (1 or 2). If the product is even,\n //we round it. If it is odd, we don't.\n var lineJoin = this.state_.lineJoin === 'bevel' ? 0 :\n this.state_.lineJoin === 'miter' ? 1 : 2;\n var lineCap = this.state_.lineCap === 'butt' ? 0 :\n this.state_.lineCap === 'square' ? 1 : 2;\n var closed = lineStringIsClosed(flatCoordinates, offset, end, stride);\n var startCoords, sign, n;\n var lastIndex = numIndices;\n var lastSign = 1;\n //We need the adjacent vertices to define normals in joins. p0 = last, p1 = current, p2 = next.\n var p0, p1, p2;\n\n for (i = offset, ii = end; i < ii; i += stride) {\n\n n = numVertices / 7;\n\n p0 = p1;\n p1 = p2 || [flatCoordinates[i], flatCoordinates[i + 1]];\n //First vertex.\n if (i === offset) {\n p2 = [flatCoordinates[i + stride], flatCoordinates[i + stride + 1]];\n if (end - offset === stride * 2 && equals(p1, p2)) {\n break;\n }\n if (closed) {\n //A closed line! Complete the circle.\n p0 = [flatCoordinates[end - stride * 2],\n flatCoordinates[end - stride * 2 + 1]];\n\n startCoords = p2;\n } else {\n //Add the first two/four vertices.\n\n if (lineCap) {\n numVertices = this.addVertices_([0, 0], p1, p2,\n lastSign * Instruction.BEGIN_LINE_CAP * lineCap, numVertices);\n\n numVertices = this.addVertices_([0, 0], p1, p2,\n -lastSign * Instruction.BEGIN_LINE_CAP * lineCap, numVertices);\n\n this.indices[numIndices++] = n + 2;\n this.indices[numIndices++] = n;\n this.indices[numIndices++] = n + 1;\n\n this.indices[numIndices++] = n + 1;\n this.indices[numIndices++] = n + 3;\n this.indices[numIndices++] = n + 2;\n\n }\n\n numVertices = this.addVertices_([0, 0], p1, p2,\n lastSign * Instruction.BEGIN_LINE * (lineCap || 1), numVertices);\n\n numVertices = this.addVertices_([0, 0], p1, p2,\n -lastSign * Instruction.BEGIN_LINE * (lineCap || 1), numVertices);\n\n lastIndex = numVertices / 7 - 1;\n\n continue;\n }\n } else if (i === end - stride) {\n //Last vertex.\n if (closed) {\n //Same as the first vertex.\n p2 = startCoords;\n break;\n } else {\n p0 = p0 || [0, 0];\n\n numVertices = this.addVertices_(p0, p1, [0, 0],\n lastSign * Instruction.END_LINE * (lineCap || 1), numVertices);\n\n numVertices = this.addVertices_(p0, p1, [0, 0],\n -lastSign * Instruction.END_LINE * (lineCap || 1), numVertices);\n\n this.indices[numIndices++] = n;\n this.indices[numIndices++] = lastIndex - 1;\n this.indices[numIndices++] = lastIndex;\n\n this.indices[numIndices++] = lastIndex;\n this.indices[numIndices++] = n + 1;\n this.indices[numIndices++] = n;\n\n if (lineCap) {\n numVertices = this.addVertices_(p0, p1, [0, 0],\n lastSign * Instruction.END_LINE_CAP * lineCap, numVertices);\n\n numVertices = this.addVertices_(p0, p1, [0, 0],\n -lastSign * Instruction.END_LINE_CAP * lineCap, numVertices);\n\n this.indices[numIndices++] = n + 2;\n this.indices[numIndices++] = n;\n this.indices[numIndices++] = n + 1;\n\n this.indices[numIndices++] = n + 1;\n this.indices[numIndices++] = n + 3;\n this.indices[numIndices++] = n + 2;\n\n }\n\n break;\n }\n } else {\n p2 = [flatCoordinates[i + stride], flatCoordinates[i + stride + 1]];\n }\n\n // We group CW and straight lines, thus the not so inituitive CCW checking function.\n sign = triangleIsCounterClockwise(p0[0], p0[1], p1[0], p1[1], p2[0], p2[1])\n ? -1 : 1;\n\n numVertices = this.addVertices_(p0, p1, p2,\n sign * Instruction.BEVEL_FIRST * (lineJoin || 1), numVertices);\n\n numVertices = this.addVertices_(p0, p1, p2,\n sign * Instruction.BEVEL_SECOND * (lineJoin || 1), numVertices);\n\n numVertices = this.addVertices_(p0, p1, p2,\n -sign * Instruction.MITER_BOTTOM * (lineJoin || 1), numVertices);\n\n if (i > offset) {\n this.indices[numIndices++] = n;\n this.indices[numIndices++] = lastIndex - 1;\n this.indices[numIndices++] = lastIndex;\n\n this.indices[numIndices++] = n + 2;\n this.indices[numIndices++] = n;\n this.indices[numIndices++] = lastSign * sign > 0 ? lastIndex : lastIndex - 1;\n }\n\n this.indices[numIndices++] = n;\n this.indices[numIndices++] = n + 2;\n this.indices[numIndices++] = n + 1;\n\n lastIndex = n + 2;\n lastSign = sign;\n\n //Add miter\n if (lineJoin) {\n numVertices = this.addVertices_(p0, p1, p2,\n sign * Instruction.MITER_TOP * lineJoin, numVertices);\n\n this.indices[numIndices++] = n + 1;\n this.indices[numIndices++] = n + 3;\n this.indices[numIndices++] = n;\n }\n }\n\n if (closed) {\n n = n || numVertices / 7;\n sign = linearRingIsClockwise([p0[0], p0[1], p1[0], p1[1], p2[0], p2[1]], 0, 6, 2)\n ? 1 : -1;\n\n numVertices = this.addVertices_(p0, p1, p2,\n sign * Instruction.BEVEL_FIRST * (lineJoin || 1), numVertices);\n\n numVertices = this.addVertices_(p0, p1, p2,\n -sign * Instruction.MITER_BOTTOM * (lineJoin || 1), numVertices);\n\n this.indices[numIndices++] = n;\n this.indices[numIndices++] = lastIndex - 1;\n this.indices[numIndices++] = lastIndex;\n\n this.indices[numIndices++] = n + 1;\n this.indices[numIndices++] = n;\n this.indices[numIndices++] = lastSign * sign > 0 ? lastIndex : lastIndex - 1;\n }\n };\n\n /**\n * @param {Array<number>} p0 Last coordinates.\n * @param {Array<number>} p1 Current coordinates.\n * @param {Array<number>} p2 Next coordinates.\n * @param {number} product Sign, instruction, and rounding product.\n * @param {number} numVertices Vertex counter.\n * @return {number} Vertex counter.\n * @private\n */\n WebGLLineStringReplay.prototype.addVertices_ = function addVertices_ (p0, p1, p2, product, numVertices) {\n this.vertices[numVertices++] = p0[0];\n this.vertices[numVertices++] = p0[1];\n this.vertices[numVertices++] = p1[0];\n this.vertices[numVertices++] = p1[1];\n this.vertices[numVertices++] = p2[0];\n this.vertices[numVertices++] = p2[1];\n this.vertices[numVertices++] = product;\n\n return numVertices;\n };\n\n /**\n * Check if the linestring can be drawn (i. e. valid).\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} The linestring can be drawn.\n * @private\n */\n WebGLLineStringReplay.prototype.isValid_ = function isValid_ (flatCoordinates, offset, end, stride) {\n var range = end - offset;\n if (range < stride * 2) {\n return false;\n } else if (range === stride * 2) {\n var firstP = [flatCoordinates[offset], flatCoordinates[offset + 1]];\n var lastP = [flatCoordinates[offset + stride], flatCoordinates[offset + stride + 1]];\n return !equals(firstP, lastP);\n }\n\n return true;\n };\n\n /**\n * @inheritDoc\n */\n WebGLLineStringReplay.prototype.drawLineString = function drawLineString (lineStringGeometry, feature) {\n var flatCoordinates = lineStringGeometry.getFlatCoordinates();\n var stride = lineStringGeometry.getStride();\n if (this.isValid_(flatCoordinates, 0, flatCoordinates.length, stride)) {\n flatCoordinates = translate(flatCoordinates, 0, flatCoordinates.length,\n stride, -this.origin[0], -this.origin[1]);\n if (this.state_.changed) {\n this.styleIndices_.push(this.indices.length);\n this.state_.changed = false;\n }\n this.startIndices.push(this.indices.length);\n this.startIndicesFeature.push(feature);\n this.drawCoordinates_(\n flatCoordinates, 0, flatCoordinates.length, stride);\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLLineStringReplay.prototype.drawMultiLineString = function drawMultiLineString (multiLineStringGeometry, feature) {\n var indexCount = this.indices.length;\n var ends = multiLineStringGeometry.getEnds();\n ends.unshift(0);\n var flatCoordinates = multiLineStringGeometry.getFlatCoordinates();\n var stride = multiLineStringGeometry.getStride();\n var i, ii;\n if (ends.length > 1) {\n for (i = 1, ii = ends.length; i < ii; ++i) {\n if (this.isValid_(flatCoordinates, ends[i - 1], ends[i], stride)) {\n var lineString = translate(flatCoordinates, ends[i - 1], ends[i],\n stride, -this.origin[0], -this.origin[1]);\n this.drawCoordinates_(\n lineString, 0, lineString.length, stride);\n }\n }\n }\n if (this.indices.length > indexCount) {\n this.startIndices.push(indexCount);\n this.startIndicesFeature.push(feature);\n if (this.state_.changed) {\n this.styleIndices_.push(indexCount);\n this.state_.changed = false;\n }\n }\n };\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {Array<Array<number>>} holeFlatCoordinates Hole flat coordinates.\n * @param {number} stride Stride.\n */\n WebGLLineStringReplay.prototype.drawPolygonCoordinates = function drawPolygonCoordinates (flatCoordinates, holeFlatCoordinates, stride) {\n if (!lineStringIsClosed(flatCoordinates, 0, flatCoordinates.length, stride)) {\n flatCoordinates.push(flatCoordinates[0]);\n flatCoordinates.push(flatCoordinates[1]);\n }\n this.drawCoordinates_(flatCoordinates, 0, flatCoordinates.length, stride);\n if (holeFlatCoordinates.length) {\n var i, ii;\n for (i = 0, ii = holeFlatCoordinates.length; i < ii; ++i) {\n if (!lineStringIsClosed(holeFlatCoordinates[i], 0, holeFlatCoordinates[i].length, stride)) {\n holeFlatCoordinates[i].push(holeFlatCoordinates[i][0]);\n holeFlatCoordinates[i].push(holeFlatCoordinates[i][1]);\n }\n this.drawCoordinates_(holeFlatCoordinates[i], 0,\n holeFlatCoordinates[i].length, stride);\n }\n }\n };\n\n /**\n * @param {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} feature Feature.\n * @param {number=} opt_index Index count.\n */\n WebGLLineStringReplay.prototype.setPolygonStyle = function setPolygonStyle (feature, opt_index) {\n var index = opt_index === undefined ? this.indices.length : opt_index;\n this.startIndices.push(index);\n this.startIndicesFeature.push(feature);\n if (this.state_.changed) {\n this.styleIndices_.push(index);\n this.state_.changed = false;\n }\n };\n\n /**\n * @return {number} Current index.\n */\n WebGLLineStringReplay.prototype.getCurrentIndex = function getCurrentIndex () {\n return this.indices.length;\n };\n\n /**\n * @inheritDoc\n **/\n WebGLLineStringReplay.prototype.finish = function finish (context) {\n // create, bind, and populate the vertices buffer\n this.verticesBuffer = new WebGLBuffer(this.vertices);\n\n // create, bind, and populate the indices buffer\n this.indicesBuffer = new WebGLBuffer(this.indices);\n\n this.startIndices.push(this.indices.length);\n\n //Clean up, if there is nothing to draw\n if (this.styleIndices_.length === 0 && this.styles_.length > 0) {\n this.styles_ = [];\n }\n\n this.vertices = null;\n this.indices = null;\n };\n\n /**\n * @inheritDoc\n */\n WebGLLineStringReplay.prototype.getDeleteResourcesFunction = function getDeleteResourcesFunction (context) {\n var verticesBuffer = this.verticesBuffer;\n var indicesBuffer = this.indicesBuffer;\n return function() {\n context.deleteBuffer(verticesBuffer);\n context.deleteBuffer(indicesBuffer);\n };\n };\n\n /**\n * @inheritDoc\n */\n WebGLLineStringReplay.prototype.setUpProgram = function setUpProgram (gl, context, size, pixelRatio) {\n // get the program\n var program = context.getProgram(fragment, vertex);\n\n // get the locations\n var locations;\n if (!this.defaultLocations_) {\n locations = new Locations(gl, program);\n this.defaultLocations_ = locations;\n } else {\n locations = this.defaultLocations_;\n }\n\n context.useProgram(program);\n\n // enable the vertex attrib arrays\n gl.enableVertexAttribArray(locations.a_lastPos);\n gl.vertexAttribPointer(locations.a_lastPos, 2, FLOAT,\n false, 28, 0);\n\n gl.enableVertexAttribArray(locations.a_position);\n gl.vertexAttribPointer(locations.a_position, 2, FLOAT,\n false, 28, 8);\n\n gl.enableVertexAttribArray(locations.a_nextPos);\n gl.vertexAttribPointer(locations.a_nextPos, 2, FLOAT,\n false, 28, 16);\n\n gl.enableVertexAttribArray(locations.a_direction);\n gl.vertexAttribPointer(locations.a_direction, 1, FLOAT,\n false, 28, 24);\n\n // Enable renderer specific uniforms.\n gl.uniform2fv(locations.u_size, size);\n gl.uniform1f(locations.u_pixelRatio, pixelRatio);\n\n return locations;\n };\n\n /**\n * @inheritDoc\n */\n WebGLLineStringReplay.prototype.shutDownProgram = function shutDownProgram (gl, locations) {\n gl.disableVertexAttribArray(locations.a_lastPos);\n gl.disableVertexAttribArray(locations.a_position);\n gl.disableVertexAttribArray(locations.a_nextPos);\n gl.disableVertexAttribArray(locations.a_direction);\n };\n\n /**\n * @inheritDoc\n */\n WebGLLineStringReplay.prototype.drawReplay = function drawReplay (gl, context, skippedFeaturesHash, hitDetection) {\n //Save GL parameters.\n var tmpDepthFunc = /** @type {number} */ (gl.getParameter(gl.DEPTH_FUNC));\n var tmpDepthMask = /** @type {boolean} */ (gl.getParameter(gl.DEPTH_WRITEMASK));\n\n if (!hitDetection) {\n gl.enable(gl.DEPTH_TEST);\n gl.depthMask(true);\n gl.depthFunc(gl.NOTEQUAL);\n }\n\n if (!isEmpty(skippedFeaturesHash)) {\n this.drawReplaySkipping_(gl, context, skippedFeaturesHash);\n } else {\n //Draw by style groups to minimize drawElements() calls.\n var i, start, end, nextStyle;\n end = this.startIndices[this.startIndices.length - 1];\n for (i = this.styleIndices_.length - 1; i >= 0; --i) {\n start = this.styleIndices_[i];\n nextStyle = this.styles_[i];\n this.setStrokeStyle_(gl, nextStyle[0], nextStyle[1], nextStyle[2]);\n this.drawElements(gl, context, start, end);\n gl.clear(gl.DEPTH_BUFFER_BIT);\n end = start;\n }\n }\n if (!hitDetection) {\n gl.disable(gl.DEPTH_TEST);\n gl.clear(gl.DEPTH_BUFFER_BIT);\n //Restore GL parameters.\n gl.depthMask(tmpDepthMask);\n gl.depthFunc(tmpDepthFunc);\n }\n };\n\n /**\n * @private\n * @param {WebGLRenderingContext} gl gl.\n * @param {import(\"../../webgl/Context.js\").default} context Context.\n * @param {Object} skippedFeaturesHash Ids of features to skip.\n */\n WebGLLineStringReplay.prototype.drawReplaySkipping_ = function drawReplaySkipping_ (gl, context, skippedFeaturesHash) {\n var i, start, end, nextStyle, groupStart, feature, featureIndex, featureStart;\n featureIndex = this.startIndices.length - 2;\n end = start = this.startIndices[featureIndex + 1];\n for (i = this.styleIndices_.length - 1; i >= 0; --i) {\n nextStyle = this.styles_[i];\n this.setStrokeStyle_(gl, nextStyle[0], nextStyle[1], nextStyle[2]);\n groupStart = this.styleIndices_[i];\n\n while (featureIndex >= 0 &&\n this.startIndices[featureIndex] >= groupStart) {\n featureStart = this.startIndices[featureIndex];\n feature = this.startIndicesFeature[featureIndex];\n\n if (skippedFeaturesHash[getUid(feature)]) {\n if (start !== end) {\n this.drawElements(gl, context, start, end);\n gl.clear(gl.DEPTH_BUFFER_BIT);\n }\n end = featureStart;\n }\n featureIndex--;\n start = featureStart;\n }\n if (start !== end) {\n this.drawElements(gl, context, start, end);\n gl.clear(gl.DEPTH_BUFFER_BIT);\n }\n start = end = groupStart;\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLLineStringReplay.prototype.drawHitDetectionReplayOneByOne = function drawHitDetectionReplayOneByOne (gl, context, skippedFeaturesHash, featureCallback, opt_hitExtent) {\n var i, start, end, nextStyle, groupStart, feature, featureIndex;\n featureIndex = this.startIndices.length - 2;\n end = this.startIndices[featureIndex + 1];\n for (i = this.styleIndices_.length - 1; i >= 0; --i) {\n nextStyle = this.styles_[i];\n this.setStrokeStyle_(gl, nextStyle[0], nextStyle[1], nextStyle[2]);\n groupStart = this.styleIndices_[i];\n\n while (featureIndex >= 0 &&\n this.startIndices[featureIndex] >= groupStart) {\n start = this.startIndices[featureIndex];\n feature = this.startIndicesFeature[featureIndex];\n\n if (skippedFeaturesHash[getUid(feature)] === undefined &&\n feature.getGeometry() &&\n (opt_hitExtent === undefined || intersects(\n /** @type {Array<number>} */ (opt_hitExtent),\n feature.getGeometry().getExtent()))) {\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n this.drawElements(gl, context, start, end);\n\n var result = featureCallback(feature);\n\n if (result) {\n return result;\n }\n\n }\n featureIndex--;\n end = start;\n }\n }\n return undefined;\n };\n\n /**\n * @private\n * @param {WebGLRenderingContext} gl gl.\n * @param {Array<number>} color Color.\n * @param {number} lineWidth Line width.\n * @param {number} miterLimit Miter limit.\n */\n WebGLLineStringReplay.prototype.setStrokeStyle_ = function setStrokeStyle_ (gl, color, lineWidth, miterLimit) {\n gl.uniform4fv(this.defaultLocations_.u_color, color);\n gl.uniform1f(this.defaultLocations_.u_lineWidth, lineWidth);\n gl.uniform1f(this.defaultLocations_.u_miterLimit, miterLimit);\n };\n\n /**\n * @inheritDoc\n */\n WebGLLineStringReplay.prototype.setFillStrokeStyle = function setFillStrokeStyle (fillStyle, strokeStyle) {\n var strokeStyleLineCap = strokeStyle.getLineCap();\n this.state_.lineCap = strokeStyleLineCap !== undefined ?\n strokeStyleLineCap : DEFAULT_LINECAP;\n var strokeStyleLineDash = strokeStyle.getLineDash();\n this.state_.lineDash = strokeStyleLineDash ?\n strokeStyleLineDash : DEFAULT_LINEDASH;\n var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n this.state_.lineDashOffset = strokeStyleLineDashOffset ?\n strokeStyleLineDashOffset : DEFAULT_LINEDASHOFFSET;\n var strokeStyleLineJoin = strokeStyle.getLineJoin();\n this.state_.lineJoin = strokeStyleLineJoin !== undefined ?\n strokeStyleLineJoin : DEFAULT_LINEJOIN;\n var strokeStyleColor = strokeStyle.getColor();\n if (!(strokeStyleColor instanceof CanvasGradient) &&\n !(strokeStyleColor instanceof CanvasPattern)) {\n strokeStyleColor = asArray(strokeStyleColor).map(function(c, i) {\n return i != 3 ? c / 255 : c;\n }) || DEFAULT_STROKESTYLE;\n } else {\n strokeStyleColor = DEFAULT_STROKESTYLE;\n }\n var strokeStyleWidth = strokeStyle.getWidth();\n strokeStyleWidth = strokeStyleWidth !== undefined ?\n strokeStyleWidth : DEFAULT_LINEWIDTH;\n var strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n strokeStyleMiterLimit = strokeStyleMiterLimit !== undefined ?\n strokeStyleMiterLimit : DEFAULT_MITERLIMIT;\n if (!this.state_.strokeColor || !equals(this.state_.strokeColor, strokeStyleColor) ||\n this.state_.lineWidth !== strokeStyleWidth || this.state_.miterLimit !== strokeStyleMiterLimit) {\n this.state_.changed = true;\n this.state_.strokeColor = strokeStyleColor;\n this.state_.lineWidth = strokeStyleWidth;\n this.state_.miterLimit = strokeStyleMiterLimit;\n this.styles_.push([strokeStyleColor, strokeStyleWidth, strokeStyleMiterLimit]);\n }\n };\n\n return WebGLLineStringReplay;\n}(WebGLReplay));\n\n\nexport default WebGLLineStringReplay;\n\n//# sourceMappingURL=LineStringReplay.js.map","/**\n * @module ol/render/webgl/polygonreplay/defaultshader\n */\n// This file is automatically generated, do not edit.\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../../webgl.js';\nimport WebGLFragment from '../../../webgl/Fragment.js';\nimport WebGLVertex from '../../../webgl/Vertex.js';\n\nexport var fragment = new WebGLFragment(DEBUG_WEBGL ?\n 'precision mediump float;\\n\\n\\n\\nuniform vec4 u_color;\\nuniform float u_opacity;\\n\\nvoid main(void) {\\n gl_FragColor = u_color;\\n float alpha = u_color.a * u_opacity;\\n if (alpha == 0.0) {\\n discard;\\n }\\n gl_FragColor.a = alpha;\\n}\\n' :\n 'precision mediump float;uniform vec4 e;uniform float f;void main(void){gl_FragColor=e;float alpha=e.a*f;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}');\n\nexport var vertex = new WebGLVertex(DEBUG_WEBGL ?\n '\\n\\nattribute vec2 a_position;\\n\\nuniform mat4 u_projectionMatrix;\\nuniform mat4 u_offsetScaleMatrix;\\nuniform mat4 u_offsetRotateMatrix;\\n\\nvoid main(void) {\\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\\n}\\n\\n\\n' :\n 'attribute vec2 a;uniform mat4 b;uniform mat4 c;uniform mat4 d;void main(void){gl_Position=b*vec4(a,0.0,1.0);}');\n\n//# sourceMappingURL=defaultshader.js.map","/**\n * @module ol/render/webgl/polygonreplay/defaultshader/Locations\n */\n// This file is automatically generated, do not edit\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../../../webgl.js';\n\nvar Locations = function Locations(gl, program) {\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_projectionMatrix = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_projectionMatrix' : 'b');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_offsetScaleMatrix = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'c');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_offsetRotateMatrix = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'd');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_color = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_color' : 'e');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_opacity = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_opacity' : 'f');\n\n /**\n * @type {number}\n */\n this.a_position = gl.getAttribLocation(\n program, DEBUG_WEBGL ? 'a_position' : 'a');\n\n};\n\nexport default Locations;\n\n//# sourceMappingURL=Locations.js.map","/**\n * @module ol/style/Stroke\n */\nimport {getUid} from '../util.js';\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 {string} [lineCap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {string} [lineJoin='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {Array<number>} [lineDash] Line dash pattern. Default is `undefined` (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/**\n * @classdesc\n * Set stroke style for vector features.\n * Note that the defaults given are the Canvas defaults, which will be used if\n * option is not defined. The `get` functions return whatever was entered in\n * the options; they will not return the default.\n * @api\n */\nvar Stroke = function Stroke(opt_options) {\n\n var 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 {string|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 {string|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 * @private\n * @type {string|undefined}\n */\n this.checksum_ = undefined;\n};\n\n/**\n * Clones the style.\n * @return {Stroke} The cloned style.\n * @api\n */\nStroke.prototype.clone = function clone () {\n var color = this.getColor();\n return new Stroke({\n color: Array.isArray(color) ? color.slice() : color || undefined,\n lineCap: this.getLineCap(),\n lineDash: this.getLineDash() ? this.getLineDash().slice() : undefined,\n lineDashOffset: this.getLineDashOffset(),\n lineJoin: this.getLineJoin(),\n miterLimit: this.getMiterLimit(),\n width: this.getWidth()\n });\n};\n\n/**\n * Get the stroke color.\n * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} Color.\n * @api\n */\nStroke.prototype.getColor = function getColor () {\n return this.color_;\n};\n\n/**\n * Get the line cap type for the stroke.\n * @return {string|undefined} Line cap.\n * @api\n */\nStroke.prototype.getLineCap = function 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 */\nStroke.prototype.getLineDash = function 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 */\nStroke.prototype.getLineDashOffset = function getLineDashOffset () {\n return this.lineDashOffset_;\n};\n\n/**\n * Get the line join type for the stroke.\n * @return {string|undefined} Line join.\n * @api\n */\nStroke.prototype.getLineJoin = function 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 */\nStroke.prototype.getMiterLimit = function getMiterLimit () {\n return this.miterLimit_;\n};\n\n/**\n * Get the stroke width.\n * @return {number|undefined} Width.\n * @api\n */\nStroke.prototype.getWidth = function 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 */\nStroke.prototype.setColor = function setColor (color) {\n this.color_ = color;\n this.checksum_ = undefined;\n};\n\n/**\n * Set the line cap.\n *\n * @param {string|undefined} lineCap Line cap.\n * @api\n */\nStroke.prototype.setLineCap = function setLineCap (lineCap) {\n this.lineCap_ = lineCap;\n this.checksum_ = undefined;\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 */\nStroke.prototype.setLineDash = function setLineDash (lineDash) {\n this.lineDash_ = lineDash;\n this.checksum_ = undefined;\n};\n\n/**\n * Set the line dash offset.\n *\n * @param {number|undefined} lineDashOffset Line dash offset.\n * @api\n */\nStroke.prototype.setLineDashOffset = function setLineDashOffset (lineDashOffset) {\n this.lineDashOffset_ = lineDashOffset;\n this.checksum_ = undefined;\n};\n\n/**\n * Set the line join.\n *\n * @param {string|undefined} lineJoin Line join.\n * @api\n */\nStroke.prototype.setLineJoin = function setLineJoin (lineJoin) {\n this.lineJoin_ = lineJoin;\n this.checksum_ = undefined;\n};\n\n/**\n * Set the miter limit.\n *\n * @param {number|undefined} miterLimit Miter limit.\n * @api\n */\nStroke.prototype.setMiterLimit = function setMiterLimit (miterLimit) {\n this.miterLimit_ = miterLimit;\n this.checksum_ = undefined;\n};\n\n/**\n * Set the width.\n *\n * @param {number|undefined} width Width.\n * @api\n */\nStroke.prototype.setWidth = function setWidth (width) {\n this.width_ = width;\n this.checksum_ = undefined;\n};\n\n/**\n * @return {string} The checksum.\n */\nStroke.prototype.getChecksum = function getChecksum () {\n if (this.checksum_ === undefined) {\n this.checksum_ = 's';\n if (this.color_) {\n if (typeof this.color_ === 'string') {\n this.checksum_ += this.color_;\n } else {\n this.checksum_ += getUid(this.color_);\n }\n } else {\n this.checksum_ += '-';\n }\n this.checksum_ += ',' +\n (this.lineCap_ !== undefined ?\n this.lineCap_.toString() : '-') + ',' +\n (this.lineDash_ ?\n this.lineDash_.toString() : '-') + ',' +\n (this.lineDashOffset_ !== undefined ?\n this.lineDashOffset_ : '-') + ',' +\n (this.lineJoin_ !== undefined ?\n this.lineJoin_ : '-') + ',' +\n (this.miterLimit_ !== undefined ?\n this.miterLimit_.toString() : '-') + ',' +\n (this.width_ !== undefined ?\n this.width_.toString() : '-');\n }\n\n return this.checksum_;\n};\n\nexport default Stroke;\n\n//# sourceMappingURL=Stroke.js.map","/**\n * @module ol/structs/LinkedList\n */\n\n\n/**\n * @typedef {Object} Item\n * @property {Item} [prev]\n * @property {Item} [next]\n * @property {?} data\n */\n\n/**\n * @classdesc\n * Creates an empty linked list structure.\n */\nvar LinkedList = function LinkedList(opt_circular) {\n\n /**\n * @private\n * @type {Item|undefined}\n */\n this.first_;\n\n /**\n * @private\n * @type {Item|undefined}\n */\n this.last_;\n\n /**\n * @private\n * @type {Item|undefined}\n */\n this.head_;\n\n /**\n * @private\n * @type {boolean}\n */\n this.circular_ = opt_circular === undefined ? true : opt_circular;\n\n /**\n * @private\n * @type {number}\n */\n this.length_ = 0;\n\n};\n\n/**\n * Inserts an item into the linked list right after the current one.\n *\n * @param {?} data Item data.\n */\nLinkedList.prototype.insertItem = function insertItem (data) {\n\n /** @type {Item} */\n var item = {\n prev: undefined,\n next: undefined,\n data: data\n };\n\n var head = this.head_;\n\n //Initialize the list.\n if (!head) {\n this.first_ = item;\n this.last_ = item;\n if (this.circular_) {\n item.next = item;\n item.prev = item;\n }\n } else {\n //Link the new item to the adjacent ones.\n var next = head.next;\n item.prev = head;\n item.next = next;\n head.next = item;\n if (next) {\n next.prev = item;\n }\n\n if (head === this.last_) {\n this.last_ = item;\n }\n }\n this.head_ = item;\n this.length_++;\n};\n\n/**\n * Removes the current item from the list. Sets the cursor to the next item,\n * if possible.\n */\nLinkedList.prototype.removeItem = function removeItem () {\n var head = this.head_;\n if (head) {\n var next = head.next;\n var prev = head.prev;\n if (next) {\n next.prev = prev;\n }\n if (prev) {\n prev.next = next;\n }\n this.head_ = next || prev;\n\n if (this.first_ === this.last_) {\n this.head_ = undefined;\n this.first_ = undefined;\n this.last_ = undefined;\n } else if (this.first_ === head) {\n this.first_ = this.head_;\n } else if (this.last_ === head) {\n this.last_ = prev ? this.head_.prev : this.head_;\n }\n this.length_--;\n }\n};\n\n/**\n * Sets the cursor to the first item, and returns the associated data.\n *\n * @return {?} Item data.\n */\nLinkedList.prototype.firstItem = function firstItem () {\n this.head_ = this.first_;\n if (this.head_) {\n return this.head_.data;\n }\n return undefined;\n};\n\n/**\n* Sets the cursor to the last item, and returns the associated data.\n*\n* @return {?} Item data.\n*/\nLinkedList.prototype.lastItem = function lastItem () {\n this.head_ = this.last_;\n if (this.head_) {\n return this.head_.data;\n }\n return undefined;\n};\n\n/**\n * Sets the cursor to the next item, and returns the associated data.\n *\n * @return {?} Item data.\n */\nLinkedList.prototype.nextItem = function nextItem () {\n if (this.head_ && this.head_.next) {\n this.head_ = this.head_.next;\n return this.head_.data;\n }\n return undefined;\n};\n\n/**\n * Returns the next item's data without moving the cursor.\n *\n * @return {?} Item data.\n */\nLinkedList.prototype.getNextItem = function getNextItem () {\n if (this.head_ && this.head_.next) {\n return this.head_.next.data;\n }\n return undefined;\n};\n\n/**\n * Sets the cursor to the previous item, and returns the associated data.\n *\n * @return {?} Item data.\n */\nLinkedList.prototype.prevItem = function prevItem () {\n if (this.head_ && this.head_.prev) {\n this.head_ = this.head_.prev;\n return this.head_.data;\n }\n return undefined;\n};\n\n/**\n * Returns the previous item's data without moving the cursor.\n *\n * @return {?} Item data.\n */\nLinkedList.prototype.getPrevItem = function getPrevItem () {\n if (this.head_ && this.head_.prev) {\n return this.head_.prev.data;\n }\n return undefined;\n};\n\n/**\n * Returns the current item's data.\n *\n * @return {?} Item data.\n */\nLinkedList.prototype.getCurrItem = function getCurrItem () {\n if (this.head_) {\n return this.head_.data;\n }\n return undefined;\n};\n\n/**\n * Sets the first item of the list. This only works for circular lists, and sets\n * the last item accordingly.\n */\nLinkedList.prototype.setFirstItem = function setFirstItem () {\n if (this.circular_ && this.head_) {\n this.first_ = this.head_;\n this.last_ = this.head_.prev;\n }\n};\n\n/**\n * Concatenates two lists.\n * @param {LinkedList} list List to merge into the current list.\n */\nLinkedList.prototype.concat = function concat (list) {\n if (list.head_) {\n if (this.head_) {\n var end = this.head_.next;\n this.head_.next = list.first_;\n list.first_.prev = this.head_;\n end.prev = list.last_;\n list.last_.next = end;\n this.length_ += list.length_;\n } else {\n this.head_ = list.head_;\n this.first_ = list.first_;\n this.last_ = list.last_;\n this.length_ = list.length_;\n }\n list.head_ = undefined;\n list.first_ = undefined;\n list.last_ = undefined;\n list.length_ = 0;\n }\n};\n\n/**\n * Returns the current length of the list.\n *\n * @return {number} Length.\n */\nLinkedList.prototype.getLength = function getLength () {\n return this.length_;\n};\n\n\nexport default LinkedList;\n\n//# sourceMappingURL=LinkedList.js.map","/**\n * @module ol/structs/RBush\n */\nimport {getUid} from '../util.js';\nimport rbush from 'rbush';\nimport {createOrUpdate, equals} from '../extent.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 */\nvar RBush = function RBush(opt_maxEntries) {\n\n /**\n * @private\n */\n this.rbush_ = rbush(opt_maxEntries, undefined);\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/**\n * Insert a value into the RBush.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {T} value Value.\n */\nRBush.prototype.insert = function insert (extent, value) {\n /** @type {Entry} */\n var item = {\n minX: extent[0],\n minY: extent[1],\n maxX: extent[2],\n maxY: extent[3],\n value: value\n };\n\n this.rbush_.insert(item);\n this.items_[getUid(value)] = item;\n};\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 */\nRBush.prototype.load = function load (extents, values) {\n var items = new Array(values.length);\n for (var i = 0, l = values.length; i < l; i++) {\n var extent = extents[i];\n var value = values[i];\n\n /** @type {Entry} */\n var item = {\n minX: extent[0],\n minY: extent[1],\n maxX: extent[2],\n maxY: extent[3],\n value: value\n };\n items[i] = item;\n this.items_[getUid(value)] = item;\n }\n this.rbush_.load(items);\n};\n\n\n/**\n * Remove a value from the RBush.\n * @param {T} value Value.\n * @return {boolean} Removed.\n */\nRBush.prototype.remove = function remove (value) {\n var 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 var item = this.items_[uid];\n delete this.items_[uid];\n return this.rbush_.remove(item) !== null;\n};\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 */\nRBush.prototype.update = function update (extent, value) {\n var item = this.items_[getUid(value)];\n var bbox = [item.minX, item.minY, item.maxX, item.maxY];\n if (!equals(bbox, extent)) {\n this.remove(value);\n this.insert(extent, value);\n }\n};\n\n\n/**\n * Return all values in the RBush.\n * @return {Array<T>} All.\n */\nRBush.prototype.getAll = function getAll () {\n var items = this.rbush_.all();\n return items.map(function(item) {\n return item.value;\n });\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 */\nRBush.prototype.getInExtent = function getInExtent (extent) {\n /** @type {Entry} */\n var bbox = {\n minX: extent[0],\n minY: extent[1],\n maxX: extent[2],\n maxY: extent[3]\n };\n var items = this.rbush_.search(bbox);\n return items.map(function(item) {\n return item.value;\n });\n};\n\n\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(this: S, T): *} callback Callback.\n * @param {S=} opt_this The object to use as `this` in `callback`.\n * @return {*} Callback return value.\n * @template S\n */\nRBush.prototype.forEach = function forEach (callback, opt_this) {\n return this.forEach_(this.getAll(), callback, opt_this);\n};\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(this: S, T): *} callback Callback.\n * @param {S=} opt_this The object to use as `this` in `callback`.\n * @return {*} Callback return value.\n * @template S\n */\nRBush.prototype.forEachInExtent = function forEachInExtent (extent, callback, opt_this) {\n return this.forEach_(this.getInExtent(extent), callback, opt_this);\n};\n\n\n/**\n * @param {Array<T>} values Values.\n * @param {function(this: S, T): *} callback Callback.\n * @param {S=} opt_this The object to use as `this` in `callback`.\n * @private\n * @return {*} Callback return value.\n * @template S\n */\nRBush.prototype.forEach_ = function forEach_ (values, callback, opt_this) {\n var result;\n for (var i = 0, l = values.length; i < l; i++) {\n result = callback.call(opt_this, values[i]);\n if (result) {\n return result;\n }\n }\n return result;\n};\n\n\n/**\n * @return {boolean} Is empty.\n */\nRBush.prototype.isEmpty = function isEmpty$1 () {\n return isEmpty(this.items_);\n};\n\n\n/**\n * Remove all values from the RBush.\n */\nRBush.prototype.clear = function clear () {\n this.rbush_.clear();\n this.items_ = {};\n};\n\n\n/**\n * @param {import(\"../extent.js\").Extent=} opt_extent Extent.\n * @return {import(\"../extent.js\").Extent} Extent.\n */\nRBush.prototype.getExtent = function getExtent (opt_extent) {\n var data = this.rbush_.toJSON();\n return createOrUpdate(data.minX, data.minY, data.maxX, data.maxY, opt_extent);\n};\n\n\n/**\n * @param {RBush} rbush R-Tree.\n */\nRBush.prototype.concat = function concat (rbush) {\n this.rbush_.load(rbush.rbush_.all());\n for (var i in rbush.items_) {\n this.items_[i] = rbush.items_[i];\n }\n};\n\n\nexport default RBush;\n\n//# sourceMappingURL=RBush.js.map","/**\n * @module ol/render/webgl/PolygonReplay\n */\nimport {getUid} from '../../util.js';\nimport {equals} from '../../array.js';\nimport {asArray} from '../../color.js';\nimport {intersects} from '../../extent.js';\nimport {isEmpty} from '../../obj.js';\nimport {linearRingContainsXY} from '../../geom/flat/contains.js';\nimport {linearRingIsClockwise} from '../../geom/flat/orient.js';\nimport {translate} from '../../geom/flat/transform.js';\nimport {fragment, vertex} from './polygonreplay/defaultshader.js';\nimport Locations from './polygonreplay/defaultshader/Locations.js';\nimport WebGLLineStringReplay from './LineStringReplay.js';\nimport WebGLReplay from './Replay.js';\nimport {triangleIsCounterClockwise, EPSILON, DEFAULT_FILLSTYLE} from '../webgl.js';\nimport Stroke from '../../style/Stroke.js';\nimport LinkedList from '../../structs/LinkedList.js';\nimport RBush from '../../structs/RBush.js';\nimport {FLOAT} from '../../webgl.js';\nimport WebGLBuffer from '../../webgl/Buffer.js';\n\n\n/**\n * @typedef {Object} PolygonVertex\n * @property {number} x\n * @property {number} y\n * @property {number} i\n * @property {boolean} [reflex]\n */\n\n/**\n * @typedef {Object} PolygonSegment\n * @property {PolygonVertex} p0\n * @property {PolygonVertex} p1\n */\n\n\nvar WebGLPolygonReplay = /*@__PURE__*/(function (WebGLReplay) {\n function WebGLPolygonReplay(tolerance, maxExtent) {\n WebGLReplay.call(this, tolerance, maxExtent);\n\n this.lineStringReplay = new WebGLLineStringReplay(\n tolerance, maxExtent);\n\n /**\n * @private\n * @type {import(\"./polygonreplay/defaultshader/Locations.js\").default}\n */\n this.defaultLocations_ = null;\n\n /**\n * @private\n * @type {Array<Array<number>>}\n */\n this.styles_ = [];\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.styleIndices_ = [];\n\n /**\n * @private\n * @type {{fillColor: (Array<number>|null),\n * changed: boolean}|null}\n */\n this.state_ = {\n fillColor: null,\n changed: false\n };\n\n }\n\n if ( WebGLReplay ) WebGLPolygonReplay.__proto__ = WebGLReplay;\n WebGLPolygonReplay.prototype = Object.create( WebGLReplay && WebGLReplay.prototype );\n WebGLPolygonReplay.prototype.constructor = WebGLPolygonReplay;\n\n /**\n * Draw one polygon.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {Array<Array<number>>} holeFlatCoordinates Hole flat coordinates.\n * @param {number} stride Stride.\n * @private\n */\n WebGLPolygonReplay.prototype.drawCoordinates_ = function drawCoordinates_ (flatCoordinates, holeFlatCoordinates, stride) {\n // Triangulate the polygon\n var outerRing = new LinkedList();\n var rtree = new RBush();\n // Initialize the outer ring\n this.processFlatCoordinates_(flatCoordinates, stride, outerRing, rtree, true);\n var maxCoords = this.getMaxCoords_(outerRing);\n\n // Eliminate holes, if there are any\n if (holeFlatCoordinates.length) {\n var i, ii;\n var holeLists = [];\n for (i = 0, ii = holeFlatCoordinates.length; i < ii; ++i) {\n var holeList = {\n list: new LinkedList(),\n maxCoords: undefined,\n rtree: new RBush()\n };\n holeLists.push(holeList);\n this.processFlatCoordinates_(holeFlatCoordinates[i],\n stride, holeList.list, holeList.rtree, false);\n this.classifyPoints_(holeList.list, holeList.rtree, true);\n holeList.maxCoords = this.getMaxCoords_(holeList.list);\n }\n holeLists.sort(function(a, b) {\n return b.maxCoords[0] === a.maxCoords[0] ?\n a.maxCoords[1] - b.maxCoords[1] : b.maxCoords[0] - a.maxCoords[0];\n });\n for (i = 0; i < holeLists.length; ++i) {\n var currList = holeLists[i].list;\n var start = currList.firstItem();\n var currItem = start;\n var intersection = (void 0);\n do {\n //TODO: Triangulate holes when they intersect the outer ring.\n if (this.getIntersections_(currItem, rtree).length) {\n intersection = true;\n break;\n }\n currItem = currList.nextItem();\n } while (start !== currItem);\n if (!intersection) {\n if (this.bridgeHole_(currList, holeLists[i].maxCoords[0], outerRing, maxCoords[0], rtree)) {\n rtree.concat(holeLists[i].rtree);\n this.classifyPoints_(outerRing, rtree, false);\n }\n }\n }\n } else {\n this.classifyPoints_(outerRing, rtree, false);\n }\n this.triangulate_(outerRing, rtree);\n };\n\n /**\n * Inserts flat coordinates in a linked list and adds them to the vertex buffer.\n * @private\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} stride Stride.\n * @param {import(\"../../structs/LinkedList.js\").default} list Linked list.\n * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n * @param {boolean} clockwise Coordinate order should be clockwise.\n */\n WebGLPolygonReplay.prototype.processFlatCoordinates_ = function processFlatCoordinates_ (flatCoordinates, stride, list, rtree, clockwise) {\n var isClockwise = linearRingIsClockwise(flatCoordinates,\n 0, flatCoordinates.length, stride);\n var i, ii;\n var n = this.vertices.length / 2;\n /** @type {PolygonVertex} */\n var start;\n /** @type {PolygonVertex} */\n var p0;\n /** @type {PolygonVertex} */\n var p1;\n var extents = [];\n var segments = [];\n if (clockwise === isClockwise) {\n start = this.createPoint_(flatCoordinates[0], flatCoordinates[1], n++);\n p0 = start;\n for (i = stride, ii = flatCoordinates.length; i < ii; i += stride) {\n p1 = this.createPoint_(flatCoordinates[i], flatCoordinates[i + 1], n++);\n segments.push(this.insertItem_(p0, p1, list));\n extents.push([Math.min(p0.x, p1.x), Math.min(p0.y, p1.y), Math.max(p0.x, p1.x),\n Math.max(p0.y, p1.y)]);\n p0 = p1;\n }\n segments.push(this.insertItem_(p1, start, list));\n extents.push([Math.min(p0.x, p1.x), Math.min(p0.y, p1.y), Math.max(p0.x, p1.x),\n Math.max(p0.y, p1.y)]);\n } else {\n var end = flatCoordinates.length - stride;\n start = this.createPoint_(flatCoordinates[end], flatCoordinates[end + 1], n++);\n p0 = start;\n for (i = end - stride, ii = 0; i >= ii; i -= stride) {\n p1 = this.createPoint_(flatCoordinates[i], flatCoordinates[i + 1], n++);\n segments.push(this.insertItem_(p0, p1, list));\n extents.push([Math.min(p0.x, p1.x), Math.min(p0.y, p1.y), Math.max(p0.x, p1.x),\n Math.max(p0.y, p1.y)]);\n p0 = p1;\n }\n segments.push(this.insertItem_(p1, start, list));\n extents.push([Math.min(p0.x, p1.x), Math.min(p0.y, p1.y), Math.max(p0.x, p1.x),\n Math.max(p0.y, p1.y)]);\n }\n rtree.load(extents, segments);\n };\n\n /**\n * Returns the rightmost coordinates of a polygon on the X axis.\n * @private\n * @param {import(\"../../structs/LinkedList.js\").default} list Polygons ring.\n * @return {Array<number>} Max X coordinates.\n */\n WebGLPolygonReplay.prototype.getMaxCoords_ = function getMaxCoords_ (list) {\n var start = list.firstItem();\n var seg = start;\n var maxCoords = [seg.p0.x, seg.p0.y];\n\n do {\n seg = list.nextItem();\n if (seg.p0.x > maxCoords[0]) {\n maxCoords = [seg.p0.x, seg.p0.y];\n }\n } while (seg !== start);\n\n return maxCoords;\n };\n\n /**\n * Classifies the points of a polygon list as convex, reflex. Removes collinear vertices.\n * @private\n * @param {import(\"../../structs/LinkedList.js\").default} list Polygon ring.\n * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n * @param {boolean} ccw The orientation of the polygon is counter-clockwise.\n * @return {boolean} There were reclassified points.\n */\n WebGLPolygonReplay.prototype.classifyPoints_ = function classifyPoints_ (list, rtree, ccw) {\n var start = list.firstItem();\n var s0 = start;\n var s1 = list.nextItem();\n var pointsReclassified = false;\n do {\n var reflex = ccw ? triangleIsCounterClockwise(s1.p1.x,\n s1.p1.y, s0.p1.x, s0.p1.y, s0.p0.x, s0.p0.y) :\n triangleIsCounterClockwise(s0.p0.x, s0.p0.y, s0.p1.x,\n s0.p1.y, s1.p1.x, s1.p1.y);\n if (reflex === undefined) {\n this.removeItem_(s0, s1, list, rtree);\n pointsReclassified = true;\n if (s1 === start) {\n start = list.getNextItem();\n }\n s1 = s0;\n list.prevItem();\n } else if (s0.p1.reflex !== reflex) {\n s0.p1.reflex = reflex;\n pointsReclassified = true;\n }\n s0 = s1;\n s1 = list.nextItem();\n } while (s0 !== start);\n return pointsReclassified;\n };\n\n /**\n * @private\n * @param {import(\"../../structs/LinkedList.js\").default} hole Linked list of the hole.\n * @param {number} holeMaxX Maximum X value of the hole.\n * @param {import(\"../../structs/LinkedList.js\").default} list Linked list of the polygon.\n * @param {number} listMaxX Maximum X value of the polygon.\n * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n * @return {boolean} Bridging was successful.\n */\n WebGLPolygonReplay.prototype.bridgeHole_ = function bridgeHole_ (hole, holeMaxX, list, listMaxX, rtree) {\n var seg = hole.firstItem();\n while (seg.p1.x !== holeMaxX) {\n seg = hole.nextItem();\n }\n\n var p1 = seg.p1;\n /** @type {PolygonVertex} */\n var p2 = {x: listMaxX, y: p1.y, i: -1};\n var minDist = Infinity;\n var i, ii, bestPoint;\n /** @type {PolygonVertex} */\n var p5;\n\n var intersectingSegments = this.getIntersections_({p0: p1, p1: p2}, rtree, true);\n for (i = 0, ii = intersectingSegments.length; i < ii; ++i) {\n var currSeg = intersectingSegments[i];\n var intersection = this.calculateIntersection_(p1, p2, currSeg.p0,\n currSeg.p1, true);\n var dist = Math.abs(p1.x - intersection[0]);\n if (dist < minDist && triangleIsCounterClockwise(p1.x, p1.y,\n currSeg.p0.x, currSeg.p0.y, currSeg.p1.x, currSeg.p1.y) !== undefined) {\n minDist = dist;\n p5 = {x: intersection[0], y: intersection[1], i: -1};\n seg = currSeg;\n }\n }\n if (minDist === Infinity) {\n return false;\n }\n bestPoint = seg.p1;\n\n if (minDist > 0) {\n var pointsInTriangle = this.getPointsInTriangle_(p1, p5, seg.p1, rtree);\n if (pointsInTriangle.length) {\n var theta = Infinity;\n for (i = 0, ii = pointsInTriangle.length; i < ii; ++i) {\n var currPoint = pointsInTriangle[i];\n var currTheta = Math.atan2(p1.y - currPoint.y, p2.x - currPoint.x);\n if (currTheta < theta || (currTheta === theta && currPoint.x < bestPoint.x)) {\n theta = currTheta;\n bestPoint = currPoint;\n }\n }\n }\n }\n\n seg = list.firstItem();\n while (seg.p1.x !== bestPoint.x || seg.p1.y !== bestPoint.y) {\n seg = list.nextItem();\n }\n\n //We clone the bridge points as they can have different convexity.\n var p0Bridge = {x: p1.x, y: p1.y, i: p1.i, reflex: undefined};\n var p1Bridge = {x: seg.p1.x, y: seg.p1.y, i: seg.p1.i, reflex: undefined};\n\n hole.getNextItem().p0 = p0Bridge;\n this.insertItem_(p1, seg.p1, hole, rtree);\n this.insertItem_(p1Bridge, p0Bridge, hole, rtree);\n seg.p1 = p1Bridge;\n hole.setFirstItem();\n list.concat(hole);\n\n return true;\n };\n\n /**\n * @private\n * @param {import(\"../../structs/LinkedList.js\").default} list Linked list of the polygon.\n * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n */\n WebGLPolygonReplay.prototype.triangulate_ = function triangulate_ (list, rtree) {\n var ccw = false;\n var simple = this.isSimple_(list, rtree);\n\n // Start clipping ears\n while (list.getLength() > 3) {\n if (simple) {\n if (!this.clipEars_(list, rtree, simple, ccw)) {\n if (!this.classifyPoints_(list, rtree, ccw)) {\n // Due to the behavior of OL's PIP algorithm, the ear clipping cannot\n // introduce touching segments. However, the original data may have some.\n if (!this.resolveSelfIntersections_(list, rtree, true)) {\n break;\n }\n }\n }\n } else {\n if (!this.clipEars_(list, rtree, simple, ccw)) {\n // We ran out of ears, try to reclassify.\n if (!this.classifyPoints_(list, rtree, ccw)) {\n // We have a bad polygon, try to resolve local self-intersections.\n if (!this.resolveSelfIntersections_(list, rtree)) {\n simple = this.isSimple_(list, rtree);\n if (!simple) {\n // We have a really bad polygon, try more time consuming methods.\n this.splitPolygon_(list, rtree);\n break;\n } else {\n ccw = !this.isClockwise_(list);\n this.classifyPoints_(list, rtree, ccw);\n }\n }\n }\n }\n }\n }\n if (list.getLength() === 3) {\n var numIndices = this.indices.length;\n this.indices[numIndices++] = list.getPrevItem().p0.i;\n this.indices[numIndices++] = list.getCurrItem().p0.i;\n this.indices[numIndices++] = list.getNextItem().p0.i;\n }\n };\n\n /**\n * @private\n * @param {import(\"../../structs/LinkedList.js\").default} list Linked list of the polygon.\n * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n * @param {boolean} simple The polygon is simple.\n * @param {boolean} ccw Orientation of the polygon is counter-clockwise.\n * @return {boolean} There were processed ears.\n */\n WebGLPolygonReplay.prototype.clipEars_ = function clipEars_ (list, rtree, simple, ccw) {\n var numIndices = this.indices.length;\n var start = list.firstItem();\n var s0 = list.getPrevItem();\n var s1 = start;\n var s2 = list.nextItem();\n var s3 = list.getNextItem();\n var p0, p1, p2;\n var processedEars = false;\n do {\n p0 = s1.p0;\n p1 = s1.p1;\n p2 = s2.p1;\n if (p1.reflex === false) {\n // We might have a valid ear\n var variableCriterion = (void 0);\n if (simple) {\n variableCriterion = this.getPointsInTriangle_(p0, p1, p2, rtree, true).length === 0;\n } else {\n variableCriterion = ccw ? this.diagonalIsInside_(s3.p1, p2, p1, p0,\n s0.p0) : this.diagonalIsInside_(s0.p0, p0, p1, p2, s3.p1);\n }\n if ((simple || this.getIntersections_({p0: p0, p1: p2}, rtree).length === 0) &&\n variableCriterion) {\n //The diagonal is completely inside the polygon\n if (simple || p0.reflex === false || p2.reflex === false ||\n linearRingIsClockwise([s0.p0.x, s0.p0.y, p0.x,\n p0.y, p1.x, p1.y, p2.x, p2.y, s3.p1.x, s3.p1.y], 0, 10, 2) === !ccw) {\n //The diagonal is persumably valid, we have an ear\n this.indices[numIndices++] = p0.i;\n this.indices[numIndices++] = p1.i;\n this.indices[numIndices++] = p2.i;\n this.removeItem_(s1, s2, list, rtree);\n if (s2 === start) {\n start = s3;\n }\n processedEars = true;\n }\n }\n }\n // Else we have a reflex point.\n s0 = list.getPrevItem();\n s1 = list.getCurrItem();\n s2 = list.nextItem();\n s3 = list.getNextItem();\n } while (s1 !== start && list.getLength() > 3);\n\n return processedEars;\n };\n\n /**\n * @private\n * @param {import(\"../../structs/LinkedList.js\").default} list Linked list of the polygon.\n * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n * @param {boolean=} opt_touch Resolve touching segments.\n * @return {boolean} There were resolved intersections.\n */\n WebGLPolygonReplay.prototype.resolveSelfIntersections_ = function resolveSelfIntersections_ (list, rtree, opt_touch) {\n var start = list.firstItem();\n list.nextItem();\n var s0 = start;\n var s1 = list.nextItem();\n var resolvedIntersections = false;\n\n do {\n var intersection = this.calculateIntersection_(s0.p0, s0.p1, s1.p0, s1.p1,\n opt_touch);\n if (intersection) {\n var breakCond = false;\n var numVertices = this.vertices.length;\n var numIndices = this.indices.length;\n var n = numVertices / 2;\n var seg = list.prevItem();\n list.removeItem();\n rtree.remove(seg);\n breakCond = (seg === start);\n var p = (void 0);\n if (opt_touch) {\n if (intersection[0] === s0.p0.x && intersection[1] === s0.p0.y) {\n list.prevItem();\n p = s0.p0;\n s1.p0 = p;\n rtree.remove(s0);\n breakCond = breakCond || (s0 === start);\n } else {\n p = s1.p1;\n s0.p1 = p;\n rtree.remove(s1);\n breakCond = breakCond || (s1 === start);\n }\n list.removeItem();\n } else {\n p = this.createPoint_(intersection[0], intersection[1], n);\n s0.p1 = p;\n s1.p0 = p;\n rtree.update([Math.min(s0.p0.x, s0.p1.x), Math.min(s0.p0.y, s0.p1.y),\n Math.max(s0.p0.x, s0.p1.x), Math.max(s0.p0.y, s0.p1.y)], s0);\n rtree.update([Math.min(s1.p0.x, s1.p1.x), Math.min(s1.p0.y, s1.p1.y),\n Math.max(s1.p0.x, s1.p1.x), Math.max(s1.p0.y, s1.p1.y)], s1);\n }\n\n this.indices[numIndices++] = seg.p0.i;\n this.indices[numIndices++] = seg.p1.i;\n this.indices[numIndices++] = p.i;\n\n resolvedIntersections = true;\n if (breakCond) {\n break;\n }\n }\n\n s0 = list.getPrevItem();\n s1 = list.nextItem();\n } while (s0 !== start);\n return resolvedIntersections;\n };\n\n /**\n * @private\n * @param {import(\"../../structs/LinkedList.js\").default} list Linked list of the polygon.\n * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n * @return {boolean} The polygon is simple.\n */\n WebGLPolygonReplay.prototype.isSimple_ = function isSimple_ (list, rtree) {\n var start = list.firstItem();\n var seg = start;\n do {\n if (this.getIntersections_(seg, rtree).length) {\n return false;\n }\n seg = list.nextItem();\n } while (seg !== start);\n return true;\n };\n\n /**\n * @private\n * @param {import(\"../../structs/LinkedList.js\").default} list Linked list of the polygon.\n * @return {boolean} Orientation is clockwise.\n */\n WebGLPolygonReplay.prototype.isClockwise_ = function isClockwise_ (list) {\n var length = list.getLength() * 2;\n var flatCoordinates = new Array(length);\n var start = list.firstItem();\n var seg = start;\n var i = 0;\n do {\n flatCoordinates[i++] = seg.p0.x;\n flatCoordinates[i++] = seg.p0.y;\n seg = list.nextItem();\n } while (seg !== start);\n return linearRingIsClockwise(flatCoordinates, 0, length, 2);\n };\n\n /**\n * @private\n * @param {import(\"../../structs/LinkedList.js\").default} list Linked list of the polygon.\n * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n */\n WebGLPolygonReplay.prototype.splitPolygon_ = function splitPolygon_ (list, rtree) {\n var start = list.firstItem();\n var s0 = start;\n do {\n var intersections = this.getIntersections_(s0, rtree);\n if (intersections.length) {\n var s1 = intersections[0];\n var n = this.vertices.length / 2;\n var intersection = this.calculateIntersection_(s0.p0,\n s0.p1, s1.p0, s1.p1);\n var p = this.createPoint_(intersection[0], intersection[1], n);\n var newPolygon = new LinkedList();\n var newRtree = new RBush();\n this.insertItem_(p, s0.p1, newPolygon, newRtree);\n s0.p1 = p;\n rtree.update([Math.min(s0.p0.x, p.x), Math.min(s0.p0.y, p.y),\n Math.max(s0.p0.x, p.x), Math.max(s0.p0.y, p.y)], s0);\n var currItem = list.nextItem();\n while (currItem !== s1) {\n this.insertItem_(currItem.p0, currItem.p1, newPolygon, newRtree);\n rtree.remove(currItem);\n list.removeItem();\n currItem = list.getCurrItem();\n }\n this.insertItem_(s1.p0, p, newPolygon, newRtree);\n s1.p0 = p;\n rtree.update([Math.min(s1.p1.x, p.x), Math.min(s1.p1.y, p.y),\n Math.max(s1.p1.x, p.x), Math.max(s1.p1.y, p.y)], s1);\n this.classifyPoints_(list, rtree, false);\n this.triangulate_(list, rtree);\n this.classifyPoints_(newPolygon, newRtree, false);\n this.triangulate_(newPolygon, newRtree);\n break;\n }\n s0 = list.nextItem();\n } while (s0 !== start);\n };\n\n /**\n * @private\n * @param {number} x X coordinate.\n * @param {number} y Y coordinate.\n * @param {number} i Index.\n * @return {PolygonVertex} List item.\n */\n WebGLPolygonReplay.prototype.createPoint_ = function createPoint_ (x, y, i) {\n var numVertices = this.vertices.length;\n this.vertices[numVertices++] = x;\n this.vertices[numVertices++] = y;\n /** @type {PolygonVertex} */\n var p = {\n x: x,\n y: y,\n i: i,\n reflex: undefined\n };\n return p;\n };\n\n /**\n * @private\n * @param {PolygonVertex} p0 First point of segment.\n * @param {PolygonVertex} p1 Second point of segment.\n * @param {import(\"../../structs/LinkedList.js\").default} list Polygon ring.\n * @param {import(\"../../structs/RBush.js\").default=} opt_rtree Insert the segment into the R-Tree.\n * @return {PolygonSegment} segment.\n */\n WebGLPolygonReplay.prototype.insertItem_ = function insertItem_ (p0, p1, list, opt_rtree) {\n var seg = {\n p0: p0,\n p1: p1\n };\n list.insertItem(seg);\n if (opt_rtree) {\n opt_rtree.insert([Math.min(p0.x, p1.x), Math.min(p0.y, p1.y),\n Math.max(p0.x, p1.x), Math.max(p0.y, p1.y)], seg);\n }\n return seg;\n };\n\n /**\n * @private\n * @param {PolygonSegment} s0 Segment before the remove candidate.\n * @param {PolygonSegment} s1 Remove candidate segment.\n * @param {import(\"../../structs/LinkedList.js\").default} list Polygon ring.\n * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n */\n WebGLPolygonReplay.prototype.removeItem_ = function removeItem_ (s0, s1, list, rtree) {\n if (list.getCurrItem() === s1) {\n list.removeItem();\n s0.p1 = s1.p1;\n rtree.remove(s1);\n rtree.update([Math.min(s0.p0.x, s0.p1.x), Math.min(s0.p0.y, s0.p1.y),\n Math.max(s0.p0.x, s0.p1.x), Math.max(s0.p0.y, s0.p1.y)], s0);\n }\n };\n\n /**\n * @private\n * @param {PolygonVertex} p0 First point.\n * @param {PolygonVertex} p1 Second point.\n * @param {PolygonVertex} p2 Third point.\n * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n * @param {boolean=} opt_reflex Only include reflex points.\n * @return {Array<PolygonVertex>} Points in the triangle.\n */\n WebGLPolygonReplay.prototype.getPointsInTriangle_ = function getPointsInTriangle_ (p0, p1, p2, rtree, opt_reflex) {\n var result = [];\n var segmentsInExtent = rtree.getInExtent([Math.min(p0.x, p1.x, p2.x),\n Math.min(p0.y, p1.y, p2.y), Math.max(p0.x, p1.x, p2.x), Math.max(p0.y,\n p1.y, p2.y)]);\n for (var i = 0, ii = segmentsInExtent.length; i < ii; ++i) {\n for (var j in segmentsInExtent[i]) {\n var p = segmentsInExtent[i][j];\n if (typeof p === 'object' && (!opt_reflex || p.reflex)) {\n if ((p.x !== p0.x || p.y !== p0.y) && (p.x !== p1.x || p.y !== p1.y) &&\n (p.x !== p2.x || p.y !== p2.y) && result.indexOf(p) === -1 &&\n linearRingContainsXY([p0.x, p0.y, p1.x, p1.y, p2.x, p2.y], 0, 6, 2, p.x, p.y)) {\n result.push(p);\n }\n }\n }\n }\n return result;\n };\n\n /**\n * @private\n * @param {PolygonSegment} segment Segment.\n * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n * @param {boolean=} opt_touch Touching segments should be considered an intersection.\n * @return {Array<PolygonSegment>} Intersecting segments.\n */\n WebGLPolygonReplay.prototype.getIntersections_ = function getIntersections_ (segment, rtree, opt_touch) {\n var p0 = segment.p0;\n var p1 = segment.p1;\n var segmentsInExtent = rtree.getInExtent([Math.min(p0.x, p1.x),\n Math.min(p0.y, p1.y), Math.max(p0.x, p1.x), Math.max(p0.y, p1.y)]);\n var result = [];\n for (var i = 0, ii = segmentsInExtent.length; i < ii; ++i) {\n var currSeg = segmentsInExtent[i];\n if (segment !== currSeg && (opt_touch || currSeg.p0 !== p1 || currSeg.p1 !== p0) &&\n this.calculateIntersection_(p0, p1, currSeg.p0, currSeg.p1, opt_touch)) {\n result.push(currSeg);\n }\n }\n return result;\n };\n\n /**\n * Line intersection algorithm by Paul Bourke.\n * See http://paulbourke.net/geometry/pointlineplane/.\n *\n * @private\n * @param {PolygonVertex} p0 First point.\n * @param {PolygonVertex} p1 Second point.\n * @param {PolygonVertex} p2 Third point.\n * @param {PolygonVertex} p3 Fourth point.\n * @param {boolean=} opt_touch Touching segments should be considered an intersection.\n * @return {Array<number>|undefined} Intersection coordinates.\n */\n WebGLPolygonReplay.prototype.calculateIntersection_ = function calculateIntersection_ (p0, p1, p2, p3, opt_touch) {\n var denom = (p3.y - p2.y) * (p1.x - p0.x) - (p3.x - p2.x) * (p1.y - p0.y);\n if (denom !== 0) {\n var ua = ((p3.x - p2.x) * (p0.y - p2.y) - (p3.y - p2.y) * (p0.x - p2.x)) / denom;\n var ub = ((p1.x - p0.x) * (p0.y - p2.y) - (p1.y - p0.y) * (p0.x - p2.x)) / denom;\n if ((!opt_touch && ua > EPSILON && ua < 1 - EPSILON &&\n ub > EPSILON && ub < 1 - EPSILON) || (opt_touch &&\n ua >= 0 && ua <= 1 && ub >= 0 && ub <= 1)) {\n return [p0.x + ua * (p1.x - p0.x), p0.y + ua * (p1.y - p0.y)];\n }\n }\n return undefined;\n };\n\n /**\n * @private\n * @param {PolygonVertex} p0 Point before the start of the diagonal.\n * @param {PolygonVertex} p1 Start point of the diagonal.\n * @param {PolygonVertex} p2 Ear candidate.\n * @param {PolygonVertex} p3 End point of the diagonal.\n * @param {PolygonVertex} p4 Point after the end of the diagonal.\n * @return {boolean} Diagonal is inside the polygon.\n */\n WebGLPolygonReplay.prototype.diagonalIsInside_ = function diagonalIsInside_ (p0, p1, p2, p3, p4) {\n if (p1.reflex === undefined || p3.reflex === undefined) {\n return false;\n }\n var p1IsLeftOf = (p2.x - p3.x) * (p1.y - p3.y) > (p2.y - p3.y) * (p1.x - p3.x);\n var p1IsRightOf = (p4.x - p3.x) * (p1.y - p3.y) < (p4.y - p3.y) * (p1.x - p3.x);\n var p3IsLeftOf = (p0.x - p1.x) * (p3.y - p1.y) > (p0.y - p1.y) * (p3.x - p1.x);\n var p3IsRightOf = (p2.x - p1.x) * (p3.y - p1.y) < (p2.y - p1.y) * (p3.x - p1.x);\n var p1InCone = p3.reflex ? p1IsRightOf || p1IsLeftOf : p1IsRightOf && p1IsLeftOf;\n var p3InCone = p1.reflex ? p3IsRightOf || p3IsLeftOf : p3IsRightOf && p3IsLeftOf;\n return p1InCone && p3InCone;\n };\n\n /**\n * @inheritDoc\n */\n WebGLPolygonReplay.prototype.drawMultiPolygon = function drawMultiPolygon (multiPolygonGeometry, feature) {\n var endss = multiPolygonGeometry.getEndss();\n var stride = multiPolygonGeometry.getStride();\n var currIndex = this.indices.length;\n var currLineIndex = this.lineStringReplay.getCurrentIndex();\n var flatCoordinates = multiPolygonGeometry.getFlatCoordinates();\n var i, ii, j, jj;\n var start = 0;\n for (i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n if (ends.length > 0) {\n var outerRing = translate(flatCoordinates, start, ends[0],\n stride, -this.origin[0], -this.origin[1]);\n if (outerRing.length) {\n var holes = [];\n var holeFlatCoords = (void 0);\n for (j = 1, jj = ends.length; j < jj; ++j) {\n if (ends[j] !== ends[j - 1]) {\n holeFlatCoords = translate(flatCoordinates, ends[j - 1],\n ends[j], stride, -this.origin[0], -this.origin[1]);\n holes.push(holeFlatCoords);\n }\n }\n this.lineStringReplay.drawPolygonCoordinates(outerRing, holes, stride);\n this.drawCoordinates_(outerRing, holes, stride);\n }\n }\n start = ends[ends.length - 1];\n }\n if (this.indices.length > currIndex) {\n this.startIndices.push(currIndex);\n this.startIndicesFeature.push(feature);\n if (this.state_.changed) {\n this.styleIndices_.push(currIndex);\n this.state_.changed = false;\n }\n }\n if (this.lineStringReplay.getCurrentIndex() > currLineIndex) {\n this.lineStringReplay.setPolygonStyle(feature, currLineIndex);\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLPolygonReplay.prototype.drawPolygon = function drawPolygon (polygonGeometry, feature) {\n var ends = polygonGeometry.getEnds();\n var stride = polygonGeometry.getStride();\n if (ends.length > 0) {\n var flatCoordinates = polygonGeometry.getFlatCoordinates().map(Number);\n var outerRing = translate(flatCoordinates, 0, ends[0],\n stride, -this.origin[0], -this.origin[1]);\n if (outerRing.length) {\n var holes = [];\n var i, ii, holeFlatCoords;\n for (i = 1, ii = ends.length; i < ii; ++i) {\n if (ends[i] !== ends[i - 1]) {\n holeFlatCoords = translate(flatCoordinates, ends[i - 1],\n ends[i], stride, -this.origin[0], -this.origin[1]);\n holes.push(holeFlatCoords);\n }\n }\n\n this.startIndices.push(this.indices.length);\n this.startIndicesFeature.push(feature);\n if (this.state_.changed) {\n this.styleIndices_.push(this.indices.length);\n this.state_.changed = false;\n }\n this.lineStringReplay.setPolygonStyle(feature);\n\n this.lineStringReplay.drawPolygonCoordinates(outerRing, holes, stride);\n this.drawCoordinates_(outerRing, holes, stride);\n }\n }\n };\n\n /**\n * @inheritDoc\n **/\n WebGLPolygonReplay.prototype.finish = function finish (context) {\n // create, bind, and populate the vertices buffer\n this.verticesBuffer = new WebGLBuffer(this.vertices);\n\n // create, bind, and populate the indices buffer\n this.indicesBuffer = new WebGLBuffer(this.indices);\n\n this.startIndices.push(this.indices.length);\n\n this.lineStringReplay.finish(context);\n\n //Clean up, if there is nothing to draw\n if (this.styleIndices_.length === 0 && this.styles_.length > 0) {\n this.styles_ = [];\n }\n\n this.vertices = null;\n this.indices = null;\n };\n\n /**\n * @inheritDoc\n */\n WebGLPolygonReplay.prototype.getDeleteResourcesFunction = function getDeleteResourcesFunction (context) {\n var verticesBuffer = this.verticesBuffer;\n var indicesBuffer = this.indicesBuffer;\n var lineDeleter = this.lineStringReplay.getDeleteResourcesFunction(context);\n return function() {\n context.deleteBuffer(verticesBuffer);\n context.deleteBuffer(indicesBuffer);\n lineDeleter();\n };\n };\n\n /**\n * @inheritDoc\n */\n WebGLPolygonReplay.prototype.setUpProgram = function setUpProgram (gl, context, size, pixelRatio) {\n // get the program\n var program = context.getProgram(fragment, vertex);\n\n // get the locations\n var locations;\n if (!this.defaultLocations_) {\n locations = new Locations(gl, program);\n this.defaultLocations_ = locations;\n } else {\n locations = this.defaultLocations_;\n }\n\n context.useProgram(program);\n\n // enable the vertex attrib arrays\n gl.enableVertexAttribArray(locations.a_position);\n gl.vertexAttribPointer(locations.a_position, 2, FLOAT,\n false, 8, 0);\n\n return locations;\n };\n\n /**\n * @inheritDoc\n */\n WebGLPolygonReplay.prototype.shutDownProgram = function shutDownProgram (gl, locations) {\n gl.disableVertexAttribArray(locations.a_position);\n };\n\n /**\n * @inheritDoc\n */\n WebGLPolygonReplay.prototype.drawReplay = function drawReplay (gl, context, skippedFeaturesHash, hitDetection) {\n //Save GL parameters.\n var tmpDepthFunc = /** @type {number} */ (gl.getParameter(gl.DEPTH_FUNC));\n var tmpDepthMask = /** @type {boolean} */ (gl.getParameter(gl.DEPTH_WRITEMASK));\n\n if (!hitDetection) {\n gl.enable(gl.DEPTH_TEST);\n gl.depthMask(true);\n gl.depthFunc(gl.NOTEQUAL);\n }\n\n if (!isEmpty(skippedFeaturesHash)) {\n this.drawReplaySkipping_(gl, context, skippedFeaturesHash);\n } else {\n //Draw by style groups to minimize drawElements() calls.\n var i, start, end, nextStyle;\n end = this.startIndices[this.startIndices.length - 1];\n for (i = this.styleIndices_.length - 1; i >= 0; --i) {\n start = this.styleIndices_[i];\n nextStyle = this.styles_[i];\n this.setFillStyle_(gl, nextStyle);\n this.drawElements(gl, context, start, end);\n end = start;\n }\n }\n if (!hitDetection) {\n gl.disable(gl.DEPTH_TEST);\n gl.clear(gl.DEPTH_BUFFER_BIT);\n //Restore GL parameters.\n gl.depthMask(tmpDepthMask);\n gl.depthFunc(tmpDepthFunc);\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLPolygonReplay.prototype.drawHitDetectionReplayOneByOne = function drawHitDetectionReplayOneByOne (gl, context, skippedFeaturesHash, featureCallback, opt_hitExtent) {\n var i, start, end, nextStyle, groupStart, feature, featureIndex;\n featureIndex = this.startIndices.length - 2;\n end = this.startIndices[featureIndex + 1];\n for (i = this.styleIndices_.length - 1; i >= 0; --i) {\n nextStyle = this.styles_[i];\n this.setFillStyle_(gl, nextStyle);\n groupStart = this.styleIndices_[i];\n\n while (featureIndex >= 0 &&\n this.startIndices[featureIndex] >= groupStart) {\n start = this.startIndices[featureIndex];\n feature = this.startIndicesFeature[featureIndex];\n\n if (skippedFeaturesHash[getUid(feature)] === undefined &&\n feature.getGeometry() &&\n (opt_hitExtent === undefined || intersects(\n /** @type {Array<number>} */ (opt_hitExtent),\n feature.getGeometry().getExtent()))) {\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n this.drawElements(gl, context, start, end);\n\n var result = featureCallback(feature);\n\n if (result) {\n return result;\n }\n\n }\n featureIndex--;\n end = start;\n }\n }\n return undefined;\n };\n\n /**\n * @private\n * @param {WebGLRenderingContext} gl gl.\n * @param {import(\"../../webgl/Context.js\").default} context Context.\n * @param {Object} skippedFeaturesHash Ids of features to skip.\n */\n WebGLPolygonReplay.prototype.drawReplaySkipping_ = function drawReplaySkipping_ (gl, context, skippedFeaturesHash) {\n var i, start, end, nextStyle, groupStart, feature, featureIndex, featureStart;\n featureIndex = this.startIndices.length - 2;\n end = start = this.startIndices[featureIndex + 1];\n for (i = this.styleIndices_.length - 1; i >= 0; --i) {\n nextStyle = this.styles_[i];\n this.setFillStyle_(gl, nextStyle);\n groupStart = this.styleIndices_[i];\n\n while (featureIndex >= 0 &&\n this.startIndices[featureIndex] >= groupStart) {\n featureStart = this.startIndices[featureIndex];\n feature = this.startIndicesFeature[featureIndex];\n\n if (skippedFeaturesHash[getUid(feature)]) {\n if (start !== end) {\n this.drawElements(gl, context, start, end);\n gl.clear(gl.DEPTH_BUFFER_BIT);\n }\n end = featureStart;\n }\n featureIndex--;\n start = featureStart;\n }\n if (start !== end) {\n this.drawElements(gl, context, start, end);\n gl.clear(gl.DEPTH_BUFFER_BIT);\n }\n start = end = groupStart;\n }\n };\n\n /**\n * @private\n * @param {WebGLRenderingContext} gl gl.\n * @param {Array<number>} color Color.\n */\n WebGLPolygonReplay.prototype.setFillStyle_ = function setFillStyle_ (gl, color) {\n gl.uniform4fv(this.defaultLocations_.u_color, color);\n };\n\n /**\n * @inheritDoc\n */\n WebGLPolygonReplay.prototype.setFillStrokeStyle = function setFillStrokeStyle (fillStyle, strokeStyle) {\n var fillStyleColor = fillStyle ? fillStyle.getColor() : [0, 0, 0, 0];\n if (!(fillStyleColor instanceof CanvasGradient) &&\n !(fillStyleColor instanceof CanvasPattern)) {\n fillStyleColor = asArray(fillStyleColor).map(function(c, i) {\n return i != 3 ? c / 255 : c;\n }) || DEFAULT_FILLSTYLE;\n } else {\n fillStyleColor = DEFAULT_FILLSTYLE;\n }\n if (!this.state_.fillColor || !equals(fillStyleColor, this.state_.fillColor)) {\n this.state_.fillColor = fillStyleColor;\n this.state_.changed = true;\n this.styles_.push(fillStyleColor);\n }\n //Provide a null stroke style, if no strokeStyle is provided. Required for the draw interaction to work.\n if (strokeStyle) {\n this.lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n } else {\n var nullStrokeStyle = new Stroke({\n color: [0, 0, 0, 0],\n width: 0\n });\n this.lineStringReplay.setFillStrokeStyle(null, nullStrokeStyle);\n }\n };\n\n return WebGLPolygonReplay;\n}(WebGLReplay));\n\n\nexport default WebGLPolygonReplay;\n\n//# sourceMappingURL=PolygonReplay.js.map","/**\n * @module ol/style/Atlas\n */\nimport {createCanvasContext2D} from '../dom.js';\n\n\n/**\n * @typedef {Object} AtlasBlock\n * @property {number} x\n * @property {number} y\n * @property {number} width\n * @property {number} height\n */\n\n/**\n * Provides information for an image inside an atlas.\n * `offsetX` and `offsetY` are the position of the image inside the atlas image `image`.\n * @typedef {Object} AtlasInfo\n * @property {number} offsetX\n * @property {number} offsetY\n * @property {HTMLCanvasElement} image\n */\n\n\n/**\n * @classesc\n * This class facilitates the creation of image atlases.\n *\n * Images added to an atlas will be rendered onto a single\n * atlas canvas. The distribution of images on the canvas is\n * managed with the bin packing algorithm described in:\n * http://www.blackpawn.com/texts/lightmaps/\n *\n * @param {number} size The size in pixels of the sprite image.\n * @param {number} space The space in pixels between images.\n * Because texture coordinates are float values, the edges of\n * images might not be completely correct (in a way that the\n * edges overlap when being rendered). To avoid this we add a\n * padding around each image.\n */\nvar Atlas = function Atlas(size, space) {\n\n /**\n * @private\n * @type {number}\n */\n this.space_ = space;\n\n /**\n * @private\n * @type {Array<AtlasBlock>}\n */\n this.emptyBlocks_ = [{x: 0, y: 0, width: size, height: size}];\n\n /**\n * @private\n * @type {Object<string, AtlasInfo>}\n */\n this.entries_ = {};\n\n /**\n * @private\n * @type {CanvasRenderingContext2D}\n */\n this.context_ = createCanvasContext2D(size, size);\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.canvas_ = this.context_.canvas;\n};\n\n/**\n * @param {string} id The identifier of the entry to check.\n * @return {?AtlasInfo} The atlas info.\n */\nAtlas.prototype.get = function get (id) {\n return this.entries_[id] || null;\n};\n\n/**\n * @param {string} id The identifier of the entry to add.\n * @param {number} width The width.\n * @param {number} height The height.\n * @param {function(CanvasRenderingContext2D, number, number)} renderCallback\n * Called to render the new image onto an atlas image.\n * @param {Object=} opt_this Value to use as `this` when executing\n * `renderCallback`.\n * @return {?AtlasInfo} The position and atlas image for the entry.\n */\nAtlas.prototype.add = function add (id, width, height, renderCallback, opt_this) {\n for (var i = 0, ii = this.emptyBlocks_.length; i < ii; ++i) {\n var block = this.emptyBlocks_[i];\n if (block.width >= width + this.space_ &&\n block.height >= height + this.space_) {\n // we found a block that is big enough for our entry\n var entry = {\n offsetX: block.x + this.space_,\n offsetY: block.y + this.space_,\n image: this.canvas_\n };\n this.entries_[id] = entry;\n\n // render the image on the atlas image\n renderCallback.call(opt_this, this.context_,\n block.x + this.space_, block.y + this.space_);\n\n // split the block after the insertion, either horizontally or vertically\n this.split_(i, block, width + this.space_, height + this.space_);\n\n return entry;\n }\n }\n\n // there is no space for the new entry in this atlas\n return null;\n};\n\n/**\n * @private\n * @param {number} index The index of the block.\n * @param {AtlasBlock} block The block to split.\n * @param {number} width The width of the entry to insert.\n * @param {number} height The height of the entry to insert.\n */\nAtlas.prototype.split_ = function split_ (index, block, width, height) {\n var deltaWidth = block.width - width;\n var deltaHeight = block.height - height;\n\n /** @type {AtlasBlock} */\n var newBlock1;\n /** @type {AtlasBlock} */\n var newBlock2;\n\n if (deltaWidth > deltaHeight) {\n // split vertically\n // block right of the inserted entry\n newBlock1 = {\n x: block.x + width,\n y: block.y,\n width: block.width - width,\n height: block.height\n };\n\n // block below the inserted entry\n newBlock2 = {\n x: block.x,\n y: block.y + height,\n width: width,\n height: block.height - height\n };\n this.updateBlocks_(index, newBlock1, newBlock2);\n } else {\n // split horizontally\n // block right of the inserted entry\n newBlock1 = {\n x: block.x + width,\n y: block.y,\n width: block.width - width,\n height: height\n };\n\n // block below the inserted entry\n newBlock2 = {\n x: block.x,\n y: block.y + height,\n width: block.width,\n height: block.height - height\n };\n this.updateBlocks_(index, newBlock1, newBlock2);\n }\n};\n\n/**\n * Remove the old block and insert new blocks at the same array position.\n * The new blocks are inserted at the same position, so that splitted\n * blocks (that are potentially smaller) are filled first.\n * @private\n * @param {number} index The index of the block to remove.\n * @param {AtlasBlock} newBlock1 The 1st block to add.\n * @param {AtlasBlock} newBlock2 The 2nd block to add.\n */\nAtlas.prototype.updateBlocks_ = function updateBlocks_ (index, newBlock1, newBlock2) {\n var args = /** @type {Array<*>} */ ([index, 1]);\n if (newBlock1.width > 0 && newBlock1.height > 0) {\n args.push(newBlock1);\n }\n if (newBlock2.width > 0 && newBlock2.height > 0) {\n args.push(newBlock2);\n }\n this.emptyBlocks_.splice.apply(this.emptyBlocks_, args);\n};\n\nexport default Atlas;\n\n//# sourceMappingURL=Atlas.js.map","/**\n * @module ol/style/AtlasManager\n */\nimport {MAX_TEXTURE_SIZE as WEBGL_MAX_TEXTURE_SIZE} from '../webgl.js';\nimport {VOID} from '../functions.js';\nimport Atlas from './Atlas.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [initialSize=256] The size in pixels of the first atlas image.\n * @property {number} [maxSize] The maximum size in pixels of atlas images. Default is\n * `webgl/MAX_TEXTURE_SIZE` or 2048 if WebGL is not supported.\n * @property {number} [space=1] The space in pixels between images.\n */\n\n\n/**\n * Provides information for an image inside an atlas manager.\n * `offsetX` and `offsetY` is the position of the image inside\n * the atlas image `image` and the position of the hit-detection image\n * inside the hit-detection atlas image `hitImage`.\n * @typedef {Object} AtlasManagerInfo\n * @property {number} offsetX\n * @property {number} offsetY\n * @property {HTMLCanvasElement} image\n * @property {HTMLCanvasElement} hitImage\n */\n\n\n/**\n * The size in pixels of the first atlas image.\n * @type {number}\n */\nvar INITIAL_ATLAS_SIZE = 256;\n\n/**\n * The maximum size in pixels of atlas images.\n * @type {number}\n */\nvar MAX_ATLAS_SIZE = -1;\n\n\n/**\n * @classdesc\n * Manages the creation of image atlases.\n *\n * Images added to this manager will be inserted into an atlas, which\n * will be used for rendering.\n * The `size` given in the constructor is the size for the first\n * atlas. After that, when new atlases are created, they will have\n * twice the size as the latest atlas (until `maxSize` is reached).\n *\n * If an application uses many images or very large images, it is recommended\n * to set a higher `size` value to avoid the creation of too many atlases.\n * @api\n */\nvar AtlasManager = function AtlasManager(opt_options) {\n\n var options = opt_options || {};\n\n /**\n * The size in pixels of the latest atlas image.\n * @private\n * @type {number}\n */\n this.currentSize_ = options.initialSize !== undefined ?\n options.initialSize : INITIAL_ATLAS_SIZE;\n\n /**\n * The maximum size in pixels of atlas images.\n * @private\n * @type {number}\n */\n this.maxSize_ = options.maxSize !== undefined ?\n options.maxSize : MAX_ATLAS_SIZE != -1 ?\n MAX_ATLAS_SIZE : WEBGL_MAX_TEXTURE_SIZE !== undefined ?\n WEBGL_MAX_TEXTURE_SIZE : 2048;\n\n /**\n * The size in pixels between images.\n * @private\n * @type {number}\n */\n this.space_ = options.space !== undefined ? options.space : 1;\n\n /**\n * @private\n * @type {Array<import(\"./Atlas.js\").default>}\n */\n this.atlases_ = [new Atlas(this.currentSize_, this.space_)];\n\n /**\n * The size in pixels of the latest atlas image for hit-detection images.\n * @private\n * @type {number}\n */\n this.currentHitSize_ = this.currentSize_;\n\n /**\n * @private\n * @type {Array<import(\"./Atlas.js\").default>}\n */\n this.hitAtlases_ = [new Atlas(this.currentHitSize_, this.space_)];\n};\n\n/**\n * @param {string} id The identifier of the entry to check.\n * @return {?AtlasManagerInfo} The position and atlas image for the\n * entry, or `null` if the entry is not part of the atlas manager.\n */\nAtlasManager.prototype.getInfo = function getInfo (id) {\n /** @type {?import(\"./Atlas.js\").AtlasInfo} */\n var info = this.getInfo_(this.atlases_, id);\n\n if (!info) {\n return null;\n }\n var hitInfo = /** @type {import(\"./Atlas.js\").AtlasInfo} */ (this.getInfo_(this.hitAtlases_, id));\n\n return this.mergeInfos_(info, hitInfo);\n};\n\n/**\n * @private\n * @param {Array<import(\"./Atlas.js\").default>} atlases The atlases to search.\n * @param {string} id The identifier of the entry to check.\n * @return {?import(\"./Atlas.js\").AtlasInfo} The position and atlas image for the entry,\n * or `null` if the entry is not part of the atlases.\n */\nAtlasManager.prototype.getInfo_ = function getInfo_ (atlases, id) {\n for (var i = 0, ii = atlases.length; i < ii; ++i) {\n var atlas = atlases[i];\n var info = atlas.get(id);\n if (info) {\n return info;\n }\n }\n return null;\n};\n\n/**\n * @private\n * @param {import(\"./Atlas.js\").AtlasInfo} info The info for the real image.\n * @param {import(\"./Atlas.js\").AtlasInfo} hitInfo The info for the hit-detection\n * image.\n * @return {?AtlasManagerInfo} The position and atlas image for the\n * entry, or `null` if the entry is not part of the atlases.\n */\nAtlasManager.prototype.mergeInfos_ = function mergeInfos_ (info, hitInfo) {\n return (\n /** @type {AtlasManagerInfo} */ ({\n offsetX: info.offsetX,\n offsetY: info.offsetY,\n image: info.image,\n hitImage: hitInfo.image\n })\n );\n};\n\n/**\n * Add an image to the atlas manager.\n *\n * If an entry for the given id already exists, the entry will\n * be overridden (but the space on the atlas graphic will not be freed).\n *\n * If `renderHitCallback` is provided, the image (or the hit-detection version\n * of the image) will be rendered into a separate hit-detection atlas image.\n *\n * @param {string} id The identifier of the entry to add.\n * @param {number} width The width.\n * @param {number} height The height.\n * @param {function(CanvasRenderingContext2D, number, number)} renderCallback\n * Called to render the new image onto an atlas image.\n * @param {function(CanvasRenderingContext2D, number, number)=} opt_renderHitCallback Called to render a hit-detection image onto a hit\n * detection atlas image.\n * @param {Object=} opt_this Value to use as `this` when executing\n * `renderCallback` and `renderHitCallback`.\n * @return {?AtlasManagerInfo}The position and atlas image for the\n * entry, or `null` if the image is too big.\n */\nAtlasManager.prototype.add = function add (id, width, height, renderCallback, opt_renderHitCallback, opt_this) {\n if (width + this.space_ > this.maxSize_ ||\n height + this.space_ > this.maxSize_) {\n return null;\n }\n\n /** @type {?import(\"./Atlas.js\").AtlasInfo} */\n var info = this.add_(false, id, width, height, renderCallback, opt_this);\n if (!info) {\n return null;\n }\n\n // even if no hit-detection entry is requested, we insert a fake entry into\n // the hit-detection atlas, to make sure that the offset is the same for\n // the original image and the hit-detection image.\n var renderHitCallback = opt_renderHitCallback !== undefined ?\n opt_renderHitCallback : VOID;\n\n var hitInfo = /** @type {import(\"./Atlas.js\").AtlasInfo} */ (this.add_(true,\n id, width, height, renderHitCallback, opt_this));\n\n return this.mergeInfos_(info, hitInfo);\n};\n\n/**\n * @private\n * @param {boolean} isHitAtlas If the hit-detection atlases are used.\n * @param {string} id The identifier of the entry to add.\n * @param {number} width The width.\n * @param {number} height The height.\n * @param {function(CanvasRenderingContext2D, number, number)} renderCallback\n * Called to render the new image onto an atlas image.\n * @param {Object=} opt_this Value to use as `this` when executing\n * `renderCallback` and `renderHitCallback`.\n * @return {?import(\"./Atlas.js\").AtlasInfo}The position and atlas image for the entry,\n * or `null` if the image is too big.\n */\nAtlasManager.prototype.add_ = function add_ (isHitAtlas, id, width, height, renderCallback, opt_this) {\n var atlases = (isHitAtlas) ? this.hitAtlases_ : this.atlases_;\n var atlas, info, i, ii;\n for (i = 0, ii = atlases.length; i < ii; ++i) {\n atlas = atlases[i];\n info = atlas.add(id, width, height, renderCallback, opt_this);\n if (info) {\n return info;\n } else if (!info && i === ii - 1) {\n // the entry could not be added to one of the existing atlases,\n // create a new atlas that is twice as big and try to add to this one.\n var size = (void 0);\n if (isHitAtlas) {\n size = Math.min(this.currentHitSize_ * 2, this.maxSize_);\n this.currentHitSize_ = size;\n } else {\n size = Math.min(this.currentSize_ * 2, this.maxSize_);\n this.currentSize_ = size;\n }\n atlas = new Atlas(size, this.space_);\n atlases.push(atlas);\n // run the loop another time\n ++ii;\n }\n }\n return null;\n};\n\nexport default AtlasManager;\n\n//# sourceMappingURL=AtlasManager.js.map","/**\n * @module ol/render/webgl/TextReplay\n */\nimport {getUid} from '../../util.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport {CANVAS_LINE_DASH} from '../../has.js';\nimport {TEXT_ALIGN} from '../replay.js';\nimport {DEFAULT_FILLSTYLE, DEFAULT_FONT, DEFAULT_LINECAP, DEFAULT_LINEDASH,\n DEFAULT_LINEDASHOFFSET, DEFAULT_LINEJOIN, DEFAULT_LINEWIDTH, DEFAULT_MITERLIMIT,\n DEFAULT_STROKESTYLE, DEFAULT_TEXTALIGN, DEFAULT_TEXTBASELINE} from '../webgl.js';\nimport WebGLTextureReplay from './TextureReplay.js';\nimport AtlasManager from '../../style/AtlasManager.js';\nimport WebGLBuffer from '../../webgl/Buffer.js';\n\n/**\n * @typedef {Object} GlyphAtlas\n * @property {import(\"../../style/AtlasManager.js\").default} atlas\n * @property {Object<string, number>} width\n * @property {number} height\n */\n\n\nvar WebGLTextReplay = /*@__PURE__*/(function (WebGLTextureReplay) {\n function WebGLTextReplay(tolerance, maxExtent) {\n WebGLTextureReplay.call(this, tolerance, maxExtent);\n\n /**\n * @private\n * @type {Array<HTMLCanvasElement>}\n */\n this.images_ = [];\n\n /**\n * @private\n * @type {Array<WebGLTexture>}\n */\n this.textures_ = [];\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.measureCanvas_ = createCanvasContext2D(0, 0).canvas;\n\n /**\n * @private\n * @type {{strokeColor: (import(\"../../colorlike.js\").ColorLike|null),\n * lineCap: (string|undefined),\n * lineDash: Array<number>,\n * lineDashOffset: (number|undefined),\n * lineJoin: (string|undefined),\n * lineWidth: number,\n * miterLimit: (number|undefined),\n * fillColor: (import(\"../../colorlike.js\").ColorLike|null),\n * font: (string|undefined),\n * scale: (number|undefined)}}\n */\n this.state_ = {\n strokeColor: null,\n lineCap: undefined,\n lineDash: null,\n lineDashOffset: undefined,\n lineJoin: undefined,\n lineWidth: 0,\n miterLimit: undefined,\n fillColor: null,\n font: undefined,\n scale: undefined\n };\n\n /**\n * @private\n * @type {string}\n */\n this.text_ = '';\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.textAlign_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.textBaseline_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.offsetX_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.offsetY_ = undefined;\n\n /**\n * @private\n * @type {Object<string, GlyphAtlas>}\n */\n this.atlases_ = {};\n\n /**\n * @private\n * @type {GlyphAtlas|undefined}\n */\n this.currAtlas_ = undefined;\n\n this.scale = 1;\n\n this.opacity = 1;\n\n }\n\n if ( WebGLTextureReplay ) WebGLTextReplay.__proto__ = WebGLTextureReplay;\n WebGLTextReplay.prototype = Object.create( WebGLTextureReplay && WebGLTextureReplay.prototype );\n WebGLTextReplay.prototype.constructor = WebGLTextReplay;\n\n /**\n * @inheritDoc\n */\n WebGLTextReplay.prototype.drawText = function drawText (geometry, feature) {\n if (this.text_) {\n var flatCoordinates = null;\n var offset = 0;\n var end = 2;\n var stride = 2;\n switch (geometry.getType()) {\n case GeometryType.POINT:\n case GeometryType.MULTI_POINT:\n flatCoordinates = geometry.getFlatCoordinates();\n end = flatCoordinates.length;\n stride = geometry.getStride();\n break;\n case GeometryType.CIRCLE:\n flatCoordinates = /** @type {import(\"../../geom/Circle.js\").default} */ (geometry).getCenter();\n break;\n case GeometryType.LINE_STRING:\n flatCoordinates = /** @type {import(\"../../geom/LineString.js\").default} */ (geometry).getFlatMidpoint();\n break;\n case GeometryType.MULTI_LINE_STRING:\n flatCoordinates = /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry).getFlatMidpoints();\n end = flatCoordinates.length;\n break;\n case GeometryType.POLYGON:\n flatCoordinates = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry).getFlatInteriorPoint();\n break;\n case GeometryType.MULTI_POLYGON:\n flatCoordinates = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getFlatInteriorPoints();\n end = flatCoordinates.length;\n break;\n default:\n }\n this.startIndices.push(this.indices.length);\n this.startIndicesFeature.push(feature);\n\n var glyphAtlas = this.currAtlas_;\n var lines = this.text_.split('\\n');\n var textSize = this.getTextSize_(lines);\n var i, ii, j, jj, currX, currY, charArr, charInfo;\n var anchorX = Math.round(textSize[0] * this.textAlign_ - this.offsetX_);\n var anchorY = Math.round(textSize[1] * this.textBaseline_ - this.offsetY_);\n var lineWidth = (this.state_.lineWidth / 2) * this.state_.scale;\n\n for (i = 0, ii = lines.length; i < ii; ++i) {\n currX = 0;\n currY = glyphAtlas.height * i;\n charArr = lines[i].split('');\n\n for (j = 0, jj = charArr.length; j < jj; ++j) {\n charInfo = glyphAtlas.atlas.getInfo(charArr[j]);\n\n if (charInfo) {\n var image = charInfo.image;\n\n this.anchorX = anchorX - currX;\n this.anchorY = anchorY - currY;\n this.originX = j === 0 ? charInfo.offsetX - lineWidth : charInfo.offsetX;\n this.originY = charInfo.offsetY;\n this.height = glyphAtlas.height;\n this.width = j === 0 || j === charArr.length - 1 ?\n glyphAtlas.width[charArr[j]] + lineWidth : glyphAtlas.width[charArr[j]];\n this.imageHeight = image.height;\n this.imageWidth = image.width;\n\n if (this.images_.length === 0) {\n this.images_.push(image);\n } else {\n var currentImage = this.images_[this.images_.length - 1];\n if (getUid(currentImage) != getUid(image)) {\n this.groupIndices.push(this.indices.length);\n this.images_.push(image);\n }\n }\n\n this.drawText_(flatCoordinates, offset, end, stride);\n }\n currX += this.width;\n }\n }\n }\n };\n\n /**\n * @private\n * @param {Array<string>} lines Label to draw split to lines.\n * @return {Array<number>} Size of the label in pixels.\n */\n WebGLTextReplay.prototype.getTextSize_ = function getTextSize_ (lines) {\n var self = this;\n var glyphAtlas = this.currAtlas_;\n var textHeight = lines.length * glyphAtlas.height;\n //Split every line to an array of chars, sum up their width, and select the longest.\n var textWidth = lines.map(function(str) {\n var sum = 0;\n for (var i = 0, ii = str.length; i < ii; ++i) {\n var curr = str[i];\n if (!glyphAtlas.width[curr]) {\n self.addCharToAtlas_(curr);\n }\n sum += glyphAtlas.width[curr] ? glyphAtlas.width[curr] : 0;\n }\n return sum;\n }).reduce(function(max, curr) {\n return Math.max(max, curr);\n });\n\n return [textWidth, textHeight];\n };\n\n /**\n * @private\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n */\n WebGLTextReplay.prototype.drawText_ = function drawText_ (flatCoordinates, offset, end, stride) {\n for (var i = offset, ii = end; i < ii; i += stride) {\n this.drawCoordinates(flatCoordinates, offset, end, stride);\n }\n };\n\n /**\n * @private\n * @param {string} char Character.\n */\n WebGLTextReplay.prototype.addCharToAtlas_ = function addCharToAtlas_ (char) {\n if (char.length === 1) {\n var glyphAtlas = this.currAtlas_;\n var state = this.state_;\n var mCtx = this.measureCanvas_.getContext('2d');\n mCtx.font = state.font;\n var width = Math.ceil(mCtx.measureText(char).width * state.scale);\n\n var info = glyphAtlas.atlas.add(char, width, glyphAtlas.height,\n function(ctx, x, y) {\n //Parameterize the canvas\n ctx.font = /** @type {string} */ (state.font);\n ctx.fillStyle = state.fillColor;\n ctx.strokeStyle = state.strokeColor;\n ctx.lineWidth = state.lineWidth;\n ctx.lineCap = /** @type {CanvasLineCap} */ (state.lineCap);\n ctx.lineJoin = /** @type {CanvasLineJoin} */ (state.lineJoin);\n ctx.miterLimit = /** @type {number} */ (state.miterLimit);\n ctx.textAlign = 'left';\n ctx.textBaseline = 'top';\n if (CANVAS_LINE_DASH && state.lineDash) {\n //FIXME: use pixelRatio\n ctx.setLineDash(state.lineDash);\n ctx.lineDashOffset = /** @type {number} */ (state.lineDashOffset);\n }\n if (state.scale !== 1) {\n //FIXME: use pixelRatio\n ctx.setTransform(/** @type {number} */ (state.scale), 0, 0,\n /** @type {number} */ (state.scale), 0, 0);\n }\n\n //Draw the character on the canvas\n if (state.strokeColor) {\n ctx.strokeText(char, x, y);\n }\n if (state.fillColor) {\n ctx.fillText(char, x, y);\n }\n });\n\n if (info) {\n glyphAtlas.width[char] = width;\n }\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLTextReplay.prototype.finish = function finish (context) {\n var gl = context.getGL();\n\n this.groupIndices.push(this.indices.length);\n this.hitDetectionGroupIndices = this.groupIndices;\n\n // create, bind, and populate the vertices buffer\n this.verticesBuffer = new WebGLBuffer(this.vertices);\n\n // create, bind, and populate the indices buffer\n this.indicesBuffer = new WebGLBuffer(this.indices);\n\n // create textures\n /** @type {Object<string, WebGLTexture>} */\n var texturePerImage = {};\n\n this.createTextures(this.textures_, this.images_, texturePerImage, gl);\n\n this.state_ = {\n strokeColor: null,\n lineCap: undefined,\n lineDash: null,\n lineDashOffset: undefined,\n lineJoin: undefined,\n lineWidth: 0,\n miterLimit: undefined,\n fillColor: null,\n font: undefined,\n scale: undefined\n };\n this.text_ = '';\n this.textAlign_ = undefined;\n this.textBaseline_ = undefined;\n this.offsetX_ = undefined;\n this.offsetY_ = undefined;\n this.images_ = null;\n this.atlases_ = {};\n this.currAtlas_ = undefined;\n WebGLTextureReplay.prototype.finish.call(this, context);\n };\n\n /**\n * @inheritDoc\n */\n WebGLTextReplay.prototype.setTextStyle = function setTextStyle (textStyle) {\n var state = this.state_;\n var textFillStyle = textStyle.getFill();\n var textStrokeStyle = textStyle.getStroke();\n if (!textStyle || !textStyle.getText() || (!textFillStyle && !textStrokeStyle)) {\n this.text_ = '';\n } else {\n if (!textFillStyle) {\n state.fillColor = null;\n } else {\n var textFillStyleColor = textFillStyle.getColor();\n state.fillColor = asColorLike(textFillStyleColor ?\n textFillStyleColor : DEFAULT_FILLSTYLE);\n }\n if (!textStrokeStyle) {\n state.strokeColor = null;\n state.lineWidth = 0;\n } else {\n var textStrokeStyleColor = textStrokeStyle.getColor();\n state.strokeColor = asColorLike(textStrokeStyleColor ?\n textStrokeStyleColor : DEFAULT_STROKESTYLE);\n state.lineWidth = textStrokeStyle.getWidth() || DEFAULT_LINEWIDTH;\n state.lineCap = textStrokeStyle.getLineCap() || DEFAULT_LINECAP;\n state.lineDashOffset = textStrokeStyle.getLineDashOffset() || DEFAULT_LINEDASHOFFSET;\n state.lineJoin = textStrokeStyle.getLineJoin() || DEFAULT_LINEJOIN;\n state.miterLimit = textStrokeStyle.getMiterLimit() || DEFAULT_MITERLIMIT;\n var lineDash = textStrokeStyle.getLineDash();\n state.lineDash = lineDash ? lineDash.slice() : DEFAULT_LINEDASH;\n }\n state.font = textStyle.getFont() || DEFAULT_FONT;\n state.scale = textStyle.getScale() || 1;\n this.text_ = /** @type {string} */ (textStyle.getText());\n var textAlign = TEXT_ALIGN[textStyle.getTextAlign()];\n var textBaseline = TEXT_ALIGN[textStyle.getTextBaseline()];\n this.textAlign_ = textAlign === undefined ?\n DEFAULT_TEXTALIGN : textAlign;\n this.textBaseline_ = textBaseline === undefined ?\n DEFAULT_TEXTBASELINE : textBaseline;\n this.offsetX_ = textStyle.getOffsetX() || 0;\n this.offsetY_ = textStyle.getOffsetY() || 0;\n this.rotateWithView = !!textStyle.getRotateWithView();\n this.rotation = textStyle.getRotation() || 0;\n\n this.currAtlas_ = this.getAtlas_(state);\n }\n };\n\n /**\n * @private\n * @param {Object} state Font attributes.\n * @return {GlyphAtlas} Glyph atlas.\n */\n WebGLTextReplay.prototype.getAtlas_ = function getAtlas_ (state) {\n var params = [];\n for (var i in state) {\n if (state[i] || state[i] === 0) {\n if (Array.isArray(state[i])) {\n params = params.concat(state[i]);\n } else {\n params.push(state[i]);\n }\n }\n }\n var hash = this.calculateHash_(params);\n if (!this.atlases_[hash]) {\n var mCtx = this.measureCanvas_.getContext('2d');\n mCtx.font = state.font;\n var height = Math.ceil((mCtx.measureText('M').width * 1.5 +\n state.lineWidth / 2) * state.scale);\n\n this.atlases_[hash] = {\n atlas: new AtlasManager({\n space: state.lineWidth + 1\n }),\n width: {},\n height: height\n };\n }\n return this.atlases_[hash];\n };\n\n /**\n * @private\n * @param {Array<string|number>} params Array of parameters.\n * @return {string} Hash string.\n */\n WebGLTextReplay.prototype.calculateHash_ = function calculateHash_ (params) {\n //TODO: Create a more performant, reliable, general hash function.\n var hash = '';\n for (var i = 0, ii = params.length; i < ii; ++i) {\n hash += params[i];\n }\n return hash;\n };\n\n /**\n * @inheritDoc\n */\n WebGLTextReplay.prototype.getTextures = function getTextures (opt_all) {\n return this.textures_;\n };\n\n /**\n * @inheritDoc\n */\n WebGLTextReplay.prototype.getHitDetectionTextures = function getHitDetectionTextures () {\n return this.textures_;\n };\n\n return WebGLTextReplay;\n}(WebGLTextureReplay));\n\n\nexport default WebGLTextReplay;\n\n//# sourceMappingURL=TextReplay.js.map","/**\n * @module ol/render/webgl/ReplayGroup\n */\n\nimport {numberSafeCompareFunction} from '../../array.js';\nimport {buffer, createOrUpdateFromCoordinate} from '../../extent.js';\nimport {isEmpty} from '../../obj.js';\nimport {ORDER} from '../replay.js';\nimport ReplayGroup from '../ReplayGroup.js';\nimport WebGLCircleReplay from './CircleReplay.js';\nimport WebGLImageReplay from './ImageReplay.js';\nimport WebGLLineStringReplay from './LineStringReplay.js';\nimport WebGLPolygonReplay from './PolygonReplay.js';\nimport WebGLTextReplay from './TextReplay.js';\n\n/**\n * @type {Array<number>}\n */\nvar HIT_DETECTION_SIZE = [1, 1];\n\n/**\n * @type {Object<import(\"../ReplayType.js\").default, typeof import(\"./Replay.js\").default>}\n */\nvar BATCH_CONSTRUCTORS = {\n 'Circle': WebGLCircleReplay,\n 'Image': WebGLImageReplay,\n 'LineString': WebGLLineStringReplay,\n 'Polygon': WebGLPolygonReplay,\n 'Text': WebGLTextReplay\n};\n\n\nvar WebGLReplayGroup = /*@__PURE__*/(function (ReplayGroup) {\n function WebGLReplayGroup(tolerance, maxExtent, opt_renderBuffer) {\n ReplayGroup.call(this);\n\n /**\n * @type {import(\"../../extent.js\").Extent}\n * @private\n */\n this.maxExtent_ = maxExtent;\n\n /**\n * @type {number}\n * @private\n */\n this.tolerance_ = tolerance;\n\n /**\n * @type {number|undefined}\n * @private\n */\n this.renderBuffer_ = opt_renderBuffer;\n\n /**\n * @private\n * @type {!Object<string,\n * Object<import(\"../ReplayType.js\").default, import(\"./Replay.js\").default>>}\n */\n this.replaysByZIndex_ = {};\n\n }\n\n if ( ReplayGroup ) WebGLReplayGroup.__proto__ = ReplayGroup;\n WebGLReplayGroup.prototype = Object.create( ReplayGroup && ReplayGroup.prototype );\n WebGLReplayGroup.prototype.constructor = WebGLReplayGroup;\n\n /**\n * @inheritDoc\n */\n WebGLReplayGroup.prototype.addDeclutter = function addDeclutter (group) {\n return [];\n };\n\n /**\n * @param {import(\"../../webgl/Context.js\").default} context WebGL context.\n * @return {function()} Delete resources function.\n */\n WebGLReplayGroup.prototype.getDeleteResourcesFunction = function getDeleteResourcesFunction (context) {\n var functions = [];\n var zKey;\n for (zKey in this.replaysByZIndex_) {\n var replays = this.replaysByZIndex_[zKey];\n for (var replayKey in replays) {\n functions.push(\n replays[replayKey].getDeleteResourcesFunction(context));\n }\n }\n return function() {\n var arguments$1 = arguments;\n\n var length = functions.length;\n var result;\n for (var i = 0; i < length; i++) {\n result = functions[i].apply(this, arguments$1);\n }\n return result;\n };\n };\n\n /**\n * @param {import(\"../../webgl/Context.js\").default} context Context.\n */\n WebGLReplayGroup.prototype.finish = function finish (context) {\n var zKey;\n for (zKey in this.replaysByZIndex_) {\n var replays = this.replaysByZIndex_[zKey];\n for (var replayKey in replays) {\n replays[replayKey].finish(context);\n }\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLReplayGroup.prototype.getReplay = function getReplay (zIndex, replayType) {\n var zIndexKey = zIndex !== undefined ? zIndex.toString() : '0';\n var replays = this.replaysByZIndex_[zIndexKey];\n if (replays === undefined) {\n replays = {};\n this.replaysByZIndex_[zIndexKey] = replays;\n }\n var replay = replays[replayType];\n if (replay === undefined) {\n var Constructor = BATCH_CONSTRUCTORS[replayType];\n replay = new Constructor(this.tolerance_, this.maxExtent_);\n replays[replayType] = replay;\n }\n return replay;\n };\n\n /**\n * @inheritDoc\n */\n WebGLReplayGroup.prototype.isEmpty = function isEmpty$1 () {\n return isEmpty(this.replaysByZIndex_);\n };\n\n /**\n * @param {import(\"../../webgl/Context.js\").default} context Context.\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 {number} pixelRatio Pixel ratio.\n * @param {number} opacity Global opacity.\n * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n */\n WebGLReplayGroup.prototype.replay = function replay (\n context,\n center,\n resolution,\n rotation,\n size,\n pixelRatio,\n opacity,\n skippedFeaturesHash\n ) {\n /** @type {Array<number>} */\n var zs = Object.keys(this.replaysByZIndex_).map(Number);\n zs.sort(numberSafeCompareFunction);\n\n var i, ii, j, jj, replays, replay;\n for (i = 0, ii = zs.length; i < ii; ++i) {\n replays = this.replaysByZIndex_[zs[i].toString()];\n for (j = 0, jj = ORDER.length; j < jj; ++j) {\n replay = replays[ORDER[j]];\n if (replay !== undefined) {\n replay.replay(context,\n center, resolution, rotation, size, pixelRatio,\n opacity, skippedFeaturesHash,\n undefined, false);\n }\n }\n }\n };\n\n /**\n * @private\n * @param {import(\"../../webgl/Context.js\").default} context Context.\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 {number} pixelRatio Pixel ratio.\n * @param {number} opacity Global opacity.\n * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T|undefined} featureCallback Feature callback.\n * @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.\n * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Hit extent: Only features intersecting\n * this extent are checked.\n * @return {T|undefined} Callback result.\n * @template T\n */\n WebGLReplayGroup.prototype.replayHitDetection_ = function replayHitDetection_ (\n context,\n center,\n resolution,\n rotation,\n size,\n pixelRatio,\n opacity,\n skippedFeaturesHash,\n featureCallback,\n oneByOne,\n opt_hitExtent\n ) {\n /** @type {Array<number>} */\n var zs = Object.keys(this.replaysByZIndex_).map(Number);\n zs.sort(function(a, b) {\n return b - a;\n });\n\n var i, ii, j, replays, replay, result;\n for (i = 0, ii = zs.length; i < ii; ++i) {\n replays = this.replaysByZIndex_[zs[i].toString()];\n for (j = ORDER.length - 1; j >= 0; --j) {\n replay = replays[ORDER[j]];\n if (replay !== undefined) {\n result = replay.replay(context,\n center, resolution, rotation, size, pixelRatio, opacity,\n skippedFeaturesHash, featureCallback, oneByOne, opt_hitExtent);\n if (result) {\n return result;\n }\n }\n }\n }\n return undefined;\n };\n\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../../webgl/Context.js\").default} context Context.\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 {number} pixelRatio Pixel ratio.\n * @param {number} opacity Global opacity.\n * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T|undefined} callback Feature callback.\n * @return {T|undefined} Callback result.\n * @template T\n */\n WebGLReplayGroup.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (\n coordinate,\n context,\n center,\n resolution,\n rotation,\n size,\n pixelRatio,\n opacity,\n skippedFeaturesHash,\n callback\n ) {\n var gl = context.getGL();\n gl.bindFramebuffer(\n gl.FRAMEBUFFER, context.getHitDetectionFramebuffer());\n\n\n /**\n * @type {import(\"../../extent.js\").Extent}\n */\n var hitExtent;\n if (this.renderBuffer_ !== undefined) {\n // build an extent around the coordinate, so that only features that\n // intersect this extent are checked\n hitExtent = buffer(createOrUpdateFromCoordinate(coordinate), resolution * this.renderBuffer_);\n }\n\n return this.replayHitDetection_(context,\n coordinate, resolution, rotation, HIT_DETECTION_SIZE,\n pixelRatio, opacity, skippedFeaturesHash,\n /**\n * @param {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} feature Feature.\n * @return {?} Callback result.\n */\n function(feature) {\n var imageData = new Uint8Array(4);\n gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, imageData);\n\n if (imageData[3] > 0) {\n var result = callback(feature);\n if (result) {\n return result;\n }\n }\n }, true, hitExtent);\n };\n\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../../webgl/Context.js\").default} context Context.\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 {number} pixelRatio Pixel ratio.\n * @param {number} opacity Global opacity.\n * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n * @return {boolean} Is there a feature at the given coordinate?\n */\n WebGLReplayGroup.prototype.hasFeatureAtCoordinate = function hasFeatureAtCoordinate (\n coordinate,\n context,\n center,\n resolution,\n rotation,\n size,\n pixelRatio,\n opacity,\n skippedFeaturesHash\n ) {\n var gl = context.getGL();\n gl.bindFramebuffer(\n gl.FRAMEBUFFER, context.getHitDetectionFramebuffer());\n\n var hasFeature = this.replayHitDetection_(context,\n coordinate, resolution, rotation, HIT_DETECTION_SIZE,\n pixelRatio, opacity, skippedFeaturesHash,\n /**\n * @param {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} feature Feature.\n * @return {boolean} Is there a feature?\n */\n function(feature) {\n var imageData = new Uint8Array(4);\n gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, imageData);\n return imageData[3] > 0;\n }, false);\n\n return hasFeature !== undefined;\n };\n\n return WebGLReplayGroup;\n}(ReplayGroup));\n\n\nexport default WebGLReplayGroup;\n\n//# sourceMappingURL=ReplayGroup.js.map","/**\n * @module ol/render/webgl/Immediate\n */\n\nimport {intersects} from '../../extent.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport ReplayType from '../ReplayType.js';\nimport VectorContext from '../VectorContext.js';\nimport WebGLReplayGroup from './ReplayGroup.js';\n\nvar WebGLImmediateRenderer = /*@__PURE__*/(function (VectorContext) {\n function WebGLImmediateRenderer(context, center, resolution, rotation, size, extent, pixelRatio) {\n VectorContext.call(this);\n\n /**\n * @private\n */\n this.context_ = context;\n\n /**\n * @private\n */\n this.center_ = center;\n\n /**\n * @private\n */\n this.extent_ = extent;\n\n /**\n * @private\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @private\n */\n this.size_ = size;\n\n /**\n * @private\n */\n this.rotation_ = rotation;\n\n /**\n * @private\n */\n this.resolution_ = resolution;\n\n /**\n * @private\n * @type {import(\"../../style/Image.js\").default}\n */\n this.imageStyle_ = null;\n\n /**\n * @private\n * @type {import(\"../../style/Fill.js\").default}\n */\n this.fillStyle_ = null;\n\n /**\n * @private\n * @type {import(\"../../style/Stroke.js\").default}\n */\n this.strokeStyle_ = null;\n\n /**\n * @private\n * @type {import(\"../../style/Text.js\").default}\n */\n this.textStyle_ = null;\n\n }\n\n if ( VectorContext ) WebGLImmediateRenderer.__proto__ = VectorContext;\n WebGLImmediateRenderer.prototype = Object.create( VectorContext && VectorContext.prototype );\n WebGLImmediateRenderer.prototype.constructor = WebGLImmediateRenderer;\n\n /**\n * @param {import(\"./ReplayGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n * @private\n */\n WebGLImmediateRenderer.prototype.drawText_ = function drawText_ (replayGroup, geometry) {\n var context = this.context_;\n var replay = /** @type {import(\"./TextReplay.js\").default} */ (\n replayGroup.getReplay(0, ReplayType.TEXT));\n replay.setTextStyle(this.textStyle_);\n replay.drawText(geometry, null);\n replay.finish(context);\n // default colors\n var opacity = 1;\n /** @type {Object<string, boolean>} */\n var skippedFeatures = {};\n var featureCallback;\n var oneByOne = false;\n replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,\n this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,\n oneByOne);\n replay.getDeleteResourcesFunction(context)();\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 * @override\n * @api\n */\n WebGLImmediateRenderer.prototype.setStyle = function setStyle (style) {\n this.setFillStrokeStyle(style.getFill(), style.getStroke());\n this.setImageStyle(style.getImage());\n this.setTextStyle(style.getText());\n };\n\n /**\n * Render a geometry into the canvas. Call\n * {@link ol/render/webgl/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 * @override\n * @api\n */\n WebGLImmediateRenderer.prototype.drawGeometry = function drawGeometry (geometry) {\n var type = geometry.getType();\n switch (type) {\n case GeometryType.POINT:\n this.drawPoint(/** @type {import(\"../../geom/Point.js\").default} */ (geometry), null);\n break;\n case GeometryType.LINE_STRING:\n this.drawLineString(/** @type {import(\"../../geom/LineString.js\").default} */ (geometry), null);\n break;\n case GeometryType.POLYGON:\n this.drawPolygon(/** @type {import(\"../../geom/Polygon.js\").default} */ (geometry), null);\n break;\n case GeometryType.MULTI_POINT:\n this.drawMultiPoint(/** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry), null);\n break;\n case GeometryType.MULTI_LINE_STRING:\n this.drawMultiLineString(/** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry), null);\n break;\n case GeometryType.MULTI_POLYGON:\n this.drawMultiPolygon(/** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry), null);\n break;\n case GeometryType.GEOMETRY_COLLECTION:\n this.drawGeometryCollection(/** @type {import(\"../../geom/GeometryCollection.js\").default} */ (geometry), null);\n break;\n case GeometryType.CIRCLE:\n this.drawCircle(/** @type {import(\"../../geom/Circle.js\").default} */ (geometry), null);\n break;\n default:\n // pass\n }\n };\n\n /**\n * @inheritDoc\n * @api\n */\n WebGLImmediateRenderer.prototype.drawFeature = function drawFeature (feature, style) {\n var geometry = style.getGeometryFunction()(feature);\n if (!geometry || !intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n this.setStyle(style);\n this.drawGeometry(geometry);\n };\n\n /**\n * @inheritDoc\n */\n WebGLImmediateRenderer.prototype.drawGeometryCollection = function drawGeometryCollection (geometry, data) {\n var geometries = geometry.getGeometriesArray();\n var i, ii;\n for (i = 0, ii = geometries.length; i < ii; ++i) {\n this.drawGeometry(geometries[i]);\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLImmediateRenderer.prototype.drawPoint = function drawPoint (geometry, data) {\n var context = this.context_;\n var replayGroup = new WebGLReplayGroup(1, this.extent_);\n var replay = /** @type {import(\"./ImageReplay.js\").default} */ (\n replayGroup.getReplay(0, ReplayType.IMAGE));\n replay.setImageStyle(this.imageStyle_);\n replay.drawPoint(geometry, data);\n replay.finish(context);\n // default colors\n var opacity = 1;\n /** @type {Object<string, boolean>} */\n var skippedFeatures = {};\n var featureCallback;\n var oneByOne = false;\n replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,\n this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,\n oneByOne);\n replay.getDeleteResourcesFunction(context)();\n\n if (this.textStyle_) {\n this.drawText_(replayGroup, geometry);\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLImmediateRenderer.prototype.drawMultiPoint = function drawMultiPoint (geometry, data) {\n var context = this.context_;\n var replayGroup = new WebGLReplayGroup(1, this.extent_);\n var replay = /** @type {import(\"./ImageReplay.js\").default} */ (\n replayGroup.getReplay(0, ReplayType.IMAGE));\n replay.setImageStyle(this.imageStyle_);\n replay.drawMultiPoint(geometry, data);\n replay.finish(context);\n var opacity = 1;\n /** @type {Object<string, boolean>} */\n var skippedFeatures = {};\n var featureCallback;\n var oneByOne = false;\n replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,\n this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,\n oneByOne);\n replay.getDeleteResourcesFunction(context)();\n\n if (this.textStyle_) {\n this.drawText_(replayGroup, geometry);\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLImmediateRenderer.prototype.drawLineString = function drawLineString (geometry, data) {\n var context = this.context_;\n var replayGroup = new WebGLReplayGroup(1, this.extent_);\n var replay = /** @type {import(\"./LineStringReplay.js\").default} */ (\n replayGroup.getReplay(0, ReplayType.LINE_STRING));\n replay.setFillStrokeStyle(null, this.strokeStyle_);\n replay.drawLineString(geometry, data);\n replay.finish(context);\n var opacity = 1;\n /** @type {Object<string, boolean>} */\n var skippedFeatures = {};\n var featureCallback;\n var oneByOne = false;\n replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,\n this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,\n oneByOne);\n replay.getDeleteResourcesFunction(context)();\n\n if (this.textStyle_) {\n this.drawText_(replayGroup, geometry);\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLImmediateRenderer.prototype.drawMultiLineString = function drawMultiLineString (geometry, data) {\n var context = this.context_;\n var replayGroup = new WebGLReplayGroup(1, this.extent_);\n var replay = /** @type {import(\"./LineStringReplay.js\").default} */ (\n replayGroup.getReplay(0, ReplayType.LINE_STRING));\n replay.setFillStrokeStyle(null, this.strokeStyle_);\n replay.drawMultiLineString(geometry, data);\n replay.finish(context);\n var opacity = 1;\n /** @type {Object<string, boolean>} */\n var skippedFeatures = {};\n var featureCallback;\n var oneByOne = false;\n replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,\n this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,\n oneByOne);\n replay.getDeleteResourcesFunction(context)();\n\n if (this.textStyle_) {\n this.drawText_(replayGroup, geometry);\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLImmediateRenderer.prototype.drawPolygon = function drawPolygon (geometry, data) {\n var context = this.context_;\n var replayGroup = new WebGLReplayGroup(1, this.extent_);\n var replay = /** @type {import(\"./PolygonReplay.js\").default} */ (\n replayGroup.getReplay(0, ReplayType.POLYGON));\n replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);\n replay.drawPolygon(geometry, data);\n replay.finish(context);\n var opacity = 1;\n /** @type {Object<string, boolean>} */\n var skippedFeatures = {};\n var featureCallback;\n var oneByOne = false;\n replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,\n this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,\n oneByOne);\n replay.getDeleteResourcesFunction(context)();\n\n if (this.textStyle_) {\n this.drawText_(replayGroup, geometry);\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLImmediateRenderer.prototype.drawMultiPolygon = function drawMultiPolygon (geometry, data) {\n var context = this.context_;\n var replayGroup = new WebGLReplayGroup(1, this.extent_);\n var replay = /** @type {import(\"./PolygonReplay.js\").default} */ (\n replayGroup.getReplay(0, ReplayType.POLYGON));\n replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);\n replay.drawMultiPolygon(geometry, data);\n replay.finish(context);\n var opacity = 1;\n /** @type {Object<string, boolean>} */\n var skippedFeatures = {};\n var featureCallback;\n var oneByOne = false;\n replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,\n this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,\n oneByOne);\n replay.getDeleteResourcesFunction(context)();\n\n if (this.textStyle_) {\n this.drawText_(replayGroup, geometry);\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLImmediateRenderer.prototype.drawCircle = function drawCircle (geometry, data) {\n var context = this.context_;\n var replayGroup = new WebGLReplayGroup(1, this.extent_);\n var replay = /** @type {import(\"./CircleReplay.js\").default} */ (\n replayGroup.getReplay(0, ReplayType.CIRCLE));\n replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);\n replay.drawCircle(geometry, data);\n replay.finish(context);\n var opacity = 1;\n /** @type {Object<string, boolean>} */\n var skippedFeatures = {};\n var featureCallback;\n var oneByOne = false;\n replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,\n this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,\n oneByOne);\n replay.getDeleteResourcesFunction(context)();\n\n if (this.textStyle_) {\n this.drawText_(replayGroup, geometry);\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLImmediateRenderer.prototype.setImageStyle = function setImageStyle (imageStyle) {\n this.imageStyle_ = imageStyle;\n };\n\n /**\n * @inheritDoc\n */\n WebGLImmediateRenderer.prototype.setFillStrokeStyle = function setFillStrokeStyle (fillStyle, strokeStyle) {\n this.fillStyle_ = fillStyle;\n this.strokeStyle_ = strokeStyle;\n };\n\n /**\n * @inheritDoc\n */\n WebGLImmediateRenderer.prototype.setTextStyle = function setTextStyle (textStyle) {\n this.textStyle_ = textStyle;\n };\n\n return WebGLImmediateRenderer;\n}(VectorContext));\n\n\nexport default WebGLImmediateRenderer;\n\n//# sourceMappingURL=Immediate.js.map","/**\n * @module ol/renderer/webgl/defaultmapshader\n */\n// This file is automatically generated, do not edit.\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../webgl.js';\nimport WebGLFragment from '../../webgl/Fragment.js';\nimport WebGLVertex from '../../webgl/Vertex.js';\n\nexport var fragment = new WebGLFragment(DEBUG_WEBGL ?\n 'precision mediump float;\\nvarying vec2 v_texCoord;\\n\\n\\nuniform float u_opacity;\\nuniform sampler2D u_texture;\\n\\nvoid main(void) {\\n vec4 texColor = texture2D(u_texture, v_texCoord);\\n gl_FragColor.rgb = texColor.rgb;\\n gl_FragColor.a = texColor.a * u_opacity;\\n}\\n' :\n 'precision mediump float;varying vec2 a;uniform float f;uniform sampler2D g;void main(void){vec4 texColor=texture2D(g,a);gl_FragColor.rgb=texColor.rgb;gl_FragColor.a=texColor.a*f;}');\n\nexport var vertex = new WebGLVertex(DEBUG_WEBGL ?\n 'varying vec2 v_texCoord;\\n\\n\\nattribute vec2 a_position;\\nattribute vec2 a_texCoord;\\n\\nuniform mat4 u_texCoordMatrix;\\nuniform mat4 u_projectionMatrix;\\n\\nvoid main(void) {\\n gl_Position = u_projectionMatrix * vec4(a_position, 0., 1.);\\n v_texCoord = (u_texCoordMatrix * vec4(a_texCoord, 0., 1.)).st;\\n}\\n\\n\\n' :\n 'varying vec2 a;attribute vec2 b;attribute vec2 c;uniform mat4 d;uniform mat4 e;void main(void){gl_Position=e*vec4(b,0.,1.);a=(d*vec4(c,0.,1.)).st;}');\n\n//# sourceMappingURL=defaultmapshader.js.map","/**\n * @module ol/renderer/webgl/defaultmapshader/Locations\n */\n// This file is automatically generated, do not edit\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../../webgl.js';\n\nvar Locations = function Locations(gl, program) {\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_texCoordMatrix = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_texCoordMatrix' : 'd');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_projectionMatrix = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_projectionMatrix' : 'e');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_opacity = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_opacity' : 'f');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_texture = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_texture' : 'g');\n\n /**\n * @type {number}\n */\n this.a_position = gl.getAttribLocation(\n program, DEBUG_WEBGL ? 'a_position' : 'b');\n\n /**\n * @type {number}\n */\n this.a_texCoord = gl.getAttribLocation(\n program, DEBUG_WEBGL ? 'a_texCoord' : 'c');\n\n};\n\nexport default Locations;\n\n//# sourceMappingURL=Locations.js.map","/**\n * @module ol/renderer/webgl/Layer\n */\nimport {abstract} from '../../util.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport WebGLImmediateRenderer from '../../render/webgl/Immediate.js';\nimport LayerRenderer from '../Layer.js';\nimport {fragment, vertex} from './defaultmapshader.js';\nimport Locations from './defaultmapshader/Locations.js';\nimport {create as createTransform} from '../../transform.js';\nimport {create, fromTransform} from '../../vec/mat4.js';\nimport {ARRAY_BUFFER, FRAMEBUFFER, FLOAT, TEXTURE_2D,\n TRIANGLE_STRIP, COLOR_ATTACHMENT0} from '../../webgl.js';\nimport WebGLBuffer from '../../webgl/Buffer.js';\nimport {createEmptyTexture} from '../../webgl/Context.js';\n\n/**\n * @abstract\n */\nvar WebGLLayerRenderer = /*@__PURE__*/(function (LayerRenderer) {\n function WebGLLayerRenderer(mapRenderer, layer) {\n\n LayerRenderer.call(this, layer);\n\n /**\n * @protected\n * @type {import(\"./Map.js\").default}\n */\n this.mapRenderer = mapRenderer;\n\n /**\n * @private\n * @type {import(\"../../webgl/Buffer.js\").default}\n */\n this.arrayBuffer_ = new WebGLBuffer([\n -1, -1, 0, 0,\n 1, -1, 1, 0,\n -1, 1, 0, 1,\n 1, 1, 1, 1\n ]);\n\n /**\n * @protected\n * @type {WebGLTexture}\n */\n this.texture = null;\n\n /**\n * @protected\n * @type {WebGLFramebuffer}\n */\n this.framebuffer = null;\n\n /**\n * @protected\n * @type {number|undefined}\n */\n this.framebufferDimension = undefined;\n\n /**\n * @protected\n * @type {import(\"../../transform.js\").Transform}\n */\n this.texCoordMatrix = createTransform();\n\n /**\n * @protected\n * @type {import(\"../../transform.js\").Transform}\n */\n this.projectionMatrix = createTransform();\n\n /**\n * @type {Array<number>}\n * @private\n */\n this.tmpMat4_ = create();\n\n /**\n * @private\n * @type {import(\"./defaultmapshader/Locations.js\").default}\n */\n this.defaultLocations_ = null;\n\n }\n\n if ( LayerRenderer ) WebGLLayerRenderer.__proto__ = LayerRenderer;\n WebGLLayerRenderer.prototype = Object.create( LayerRenderer && LayerRenderer.prototype );\n WebGLLayerRenderer.prototype.constructor = WebGLLayerRenderer;\n\n /**\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {number} framebufferDimension Framebuffer dimension.\n * @protected\n */\n WebGLLayerRenderer.prototype.bindFramebuffer = function bindFramebuffer (frameState, framebufferDimension) {\n\n var gl = this.mapRenderer.getGL();\n\n if (this.framebufferDimension === undefined ||\n this.framebufferDimension != framebufferDimension) {\n /**\n * @param {WebGLRenderingContext} gl GL.\n * @param {WebGLFramebuffer} framebuffer Framebuffer.\n * @param {WebGLTexture} texture Texture.\n */\n var postRenderFunction = function(gl, framebuffer, texture) {\n if (!gl.isContextLost()) {\n gl.deleteFramebuffer(framebuffer);\n gl.deleteTexture(texture);\n }\n }.bind(null, gl, this.framebuffer, this.texture);\n\n frameState.postRenderFunctions.push(\n /** @type {import(\"../../PluggableMap.js\").PostRenderFunction} */ (postRenderFunction)\n );\n\n var texture = createEmptyTexture(\n gl, framebufferDimension, framebufferDimension);\n\n var framebuffer = gl.createFramebuffer();\n gl.bindFramebuffer(FRAMEBUFFER, framebuffer);\n gl.framebufferTexture2D(FRAMEBUFFER,\n COLOR_ATTACHMENT0, TEXTURE_2D, texture, 0);\n\n this.texture = texture;\n this.framebuffer = framebuffer;\n this.framebufferDimension = framebufferDimension;\n\n } else {\n gl.bindFramebuffer(FRAMEBUFFER, this.framebuffer);\n }\n\n };\n\n /**\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../layer/Layer.js\").State} layerState Layer state.\n * @param {import(\"../../webgl/Context.js\").default} context Context.\n */\n WebGLLayerRenderer.prototype.composeFrame = function composeFrame (frameState, layerState, context) {\n\n this.dispatchComposeEvent_(RenderEventType.PRECOMPOSE, context, frameState);\n\n context.bindBuffer(ARRAY_BUFFER, this.arrayBuffer_);\n\n var gl = context.getGL();\n\n var program = context.getProgram(fragment, vertex);\n\n var locations;\n if (!this.defaultLocations_) {\n locations = new Locations(gl, program);\n this.defaultLocations_ = locations;\n } else {\n locations = this.defaultLocations_;\n }\n\n if (context.useProgram(program)) {\n gl.enableVertexAttribArray(locations.a_position);\n gl.vertexAttribPointer(\n locations.a_position, 2, FLOAT, false, 16, 0);\n gl.enableVertexAttribArray(locations.a_texCoord);\n gl.vertexAttribPointer(\n locations.a_texCoord, 2, FLOAT, false, 16, 8);\n gl.uniform1i(locations.u_texture, 0);\n }\n\n gl.uniformMatrix4fv(locations.u_texCoordMatrix, false,\n fromTransform(this.tmpMat4_, this.getTexCoordMatrix()));\n gl.uniformMatrix4fv(locations.u_projectionMatrix, false,\n fromTransform(this.tmpMat4_, this.getProjectionMatrix()));\n gl.uniform1f(locations.u_opacity, layerState.opacity);\n gl.bindTexture(TEXTURE_2D, this.getTexture());\n gl.drawArrays(TRIANGLE_STRIP, 0, 4);\n\n this.dispatchComposeEvent_(RenderEventType.POSTCOMPOSE, context, frameState);\n };\n\n /**\n * @param {import(\"../../render/EventType.js\").default} type Event type.\n * @param {import(\"../../webgl/Context.js\").default} context WebGL context.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @private\n */\n WebGLLayerRenderer.prototype.dispatchComposeEvent_ = function dispatchComposeEvent_ (type, context, frameState) {\n var layer = this.getLayer();\n if (layer.hasListener(type)) {\n var viewState = frameState.viewState;\n var resolution = viewState.resolution;\n var pixelRatio = frameState.pixelRatio;\n var extent = frameState.extent;\n var center = viewState.center;\n var rotation = viewState.rotation;\n var size = frameState.size;\n\n var render = new WebGLImmediateRenderer(\n context, center, resolution, rotation, size, extent, pixelRatio);\n var composeEvent = new RenderEvent(\n type, render, frameState, null, context);\n layer.dispatchEvent(composeEvent);\n }\n };\n\n /**\n * @return {!import(\"../../transform.js\").Transform} Matrix.\n */\n WebGLLayerRenderer.prototype.getTexCoordMatrix = function getTexCoordMatrix () {\n return this.texCoordMatrix;\n };\n\n /**\n * @return {WebGLTexture} Texture.\n */\n WebGLLayerRenderer.prototype.getTexture = function getTexture () {\n return this.texture;\n };\n\n /**\n * @return {!import(\"../../transform.js\").Transform} Matrix.\n */\n WebGLLayerRenderer.prototype.getProjectionMatrix = function getProjectionMatrix () {\n return this.projectionMatrix;\n };\n\n /**\n * Handle webglcontextlost.\n */\n WebGLLayerRenderer.prototype.handleWebGLContextLost = function handleWebGLContextLost () {\n this.texture = null;\n this.framebuffer = null;\n this.framebufferDimension = undefined;\n };\n\n /**\n * @abstract\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../layer/Layer.js\").State} layerState Layer state.\n * @param {import(\"../../webgl/Context.js\").default} context Context.\n * @return {boolean} whether composeFrame should be called.\n */\n WebGLLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState, context) {\n return abstract();\n };\n\n /**\n * @abstract\n * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState FrameState.\n * @param {function(this: S, import(\"../../layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer\n * callback.\n * @param {S} thisArg Value to use as `this` when executing `callback`.\n * @return {T|undefined} Callback result.\n * @template S,T,U\n */\n WebGLLayerRenderer.prototype.forEachLayerAtPixel = function forEachLayerAtPixel (pixel, frameState, callback, thisArg) {\n return abstract();\n };\n\n return WebGLLayerRenderer;\n}(LayerRenderer));\n\n\nexport default WebGLLayerRenderer;\n\n//# sourceMappingURL=Layer.js.map","/**\n * @module ol/renderer/webgl/ImageLayer\n */\nimport {ENABLE_RASTER_REPROJECTION} from '../../reproj/common.js';\nimport LayerType from '../../LayerType.js';\nimport ViewHint from '../../ViewHint.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {getIntersection, isEmpty} from '../../extent.js';\nimport WebGLLayerRenderer from './Layer.js';\nimport {\n create as createTransform,\n rotate as rotateTransform,\n translate as translateTransform,\n scale as scaleTransform,\n reset as resetTransform,\n apply as applyTransform,\n invert as invertTransform,\n multiply as multiplyTransform\n} from '../../transform.js';\nimport {CLAMP_TO_EDGE} from '../../webgl.js';\nimport {createTexture} from '../../webgl/Context.js';\n\n/**\n * @classdesc\n * WebGL renderer for image layers.\n * @api\n */\nvar WebGLImageLayerRenderer = /*@__PURE__*/(function (WebGLLayerRenderer) {\n function WebGLImageLayerRenderer(mapRenderer, imageLayer) {\n\n WebGLLayerRenderer.call(this, mapRenderer, imageLayer);\n\n /**\n * The last rendered image.\n * @private\n * @type {?import(\"../../ImageBase.js\").default}\n */\n this.image_ = null;\n\n /**\n * @private\n * @type {CanvasRenderingContext2D}\n */\n this.hitCanvasContext_ = null;\n\n /**\n * @private\n * @type {?import(\"../../transform.js\").Transform}\n */\n this.hitTransformationMatrix_ = null;\n\n }\n\n if ( WebGLLayerRenderer ) WebGLImageLayerRenderer.__proto__ = WebGLLayerRenderer;\n WebGLImageLayerRenderer.prototype = Object.create( WebGLLayerRenderer && WebGLLayerRenderer.prototype );\n WebGLImageLayerRenderer.prototype.constructor = WebGLImageLayerRenderer;\n\n /**\n * @param {import(\"../../ImageBase.js\").default} image Image.\n * @private\n * @return {WebGLTexture} Texture.\n */\n WebGLImageLayerRenderer.prototype.createTexture_ = function createTexture_ (image) {\n\n // We meet the conditions to work with non-power of two textures.\n // http://www.khronos.org/webgl/wiki/WebGL_and_OpenGL_Differences#Non-Power_of_Two_Texture_Support\n // http://learningwebgl.com/blog/?p=2101\n\n var imageElement = image.getImage();\n var gl = this.mapRenderer.getGL();\n\n return createTexture(\n gl, imageElement, CLAMP_TO_EDGE, CLAMP_TO_EDGE);\n };\n\n /**\n * @inheritDoc\n */\n WebGLImageLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState, context) {\n\n var gl = this.mapRenderer.getGL();\n\n var pixelRatio = frameState.pixelRatio;\n var viewState = frameState.viewState;\n var viewCenter = viewState.center;\n var viewResolution = viewState.resolution;\n var viewRotation = viewState.rotation;\n\n var image = this.image_;\n var texture = this.texture;\n var imageLayer = /** @type {import(\"../../layer/Image.js\").default} */ (this.getLayer());\n var imageSource = /** @type {import(\"../../source/Image.js\").default} */ (imageLayer.getSource());\n\n var hints = frameState.viewHints;\n\n var renderedExtent = frameState.extent;\n if (layerState.extent !== undefined) {\n renderedExtent = getIntersection(renderedExtent, layerState.extent);\n }\n if (!hints[ViewHint.ANIMATING] && !hints[ViewHint.INTERACTING] &&\n !isEmpty(renderedExtent)) {\n var projection = viewState.projection;\n if (!ENABLE_RASTER_REPROJECTION) {\n var sourceProjection = imageSource.getProjection();\n if (sourceProjection) {\n projection = sourceProjection;\n }\n }\n var image_ = imageSource.getImage(renderedExtent, viewResolution,\n pixelRatio, projection);\n if (image_) {\n var loaded = this.loadImage(image_);\n if (loaded) {\n image = image_;\n texture = this.createTexture_(image_);\n if (this.texture) {\n /**\n * @param {WebGLRenderingContext} gl GL.\n * @param {WebGLTexture} texture Texture.\n */\n var postRenderFunction = function(gl, texture) {\n if (!gl.isContextLost()) {\n gl.deleteTexture(texture);\n }\n }.bind(null, gl, this.texture);\n frameState.postRenderFunctions.push(\n /** @type {import(\"../../PluggableMap.js\").PostRenderFunction} */ (postRenderFunction)\n );\n }\n }\n }\n }\n\n if (image) {\n var canvas = this.mapRenderer.getContext().getCanvas();\n\n this.updateProjectionMatrix_(canvas.width, canvas.height,\n pixelRatio, viewCenter, viewResolution, viewRotation,\n image.getExtent());\n this.hitTransformationMatrix_ = null;\n\n // Translate and scale to flip the Y coord.\n var texCoordMatrix = this.texCoordMatrix;\n resetTransform(texCoordMatrix);\n scaleTransform(texCoordMatrix, 1, -1);\n translateTransform(texCoordMatrix, 0, -1);\n\n this.image_ = image;\n this.texture = texture;\n }\n\n return !!image;\n };\n\n /**\n * @param {number} canvasWidth Canvas width.\n * @param {number} canvasHeight Canvas height.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../../coordinate.js\").Coordinate} viewCenter View center.\n * @param {number} viewResolution View resolution.\n * @param {number} viewRotation View rotation.\n * @param {import(\"../../extent.js\").Extent} imageExtent Image extent.\n * @private\n */\n WebGLImageLayerRenderer.prototype.updateProjectionMatrix_ = function updateProjectionMatrix_ (\n canvasWidth,\n canvasHeight,\n pixelRatio,\n viewCenter,\n viewResolution,\n viewRotation,\n imageExtent\n ) {\n\n var canvasExtentWidth = canvasWidth * viewResolution;\n var canvasExtentHeight = canvasHeight * viewResolution;\n\n var projectionMatrix = this.projectionMatrix;\n resetTransform(projectionMatrix);\n scaleTransform(projectionMatrix,\n pixelRatio * 2 / canvasExtentWidth,\n pixelRatio * 2 / canvasExtentHeight);\n rotateTransform(projectionMatrix, -viewRotation);\n translateTransform(projectionMatrix,\n imageExtent[0] - viewCenter[0],\n imageExtent[1] - viewCenter[1]);\n scaleTransform(projectionMatrix,\n (imageExtent[2] - imageExtent[0]) / 2,\n (imageExtent[3] - imageExtent[1]) / 2);\n translateTransform(projectionMatrix, 1, 1);\n\n };\n\n /**\n * @inheritDoc\n */\n WebGLImageLayerRenderer.prototype.forEachLayerAtPixel = function forEachLayerAtPixel (pixel, frameState, callback, thisArg) {\n if (!this.image_ || !this.image_.getImage()) {\n return undefined;\n }\n\n var imageSize =\n [this.image_.getImage().width, this.image_.getImage().height];\n\n if (!this.hitTransformationMatrix_) {\n this.hitTransformationMatrix_ = this.getHitTransformationMatrix_(\n frameState.size, imageSize);\n }\n\n var pixelOnFrameBuffer = applyTransform(\n this.hitTransformationMatrix_, pixel.slice());\n\n if (pixelOnFrameBuffer[0] < 0 || pixelOnFrameBuffer[0] > imageSize[0] ||\n pixelOnFrameBuffer[1] < 0 || pixelOnFrameBuffer[1] > imageSize[1]) {\n // outside the image, no need to check\n return undefined;\n }\n\n if (!this.hitCanvasContext_) {\n this.hitCanvasContext_ = createCanvasContext2D(1, 1);\n }\n\n this.hitCanvasContext_.clearRect(0, 0, 1, 1);\n this.hitCanvasContext_.drawImage(this.image_.getImage(),\n pixelOnFrameBuffer[0], pixelOnFrameBuffer[1], 1, 1, 0, 0, 1, 1);\n\n var imageData = this.hitCanvasContext_.getImageData(0, 0, 1, 1).data;\n if (imageData[3] > 0) {\n return callback.call(thisArg, this.getLayer(), imageData);\n } else {\n return undefined;\n }\n };\n\n /**\n * The transformation matrix to get the pixel on the image for a\n * pixel on the map.\n * @param {import(\"../../size.js\").Size} mapSize The map size.\n * @param {import(\"../../size.js\").Size} imageSize The image size.\n * @return {import(\"../../transform.js\").Transform} The transformation matrix.\n * @private\n */\n WebGLImageLayerRenderer.prototype.getHitTransformationMatrix_ = function getHitTransformationMatrix_ (mapSize, imageSize) {\n // the first matrix takes a map pixel, flips the y-axis and scales to\n // a range between -1 ... 1\n var mapCoordTransform = createTransform();\n translateTransform(mapCoordTransform, -1, -1);\n scaleTransform(mapCoordTransform, 2 / mapSize[0], 2 / mapSize[1]);\n translateTransform(mapCoordTransform, 0, mapSize[1]);\n scaleTransform(mapCoordTransform, 1, -1);\n\n // the second matrix is the inverse of the projection matrix used in the\n // shader for drawing\n var projectionMatrixInv = invertTransform(this.projectionMatrix.slice());\n\n // the third matrix scales to the image dimensions and flips the y-axis again\n var transform = createTransform();\n translateTransform(transform, 0, imageSize[1]);\n scaleTransform(transform, 1, -1);\n scaleTransform(transform, imageSize[0] / 2, imageSize[1] / 2);\n translateTransform(transform, 1, 1);\n\n multiplyTransform(transform, projectionMatrixInv);\n multiplyTransform(transform, mapCoordTransform);\n\n return transform;\n };\n\n return WebGLImageLayerRenderer;\n}(WebGLLayerRenderer));\n\n\n/**\n * Determine if this renderer handles the provided layer.\n * @param {import(\"../../layer/Layer.js\").default} layer The candidate layer.\n * @return {boolean} The renderer can render the layer.\n */\nWebGLImageLayerRenderer['handles'] = function(layer) {\n return layer.getType() === LayerType.IMAGE;\n};\n\n\n/**\n * Create a layer renderer.\n * @param {import(\"../Map.js\").default} mapRenderer The map renderer.\n * @param {import(\"../../layer/Layer.js\").default} layer The layer to be rendererd.\n * @return {WebGLImageLayerRenderer} The layer renderer.\n */\nWebGLImageLayerRenderer['create'] = function(mapRenderer, layer) {\n return new WebGLImageLayerRenderer(\n /** @type {import(\"./Map.js\").default} */ (mapRenderer),\n /** @type {import(\"../../layer/Image.js\").default} */ (layer)\n );\n};\n\n\nexport default WebGLImageLayerRenderer;\n\n//# sourceMappingURL=ImageLayer.js.map","/**\n * @module ol/renderer/webgl/Map\n */\n\nimport {stableSort} from '../../array.js';\nimport {CLASS_UNSELECTABLE} from '../../css.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {listen} from '../../events.js';\nimport {visibleAtResolution} from '../../layer/Layer.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport WebGLImmediateRenderer from '../../render/webgl/Immediate.js';\nimport MapRenderer, {sortByZIndex} from '../Map.js';\nimport SourceState from '../../source/State.js';\nimport LRUCache from '../../structs/LRUCache.js';\nimport PriorityQueue from '../../structs/PriorityQueue.js';\nimport {BLEND, CLAMP_TO_EDGE, COLOR_BUFFER_BIT, CULL_FACE, DEPTH_TEST, FRAMEBUFFER,\n getContext, LINEAR, ONE, ONE_MINUS_SRC_ALPHA, RGBA, SCISSOR_TEST, SRC_ALPHA,\n STENCIL_TEST, TEXTURE0, TEXTURE_2D, TEXTURE_MAG_FILTER, TEXTURE_MIN_FILTER,\n TEXTURE_WRAP_S, TEXTURE_WRAP_T, UNSIGNED_BYTE} from '../../webgl.js';\nimport WebGLContext from '../../webgl/Context.js';\nimport ContextEventType from '../../webgl/ContextEventType.js';\n\n\n/**\n * @typedef {Object} TextureCacheEntry\n * @property {number} magFilter\n * @property {number} minFilter\n * @property {WebGLTexture} texture\n */\n\n\n/**\n * Texture cache high water mark.\n * @type {number}\n */\nvar WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK = 1024;\n\n\n/**\n * @classdesc\n * WebGL map renderer.\n * @api\n */\nvar WebGLMapRenderer = /*@__PURE__*/(function (MapRenderer) {\n function WebGLMapRenderer(map) {\n MapRenderer.call(this, map);\n\n var container = map.getViewport();\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.canvas_ = /** @type {HTMLCanvasElement} */\n (document.createElement('canvas'));\n this.canvas_.style.width = '100%';\n this.canvas_.style.height = '100%';\n this.canvas_.style.display = 'block';\n this.canvas_.className = CLASS_UNSELECTABLE;\n container.insertBefore(this.canvas_, container.childNodes[0] || null);\n\n /**\n * @private\n * @type {number}\n */\n this.clipTileCanvasWidth_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.clipTileCanvasHeight_ = 0;\n\n /**\n * @private\n * @type {CanvasRenderingContext2D}\n */\n this.clipTileContext_ = createCanvasContext2D();\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderedVisible_ = true;\n\n /**\n * @private\n * @type {WebGLRenderingContext}\n */\n this.gl_ = getContext(this.canvas_, {\n antialias: true,\n depth: true,\n failIfMajorPerformanceCaveat: true,\n preserveDrawingBuffer: false,\n stencil: true\n });\n\n /**\n * @private\n * @type {import(\"../../webgl/Context.js\").default}\n */\n this.context_ = new WebGLContext(this.canvas_, this.gl_);\n\n listen(this.canvas_, ContextEventType.LOST,\n this.handleWebGLContextLost, this);\n listen(this.canvas_, ContextEventType.RESTORED,\n this.handleWebGLContextRestored, this);\n\n /**\n * @private\n * @type {import(\"../../structs/LRUCache.js\").default<TextureCacheEntry|null>}\n */\n this.textureCache_ = new LRUCache();\n\n /**\n * @private\n * @type {import(\"../../coordinate.js\").Coordinate}\n */\n this.focus_ = null;\n\n /**\n * @private\n * @type {import(\"../../structs/PriorityQueue.js\").default<Array>}\n */\n this.tileTextureQueue_ = new PriorityQueue(\n /**\n * @param {Array<*>} element Element.\n * @return {number} Priority.\n * @this {WebGLMapRenderer}\n */\n (function(element) {\n var tileCenter = /** @type {import(\"../../coordinate.js\").Coordinate} */ (element[1]);\n var tileResolution = /** @type {number} */ (element[2]);\n var deltaX = tileCenter[0] - this.focus_[0];\n var deltaY = tileCenter[1] - this.focus_[1];\n return 65536 * Math.log(tileResolution) +\n Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution;\n }).bind(this),\n /**\n * @param {Array<*>} element Element.\n * @return {string} Key.\n */\n function(element) {\n return (\n /** @type {import(\"../../Tile.js\").default} */ (element[0]).getKey()\n );\n });\n\n\n /**\n * @param {import(\"../../PluggableMap.js\").default} map Map.\n * @param {?import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @return {boolean} false.\n * @this {WebGLMapRenderer}\n */\n this.loadNextTileTexture_ =\n function(map, frameState) {\n if (!this.tileTextureQueue_.isEmpty()) {\n this.tileTextureQueue_.reprioritize();\n var element = this.tileTextureQueue_.dequeue();\n var tile = /** @type {import(\"../../Tile.js\").default} */ (element[0]);\n var tileSize = /** @type {import(\"../../size.js\").Size} */ (element[3]);\n var tileGutter = /** @type {number} */ (element[4]);\n this.bindTileTexture(\n tile, tileSize, tileGutter, LINEAR, LINEAR);\n }\n return false;\n }.bind(this);\n\n\n /**\n * @private\n * @type {number}\n */\n this.textureCacheFrameMarkerCount_ = 0;\n\n this.initializeGL_();\n }\n\n if ( MapRenderer ) WebGLMapRenderer.__proto__ = MapRenderer;\n WebGLMapRenderer.prototype = Object.create( MapRenderer && MapRenderer.prototype );\n WebGLMapRenderer.prototype.constructor = WebGLMapRenderer;\n\n /**\n * @param {import(\"../../Tile.js\").default} tile Tile.\n * @param {import(\"../../size.js\").Size} tileSize Tile size.\n * @param {number} tileGutter Tile gutter.\n * @param {number} magFilter Mag filter.\n * @param {number} minFilter Min filter.\n */\n WebGLMapRenderer.prototype.bindTileTexture = function bindTileTexture (tile, tileSize, tileGutter, magFilter, minFilter) {\n var gl = this.getGL();\n var tileKey = tile.getKey();\n if (this.textureCache_.containsKey(tileKey)) {\n var textureCacheEntry = this.textureCache_.get(tileKey);\n gl.bindTexture(TEXTURE_2D, textureCacheEntry.texture);\n if (textureCacheEntry.magFilter != magFilter) {\n gl.texParameteri(\n TEXTURE_2D, TEXTURE_MAG_FILTER, magFilter);\n textureCacheEntry.magFilter = magFilter;\n }\n if (textureCacheEntry.minFilter != minFilter) {\n gl.texParameteri(\n TEXTURE_2D, TEXTURE_MIN_FILTER, minFilter);\n textureCacheEntry.minFilter = minFilter;\n }\n } else {\n var texture = gl.createTexture();\n var imageTile = /** @type {import(\"../../ImageTile.js\").default} */ (tile);\n gl.bindTexture(TEXTURE_2D, texture);\n if (tileGutter > 0) {\n var clipTileCanvas = this.clipTileContext_.canvas;\n var clipTileContext = this.clipTileContext_;\n if (this.clipTileCanvasWidth_ !== tileSize[0] ||\n this.clipTileCanvasHeight_ !== tileSize[1]) {\n clipTileCanvas.width = tileSize[0];\n clipTileCanvas.height = tileSize[1];\n this.clipTileCanvasWidth_ = tileSize[0];\n this.clipTileCanvasHeight_ = tileSize[1];\n } else {\n clipTileContext.clearRect(0, 0, tileSize[0], tileSize[1]);\n }\n clipTileContext.drawImage(imageTile.getImage(), tileGutter, tileGutter,\n tileSize[0], tileSize[1], 0, 0, tileSize[0], tileSize[1]);\n gl.texImage2D(TEXTURE_2D, 0,\n RGBA, RGBA,\n UNSIGNED_BYTE, clipTileCanvas);\n } else {\n gl.texImage2D(TEXTURE_2D, 0,\n RGBA, RGBA,\n UNSIGNED_BYTE, imageTile.getImage());\n }\n gl.texParameteri(\n TEXTURE_2D, TEXTURE_MAG_FILTER, magFilter);\n gl.texParameteri(\n TEXTURE_2D, TEXTURE_MIN_FILTER, minFilter);\n gl.texParameteri(TEXTURE_2D, TEXTURE_WRAP_S,\n CLAMP_TO_EDGE);\n gl.texParameteri(TEXTURE_2D, TEXTURE_WRAP_T,\n CLAMP_TO_EDGE);\n this.textureCache_.set(tileKey, {\n texture: texture,\n magFilter: magFilter,\n minFilter: minFilter\n });\n }\n };\n\n /**\n * @param {import(\"../../render/EventType.js\").default} type Event type.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n */\n WebGLMapRenderer.prototype.dispatchRenderEvent = function dispatchRenderEvent (type, frameState) {\n var map = this.getMap();\n if (map.hasListener(type)) {\n var context = this.context_;\n\n var extent = frameState.extent;\n var size = frameState.size;\n var viewState = frameState.viewState;\n var pixelRatio = frameState.pixelRatio;\n\n var resolution = viewState.resolution;\n var center = viewState.center;\n var rotation = viewState.rotation;\n\n var vectorContext = new WebGLImmediateRenderer(context,\n center, resolution, rotation, size, extent, pixelRatio);\n var composeEvent = new RenderEvent(type, vectorContext,\n frameState, null, context);\n map.dispatchEvent(composeEvent);\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLMapRenderer.prototype.disposeInternal = function disposeInternal () {\n var gl = this.getGL();\n if (!gl.isContextLost()) {\n this.textureCache_.forEach(\n /**\n * @param {?TextureCacheEntry} textureCacheEntry\n * Texture cache entry.\n */\n function(textureCacheEntry) {\n if (textureCacheEntry) {\n gl.deleteTexture(textureCacheEntry.texture);\n }\n });\n }\n this.context_.dispose();\n MapRenderer.prototype.disposeInternal.call(this);\n };\n\n /**\n * @param {import(\"../../PluggableMap.js\").default} map Map.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @private\n */\n WebGLMapRenderer.prototype.expireCache_ = function expireCache_ (map, frameState) {\n var gl = this.getGL();\n var textureCacheEntry;\n while (this.textureCache_.getCount() - this.textureCacheFrameMarkerCount_ >\n WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK) {\n textureCacheEntry = this.textureCache_.peekLast();\n if (!textureCacheEntry) {\n if (+this.textureCache_.peekLastKey() == frameState.index) {\n break;\n } else {\n --this.textureCacheFrameMarkerCount_;\n }\n } else {\n gl.deleteTexture(textureCacheEntry.texture);\n }\n this.textureCache_.pop();\n }\n };\n\n /**\n * @return {import(\"../../webgl/Context.js\").default} The context.\n */\n WebGLMapRenderer.prototype.getContext = function getContext () {\n return this.context_;\n };\n\n /**\n * @return {WebGLRenderingContext} GL.\n */\n WebGLMapRenderer.prototype.getGL = function getGL () {\n return this.gl_;\n };\n\n /**\n * @return {import(\"../../structs/PriorityQueue.js\").default<Array>} Tile texture queue.\n */\n WebGLMapRenderer.prototype.getTileTextureQueue = function getTileTextureQueue () {\n return this.tileTextureQueue_;\n };\n\n /**\n * @param {import(\"../../events/Event.js\").default} event Event.\n * @protected\n */\n WebGLMapRenderer.prototype.handleWebGLContextLost = function handleWebGLContextLost (event) {\n event.preventDefault();\n this.textureCache_.clear();\n this.textureCacheFrameMarkerCount_ = 0;\n\n var renderers = this.getLayerRenderers();\n for (var id in renderers) {\n var renderer = /** @type {import(\"./Layer.js\").default} */ (renderers[id]);\n renderer.handleWebGLContextLost();\n }\n };\n\n /**\n * @protected\n */\n WebGLMapRenderer.prototype.handleWebGLContextRestored = function handleWebGLContextRestored () {\n this.initializeGL_();\n this.getMap().render();\n };\n\n /**\n * @private\n */\n WebGLMapRenderer.prototype.initializeGL_ = function initializeGL_ () {\n var gl = this.gl_;\n gl.activeTexture(TEXTURE0);\n gl.blendFuncSeparate(\n SRC_ALPHA, ONE_MINUS_SRC_ALPHA,\n ONE, ONE_MINUS_SRC_ALPHA);\n gl.disable(CULL_FACE);\n gl.disable(DEPTH_TEST);\n gl.disable(SCISSOR_TEST);\n gl.disable(STENCIL_TEST);\n };\n\n /**\n * @param {import(\"../../Tile.js\").default} tile Tile.\n * @return {boolean} Is tile texture loaded.\n */\n WebGLMapRenderer.prototype.isTileTextureLoaded = function isTileTextureLoaded (tile) {\n return this.textureCache_.containsKey(tile.getKey());\n };\n\n /**\n * @inheritDoc\n */\n WebGLMapRenderer.prototype.renderFrame = function renderFrame (frameState) {\n\n var context = this.getContext();\n var gl = this.getGL();\n\n if (gl.isContextLost()) {\n return false;\n }\n\n if (!frameState) {\n if (this.renderedVisible_) {\n this.canvas_.style.display = 'none';\n this.renderedVisible_ = false;\n }\n return false;\n }\n\n this.focus_ = frameState.focus;\n\n this.textureCache_.set((-frameState.index).toString(), null);\n ++this.textureCacheFrameMarkerCount_;\n\n this.dispatchRenderEvent(RenderEventType.PRECOMPOSE, frameState);\n\n /** @type {Array<import(\"../../layer/Layer.js\").State>} */\n var layerStatesToDraw = [];\n var layerStatesArray = frameState.layerStatesArray;\n stableSort(layerStatesArray, sortByZIndex);\n\n var viewResolution = frameState.viewState.resolution;\n var i, ii;\n for (i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n var layerState = layerStatesArray[i];\n if (visibleAtResolution(layerState, viewResolution) &&\n layerState.sourceState == SourceState.READY) {\n var layerRenderer = /** @type {import(\"./Layer.js\").default} */ (this.getLayerRenderer(layerState.layer));\n if (layerRenderer.prepareFrame(frameState, layerState, context)) {\n layerStatesToDraw.push(layerState);\n }\n }\n }\n\n var width = frameState.size[0] * frameState.pixelRatio;\n var height = frameState.size[1] * frameState.pixelRatio;\n if (this.canvas_.width != width || this.canvas_.height != height) {\n this.canvas_.width = width;\n this.canvas_.height = height;\n }\n\n gl.bindFramebuffer(FRAMEBUFFER, null);\n\n gl.clearColor(0, 0, 0, 0);\n gl.clear(COLOR_BUFFER_BIT);\n gl.enable(BLEND);\n gl.viewport(0, 0, this.canvas_.width, this.canvas_.height);\n\n for (i = 0, ii = layerStatesToDraw.length; i < ii; ++i) {\n var layerState$1 = layerStatesToDraw[i];\n var layerRenderer$1 = /** @type {import(\"./Layer.js\").default} */ (this.getLayerRenderer(layerState$1.layer));\n layerRenderer$1.composeFrame(frameState, layerState$1, context);\n }\n\n if (!this.renderedVisible_) {\n this.canvas_.style.display = '';\n this.renderedVisible_ = true;\n }\n\n this.calculateMatrices2D(frameState);\n\n if (this.textureCache_.getCount() - this.textureCacheFrameMarkerCount_ >\n WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK) {\n frameState.postRenderFunctions.push(\n /** @type {import(\"../../PluggableMap.js\").PostRenderFunction} */ (this.expireCache_.bind(this))\n );\n }\n\n if (!this.tileTextureQueue_.isEmpty()) {\n frameState.postRenderFunctions.push(this.loadNextTileTexture_);\n frameState.animate = true;\n }\n\n this.dispatchRenderEvent(RenderEventType.POSTCOMPOSE, frameState);\n\n this.scheduleRemoveUnusedLayerRenderers(frameState);\n this.scheduleExpireIconCache(frameState);\n\n };\n\n /**\n * @inheritDoc\n */\n WebGLMapRenderer.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (\n coordinate,\n frameState,\n hitTolerance,\n callback,\n thisArg,\n layerFilter,\n thisArg2\n ) {\n var result;\n\n if (this.getGL().isContextLost()) {\n return false;\n }\n\n var viewState = frameState.viewState;\n\n var layerStates = frameState.layerStatesArray;\n var numLayers = layerStates.length;\n var i;\n for (i = numLayers - 1; i >= 0; --i) {\n var layerState = layerStates[i];\n var layer = layerState.layer;\n if (visibleAtResolution(layerState, viewState.resolution) &&\n layerFilter.call(thisArg2, layer)) {\n var layerRenderer = this.getLayerRenderer(layer);\n result = layerRenderer.forEachFeatureAtCoordinate(\n coordinate, frameState, hitTolerance, callback);\n if (result) {\n return result;\n }\n }\n }\n return undefined;\n };\n\n /**\n * @inheritDoc\n */\n WebGLMapRenderer.prototype.hasFeatureAtCoordinate = function hasFeatureAtCoordinate (coordinate, frameState, hitTolerance, layerFilter, thisArg) {\n var hasFeature = false;\n\n if (this.getGL().isContextLost()) {\n return false;\n }\n\n var viewState = frameState.viewState;\n\n var layerStates = frameState.layerStatesArray;\n var numLayers = layerStates.length;\n var i;\n for (i = numLayers - 1; i >= 0; --i) {\n var layerState = layerStates[i];\n var layer = layerState.layer;\n if (visibleAtResolution(layerState, viewState.resolution) &&\n layerFilter.call(thisArg, layer)) {\n var layerRenderer = this.getLayerRenderer(layer);\n hasFeature =\n layerRenderer.hasFeatureAtCoordinate(coordinate, frameState);\n if (hasFeature) {\n return true;\n }\n }\n }\n return hasFeature;\n };\n\n /**\n * @inheritDoc\n */\n WebGLMapRenderer.prototype.forEachLayerAtPixel = function forEachLayerAtPixel (pixel, frameState, hitTolerance, callback, thisArg, layerFilter, thisArg2) {\n if (this.getGL().isContextLost()) {\n return false;\n }\n\n var viewState = frameState.viewState;\n var result;\n\n var layerStates = frameState.layerStatesArray;\n var numLayers = layerStates.length;\n var i;\n for (i = numLayers - 1; i >= 0; --i) {\n var layerState = layerStates[i];\n var layer = layerState.layer;\n if (visibleAtResolution(layerState, viewState.resolution) &&\n layerFilter.call(thisArg, layer)) {\n var layerRenderer = /** @type {import(\"./Layer.js\").default} */ (this.getLayerRenderer(layer));\n result = layerRenderer.forEachLayerAtPixel(\n pixel, frameState, callback, thisArg);\n if (result) {\n return result;\n }\n }\n }\n return undefined;\n };\n\n return WebGLMapRenderer;\n}(MapRenderer));\n\n\nexport default WebGLMapRenderer;\n\n//# sourceMappingURL=Map.js.map","/**\n * @module ol/Tile\n */\nimport TileState from './TileState.js';\nimport {easeIn} from './easing.js';\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\n\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)} 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/**\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/**\n * @classdesc\n * Base class for tiles.\n *\n * @abstract\n */\nvar Tile = /*@__PURE__*/(function (EventTarget) {\n function Tile(tileCoord, state, opt_options) {\n EventTarget.call(this);\n\n var options = opt_options ? opt_options : {};\n\n /**\n * @type {import(\"./tilecoord.js\").TileCoord}\n */\n this.tileCoord = tileCoord;\n\n /**\n * @protected\n * @type {TileState}\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 * 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_ = 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 if ( EventTarget ) Tile.__proto__ = EventTarget;\n Tile.prototype = Object.create( EventTarget && EventTarget.prototype );\n Tile.prototype.constructor = Tile;\n\n /**\n * @protected\n */\n Tile.prototype.changed = function changed () {\n this.dispatchEvent(EventType.CHANGE);\n };\n\n /**\n * @return {string} Key.\n */\n Tile.prototype.getKey = function 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 Tile.prototype.getInterimTile = function getInterimTile () {\n if (!this.interimTile) {\n //empty chain\n return this;\n }\n var 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 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 Tile.prototype.refreshInterimChain = function refreshInterimChain () {\n if (!this.interimTile) {\n return;\n }\n\n var tile = this.interimTile;\n var 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 Tile.prototype.getTileCoord = function getTileCoord () {\n return this.tileCoord;\n };\n\n /**\n * @return {TileState} State.\n */\n Tile.prototype.getState = function 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 {TileState} state State.\n * @api\n */\n Tile.prototype.setState = function setState (state) {\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 Tile.prototype.load = function load () {};\n\n /**\n * Get the alpha value for rendering.\n * @param {string} id An id for the renderer.\n * @param {number} time The render frame time.\n * @return {number} A number between 0 and 1.\n */\n Tile.prototype.getAlpha = function getAlpha (id, time) {\n if (!this.transition_) {\n return 1;\n }\n\n var 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 var delta = time - start + (1000 / 60); // avoid rendering at 0\n if (delta >= this.transition_) {\n return 1;\n }\n return easeIn(delta / this.transition_);\n };\n\n /**\n * Determine if a tile is in an alpha transition. A tile is considered in\n * transition if tile.getAlpha() has not yet been called or has been called\n * and returned 1.\n * @param {string} id An id for the renderer.\n * @return {boolean} The tile is in transition.\n */\n Tile.prototype.inTransition = function 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 Tile.prototype.endTransition = function endTransition (id) {\n if (this.transition_) {\n this.transitionStarts_[id] = -1;\n }\n };\n\n return Tile;\n}(EventTarget));\n\n\nexport default Tile;\n\n//# sourceMappingURL=Tile.js.map","/**\n * @module ol/ImageTile\n */\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nimport {createCanvasContext2D} from './dom.js';\nimport {listenOnce, unlistenByKey} from './events.js';\nimport EventType from './events/EventType.js';\n\n\nvar ImageTile = /*@__PURE__*/(function (Tile) {\n function ImageTile(tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) {\n\n Tile.call(this, 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 /**\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 {Array<import(\"./events.js\").EventsKey>}\n */\n this.imageListenerKeys_ = null;\n\n /**\n * @private\n * @type {import(\"./Tile.js\").LoadFunction}\n */\n this.tileLoadFunction_ = tileLoadFunction;\n\n }\n\n if ( Tile ) ImageTile.__proto__ = Tile;\n ImageTile.prototype = Object.create( Tile && Tile.prototype );\n ImageTile.prototype.constructor = ImageTile;\n\n /**\n * @inheritDoc\n */\n ImageTile.prototype.disposeInternal = function disposeInternal () {\n if (this.state == TileState.LOADING) {\n this.unlistenImage_();\n this.image_ = getBlankImage();\n }\n if (this.interimTile) {\n this.interimTile.dispose();\n }\n this.state = TileState.ABORT;\n this.changed();\n Tile.prototype.disposeInternal.call(this);\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 ImageTile.prototype.getImage = function getImage () {\n return this.image_;\n };\n\n /**\n * @inheritDoc\n */\n ImageTile.prototype.getKey = function getKey () {\n return this.src_;\n };\n\n /**\n * Tracks loading or read errors.\n *\n * @private\n */\n ImageTile.prototype.handleImageError_ = function 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 ImageTile.prototype.handleImageLoad_ = function handleImageLoad_ () {\n var 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 * @inheritDoc\n * @api\n */\n ImageTile.prototype.load = function 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.imageListenerKeys_ = [\n listenOnce(this.image_, EventType.ERROR,\n this.handleImageError_, this),\n listenOnce(this.image_, EventType.LOAD,\n this.handleImageLoad_, this)\n ];\n this.tileLoadFunction_(this, this.src_);\n }\n };\n\n /**\n * Discards event handlers which listen for load completion or errors.\n *\n * @private\n */\n ImageTile.prototype.unlistenImage_ = function unlistenImage_ () {\n this.imageListenerKeys_.forEach(unlistenByKey);\n this.imageListenerKeys_ = null;\n };\n\n return ImageTile;\n}(Tile));\n\n\n/**\n * Get a 1-pixel blank image.\n * @return {HTMLCanvasElement} Blank image.\n */\nfunction getBlankImage() {\n var ctx = createCanvasContext2D(1, 1);\n ctx.fillStyle = 'rgba(0,0,0,0)';\n ctx.fillRect(0, 0, 1, 1);\n return ctx.canvas;\n}\n\nexport default ImageTile;\n\n//# sourceMappingURL=ImageTile.js.map","/**\n * @module ol/tilecoord\n */\n\n\n/**\n * An array of three numbers representing the location of a tile in a tile\n * grid. The order is `z`, `x`, and `y`. `z` is the zoom level.\n * @typedef {Array<number>} TileCoord\n * @api\n */\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/**\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/**\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/**\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/**\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/**\n * @param {TileCoord} tileCoord Tile coord.\n * @return {string} Quad key.\n */\nexport function quadKey(tileCoord) {\n var z = tileCoord[0];\n var digits = new Array(z);\n var mask = 1 << (z - 1);\n var i, charCode;\n for (i = 0; i < z; ++i) {\n // 48 is charCode for 0 - '0'.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/**\n * @param {TileCoord} tileCoord Tile coordinate.\n * @param {!import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {boolean} Tile coordinate is within extent and zoom level range.\n */\nexport function withinExtentAndZ(tileCoord, tileGrid) {\n var z = tileCoord[0];\n var x = tileCoord[1];\n var y = tileCoord[2];\n\n if (tileGrid.getMinZoom() > z || z > tileGrid.getMaxZoom()) {\n return false;\n }\n var extent = tileGrid.getExtent();\n var tileRange;\n if (!extent) {\n tileRange = tileGrid.getFullTileRange(z);\n } else {\n tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n }\n if (!tileRange) {\n return true;\n } else {\n return tileRange.containsXY(x, y);\n }\n}\n\n//# sourceMappingURL=tilecoord.js.map","/**\n * @module ol/TileCache\n */\nimport LRUCache from './structs/LRUCache.js';\nimport {fromKey, getKey} from './tilecoord.js';\n\nvar TileCache = /*@__PURE__*/(function (LRUCache) {\n function TileCache(opt_highWaterMark) {\n\n LRUCache.call(this, opt_highWaterMark);\n\n }\n\n if ( LRUCache ) TileCache.__proto__ = LRUCache;\n TileCache.prototype = Object.create( LRUCache && LRUCache.prototype );\n TileCache.prototype.constructor = TileCache;\n\n /**\n * @param {!Object<string, import(\"./TileRange.js\").default>} usedTiles Used tiles.\n */\n TileCache.prototype.expireCache = function expireCache (usedTiles) {\n while (this.canExpireCache()) {\n var tile = this.peekLast();\n var zKey = tile.tileCoord[0].toString();\n if (zKey in usedTiles && usedTiles[zKey].contains(tile.tileCoord)) {\n break;\n } else {\n this.pop().dispose();\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 TileCache.prototype.pruneExceptNewestZ = function pruneExceptNewestZ () {\n if (this.getCount() === 0) {\n return;\n }\n var key = this.peekFirstKey();\n var tileCoord = fromKey(key);\n var z = tileCoord[0];\n this.forEach(function(tile) {\n if (tile.tileCoord[0] !== z) {\n this.remove(getKey(tile.tileCoord));\n tile.dispose();\n }\n }, this);\n };\n\n return TileCache;\n}(LRUCache));\n\n\nexport default TileCache;\n\n//# sourceMappingURL=TileCache.js.map","/**\n * @module ol/source/Source\n */\nimport {abstract} from '../util.js';\nimport BaseObject from '../Object.js';\nimport {get as getProjection} from '../proj.js';\nimport SourceState from './State.js';\n\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/**\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/**\n * @typedef {Object} Options\n * @property {AttributionLike} [attributions]\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {import(\"../proj.js\").ProjectionLike} projection\n * @property {SourceState} [state='ready']\n * @property {boolean} [wrapX=false]\n */\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 */\nvar Source = /*@__PURE__*/(function (BaseObject) {\n function Source(options) {\n\n BaseObject.call(this);\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_ = options.attributionsCollapsible !== undefined ?\n options.attributionsCollapsible : 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 {SourceState}\n */\n this.state_ = options.state !== undefined ?\n 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 if ( BaseObject ) Source.__proto__ = BaseObject;\n Source.prototype = Object.create( BaseObject && BaseObject.prototype );\n Source.prototype.constructor = Source;\n\n /**\n * Get the attribution function for the source.\n * @return {?Attribution} Attribution function.\n */\n Source.prototype.getAttributions = function getAttributions () {\n return this.attributions_;\n };\n\n /**\n * @return {boolean} Aattributions are collapsible.\n */\n Source.prototype.getAttributionsCollapsible = function 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 Source.prototype.getProjection = function getProjection () {\n return this.projection_;\n };\n\n /**\n * @abstract\n * @return {Array<number>|undefined} Resolutions.\n */\n Source.prototype.getResolutions = function 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 {SourceState} State.\n * @api\n */\n Source.prototype.getState = function getState () {\n return this.state_;\n };\n\n /**\n * @return {boolean|undefined} Wrap X.\n */\n Source.prototype.getWrapX = function getWrapX () {\n return this.wrapX_;\n };\n\n /**\n * Refreshes the source and finally dispatches a 'change' event.\n * @api\n */\n Source.prototype.refresh = function 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 Source.prototype.setAttributions = function setAttributions (attributions) {\n this.attributions_ = adaptAttributions(attributions);\n this.changed();\n };\n\n /**\n * Set the state of the source.\n * @param {SourceState} state State.\n * @protected\n */\n Source.prototype.setState = function setState (state) {\n this.state_ = state;\n this.changed();\n };\n\n return Source;\n}(BaseObject));\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\n\nexport default Source;\n\n//# sourceMappingURL=Source.js.map","/**\n * @module ol/tilegrid/TileGrid\n */\nimport {DEFAULT_TILE_SIZE} from './common.js';\nimport {assert} from '../asserts.js';\nimport TileRange, {createOrUpdate as createOrUpdateTileRange} from '../TileRange.js';\nimport {isSorted, linearFindNearest} from '../array.js';\nimport {createOrUpdate, getTopLeft} from '../extent.js';\nimport {clamp} from '../math.js';\nimport {toSize} from '../size.js';\nimport {createOrUpdate as createOrUpdateTileCoord} from '../tilecoord.js';\n\n\n/**\n * @private\n * @type {import(\"../tilecoord.js\").TileCoord}\n */\nvar tmpTileCoord = [0, 0, 0];\n\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 upwards. 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 upwards. 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] Sizes.\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/**\n * @classdesc\n * Base class for setting the grid pattern for sources accessing tiled-image\n * servers.\n * @api\n */\nvar TileGrid = function TileGrid(options) {\n\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(isSorted(this.resolutions_, function(a, b) {\n return b - a;\n }, true), 17); // `resolutions` must be sorted in descending order\n\n\n // check if we've got a consistent zoom factor and origin\n var zoomFactor;\n if (!options.origins) {\n for (var i = 0, ii = this.resolutions_.length - 1; i < ii; ++i) {\n if (!zoomFactor) {\n zoomFactor = this.resolutions_[i] / this.resolutions_[i + 1];\n } else {\n if (this.resolutions_[i] / this.resolutions_[i + 1] !== zoomFactor) {\n zoomFactor = undefined;\n break;\n }\n }\n }\n }\n\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.zoomFactor_ = zoomFactor;\n\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,\n 20); // Number of `origins` and `resolutions` must be equal\n }\n\n var extent = options.extent;\n\n if (extent !== undefined &&\n !this.origin_ && !this.origins_) {\n this.origin_ = getTopLeft(extent);\n }\n\n assert(\n (!this.origin_ && this.origins_) || (this.origin_ && !this.origins_),\n 18); // 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,\n 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_ = options.tileSize !== undefined ?\n options.tileSize :\n !this.tileSizes_ ? DEFAULT_TILE_SIZE : null;\n assert(\n (!this.tileSize_ && this.tileSizes_) ||\n (this.tileSize_ && !this.tileSizes_),\n 22); // 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 /**\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 var tileRange = new TileRange(\n Math.min(0, size[0]), Math.max(size[0] - 1, -1),\n Math.min(0, size[1]), Math.max(size[1] - 1, -1));\n return tileRange;\n }, this);\n } else if (extent) {\n this.calculateTileRanges_(extent);\n }\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)} callback Function called with each tile coordinate.\n * @api\n */\nTileGrid.prototype.forEachTileCoord = function forEachTileCoord (extent, zoom, callback) {\n var tileRange = this.getTileRangeForExtentAndZ(extent, zoom);\n for (var i = tileRange.minX, ii = tileRange.maxX; i <= ii; ++i) {\n for (var j = tileRange.minY, jj = tileRange.maxY; j <= jj; ++j) {\n callback([zoom, i, j]);\n }\n }\n};\n\n/**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {function(this: T, number, import(\"../TileRange.js\").default): boolean} callback Callback.\n * @param {T=} opt_this The object to use as `this` in `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 * @template T\n */\nTileGrid.prototype.forEachTileCoordParentTileRange = function forEachTileCoordParentTileRange (tileCoord, callback, opt_this, opt_tileRange, opt_extent) {\n var tileRange, x, y;\n var tileCoordExtent = null;\n var z = tileCoord[0] - 1;\n if (this.zoomFactor_ === 2) {\n x = tileCoord[1];\n y = tileCoord[2];\n } 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(tileCoordExtent, z, opt_tileRange);\n }\n if (callback.call(opt_this, 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 */\nTileGrid.prototype.getExtent = function 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 */\nTileGrid.prototype.getMaxZoom = function 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 */\nTileGrid.prototype.getMinZoom = function 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 */\nTileGrid.prototype.getOrigin = function 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 */\nTileGrid.prototype.getResolution = function 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 */\nTileGrid.prototype.getResolutions = function 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 */\nTileGrid.prototype.getTileCoordChildTileRange = function getTileCoordChildTileRange (tileCoord, opt_tileRange, opt_extent) {\n if (tileCoord[0] < this.maxZoom) {\n if (this.zoomFactor_ === 2) {\n var minX = tileCoord[1] * 2;\n var minY = tileCoord[2] * 2;\n return createOrUpdateTileRange(minX, minX + 1, minY, minY + 1, opt_tileRange);\n }\n var tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent);\n return this.getTileRangeForExtentAndZ(\n tileCoordExtent, tileCoord[0] + 1, opt_tileRange);\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 */\nTileGrid.prototype.getTileRangeExtent = function getTileRangeExtent (z, tileRange, opt_extent) {\n var origin = this.getOrigin(z);\n var resolution = this.getResolution(z);\n var tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n var minX = origin[0] + tileRange.minX * tileSize[0] * resolution;\n var maxX = origin[0] + (tileRange.maxX + 1) * tileSize[0] * resolution;\n var minY = origin[1] + tileRange.minY * tileSize[1] * resolution;\n var maxY = origin[1] + (tileRange.maxY + 1) * tileSize[1] * resolution;\n return createOrUpdate(minX, minY, maxX, maxY, opt_extent);\n};\n\n/**\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 */\nTileGrid.prototype.getTileRangeForExtentAndZ = function getTileRangeForExtentAndZ (extent, z, opt_tileRange) {\n var tileCoord = tmpTileCoord;\n this.getTileCoordForXYAndZ_(extent[0], extent[1], z, false, tileCoord);\n var minX = tileCoord[1];\n var minY = tileCoord[2];\n this.getTileCoordForXYAndZ_(extent[2], extent[3], z, true, tileCoord);\n return createOrUpdateTileRange(minX, tileCoord[1], minY, tileCoord[2], opt_tileRange);\n};\n\n/**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @return {import(\"../coordinate.js\").Coordinate} Tile center.\n */\nTileGrid.prototype.getTileCoordCenter = function getTileCoordCenter (tileCoord) {\n var origin = this.getOrigin(tileCoord[0]);\n var resolution = this.getResolution(tileCoord[0]);\n var tileSize = toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);\n return [\n origin[0] + (tileCoord[1] + 0.5) * tileSize[0] * resolution,\n origin[1] + (tileCoord[2] + 0.5) * tileSize[1] * resolution\n ];\n};\n\n/**\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 */\nTileGrid.prototype.getTileCoordExtent = function getTileCoordExtent (tileCoord, opt_extent) {\n var origin = this.getOrigin(tileCoord[0]);\n var resolution = this.getResolution(tileCoord[0]);\n var tileSize = toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);\n var minX = origin[0] + tileCoord[1] * tileSize[0] * resolution;\n var minY = origin[1] + tileCoord[2] * tileSize[1] * resolution;\n var maxX = minX + tileSize[0] * resolution;\n var maxY = minY + tileSize[1] * resolution;\n return createOrUpdate(minX, minY, maxX, maxY, opt_extent);\n};\n\n/**\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 */\nTileGrid.prototype.getTileCoordForCoordAndResolution = function getTileCoordForCoordAndResolution (coordinate, resolution, opt_tileCoord) {\n return this.getTileCoordForXYAndResolution_(\n coordinate[0], coordinate[1], resolution, false, opt_tileCoord);\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 */\nTileGrid.prototype.getTileCoordForXYAndResolution_ = function getTileCoordForXYAndResolution_ (x, y, resolution, reverseIntersectionPolicy, opt_tileCoord) {\n var z = this.getZForResolution(resolution);\n var scale = resolution / this.getResolution(z);\n var origin = this.getOrigin(z);\n var tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n\n var adjustX = reverseIntersectionPolicy ? 0.5 : 0;\n var adjustY = reverseIntersectionPolicy ? 0 : 0.5;\n var xFromOrigin = Math.floor((x - origin[0]) / resolution + adjustX);\n var yFromOrigin = Math.floor((y - origin[1]) / resolution + adjustY);\n var tileCoordX = scale * xFromOrigin / tileSize[0];\n var 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 */\nTileGrid.prototype.getTileCoordForXYAndZ_ = function getTileCoordForXYAndZ_ (x, y, z, reverseIntersectionPolicy, opt_tileCoord) {\n var origin = this.getOrigin(z);\n var resolution = this.getResolution(z);\n var tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n\n var adjustX = reverseIntersectionPolicy ? 0.5 : 0;\n var adjustY = reverseIntersectionPolicy ? 0 : 0.5;\n var xFromOrigin = Math.floor((x - origin[0]) / resolution + adjustX);\n var yFromOrigin = Math.floor((y - origin[1]) / resolution + adjustY);\n var tileCoordX = xFromOrigin / tileSize[0];\n var 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 */\nTileGrid.prototype.getTileCoordForCoordAndZ = function getTileCoordForCoordAndZ (coordinate, z, opt_tileCoord) {\n return this.getTileCoordForXYAndZ_(\n coordinate[0], coordinate[1], z, false, opt_tileCoord);\n};\n\n/**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @return {number} Tile resolution.\n */\nTileGrid.prototype.getTileCoordResolution = function 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 */\nTileGrid.prototype.getTileSize = function 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 */\nTileGrid.prototype.getFullTileRange = function getFullTileRange (z) {\n if (!this.fullTileRanges_) {\n return 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 */\nTileGrid.prototype.getZForResolution = function getZForResolution (resolution, opt_direction) {\n var z = linearFindNearest(this.resolutions_, resolution, opt_direction || 0);\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 */\nTileGrid.prototype.calculateTileRanges_ = function calculateTileRanges_ (extent) {\n var length = this.resolutions_.length;\n var fullTileRanges = new Array(length);\n for (var z = this.minZoom; z < length; ++z) {\n fullTileRanges[z] = this.getTileRangeForExtentAndZ(extent, z);\n }\n this.fullTileRanges_ = fullTileRanges;\n};\n\n\nexport default TileGrid;\n\n//# sourceMappingURL=TileGrid.js.map","/**\n * @module ol/tilegrid\n */\nimport {DEFAULT_MAX_ZOOM, DEFAULT_TILE_SIZE} from './tilegrid/common.js';\nimport {toSize} from './size.js';\nimport {containsCoordinate, createOrUpdate, getCorner, getHeight, getWidth} from './extent.js';\nimport Corner from './extent/Corner.js';\nimport {get as getProjection, METERS_PER_UNIT} from './proj.js';\nimport Units from './proj/Units.js';\nimport TileGrid from './tilegrid/TileGrid.js';\n\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 var tileGrid = projection.getDefaultTileGrid();\n if (!tileGrid) {\n tileGrid = createForProjection(projection);\n projection.setDefaultTileGrid(tileGrid);\n }\n return tileGrid;\n}\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 var z = tileCoord[0];\n var center = tileGrid.getTileCoordCenter(tileCoord);\n var projectionExtent = extentFromProjection(projection);\n if (!containsCoordinate(projectionExtent, center)) {\n var worldWidth = getWidth(projectionExtent);\n var worldsAway = Math.ceil((projectionExtent[0] - center[0]) / worldWidth);\n center[0] += worldWidth * worldsAway;\n return tileGrid.getTileCoordForCoordAndZ(center, z);\n } else {\n return tileCoord;\n }\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 {Corner=} 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 var corner = opt_corner !== undefined ? opt_corner : Corner.TOP_LEFT;\n\n var 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/**\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. The zero level of the grid is defined by the resolution at which one tile fits in the\n * provided extent. If not provided, the extent of the EPSG:3857 projection is used.\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/**\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 /** @type {XYZOptions} */\n var xyzOptions = opt_options || {};\n\n var extent = xyzOptions.extent || getProjection('EPSG:3857').getExtent();\n\n /** @type {import(\"./tilegrid/TileGrid.js\").Options} */\n var gridOptions = {\n extent: extent,\n minZoom: xyzOptions.minZoom,\n tileSize: xyzOptions.tileSize,\n resolutions: resolutionsFromExtent(\n extent,\n xyzOptions.maxZoom,\n xyzOptions.tileSize\n )\n };\n return new TileGrid(gridOptions);\n}\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 * @return {!Array<number>} Resolutions array.\n */\nfunction resolutionsFromExtent(extent, opt_maxZoom, opt_tileSize) {\n var maxZoom = opt_maxZoom !== undefined ?\n opt_maxZoom : DEFAULT_MAX_ZOOM;\n\n var height = getHeight(extent);\n var width = getWidth(extent);\n\n var tileSize = toSize(opt_tileSize !== undefined ?\n opt_tileSize : DEFAULT_TILE_SIZE);\n var maxResolution = Math.max(\n width / tileSize[0], height / tileSize[1]);\n\n var length = maxZoom + 1;\n var resolutions = new Array(length);\n for (var z = 0; z < length; ++z) {\n resolutions[z] = maxResolution / Math.pow(2, z);\n }\n return resolutions;\n}\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 {Corner=} opt_corner Extent corner (default is `'top-left'`).\n * @return {!TileGrid} TileGrid instance.\n */\nexport function createForProjection(projection, opt_maxZoom, opt_tileSize, opt_corner) {\n var extent = extentFromProjection(projection);\n return createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner);\n}\n\n\n/**\n * Generate a tile grid extent from a projection. If the projection has an\n * extent, it is used. If not, a global extent is assumed.\n * @param {import(\"./proj.js\").ProjectionLike} projection Projection.\n * @return {import(\"./extent.js\").Extent} Extent.\n */\nexport function extentFromProjection(projection) {\n projection = getProjection(projection);\n var extent = projection.getExtent();\n if (!extent) {\n var half = 180 * METERS_PER_UNIT[Units.DEGREES] / projection.getMetersPerUnit();\n extent = createOrUpdate(-half, -half, half, half);\n }\n return extent;\n}\n\n//# sourceMappingURL=tilegrid.js.map","/**\n * @module ol/source/Tile\n */\nimport {abstract} from '../util.js';\nimport TileCache from '../TileCache.js';\nimport TileState from '../TileState.js';\nimport Event from '../events/Event.js';\nimport {equivalent} from '../proj.js';\nimport {toSize, scale as scaleSize} from '../size.js';\nimport Source from './Source.js';\nimport {getKeyZXY, withinExtentAndZ} from '../tilecoord.js';\nimport {wrapX, getForProjection as getTileGridForProjection} from '../tilegrid.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]\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 */\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 */\nvar TileSource = /*@__PURE__*/(function (Source) {\n function TileSource(options) {\n\n Source.call(this, {\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_ = options.tilePixelRatio !== undefined ?\n 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 /**\n * @protected\n * @type {import(\"../TileCache.js\").default}\n */\n this.tileCache = new TileCache(options.cacheSize);\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\n if ( Source ) TileSource.__proto__ = Source;\n TileSource.prototype = Object.create( Source && Source.prototype );\n TileSource.prototype.constructor = TileSource;\n\n /**\n * @return {boolean} Can expire cache.\n */\n TileSource.prototype.canExpireCache = function canExpireCache () {\n return this.tileCache.canExpireCache();\n };\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {!Object<string, import(\"../TileRange.js\").default>} usedTiles Used tiles.\n */\n TileSource.prototype.expireCache = function expireCache (projection, usedTiles) {\n var 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 TileSource.prototype.forEachLoadedTile = function forEachLoadedTile (projection, z, tileRange, callback) {\n var tileCache = this.getTileCacheForProjection(projection);\n if (!tileCache) {\n return false;\n }\n\n var covered = true;\n var tile, tileCoordKey, loaded;\n for (var x = tileRange.minX; x <= tileRange.maxX; ++x) {\n for (var y = tileRange.minY; y <= tileRange.maxY; ++y) {\n tileCoordKey = getKeyZXY(z, x, y);\n loaded = false;\n if (tileCache.containsKey(tileCoordKey)) {\n tile = /** @type {!import(\"../Tile.js\").default} */ (tileCache.get(tileCoordKey));\n loaded = tile.getState() === TileState.LOADED;\n if (loaded) {\n loaded = (callback(tile) !== false);\n }\n }\n if (!loaded) {\n covered = false;\n }\n }\n }\n return covered;\n };\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {number} Gutter.\n */\n TileSource.prototype.getGutterForProjection = function 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 TileSource.prototype.getKey = function 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 TileSource.prototype.setKey = function 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 TileSource.prototype.getOpaque = function getOpaque (projection) {\n return this.opaque_;\n };\n\n /**\n * @inheritDoc\n */\n TileSource.prototype.getResolutions = function 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 TileSource.prototype.getTile = function 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 TileSource.prototype.getTileGrid = function 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 TileSource.prototype.getTileGridForProjection = function getTileGridForProjection$1 (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 TileSource.prototype.getTileCacheForProjection = function getTileCacheForProjection (projection) {\n var thisProj = this.getProjection();\n if (thisProj && !equivalent(thisProj, projection)) {\n return null;\n } else {\n return this.tileCache;\n }\n };\n\n /**\n * Get the tile pixel ratio for this source. Subclasses may override this\n * method, which is meant to return a supported pixel ratio that matches the\n * provided `pixelRatio` as close as possible.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Tile pixel ratio.\n */\n TileSource.prototype.getTilePixelRatio = function 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 TileSource.prototype.getTilePixelSize = function getTilePixelSize (z, pixelRatio, projection) {\n var tileGrid = this.getTileGridForProjection(projection);\n var tilePixelRatio = this.getTilePixelRatio(pixelRatio);\n var tileSize = toSize(tileGrid.getTileSize(z), this.tmpSize);\n if (tilePixelRatio == 1) {\n return tileSize;\n } 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 TileSource.prototype.getTileCoordForTileUrlFunction = function getTileCoordForTileUrlFunction (tileCoord, opt_projection) {\n var projection = opt_projection !== undefined ?\n opt_projection : this.getProjection();\n var tileGrid = this.getTileGridForProjection(projection);\n if (this.getWrapX() && projection.isGlobal()) {\n tileCoord = wrapX(tileGrid, tileCoord, projection);\n }\n return withinExtentAndZ(tileCoord, tileGrid) ? tileCoord : null;\n };\n\n /**\n * @inheritDoc\n */\n TileSource.prototype.refresh = function refresh () {\n this.tileCache.clear();\n this.changed();\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 TileSource.prototype.useTile = function useTile (z, x, y, projection) {};\n\n return TileSource;\n}(Source));\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Tile~TileSource} instances are instances of this\n * type.\n */\nexport var TileSourceEvent = /*@__PURE__*/(function (Event) {\n function TileSourceEvent(type, tile) {\n\n Event.call(this, 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\n if ( Event ) TileSourceEvent.__proto__ = Event;\n TileSourceEvent.prototype = Object.create( Event && Event.prototype );\n TileSourceEvent.prototype.constructor = TileSourceEvent;\n\n return TileSourceEvent;\n}(Event));\n\nexport default TileSource;\n\n//# sourceMappingURL=Tile.js.map","/**\n * @module ol/renderer/webgl/tilelayershader\n */\n// This file is automatically generated, do not edit.\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../webgl.js';\nimport WebGLFragment from '../../webgl/Fragment.js';\nimport WebGLVertex from '../../webgl/Vertex.js';\n\nexport var fragment = new WebGLFragment(DEBUG_WEBGL ?\n 'precision mediump float;\\nvarying vec2 v_texCoord;\\n\\n\\nuniform sampler2D u_texture;\\n\\nvoid main(void) {\\n gl_FragColor = texture2D(u_texture, v_texCoord);\\n}\\n' :\n 'precision mediump float;varying vec2 a;uniform sampler2D e;void main(void){gl_FragColor=texture2D(e,a);}');\n\nexport var vertex = new WebGLVertex(DEBUG_WEBGL ?\n 'varying vec2 v_texCoord;\\n\\n\\nattribute vec2 a_position;\\nattribute vec2 a_texCoord;\\nuniform vec4 u_tileOffset;\\n\\nvoid main(void) {\\n gl_Position = vec4(a_position * u_tileOffset.xy + u_tileOffset.zw, 0., 1.);\\n v_texCoord = a_texCoord;\\n}\\n\\n\\n' :\n 'varying vec2 a;attribute vec2 b;attribute vec2 c;uniform vec4 d;void main(void){gl_Position=vec4(b*d.xy+d.zw,0.,1.);a=c;}');\n\n//# sourceMappingURL=tilelayershader.js.map","/**\n * @module ol/renderer/webgl/tilelayershader/Locations\n */\n// This file is automatically generated, do not edit\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../../webgl.js';\n\nvar Locations = function Locations(gl, program) {\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_tileOffset = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_tileOffset' : 'd');\n\n /**\n * @type {WebGLUniformLocation}\n */\n this.u_texture = gl.getUniformLocation(\n program, DEBUG_WEBGL ? 'u_texture' : 'e');\n\n /**\n * @type {number}\n */\n this.a_position = gl.getAttribLocation(\n program, DEBUG_WEBGL ? 'a_position' : 'b');\n\n /**\n * @type {number}\n */\n this.a_texCoord = gl.getAttribLocation(\n program, DEBUG_WEBGL ? 'a_texCoord' : 'c');\n\n};\n\nexport default Locations;\n\n//# sourceMappingURL=Locations.js.map","/**\n * @module ol/renderer/webgl/TileLayer\n */\n// FIXME large resolutions lead to too large framebuffers :-(\n// FIXME animated shaders! check in redraw\n\nimport LayerType from '../../LayerType.js';\nimport ImageTile from '../../ImageTile.js';\nimport TileRange from '../../TileRange.js';\nimport TileState from '../../TileState.js';\nimport TileSource from '../../source/Tile.js';\nimport {numberSafeCompareFunction} from '../../array.js';\nimport {createEmpty, intersects} from '../../extent.js';\nimport {roundUpToPowerOfTwo} from '../../math.js';\nimport WebGLLayerRenderer from './Layer.js';\nimport {fragment, vertex} from './tilelayershader.js';\nimport Locations from './tilelayershader/Locations.js';\nimport {toSize} from '../../size.js';\nimport {\n reset as resetTransform,\n rotate as rotateTransform,\n scale as scaleTransform,\n translate as translateTransform,\n apply as applyTransform\n} from '../../transform.js';\nimport {COLOR_BUFFER_BIT, BLEND, ARRAY_BUFFER, FLOAT, LINEAR, TRIANGLE_STRIP} from '../../webgl.js';\nimport WebGLBuffer from '../../webgl/Buffer.js';\n\n/**\n * @classdesc\n * WebGL renderer for tile layers.\n * @api\n */\nvar WebGLTileLayerRenderer = /*@__PURE__*/(function (WebGLLayerRenderer) {\n function WebGLTileLayerRenderer(mapRenderer, tileLayer) {\n\n WebGLLayerRenderer.call(this, mapRenderer, tileLayer);\n\n /**\n * @private\n * @type {import(\"../../webgl/Fragment.js\").default}\n */\n this.fragmentShader_ = fragment;\n\n /**\n * @private\n * @type {import(\"../../webgl/Vertex.js\").default}\n */\n this.vertexShader_ = vertex;\n\n /**\n * @private\n * @type {import(\"./tilelayershader/Locations.js\").default}\n */\n this.locations_ = null;\n\n /**\n * @private\n * @type {import(\"../../webgl/Buffer.js\").default}\n */\n this.renderArrayBuffer_ = new WebGLBuffer([\n 0, 0, 0, 1,\n 1, 0, 1, 1,\n 0, 1, 0, 0,\n 1, 1, 1, 0\n ]);\n\n /**\n * @private\n * @type {import(\"../../TileRange.js\").default}\n */\n this.renderedTileRange_ = null;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.renderedFramebufferExtent_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedRevision_ = -1;\n\n /**\n * @private\n * @type {import(\"../../size.js\").Size}\n */\n this.tmpSize_ = [0, 0];\n\n }\n\n if ( WebGLLayerRenderer ) WebGLTileLayerRenderer.__proto__ = WebGLLayerRenderer;\n WebGLTileLayerRenderer.prototype = Object.create( WebGLLayerRenderer && WebGLLayerRenderer.prototype );\n WebGLTileLayerRenderer.prototype.constructor = WebGLTileLayerRenderer;\n\n /**\n * @inheritDoc\n */\n WebGLTileLayerRenderer.prototype.disposeInternal = function disposeInternal () {\n var context = this.mapRenderer.getContext();\n context.deleteBuffer(this.renderArrayBuffer_);\n WebGLLayerRenderer.prototype.disposeInternal.call(this);\n };\n\n /**\n * @inheritDoc\n */\n WebGLTileLayerRenderer.prototype.createLoadedTileFinder = function createLoadedTileFinder (source, projection, tiles) {\n var mapRenderer = this.mapRenderer;\n\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 */\n function(zoom, tileRange) {\n function callback(tile) {\n var loaded = mapRenderer.isTileTextureLoaded(tile);\n if (loaded) {\n if (!tiles[zoom]) {\n tiles[zoom] = {};\n }\n tiles[zoom][tile.tileCoord.toString()] = tile;\n }\n return loaded;\n }\n return source.forEachLoadedTile(projection, zoom, tileRange, callback);\n }\n );\n };\n\n /**\n * @inheritDoc\n */\n WebGLTileLayerRenderer.prototype.handleWebGLContextLost = function handleWebGLContextLost () {\n WebGLLayerRenderer.prototype.handleWebGLContextLost.call(this);\n this.locations_ = null;\n };\n\n /**\n * @inheritDoc\n */\n WebGLTileLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState, context) {\n\n var mapRenderer = this.mapRenderer;\n var gl = context.getGL();\n\n var viewState = frameState.viewState;\n var projection = viewState.projection;\n\n var tileLayer = /** @type {import(\"../../layer/Tile.js\").default} */ (this.getLayer());\n var tileSource = tileLayer.getSource();\n if (!(tileSource instanceof TileSource)) {\n return true;\n }\n\n var tileGrid = tileSource.getTileGridForProjection(projection);\n var z = tileGrid.getZForResolution(viewState.resolution);\n var tileResolution = tileGrid.getResolution(z);\n\n var tilePixelSize =\n tileSource.getTilePixelSize(z, frameState.pixelRatio, projection);\n var pixelRatio = tilePixelSize[0] /\n toSize(tileGrid.getTileSize(z), this.tmpSize_)[0];\n var tilePixelResolution = tileResolution / pixelRatio;\n var tileGutter = tileSource.getTilePixelRatio(pixelRatio) * tileSource.getGutterForProjection(projection);\n\n var center = viewState.center;\n var extent = frameState.extent;\n var tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n\n var framebufferExtent;\n if (this.renderedTileRange_ &&\n this.renderedTileRange_.equals(tileRange) &&\n this.renderedRevision_ == tileSource.getRevision()) {\n framebufferExtent = this.renderedFramebufferExtent_;\n } else {\n\n var tileRangeSize = tileRange.getSize();\n\n var maxDimension = Math.max(\n tileRangeSize[0] * tilePixelSize[0],\n tileRangeSize[1] * tilePixelSize[1]);\n var framebufferDimension = roundUpToPowerOfTwo(maxDimension);\n var framebufferExtentDimension = tilePixelResolution * framebufferDimension;\n var origin = tileGrid.getOrigin(z);\n var minX = origin[0] +\n tileRange.minX * tilePixelSize[0] * tilePixelResolution;\n var minY = origin[1] +\n tileRange.minY * tilePixelSize[1] * tilePixelResolution;\n framebufferExtent = [\n minX, minY,\n minX + framebufferExtentDimension, minY + framebufferExtentDimension\n ];\n\n this.bindFramebuffer(frameState, framebufferDimension);\n gl.viewport(0, 0, framebufferDimension, framebufferDimension);\n\n gl.clearColor(0, 0, 0, 0);\n gl.clear(COLOR_BUFFER_BIT);\n gl.disable(BLEND);\n\n var program = context.getProgram(this.fragmentShader_, this.vertexShader_);\n context.useProgram(program);\n if (!this.locations_) {\n this.locations_ = new Locations(gl, program);\n }\n\n context.bindBuffer(ARRAY_BUFFER, this.renderArrayBuffer_);\n gl.enableVertexAttribArray(this.locations_.a_position);\n gl.vertexAttribPointer(\n this.locations_.a_position, 2, FLOAT, false, 16, 0);\n gl.enableVertexAttribArray(this.locations_.a_texCoord);\n gl.vertexAttribPointer(\n this.locations_.a_texCoord, 2, FLOAT, false, 16, 8);\n gl.uniform1i(this.locations_.u_texture, 0);\n\n /**\n * @type {Object<number, Object<string, import(\"../../Tile.js\").default>>}\n */\n var tilesToDrawByZ = {};\n tilesToDrawByZ[z] = {};\n\n var findLoadedTiles = this.createLoadedTileFinder(\n tileSource, projection, tilesToDrawByZ);\n\n var useInterimTilesOnError = tileLayer.getUseInterimTilesOnError();\n var allTilesLoaded = true;\n var tmpExtent = createEmpty();\n var tmpTileRange = new TileRange(0, 0, 0, 0);\n var childTileRange, drawable, fullyLoaded, tile, tileState;\n var x, y, tileExtent;\n for (x = tileRange.minX; x <= tileRange.maxX; ++x) {\n for (y = tileRange.minY; y <= tileRange.maxY; ++y) {\n\n tile = tileSource.getTile(z, x, y, pixelRatio, projection);\n if (layerState.extent !== undefined) {\n // ignore tiles outside layer extent\n tileExtent = tileGrid.getTileCoordExtent(tile.tileCoord, tmpExtent);\n if (!intersects(tileExtent, layerState.extent)) {\n continue;\n }\n }\n tileState = tile.getState();\n drawable = tileState == TileState.LOADED ||\n tileState == TileState.EMPTY ||\n tileState == TileState.ERROR && !useInterimTilesOnError;\n if (!drawable) {\n tile = tile.getInterimTile();\n }\n tileState = tile.getState();\n if (tileState == TileState.LOADED) {\n if (mapRenderer.isTileTextureLoaded(tile)) {\n tilesToDrawByZ[z][tile.tileCoord.toString()] = tile;\n continue;\n }\n } else if (tileState == TileState.EMPTY ||\n (tileState == TileState.ERROR &&\n !useInterimTilesOnError)) {\n continue;\n }\n\n allTilesLoaded = false;\n fullyLoaded = tileGrid.forEachTileCoordParentTileRange(\n tile.tileCoord, findLoadedTiles, null, tmpTileRange, tmpExtent);\n if (!fullyLoaded) {\n childTileRange = tileGrid.getTileCoordChildTileRange(\n tile.tileCoord, tmpTileRange, tmpExtent);\n if (childTileRange) {\n findLoadedTiles(z + 1, childTileRange);\n }\n }\n\n }\n\n }\n\n /** @type {Array<number>} */\n var zs = Object.keys(tilesToDrawByZ).map(Number);\n zs.sort(numberSafeCompareFunction);\n var u_tileOffset = new Float32Array(4);\n for (var i = 0, ii = zs.length; i < ii; ++i) {\n var tilesToDraw = tilesToDrawByZ[zs[i]];\n for (var tileKey in tilesToDraw) {\n tile = tilesToDraw[tileKey];\n\n if (!(tile instanceof ImageTile)) {\n continue;\n }\n\n tileExtent = tileGrid.getTileCoordExtent(tile.tileCoord, tmpExtent);\n u_tileOffset[0] = 2 * (tileExtent[2] - tileExtent[0]) /\n framebufferExtentDimension;\n u_tileOffset[1] = 2 * (tileExtent[3] - tileExtent[1]) /\n framebufferExtentDimension;\n u_tileOffset[2] = 2 * (tileExtent[0] - framebufferExtent[0]) /\n framebufferExtentDimension - 1;\n u_tileOffset[3] = 2 * (tileExtent[1] - framebufferExtent[1]) /\n framebufferExtentDimension - 1;\n gl.uniform4fv(this.locations_.u_tileOffset, u_tileOffset);\n mapRenderer.bindTileTexture(tile, tilePixelSize,\n tileGutter * pixelRatio, LINEAR, LINEAR);\n gl.drawArrays(TRIANGLE_STRIP, 0, 4);\n }\n }\n\n if (allTilesLoaded) {\n this.renderedTileRange_ = tileRange;\n this.renderedFramebufferExtent_ = framebufferExtent;\n this.renderedRevision_ = tileSource.getRevision();\n } else {\n this.renderedTileRange_ = null;\n this.renderedFramebufferExtent_ = null;\n this.renderedRevision_ = -1;\n frameState.animate = true;\n }\n\n }\n\n this.updateUsedTiles(frameState.usedTiles, tileSource, z, tileRange);\n var tileTextureQueue = mapRenderer.getTileTextureQueue();\n this.manageTilePyramid(\n frameState, tileSource, tileGrid, pixelRatio, projection, extent, z,\n tileLayer.getPreload(),\n /**\n * @param {import(\"../../Tile.js\").default} tile Tile.\n */\n function(tile) {\n if (tile.getState() == TileState.LOADED &&\n !mapRenderer.isTileTextureLoaded(tile) &&\n !tileTextureQueue.isKeyQueued(tile.getKey())) {\n tileTextureQueue.enqueue([\n tile,\n tileGrid.getTileCoordCenter(tile.tileCoord),\n tileGrid.getResolution(tile.tileCoord[0]),\n tilePixelSize, tileGutter * pixelRatio\n ]);\n }\n }, this);\n this.scheduleExpireCache(frameState, tileSource);\n\n var texCoordMatrix = this.texCoordMatrix;\n resetTransform(texCoordMatrix);\n translateTransform(texCoordMatrix,\n (Math.round(center[0] / tileResolution) * tileResolution - framebufferExtent[0]) /\n (framebufferExtent[2] - framebufferExtent[0]),\n (Math.round(center[1] / tileResolution) * tileResolution - framebufferExtent[1]) /\n (framebufferExtent[3] - framebufferExtent[1]));\n if (viewState.rotation !== 0) {\n rotateTransform(texCoordMatrix, viewState.rotation);\n }\n scaleTransform(texCoordMatrix,\n frameState.size[0] * viewState.resolution /\n (framebufferExtent[2] - framebufferExtent[0]),\n frameState.size[1] * viewState.resolution /\n (framebufferExtent[3] - framebufferExtent[1]));\n translateTransform(texCoordMatrix, -0.5, -0.5);\n\n return true;\n };\n\n /**\n * @inheritDoc\n */\n WebGLTileLayerRenderer.prototype.forEachLayerAtPixel = function forEachLayerAtPixel (pixel, frameState, callback, thisArg) {\n if (!this.framebuffer) {\n return undefined;\n }\n\n var pixelOnMapScaled = [\n pixel[0] / frameState.size[0],\n (frameState.size[1] - pixel[1]) / frameState.size[1]];\n\n var pixelOnFrameBufferScaled = applyTransform(\n this.texCoordMatrix, pixelOnMapScaled.slice());\n var pixelOnFrameBuffer = [\n pixelOnFrameBufferScaled[0] * this.framebufferDimension,\n pixelOnFrameBufferScaled[1] * this.framebufferDimension];\n\n var gl = this.mapRenderer.getContext().getGL();\n gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer);\n var imageData = new Uint8Array(4);\n gl.readPixels(pixelOnFrameBuffer[0], pixelOnFrameBuffer[1], 1, 1,\n gl.RGBA, gl.UNSIGNED_BYTE, imageData);\n\n if (imageData[3] > 0) {\n return callback.call(thisArg, this.getLayer(), imageData);\n } else {\n return undefined;\n }\n };\n\n return WebGLTileLayerRenderer;\n}(WebGLLayerRenderer));\n\n\n/**\n * Determine if this renderer handles the provided layer.\n * @param {import(\"../../layer/Layer.js\").default} layer The candidate layer.\n * @return {boolean} The renderer can render the layer.\n */\nWebGLTileLayerRenderer['handles'] = function(layer) {\n return layer.getType() === LayerType.TILE;\n};\n\n\n/**\n * Create a layer renderer.\n * @param {import(\"../Map.js\").default} mapRenderer The map renderer.\n * @param {import(\"../../layer/Layer.js\").default} layer The layer to be rendererd.\n * @return {WebGLTileLayerRenderer} The layer renderer.\n */\nWebGLTileLayerRenderer['create'] = function(mapRenderer, layer) {\n return new WebGLTileLayerRenderer(\n /** @type {import(\"./Map.js\").default} */ (mapRenderer),\n /** @type {import(\"../../layer/Tile.js\").default} */ (layer)\n );\n};\n\n\nexport default WebGLTileLayerRenderer;\n\n//# sourceMappingURL=TileLayer.js.map","/**\n * @module ol/renderer/webgl/VectorLayer\n */\nimport {getUid} from '../../util.js';\nimport LayerType from '../../LayerType.js';\nimport ViewHint from '../../ViewHint.js';\nimport {buffer, containsExtent, createEmpty} from '../../extent.js';\nimport WebGLReplayGroup from '../../render/webgl/ReplayGroup.js';\nimport {defaultOrder as defaultRenderOrder, getTolerance as getRenderTolerance, getSquaredTolerance as getSquaredRenderTolerance, renderFeature} from '../vector.js';\nimport WebGLLayerRenderer from './Layer.js';\nimport {apply as applyTransform} from '../../transform.js';\n\n\n/**\n * @classdesc\n * WebGL renderer for vector layers.\n * @api\n */\nvar WebGLVectorLayerRenderer = /*@__PURE__*/(function (WebGLLayerRenderer) {\n function WebGLVectorLayerRenderer(mapRenderer, vectorLayer) {\n\n WebGLLayerRenderer.call(this, mapRenderer, vectorLayer);\n\n /**\n * @private\n * @type {boolean}\n */\n this.dirty_ = false;\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 {function(import(\"../../Feature.js\").default, import(\"../../Feature.js\").default): number|null}\n */\n this.renderedRenderOrder_ = null;\n\n /**\n * @private\n * @type {import(\"../../render/webgl/ReplayGroup.js\").default}\n */\n this.replayGroup_ = null;\n\n /**\n * The last layer state.\n * @private\n * @type {?import(\"../../layer/Layer.js\").State}\n */\n this.layerState_ = null;\n\n }\n\n if ( WebGLLayerRenderer ) WebGLVectorLayerRenderer.__proto__ = WebGLLayerRenderer;\n WebGLVectorLayerRenderer.prototype = Object.create( WebGLLayerRenderer && WebGLLayerRenderer.prototype );\n WebGLVectorLayerRenderer.prototype.constructor = WebGLVectorLayerRenderer;\n\n /**\n * @inheritDoc\n */\n WebGLVectorLayerRenderer.prototype.composeFrame = function composeFrame (frameState, layerState, context) {\n this.layerState_ = layerState;\n var viewState = frameState.viewState;\n var replayGroup = this.replayGroup_;\n var size = frameState.size;\n var pixelRatio = frameState.pixelRatio;\n var gl = this.mapRenderer.getGL();\n if (replayGroup && !replayGroup.isEmpty()) {\n gl.enable(gl.SCISSOR_TEST);\n gl.scissor(0, 0, size[0] * pixelRatio, size[1] * pixelRatio);\n replayGroup.replay(context,\n viewState.center, viewState.resolution, viewState.rotation,\n size, pixelRatio, layerState.opacity,\n layerState.managed ? frameState.skippedFeatureUids : {});\n gl.disable(gl.SCISSOR_TEST);\n }\n\n };\n\n /**\n * @inheritDoc\n */\n WebGLVectorLayerRenderer.prototype.disposeInternal = function disposeInternal () {\n var replayGroup = this.replayGroup_;\n if (replayGroup) {\n var context = this.mapRenderer.getContext();\n replayGroup.getDeleteResourcesFunction(context)();\n this.replayGroup_ = null;\n }\n WebGLLayerRenderer.prototype.disposeInternal.call(this);\n };\n\n /**\n * @inheritDoc\n */\n WebGLVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (coordinate, frameState, hitTolerance, callback, thisArg) {\n if (!this.replayGroup_ || !this.layerState_) {\n return undefined;\n } else {\n var context = this.mapRenderer.getContext();\n var viewState = frameState.viewState;\n var layer = this.getLayer();\n var layerState = this.layerState_;\n /** @type {!Object<string, boolean>} */\n var features = {};\n return this.replayGroup_.forEachFeatureAtCoordinate(coordinate,\n context, viewState.center, viewState.resolution, viewState.rotation,\n frameState.size, frameState.pixelRatio, layerState.opacity,\n {},\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @return {?} Callback result.\n */\n function(feature) {\n var key = getUid(feature);\n if (!(key in features)) {\n features[key] = true;\n return callback.call(thisArg, feature, layer);\n }\n });\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLVectorLayerRenderer.prototype.hasFeatureAtCoordinate = function hasFeatureAtCoordinate (coordinate, frameState) {\n if (!this.replayGroup_ || !this.layerState_) {\n return false;\n } else {\n var context = this.mapRenderer.getContext();\n var viewState = frameState.viewState;\n var layerState = this.layerState_;\n return this.replayGroup_.hasFeatureAtCoordinate(coordinate,\n context, viewState.center, viewState.resolution, viewState.rotation,\n frameState.size, frameState.pixelRatio, layerState.opacity,\n frameState.skippedFeatureUids);\n }\n };\n\n /**\n * @inheritDoc\n */\n WebGLVectorLayerRenderer.prototype.forEachLayerAtPixel = function forEachLayerAtPixel (pixel, frameState, callback, thisArg) {\n var coordinate = applyTransform(\n frameState.pixelToCoordinateTransform, pixel.slice());\n var hasFeature = this.hasFeatureAtCoordinate(coordinate, frameState);\n\n if (hasFeature) {\n return callback.call(thisArg, this.getLayer(), null);\n } else {\n return undefined;\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 WebGLVectorLayerRenderer.prototype.handleStyleImageChange_ = function handleStyleImageChange_ (event) {\n this.renderIfReadyAndVisible();\n };\n\n /**\n * @inheritDoc\n */\n WebGLVectorLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState, context) {\n var vectorLayer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n var vectorSource = /** @type {import(\"../../source/Vector.js\").default} */ (vectorLayer.getSource());\n\n var animating = frameState.viewHints[ViewHint.ANIMATING];\n var interacting = frameState.viewHints[ViewHint.INTERACTING];\n var updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();\n var updateWhileInteracting = vectorLayer.getUpdateWhileInteracting();\n\n if (!this.dirty_ && (!updateWhileAnimating && animating) ||\n (!updateWhileInteracting && interacting)) {\n return true;\n }\n\n var frameStateExtent = frameState.extent;\n var viewState = frameState.viewState;\n var projection = viewState.projection;\n var resolution = viewState.resolution;\n var pixelRatio = frameState.pixelRatio;\n var vectorLayerRevision = vectorLayer.getRevision();\n var vectorLayerRenderBuffer = vectorLayer.getRenderBuffer();\n var vectorLayerRenderOrder = vectorLayer.getRenderOrder();\n\n if (vectorLayerRenderOrder === undefined) {\n vectorLayerRenderOrder = defaultRenderOrder;\n }\n\n var extent = buffer(frameStateExtent,\n vectorLayerRenderBuffer * resolution);\n\n if (!this.dirty_ &&\n this.renderedResolution_ == resolution &&\n this.renderedRevision_ == vectorLayerRevision &&\n this.renderedRenderOrder_ == vectorLayerRenderOrder &&\n containsExtent(this.renderedExtent_, extent)) {\n return true;\n }\n\n if (this.replayGroup_) {\n frameState.postRenderFunctions.push(\n this.replayGroup_.getDeleteResourcesFunction(context));\n }\n\n this.dirty_ = false;\n\n var replayGroup = new WebGLReplayGroup(\n getRenderTolerance(resolution, pixelRatio),\n extent, vectorLayer.getRenderBuffer());\n vectorSource.loadFeatures(extent, resolution, projection);\n /**\n * @param {import(\"../../Feature.js\").default} feature Feature.\n * @this {WebGLVectorLayerRenderer}\n */\n var render = function(feature) {\n var styles;\n var styleFunction = feature.getStyleFunction() || vectorLayer.getStyleFunction();\n if (styleFunction) {\n styles = styleFunction(feature, resolution);\n }\n if (styles) {\n var dirty = this.renderFeature(\n feature, resolution, pixelRatio, styles, replayGroup);\n this.dirty_ = this.dirty_ || dirty;\n }\n }.bind(this);\n if (vectorLayerRenderOrder) {\n /** @type {Array<import(\"../../Feature.js\").default>} */\n var features = [];\n vectorSource.forEachFeatureInExtent(extent,\n /**\n * @param {import(\"../../Feature.js\").default} feature Feature.\n */\n function(feature) {\n features.push(feature);\n });\n features.sort(vectorLayerRenderOrder);\n features.forEach(render.bind(this));\n } else {\n vectorSource.forEachFeatureInExtent(extent, render);\n }\n replayGroup.finish(context);\n\n this.renderedResolution_ = resolution;\n this.renderedRevision_ = vectorLayerRevision;\n this.renderedRenderOrder_ = vectorLayerRenderOrder;\n this.renderedExtent_ = extent;\n this.replayGroup_ = replayGroup;\n\n return true;\n };\n\n /**\n * @param {import(\"../../Feature.js\").default} feature Feature.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../../style/Style.js\").default|Array<import(\"../../style/Style.js\").default>} styles The style or array of\n * styles.\n * @param {import(\"../../render/webgl/ReplayGroup.js\").default} replayGroup Replay group.\n * @return {boolean} `true` if an image is loading.\n */\n WebGLVectorLayerRenderer.prototype.renderFeature = function renderFeature$1 (feature, resolution, pixelRatio, styles, replayGroup) {\n if (!styles) {\n return false;\n }\n var loading = false;\n if (Array.isArray(styles)) {\n for (var i = styles.length - 1, ii = 0; i >= ii; --i) {\n loading = renderFeature(\n replayGroup, feature, styles[i],\n getSquaredRenderTolerance(resolution, pixelRatio),\n this.handleStyleImageChange_, this) || loading;\n }\n } else {\n loading = renderFeature(\n replayGroup, feature, styles,\n getSquaredRenderTolerance(resolution, pixelRatio),\n this.handleStyleImageChange_, this) || loading;\n }\n return loading;\n };\n\n return WebGLVectorLayerRenderer;\n}(WebGLLayerRenderer));\n\n\n/**\n * Determine if this renderer handles the provided layer.\n * @param {import(\"../../layer/Layer.js\").default} layer The candidate layer.\n * @return {boolean} The renderer can render the layer.\n */\nWebGLVectorLayerRenderer['handles'] = function(layer) {\n return layer.getType() === LayerType.VECTOR;\n};\n\n\n/**\n * Create a layer renderer.\n * @param {import(\"../Map.js\").default} mapRenderer The map renderer.\n * @param {import(\"../../layer/Layer.js\").default} layer The layer to be rendererd.\n * @return {WebGLVectorLayerRenderer} The layer renderer.\n */\nWebGLVectorLayerRenderer['create'] = function(mapRenderer, layer) {\n return new WebGLVectorLayerRenderer(\n /** @type {import(\"./Map.js\").default} */ (mapRenderer),\n /** @type {import(\"../../layer/Vector.js\").default} */ (layer)\n );\n};\n\n\nexport default WebGLVectorLayerRenderer;\n\n//# sourceMappingURL=VectorLayer.js.map","/**\n * @module ol/WebGLMap\n */\nimport PluggableMap from './PluggableMap.js';\nimport {defaults as defaultControls} from './control.js';\nimport {defaults as defaultInteractions} from './interaction.js';\nimport {assign} from './obj.js';\nimport WebGLImageLayerRenderer from './renderer/webgl/ImageLayer.js';\nimport WebGLMapRenderer from './renderer/webgl/Map.js';\nimport WebGLTileLayerRenderer from './renderer/webgl/TileLayer.js';\nimport WebGLVectorLayerRenderer from './renderer/webgl/VectorLayer.js';\n\n\n/**\n * @classdesc\n * The WebGLMap uses WebGL for rendering map layers. This renderer has limited\n * support for vector data and no support for vector tiles.\n *\n * import WebGLMap from 'ol/WebGLMap';\n * import TileLayer from 'ol/layer/Tile';\n * import OSM from 'ol/source/OSM';\n * import View from 'ol/View';\n *\n * var map = new WebGLMap({\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~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()`.\n * Note that {@link module:ol/layer/Group~Group} is a subclass of\n * {@link module:ol/layer/Base}, so layers entered in the options or added\n * with `addLayer` can be groups, which can contain further groups, and so on.\n *\n * @fires import(\"./MapBrowserEvent.js\").MapBrowserEvent\n * @fires import(\"./MapEvent.js\").MapEvent\n * @fires module:ol/render/Event~RenderEvent#postcompose\n * @fires module:ol/render/Event~RenderEvent#precompose\n * @api\n */\nvar WebGLMap = /*@__PURE__*/(function (PluggableMap) {\n function WebGLMap(options) {\n options = assign({}, options);\n if (!options.controls) {\n options.controls = defaultControls();\n }\n if (!options.interactions) {\n options.interactions = defaultInteractions();\n }\n\n PluggableMap.call(this, options);\n }\n\n if ( PluggableMap ) WebGLMap.__proto__ = PluggableMap;\n WebGLMap.prototype = Object.create( PluggableMap && PluggableMap.prototype );\n WebGLMap.prototype.constructor = WebGLMap;\n\n WebGLMap.prototype.createRenderer = function createRenderer () {\n var renderer = new WebGLMapRenderer(this);\n renderer.registerLayerRenderers([\n WebGLImageLayerRenderer,\n WebGLTileLayerRenderer,\n WebGLVectorLayerRenderer\n ]);\n return renderer;\n };\n\n return WebGLMap;\n}(PluggableMap));\n\n\nexport default WebGLMap;\n\n//# sourceMappingURL=WebGLMap.js.map","/**\n * @module ol/control/ScaleLine\n */\nimport {getChangeEventType} from '../Object.js';\nimport {assert} from '../asserts.js';\nimport Control from './Control.js';\nimport {CLASS_UNSELECTABLE} from '../css.js';\nimport {listen} from '../events.js';\nimport {getPointResolution, METERS_PER_UNIT} from '../proj.js';\nimport ProjUnits from '../proj/Units.js';\n\n\n/**\n * @type {string}\n */\nvar 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 var Units = {\n DEGREES: 'degrees',\n IMPERIAL: 'imperial',\n NAUTICAL: 'nautical',\n METRIC: 'metric',\n US: 'us'\n};\n\n\n/**\n * @const\n * @type {Array<number>}\n */\nvar LEADING_DIGITS = [1, 2, 5];\n\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.\n * @property {function(import(\"../MapEvent.js\").default)} [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 {Units|string} [units='metric'] Units.\n */\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 *\n * @api\n */\nvar ScaleLine = /*@__PURE__*/(function (Control) {\n function ScaleLine(opt_options) {\n\n var options = opt_options ? opt_options : {};\n\n var className = options.className !== undefined ? options.className : 'ol-scale-line';\n\n Control.call(this, {\n element: document.createElement('div'),\n render: options.render || 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 listen(\n this, getChangeEventType(UNITS_PROP),\n this.handleUnitsChanged_, this);\n\n this.setUnits(/** @type {Units} */ (options.units) || Units.METRIC);\n\n }\n\n if ( Control ) ScaleLine.__proto__ = Control;\n ScaleLine.prototype = Object.create( Control && Control.prototype );\n ScaleLine.prototype.constructor = ScaleLine;\n\n /**\n * Return the units to use in the scale line.\n * @return {Units} The units\n * to use in the scale line.\n * @observable\n * @api\n */\n ScaleLine.prototype.getUnits = function getUnits () {\n return this.get(UNITS_PROP);\n };\n\n /**\n * @private\n */\n ScaleLine.prototype.handleUnitsChanged_ = function handleUnitsChanged_ () {\n this.updateElement_();\n };\n\n /**\n * Set the units to use in the scale line.\n * @param {Units} units The units to use in the scale line.\n * @observable\n * @api\n */\n ScaleLine.prototype.setUnits = function setUnits (units) {\n this.set(UNITS_PROP, units);\n };\n\n /**\n * @private\n */\n ScaleLine.prototype.updateElement_ = function updateElement_ () {\n var 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 var center = viewState.center;\n var projection = viewState.projection;\n var units = this.getUnits();\n var pointResolutionUnits = units == Units.DEGREES ?\n ProjUnits.DEGREES :\n ProjUnits.METERS;\n var pointResolution =\n getPointResolution(projection, viewState.resolution, center, pointResolutionUnits);\n if (projection.getUnits() != ProjUnits.DEGREES && projection.getMetersPerUnit()\n && pointResolutionUnits == ProjUnits.METERS) {\n pointResolution *= projection.getMetersPerUnit();\n }\n\n var nominalCount = this.minWidth_ * pointResolution;\n var suffix = '';\n if (units == Units.DEGREES) {\n var metersPerDegree = METERS_PER_UNIT[ProjUnits.DEGREES];\n if (projection.getUnits() == ProjUnits.DEGREES) {\n nominalCount *= metersPerDegree;\n } else {\n pointResolution /= metersPerDegree;\n }\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 var i = 3 * Math.floor(\n Math.log(this.minWidth_ * pointResolution) / Math.log(10));\n var count, width;\n while (true) {\n count = LEADING_DIGITS[((i % 3) + 3) % 3] *\n Math.pow(10, Math.floor(i / 3));\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 >= this.minWidth_) {\n break;\n }\n ++i;\n }\n\n var html = count + ' ' + suffix;\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 return ScaleLine;\n}(Control));\n\n\n/**\n * Update the scale line element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @this {ScaleLine}\n * @api\n */\nexport function render(mapEvent) {\n var 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//# sourceMappingURL=ScaleLine.js.map","/**\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//# sourceMappingURL=FormatType.js.map","/**\n * @module ol/featureloader\n */\nimport {VOID} from './functions.js';\nimport FormatType from './format/FormatType.js';\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) and an\n * {@link module:ol/proj/Projection} for the projection as\n * arguments. `this` within the function is bound to the\n * {@link module:ol/source/Vector} it's called from.\n *\n * The function is responsible for loading the features and adding them to the\n * source.\n * @typedef {function(this:(import(\"./source/Vector\").default|import(\"./VectorTile.js\").default), import(\"./extent.js\").Extent, number,\n * import(\"./proj/Projection.js\").default)} FeatureLoader\n * @api\n */\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/**\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @param {function(this:import(\"./VectorTile.js\").default, Array<import(\"./Feature.js\").default>, import(\"./proj/Projection.js\").default, import(\"./extent.js\").Extent)|function(this:import(\"./source/Vector\").default, Array<import(\"./Feature.js\").default>)} success\n * Function called with the loaded features and optionally with the data\n * projection. Called with the vector tile or source as `this`.\n * @param {function(this:import(\"./VectorTile.js\").default)|function(this:import(\"./source/Vector\").default)} failure\n * Function called when loading failed. Called with the vector tile or\n * source as `this`.\n * @return {FeatureLoader} The feature loader.\n */\nexport function loadFeaturesXhr(url, format, success, failure) {\n return (\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @this {import(\"./source/Vector\").default|import(\"./VectorTile.js\").default}\n */\n function(extent, resolution, projection) {\n var xhr = new XMLHttpRequest();\n xhr.open('GET',\n typeof url === 'function' ? url(extent, resolution, projection) : url,\n true);\n if (format.getType() == FormatType.ARRAY_BUFFER) {\n xhr.responseType = 'arraybuffer';\n }\n /**\n * @param {Event} event Event.\n * @private\n */\n xhr.onload = function(event) {\n // status will be 0 for file:// urls\n if (!xhr.status || xhr.status >= 200 && xhr.status < 300) {\n var type = format.getType();\n /** @type {Document|Node|Object|string|undefined} */\n var 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(xhr.responseText, 'application/xml');\n }\n } else if (type == FormatType.ARRAY_BUFFER) {\n source = /** @type {ArrayBuffer} */ (xhr.response);\n }\n if (source) {\n success.call(this, format.readFeatures(source,\n {featureProjection: projection}),\n format.readProjection(source), format.getLastExtent());\n } else {\n failure.call(this);\n }\n } else {\n failure.call(this);\n }\n }.bind(this);\n /**\n * @private\n */\n xhr.onerror = function() {\n failure.call(this);\n }.bind(this);\n xhr.send();\n }\n );\n}\n\n\n/**\n * Create an XHR feature loader for a `url` and `format`. The feature loader\n * loads features (with XHR), parses the features, and adds them to the\n * vector source.\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @return {FeatureLoader} The feature loader.\n * @api\n */\nexport function xhr(url, format) {\n return loadFeaturesXhr(url, format,\n /**\n * @param {Array<import(\"./Feature.js\").default>} features The loaded features.\n * @param {import(\"./proj/Projection.js\").default} dataProjection Data\n * projection.\n * @this {import(\"./source/Vector\").default|import(\"./VectorTile.js\").default}\n */\n function(features, dataProjection) {\n var sourceOrTile = /** @type {?} */ (this);\n if (typeof sourceOrTile.addFeatures === 'function') {\n /** @type {import(\"./source/Vector\").default} */ (sourceOrTile).addFeatures(features);\n }\n }, /* FIXME handle error */ VOID);\n}\n\n//# sourceMappingURL=featureloader.js.map","/**\n * @module ol/loadingstrategy\n */\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/**\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/**\n * Creates a strategy function for loading features based on a tile grid.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {function(import(\"./extent.js\").Extent, number): Array<import(\"./extent.js\").Extent>} Loading strategy.\n * @api\n */\nexport function tile(tileGrid) {\n return (\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array<import(\"./extent.js\").Extent>} Extents.\n */\n function(extent, resolution) {\n var z = tileGrid.getZForResolution(resolution);\n var tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n /** @type {Array<import(\"./extent.js\").Extent>} */\n var extents = [];\n /** @type {import(\"./tilecoord.js\").TileCoord} */\n var tileCoord = [z, 0, 0];\n for (tileCoord[1] = tileRange.minX; tileCoord[1] <= tileRange.maxX; ++tileCoord[1]) {\n for (tileCoord[2] = tileRange.minY; tileCoord[2] <= tileRange.maxY; ++tileCoord[2]) {\n extents.push(tileGrid.getTileCoordExtent(tileCoord));\n }\n }\n return extents;\n }\n );\n}\n\n//# sourceMappingURL=loadingstrategy.js.map","/**\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 ol/source/Vector.VectorSourceEvent#addfeature\n * @api\n */\n ADDFEATURE: 'addfeature',\n\n /**\n * Triggered when a feature is updated.\n * @event 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 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 ol/source/Vector.VectorSourceEvent#removefeature\n * @api\n */\n REMOVEFEATURE: 'removefeature'\n};\n\n//# sourceMappingURL=VectorEventType.js.map","/**\n * @module ol/source/Vector\n */\n\nimport {getUid} from '../util.js';\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport {extend} from '../array.js';\nimport {assert} from '../asserts.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport {containsExtent, equals} from '../extent.js';\nimport {xhr} from '../featureloader.js';\nimport {TRUE, VOID} from '../functions.js';\nimport {all as allStrategy} from '../loadingstrategy.js';\nimport {isEmpty, getValues} from '../obj.js';\nimport Source from './Source.js';\nimport SourceState from './State.js';\nimport VectorEventType from './VectorEventType.js';\nimport RBush from '../structs/RBush.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/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Vector} instances are instances of this\n * type.\n */\nexport var VectorSourceEvent = /*@__PURE__*/(function (Event) {\n function VectorSourceEvent(type, opt_feature) {\n\n Event.call(this, type);\n\n /**\n * The feature being added or removed.\n * @type {import(\"../Feature.js\").default|undefined}\n * @api\n */\n this.feature = opt_feature;\n\n }\n\n if ( Event ) VectorSourceEvent.__proto__ = Event;\n VectorSourceEvent.prototype = Object.create( Event && Event.prototype );\n VectorSourceEvent.prototype.constructor = VectorSourceEvent;\n\n return VectorSourceEvent;\n}(Event));\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/**\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 ol/source/Vector.VectorSourceEvent\n * @api\n */\nvar VectorSource = /*@__PURE__*/(function (Source) {\n function VectorSource(opt_options) {\n\n var options = opt_options || {};\n\n Source.call(this, {\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(this.url_, /** @type {import(\"../format/Feature.js\").default} */ (this.format_));\n }\n\n /**\n * @private\n * @type {LoadingStrategy}\n */\n this.strategy_ = options.strategy !== undefined ? options.strategy : allStrategy;\n\n var useSpatialIndex =\n options.useSpatialIndex !== undefined ? options.useSpatialIndex : true;\n\n /**\n * @private\n * @type {RBush<import(\"../Feature.js\").default>}\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>}\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>}\n */\n this.idIndex_ = {};\n\n /**\n * A lookup of features without id (keyed by getUid(feature)).\n * @private\n * @type {!Object<string, import(\"../Feature.js\").default>}\n */\n this.undefIdIndex_ = {};\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>}\n */\n this.featuresCollection_ = null;\n\n var 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 if ( Source ) VectorSource.__proto__ = Source;\n VectorSource.prototype = Object.create( Source && Source.prototype );\n VectorSource.prototype.constructor = VectorSource;\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 * @param {import(\"../Feature.js\").default} feature Feature to add.\n * @api\n */\n VectorSource.prototype.addFeature = function addFeature (feature) {\n this.addFeatureInternal(feature);\n this.changed();\n };\n\n\n /**\n * Add a feature without firing a `change` event.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @protected\n */\n VectorSource.prototype.addFeatureInternal = function addFeatureInternal (feature) {\n var featureKey = getUid(feature);\n\n if (!this.addToIndex_(featureKey, feature)) {\n return;\n }\n\n this.setupChangeEvents_(featureKey, feature);\n\n var geometry = feature.getGeometry();\n if (geometry) {\n var extent = geometry.getExtent();\n if (this.featuresRtree_) {\n this.featuresRtree_.insert(extent, feature);\n }\n } 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} feature The feature.\n * @private\n */\n VectorSource.prototype.setupChangeEvents_ = function setupChangeEvents_ (featureKey, feature) {\n this.featureChangeKeys_[featureKey] = [\n listen(feature, EventType.CHANGE,\n this.handleFeatureChange_, this),\n listen(feature, ObjectEventType.PROPERTYCHANGE,\n this.handleFeatureChange_, this)\n ];\n };\n\n\n /**\n * @param {string} featureKey Unique identifier for the feature.\n * @param {import(\"../Feature.js\").default} feature The feature.\n * @return {boolean} The feature is \"valid\", in the sense that it is also a\n * candidate for insertion into the Rtree.\n * @private\n */\n VectorSource.prototype.addToIndex_ = function addToIndex_ (featureKey, feature) {\n var valid = true;\n var id = feature.getId();\n if (id !== undefined) {\n if (!(id.toString() in this.idIndex_)) {\n this.idIndex_[id.toString()] = feature;\n } else {\n valid = false;\n }\n } else {\n assert(!(featureKey in this.undefIdIndex_),\n 30); // The passed `feature` was already added to the source\n this.undefIdIndex_[featureKey] = feature;\n }\n return valid;\n };\n\n\n /**\n * Add a batch of features to the source.\n * @param {Array<import(\"../Feature.js\").default>} features Features to add.\n * @api\n */\n VectorSource.prototype.addFeatures = function addFeatures (features) {\n this.addFeaturesInternal(features);\n this.changed();\n };\n\n\n /**\n * Add features without firing a `change` event.\n * @param {Array<import(\"../Feature.js\").default>} features Features.\n * @protected\n */\n VectorSource.prototype.addFeaturesInternal = function addFeaturesInternal (features) {\n var extents = [];\n var newFeatures = [];\n var geometryFeatures = [];\n\n for (var i = 0, length = features.length; i < length; i++) {\n var feature = features[i];\n var featureKey = getUid(feature);\n if (this.addToIndex_(featureKey, feature)) {\n newFeatures.push(feature);\n }\n }\n\n for (var i$1 = 0, length$1 = newFeatures.length; i$1 < length$1; i$1++) {\n var feature$1 = newFeatures[i$1];\n var featureKey$1 = getUid(feature$1);\n this.setupChangeEvents_(featureKey$1, feature$1);\n\n var geometry = feature$1.getGeometry();\n if (geometry) {\n var extent = geometry.getExtent();\n extents.push(extent);\n geometryFeatures.push(feature$1);\n } else {\n this.nullGeometryFeatures_[featureKey$1] = feature$1;\n }\n }\n if (this.featuresRtree_) {\n this.featuresRtree_.load(extents, geometryFeatures);\n }\n\n for (var i$2 = 0, length$2 = newFeatures.length; i$2 < length$2; i$2++) {\n this.dispatchEvent(new VectorSourceEvent(VectorEventType.ADDFEATURE, newFeatures[i$2]));\n }\n };\n\n\n /**\n * @param {!Collection<import(\"../Feature.js\").default>} collection Collection.\n * @private\n */\n VectorSource.prototype.bindFeaturesCollection_ = function bindFeaturesCollection_ (collection) {\n var modifyingCollection = false;\n listen(this, VectorEventType.ADDFEATURE,\n /**\n * @param {VectorSourceEvent} 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 listen(this, VectorEventType.REMOVEFEATURE,\n /**\n * @param {VectorSourceEvent} 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 listen(collection, 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(/** @type {import(\"../Feature.js\").default} */ (evt.element));\n modifyingCollection = false;\n }\n }, this);\n listen(collection, 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(/** @type {import(\"../Feature.js\").default} */ (evt.element));\n modifyingCollection = false;\n }\n }, this);\n this.featuresCollection_ = collection;\n };\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 VectorSource.prototype.clear = function clear (opt_fast) {\n if (opt_fast) {\n for (var featureId in this.featureChangeKeys_) {\n var keys = this.featureChangeKeys_[featureId];\n keys.forEach(unlistenByKey);\n }\n if (!this.featuresCollection_) {\n this.featureChangeKeys_ = {};\n this.idIndex_ = {};\n this.undefIdIndex_ = {};\n }\n } else {\n if (this.featuresRtree_) {\n this.featuresRtree_.forEach(this.removeFeatureInternal, this);\n for (var id in this.nullGeometryFeatures_) {\n this.removeFeatureInternal(this.nullGeometryFeatures_[id]);\n }\n }\n }\n if (this.featuresCollection_) {\n this.featuresCollection_.clear();\n }\n\n if (this.featuresRtree_) {\n this.featuresRtree_.clear();\n }\n this.loadedExtentsRtree_.clear();\n this.nullGeometryFeatures_ = {};\n\n var clearEvent = new VectorSourceEvent(VectorEventType.CLEAR);\n this.dispatchEvent(clearEvent);\n this.changed();\n };\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): T} callback Called with each feature\n * on the source. Return a truthy value to stop iteration.\n * @return {T|undefined} The return value from the last call to the callback.\n * @template T\n * @api\n */\n VectorSource.prototype.forEachFeature = function 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 /**\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): T} callback Called with each feature\n * whose goemetry contains the provided coordinate.\n * @return {T|undefined} The return value from the last call to the callback.\n * @template T\n */\n VectorSource.prototype.forEachFeatureAtCoordinateDirect = function forEachFeatureAtCoordinateDirect (coordinate, callback) {\n var extent = [coordinate[0], coordinate[1], coordinate[0], coordinate[1]];\n return this.forEachFeatureInExtent(extent, function(feature) {\n var geometry = feature.getGeometry();\n if (geometry.intersectsCoordinate(coordinate)) {\n return callback(feature);\n } else {\n return undefined;\n }\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): T} callback Called with each feature\n * whose bounding box intersects the provided extent.\n * @return {T|undefined} The return value from the last call to the callback.\n * @template T\n * @api\n */\n VectorSource.prototype.forEachFeatureInExtent = function 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 /**\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): T} callback Called with each feature\n * whose geometry intersects the provided extent.\n * @return {T|undefined} The return value from the last call to the callback.\n * @template T\n * @api\n */\n VectorSource.prototype.forEachFeatureIntersectingExtent = function forEachFeatureIntersectingExtent (extent, callback) {\n return this.forEachFeatureInExtent(extent,\n /**\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @return {T|undefined} The return value from the last call to the callback.\n */\n function(feature) {\n var geometry = feature.getGeometry();\n if (geometry.intersectsExtent(extent)) {\n var result = callback(feature);\n if (result) {\n return result;\n }\n }\n });\n };\n\n\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>} The collection of features.\n * @api\n */\n VectorSource.prototype.getFeaturesCollection = function getFeaturesCollection () {\n return this.featuresCollection_;\n };\n\n\n /**\n * Get all features on the source in random order.\n * @return {Array<import(\"../Feature.js\").default>} Features.\n * @api\n */\n VectorSource.prototype.getFeatures = function getFeatures () {\n var 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 (\n /** @type {Array<import(\"../Feature.js\").default>} */ (features)\n );\n };\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>} Features.\n * @api\n */\n VectorSource.prototype.getFeaturesAtCoordinate = function getFeaturesAtCoordinate (coordinate) {\n var features = [];\n this.forEachFeatureAtCoordinateDirect(coordinate, function(feature) {\n features.push(feature);\n });\n return features;\n };\n\n\n /**\n * Get all features in 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 * This method is not available when the source is configured with\n * `useSpatialIndex` set to `false`.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {Array<import(\"../Feature.js\").default>} Features.\n * @api\n */\n VectorSource.prototype.getFeaturesInExtent = function getFeaturesInExtent (extent) {\n return this.featuresRtree_.getInExtent(extent);\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):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} Closest feature.\n * @api\n */\n VectorSource.prototype.getClosestFeatureToCoordinate = function 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 var x = coordinate[0];\n var y = coordinate[1];\n var closestFeature = null;\n var closestPoint = [NaN, NaN];\n var minSquaredDistance = Infinity;\n var extent = [-Infinity, -Infinity, Infinity, Infinity];\n var filter = opt_filter ? opt_filter : TRUE;\n this.featuresRtree_.forEachInExtent(extent,\n /**\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\n function(feature) {\n if (filter(feature)) {\n var geometry = feature.getGeometry();\n var previousMinSquaredDistance = minSquaredDistance;\n minSquaredDistance = geometry.closestPointXY(\n x, y, closestPoint, minSquaredDistance);\n if (minSquaredDistance < previousMinSquaredDistance) {\n closestFeature = feature;\n // This is sneaky. Reduce the extent that it is currently being\n // searched while the R-Tree traversal using this same extent object\n // is still in progress. This is safe because the new extent is\n // strictly contained by the old extent.\n var minDistance = Math.sqrt(minSquaredDistance);\n extent[0] = x - minDistance;\n extent[1] = y - minDistance;\n extent[2] = x + minDistance;\n extent[3] = y + minDistance;\n }\n }\n });\n return closestFeature;\n };\n\n\n /**\n * Get the extent of the features currently in the source.\n *\n * This method is not available when the source is configured with\n * `useSpatialIndex` set to `false`.\n * @param {import(\"../extent.js\").Extent=} opt_extent Destination extent. If provided, no new extent\n * will be created. Instead, that extent's coordinates will be overwritten.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\n VectorSource.prototype.getExtent = function getExtent (opt_extent) {\n return this.featuresRtree_.getExtent(opt_extent);\n };\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} The feature (or `null` if not found).\n * @api\n */\n VectorSource.prototype.getFeatureById = function getFeatureById (id) {\n var feature = this.idIndex_[id.toString()];\n return feature !== undefined ? feature : null;\n };\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 VectorSource.prototype.getFormat = function getFormat () {\n return this.format_;\n };\n\n\n /**\n * @return {boolean} The source can have overlapping geometries.\n */\n VectorSource.prototype.getOverlaps = function getOverlaps () {\n return this.overlaps_;\n };\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 VectorSource.prototype.getUrl = function getUrl () {\n return this.url_;\n };\n\n\n /**\n * @param {Event} event Event.\n * @private\n */\n VectorSource.prototype.handleFeatureChange_ = function handleFeatureChange_ (event) {\n var feature = /** @type {import(\"../Feature.js\").default} */ (event.target);\n var featureKey = getUid(feature);\n var geometry = feature.getGeometry();\n if (!geometry) {\n if (!(featureKey in this.nullGeometryFeatures_)) {\n if (this.featuresRtree_) {\n this.featuresRtree_.remove(feature);\n }\n this.nullGeometryFeatures_[featureKey] = feature;\n }\n } else {\n var 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 var id = feature.getId();\n if (id !== undefined) {\n var sid = id.toString();\n if (featureKey in this.undefIdIndex_) {\n delete this.undefIdIndex_[featureKey];\n this.idIndex_[sid] = feature;\n } else {\n if (this.idIndex_[sid] !== feature) {\n this.removeFromIdIndex_(feature);\n this.idIndex_[sid] = feature;\n }\n }\n } else {\n if (!(featureKey in this.undefIdIndex_)) {\n this.removeFromIdIndex_(feature);\n this.undefIdIndex_[featureKey] = feature;\n }\n }\n this.changed();\n this.dispatchEvent(new VectorSourceEvent(\n VectorEventType.CHANGEFEATURE, feature));\n };\n\n /**\n * Returns true if the feature is contained within the source.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @return {boolean} Has feature.\n * @api\n */\n VectorSource.prototype.hasFeature = function hasFeature (feature) {\n var id = feature.getId();\n if (id !== undefined) {\n return id in this.idIndex_;\n } else {\n return getUid(feature) in this.undefIdIndex_;\n }\n };\n\n /**\n * @return {boolean} Is empty.\n */\n VectorSource.prototype.isEmpty = function isEmpty$1 () {\n return this.featuresRtree_.isEmpty() && isEmpty(this.nullGeometryFeatures_);\n };\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 VectorSource.prototype.loadFeatures = function loadFeatures (extent, resolution, projection) {\n var this$1 = this;\n\n var loadedExtentsRtree = this.loadedExtentsRtree_;\n var extentsToLoad = this.strategy_(extent, resolution);\n this.loading = false;\n var loop = function ( i, ii ) {\n var extentToLoad = extentsToLoad[i];\n var alreadyLoaded = loadedExtentsRtree.forEachInExtent(extentToLoad,\n /**\n * @param {{extent: import(\"../extent.js\").Extent}} object Object.\n * @return {boolean} Contains.\n */\n function(object) {\n return containsExtent(object.extent, extentToLoad);\n });\n if (!alreadyLoaded) {\n this$1.loader_.call(this$1, extentToLoad, resolution, projection);\n loadedExtentsRtree.insert(extentToLoad, {extent: extentToLoad.slice()});\n this$1.loading = this$1.loader_ !== VOID;\n }\n };\n\n for (var i = 0, ii = extentsToLoad.length; i < ii; ++i) loop( i, ii );\n };\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 VectorSource.prototype.removeLoadedExtent = function removeLoadedExtent (extent) {\n var loadedExtentsRtree = this.loadedExtentsRtree_;\n var obj;\n loadedExtentsRtree.forEachInExtent(extent, function(object) {\n if (equals(object.extent, extent)) {\n obj = object;\n return true;\n }\n });\n if (obj) {\n loadedExtentsRtree.remove(obj);\n }\n };\n\n\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} feature Feature to remove.\n * @api\n */\n VectorSource.prototype.removeFeature = function removeFeature (feature) {\n var 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 /**\n * Remove feature without firing a `change` event.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @protected\n */\n VectorSource.prototype.removeFeatureInternal = function removeFeatureInternal (feature) {\n var featureKey = getUid(feature);\n this.featureChangeKeys_[featureKey].forEach(unlistenByKey);\n delete this.featureChangeKeys_[featureKey];\n var id = feature.getId();\n if (id !== undefined) {\n delete this.idIndex_[id.toString()];\n } else {\n delete this.undefIdIndex_[featureKey];\n }\n this.dispatchEvent(new VectorSourceEvent(\n 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} feature The feature.\n * @return {boolean} Removed the feature from the index.\n * @private\n */\n VectorSource.prototype.removeFromIdIndex_ = function removeFromIdIndex_ (feature) {\n var removed = false;\n for (var id in this.idIndex_) {\n if (this.idIndex_[id] === feature) {\n delete this.idIndex_[id];\n removed = true;\n break;\n }\n }\n return removed;\n };\n\n\n /**\n * Set the new loader of the source. The next loadFeatures call will use the\n * new loader.\n * @param {import(\"../featureloader.js\").FeatureLoader} loader The loader to set.\n * @api\n */\n VectorSource.prototype.setLoader = function setLoader (loader) {\n this.loader_ = loader;\n };\n\n return VectorSource;\n}(Source));\n\n\nexport default VectorSource;\n\n//# sourceMappingURL=Vector.js.map","/**\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//# sourceMappingURL=OverlayPositioning.js.map","/**\n * @module ol/Overlay\n */\nimport MapEventType from './MapEventType.js';\nimport BaseObject, {getChangeEventType} from './Object.js';\nimport OverlayPositioning from './OverlayPositioning.js';\nimport {CLASS_SELECTABLE} from './css.js';\nimport {removeNode, removeChildren, outerWidth, outerHeight} from './dom.js';\nimport {listen, unlistenByKey} from './events.js';\nimport {containsExtent} from './extent.js';\n\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 {OverlayPositioning} [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 {boolean} [autoPan=false] If set to `true` the map is panned when\n * calling `setPosition`, so that the overlay is entirely visible in the current\n * viewport.\n * @property {PanOptions} [autoPanAnimation] The\n * animation options used to pan the overlay into view. This animation is only\n * used when `autoPan` is enabled. A `duration` and `easing` may be provided to\n * customize the animation.\n * @property {number} [autoPanMargin=20] The margin (in pixels) between the\n * overlay and the borders of the map when autopanning.\n * @property {string} [className='ol-overlay-container ol-selectable'] CSS class\n * name.\n */\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/**\n * @enum {string}\n * @protected\n */\nvar Property = {\n ELEMENT: 'element',\n MAP: 'map',\n OFFSET: 'offset',\n POSITION: 'position',\n POSITIONING: 'positioning'\n};\n\n\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 */\nvar Overlay = /*@__PURE__*/(function (BaseObject) {\n function Overlay(options) {\n\n BaseObject.call(this);\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 = options.insertFirst !== undefined ?\n 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 = options.className !== undefined ?\n options.className : 'ol-overlay-container ' + CLASS_SELECTABLE;\n this.element.style.position = 'absolute';\n\n /**\n * @protected\n * @type {boolean}\n */\n this.autoPan = options.autoPan !== undefined ? options.autoPan : false;\n\n /**\n * @protected\n * @type {PanOptions}\n */\n this.autoPanAnimation = options.autoPanAnimation || /** @type {PanOptions} */ ({});\n\n /**\n * @protected\n * @type {number}\n */\n this.autoPanMargin = options.autoPanMargin !== undefined ?\n options.autoPanMargin : 20;\n\n /**\n * @protected\n * @type {{bottom_: string,\n * left_: string,\n * right_: string,\n * top_: string,\n * visible: boolean}}\n */\n this.rendered = {\n bottom_: '',\n left_: '',\n right_: '',\n top_: '',\n visible: true\n };\n\n /**\n * @protected\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.mapPostrenderListenerKey = null;\n\n listen(\n this, getChangeEventType(Property.ELEMENT),\n this.handleElementChanged, this);\n\n listen(\n this, getChangeEventType(Property.MAP),\n this.handleMapChanged, this);\n\n listen(\n this, getChangeEventType(Property.OFFSET),\n this.handleOffsetChanged, this);\n\n listen(\n this, getChangeEventType(Property.POSITION),\n this.handlePositionChanged, this);\n\n listen(\n this, getChangeEventType(Property.POSITIONING),\n this.handlePositioningChanged, this);\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(options.positioning !== undefined ?\n /** @type {OverlayPositioning} */ (options.positioning) :\n OverlayPositioning.TOP_LEFT);\n\n if (options.position !== undefined) {\n this.setPosition(options.position);\n }\n\n }\n\n if ( BaseObject ) Overlay.__proto__ = BaseObject;\n Overlay.prototype = Object.create( BaseObject && BaseObject.prototype );\n Overlay.prototype.constructor = Overlay;\n\n /**\n * Get the DOM element of this overlay.\n * @return {HTMLElement|undefined} The Element containing the overlay.\n * @observable\n * @api\n */\n Overlay.prototype.getElement = function 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 Overlay.prototype.getId = function 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 Overlay.prototype.getMap = function getMap () {\n return (\n /** @type {import(\"./PluggableMap.js\").default|undefined} */ (this.get(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 Overlay.prototype.getOffset = function 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 Overlay.prototype.getPosition = function getPosition () {\n return (\n /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (this.get(Property.POSITION))\n );\n };\n\n /**\n * Get the current positioning of this overlay.\n * @return {OverlayPositioning} How the overlay is positioned\n * relative to its point on the map.\n * @observable\n * @api\n */\n Overlay.prototype.getPositioning = function getPositioning () {\n return (\n /** @type {OverlayPositioning} */ (this.get(Property.POSITIONING))\n );\n };\n\n /**\n * @protected\n */\n Overlay.prototype.handleElementChanged = function handleElementChanged () {\n removeChildren(this.element);\n var element = this.getElement();\n if (element) {\n this.element.appendChild(element);\n }\n };\n\n /**\n * @protected\n */\n Overlay.prototype.handleMapChanged = function handleMapChanged () {\n if (this.mapPostrenderListenerKey) {\n removeNode(this.element);\n unlistenByKey(this.mapPostrenderListenerKey);\n this.mapPostrenderListenerKey = null;\n }\n var map = this.getMap();\n if (map) {\n this.mapPostrenderListenerKey = listen(map,\n MapEventType.POSTRENDER, this.render, this);\n this.updatePixelPosition();\n var container = this.stopEvent ?\n map.getOverlayContainerStopEvent() : map.getOverlayContainer();\n if (this.insertFirst) {\n container.insertBefore(this.element, container.childNodes[0] || null);\n } else {\n container.appendChild(this.element);\n }\n }\n };\n\n /**\n * @protected\n */\n Overlay.prototype.render = function render () {\n this.updatePixelPosition();\n };\n\n /**\n * @protected\n */\n Overlay.prototype.handleOffsetChanged = function handleOffsetChanged () {\n this.updatePixelPosition();\n };\n\n /**\n * @protected\n */\n Overlay.prototype.handlePositionChanged = function handlePositionChanged () {\n this.updatePixelPosition();\n if (this.get(Property.POSITION) && this.autoPan) {\n this.panIntoView();\n }\n };\n\n /**\n * @protected\n */\n Overlay.prototype.handlePositioningChanged = function 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 Overlay.prototype.setElement = function 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 Overlay.prototype.setMap = function 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 Overlay.prototype.setOffset = function 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 Overlay.prototype.setPosition = function setPosition (position) {\n this.set(Property.POSITION, position);\n };\n\n /**\n * Pan the map so that the overlay is entirely visible in the current viewport\n * (if necessary).\n * @protected\n */\n Overlay.prototype.panIntoView = function panIntoView () {\n var map = this.getMap();\n\n if (!map || !map.getTargetElement()) {\n return;\n }\n\n var mapRect = this.getRect(map.getTargetElement(), map.getSize());\n var element = this.getElement();\n var overlayRect = this.getRect(element, [outerWidth(element), outerHeight(element)]);\n\n var margin = this.autoPanMargin;\n if (!containsExtent(mapRect, overlayRect)) {\n // the overlay is not completely inside the viewport, so pan the map\n var offsetLeft = overlayRect[0] - mapRect[0];\n var offsetRight = mapRect[2] - overlayRect[2];\n var offsetTop = overlayRect[1] - mapRect[1];\n var offsetBottom = mapRect[3] - overlayRect[3];\n\n var delta = [0, 0];\n if (offsetLeft < 0) {\n // move map to the left\n delta[0] = offsetLeft - margin;\n } else if (offsetRight < 0) {\n // move map to the right\n delta[0] = Math.abs(offsetRight) + margin;\n }\n if (offsetTop < 0) {\n // move map up\n delta[1] = offsetTop - margin;\n } else if (offsetBottom < 0) {\n // move map down\n delta[1] = Math.abs(offsetBottom) + margin;\n }\n\n if (delta[0] !== 0 || delta[1] !== 0) {\n var center = /** @type {import(\"./coordinate.js\").Coordinate} */ (map.getView().getCenter());\n var centerPx = map.getPixelFromCoordinate(center);\n var newCenterPx = [\n centerPx[0] + delta[0],\n centerPx[1] + delta[1]\n ];\n\n map.getView().animate({\n center: map.getCoordinateFromPixel(newCenterPx),\n duration: this.autoPanAnimation.duration,\n easing: this.autoPanAnimation.easing\n });\n }\n }\n };\n\n /**\n * Get the extent of an element relative to the document\n * @param {HTMLElement|undefined} element The element.\n * @param {import(\"./size.js\").Size|undefined} size The size of the element.\n * @return {import(\"./extent.js\").Extent} The extent.\n * @protected\n */\n Overlay.prototype.getRect = function getRect (element, size) {\n var box = element.getBoundingClientRect();\n var offsetX = box.left + window.pageXOffset;\n var offsetY = box.top + window.pageYOffset;\n return [\n offsetX,\n offsetY,\n offsetX + size[0],\n offsetY + size[1]\n ];\n };\n\n /**\n * Set the positioning for this overlay.\n * @param {OverlayPositioning} positioning how the overlay is\n * positioned relative to its point on the map.\n * @observable\n * @api\n */\n Overlay.prototype.setPositioning = function 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 Overlay.prototype.setVisible = function 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 Overlay.prototype.updatePixelPosition = function updatePixelPosition () {\n var map = this.getMap();\n var position = this.getPosition();\n if (!map || !map.isRendered() || !position) {\n this.setVisible(false);\n return;\n }\n\n var pixel = map.getPixelFromCoordinate(position);\n var 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 Overlay.prototype.updateRenderedPosition = function updateRenderedPosition (pixel, mapSize) {\n var style = this.element.style;\n var offset = this.getOffset();\n\n var positioning = this.getPositioning();\n\n this.setVisible(true);\n\n var offsetX = offset[0];\n var offsetY = offset[1];\n if (positioning == OverlayPositioning.BOTTOM_RIGHT ||\n positioning == OverlayPositioning.CENTER_RIGHT ||\n positioning == OverlayPositioning.TOP_RIGHT) {\n if (this.rendered.left_ !== '') {\n this.rendered.left_ = style.left = '';\n }\n var right = Math.round(mapSize[0] - pixel[0] - offsetX) + 'px';\n if (this.rendered.right_ != right) {\n this.rendered.right_ = style.right = right;\n }\n } else {\n if (this.rendered.right_ !== '') {\n this.rendered.right_ = style.right = '';\n }\n if (positioning == OverlayPositioning.BOTTOM_CENTER ||\n positioning == OverlayPositioning.CENTER_CENTER ||\n positioning == OverlayPositioning.TOP_CENTER) {\n offsetX -= this.element.offsetWidth / 2;\n }\n var left = Math.round(pixel[0] + offsetX) + 'px';\n if (this.rendered.left_ != left) {\n this.rendered.left_ = style.left = left;\n }\n }\n if (positioning == OverlayPositioning.BOTTOM_LEFT ||\n positioning == OverlayPositioning.BOTTOM_CENTER ||\n positioning == OverlayPositioning.BOTTOM_RIGHT) {\n if (this.rendered.top_ !== '') {\n this.rendered.top_ = style.top = '';\n }\n var bottom = Math.round(mapSize[1] - pixel[1] - offsetY) + 'px';\n if (this.rendered.bottom_ != bottom) {\n this.rendered.bottom_ = style.bottom = bottom;\n }\n } else {\n if (this.rendered.bottom_ !== '') {\n this.rendered.bottom_ = style.bottom = '';\n }\n if (positioning == OverlayPositioning.CENTER_LEFT ||\n positioning == OverlayPositioning.CENTER_CENTER ||\n positioning == OverlayPositioning.CENTER_RIGHT) {\n offsetY -= this.element.offsetHeight / 2;\n }\n var top = Math.round(pixel[1] + offsetY) + 'px';\n if (this.rendered.top_ != top) {\n this.rendered.top_ = style.top = top;\n }\n }\n };\n\n /**\n * returns the options this Overlay has been created with\n * @return {Options} overlay options\n */\n Overlay.prototype.getOptions = function getOptions () {\n return this.options;\n };\n\n return Overlay;\n}(BaseObject));\n\n\nexport default Overlay;\n\n//# sourceMappingURL=Overlay.js.map","/**\n * @module ol/geom/flat/interpolate\n */\nimport {binarySearch} from '../../array.js';\nimport {lerp} from '../../math.js';\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} fraction Fraction.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Destination.\n */\nexport function interpolatePoint(flatCoordinates, offset, end, stride, fraction, opt_dest) {\n var pointX = NaN;\n var pointY = NaN;\n var n = (end - offset) / stride;\n if (n === 1) {\n pointX = flatCoordinates[offset];\n pointY = flatCoordinates[offset + 1];\n } else if (n == 2) {\n pointX = (1 - fraction) * flatCoordinates[offset] +\n fraction * flatCoordinates[offset + stride];\n pointY = (1 - fraction) * flatCoordinates[offset + 1] +\n fraction * flatCoordinates[offset + stride + 1];\n } else if (n !== 0) {\n var x1 = flatCoordinates[offset];\n var y1 = flatCoordinates[offset + 1];\n var length = 0;\n var cumulativeLengths = [0];\n for (var i = offset + stride; i < end; i += stride) {\n var x2 = flatCoordinates[i];\n var y2 = flatCoordinates[i + 1];\n length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n cumulativeLengths.push(length);\n x1 = x2;\n y1 = y2;\n }\n var target = fraction * length;\n var index = binarySearch(cumulativeLengths, target);\n if (index < 0) {\n var t = (target - cumulativeLengths[-index - 2]) /\n (cumulativeLengths[-index - 1] - cumulativeLengths[-index - 2]);\n var o = offset + (-index - 2) * stride;\n pointX = lerp(\n flatCoordinates[o], flatCoordinates[o + stride], t);\n pointY = lerp(\n flatCoordinates[o + 1], flatCoordinates[o + stride + 1], t);\n } else {\n pointX = flatCoordinates[offset + index * stride];\n pointY = flatCoordinates[offset + index * stride + 1];\n }\n }\n if (opt_dest) {\n opt_dest[0] = pointX;\n opt_dest[1] = pointY;\n return opt_dest;\n } else {\n return [pointX, pointY];\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 {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n */\nexport function lineStringCoordinateAtM(flatCoordinates, offset, end, stride, m, extrapolate) {\n if (end == offset) {\n return null;\n }\n var coordinate;\n if (m < flatCoordinates[offset + stride - 1]) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(offset, offset + stride);\n coordinate[stride - 1] = m;\n return coordinate;\n } 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 var lo = offset / stride;\n var hi = end / stride;\n while (lo < hi) {\n var mid = (lo + hi) >> 1;\n if (m < flatCoordinates[(mid + 1) * stride - 1]) {\n hi = mid;\n } else {\n lo = mid + 1;\n }\n }\n var m0 = flatCoordinates[lo * stride - 1];\n if (m == m0) {\n return flatCoordinates.slice((lo - 1) * stride, (lo - 1) * stride + stride);\n }\n var m1 = flatCoordinates[(lo + 1) * stride - 1];\n var t = (m - m0) / (m1 - m0);\n coordinate = [];\n for (var i = 0; i < stride - 1; ++i) {\n coordinate.push(lerp(flatCoordinates[(lo - 1) * stride + i],\n flatCoordinates[lo * stride + i], t));\n }\n coordinate.push(m);\n return coordinate;\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 {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, offset, ends, stride, m, extrapolate, interpolate) {\n if (interpolate) {\n return lineStringCoordinateAtM(\n flatCoordinates, offset, ends[ends.length - 1], stride, m, extrapolate);\n }\n var coordinate;\n if (m < flatCoordinates[stride - 1]) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(0, stride);\n coordinate[stride - 1] = m;\n return coordinate;\n } 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 (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n if (offset == end) {\n continue;\n }\n if (m < flatCoordinates[offset + stride - 1]) {\n return null;\n } else if (m <= flatCoordinates[end - 1]) {\n return lineStringCoordinateAtM(\n flatCoordinates, offset, end, stride, m, false);\n }\n offset = end;\n }\n return null;\n}\n\n//# sourceMappingURL=interpolate.js.map","/**\n * @module ol/geom/LineString\n */\nimport {extend} from '../array.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {assignClosestPoint, maxSquaredDelta} from './flat/closest.js';\nimport {deflateCoordinates} from './flat/deflate.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';\nimport {forEach as forEachSegment} from './flat/segments.js';\nimport {douglasPeucker} from './flat/simplify.js';\n\n/**\n * @classdesc\n * Linestring geometry.\n *\n * @api\n */\nvar LineString = /*@__PURE__*/(function (SimpleGeometry) {\n function LineString(coordinates, opt_layout) {\n\n SimpleGeometry.call(this);\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(opt_layout, /** @type {Array<number>} */ (coordinates));\n } else {\n this.setCoordinates(/** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates), opt_layout);\n }\n\n }\n\n if ( SimpleGeometry ) LineString.__proto__ = SimpleGeometry;\n LineString.prototype = Object.create( SimpleGeometry && SimpleGeometry.prototype );\n LineString.prototype.constructor = LineString;\n\n /**\n * Append the passed coordinate to the coordinates of the linestring.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @api\n */\n LineString.prototype.appendCoordinate = function 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 * @override\n * @api\n */\n LineString.prototype.clone = function clone () {\n return new LineString(this.flatCoordinates.slice(), this.layout);\n };\n\n /**\n * @inheritDoc\n */\n LineString.prototype.closestPointXY = function 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(maxSquaredDelta(\n this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestPoint(\n this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,\n this.maxDelta_, false, x, y, closestPoint, minSquaredDistance);\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.\n * @return {T|boolean} Value.\n * @template T,S\n * @api\n */\n LineString.prototype.forEachSegment = function forEachSegment$1 (callback) {\n return forEachSegment(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, callback);\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 LineString.prototype.getCoordinateAtM = function getCoordinateAtM (m, opt_extrapolate) {\n if (this.layout != GeometryLayout.XYM &&\n this.layout != GeometryLayout.XYZM) {\n return null;\n }\n var extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;\n return lineStringCoordinateAtM(this.flatCoordinates, 0,\n this.flatCoordinates.length, this.stride, m, extrapolate);\n };\n\n /**\n * Return the coordinates of the linestring.\n * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n * @override\n * @api\n */\n LineString.prototype.getCoordinates = function getCoordinates () {\n return inflateCoordinates(\n this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\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 LineString.prototype.getCoordinateAt = function getCoordinateAt (fraction, opt_dest) {\n return interpolatePoint(\n this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,\n fraction, opt_dest);\n };\n\n /**\n * Return the length of the linestring on projected plane.\n * @return {number} Length (on projected plane).\n * @api\n */\n LineString.prototype.getLength = function getLength () {\n return lineStringLength(\n this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n };\n\n /**\n * @return {Array<number>} Flat midpoint.\n */\n LineString.prototype.getFlatMidpoint = function 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 * @inheritDoc\n */\n LineString.prototype.getSimplifiedGeometryInternal = function getSimplifiedGeometryInternal (squaredTolerance) {\n var simplifiedFlatCoordinates = [];\n simplifiedFlatCoordinates.length = douglasPeucker(\n this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,\n squaredTolerance, simplifiedFlatCoordinates, 0);\n return new LineString(simplifiedFlatCoordinates, GeometryLayout.XY);\n };\n\n /**\n * @inheritDoc\n * @api\n */\n LineString.prototype.getType = function getType () {\n return GeometryType.LINE_STRING;\n };\n\n /**\n * @inheritDoc\n * @api\n */\n LineString.prototype.intersectsExtent = function intersectsExtent (extent) {\n return intersectsLineString(\n this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,\n extent);\n };\n\n /**\n * Set the coordinates of the linestring.\n * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {GeometryLayout=} opt_layout Layout.\n * @override\n * @api\n */\n LineString.prototype.setCoordinates = function 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, 0, coordinates, this.stride);\n this.changed();\n };\n\n return LineString;\n}(SimpleGeometry));\n\n\nexport default LineString;\n\n//# sourceMappingURL=LineString.js.map","/**\n * @module ol/Feature\n */\nimport {assert} from './asserts.js';\nimport {listen, unlisten, unlistenByKey} from './events.js';\nimport EventType from './events/EventType.js';\nimport BaseObject, {getChangeEventType} from './Object.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 */\nvar Feature = /*@__PURE__*/(function (BaseObject) {\n function Feature(opt_geometryOrProperties) {\n\n BaseObject.call(this);\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 listen(\n this, getChangeEventType(this.geometryName_),\n this.handleGeometryChanged_, this);\n\n if (opt_geometryOrProperties) {\n if (typeof /** @type {?} */ (opt_geometryOrProperties).getSimplifiedGeometry === 'function') {\n var geometry = /** @type {import(\"./geom/Geometry.js\").default} */ (opt_geometryOrProperties);\n this.setGeometry(geometry);\n } else {\n /** @type {Object<string, *>} */\n var properties = opt_geometryOrProperties;\n this.setProperties(properties);\n }\n }\n }\n\n if ( BaseObject ) Feature.__proto__ = BaseObject;\n Feature.prototype = Object.create( BaseObject && BaseObject.prototype );\n Feature.prototype.constructor = Feature;\n\n /**\n * Clone this feature. If the original feature has a geometry it\n * is also cloned. The feature id is not set in the clone.\n * @return {Feature} The clone.\n * @api\n */\n Feature.prototype.clone = function clone () {\n var clone = new Feature(this.getProperties());\n clone.setGeometryName(this.getGeometryName());\n var geometry = this.getGeometry();\n if (geometry) {\n clone.setGeometry(geometry.clone());\n }\n var style = this.getStyle();\n if (style) {\n clone.setStyle(style);\n }\n return clone;\n };\n\n /**\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 {import(\"./geom/Geometry.js\").default|undefined} The default geometry for the feature.\n * @api\n * @observable\n */\n Feature.prototype.getGeometry = function getGeometry () {\n return (\n /** @type {import(\"./geom/Geometry.js\").default|undefined} */ (this.get(this.geometryName_))\n );\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 Feature.prototype.getId = function 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 Feature.prototype.getGeometryName = function 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} The feature style.\n * @api\n */\n Feature.prototype.getStyle = function 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 Feature.prototype.getStyleFunction = function getStyleFunction () {\n return this.styleFunction_;\n };\n\n /**\n * @private\n */\n Feature.prototype.handleGeometryChange_ = function handleGeometryChange_ () {\n this.changed();\n };\n\n /**\n * @private\n */\n Feature.prototype.handleGeometryChanged_ = function handleGeometryChanged_ () {\n if (this.geometryChangeKey_) {\n unlistenByKey(this.geometryChangeKey_);\n this.geometryChangeKey_ = null;\n }\n var geometry = this.getGeometry();\n if (geometry) {\n this.geometryChangeKey_ = listen(geometry,\n EventType.CHANGE, this.handleGeometryChange_, this);\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 {import(\"./geom/Geometry.js\").default|undefined} geometry The new geometry.\n * @api\n * @observable\n */\n Feature.prototype.setGeometry = function setGeometry (geometry) {\n this.set(this.geometryName_, geometry);\n };\n\n /**\n * Set the style for the feature. This can be a single style object, an array\n * of styles, or a function that takes a resolution and returns an array of\n * styles. If it is `null` the feature has no style (a `null` style).\n * @param {import(\"./style/Style.js\").StyleLike} style Style for this feature.\n * @api\n * @fires module:ol/events/Event~Event#event:change\n */\n Feature.prototype.setStyle = function setStyle (style) {\n this.style_ = style;\n this.styleFunction_ = !style ? undefined : createStyleFunction(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~Event#event:change\n */\n Feature.prototype.setId = function 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 Feature.prototype.setGeometryName = function setGeometryName (name) {\n unlisten(\n this, getChangeEventType(this.geometryName_),\n this.handleGeometryChanged_, this);\n this.geometryName_ = name;\n listen(\n this, getChangeEventType(this.geometryName_),\n this.handleGeometryChanged_, this);\n this.handleGeometryChanged_();\n };\n\n return Feature;\n}(BaseObject));\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 var styles;\n if (Array.isArray(obj)) {\n styles = obj;\n } else {\n assert(typeof /** @type {?} */ (obj).getZIndex === 'function',\n 41); // Expected an `import(\"./style/Style.js\").Style` or an array of `import(\"./style/Style.js\").Style`\n var style = /** @type {import(\"./style/Style.js\").default} */ (obj);\n styles = [style];\n }\n return function() {\n return styles;\n };\n }\n}\nexport default Feature;\n\n//# sourceMappingURL=Feature.js.map","/**\n * @module ol/geom/Circle\n */\nimport {createOrUpdate, forEachCorner, intersects} from '../extent.js';\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {deflateCoordinate} from './flat/deflate.js';\n\n/**\n * @classdesc\n * Circle geometry.\n *\n * @api\n */\nvar Circle = /*@__PURE__*/(function (SimpleGeometry) {\n function Circle(center, opt_radius, opt_layout) {\n SimpleGeometry.call(this);\n if (opt_layout !== undefined && opt_radius === undefined) {\n this.setFlatCoordinates(opt_layout, center);\n } else {\n var radius = opt_radius ? opt_radius : 0;\n this.setCenterAndRadius(center, radius, opt_layout);\n }\n }\n\n if ( SimpleGeometry ) Circle.__proto__ = SimpleGeometry;\n Circle.prototype = Object.create( SimpleGeometry && SimpleGeometry.prototype );\n Circle.prototype.constructor = Circle;\n\n /**\n * Make a complete copy of the geometry.\n * @return {!Circle} Clone.\n * @override\n * @api\n */\n Circle.prototype.clone = function clone () {\n return new Circle(this.flatCoordinates.slice(), undefined, this.layout);\n };\n\n /**\n * @inheritDoc\n */\n Circle.prototype.closestPointXY = function closestPointXY (x, y, closestPoint, minSquaredDistance) {\n var flatCoordinates = this.flatCoordinates;\n var dx = x - flatCoordinates[0];\n var dy = y - flatCoordinates[1];\n var squaredDistance = dx * dx + dy * dy;\n if (squaredDistance < minSquaredDistance) {\n if (squaredDistance === 0) {\n for (var i = 0; i < this.stride; ++i) {\n closestPoint[i] = flatCoordinates[i];\n }\n } else {\n var delta = this.getRadius() / Math.sqrt(squaredDistance);\n closestPoint[0] = flatCoordinates[0] + delta * dx;\n closestPoint[1] = flatCoordinates[1] + delta * dy;\n for (var i$1 = 2; i$1 < this.stride; ++i$1) {\n closestPoint[i$1] = flatCoordinates[i$1];\n }\n }\n closestPoint.length = this.stride;\n return squaredDistance;\n } else {\n return minSquaredDistance;\n }\n };\n\n /**\n * @inheritDoc\n */\n Circle.prototype.containsXY = function containsXY (x, y) {\n var flatCoordinates = this.flatCoordinates;\n var dx = x - flatCoordinates[0];\n var dy = y - flatCoordinates[1];\n return dx * dx + dy * dy <= this.getRadiusSquared_();\n };\n\n /**\n * Return the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.\n * @return {import(\"../coordinate.js\").Coordinate} Center.\n * @api\n */\n Circle.prototype.getCenter = function getCenter () {\n return this.flatCoordinates.slice(0, this.stride);\n };\n\n /**\n * @inheritDoc\n */\n Circle.prototype.computeExtent = function computeExtent (extent) {\n var flatCoordinates = this.flatCoordinates;\n var radius = flatCoordinates[this.stride] - flatCoordinates[0];\n return createOrUpdate(\n flatCoordinates[0] - radius, flatCoordinates[1] - radius,\n flatCoordinates[0] + radius, flatCoordinates[1] + radius,\n extent);\n };\n\n /**\n * Return the radius of the circle.\n * @return {number} Radius.\n * @api\n */\n Circle.prototype.getRadius = function getRadius () {\n return Math.sqrt(this.getRadiusSquared_());\n };\n\n /**\n * @private\n * @return {number} Radius squared.\n */\n Circle.prototype.getRadiusSquared_ = function getRadiusSquared_ () {\n var dx = this.flatCoordinates[this.stride] - this.flatCoordinates[0];\n var dy = this.flatCoordinates[this.stride + 1] - this.flatCoordinates[1];\n return dx * dx + dy * dy;\n };\n\n /**\n * @inheritDoc\n * @api\n */\n Circle.prototype.getType = function getType () {\n return GeometryType.CIRCLE;\n };\n\n /**\n * @inheritDoc\n * @api\n */\n Circle.prototype.intersectsExtent = function intersectsExtent (extent) {\n var circleExtent = this.getExtent();\n if (intersects(extent, circleExtent)) {\n var 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, this);\n }\n return false;\n\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 Circle.prototype.setCenter = function setCenter (center) {\n var stride = this.stride;\n var radius = this.flatCoordinates[stride] - this.flatCoordinates[0];\n var flatCoordinates = center.slice();\n flatCoordinates[stride] = flatCoordinates[0] + radius;\n for (var i = 1; i < stride; ++i) {\n flatCoordinates[stride + i] = center[i];\n }\n this.setFlatCoordinates(this.layout, flatCoordinates);\n this.changed();\n };\n\n /**\n * Set the center (as {@link module:ol/coordinate~Coordinate coordinate}) and the radius (as\n * number) of the circle.\n * @param {!import(\"../coordinate.js\").Coordinate} center Center.\n * @param {number} radius Radius.\n * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n * @api\n */\n Circle.prototype.setCenterAndRadius = function 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 var flatCoordinates = this.flatCoordinates;\n var offset = deflateCoordinate(\n flatCoordinates, 0, center, this.stride);\n flatCoordinates[offset++] = flatCoordinates[0] + radius;\n for (var i = 1, ii = this.stride; i < ii; ++i) {\n flatCoordinates[offset++] = flatCoordinates[i];\n }\n flatCoordinates.length = offset;\n this.changed();\n };\n\n /**\n * @inheritDoc\n */\n Circle.prototype.getCoordinates = function getCoordinates () {\n return null;\n };\n\n /**\n * @inheritDoc\n */\n Circle.prototype.setCoordinates = function 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 Circle.prototype.setRadius = function setRadius (radius) {\n this.flatCoordinates[this.stride] = this.flatCoordinates[0] + radius;\n this.changed();\n };\n\n return Circle;\n}(SimpleGeometry));\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//# sourceMappingURL=Circle.js.map","/**\n * @module ol/geom/MultiLineString\n */\nimport {extend} from '../array.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport LineString from './LineString.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {assignClosestArrayPoint, arrayMaxSquaredDelta} from './flat/closest.js';\nimport {deflateCoordinatesArray} from './flat/deflate.js';\nimport {inflateCoordinatesArray} from './flat/inflate.js';\nimport {interpolatePoint, lineStringsCoordinateAtM} from './flat/interpolate.js';\nimport {intersectsLineStringArray} from './flat/intersectsextent.js';\nimport {douglasPeuckerArray} from './flat/simplify.js';\n\n/**\n * @classdesc\n * Multi-linestring geometry.\n *\n * @api\n */\nvar MultiLineString = /*@__PURE__*/(function (SimpleGeometry) {\n function MultiLineString(coordinates, opt_layout, opt_ends) {\n\n SimpleGeometry.call(this);\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(/** @type {Array<Array<import(\"../coordinate.js\").Coordinate>>} */ (coordinates), opt_layout);\n } else if (opt_layout !== undefined && opt_ends) {\n this.setFlatCoordinates(opt_layout, /** @type {Array<number>} */ (coordinates));\n this.ends_ = opt_ends;\n } else {\n var layout = this.getLayout();\n var lineStrings = /** @type {Array<LineString>} */ (coordinates);\n var flatCoordinates = [];\n var ends = [];\n for (var i = 0, ii = lineStrings.length; i < ii; ++i) {\n var lineString = lineStrings[i];\n if (i === 0) {\n layout = lineString.getLayout();\n }\n extend(flatCoordinates, lineString.getFlatCoordinates());\n ends.push(flatCoordinates.length);\n }\n this.setFlatCoordinates(layout, flatCoordinates);\n this.ends_ = ends;\n }\n\n }\n\n if ( SimpleGeometry ) MultiLineString.__proto__ = SimpleGeometry;\n MultiLineString.prototype = Object.create( SimpleGeometry && SimpleGeometry.prototype );\n MultiLineString.prototype.constructor = MultiLineString;\n\n /**\n * Append the passed linestring to the multilinestring.\n * @param {LineString} lineString LineString.\n * @api\n */\n MultiLineString.prototype.appendLineString = function 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 * @override\n * @api\n */\n MultiLineString.prototype.clone = function clone () {\n return new MultiLineString(this.flatCoordinates.slice(), this.layout, this.ends_.slice());\n };\n\n /**\n * @inheritDoc\n */\n MultiLineString.prototype.closestPointXY = function 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(arrayMaxSquaredDelta(\n this.flatCoordinates, 0, this.ends_, this.stride, 0));\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestArrayPoint(\n this.flatCoordinates, 0, this.ends_, this.stride,\n this.maxDelta_, false, x, y, closestPoint, minSquaredDistance);\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 MultiLineString.prototype.getCoordinateAtM = function getCoordinateAtM (m, opt_extrapolate, opt_interpolate) {\n if ((this.layout != GeometryLayout.XYM &&\n this.layout != GeometryLayout.XYZM) ||\n this.flatCoordinates.length === 0) {\n return null;\n }\n var extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;\n var interpolate = opt_interpolate !== undefined ? opt_interpolate : false;\n return lineStringsCoordinateAtM(this.flatCoordinates, 0,\n this.ends_, this.stride, m, extrapolate, interpolate);\n };\n\n /**\n * Return the coordinates of the multilinestring.\n * @return {Array<Array<import(\"../coordinate.js\").Coordinate>>} Coordinates.\n * @override\n * @api\n */\n MultiLineString.prototype.getCoordinates = function getCoordinates () {\n return inflateCoordinatesArray(\n this.flatCoordinates, 0, this.ends_, this.stride);\n };\n\n /**\n * @return {Array<number>} Ends.\n */\n MultiLineString.prototype.getEnds = function 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 MultiLineString.prototype.getLineString = function getLineString (index) {\n if (index < 0 || this.ends_.length <= index) {\n return null;\n }\n return new LineString(this.flatCoordinates.slice(\n index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]), this.layout);\n };\n\n /**\n * Return the linestrings of this multilinestring.\n * @return {Array<LineString>} LineStrings.\n * @api\n */\n MultiLineString.prototype.getLineStrings = function getLineStrings () {\n var flatCoordinates = this.flatCoordinates;\n var ends = this.ends_;\n var layout = this.layout;\n /** @type {Array<LineString>} */\n var lineStrings = [];\n var offset = 0;\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n var lineString = new LineString(flatCoordinates.slice(offset, end), layout);\n lineStrings.push(lineString);\n offset = end;\n }\n return lineStrings;\n };\n\n /**\n * @return {Array<number>} Flat midpoints.\n */\n MultiLineString.prototype.getFlatMidpoints = function getFlatMidpoints () {\n var midpoints = [];\n var flatCoordinates = this.flatCoordinates;\n var offset = 0;\n var ends = this.ends_;\n var stride = this.stride;\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n var midpoint = interpolatePoint(\n flatCoordinates, offset, end, stride, 0.5);\n extend(midpoints, midpoint);\n offset = end;\n }\n return midpoints;\n };\n\n /**\n * @inheritDoc\n */\n MultiLineString.prototype.getSimplifiedGeometryInternal = function getSimplifiedGeometryInternal (squaredTolerance) {\n var simplifiedFlatCoordinates = [];\n var simplifiedEnds = [];\n simplifiedFlatCoordinates.length = douglasPeuckerArray(\n this.flatCoordinates, 0, this.ends_, this.stride, squaredTolerance,\n simplifiedFlatCoordinates, 0, simplifiedEnds);\n return new MultiLineString(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEnds);\n };\n\n /**\n * @inheritDoc\n * @api\n */\n MultiLineString.prototype.getType = function getType () {\n return GeometryType.MULTI_LINE_STRING;\n };\n\n /**\n * @inheritDoc\n * @api\n */\n MultiLineString.prototype.intersectsExtent = function intersectsExtent (extent) {\n return intersectsLineStringArray(\n this.flatCoordinates, 0, this.ends_, this.stride, extent);\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 * @override\n * @api\n */\n MultiLineString.prototype.setCoordinates = function setCoordinates (coordinates, opt_layout) {\n this.setLayout(opt_layout, coordinates, 2);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n var ends = deflateCoordinatesArray(\n this.flatCoordinates, 0, coordinates, this.stride, this.ends_);\n this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n this.changed();\n };\n\n return MultiLineString;\n}(SimpleGeometry));\n\n\nexport default MultiLineString;\n\n//# sourceMappingURL=MultiLineString.js.map","/**\n * @module ol/geom/MultiPoint\n */\nimport {extend} from '../array.js';\nimport {closestSquaredDistanceXY, containsXY} from '../extent.js';\nimport GeometryType from './GeometryType.js';\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {deflateCoordinates} from './flat/deflate.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 */\nvar MultiPoint = /*@__PURE__*/(function (SimpleGeometry) {\n function MultiPoint(coordinates, opt_layout) {\n SimpleGeometry.call(this);\n if (opt_layout && !Array.isArray(coordinates[0])) {\n this.setFlatCoordinates(opt_layout, /** @type {Array<number>} */ (coordinates));\n } else {\n this.setCoordinates(/** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates), opt_layout);\n }\n }\n\n if ( SimpleGeometry ) MultiPoint.__proto__ = SimpleGeometry;\n MultiPoint.prototype = Object.create( SimpleGeometry && SimpleGeometry.prototype );\n MultiPoint.prototype.constructor = MultiPoint;\n\n /**\n * Append the passed point to this multipoint.\n * @param {Point} point Point.\n * @api\n */\n MultiPoint.prototype.appendPoint = function 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 * @override\n * @api\n */\n MultiPoint.prototype.clone = function clone () {\n var multiPoint = new MultiPoint(this.flatCoordinates.slice(), this.layout);\n return multiPoint;\n };\n\n /**\n * @inheritDoc\n */\n MultiPoint.prototype.closestPointXY = function closestPointXY (x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n var flatCoordinates = this.flatCoordinates;\n var stride = this.stride;\n for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n var squaredDistance = squaredDx(\n x, y, flatCoordinates[i], flatCoordinates[i + 1]);\n if (squaredDistance < minSquaredDistance) {\n minSquaredDistance = squaredDistance;\n for (var j = 0; j < stride; ++j) {\n closestPoint[j] = flatCoordinates[i + j];\n }\n closestPoint.length = stride;\n }\n }\n return minSquaredDistance;\n };\n\n /**\n * Return the coordinates of the multipoint.\n * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n * @override\n * @api\n */\n MultiPoint.prototype.getCoordinates = function getCoordinates () {\n return inflateCoordinates(\n this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n };\n\n /**\n * Return the point at the specified index.\n * @param {number} index Index.\n * @return {Point} Point.\n * @api\n */\n MultiPoint.prototype.getPoint = function getPoint (index) {\n var n = !this.flatCoordinates ? 0 : this.flatCoordinates.length / this.stride;\n if (index < 0 || n <= index) {\n return null;\n }\n return new Point(this.flatCoordinates.slice(\n index * this.stride, (index + 1) * this.stride), this.layout);\n };\n\n /**\n * Return the points of this multipoint.\n * @return {Array<Point>} Points.\n * @api\n */\n MultiPoint.prototype.getPoints = function getPoints () {\n var flatCoordinates = this.flatCoordinates;\n var layout = this.layout;\n var stride = this.stride;\n /** @type {Array<Point>} */\n var points = [];\n for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n var point = new Point(flatCoordinates.slice(i, i + stride), layout);\n points.push(point);\n }\n return points;\n };\n\n /**\n * @inheritDoc\n * @api\n */\n MultiPoint.prototype.getType = function getType () {\n return GeometryType.MULTI_POINT;\n };\n\n /**\n * @inheritDoc\n * @api\n */\n MultiPoint.prototype.intersectsExtent = function intersectsExtent (extent) {\n var flatCoordinates = this.flatCoordinates;\n var stride = this.stride;\n for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n var x = flatCoordinates[i];\n var y = flatCoordinates[i + 1];\n if (containsXY(extent, x, y)) {\n return true;\n }\n }\n return false;\n };\n\n /**\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 * @override\n * @api\n */\n MultiPoint.prototype.setCoordinates = function 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, 0, coordinates, this.stride);\n this.changed();\n };\n\n return MultiPoint;\n}(SimpleGeometry));\n\n\nexport default MultiPoint;\n\n//# sourceMappingURL=MultiPoint.js.map","/**\n * @module ol/geom/flat/center\n */\nimport {createEmpty, createOrUpdateFromFlatCoordinates} from '../../extent.js';\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 {Array<number>} Flat centers.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n var flatCenters = [];\n var extent = createEmpty();\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n extent = createOrUpdateFromFlatCoordinates(flatCoordinates, offset, ends[0], stride);\n flatCenters.push((extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2);\n offset = ends[ends.length - 1];\n }\n return flatCenters;\n}\n\n//# sourceMappingURL=center.js.map","/**\n * @module ol/geom/MultiPolygon\n */\nimport {extend} from '../array.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\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 {linearRingss as linearRingssArea} from './flat/area.js';\nimport {linearRingss as linearRingssCenter} from './flat/center.js';\nimport {assignClosestMultiArrayPoint, multiArrayMaxSquaredDelta} from './flat/closest.js';\nimport {linearRingssContainsXY} from './flat/contains.js';\nimport {deflateMultiCoordinatesArray} from './flat/deflate.js';\nimport {inflateMultiCoordinatesArray} from './flat/inflate.js';\nimport {getInteriorPointsOfMultiArray} from './flat/interiorpoint.js';\nimport {intersectsLinearRingMultiArray} from './flat/intersectsextent.js';\nimport {linearRingsAreOriented, orientLinearRingsArray} from './flat/orient.js';\nimport {quantizeMultiArray} from './flat/simplify.js';\n\n/**\n * @classdesc\n * Multi-polygon geometry.\n *\n * @api\n */\nvar MultiPolygon = /*@__PURE__*/(function (SimpleGeometry) {\n function MultiPolygon(coordinates, opt_layout, opt_endss) {\n\n SimpleGeometry.call(this);\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 var layout = this.getLayout();\n var polygons = /** @type {Array<Polygon>} */ (coordinates);\n var flatCoordinates = [];\n var endss = [];\n for (var i = 0, ii = polygons.length; i < ii; ++i) {\n var polygon = polygons[i];\n if (i === 0) {\n layout = polygon.getLayout();\n }\n var offset = flatCoordinates.length;\n var ends = polygon.getEnds();\n for (var j = 0, jj = ends.length; j < jj; ++j) {\n ends[j] += offset;\n }\n extend(flatCoordinates, polygon.getFlatCoordinates());\n endss.push(ends);\n }\n opt_layout = layout;\n coordinates = flatCoordinates;\n opt_endss = endss;\n }\n if (opt_layout !== undefined && opt_endss) {\n this.setFlatCoordinates(opt_layout, /** @type {Array<number>} */ (coordinates));\n this.endss_ = opt_endss;\n } else {\n this.setCoordinates(/** @type {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} */ (coordinates),\n opt_layout);\n }\n\n }\n\n if ( SimpleGeometry ) MultiPolygon.__proto__ = SimpleGeometry;\n MultiPolygon.prototype = Object.create( SimpleGeometry && SimpleGeometry.prototype );\n MultiPolygon.prototype.constructor = MultiPolygon;\n\n /**\n * Append the passed polygon to this multipolygon.\n * @param {Polygon} polygon Polygon.\n * @api\n */\n MultiPolygon.prototype.appendPolygon = function appendPolygon (polygon) {\n /** @type {Array<number>} */\n var ends;\n if (!this.flatCoordinates) {\n this.flatCoordinates = polygon.getFlatCoordinates().slice();\n ends = polygon.getEnds().slice();\n this.endss_.push();\n } else {\n var offset = this.flatCoordinates.length;\n extend(this.flatCoordinates, polygon.getFlatCoordinates());\n ends = polygon.getEnds().slice();\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n ends[i] += offset;\n }\n }\n this.endss_.push(ends);\n this.changed();\n };\n\n /**\n * Make a complete copy of the geometry.\n * @return {!MultiPolygon} Clone.\n * @override\n * @api\n */\n MultiPolygon.prototype.clone = function clone () {\n var len = this.endss_.length;\n var newEndss = new Array(len);\n for (var i = 0; i < len; ++i) {\n newEndss[i] = this.endss_[i].slice();\n }\n\n return new MultiPolygon(\n this.flatCoordinates.slice(), this.layout, newEndss);\n };\n\n /**\n * @inheritDoc\n */\n MultiPolygon.prototype.closestPointXY = function 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(multiArrayMaxSquaredDelta(\n this.flatCoordinates, 0, this.endss_, this.stride, 0));\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestMultiArrayPoint(\n this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride,\n this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n };\n\n /**\n * @inheritDoc\n */\n MultiPolygon.prototype.containsXY = function containsXY (x, y) {\n return linearRingssContainsXY(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, x, y);\n };\n\n /**\n * Return the area of the multipolygon on projected plane.\n * @return {number} Area (on projected plane).\n * @api\n */\n MultiPolygon.prototype.getArea = function getArea () {\n return linearRingssArea(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride);\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 * @override\n * @api\n */\n MultiPolygon.prototype.getCoordinates = function getCoordinates (opt_right) {\n var flatCoordinates;\n if (opt_right !== undefined) {\n flatCoordinates = this.getOrientedFlatCoordinates().slice();\n orientLinearRingsArray(\n flatCoordinates, 0, this.endss_, this.stride, opt_right);\n } else {\n flatCoordinates = this.flatCoordinates;\n }\n\n return inflateMultiCoordinatesArray(\n flatCoordinates, 0, this.endss_, this.stride);\n };\n\n /**\n * @return {Array<Array<number>>} Endss.\n */\n MultiPolygon.prototype.getEndss = function getEndss () {\n return this.endss_;\n };\n\n /**\n * @return {Array<number>} Flat interior points.\n */\n MultiPolygon.prototype.getFlatInteriorPoints = function getFlatInteriorPoints () {\n if (this.flatInteriorPointsRevision_ != this.getRevision()) {\n var flatCenters = linearRingssCenter(\n this.flatCoordinates, 0, this.endss_, this.stride);\n this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(\n this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride,\n flatCenters);\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 MultiPolygon.prototype.getInteriorPoints = function getInteriorPoints () {\n return new MultiPoint(this.getFlatInteriorPoints().slice(), GeometryLayout.XYM);\n };\n\n /**\n * @return {Array<number>} Oriented flat coordinates.\n */\n MultiPolygon.prototype.getOrientedFlatCoordinates = function getOrientedFlatCoordinates () {\n if (this.orientedRevision_ != this.getRevision()) {\n var flatCoordinates = this.flatCoordinates;\n if (linearRingsAreOriented(\n flatCoordinates, 0, this.endss_, this.stride)) {\n this.orientedFlatCoordinates_ = flatCoordinates;\n } else {\n this.orientedFlatCoordinates_ = flatCoordinates.slice();\n this.orientedFlatCoordinates_.length =\n orientLinearRingsArray(\n this.orientedFlatCoordinates_, 0, this.endss_, this.stride);\n }\n this.orientedRevision_ = this.getRevision();\n }\n return this.orientedFlatCoordinates_;\n };\n\n /**\n * @inheritDoc\n */\n MultiPolygon.prototype.getSimplifiedGeometryInternal = function getSimplifiedGeometryInternal (squaredTolerance) {\n var simplifiedFlatCoordinates = [];\n var simplifiedEndss = [];\n simplifiedFlatCoordinates.length = quantizeMultiArray(\n this.flatCoordinates, 0, this.endss_, this.stride,\n Math.sqrt(squaredTolerance),\n simplifiedFlatCoordinates, 0, simplifiedEndss);\n return new MultiPolygon(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEndss);\n };\n\n /**\n * Return the polygon at the specified index.\n * @param {number} index Index.\n * @return {Polygon} Polygon.\n * @api\n */\n MultiPolygon.prototype.getPolygon = function getPolygon (index) {\n if (index < 0 || this.endss_.length <= index) {\n return null;\n }\n var offset;\n if (index === 0) {\n offset = 0;\n } else {\n var prevEnds = this.endss_[index - 1];\n offset = prevEnds[prevEnds.length - 1];\n }\n var ends = this.endss_[index].slice();\n var end = ends[ends.length - 1];\n if (offset !== 0) {\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n ends[i] -= offset;\n }\n }\n return new Polygon(this.flatCoordinates.slice(offset, end), this.layout, ends);\n };\n\n /**\n * Return the polygons of this multipolygon.\n * @return {Array<Polygon>} Polygons.\n * @api\n */\n MultiPolygon.prototype.getPolygons = function getPolygons () {\n var layout = this.layout;\n var flatCoordinates = this.flatCoordinates;\n var endss = this.endss_;\n var polygons = [];\n var offset = 0;\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i].slice();\n var end = ends[ends.length - 1];\n if (offset !== 0) {\n for (var j = 0, jj = ends.length; j < jj; ++j) {\n ends[j] -= offset;\n }\n }\n var polygon = new Polygon(flatCoordinates.slice(offset, end), layout, ends);\n polygons.push(polygon);\n offset = end;\n }\n return polygons;\n };\n\n /**\n * @inheritDoc\n * @api\n */\n MultiPolygon.prototype.getType = function getType () {\n return GeometryType.MULTI_POLYGON;\n };\n\n /**\n * @inheritDoc\n * @api\n */\n MultiPolygon.prototype.intersectsExtent = function intersectsExtent (extent) {\n return intersectsLinearRingMultiArray(\n this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, extent);\n };\n\n /**\n * Set the coordinates of the multipolygon.\n * @param {!Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} coordinates Coordinates.\n * @param {GeometryLayout=} opt_layout Layout.\n * @override\n * @api\n */\n MultiPolygon.prototype.setCoordinates = function setCoordinates (coordinates, opt_layout) {\n this.setLayout(opt_layout, coordinates, 3);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n var endss = deflateMultiCoordinatesArray(\n this.flatCoordinates, 0, coordinates, this.stride, this.endss_);\n if (endss.length === 0) {\n this.flatCoordinates.length = 0;\n } else {\n var lastEnds = endss[endss.length - 1];\n this.flatCoordinates.length = lastEnds.length === 0 ?\n 0 : lastEnds[lastEnds.length - 1];\n }\n this.changed();\n };\n\n return MultiPolygon;\n}(SimpleGeometry));\n\n\nexport default MultiPolygon;\n\n//# sourceMappingURL=MultiPolygon.js.map","/**\n * @module ol/style/Image\n */\nimport {abstract} from '../util.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} opacity\n * @property {boolean} rotateWithView\n * @property {number} rotation\n * @property {number} scale\n */\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 */\nvar ImageStyle = function ImageStyle(options) {\n\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}\n */\n this.scale_ = options.scale;\n\n};\n\n/**\n * Clones the style.\n * @return {ImageStyle} The cloned style.\n * @api\n */\nImageStyle.prototype.clone = function clone () {\n return new ImageStyle({\n opacity: this.getOpacity(),\n scale: this.getScale(),\n rotation: this.getRotation(),\n rotateWithView: this.getRotateWithView()\n });\n};\n\n/**\n * Get the symbolizer opacity.\n * @return {number} Opacity.\n * @api\n */\nImageStyle.prototype.getOpacity = function 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 */\nImageStyle.prototype.getRotateWithView = function getRotateWithView () {\n return this.rotateWithView_;\n};\n\n/**\n * Get the symoblizer rotation.\n * @return {number} Rotation.\n * @api\n */\nImageStyle.prototype.getRotation = function getRotation () {\n return this.rotation_;\n};\n\n/**\n * Get the symbolizer scale.\n * @return {number} Scale.\n * @api\n */\nImageStyle.prototype.getScale = function getScale () {\n return this.scale_;\n};\n\n/**\n * This method is deprecated and always returns false.\n * @return {boolean} false.\n * @deprecated\n * @api\n */\nImageStyle.prototype.getSnapToPixel = function getSnapToPixel () {\n return false;\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 */\nImageStyle.prototype.getAnchor = function 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 */\nImageStyle.prototype.getImage = function getImage (pixelRatio) {\n return abstract();\n};\n\n/**\n * @abstract\n * @param {number} pixelRatio Pixel ratio.\n * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Image element.\n */\nImageStyle.prototype.getHitDetectionImage = function getHitDetectionImage (pixelRatio) {\n return abstract();\n};\n\n/**\n * @abstract\n * @return {import(\"../ImageState.js\").default} Image state.\n */\nImageStyle.prototype.getImageState = function getImageState () {\n return abstract();\n};\n\n/**\n * @abstract\n * @return {import(\"../size.js\").Size} Image size.\n */\nImageStyle.prototype.getImageSize = function getImageSize () {\n return abstract();\n};\n\n/**\n * @abstract\n * @return {import(\"../size.js\").Size} Size of the hit-detection image.\n */\nImageStyle.prototype.getHitDetectionImageSize = function getHitDetectionImageSize () {\n return abstract();\n};\n\n/**\n * Get the origin of the symbolizer.\n * @abstract\n * @return {Array<number>} Origin.\n */\nImageStyle.prototype.getOrigin = function 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 */\nImageStyle.prototype.getSize = function getSize () {\n return abstract();\n};\n\n/**\n * Set the opacity.\n *\n * @param {number} opacity Opacity.\n * @api\n */\nImageStyle.prototype.setOpacity = function 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 */\nImageStyle.prototype.setRotateWithView = function setRotateWithView (rotateWithView) {\n this.rotateWithView_ = rotateWithView;\n};\n\n/**\n * Set the rotation.\n *\n * @param {number} rotation Rotation.\n * @api\n */\nImageStyle.prototype.setRotation = function setRotation (rotation) {\n this.rotation_ = rotation;\n};\n/**\n * Set the scale.\n *\n * @param {number} scale Scale.\n * @api\n */\nImageStyle.prototype.setScale = function setScale (scale) {\n this.scale_ = scale;\n};\n\n/**\n * This method is deprecated and does nothing.\n * @param {boolean} snapToPixel Snap to pixel?\n * @deprecated\n * @api\n */\nImageStyle.prototype.setSnapToPixel = function setSnapToPixel (snapToPixel) {};\n\n/**\n * @abstract\n * @param {function(this: T, import(\"../events/Event.js\").default)} listener Listener function.\n * @param {T} thisArg Value to use as `this` when executing `listener`.\n * @return {import(\"../events.js\").EventsKey|undefined} Listener key.\n * @template T\n */\nImageStyle.prototype.listenImageChange = function listenImageChange (listener, thisArg) {\n return abstract();\n};\n\n/**\n * Load not yet loaded URI.\n * @abstract\n */\nImageStyle.prototype.load = function load () {\n abstract();\n};\n\n/**\n * @abstract\n * @param {function(this: T, import(\"../events/Event.js\").default)} listener Listener function.\n * @param {T} thisArg Value to use as `this` when executing `listener`.\n * @template T\n */\nImageStyle.prototype.unlistenImageChange = function unlistenImageChange (listener, thisArg) {\n abstract();\n};\n\nexport default ImageStyle;\n\n//# sourceMappingURL=Image.js.map","/**\n * @module ol/style/RegularShape\n */\n\nimport {asString} from '../color.js';\nimport {asColorLike} from '../colorlike.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {CANVAS_LINE_DASH} from '../has.js';\nimport ImageState from '../ImageState.js';\nimport {defaultStrokeStyle, defaultFillStyle, defaultLineCap, defaultLineWidth, defaultLineJoin, defaultMiterLimit} from '../render/canvas.js';\nimport ImageStyle from './Image.js';\n\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 {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 {import(\"./AtlasManager.js\").default} [atlasManager] The atlas manager to use for this symbol. When\n * using WebGL it is recommended to use an atlas manager to avoid texture switching. If an atlas manager is given, the\n * symbol is added to an atlas. By default no atlas manager is used.\n */\n\n\n/**\n * @typedef {Object} RenderOptions\n * @property {import(\"../colorlike.js\").ColorLike} [strokeStyle]\n * @property {number} strokeWidth\n * @property {number} size\n * @property {string} lineCap\n * @property {Array<number>} lineDash\n * @property {number} lineDashOffset\n * @property {string} lineJoin\n * @property {number} miterLimit\n */\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 */\nvar RegularShape = /*@__PURE__*/(function (ImageStyle) {\n function RegularShape(options) {\n /**\n * @type {boolean}\n */\n var rotateWithView = options.rotateWithView !== undefined ?\n options.rotateWithView : false;\n\n ImageStyle.call(this, {\n opacity: 1,\n rotateWithView: rotateWithView,\n rotation: options.rotation !== undefined ? options.rotation : 0,\n scale: 1\n });\n\n /**\n * @private\n * @type {Array<string|number>}\n */\n this.checksums_ = null;\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.canvas_ = null;\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_ = /** @type {number} */ (options.radius !== undefined ?\n 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 /**\n * @protected\n * @type {import(\"./AtlasManager.js\").default|undefined}\n */\n this.atlasManager_ = options.atlasManager;\n\n this.render_(this.atlasManager_);\n\n }\n\n if ( ImageStyle ) RegularShape.__proto__ = ImageStyle;\n RegularShape.prototype = Object.create( ImageStyle && ImageStyle.prototype );\n RegularShape.prototype.constructor = RegularShape;\n\n /**\n * Clones the style. If an atlasmanager was provided to the original style it will be used in the cloned style, too.\n * @return {RegularShape} The cloned style.\n * @api\n */\n RegularShape.prototype.clone = function clone () {\n var style = new RegularShape({\n fill: this.getFill() ? this.getFill().clone() : undefined,\n points: this.getPoints(),\n radius: this.getRadius(),\n radius2: this.getRadius2(),\n angle: this.getAngle(),\n stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n rotation: this.getRotation(),\n rotateWithView: this.getRotateWithView(),\n atlasManager: this.atlasManager_\n });\n style.setOpacity(this.getOpacity());\n style.setScale(this.getScale());\n return style;\n };\n\n /**\n * @inheritDoc\n * @api\n */\n RegularShape.prototype.getAnchor = function 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 RegularShape.prototype.getAngle = function 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 RegularShape.prototype.getFill = function getFill () {\n return this.fill_;\n };\n\n /**\n * @inheritDoc\n */\n RegularShape.prototype.getHitDetectionImage = function getHitDetectionImage (pixelRatio) {\n return this.hitDetectionCanvas_;\n };\n\n /**\n * @inheritDoc\n * @api\n */\n RegularShape.prototype.getImage = function getImage (pixelRatio) {\n return this.canvas_;\n };\n\n /**\n * @inheritDoc\n */\n RegularShape.prototype.getImageSize = function getImageSize () {\n return this.imageSize_;\n };\n\n /**\n * @inheritDoc\n */\n RegularShape.prototype.getHitDetectionImageSize = function getHitDetectionImageSize () {\n return this.hitDetectionImageSize_;\n };\n\n /**\n * @inheritDoc\n */\n RegularShape.prototype.getImageState = function getImageState () {\n return ImageState.LOADED;\n };\n\n /**\n * @inheritDoc\n * @api\n */\n RegularShape.prototype.getOrigin = function 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 RegularShape.prototype.getPoints = function getPoints () {\n return this.points_;\n };\n\n /**\n * Get the (primary) radius for the shape.\n * @return {number} Radius.\n * @api\n */\n RegularShape.prototype.getRadius = function 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 RegularShape.prototype.getRadius2 = function getRadius2 () {\n return this.radius2_;\n };\n\n /**\n * @inheritDoc\n * @api\n */\n RegularShape.prototype.getSize = function 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 RegularShape.prototype.getStroke = function getStroke () {\n return this.stroke_;\n };\n\n /**\n * @inheritDoc\n */\n RegularShape.prototype.listenImageChange = function listenImageChange (listener, thisArg) {\n return undefined;\n };\n\n /**\n * @inheritDoc\n */\n RegularShape.prototype.load = function load () {};\n\n /**\n * @inheritDoc\n */\n RegularShape.prototype.unlistenImageChange = function unlistenImageChange (listener, thisArg) {};\n\n /**\n * @protected\n * @param {import(\"./AtlasManager.js\").default|undefined} atlasManager An atlas manager.\n */\n RegularShape.prototype.render_ = function render_ (atlasManager) {\n var imageSize;\n var lineCap = '';\n var lineJoin = '';\n var miterLimit = 0;\n var lineDash = null;\n var lineDashOffset = 0;\n var strokeStyle;\n var 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 if (!CANVAS_LINE_DASH) {\n lineDash = null;\n lineDashOffset = 0;\n }\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 var size = 2 * (this.radius_ + strokeWidth) + 1;\n\n /** @type {RenderOptions} */\n var renderOptions = {\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 if (atlasManager === undefined) {\n // no atlas manager is used, create a new canvas\n var context = createCanvasContext2D(size, size);\n this.canvas_ = context.canvas;\n\n // canvas.width and height are rounded to the closest integer\n size = this.canvas_.width;\n imageSize = size;\n\n this.draw_(renderOptions, context, 0, 0);\n\n this.createHitDetectionCanvas_(renderOptions);\n } else {\n // an atlas manager is used, add the symbol to an atlas\n size = Math.round(size);\n\n var hasCustomHitDetectionImage = !this.fill_;\n var renderHitDetectionCallback;\n if (hasCustomHitDetectionImage) {\n // render the hit-detection image into a separate atlas image\n renderHitDetectionCallback =\n this.drawHitDetectionCanvas_.bind(this, renderOptions);\n }\n\n var id = this.getChecksum();\n var info = atlasManager.add(\n id, size, size, this.draw_.bind(this, renderOptions),\n renderHitDetectionCallback);\n\n this.canvas_ = info.image;\n this.origin_ = [info.offsetX, info.offsetY];\n imageSize = info.image.width;\n\n if (hasCustomHitDetectionImage) {\n this.hitDetectionCanvas_ = info.hitImage;\n this.hitDetectionImageSize_ =\n [info.hitImage.width, info.hitImage.height];\n } else {\n this.hitDetectionCanvas_ = this.canvas_;\n this.hitDetectionImageSize_ = [imageSize, imageSize];\n }\n }\n\n this.anchor_ = [size / 2, size / 2];\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 */\n RegularShape.prototype.draw_ = function draw_ (renderOptions, context, x, y) {\n var i, angle0, radiusC;\n // reset transform\n context.setTransform(1, 0, 0, 1, 0, 0);\n\n // then move to (x, y)\n context.translate(x, y);\n\n context.beginPath();\n\n var points = this.points_;\n if (points === Infinity) {\n context.arc(\n renderOptions.size / 2, renderOptions.size / 2,\n this.radius_, 0, 2 * Math.PI, true);\n } else {\n var radius2 = (this.radius2_ !== undefined) ? this.radius2_\n : this.radius_;\n if (radius2 !== this.radius_) {\n points = 2 * points;\n }\n for (i = 0; i <= points; i++) {\n angle0 = i * 2 * Math.PI / points - Math.PI / 2 + this.angle_;\n radiusC = i % 2 === 0 ? this.radius_ : radius2;\n context.lineTo(renderOptions.size / 2 + radiusC * Math.cos(angle0),\n renderOptions.size / 2 + radiusC * Math.sin(angle0));\n }\n }\n\n\n if (this.fill_) {\n var color = this.fill_.getColor();\n if (color === null) {\n color = defaultFillStyle;\n }\n context.fillStyle = asColorLike(color);\n context.fill();\n }\n if (this.stroke_) {\n context.strokeStyle = renderOptions.strokeStyle;\n context.lineWidth = renderOptions.strokeWidth;\n if (renderOptions.lineDash) {\n context.setLineDash(renderOptions.lineDash);\n context.lineDashOffset = renderOptions.lineDashOffset;\n }\n context.lineCap = /** @type {CanvasLineCap} */ (renderOptions.lineCap);\n context.lineJoin = /** @type {CanvasLineJoin} */ (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 RegularShape.prototype.createHitDetectionCanvas_ = function createHitDetectionCanvas_ (renderOptions) {\n this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];\n if (this.fill_) {\n this.hitDetectionCanvas_ = this.canvas_;\n return;\n }\n\n // if no fill style is set, create an extra hit-detection image with a\n // default fill style\n var context = createCanvasContext2D(renderOptions.size, renderOptions.size);\n this.hitDetectionCanvas_ = context.canvas;\n\n this.drawHitDetectionCanvas_(renderOptions, context, 0, 0);\n };\n\n /**\n * @private\n * @param {RenderOptions} renderOptions Render options.\n * @param {CanvasRenderingContext2D} context The context.\n * @param {number} x The origin for the symbol (x).\n * @param {number} y The origin for the symbol (y).\n */\n RegularShape.prototype.drawHitDetectionCanvas_ = function drawHitDetectionCanvas_ (renderOptions, context, x, y) {\n // reset transform\n context.setTransform(1, 0, 0, 1, 0, 0);\n\n // then move to (x, y)\n context.translate(x, y);\n\n context.beginPath();\n\n var points = this.points_;\n if (points === Infinity) {\n context.arc(\n renderOptions.size / 2, renderOptions.size / 2,\n this.radius_, 0, 2 * Math.PI, true);\n } else {\n var radius2 = (this.radius2_ !== undefined) ? this.radius2_\n : this.radius_;\n if (radius2 !== this.radius_) {\n points = 2 * points;\n }\n var 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(renderOptions.size / 2 + radiusC * Math.cos(angle0),\n renderOptions.size / 2 + radiusC * Math.sin(angle0));\n }\n }\n\n context.fillStyle = asString(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 /**\n * @return {string} The checksum.\n */\n RegularShape.prototype.getChecksum = function getChecksum () {\n var strokeChecksum = this.stroke_ ?\n this.stroke_.getChecksum() : '-';\n var fillChecksum = this.fill_ ?\n this.fill_.getChecksum() : '-';\n\n var recalculate = !this.checksums_ ||\n (strokeChecksum != this.checksums_[1] ||\n fillChecksum != this.checksums_[2] ||\n this.radius_ != this.checksums_[3] ||\n this.radius2_ != this.checksums_[4] ||\n this.angle_ != this.checksums_[5] ||\n this.points_ != this.checksums_[6]);\n\n if (recalculate) {\n var checksum = 'r' + strokeChecksum + fillChecksum +\n (this.radius_ !== undefined ? this.radius_.toString() : '-') +\n (this.radius2_ !== undefined ? this.radius2_.toString() : '-') +\n (this.angle_ !== undefined ? this.angle_.toString() : '-') +\n (this.points_ !== undefined ? this.points_.toString() : '-');\n this.checksums_ = [checksum, strokeChecksum, fillChecksum,\n this.radius_, this.radius2_, this.angle_, this.points_];\n }\n\n return /** @type {string} */ (this.checksums_[0]);\n };\n\n return RegularShape;\n}(ImageStyle));\n\n\nexport default RegularShape;\n\n//# sourceMappingURL=RegularShape.js.map","/**\n * @module ol/style/Circle\n */\n\nimport RegularShape from './RegularShape.js';\n\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 {import(\"./AtlasManager.js\").default} [atlasManager] The atlas manager to use for this circle.\n * When using WebGL it is recommended to use an atlas manager to avoid texture switching. If an atlas manager is given,\n * the circle is added to an atlas. By default no atlas manager is used.\n */\n\n\n/**\n * @classdesc\n * Set circle style for vector features.\n * @api\n */\nvar CircleStyle = /*@__PURE__*/(function (RegularShape) {\n function CircleStyle(opt_options) {\n\n var options = opt_options || /** @type {Options} */ ({});\n\n RegularShape.call(this, {\n points: Infinity,\n fill: options.fill,\n radius: options.radius,\n stroke: options.stroke,\n atlasManager: options.atlasManager\n });\n\n }\n\n if ( RegularShape ) CircleStyle.__proto__ = RegularShape;\n CircleStyle.prototype = Object.create( RegularShape && RegularShape.prototype );\n CircleStyle.prototype.constructor = CircleStyle;\n\n /**\n * Clones the style. If an atlasmanager was provided to the original style it will be used in the cloned style, too.\n * @return {CircleStyle} The cloned style.\n * @override\n * @api\n */\n CircleStyle.prototype.clone = function clone () {\n var style = new CircleStyle({\n fill: this.getFill() ? this.getFill().clone() : undefined,\n stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n radius: this.getRadius(),\n atlasManager: this.atlasManager_\n });\n style.setOpacity(this.getOpacity());\n style.setScale(this.getScale());\n return style;\n };\n\n /**\n * Set the circle radius.\n *\n * @param {number} radius Circle radius.\n * @api\n */\n CircleStyle.prototype.setRadius = function setRadius (radius) {\n this.radius_ = radius;\n this.render_(this.atlasManager_);\n };\n\n return CircleStyle;\n}(RegularShape));\n\n\nexport default CircleStyle;\n\n//# sourceMappingURL=Circle.js.map","/**\n * @module ol/style/Fill\n */\nimport {getUid} from '../util.js';\nimport {asString} from '../color.js';\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 */\n\n\n/**\n * @classdesc\n * Set fill style for vector features.\n * @api\n */\nvar Fill = function Fill(opt_options) {\n\n var 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 {string|undefined}\n */\n this.checksum_ = undefined;\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 */\nFill.prototype.clone = function clone () {\n var 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 */\nFill.prototype.getColor = function 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 */\nFill.prototype.setColor = function setColor (color) {\n this.color_ = color;\n this.checksum_ = undefined;\n};\n\n/**\n * @return {string} The checksum.\n */\nFill.prototype.getChecksum = function getChecksum () {\n if (this.checksum_ === undefined) {\n var color = this.color_;\n if (color) {\n if (Array.isArray(color) || typeof color == 'string') {\n this.checksum_ = 'f' + asString(/** @type {import(\"../color.js\").Color|string} */ (color));\n } else {\n this.checksum_ = getUid(this.color_);\n }\n } else {\n this.checksum_ = 'f-';\n }\n }\n\n return this.checksum_;\n};\n\nexport default Fill;\n\n//# sourceMappingURL=Fill.js.map","/**\n * @module ol/style/Style\n */\n\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 */\nimport {assert} from '../asserts.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport CircleStyle from './Circle.js';\nimport Fill from './Fill.js';\nimport Stroke from './Stroke.js';\n\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.\n *\n * @typedef {function(import(\"../Feature.js\").FeatureLike, number):(Style|Array<Style>)} 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/**\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)}\n * RenderFunction\n */\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 * @api\n */\nvar Style = function Style(opt_options) {\n\n var 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/**\n * Clones the style.\n * @return {Style} The cloned style.\n * @api\n */\nStyle.prototype.clone = function clone () {\n var geometry = this.getGeometry();\n if (geometry && typeof geometry === 'object') {\n geometry = /** @type {import(\"../geom/Geometry.js\").default} */ (geometry).clone();\n }\n return new Style({\n geometry: geometry,\n fill: this.getFill() ? this.getFill().clone() : undefined,\n image: this.getImage() ? this.getImage().clone() : undefined,\n stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n text: this.getText() ? this.getText().clone() : undefined,\n zIndex: this.getZIndex()\n });\n};\n\n/**\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 */\nStyle.prototype.getRenderer = function 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 */\nStyle.prototype.setRenderer = function 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 */\nStyle.prototype.getGeometry = function 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 */\nStyle.prototype.getGeometryFunction = function getGeometryFunction () {\n return this.geometryFunction_;\n};\n\n/**\n * Get the fill style.\n * @return {import(\"./Fill.js\").default} Fill style.\n * @api\n */\nStyle.prototype.getFill = function 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 */\nStyle.prototype.setFill = function 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 */\nStyle.prototype.getImage = function 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 */\nStyle.prototype.setImage = function 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 */\nStyle.prototype.getStroke = function 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 */\nStyle.prototype.setStroke = function 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 */\nStyle.prototype.getText = function 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 */\nStyle.prototype.setText = function 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 */\nStyle.prototype.getZIndex = function 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 */\nStyle.prototype.setGeometry = function setGeometry (geometry) {\n if (typeof geometry === 'function') {\n this.geometryFunction_ = geometry;\n } else if (typeof geometry === 'string') {\n this.geometryFunction_ = function(feature) {\n return (\n /** @type {import(\"../geom/Geometry.js\").default} */ (feature.get(geometry))\n );\n };\n } else if (!geometry) {\n this.geometryFunction_ = defaultGeometryFunction;\n } else if (geometry !== undefined) {\n this.geometryFunction_ = function() {\n return (\n /** @type {import(\"../geom/Geometry.js\").default} */ (geometry)\n );\n };\n }\n this.geometry_ = geometry;\n};\n\n/**\n * Set the z-index.\n *\n * @param {number|undefined} zIndex ZIndex.\n * @api\n */\nStyle.prototype.setZIndex = function 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 var styleFunction;\n\n if (typeof obj === 'function') {\n styleFunction = obj;\n } else {\n /**\n * @type {Array<Style>}\n */\n var styles;\n if (Array.isArray(obj)) {\n styles = obj;\n } else {\n assert(typeof /** @type {?} */ (obj).getZIndex === 'function',\n 41); // Expected an `Style` or an array of `Style`\n var style = /** @type {Style} */ (obj);\n styles = [style];\n }\n styleFunction = function() {\n return styles;\n };\n }\n return styleFunction;\n}\n\n\n/**\n * @type {Array<Style>}\n */\nvar defaultStyles = null;\n\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 var fill = new Fill({\n color: 'rgba(255,255,255,0.4)'\n });\n var stroke = new Stroke({\n color: '#3399CC',\n width: 1.25\n });\n defaultStyles = [\n new Style({\n image: new CircleStyle({\n fill: fill,\n stroke: stroke,\n radius: 5\n }),\n fill: fill,\n stroke: stroke\n })\n ];\n }\n return defaultStyles;\n}\n\n\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 var styles = {};\n var white = [255, 255, 255, 1];\n var blue = [0, 153, 255, 1];\n var width = 3;\n styles[GeometryType.POLYGON] = [\n new Style({\n fill: new Fill({\n color: [255, 255, 255, 0.5]\n })\n })\n ];\n styles[GeometryType.MULTI_POLYGON] =\n 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] =\n styles[GeometryType.LINE_STRING];\n\n styles[GeometryType.CIRCLE] =\n styles[GeometryType.POLYGON].concat(\n styles[GeometryType.LINE_STRING]\n );\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] =\n styles[GeometryType.POINT];\n\n styles[GeometryType.GEOMETRY_COLLECTION] =\n styles[GeometryType.POLYGON].concat(\n styles[GeometryType.LINE_STRING],\n styles[GeometryType.POINT]\n );\n\n return styles;\n}\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//# sourceMappingURL=Style.js.map","/**\n * @module ol/layer/Vector\n */\nimport LayerType from '../LayerType.js';\nimport Layer from './Layer.js';\nimport VectorRenderType from './VectorRenderType.js';\nimport {assign} from '../obj.js';\nimport {createDefaultStyle, toFunction as toStyleFunction} from '../style/Style.js';\n\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 {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(\"./VectorRenderType.js\").default|string} [renderMode='vector'] Render mode for vector layers:\n * * `'image'`: Vector layers are rendered as images. Great performance, but point symbols and\n * texts are always rotated with the view and pixels are scaled during zoom animations.\n * * `'vector'`: Vector layers are rendered as vectors. Most accurate rendering even during\n * animations, but slower performance.\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, and the priority is defined by the z-index of the style. Lower z-index\n * means 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` and `renderMode`\n * is `vector`, feature batches will be recreated during animations. This means that no\n * vectors will be shown clipped, but the setting will have a performance impact for large\n * amounts of vector data. When set to `false`, batches will be recreated when no animation\n * is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true` and `renderMode`\n * is `vector`, feature batches will be recreated during interactions. See also\n * `updateWhileAnimating`.\n */\n\n\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n RENDER_ORDER: 'renderOrder'\n};\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 */\nvar VectorLayer = /*@__PURE__*/(function (Layer) {\n function VectorLayer(opt_options) {\n var options = opt_options ?\n opt_options : /** @type {Options} */ ({});\n\n var baseOptions = assign({}, options);\n\n delete baseOptions.style;\n delete baseOptions.renderBuffer;\n delete baseOptions.updateWhileAnimating;\n delete baseOptions.updateWhileInteracting;\n Layer.call(this, baseOptions);\n\n /**\n * @private\n * @type {boolean}\n */\n this.declutter_ = options.declutter !== undefined ? options.declutter : false;\n\n /**\n * @type {number}\n * @private\n */\n this.renderBuffer_ = options.renderBuffer !== undefined ?\n 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_ = options.updateWhileAnimating !== undefined ?\n options.updateWhileAnimating : false;\n\n /**\n * @type {boolean}\n * @private\n */\n this.updateWhileInteracting_ = options.updateWhileInteracting !== undefined ?\n options.updateWhileInteracting : false;\n\n /**\n * @private\n * @type {import(\"./VectorTileRenderType.js\").default|string}\n */\n this.renderMode_ = options.renderMode || VectorRenderType.VECTOR;\n\n /**\n * The layer type.\n * @protected\n * @type {import(\"../LayerType.js\").default}\n */\n this.type = LayerType.VECTOR;\n\n }\n\n if ( Layer ) VectorLayer.__proto__ = Layer;\n VectorLayer.prototype = Object.create( Layer && Layer.prototype );\n VectorLayer.prototype.constructor = VectorLayer;\n\n /**\n * @return {boolean} Declutter.\n */\n VectorLayer.prototype.getDeclutter = function getDeclutter () {\n return this.declutter_;\n };\n\n /**\n * @param {boolean} declutter Declutter.\n */\n VectorLayer.prototype.setDeclutter = function setDeclutter (declutter) {\n this.declutter_ = declutter;\n };\n\n /**\n * @return {number|undefined} Render buffer.\n */\n VectorLayer.prototype.getRenderBuffer = function 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 VectorLayer.prototype.getRenderOrder = function getRenderOrder () {\n return (\n /** @type {import(\"../render.js\").OrderFunction|null|undefined} */ (this.get(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}\n * Layer style.\n * @api\n */\n VectorLayer.prototype.getStyle = function 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 VectorLayer.prototype.getStyleFunction = function getStyleFunction () {\n return this.styleFunction_;\n };\n\n /**\n * @return {boolean} Whether the rendered layer should be updated while\n * animating.\n */\n VectorLayer.prototype.getUpdateWhileAnimating = function getUpdateWhileAnimating () {\n return this.updateWhileAnimating_;\n };\n\n /**\n * @return {boolean} Whether the rendered layer should be updated while\n * interacting.\n */\n VectorLayer.prototype.getUpdateWhileInteracting = function getUpdateWhileInteracting () {\n return this.updateWhileInteracting_;\n };\n\n /**\n * @param {import(\"../render.js\").OrderFunction|null|undefined} renderOrder\n * Render order.\n */\n VectorLayer.prototype.setRenderOrder = function 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 it is `undefined` the default style is used. If\n * it is `null` the layer has no style (a `null` style), so only features\n * that have their own styles will be rendered in the layer. See\n * {@link module:ol/style} for information on the default style.\n * @param {import(\"../style/Style.js\").default|Array<import(\"../style/Style.js\").default>|import(\"../style/Style.js\").StyleFunction|null|undefined} style Layer style.\n * @api\n */\n VectorLayer.prototype.setStyle = function setStyle (style) {\n this.style_ = style !== undefined ? style : createDefaultStyle;\n this.styleFunction_ = style === null ?\n undefined : toStyleFunction(this.style_);\n this.changed();\n };\n\n /**\n * @return {import(\"./VectorRenderType.js\").default|string} The render mode.\n */\n VectorLayer.prototype.getRenderMode = function getRenderMode () {\n return this.renderMode_;\n };\n\n return VectorLayer;\n}(Layer));\n\n\n/**\n * Return the associated {@link module:ol/source/Vector vectorsource} of the layer.\n * @function\n * @return {import(\"../source/Vector.js\").default} Source.\n * @api\n */\nVectorLayer.prototype.getSource;\n\n\nexport default VectorLayer;\n\n//# sourceMappingURL=Vector.js.map","/**\n * @module ol/interaction/Draw\n */\nimport EventType from '../events/EventType.js';\nimport Feature from '../Feature.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport MapBrowserPointerEvent from '../MapBrowserPointerEvent.js';\nimport {getChangeEventType} from '../Object.js';\nimport {squaredDistance as squaredCoordinateDistance} from '../coordinate.js';\nimport {listen} from '../events.js';\nimport Event from '../events/Event.js';\nimport {noModifierKeys, always, shiftKeyOnly} from '../events/condition.js';\nimport {boundingExtent, getBottomLeft, getBottomRight, getTopLeft, getTopRight} from '../extent.js';\nimport {TRUE, FALSE} from '../functions.js';\nimport Circle from '../geom/Circle.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 {POINTER_TYPE} from '../pointer/MouseSource.js';\nimport Point from '../geom/Point.js';\nimport Polygon, {fromCircle, makeRegular} from '../geom/Polygon.js';\nimport PointerInteraction from './Pointer.js';\nimport InteractionProperty from './Property.js';\nimport VectorLayer from '../layer/Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport {createEditingStyle} from '../style/Style.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {GeometryType} 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.\n * @property {boolean} [stopClick=false] Stop click, singleclick, and\n * doubleclick events from firing during drawing.\n * @property {number} [maxPoints] The number of points that can be drawn before\n * a polygon ring or line string is finished. By default there is no\n * restriction.\n * @property {number} [minPoints] The number of points that must be drawn\n * before a polygon ring or line string can be finished. Default is `3` for\n * polygon rings and `2` for line strings.\n * @property {import(\"../events/condition.js\").Condition} [finishCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether the drawing can be finished.\n * @property {import(\"../style/Style.js\").StyleLike} [style]\n * Style for sketch features.\n * @property {GeometryFunction} [geometryFunction]\n * 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/**\n * Coordinate type when drawing points.\n * @typedef {import(\"../coordinate.js\").Coordinate} PointCoordType\n */\n\n\n/**\n * Coordinate type when drawing lines.\n * @typedef {Array<import(\"../coordinate.js\").Coordinate>} LineCoordType\n */\n\n\n/**\n * Coordinate type when drawing polygons.\n * @typedef {Array<Array<import(\"../coordinate.js\").Coordinate>>} PolyCoordType\n */\n\n\n/**\n * Types used for drawing coordinates.\n * @typedef {PointCoordType|LineCoordType|PolyCoordType} SketchCoordType\n */\n\n\n/**\n * Function that takes an array of coordinates and an optional existing geometry as\n * arguments, and returns a geometry. The optional existing geometry is the\n * geometry that is returned when the function is called without a second\n * argument.\n * @typedef {function(!SketchCoordType, import(\"../geom/SimpleGeometry.js\").default=):\n * import(\"../geom/SimpleGeometry.js\").default} GeometryFunction\n */\n\n\n/**\n * Draw mode. This collapses multi-part geometry types with their single-part\n * cousins.\n * @enum {string}\n */\nvar Mode = {\n POINT: 'Point',\n LINE_STRING: 'LineString',\n POLYGON: 'Polygon',\n CIRCLE: 'Circle'\n};\n\n\n/**\n * @enum {string}\n */\nvar DrawEventType = {\n /**\n * Triggered upon feature draw start\n * @event DrawEvent#drawstart\n * @api\n */\n DRAWSTART: 'drawstart',\n /**\n * Triggered upon feature draw end\n * @event DrawEvent#drawend\n * @api\n */\n DRAWEND: 'drawend'\n};\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Draw~Draw} instances are\n * instances of this type.\n */\nvar DrawEvent = /*@__PURE__*/(function (Event) {\n function DrawEvent(type, feature) {\n\n Event.call(this, type);\n\n /**\n * The feature being drawn.\n * @type {Feature}\n * @api\n */\n this.feature = feature;\n\n }\n\n if ( Event ) DrawEvent.__proto__ = Event;\n DrawEvent.prototype = Object.create( Event && Event.prototype );\n DrawEvent.prototype.constructor = DrawEvent;\n\n return DrawEvent;\n}(Event));\n\n\n/**\n * @classdesc\n * Interaction for drawing feature geometries.\n *\n * @fires DrawEvent\n * @api\n */\nvar Draw = /*@__PURE__*/(function (PointerInteraction) {\n function Draw(options) {\n\n var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n if (!pointerOptions.stopDown) {\n pointerOptions.stopDown = FALSE;\n }\n\n PointerInteraction.call(this, 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 * @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 {GeometryType}\n * @private\n */\n this.type_ = /** @type {GeometryType} */ (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 ? 3 : 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_ = options.maxPoints ? options.maxPoints : 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 ? options.finishCondition : TRUE;\n\n var geometryFunction = options.geometryFunction;\n if (!geometryFunction) {\n if (this.type_ === GeometryType.CIRCLE) {\n /**\n * @param {!LineCoordType} coordinates The coordinates.\n * @param {import(\"../geom/SimpleGeometry.js\").default=} opt_geometry Optional geometry.\n * @return {import(\"../geom/SimpleGeometry.js\").default} A geometry.\n */\n geometryFunction = function(coordinates, opt_geometry) {\n var circle = opt_geometry ? /** @type {Circle} */ (opt_geometry) :\n new Circle([NaN, NaN]);\n var squaredLength = squaredCoordinateDistance(\n coordinates[0], coordinates[1]);\n circle.setCenterAndRadius(coordinates[0], Math.sqrt(squaredLength));\n return circle;\n };\n } else {\n var Constructor;\n var mode = this.mode_;\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=} opt_geometry Optional geometry.\n * @return {import(\"../geom/SimpleGeometry.js\").default} A geometry.\n */\n geometryFunction = function(coordinates, opt_geometry) {\n var geometry = opt_geometry;\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([coordinates[0].concat([coordinates[0][0]])]);\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_ = 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}\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}\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 : 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 :\n 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 : shiftKeyOnly;\n }\n\n listen(this,\n getChangeEventType(InteractionProperty.ACTIVE),\n this.updateState_, this);\n\n }\n\n if ( PointerInteraction ) Draw.__proto__ = PointerInteraction;\n Draw.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n Draw.prototype.constructor = Draw;\n\n /**\n * @inheritDoc\n */\n Draw.prototype.setMap = function setMap (map) {\n PointerInteraction.prototype.setMap.call(this, 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 Draw.prototype.getOverlay = function 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 * @override\n * @api\n */\n Draw.prototype.handleEvent = function handleEvent (event) {\n if (event.originalEvent.type === EventType.CONTEXTMENU) {\n // Avoid context menu for long taps when drawing on mobile\n event.preventDefault();\n }\n this.freehand_ = this.mode_ !== Mode.POINT && this.freehandCondition_(event);\n var move = event.type === MapBrowserEventType.POINTERMOVE;\n var pass = true;\n if (!this.freehand_ && this.lastDragTime_ && event.type === MapBrowserEventType.POINTERDRAG) {\n var now = Date.now();\n if (now - this.lastDragTime_ >= this.dragVertexDelay_) {\n this.downPx_ = event.pixel;\n this.shouldHandle_ = !this.freehand_;\n move = true;\n } else {\n this.lastDragTime_ = undefined;\n }\n if (this.shouldHandle_ && this.downTimeout_ !== undefined) {\n clearTimeout(this.downTimeout_);\n this.downTimeout_ = undefined;\n }\n }\n if (this.freehand_ &&\n event.type === MapBrowserEventType.POINTERDRAG &&\n this.sketchFeature_ !== null) {\n this.addToDrawing_(event);\n pass = false;\n } else if (this.freehand_ &&\n event.type === MapBrowserEventType.POINTERDOWN) {\n pass = false;\n } else if (move) {\n pass = event.type === MapBrowserEventType.POINTERMOVE;\n if (pass && this.freehand_) {\n pass = this.handlePointerMove_(event);\n } else if (/** @type {MapBrowserPointerEvent} */ (event).pointerEvent.pointerType == POINTER_TYPE ||\n (event.type === MapBrowserEventType.POINTERDRAG && this.downTimeout_ === undefined)) {\n this.handlePointerMove_(event);\n }\n } else if (event.type === MapBrowserEventType.DBLCLICK) {\n pass = false;\n }\n\n return PointerInteraction.prototype.handleEvent.call(this, event) && pass;\n };\n\n /**\n * @inheritDoc\n */\n Draw.prototype.handleDownEvent = function 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);\n }\n return true;\n } else if (this.condition_(event)) {\n this.lastDragTime_ = Date.now();\n this.downTimeout_ = setTimeout(function() {\n this.handlePointerMove_(new MapBrowserPointerEvent(\n MapBrowserEventType.POINTERMOVE, event.map, event.pointerEvent, false, event.frameState));\n }.bind(this), this.dragVertexDelay_);\n this.downPx_ = event.pixel;\n return true;\n } else {\n return false;\n }\n };\n\n\n /**\n * @inheritDoc\n */\n Draw.prototype.handleUpEvent = function handleUpEvent (event) {\n var pass = true;\n\n if (this.downTimeout_) {\n clearTimeout(this.downTimeout_);\n this.downTimeout_ = undefined;\n }\n\n this.handlePointerMove_(event);\n\n var circleMode = this.mode_ === Mode.CIRCLE;\n\n if (this.shouldHandle_) {\n if (!this.finishCoordinate_) {\n this.startDrawing_(event);\n if (this.mode_ === Mode.POINT) {\n this.finishDrawing();\n }\n } else if (this.freehand_ || circleMode) {\n this.finishDrawing();\n } else if (this.atFinish_(event)) {\n if (this.finishCondition_(event)) {\n this.finishDrawing();\n }\n } else {\n this.addToDrawing_(event);\n }\n pass = false;\n } else if (this.freehand_) {\n this.finishCoordinate_ = null;\n this.abortDrawing_();\n }\n if (!pass && this.stopClick_) {\n event.stopPropagation();\n }\n return pass;\n };\n\n /**\n * Handle move events.\n * @param {import(\"../MapBrowserEvent.js\").default} event A move event.\n * @return {boolean} Pass the event to other interactions.\n * @private\n */\n Draw.prototype.handlePointerMove_ = function handlePointerMove_ (event) {\n if (this.downPx_ &&\n ((!this.freehand_ && this.shouldHandle_) ||\n (this.freehand_ && !this.shouldHandle_))) {\n var downPx = this.downPx_;\n var clickPx = event.pixel;\n var dx = downPx[0] - clickPx[0];\n var dy = downPx[1] - clickPx[1];\n var squaredDistance = dx * dx + dy * dy;\n this.shouldHandle_ = this.freehand_ ?\n squaredDistance > this.squaredClickTolerance_ :\n squaredDistance <= this.squaredClickTolerance_;\n if (!this.shouldHandle_) {\n return true;\n }\n }\n\n if (this.finishCoordinate_) {\n this.modifyDrawing_(event);\n } else {\n this.createOrUpdateSketchPoint_(event);\n }\n return true;\n };\n\n /**\n * Determine if an event is within the snapping tolerance of the start coord.\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @return {boolean} The event is within the snapping tolerance of the start.\n * @private\n */\n Draw.prototype.atFinish_ = function atFinish_ (event) {\n var at = false;\n if (this.sketchFeature_) {\n var potentiallyDone = false;\n var potentiallyFinishCoordinates = [this.finishCoordinate_];\n if (this.mode_ === Mode.LINE_STRING) {\n potentiallyDone = this.sketchCoords_.length > this.minPoints_;\n } else if (this.mode_ === Mode.POLYGON) {\n var sketchCoords = /** @type {PolyCoordType} */ (this.sketchCoords_);\n potentiallyDone = sketchCoords[0].length > this.minPoints_;\n potentiallyFinishCoordinates = [sketchCoords[0][0], sketchCoords[0][sketchCoords[0].length - 2]];\n }\n if (potentiallyDone) {\n var map = event.map;\n for (var i = 0, ii = potentiallyFinishCoordinates.length; i < ii; i++) {\n var finishCoordinate = potentiallyFinishCoordinates[i];\n var finishPixel = map.getPixelFromCoordinate(finishCoordinate);\n var pixel = event.pixel;\n var dx = pixel[0] - finishPixel[0];\n var dy = pixel[1] - finishPixel[1];\n var snapTolerance = this.freehand_ ? 1 : this.snapTolerance_;\n at = Math.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 Draw.prototype.createOrUpdateSketchPoint_ = function createOrUpdateSketchPoint_ (event) {\n var coordinates = event.coordinate.slice();\n if (!this.sketchPoint_) {\n this.sketchPoint_ = new Feature(new Point(coordinates));\n this.updateSketchFeatures_();\n } else {\n var sketchPointGeom = /** @type {Point} */ (this.sketchPoint_.getGeometry());\n sketchPointGeom.setCoordinates(coordinates);\n }\n };\n\n /**\n * Start the drawing.\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @private\n */\n Draw.prototype.startDrawing_ = function startDrawing_ (event) {\n var start = event.coordinate;\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(\n new LineString(this.sketchLineCoords_));\n }\n var geometry = this.geometryFunction_(this.sketchCoords_);\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(new DrawEvent(DrawEventType.DRAWSTART, this.sketchFeature_));\n };\n\n /**\n * Modify the drawing.\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @private\n */\n Draw.prototype.modifyDrawing_ = function modifyDrawing_ (event) {\n var coordinate = event.coordinate;\n var geometry = /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (this.sketchFeature_.getGeometry());\n var 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_(event)) {\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_(/** @type {!LineCoordType} */ (this.sketchCoords_), geometry);\n if (this.sketchPoint_) {\n var sketchPointGeom = /** @type {Point} */ (this.sketchPoint_.getGeometry());\n sketchPointGeom.setCoordinates(coordinate);\n }\n /** @type {LineString} */\n var sketchLineGeom;\n if (geometry.getType() == GeometryType.POLYGON &&\n this.mode_ !== Mode.POLYGON) {\n if (!this.sketchLine_) {\n this.sketchLine_ = new Feature();\n }\n var ring = /** @type {Polygon} */ (geometry).getLinearRing(0);\n sketchLineGeom = /** @type {LineString} */ (this.sketchLine_.getGeometry());\n if (!sketchLineGeom) {\n sketchLineGeom = new LineString(ring.getFlatCoordinates(), ring.getLayout());\n this.sketchLine_.setGeometry(sketchLineGeom);\n } else {\n sketchLineGeom.setFlatCoordinates(\n ring.getLayout(), ring.getFlatCoordinates());\n sketchLineGeom.changed();\n }\n } else if (this.sketchLineCoords_) {\n sketchLineGeom = /** @type {LineString} */ (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 {import(\"../MapBrowserEvent.js\").default} event Event.\n * @private\n */\n Draw.prototype.addToDrawing_ = function addToDrawing_ (event) {\n var coordinate = event.coordinate;\n var geometry = /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (this.sketchFeature_.getGeometry());\n var done;\n var coordinates;\n if (this.mode_ === Mode.LINE_STRING) {\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);\n } else if (this.mode_ === Mode.POLYGON) {\n coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n if (coordinates.length >= this.maxPoints_) {\n if (this.freehand_) {\n coordinates.pop();\n } 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);\n }\n this.updateSketchFeatures_();\n if (done) {\n this.finishDrawing();\n }\n };\n\n /**\n * Remove last point of the feature currently being drawn.\n * @api\n */\n Draw.prototype.removeLastPoint = function removeLastPoint () {\n if (!this.sketchFeature_) {\n return;\n }\n var geometry = /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (this.sketchFeature_.getGeometry());\n var coordinates;\n /** @type {LineString} */\n var sketchLineGeom;\n if (this.mode_ === Mode.LINE_STRING) {\n coordinates = /** @type {LineCoordType} */ (this.sketchCoords_);\n coordinates.splice(-2, 1);\n this.geometryFunction_(coordinates, geometry);\n if (coordinates.length >= 2) {\n this.finishCoordinate_ = coordinates[coordinates.length - 2].slice();\n }\n } else if (this.mode_ === Mode.POLYGON) {\n coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n coordinates.splice(-2, 1);\n sketchLineGeom = /** @type {LineString} */ (this.sketchLine_.getGeometry());\n sketchLineGeom.setCoordinates(coordinates);\n this.geometryFunction_(this.sketchCoords_, geometry);\n }\n\n if (coordinates.length === 0) {\n this.finishCoordinate_ = null;\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 Draw.prototype.finishDrawing = function finishDrawing () {\n var sketchFeature = this.abortDrawing_();\n if (!sketchFeature) {\n return;\n }\n var coordinates = this.sketchCoords_;\n var geometry = /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (sketchFeature.getGeometry());\n if (this.mode_ === Mode.LINE_STRING) {\n // remove the redundant last point\n coordinates.pop();\n this.geometryFunction_(coordinates, geometry);\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);\n coordinates = geometry.getCoordinates();\n }\n\n // cast multi-part geometries\n if (this.type_ === GeometryType.MULTI_POINT) {\n sketchFeature.setGeometry(new MultiPoint([/** @type {PointCoordType} */(coordinates)]));\n } else if (this.type_ === GeometryType.MULTI_LINE_STRING) {\n sketchFeature.setGeometry(new MultiLineString([/** @type {LineCoordType} */(coordinates)]));\n } else if (this.type_ === GeometryType.MULTI_POLYGON) {\n sketchFeature.setGeometry(new MultiPolygon([/** @type {PolyCoordType} */(coordinates)]));\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 Draw.prototype.abortDrawing_ = function abortDrawing_ () {\n this.finishCoordinate_ = null;\n var sketchFeature = this.sketchFeature_;\n if (sketchFeature) {\n this.sketchFeature_ = null;\n this.sketchPoint_ = null;\n this.sketchLine_ = null;\n /** @type {VectorSource} */ (this.overlay_.getSource()).clear(true);\n }\n return sketchFeature;\n };\n\n /**\n * Extend an existing geometry by adding additional points. This only works\n * on features with `LineString` geometries, where the interaction will\n * extend lines by adding points to the end of the coordinates array.\n * @param {!Feature} feature Feature to be extended.\n * @api\n */\n Draw.prototype.extend = function extend (feature) {\n var geometry = feature.getGeometry();\n var lineString = /** @type {LineString} */ (geometry);\n this.sketchFeature_ = feature;\n this.sketchCoords_ = lineString.getCoordinates();\n var last = this.sketchCoords_[this.sketchCoords_.length - 1];\n this.finishCoordinate_ = last.slice();\n this.sketchCoords_.push(last.slice());\n this.updateSketchFeatures_();\n this.dispatchEvent(new DrawEvent(DrawEventType.DRAWSTART, this.sketchFeature_));\n };\n\n /**\n * Redraw the sketch features.\n * @private\n */\n Draw.prototype.updateSketchFeatures_ = function updateSketchFeatures_ () {\n var sketchFeatures = [];\n if (this.sketchFeature_) {\n sketchFeatures.push(this.sketchFeature_);\n }\n if (this.sketchLine_) {\n sketchFeatures.push(this.sketchLine_);\n }\n if (this.sketchPoint_) {\n sketchFeatures.push(this.sketchPoint_);\n }\n var overlaySource = /** @type {VectorSource} */ (this.overlay_.getSource());\n overlaySource.clear(true);\n overlaySource.addFeatures(sketchFeatures);\n };\n\n /**\n * @private\n */\n Draw.prototype.updateState_ = function updateState_ () {\n var map = this.getMap();\n var active = this.getActive();\n if (!map || !active) {\n this.abortDrawing_();\n }\n this.overlay_.setMap(active ? map : null);\n };\n\n return Draw;\n}(PointerInteraction));\n\n\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n var styles = createEditingStyle();\n return function(feature, resolution) {\n return styles[feature.getGeometry().getType()];\n };\n}\n\n\n/**\n * Create a `geometryFunction` for `type: 'Circle'` that will create a regular\n * polygon with a user specified number of sides and start angle instead of an\n * `import(\"../geom/Circle.js\").Circle` geometry.\n * @param {number=} opt_sides Number of sides of the regular polygon. Default is\n * 32.\n * @param {number=} opt_angle Angle of the first point in radians. 0 means East.\n * Default is the angle defined by the heading from the center of the\n * regular polygon to the current pointer position.\n * @return {GeometryFunction} Function that draws a\n * polygon.\n * @api\n */\nexport function createRegularPolygon(opt_sides, opt_angle) {\n return function(coordinates, opt_geometry) {\n var center = /** @type {LineCoordType} */ (coordinates)[0];\n var end = /** @type {LineCoordType} */ (coordinates)[1];\n var radius = Math.sqrt(\n squaredCoordinateDistance(center, end));\n var geometry = opt_geometry ? /** @type {Polygon} */ (opt_geometry) :\n fromCircle(new Circle(center), opt_sides);\n var angle = opt_angle;\n if (!opt_angle) {\n var x = end[0] - center[0];\n var y = end[1] - center[1];\n angle = Math.atan(y / x) - (x < 0 ? Math.PI : 0);\n }\n makeRegular(geometry, center, radius, angle);\n return geometry;\n };\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 (\n function(coordinates, opt_geometry) {\n var extent = boundingExtent(/** @type {LineCoordType} */ (coordinates));\n var boxCoordinates = [[\n getBottomLeft(extent),\n getBottomRight(extent),\n getTopRight(extent),\n getTopLeft(extent),\n getBottomLeft(extent)\n ]];\n var geometry = opt_geometry;\n if (geometry) {\n geometry.setCoordinates(boxCoordinates);\n } else {\n geometry = new Polygon(boxCoordinates);\n }\n return geometry;\n }\n );\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 {GeometryType} type Geometry type.\n * @return {Mode} Drawing mode.\n */\nfunction getMode(type) {\n var mode;\n if (type === GeometryType.POINT ||\n type === GeometryType.MULTI_POINT) {\n mode = Mode.POINT;\n } else if (type === GeometryType.LINE_STRING ||\n type === GeometryType.MULTI_LINE_STRING) {\n mode = Mode.LINE_STRING;\n } else if (type === GeometryType.POLYGON ||\n type === GeometryType.MULTI_POLYGON) {\n mode = Mode.POLYGON;\n } else if (type === GeometryType.CIRCLE) {\n mode = Mode.CIRCLE;\n }\n return (\n /** @type {!Mode} */ (mode)\n );\n}\n\n\nexport default Draw;\n\n//# sourceMappingURL=Draw.js.map","/**\n * @module ol/control/MessureControl\n */\nimport Control from 'ol/control/Control.js';\nimport {CLASS_CONTROL, CLASS_UNSELECTABLE, CLASS_UNSUPPORTED} from 'ol/css.js';\nimport {replaceNode} from 'ol/dom.js';\nimport {listen} from 'ol/events.js';\nimport EventType from 'ol/events/EventType.js';\nimport {Vector as VectorSource} from 'ol/source';\nimport Overlay from 'ol/Overlay.js';\nimport {LineString, Polygon} from 'ol/geom.js';\nimport Draw from 'ol/interaction/Draw.js';\nimport {Circle as CircleStyle, Fill, Stroke, Style} from 'ol/style.js';\nimport {getArea, getLength} from 'ol/sphere.js';\nimport {unByKey} from 'ol/Observable.js';\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 * 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/**\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 * @api\n */\nvar MessureControl = /*@__PURE__*/(function (Control) {\n\tfunction MessureControl(opt_options) {\n\n\t\tvar self = this;\n\t\tvar options = opt_options ? opt_options : {};\n\n\t\tControl.call(this, {\n\t\t\telement: document.createElement('div'),\n\t\t\ttarget: options.target\n\t\t});\n\n\t\tthis.active_ = options.active ? options.active : false;\n\n\t\t/**\n\t\t * @private\n\t\t * @type {string}\n\t\t */\n\t\tthis.cssClassName_ = options.className !== undefined ? options.className :\n\t\t\t'ol-messure';\n\n\t\tvar label = options.label !== undefined ? options.label : '\\ud83d\\udccf';\n\n\t\t/**\n\t\t * @private\n\t\t * @type {Text}\n\t\t */\n\t\tthis.labelNode_ = typeof label === 'string' ?\n\t\t\tdocument.createTextNode(label) : label;\n\n\t\tvar labelActive = options.labelActive !== undefined ? options.labelActive : '\\ud83d\\udccf';\n\n\t\t/**\n\t\t * @private\n\t\t * @type {Text}\n\t\t */\n\t\tthis.labelActiveNode_ = typeof labelActive === 'string' ?\n\t\t\tdocument.createTextNode(labelActive) : labelActive;\n\n\t\t/**\n\t\t * @private\n\t\t * @type {HTMLElement}\n\t\t */\n\t\tthis.button_ = document.createElement('button');\n\n\t\tvar tipLabel = options.tipLabel ? options.tipLabel : 'messure distance';\n\t\tthis.setClassName_(this.button_, this.active_);\n\t\tthis.button_.setAttribute('type', 'button');\n\t\tthis.button_.title = tipLabel;\n\t\tthis.button_.appendChild(this.labelNode_);\n\n\t\tlisten(this.button_, EventType.CLICK,\n\t\t\tthis.handleClick_, this);\n\n\t\tvar cssClasses = this.cssClassName_ + ' ' + CLASS_UNSELECTABLE +\n\t\t\t\t' ' + CLASS_CONTROL;\n\t\tvar element = this.element;\n\t\telement.className = cssClasses;\n\t\telement.appendChild(this.button_);\n\n\t\t/**\n\t\t * @private\n\t\t * @type {boolean}\n\t\t * /\n\t\tthis.keys_ = options.keys !== undefined ? options.keys : false;*/\n\n\t\t/**\n\t\t * @private\n\t\t * @type {HTMLElement|string|undefined}\n\t\t */\n\t\tthis.source_ = options.source ? options.source : new VectorSource();\n\n\n\t\t/**\n\t\t * Currently drawn feature.\n\t\t * @type {module:ol/Feature~Feature}\n\t\t */\n\t\tthis.sketch;\n\n\n\t\t/**\n\t\t * The help tooltip element.\n\t\t * @type {Element}\n\t\t */\n\t\tthis.helpTooltipElement;\n\n\n\t\t/**\n\t\t * Overlay to show the help messages.\n\t\t * @type {module:ol/Overlay}\n\t\t */\n\t\tthis.helpTooltip;\n\n\n\t\t/**\n\t\t * The measure tooltip element.\n\t\t * @type {Element}\n\t\t */\n\t\tthis.measureTooltipElement;\n\n\n\t\t/**\n\t\t * Overlay to show the measurement.\n\t\t * @type {module:ol/Overlay}\n\t\t */\n\t\tthis.measureTooltip;\n\n\n\t\t/**\n\t\t * Message to show when the user is drawing a polygon.\n\t\t * @type {string}\n\t\t */\n\t\tthis.continuePolygonMsg = 'Click to continue drawing the polygon';\n\n\n\t\t/**\n\t\t * Message to show when the user is drawing a line.\n\t\t * @type {string}\n\t\t */\n\t\tthis.continueLineMsg = 'Click to continue drawing the line</br>Doubleclick to end path';\n\n\t\tvar type = (false ? 'Polygon' : 'LineString');\n\t\tthis.draw_ = new Draw({\n\t\t\tsource: this.source_,\n\t\t\ttype: type,\n\t\t\tstyle: new Style({\n\t\t\t\tfill: new Fill({\n\t\t\t\t\tcolor: 'rgba(255, 255, 255, 0.2)'\n\t\t\t\t}),\n\t\t\t\tstroke: new Stroke({\n\t\t\t\t\tcolor: 'rgba(0, 0, 0, 0.5)',\n\t\t\t\t\tlineDash: [10, 10],\n\t\t\t\t\twidth: 2\n\t\t\t\t}),\n\t\t\t\timage: new CircleStyle({\n\t\t\t\t\tradius: 5,\n\t\t\t\t\tstroke: new Stroke({\n\t\t\t\t\t\tcolor: 'rgba(0, 0, 0, 0.7)'\n\t\t\t\t\t}),\n\t\t\t\t\tfill: new Fill({\n\t\t\t\t\t\tcolor: 'rgba(255, 255, 255, 0.2)'\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t})\n\t\t});\n\n\t\tvar listener;\n\t\tthis.draw_.on('drawstart',\n\t\t\tfunction(evt) {\n\t\t\t\t// set sketch\n\t\t\t\tself.sketch = evt.feature;\n\n\t\t\t\t/** @type {module:ol/coordinate~Coordinate|undefined} */\n\t\t\t\tvar tooltipCoord = evt.coordinate;\n\n\t\t\t\tlistener = self.sketch.getGeometry().on('change', function(evt) {\n\t\t\t\t\tvar geom = evt.target;\n\t\t\t\t\tvar output;\n\t\t\t\t\tif (geom instanceof Polygon) {\n\t\t\t\t\t\toutput = formatArea(geom);\n\t\t\t\t\t\ttooltipCoord = geom.getInteriorPoint().getCoordinates();\n\t\t\t\t\t} else if (geom instanceof LineString) {\n\t\t\t\t\t\toutput = self.formatLength(geom);\n\t\t\t\t\t\ttooltipCoord = geom.getLastCoordinate();\n\t\t\t\t\t}\n\t\t\t\t\tself.measureTooltipElement.innerHTML = output;\n\t\t\t\t\tself.measureTooltip.setPosition(tooltipCoord);\n\t\t\t\t});\n\t\t\t});\n\n\t\tthis.draw_.on('drawend',\n\t\t\tfunction() {\n\t\t\t\tself.measureTooltipElement.className = 'tooltip tooltip-static';\n\t\t\t\tself.measureTooltip.setOffset([0, -7]);\n\t\t\t\t// unset sketch\n\t\t\t\tself.sketch = null;\n\t\t\t\t// unset tooltip so that a new one can be created\n\t\t\t\tself.measureTooltipElement = null;\n\t\t\t\tself.createMeasureTooltip();\n\t\t\t\tunByKey(listener);\n\t\t\t});\n\t\n\t}\n\n\tif ( Control ) MessureControl.__proto__ = Control;\n\tMessureControl.prototype = Object.create( Control && Control.prototype );\n\tMessureControl.prototype.constructor = MessureControl;\n\n\t/**\n\t * @param {MouseEvent} event The event to handle\n\t * @private\n\t */\n\tMessureControl.prototype.handleClick_ = function handleClick_ (event) {\n\t\tevent.preventDefault();\n\t\tthis.handleMessureControl_();\n\t};\n\n\n\tMessureControl.prototype.isActive = function isActive () {\n\t\treturn this.active_;\n\t}\n\n\t/**\n\t *\n\t */\n\tMessureControl.prototype.activate = function activate () {\n\t\tif (this.isActive()) {\n\t\t\treturn;\n\t\t}\n\t\tvar map = this.getMap();\n\t\tvar self = this;\n\t\tthis.pointerMoveHandler_ = (e) => self.pointerMoveHandler(e);\n\t\tmap.on('pointermove', this.pointerMoveHandler_);\n\t\tmap.addInteraction(this.draw_);\n\t\tthis.button_.classList.add('active');\n\n\t\tthis.active_ = true;\n\t\tthis.setClassName_(this.button_, this.active_);\n\t}\n\n\t/**\n\t *\n\t */\n\tMessureControl.prototype.deactivate = function deactivate () {\n\t\tvar map = this.getMap();\n\t\tmap.un('pointermove', this.pointerMoveHandler_);\n\t\tmap.removeInteraction(this.draw_);\n\t\tthis.helpTooltipElement.classList.add('hidden');\n\t\tthis.active_ = false;\n\t\tthis.setClassName_(this.button_, this.active_);\n\t}\n\n\t/**\n\t * Handle pointer move.\n\t * @param {module:ol/MapBrowserEvent~MapBrowserEvent} evt The event.\n\t */\n\tMessureControl.prototype.pointerMoveHandler = function pointerMoveHandler (evt) {\n\t\tif (evt.dragging) {\n\t\t\treturn;\n\t\t}\n\t\t/** @type {string} */\n\t\tvar helpMsg = 'Click to start drawing';\n\n\t\tif (this.sketch) {\n\t\t\tvar geom = (this.sketch.getGeometry());\n\t\t\tif (geom instanceof Polygon) {\n\t\t\t\thelpMsg = this.continuePolygonMsg;\n\t\t\t} else if (geom instanceof LineString) {\n\t\t\t\thelpMsg = this.continueLineMsg;\n\t\t\t}\n\t\t}\n\n\t\tthis.helpTooltipElement.innerHTML = helpMsg;\n\t\tthis.helpTooltip.setPosition(evt.coordinate);\n\n\t\tthis.helpTooltipElement.classList.remove('hidden');\n\t};\n\n\t/**\n\t * @param {HTMLElement} element Target element\n\t * @param {boolean} fullscreen True if fullscreen class name should be active\n\t * @private\n\t */\n\tMessureControl.prototype.setClassName_ = function setClassName_ (element, fullscreen) {\n\t\tvar activeClassName = this.cssClassName_ + '-true';\n\t\tvar inactiveClassName = this.cssClassName_ + '-false';\n\t\tvar nextClassName = fullscreen ? activeClassName : inactiveClassName;\n\t\telement.classList.remove(activeClassName);\n\t\telement.classList.remove(inactiveClassName);\n\t\telement.classList.add(nextClassName);\n\t};\n\n\t/**\n\t * @inheritDoc\n\t * @api\n\t */\n\tMessureControl.prototype.setMap = function setMap (map) {\n\t\tControl.prototype.setMap.call(this, map);\n\t\tvar self = this;\n\n\t\tif (map) {\n\t\t\tthis.createHelpTooltip();\n\t\t\tmap.getViewport().addEventListener('mouseout', function() {\n\t\t\t\tself.helpTooltipElement.classList.add('hidden');\n\t\t\t});\n\t\t\tthis.createMeasureTooltip();\n\t\t\tthis.createHelpTooltip();\n\t\t}\n\t};\n\n\n\t/**\n\t * Creates a new help tooltip\n\t */\n\tMessureControl.prototype.createHelpTooltip = function createHelpTooltip() {\n\t\tif (this.helpTooltipElement) {\n\t\t\tthis.helpTooltipElement.parentNode.removeChild(this.helpTooltipElement);\n\t\t}\n\t\tthis.helpTooltipElement = document.createElement('div');\n\t\tthis.helpTooltipElement.className = 'tooltip hidden';\n\t\tthis.helpTooltip = new Overlay({\n\t\t\telement: this.helpTooltipElement,\n\t\t\toffset: [15, 0],\n\t\t\tpositioning: 'center-left'\n\t\t});\n\t\tthis.getMap().addOverlay(this.helpTooltip);\n\t}\n\n\t/**\n\t * @private\n\t */\n\tMessureControl.prototype.handleMessureControl_ = function handleMessureControl_ () {\n\t\tvar map = this.getMap();\n\t\tvar self = this;\n\t\tif (!map) {\n\t\t\treturn;\n\t\t}\n\t\tif (this.isActive()) {\n\t\t\t//exitMessureControl();\n\t\t\tthis.deactivate();\n\t\t} else {\n\t\t\tthis.activate();\n\t\t}\n\t};\n\n\t/**\n\t * Creates a new measure tooltip\n\t */\n\tMessureControl.prototype.createMeasureTooltip = function createMeasureTooltip() {\n\t\tvar map = this.getMap();\n\t\tif (this.measureTooltipElement) {\n\t\t\tmeasureTooltipElement.parentNode.removeChild(measureTooltipElement);\n\t\t}\n\t\tthis.measureTooltipElement = document.createElement('div');\n\t\tthis.measureTooltipElement.className = 'tooltip tooltip-measure';\n\t\tthis.measureTooltip = new Overlay({\n\t\t\telement: this.measureTooltipElement,\n\t\t\toffset: [0, -15],\n\t\t\tpositioning: 'bottom-center'\n\t\t});\n\t\tmap.addOverlay(this.measureTooltip);\n\t}\n\n\t\t/**\n\t\t * Format length output.\n\t\t * @param {module:ol/geom/LineString~LineString} line The line.\n\t\t * @return {string} The formatted length.\n\t\t */\n\t\tMessureControl.prototype.formatLength = function formatLength(line) {\n\t\t\tvar length = getLength(line);\n\t\t\tvar output;\n\t\t\tif (length > 100) {\n\t\t\t\toutput = (Math.round(length / 1000 * 100) / 100) +\n\t\t\t\t\t\t' ' + 'km';\n\t\t\t} else {\n\t\t\t\toutput = (Math.round(length * 100) / 100) +\n\t\t\t\t\t\t' ' + 'm';\n\t\t\t}\n\t\t\treturn output;\n\t\t};\n\n\treturn MessureControl;\n}(Control));\n\nexport default MessureControl;\n\n//# sourceMappingURL=MessureControl.js.map\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//# sourceMappingURL=TileProperty.js.map","/**\n * @module ol/layer/Tile\n */\nimport LayerType from '../LayerType.js';\nimport Layer from './Layer.js';\nimport TileProperty from './TileProperty.js';\nimport {assign} from '../obj.js';\n\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} [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 * @api\n */\nvar TileLayer = /*@__PURE__*/(function (Layer) {\n function TileLayer(opt_options) {\n var options = opt_options ? opt_options : {};\n\n var baseOptions = assign({}, options);\n\n delete baseOptions.preload;\n delete baseOptions.useInterimTilesOnError;\n Layer.call(this, baseOptions);\n\n this.setPreload(options.preload !== undefined ? options.preload : 0);\n this.setUseInterimTilesOnError(options.useInterimTilesOnError !== undefined ?\n options.useInterimTilesOnError : true);\n\n /**\n * The layer type.\n * @protected\n * @type {import(\"../LayerType.js\").default}\n */\n this.type = LayerType.TILE;\n\n }\n\n if ( Layer ) TileLayer.__proto__ = Layer;\n TileLayer.prototype = Object.create( Layer && Layer.prototype );\n TileLayer.prototype.constructor = TileLayer;\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 TileLayer.prototype.getPreload = function 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 TileLayer.prototype.setPreload = function 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 TileLayer.prototype.getUseInterimTilesOnError = function getUseInterimTilesOnError () {\n return /** @type {boolean} */ (this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR));\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 TileLayer.prototype.setUseInterimTilesOnError = function setUseInterimTilesOnError (useInterimTilesOnError) {\n this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n };\n\n return TileLayer;\n}(Layer));\n\n\n/**\n * Return the associated {@link module:ol/source/Tile tilesource} of the layer.\n * @function\n * @return {import(\"../source/Tile.js\").default} Source.\n * @api\n */\nTileLayer.prototype.getSource;\n\n\nexport default TileLayer;\n\n//# sourceMappingURL=Tile.js.map","/**\n * @module ol/reproj\n */\nimport {createCanvasContext2D} from './dom.js';\nimport {containsCoordinate, createEmpty, extend, getHeight, getTopLeft, getWidth} from './extent.js';\nimport {solveLinearSystem} from './math.js';\nimport {getPointResolution, transform} from './proj.js';\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(sourceProj, targetProj,\n targetCenter, targetResolution) {\n\n var sourceCenter = transform(targetCenter, targetProj, sourceProj);\n\n // calculate the ideal resolution of the source data\n var sourceResolution = getPointResolution(targetProj, targetResolution, targetCenter);\n\n var targetMetersPerUnit = targetProj.getMetersPerUnit();\n if (targetMetersPerUnit !== undefined) {\n sourceResolution *= targetMetersPerUnit;\n }\n var sourceMetersPerUnit = sourceProj.getMetersPerUnit();\n if (sourceMetersPerUnit !== undefined) {\n sourceResolution /= sourceMetersPerUnit;\n }\n\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 var sourceExtent = sourceProj.getExtent();\n if (!sourceExtent || containsCoordinate(sourceExtent, sourceCenter)) {\n var compensationFactor = getPointResolution(sourceProj, sourceResolution, sourceCenter) /\n sourceResolution;\n if (isFinite(compensationFactor) && compensationFactor > 0) {\n sourceResolution /= compensationFactor;\n }\n }\n\n return sourceResolution;\n}\n\n\n/**\n * Enlarge the clipping triangle point by 1 pixel to ensure the edges overlap\n * in order to mask gaps caused by antialiasing.\n *\n * @param {number} centroidX Centroid of the triangle (x coordinate in pixels).\n * @param {number} centroidY Centroid of the triangle (y coordinate in pixels).\n * @param {number} x X coordinate of the point (in pixels).\n * @param {number} y Y coordinate of the point (in pixels).\n * @return {import(\"./coordinate.js\").Coordinate} New point 1 px farther from the centroid.\n */\nfunction enlargeClipPoint(centroidX, centroidY, x, y) {\n var dX = x - centroidX;\n var dY = y - centroidY;\n var distance = Math.sqrt(dX * dX + dY * dY);\n return [Math.round(x + dX / distance), Math.round(y + dY / distance)];\n}\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 * @return {HTMLCanvasElement} Canvas with reprojected data.\n */\nexport function render(width, height, pixelRatio,\n sourceResolution, sourceExtent, targetResolution, targetExtent,\n triangulation, sources, gutter, opt_renderEdges) {\n\n var context = createCanvasContext2D(Math.round(pixelRatio * width),\n Math.round(pixelRatio * height));\n\n if (sources.length === 0) {\n return context.canvas;\n }\n\n context.scale(pixelRatio, pixelRatio);\n\n var sourceDataExtent = createEmpty();\n sources.forEach(function(src, i, arr) {\n extend(sourceDataExtent, src.extent);\n });\n\n var canvasWidthInUnits = getWidth(sourceDataExtent);\n var canvasHeightInUnits = getHeight(sourceDataExtent);\n var stitchContext = createCanvasContext2D(\n Math.round(pixelRatio * canvasWidthInUnits / sourceResolution),\n Math.round(pixelRatio * canvasHeightInUnits / sourceResolution));\n\n var stitchScale = pixelRatio / sourceResolution;\n\n sources.forEach(function(src, i, arr) {\n var xPos = src.extent[0] - sourceDataExtent[0];\n var yPos = -(src.extent[3] - sourceDataExtent[3]);\n var srcWidth = getWidth(src.extent);\n var srcHeight = getHeight(src.extent);\n\n stitchContext.drawImage(\n src.image,\n gutter, gutter,\n src.image.width - 2 * gutter, src.image.height - 2 * gutter,\n xPos * stitchScale, yPos * stitchScale,\n srcWidth * stitchScale, srcHeight * stitchScale);\n });\n\n var 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 var source = triangle.source;\n var target = triangle.target;\n var x0 = source[0][0], y0 = source[0][1];\n var x1 = source[1][0], y1 = source[1][1];\n var x2 = source[2][0], y2 = source[2][1];\n var u0 = (target[0][0] - targetTopLeft[0]) / targetResolution;\n var v0 = -(target[0][1] - targetTopLeft[1]) / targetResolution;\n var u1 = (target[1][0] - targetTopLeft[0]) / targetResolution;\n var v1 = -(target[1][1] - targetTopLeft[1]) / targetResolution;\n var u2 = (target[2][0] - targetTopLeft[0]) / targetResolution;\n var v2 = -(target[2][1] - targetTopLeft[1]) / targetResolution;\n\n // Shift all the source points to improve numerical stability\n // of all the subsequent calculations. The [x0, y0] is used here.\n // This is also used to simplify the linear system.\n var sourceNumericalShiftX = x0;\n var sourceNumericalShiftY = y0;\n x0 = 0;\n y0 = 0;\n x1 -= sourceNumericalShiftX;\n y1 -= sourceNumericalShiftY;\n x2 -= sourceNumericalShiftX;\n y2 -= sourceNumericalShiftY;\n\n var augmentedMatrix = [\n [x1, y1, 0, 0, u1 - u0],\n [x2, y2, 0, 0, u2 - u0],\n [0, 0, x1, y1, v1 - v0],\n [0, 0, x2, y2, v2 - v0]\n ];\n var affineCoefs = solveLinearSystem(augmentedMatrix);\n if (!affineCoefs) {\n return;\n }\n\n context.save();\n context.beginPath();\n var centroidX = (u0 + u1 + u2) / 3;\n var centroidY = (v0 + v1 + v2) / 3;\n var p0 = enlargeClipPoint(centroidX, centroidY, u0, v0);\n var p1 = enlargeClipPoint(centroidX, centroidY, u1, v1);\n var p2 = enlargeClipPoint(centroidX, centroidY, u2, v2);\n\n context.moveTo(p1[0], p1[1]);\n context.lineTo(p0[0], p0[1]);\n context.lineTo(p2[0], p2[1]);\n context.clip();\n\n context.transform(\n affineCoefs[0], affineCoefs[2], affineCoefs[1], affineCoefs[3], u0, v0);\n\n context.translate(sourceDataExtent[0] - sourceNumericalShiftX,\n sourceDataExtent[3] - sourceNumericalShiftY);\n\n context.scale(sourceResolution / pixelRatio,\n -sourceResolution / pixelRatio);\n\n context.drawImage(stitchContext.canvas, 0, 0);\n context.restore();\n });\n\n if (opt_renderEdges) {\n context.save();\n\n context.strokeStyle = 'black';\n context.lineWidth = 1;\n\n triangulation.getTriangles().forEach(function(triangle, i, arr) {\n var target = triangle.target;\n var u0 = (target[0][0] - targetTopLeft[0]) / targetResolution;\n var v0 = -(target[0][1] - targetTopLeft[1]) / targetResolution;\n var u1 = (target[1][0] - targetTopLeft[0]) / targetResolution;\n var v1 = -(target[1][1] - targetTopLeft[1]) / targetResolution;\n var u2 = (target[2][0] - targetTopLeft[0]) / targetResolution;\n var v2 = -(target[2][1] - targetTopLeft[1]) / targetResolution;\n\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//# sourceMappingURL=reproj.js.map","/**\n * @module ol/reproj/Triangulation\n */\nimport {boundingExtent, createEmpty, extendCoordinate, getBottomLeft, getBottomRight,\n getTopLeft, getTopRight, getWidth, intersects} from '../extent.js';\nimport {modulo} from '../math.js';\nimport {getTransform} from '../proj.js';\n\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/**\n * Maximum number of subdivision steps during raster reprojection triangulation.\n * Prevents high memory usage and large number of proj4 calls (for certain\n * transformations and areas). At most `2*(2^this)` triangles are created for\n * each triangulated extent (tile/image).\n * @type {number}\n */\nvar MAX_SUBDIVISION = 10;\n\n\n/**\n * Maximum allowed size of triangle relative to world width. When transforming\n * corners of world extent between certain projections, the resulting\n * triangulation seems to have zero error and no subdivision is performed. If\n * the triangle width is more than this (relative to world width; 0-1),\n * subdivison is forced (up to `MAX_SUBDIVISION`). Default is `0.25`.\n * @type {number}\n */\nvar MAX_TRIANGLE_WIDTH = 0.25;\n\n\n/**\n * @classdesc\n * Class containing triangulation of the given target extent.\n * Used for determining source data and the reprojection itself.\n */\nvar Triangulation = function Triangulation(sourceProj, targetProj, targetExtent, maxSourceExtent, errorThreshold) {\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 var transformInvCache = {};\n var 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 var 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_ = 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()) : null;\n\n /**\n * @type {?number}\n * @private\n */\n this.targetWorldWidth_ = this.targetProj_.getExtent() ?\n getWidth(this.targetProj_.getExtent()) : null;\n\n var destinationTopLeft = getTopLeft(targetExtent);\n var destinationTopRight = getTopRight(targetExtent);\n var destinationBottomRight = getBottomRight(targetExtent);\n var destinationBottomLeft = getBottomLeft(targetExtent);\n var sourceTopLeft = this.transformInv_(destinationTopLeft);\n var sourceTopRight = this.transformInv_(destinationTopRight);\n var sourceBottomRight = this.transformInv_(destinationBottomRight);\n var sourceBottomLeft = this.transformInv_(destinationBottomLeft);\n\n this.addQuad_(\n destinationTopLeft, destinationTopRight,\n destinationBottomRight, destinationBottomLeft,\n sourceTopLeft, sourceTopRight, sourceBottomRight, sourceBottomLeft,\n MAX_SUBDIVISION);\n\n if (this.wrapsXInSource_) {\n var leftBound = Infinity;\n this.triangles_.forEach(function(triangle, i, arr) {\n leftBound = Math.min(leftBound,\n triangle.source[0][0], triangle.source[1][0], triangle.source[2][0]);\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(function(triangle) {\n if (Math.max(triangle.source[0][0], triangle.source[1][0],\n triangle.source[2][0]) - leftBound > this.sourceWorldWidth_ / 2) {\n var newTriangle = [[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 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 var minX = Math.min(\n newTriangle[0][0], newTriangle[1][0], newTriangle[2][0]);\n var maxX = Math.max(\n newTriangle[0][0], newTriangle[1][0], newTriangle[2][0]);\n if ((maxX - minX) < this.sourceWorldWidth_ / 2) {\n triangle.source = newTriangle;\n }\n }\n }.bind(this));\n }\n\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 */\nTriangulation.prototype.addTriangle_ = function 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 */\nTriangulation.prototype.addQuad_ = function addQuad_ (a, b, c, d, aSrc, bSrc, cSrc, dSrc, maxSubdivision) {\n\n var sourceQuadExtent = boundingExtent([aSrc, bSrc, cSrc, dSrc]);\n var sourceCoverageX = this.sourceWorldWidth_ ?\n getWidth(sourceQuadExtent) / this.sourceWorldWidth_ : null;\n var 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 var wrapsX = this.sourceProj_.canWrapX() &&\n sourceCoverageX > 0.5 && sourceCoverageX < 1;\n\n var needsSubdivision = false;\n\n if (maxSubdivision > 0) {\n if (this.targetProj_.isGlobal() && this.targetWorldWidth_) {\n var targetQuadExtent = boundingExtent([a, b, c, d]);\n var targetCoverageX = getWidth(targetQuadExtent) / this.targetWorldWidth_;\n needsSubdivision = targetCoverageX > MAX_TRIANGLE_WIDTH ||\n needsSubdivision;\n }\n if (!wrapsX && this.sourceProj_.isGlobal() && sourceCoverageX) {\n needsSubdivision = sourceCoverageX > MAX_TRIANGLE_WIDTH ||\n needsSubdivision;\n }\n }\n\n if (!needsSubdivision && this.maxSourceExtent_) {\n if (!intersects(sourceQuadExtent, this.maxSourceExtent_)) {\n // whole quad outside source projection extent -> ignore\n return;\n }\n }\n\n if (!needsSubdivision) {\n if (!isFinite(aSrc[0]) || !isFinite(aSrc[1]) ||\n !isFinite(bSrc[0]) || !isFinite(bSrc[1]) ||\n !isFinite(cSrc[0]) || !isFinite(cSrc[1]) ||\n !isFinite(dSrc[0]) || !isFinite(dSrc[1])) {\n if (maxSubdivision > 0) {\n needsSubdivision = true;\n } else {\n return;\n }\n }\n }\n\n if (maxSubdivision > 0) {\n if (!needsSubdivision) {\n var center = [(a[0] + c[0]) / 2, (a[1] + c[1]) / 2];\n var centerSrc = this.transformInv_(center);\n\n var dx;\n if (wrapsX) {\n var centerSrcEstimX =\n (modulo(aSrc[0], sourceWorldWidth) +\n modulo(cSrc[0], sourceWorldWidth)) / 2;\n dx = centerSrcEstimX -\n modulo(centerSrc[0], sourceWorldWidth);\n } else {\n dx = (aSrc[0] + cSrc[0]) / 2 - centerSrc[0];\n }\n var dy = (aSrc[1] + cSrc[1]) / 2 - centerSrc[1];\n var centerSrcErrorSquared = dx * dx + dy * dy;\n needsSubdivision = centerSrcErrorSquared > this.errorThresholdSquared_;\n }\n if (needsSubdivision) {\n if (Math.abs(a[0] - c[0]) <= Math.abs(a[1] - c[1])) {\n // split horizontally (top & bottom)\n var bc = [(b[0] + c[0]) / 2, (b[1] + c[1]) / 2];\n var bcSrc = this.transformInv_(bc);\n var da = [(d[0] + a[0]) / 2, (d[1] + a[1]) / 2];\n var daSrc = this.transformInv_(da);\n\n this.addQuad_(\n a, b, bc, da, aSrc, bSrc, bcSrc, daSrc, maxSubdivision - 1);\n this.addQuad_(\n da, bc, c, d, daSrc, bcSrc, cSrc, dSrc, maxSubdivision - 1);\n } else {\n // split vertically (left & right)\n var ab = [(a[0] + b[0]) / 2, (a[1] + b[1]) / 2];\n var abSrc = this.transformInv_(ab);\n var cd = [(c[0] + d[0]) / 2, (c[1] + d[1]) / 2];\n var cdSrc = this.transformInv_(cd);\n\n this.addQuad_(\n a, ab, cd, d, aSrc, abSrc, cdSrc, dSrc, maxSubdivision - 1);\n this.addQuad_(\n ab, b, c, cd, abSrc, bSrc, cSrc, cdSrc, maxSubdivision - 1);\n }\n return;\n }\n }\n\n if (wrapsX) {\n if (!this.canWrapXInSource_) {\n return;\n }\n this.wrapsXInSource_ = true;\n }\n\n this.addTriangle_(a, c, d, aSrc, cSrc, dSrc);\n this.addTriangle_(a, b, c, aSrc, bSrc, cSrc);\n};\n\n/**\n * Calculates extent of the 'source' coordinates from all the triangles.\n *\n * @return {import(\"../extent.js\").Extent} Calculated extent.\n */\nTriangulation.prototype.calculateSourceExtent = function calculateSourceExtent () {\n var extent = createEmpty();\n\n this.triangles_.forEach(function(triangle, i, arr) {\n var src = triangle.source;\n extendCoordinate(extent, src[0]);\n extendCoordinate(extent, src[1]);\n extendCoordinate(extent, src[2]);\n });\n\n return extent;\n};\n\n/**\n * @return {Array<Triangle>} Array of the calculated triangles.\n */\nTriangulation.prototype.getTriangles = function getTriangles () {\n return this.triangles_;\n};\n\nexport default Triangulation;\n\n//# sourceMappingURL=Triangulation.js.map","/**\n * @module ol/reproj/Tile\n */\nimport {ERROR_THRESHOLD} from './common.js';\n\nimport Tile from '../Tile.js';\nimport TileState from '../TileState.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {getArea, getCenter, getIntersection} from '../extent.js';\nimport {clamp} from '../math.js';\nimport {calculateSourceResolution, render as renderReprojected} from '../reproj.js';\nimport Triangulation from './Triangulation.js';\n\n\n/**\n * @typedef {function(number, number, number, number) : import(\"../Tile.js\").default} FunctionType\n */\n\n\n/**\n * @classdesc\n * Class encapsulating single reprojected tile.\n * See {@link module:ol/source/TileImage~TileImage}.\n *\n */\nvar ReprojTile = /*@__PURE__*/(function (Tile) {\n function ReprojTile(\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 ) {\n Tile.call(this, 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 {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 var targetExtent = targetTileGrid.getTileCoordExtent(this.wrappedTileCoord_);\n var maxTargetExtent = this.targetTileGrid_.getExtent();\n var maxSourceExtent = this.sourceTileGrid_.getExtent();\n\n var limitedTargetExtent = maxTargetExtent ?\n getIntersection(targetExtent, maxTargetExtent) : 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 var sourceProjExtent = sourceProj.getExtent();\n if (sourceProjExtent) {\n if (!maxSourceExtent) {\n maxSourceExtent = sourceProjExtent;\n } else {\n maxSourceExtent = getIntersection(maxSourceExtent, sourceProjExtent);\n }\n }\n\n var targetResolution = targetTileGrid.getResolution(\n this.wrappedTileCoord_[0]);\n\n var targetCenter = getCenter(limitedTargetExtent);\n var sourceResolution = calculateSourceResolution(\n sourceProj, targetProj, targetCenter, targetResolution);\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 var errorThresholdInPixels = opt_errorThreshold !== undefined ?\n opt_errorThreshold : ERROR_THRESHOLD;\n\n /**\n * @private\n * @type {!import(\"./Triangulation.js\").default}\n */\n this.triangulation_ = new Triangulation(\n sourceProj, targetProj, limitedTargetExtent, maxSourceExtent,\n sourceResolution * errorThresholdInPixels);\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 var sourceExtent = this.triangulation_.calculateSourceExtent();\n\n if (maxSourceExtent) {\n if (sourceProj.canWrapX()) {\n sourceExtent[1] = clamp(\n sourceExtent[1], maxSourceExtent[1], maxSourceExtent[3]);\n sourceExtent[3] = clamp(\n sourceExtent[3], maxSourceExtent[1], maxSourceExtent[3]);\n } else {\n sourceExtent = getIntersection(sourceExtent, maxSourceExtent);\n }\n }\n\n if (!getArea(sourceExtent)) {\n this.state = TileState.EMPTY;\n } else {\n var sourceRange = sourceTileGrid.getTileRangeForExtentAndZ(\n sourceExtent, this.sourceZ_);\n\n for (var srcX = sourceRange.minX; srcX <= sourceRange.maxX; srcX++) {\n for (var srcY = sourceRange.minY; srcY <= sourceRange.maxY; srcY++) {\n var tile = getTileFunction(this.sourceZ_, srcX, srcY, pixelRatio);\n if (tile) {\n this.sourceTiles_.push(tile);\n }\n }\n }\n\n if (this.sourceTiles_.length === 0) {\n this.state = TileState.EMPTY;\n }\n }\n }\n\n if ( Tile ) ReprojTile.__proto__ = Tile;\n ReprojTile.prototype = Object.create( Tile && Tile.prototype );\n ReprojTile.prototype.constructor = ReprojTile;\n\n /**\n * @inheritDoc\n */\n ReprojTile.prototype.disposeInternal = function disposeInternal () {\n if (this.state == TileState.LOADING) {\n this.unlistenSources_();\n }\n Tile.prototype.disposeInternal.call(this);\n };\n\n /**\n * Get the HTML Canvas element for this tile.\n * @return {HTMLCanvasElement} Canvas.\n */\n ReprojTile.prototype.getImage = function getImage () {\n return this.canvas_;\n };\n\n /**\n * @private\n */\n ReprojTile.prototype.reproject_ = function reproject_ () {\n var sources = [];\n this.sourceTiles_.forEach(function(tile, i, arr) {\n if (tile && tile.getState() == TileState.LOADED) {\n sources.push({\n extent: this.sourceTileGrid_.getTileCoordExtent(tile.tileCoord),\n image: tile.getImage()\n });\n }\n }.bind(this));\n this.sourceTiles_.length = 0;\n\n if (sources.length === 0) {\n this.state = TileState.ERROR;\n } else {\n var z = this.wrappedTileCoord_[0];\n var size = this.targetTileGrid_.getTileSize(z);\n var width = typeof size === 'number' ? size : size[0];\n var height = typeof size === 'number' ? size : size[1];\n var targetResolution = this.targetTileGrid_.getResolution(z);\n var sourceResolution = this.sourceTileGrid_.getResolution(this.sourceZ_);\n\n var targetExtent = this.targetTileGrid_.getTileCoordExtent(\n this.wrappedTileCoord_);\n this.canvas_ = renderReprojected(width, height, this.pixelRatio_,\n sourceResolution, this.sourceTileGrid_.getExtent(),\n targetResolution, targetExtent, this.triangulation_, sources,\n this.gutter_, this.renderEdges_);\n\n this.state = TileState.LOADED;\n }\n this.changed();\n };\n\n /**\n * @inheritDoc\n */\n ReprojTile.prototype.load = function load () {\n if (this.state == TileState.IDLE) {\n this.state = TileState.LOADING;\n this.changed();\n\n var leftToLoad = 0;\n\n this.sourcesListenerKeys_ = [];\n this.sourceTiles_.forEach(function(tile, i, arr) {\n var state = tile.getState();\n if (state == TileState.IDLE || state == TileState.LOADING) {\n leftToLoad++;\n\n var sourceListenKey = listen(tile, EventType.CHANGE,\n function(e) {\n var state = tile.getState();\n if (state == TileState.LOADED ||\n state == TileState.ERROR ||\n state == TileState.EMPTY) {\n unlistenByKey(sourceListenKey);\n leftToLoad--;\n if (leftToLoad === 0) {\n this.unlistenSources_();\n this.reproject_();\n }\n }\n }, this);\n this.sourcesListenerKeys_.push(sourceListenKey);\n }\n }.bind(this));\n\n this.sourceTiles_.forEach(function(tile, i, arr) {\n var state = tile.getState();\n if (state == TileState.IDLE) {\n tile.load();\n }\n });\n\n if (leftToLoad === 0) {\n setTimeout(this.reproject_.bind(this), 0);\n }\n }\n };\n\n /**\n * @private\n */\n ReprojTile.prototype.unlistenSources_ = function unlistenSources_ () {\n this.sourcesListenerKeys_.forEach(unlistenByKey);\n this.sourcesListenerKeys_ = null;\n };\n\n return ReprojTile;\n}(Tile));\n\n\nexport default ReprojTile;\n\n//# sourceMappingURL=Tile.js.map","/**\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/**\n * @param {string} template Template.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTemplate(template, tileGrid) {\n var zRegEx = /\\{z\\}/g;\n var xRegEx = /\\{x\\}/g;\n var yRegEx = /\\{y\\}/g;\n var dashYRegEx = /\\{-y\\}/g;\n return (\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {string|undefined} Tile URL.\n */\n function(tileCoord, pixelRatio, projection) {\n if (!tileCoord) {\n return undefined;\n } else {\n return template.replace(zRegEx, tileCoord[0].toString())\n .replace(xRegEx, tileCoord[1].toString())\n .replace(yRegEx, function() {\n var y = -tileCoord[2] - 1;\n return y.toString();\n })\n .replace(dashYRegEx, function() {\n var z = tileCoord[0];\n var range = tileGrid.getFullTileRange(z);\n assert(range, 55); // The {-y} placeholder requires a tile grid with extent\n var y = range.getHeight() + tileCoord[2];\n return y.toString();\n });\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 var len = templates.length;\n var tileUrlFunctions = new Array(len);\n for (var i = 0; i < len; ++i) {\n tileUrlFunctions[i] = createFromTemplate(templates[i], tileGrid);\n }\n return createFromTileUrlFunctions(tileUrlFunctions);\n}\n\n\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 var h = tileCoordHash(tileCoord);\n var index = modulo(h, tileUrlFunctions.length);\n return tileUrlFunctions[index](tileCoord, pixelRatio, projection);\n }\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/**\n * @param {string} url URL.\n * @return {Array<string>} Array of urls.\n */\nexport function expandUrl(url) {\n var urls = [];\n var match = /\\{([a-z])-([a-z])\\}/.exec(url);\n if (match) {\n // char range\n var startCharCode = match[1].charCodeAt(0);\n var stopCharCode = match[2].charCodeAt(0);\n var charCode;\n for (charCode = startCharCode; charCode <= stopCharCode; ++charCode) {\n urls.push(url.replace(match[0], String.fromCharCode(charCode)));\n }\n return urls;\n }\n match = match = /\\{(\\d+)-(\\d+)\\}/.exec(url);\n if (match) {\n // number range\n var stop = parseInt(match[2], 10);\n for (var 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//# sourceMappingURL=tileurlfunction.js.map","/**\n * @module ol/source/TileEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n\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\n//# sourceMappingURL=TileEventType.js.map","/**\n * @module ol/source/UrlTile\n */\nimport {getUid} from '../util.js';\nimport TileState from '../TileState.js';\nimport {expandUrl, createFromTemplates, nullTileUrlFunction} from '../tileurlfunction.js';\nimport TileSource, {TileSourceEvent} from './Tile.js';\nimport TileEventType from './TileEventType.js';\nimport {getKeyZXY} from '../tilecoord.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]\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 */\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 */\nvar UrlTile = /*@__PURE__*/(function (TileSource) {\n function UrlTile(options) {\n\n TileSource.call(this, {\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n opaque: options.opaque,\n projection: options.projection,\n state: options.state,\n tileGrid: options.tileGrid,\n tilePixelRatio: options.tilePixelRatio,\n wrapX: options.wrapX,\n transition: options.transition,\n key: options.key,\n attributionsCollapsible: options.attributionsCollapsible\n });\n\n /**\n * @private\n * @type {boolean}\n */\n this.generateTileUrlFunction_ = !options.tileUrlFunction;\n\n /**\n * @protected\n * @type {import(\"../Tile.js\").LoadFunction}\n */\n this.tileLoadFunction = options.tileLoadFunction;\n\n /**\n * @protected\n * @type {import(\"../Tile.js\").UrlFunction}\n */\n this.tileUrlFunction = options.tileUrlFunction ? options.tileUrlFunction.bind(this) : nullTileUrlFunction;\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 if (options.tileUrlFunction) {\n this.setTileUrlFunction(options.tileUrlFunction, this.key_);\n }\n\n /**\n * @private\n * @type {!Object<string, boolean>}\n */\n this.tileLoadingKeys_ = {};\n\n }\n\n if ( TileSource ) UrlTile.__proto__ = TileSource;\n UrlTile.prototype = Object.create( TileSource && TileSource.prototype );\n UrlTile.prototype.constructor = UrlTile;\n\n /**\n * Return the tile load function of the source.\n * @return {import(\"../Tile.js\").LoadFunction} TileLoadFunction\n * @api\n */\n UrlTile.prototype.getTileLoadFunction = function 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 UrlTile.prototype.getTileUrlFunction = function getTileUrlFunction () {\n return 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 UrlTile.prototype.getUrls = function 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 UrlTile.prototype.handleTileChange = function handleTileChange (event) {\n var tile = /** @type {import(\"../Tile.js\").default} */ (event.target);\n var uid = getUid(tile);\n var tileState = tile.getState();\n var type;\n if (tileState == TileState.LOADING) {\n this.tileLoadingKeys_[uid] = true;\n type = TileEventType.TILELOADSTART;\n } else if (uid in this.tileLoadingKeys_) {\n delete this.tileLoadingKeys_[uid];\n type = tileState == TileState.ERROR ? TileEventType.TILELOADERROR :\n (tileState == TileState.LOADED || tileState == TileState.ABORT) ?\n TileEventType.TILELOADEND : 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 UrlTile.prototype.setTileLoadFunction = function 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 UrlTile.prototype.setTileUrlFunction = function 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 UrlTile.prototype.setUrl = function setUrl (url) {\n var urls = this.urls = expandUrl(url);\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 UrlTile.prototype.setUrls = function setUrls (urls) {\n this.urls = urls;\n var 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 * @inheritDoc\n */\n UrlTile.prototype.useTile = function useTile (z, x, y) {\n var tileCoordKey = getKeyZXY(z, x, y);\n if (this.tileCache.containsKey(tileCoordKey)) {\n this.tileCache.get(tileCoordKey);\n }\n };\n\n return UrlTile;\n}(TileSource));\n\n\nexport default UrlTile;\n\n//# sourceMappingURL=UrlTile.js.map","/**\n * @module ol/source/TileImage\n */\nimport {ENABLE_RASTER_REPROJECTION} from '../reproj/common.js';\nimport {getUid} from '../util.js';\nimport ImageTile from '../ImageTile.js';\nimport TileCache from '../TileCache.js';\nimport TileState from '../TileState.js';\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {equivalent, get as getProjection} from '../proj.js';\nimport ReprojTile from '../reproj/Tile.js';\nimport UrlTile from './UrlTile.js';\nimport {getKey, getKeyZXY} from '../tilecoord.js';\nimport {getForProjection as getTileGridForProjection} 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=2048] Cache size.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to\n * access pixel data with the Canvas renderer. See\n * https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [opaque=true] Whether the layer is opaque.\n * @property {import(\"../proj.js\").ProjectionLike} projection 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 */\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 */\nvar TileImage = /*@__PURE__*/(function (UrlTile) {\n function TileImage(options) {\n\n UrlTile.call(this, {\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n opaque: options.opaque,\n projection: options.projection,\n state: options.state,\n tileGrid: options.tileGrid,\n tileLoadFunction: options.tileLoadFunction ?\n options.tileLoadFunction : 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 });\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 = options.tileClass !== undefined ?\n 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 {boolean}\n */\n this.renderReprojectionEdges_ = false;\n }\n\n if ( UrlTile ) TileImage.__proto__ = UrlTile;\n TileImage.prototype = Object.create( UrlTile && UrlTile.prototype );\n TileImage.prototype.constructor = TileImage;\n\n /**\n * @inheritDoc\n */\n TileImage.prototype.canExpireCache = function canExpireCache () {\n if (!ENABLE_RASTER_REPROJECTION) {\n return UrlTile.prototype.canExpireCache.call(this);\n }\n if (this.tileCache.canExpireCache()) {\n return true;\n } else {\n for (var key in this.tileCacheForProjection) {\n if (this.tileCacheForProjection[key].canExpireCache()) {\n return true;\n }\n }\n }\n return false;\n };\n\n /**\n * @inheritDoc\n */\n TileImage.prototype.expireCache = function expireCache (projection, usedTiles) {\n if (!ENABLE_RASTER_REPROJECTION) {\n UrlTile.prototype.expireCache.call(this, projection, usedTiles);\n return;\n }\n var usedTileCache = this.getTileCacheForProjection(projection);\n\n this.tileCache.expireCache(this.tileCache == usedTileCache ? usedTiles : {});\n for (var id in this.tileCacheForProjection) {\n var tileCache = this.tileCacheForProjection[id];\n tileCache.expireCache(tileCache == usedTileCache ? usedTiles : {});\n }\n };\n\n /**\n * @inheritDoc\n */\n TileImage.prototype.getGutterForProjection = function getGutterForProjection (projection) {\n if (ENABLE_RASTER_REPROJECTION &&\n this.getProjection() && projection && !equivalent(this.getProjection(), projection)) {\n return 0;\n } else {\n return this.getGutter();\n }\n };\n\n /**\n * @return {number} Gutter.\n */\n TileImage.prototype.getGutter = function getGutter () {\n return 0;\n };\n\n /**\n * @inheritDoc\n */\n TileImage.prototype.getOpaque = function getOpaque (projection) {\n if (ENABLE_RASTER_REPROJECTION &&\n this.getProjection() && projection && !equivalent(this.getProjection(), projection)) {\n return false;\n } else {\n return UrlTile.prototype.getOpaque.call(this, projection);\n }\n };\n\n /**\n * @inheritDoc\n */\n TileImage.prototype.getTileGridForProjection = function getTileGridForProjection$1 (projection) {\n if (!ENABLE_RASTER_REPROJECTION) {\n return UrlTile.prototype.getTileGridForProjection.call(this, projection);\n }\n var thisProj = this.getProjection();\n if (this.tileGrid && (!thisProj || equivalent(thisProj, projection))) {\n return this.tileGrid;\n } else {\n var projKey = getUid(projection);\n if (!(projKey in this.tileGridForProjection)) {\n this.tileGridForProjection[projKey] = getTileGridForProjection(projection);\n }\n return (\n /** @type {!import(\"../tilegrid/TileGrid.js\").default} */ (this.tileGridForProjection[projKey])\n );\n }\n };\n\n /**\n * @inheritDoc\n */\n TileImage.prototype.getTileCacheForProjection = function getTileCacheForProjection (projection) {\n if (!ENABLE_RASTER_REPROJECTION) {\n return UrlTile.prototype.getTileCacheForProjection.call(this, projection);\n }\n var thisProj = this.getProjection(); if (!thisProj || equivalent(thisProj, projection)) {\n return this.tileCache;\n } else {\n var projKey = getUid(projection);\n if (!(projKey in this.tileCacheForProjection)) {\n this.tileCacheForProjection[projKey] = new TileCache(this.tileCache.highWaterMark);\n }\n return this.tileCacheForProjection[projKey];\n }\n };\n\n /**\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {string} key The key set on the tile.\n * @return {!import(\"../Tile.js\").default} Tile.\n * @private\n */\n TileImage.prototype.createTile_ = function createTile_ (z, x, y, pixelRatio, projection, key) {\n var tileCoord = [z, x, y];\n var urlTileCoord = this.getTileCoordForTileUrlFunction(\n tileCoord, projection);\n var tileUrl = urlTileCoord ?\n this.tileUrlFunction(urlTileCoord, pixelRatio, projection) : undefined;\n var 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 tile.key = key;\n listen(tile, EventType.CHANGE,\n this.handleTileChange, this);\n return tile;\n };\n\n /**\n * @inheritDoc\n */\n TileImage.prototype.getTile = function getTile (z, x, y, pixelRatio, projection) {\n var sourceProjection = /** @type {!import(\"../proj/Projection.js\").default} */ (this.getProjection());\n if (!ENABLE_RASTER_REPROJECTION ||\n !sourceProjection || !projection || equivalent(sourceProjection, projection)) {\n return this.getTileInternal(z, x, y, pixelRatio, sourceProjection || projection);\n } else {\n var cache = this.getTileCacheForProjection(projection);\n var tileCoord = [z, x, y];\n var tile;\n var tileCoordKey = getKey(tileCoord);\n if (cache.containsKey(tileCoordKey)) {\n tile = /** @type {!import(\"../Tile.js\").default} */ (cache.get(tileCoordKey));\n }\n var key = this.getKey();\n if (tile && tile.key == key) {\n return tile;\n } else {\n var sourceTileGrid = this.getTileGridForProjection(sourceProjection);\n var targetTileGrid = this.getTileGridForProjection(projection);\n var wrappedTileCoord =\n this.getTileCoordForTileUrlFunction(tileCoord, projection);\n var newTile = new ReprojTile(\n sourceProjection, sourceTileGrid,\n projection, targetTileGrid,\n tileCoord, wrappedTileCoord, this.getTilePixelRatio(pixelRatio),\n this.getGutter(),\n function(z, x, y, pixelRatio) {\n return this.getTileInternal(z, x, y, pixelRatio, sourceProjection);\n }.bind(this), this.reprojectionErrorThreshold_,\n this.renderReprojectionEdges_);\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 TileImage.prototype.getTileInternal = function getTileInternal (z, x, y, pixelRatio, projection) {\n var tile = null;\n var tileCoordKey = getKeyZXY(z, x, y);\n var key = this.getKey();\n if (!this.tileCache.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 var 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 TileImage.prototype.setRenderReprojectionEdges = function setRenderReprojectionEdges (render) {\n if (!ENABLE_RASTER_REPROJECTION ||\n this.renderReprojectionEdges_ == render) {\n return;\n }\n this.renderReprojectionEdges_ = render;\n for (var id in this.tileCacheForProjection) {\n this.tileCacheForProjection[id].clear();\n }\n this.changed();\n };\n\n /**\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 TileImage.prototype.setTileGridForProjection = function setTileGridForProjection (projection, tilegrid) {\n if (ENABLE_RASTER_REPROJECTION) {\n var proj = getProjection(projection);\n if (proj) {\n var projKey = getUid(proj);\n if (!(projKey in this.tileGridForProjection)) {\n this.tileGridForProjection[projKey] = tilegrid;\n }\n }\n }\n };\n\n return TileImage;\n}(UrlTile));\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//# sourceMappingURL=TileImage.js.map","/**\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=2048] Cache size.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to\n * access pixel data with the Canvas renderer. See\n * https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [opaque=true] 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=18] Optional max zoom level.\n * @property {number} [minZoom=0] Optional min zoom level.\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 * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Optional function to get\n * tile URL given a tile coordinate and the projection.\n * Required if url or urls are not provided.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`,\n * and `{z}` placeholders. A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`,\n * may be used instead of defining each one separately in the `urls` option.\n * @property {Array<string>} [urls] An array of URL templates.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n */\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 * {@link module:ol/source/TileImage} can be used with a `tileUrlFunction`\n * such as:\n *\n * tileUrlFunction: function(coordinate) {\n * return 'http://mapserver.com/' + coordinate[0] + '/' +\n * coordinate[1] + '/' + coordinate[2] + '.png';\n * }\n *\n * @api\n */\nvar XYZ = /*@__PURE__*/(function (TileImage) {\n function XYZ(opt_options) {\n var options = opt_options || {};\n var projection = options.projection !== undefined ?\n options.projection : 'EPSG:3857';\n\n var tileGrid = options.tileGrid !== undefined ? options.tileGrid :\n createXYZ({\n extent: extentFromProjection(projection),\n maxZoom: options.maxZoom,\n minZoom: options.minZoom,\n tileSize: options.tileSize\n });\n\n TileImage.call(this, {\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n crossOrigin: options.crossOrigin,\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 });\n\n }\n\n if ( TileImage ) XYZ.__proto__ = TileImage;\n XYZ.prototype = Object.create( TileImage && TileImage.prototype );\n XYZ.prototype.constructor = XYZ;\n\n return XYZ;\n}(TileImage));\n\nexport default XYZ;\n\n//# sourceMappingURL=XYZ.js.map","/**\n * @module ol/source/OSM\n */\n\nimport XYZ from './XYZ.js';\n\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 var ATTRIBUTION = '&#169; ' +\n '<a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> ' +\n 'contributors.';\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize=2048] Cache size.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to\n * access pixel data with the Canvas renderer. See\n * https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {number} [maxZoom=19] Max zoom.\n * @property {boolean} [opaque=true] Whether the layer is opaque.\n * @property {number} [reprojectionErrorThreshold=1.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {string} [url='https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png'] URL template.\n * Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n */\n\n\n/**\n * @classdesc\n * Layer source for the OpenStreetMap tile server.\n * @api\n */\nvar OSM = /*@__PURE__*/(function (XYZ) {\n function OSM(opt_options) {\n\n var options = opt_options || {};\n\n var attributions;\n if (options.attributions !== undefined) {\n attributions = options.attributions;\n } else {\n attributions = [ATTRIBUTION];\n }\n\n var crossOrigin = options.crossOrigin !== undefined ?\n options.crossOrigin : 'anonymous';\n\n var url = options.url !== undefined ?\n options.url : 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png';\n\n XYZ.call(this, {\n attributions: attributions,\n cacheSize: options.cacheSize,\n crossOrigin: crossOrigin,\n opaque: options.opaque !== undefined ? options.opaque : true,\n maxZoom: options.maxZoom !== undefined ? options.maxZoom : 19,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n tileLoadFunction: options.tileLoadFunction,\n url: url,\n wrapX: options.wrapX,\n attributionsCollapsible: false\n });\n\n }\n\n if ( XYZ ) OSM.__proto__ = XYZ;\n OSM.prototype = Object.create( XYZ && XYZ.prototype );\n OSM.prototype.constructor = OSM;\n\n return OSM;\n}(XYZ));\n\nexport default OSM;\n\n//# sourceMappingURL=OSM.js.map","/**\n * @module ol/format/Feature\n */\nimport {assign} from '../obj.js';\nimport {abstract} from '../util.js';\nimport {get as getProjection, equivalent as equivalentProjection, transformExtent} from '../proj.js';\n\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 of the tile being read. This is only used and\n * required for {@link module:ol/format/MVT}.\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/**\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/**\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 * {FeatureFormat} subclasses provide the ability to decode and encode\n * {@link module:ol/Feature~Feature} objects from a variety of commonly used geospatial\n * file formats. See the documentation for each format for more details.\n *\n * @abstract\n * @api\n */\nvar FeatureFormat = function FeatureFormat() {\n\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/**\n * Adds the data projection to the read options.\n * @param {Document|Node|Object|string} source Source.\n * @param {ReadOptions=} opt_options Options.\n * @return {ReadOptions|undefined} Options.\n * @protected\n */\nFeatureFormat.prototype.getReadOptions = function getReadOptions (source, opt_options) {\n var options;\n if (opt_options) {\n options = {\n dataProjection: opt_options.dataProjection ?\n opt_options.dataProjection : this.readProjection(source),\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 */\nFeatureFormat.prototype.adaptOptions = function adaptOptions (options) {\n return assign({\n dataProjection: this.dataProjection,\n featureProjection: this.defaultFeatureProjection\n }, options);\n};\n\n/**\n * Get the extent from the source of the last {@link readFeatures} call.\n * @return {import(\"../extent.js\").Extent} Tile extent.\n */\nFeatureFormat.prototype.getLastExtent = function getLastExtent () {\n return null;\n};\n\n/**\n * @abstract\n * @return {import(\"./FormatType.js\").default} Format.\n */\nFeatureFormat.prototype.getType = function getType () {\n return abstract();\n};\n\n/**\n * Read a single feature from a source.\n *\n * @abstract\n * @param {Document|Node|Object|string} source Source.\n * @param {ReadOptions=} opt_options Read options.\n * @return {import(\"../Feature.js\").FeatureLike} Feature.\n */\nFeatureFormat.prototype.readFeature = function readFeature (source, opt_options) {\n return abstract();\n};\n\n/**\n * Read all features from a source.\n *\n * @abstract\n * @param {Document|Node|ArrayBuffer|Object|string} source Source.\n * @param {ReadOptions=} opt_options Read options.\n * @return {Array<import(\"../Feature.js\").FeatureLike>} Features.\n */\nFeatureFormat.prototype.readFeatures = function readFeatures (source, opt_options) {\n return abstract();\n};\n\n/**\n * Read a single geometry from a source.\n *\n * @abstract\n * @param {Document|Node|Object|string} source Source.\n * @param {ReadOptions=} opt_options Read options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\nFeatureFormat.prototype.readGeometry = function readGeometry (source, opt_options) {\n return abstract();\n};\n\n/**\n * Read the projection from a source.\n *\n * @abstract\n * @param {Document|Node|Object|string} source Source.\n * @return {import(\"../proj/Projection.js\").default} Projection.\n */\nFeatureFormat.prototype.readProjection = function 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 */\nFeatureFormat.prototype.writeFeature = function 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 */\nFeatureFormat.prototype.writeFeatures = function 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 */\nFeatureFormat.prototype.writeGeometry = function writeGeometry (geometry, opt_options) {\n return abstract();\n};\n\nexport default FeatureFormat;\n\n/**\n * @param {import(\"../geom/Geometry.js\").default|import(\"../extent.js\").Extent} 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|import(\"../extent.js\").Extent} Transformed geometry.\n */\nexport function transformWithOptions(geometry, write, opt_options) {\n var featureProjection = opt_options ?\n getProjection(opt_options.featureProjection) : null;\n var dataProjection = opt_options ?\n getProjection(opt_options.dataProjection) : null;\n /**\n * @type {import(\"../geom/Geometry.js\").default|import(\"../extent.js\").Extent}\n */\n var transformed;\n if (featureProjection && dataProjection &&\n !equivalentProjection(featureProjection, dataProjection)) {\n if (Array.isArray(geometry)) {\n // FIXME this is necessary because GML treats extents\n // as geometries\n transformed = transformExtent(\n geometry,\n dataProjection,\n featureProjection);\n } else {\n transformed = (write ? /** @type {import(\"../geom/Geometry\").default} */ (geometry).clone() : geometry).transform(\n write ? featureProjection : dataProjection,\n write ? dataProjection : featureProjection);\n }\n } else {\n transformed = geometry;\n }\n if (write && opt_options && /** @type {WriteOptions} */ (opt_options).decimals !== undefined &&\n !Array.isArray(transformed)) {\n var power = Math.pow(10, /** @type {WriteOptions} */ (opt_options).decimals);\n // if decimals option on write, round each coordinate appropriately\n /**\n * @param {Array<number>} coordinates Coordinates.\n * @return {Array<number>} Transformed coordinates.\n */\n var transform = function(coordinates) {\n for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n coordinates[i] = Math.round(coordinates[i] * power) / power;\n }\n return coordinates;\n };\n if (transformed === geometry) {\n transformed = /** @type {import(\"../geom/Geometry\").default} */ (geometry).clone();\n }\n transformed.applyTransform(transform);\n }\n return transformed;\n}\n\n//# sourceMappingURL=Feature.js.map","/**\n * @module ol/xml\n */\nimport {extend} from './array.js';\n\n\n/**\n * When using {@link module:ol/xml~makeChildAppender} or\n * {@link module:ol/xml~makeSimpleNodeFactory}, the top `objectStack` item needs\n * to have this structure.\n * @typedef {Object} NodeStackItem\n * @property {Node} node\n */\n\n\n/**\n * @typedef {function(Element, Array<*>)} Parser\n */\n\n\n/**\n * @typedef {function(Element, *, Array<*>)} Serializer\n */\n\n\n/**\n * This document should be used when creating nodes for XML serializations. This\n * document is also used by {@link module:ol/xml~createElementNS}\n * @const\n * @type {Document}\n */\nexport var DOCUMENT = document.implementation.createDocument('', '', null);\n\n\n/**\n * @type {string}\n */\nexport var XML_SCHEMA_INSTANCE_URI = 'http://www.w3.org/2001/XMLSchema-instance';\n\n\n/**\n * @param {string} namespaceURI Namespace URI.\n * @param {string} qualifiedName Qualified name.\n * @return {Element} Node.\n */\nexport function createElementNS(namespaceURI, qualifiedName) {\n return DOCUMENT.createElementNS(namespaceURI, qualifiedName);\n}\n\n\n/**\n * Recursively grab all text content of child nodes into a single string.\n * @param {Node} node Node.\n * @param {boolean} normalizeWhitespace Normalize whitespace: remove all line\n * breaks.\n * @return {string} All text content.\n * @api\n */\nexport function getAllTextContent(node, normalizeWhitespace) {\n return getAllTextContent_(node, normalizeWhitespace, []).join('');\n}\n\n\n/**\n * Recursively grab all text content of child nodes into a single string.\n * @param {Node} node Node.\n * @param {boolean} normalizeWhitespace Normalize whitespace: remove all line\n * breaks.\n * @param {Array<string>} accumulator Accumulator.\n * @private\n * @return {Array<string>} Accumulator.\n */\nexport function getAllTextContent_(node, normalizeWhitespace, accumulator) {\n if (node.nodeType == Node.CDATA_SECTION_NODE ||\n node.nodeType == Node.TEXT_NODE) {\n if (normalizeWhitespace) {\n accumulator.push(String(node.nodeValue).replace(/(\\r\\n|\\r|\\n)/g, ''));\n } else {\n accumulator.push(node.nodeValue);\n }\n } else {\n var n;\n for (n = node.firstChild; n; n = n.nextSibling) {\n getAllTextContent_(n, normalizeWhitespace, accumulator);\n }\n }\n return accumulator;\n}\n\n\n/**\n * @param {Object} object Object.\n * @return {boolean} Is a document.\n */\nexport function isDocument(object) {\n return 'documentElement' in object;\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {?string} namespaceURI Namespace URI.\n * @param {string} name Attribute name.\n * @return {string} Value\n */\nexport function getAttributeNS(node, namespaceURI, name) {\n return node.getAttributeNS(namespaceURI, name) || '';\n}\n\n\n/**\n * Parse an XML string to an XML Document.\n * @param {string} xml XML.\n * @return {Document} Document.\n * @api\n */\nexport function parse(xml) {\n return new DOMParser().parseFromString(xml, 'application/xml');\n}\n\n\n/**\n * Make an array extender function for extending the array at the top of the\n * object stack.\n * @param {function(this: T, Node, Array<*>): (Array<*>|undefined)} valueReader Value reader.\n * @param {T=} opt_this The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeArrayExtender(valueReader, opt_this) {\n return (\n /**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\n function(node, objectStack) {\n var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n if (value !== undefined) {\n var array = /** @type {Array<*>} */ (objectStack[objectStack.length - 1]);\n extend(array, value);\n }\n }\n );\n}\n\n\n/**\n * Make an array pusher function for pushing to the array at the top of the\n * object stack.\n * @param {function(this: T, Element, Array<*>): *} valueReader Value reader.\n * @param {T=} opt_this The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeArrayPusher(valueReader, opt_this) {\n return (\n /**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\n function(node, objectStack) {\n var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n if (value !== undefined) {\n var array = /** @type {Array<*>} */ (objectStack[objectStack.length - 1]);\n array.push(value);\n }\n });\n}\n\n\n/**\n * Make an object stack replacer function for replacing the object at the\n * top of the stack.\n * @param {function(this: T, Node, Array<*>): *} valueReader Value reader.\n * @param {T=} opt_this The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeReplacer(valueReader, opt_this) {\n return (\n /**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\n function(node, objectStack) {\n var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n if (value !== undefined) {\n objectStack[objectStack.length - 1] = value;\n }\n });\n}\n\n\n/**\n * Make an object property pusher function for adding a property to the\n * object at the top of the stack.\n * @param {function(this: T, Element, Array<*>): *} valueReader Value reader.\n * @param {string=} opt_property Property.\n * @param {T=} opt_this The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeObjectPropertyPusher(valueReader, opt_property, opt_this) {\n return (\n /**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\n function(node, objectStack) {\n var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n if (value !== undefined) {\n var object = /** @type {!Object} */ (objectStack[objectStack.length - 1]);\n var property = opt_property !== undefined ? opt_property : node.localName;\n var array;\n if (property in object) {\n array = object[property];\n } else {\n array = object[property] = [];\n }\n array.push(value);\n }\n });\n}\n\n\n/**\n * Make an object property setter function.\n * @param {function(this: T, Element, Array<*>): *} valueReader Value reader.\n * @param {string=} opt_property Property.\n * @param {T=} opt_this The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeObjectPropertySetter(valueReader, opt_property, opt_this) {\n return (\n /**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\n function(node, objectStack) {\n var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n if (value !== undefined) {\n var object = /** @type {!Object} */ (objectStack[objectStack.length - 1]);\n var property = opt_property !== undefined ? opt_property : node.localName;\n object[property] = value;\n }\n });\n}\n\n\n/**\n * Create a serializer that appends nodes written by its `nodeWriter` to its\n * designated parent. The parent is the `node` of the\n * {@link module:ol/xml~NodeStackItem} at the top of the `objectStack`.\n * @param {function(this: T, Node, V, Array<*>)} nodeWriter Node writer.\n * @param {T=} opt_this The object to use as `this` in `nodeWriter`.\n * @return {Serializer} Serializer.\n * @template T, V\n */\nexport function makeChildAppender(nodeWriter, opt_this) {\n return function(node, value, objectStack) {\n nodeWriter.call(opt_this !== undefined ? opt_this : this, node, value, objectStack);\n var parent = /** @type {NodeStackItem} */ (objectStack[objectStack.length - 1]);\n var parentNode = parent.node;\n parentNode.appendChild(node);\n };\n}\n\n\n/**\n * Create a serializer that calls the provided `nodeWriter` from\n * {@link module:ol/xml~serialize}. This can be used by the parent writer to have the\n * 'nodeWriter' called with an array of values when the `nodeWriter` was\n * designed to serialize a single item. An example would be a LineString\n * geometry writer, which could be reused for writing MultiLineString\n * geometries.\n * @param {function(this: T, Element, V, Array<*>)} nodeWriter Node writer.\n * @param {T=} opt_this The object to use as `this` in `nodeWriter`.\n * @return {Serializer} Serializer.\n * @template T, V\n */\nexport function makeArraySerializer(nodeWriter, opt_this) {\n var serializersNS, nodeFactory;\n return function(node, value, objectStack) {\n if (serializersNS === undefined) {\n serializersNS = {};\n var serializers = {};\n serializers[node.localName] = nodeWriter;\n serializersNS[node.namespaceURI] = serializers;\n nodeFactory = makeSimpleNodeFactory(node.localName);\n }\n serialize(serializersNS, nodeFactory, value, objectStack);\n };\n}\n\n\n/**\n * Create a node factory which can use the `opt_keys` passed to\n * {@link module:ol/xml~serialize} or {@link module:ol/xml~pushSerializeAndPop} as node names,\n * or a fixed node name. The namespace of the created nodes can either be fixed,\n * or the parent namespace will be used.\n * @param {string=} opt_nodeName Fixed node name which will be used for all\n * created nodes. If not provided, the 3rd argument to the resulting node\n * factory needs to be provided and will be the nodeName.\n * @param {string=} opt_namespaceURI Fixed namespace URI which will be used for\n * all created nodes. If not provided, the namespace of the parent node will\n * be used.\n * @return {function(*, Array<*>, string=): (Node|undefined)} Node factory.\n */\nexport function makeSimpleNodeFactory(opt_nodeName, opt_namespaceURI) {\n var fixedNodeName = opt_nodeName;\n return (\n /**\n * @param {*} value Value.\n * @param {Array<*>} objectStack Object stack.\n * @param {string=} opt_nodeName Node name.\n * @return {Node} Node.\n */\n function(value, objectStack, opt_nodeName) {\n var context = /** @type {NodeStackItem} */ (objectStack[objectStack.length - 1]);\n var node = context.node;\n var nodeName = fixedNodeName;\n if (nodeName === undefined) {\n nodeName = opt_nodeName;\n }\n\n var namespaceURI = opt_namespaceURI !== undefined ? opt_namespaceURI : node.namespaceURI;\n return createElementNS(namespaceURI, /** @type {string} */ (nodeName));\n }\n );\n}\n\n\n/**\n * A node factory that creates a node using the parent's `namespaceURI` and the\n * `nodeName` passed by {@link module:ol/xml~serialize} or\n * {@link module:ol/xml~pushSerializeAndPop} to the node factory.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nexport var OBJECT_PROPERTY_NODE_FACTORY = makeSimpleNodeFactory();\n\n\n/**\n * Create an array of `values` to be used with {@link module:ol/xml~serialize} or\n * {@link module:ol/xml~pushSerializeAndPop}, where `orderedKeys` has to be provided as\n * `opt_key` argument.\n * @param {Object<string, V>} object Key-value pairs for the sequence. Keys can\n * be a subset of the `orderedKeys`.\n * @param {Array<string>} orderedKeys Keys in the order of the sequence.\n * @return {Array<V>} Values in the order of the sequence. The resulting array\n * has the same length as the `orderedKeys` array. Values that are not\n * present in `object` will be `undefined` in the resulting array.\n * @template V\n */\nexport function makeSequence(object, orderedKeys) {\n var length = orderedKeys.length;\n var sequence = new Array(length);\n for (var i = 0; i < length; ++i) {\n sequence[i] = object[orderedKeys[i]];\n }\n return sequence;\n}\n\n\n/**\n * Create a namespaced structure, using the same values for each namespace.\n * This can be used as a starting point for versioned parsers, when only a few\n * values are version specific.\n * @param {Array<string>} namespaceURIs Namespace URIs.\n * @param {T} structure Structure.\n * @param {Object<string, T>=} opt_structureNS Namespaced structure to add to.\n * @return {Object<string, T>} Namespaced structure.\n * @template T\n */\nexport function makeStructureNS(namespaceURIs, structure, opt_structureNS) {\n /**\n * @type {Object<string, T>}\n */\n var structureNS = opt_structureNS !== undefined ? opt_structureNS : {};\n var i, ii;\n for (i = 0, ii = namespaceURIs.length; i < ii; ++i) {\n structureNS[namespaceURIs[i]] = structure;\n }\n return structureNS;\n}\n\n\n/**\n * Parse a node using the parsers and object stack.\n * @param {Object<string, Object<string, Parser>>} parsersNS\n * Parsers by namespace.\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @param {*=} opt_this The object to use as `this`.\n */\nexport function parseNode(parsersNS, node, objectStack, opt_this) {\n var n;\n for (n = node.firstElementChild; n; n = n.nextElementSibling) {\n var parsers = parsersNS[n.namespaceURI];\n if (parsers !== undefined) {\n var parser = parsers[n.localName];\n if (parser !== undefined) {\n parser.call(opt_this, n, objectStack);\n }\n }\n }\n}\n\n\n/**\n * Push an object on top of the stack, parse and return the popped object.\n * @param {T} object Object.\n * @param {Object<string, Object<string, Parser>>} parsersNS\n * Parsers by namespace.\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @param {*=} opt_this The object to use as `this`.\n * @return {T} Object.\n * @template T\n */\nexport function pushParseAndPop(object, parsersNS, node, objectStack, opt_this) {\n objectStack.push(object);\n parseNode(parsersNS, node, objectStack, opt_this);\n return /** @type {T} */ (objectStack.pop());\n}\n\n\n/**\n * Walk through an array of `values` and call a serializer for each value.\n * @param {Object<string, Object<string, Serializer>>} serializersNS\n * Namespaced serializers.\n * @param {function(this: T, *, Array<*>, (string|undefined)): (Node|undefined)} nodeFactory\n * Node factory. The `nodeFactory` creates the node whose namespace and name\n * will be used to choose a node writer from `serializersNS`. This\n * separation allows us to decide what kind of node to create, depending on\n * the value we want to serialize. An example for this would be different\n * geometry writers based on the geometry type.\n * @param {Array<*>} values Values to serialize. An example would be an array\n * of {@link module:ol/Feature~Feature} instances.\n * @param {Array<*>} objectStack Node stack.\n * @param {Array<string>=} opt_keys Keys of the `values`. Will be passed to the\n * `nodeFactory`. This is used for serializing object literals where the\n * node name relates to the property key. The array length of `opt_keys` has\n * to match the length of `values`. For serializing a sequence, `opt_keys`\n * determines the order of the sequence.\n * @param {T=} opt_this The object to use as `this` for the node factory and\n * serializers.\n * @template T\n */\nexport function serialize(\n serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this) {\n var length = (opt_keys !== undefined ? opt_keys : values).length;\n var value, node;\n for (var i = 0; i < length; ++i) {\n value = values[i];\n if (value !== undefined) {\n node = nodeFactory.call(opt_this !== undefined ? opt_this : this, value, objectStack,\n opt_keys !== undefined ? opt_keys[i] : undefined);\n if (node !== undefined) {\n serializersNS[node.namespaceURI][node.localName]\n .call(opt_this, node, value, objectStack);\n }\n }\n }\n}\n\n\n/**\n * @param {O} object Object.\n * @param {Object<string, Object<string, Serializer>>} serializersNS\n * Namespaced serializers.\n * @param {function(this: T, *, Array<*>, (string|undefined)): (Node|undefined)} nodeFactory\n * Node factory. The `nodeFactory` creates the node whose namespace and name\n * will be used to choose a node writer from `serializersNS`. This\n * separation allows us to decide what kind of node to create, depending on\n * the value we want to serialize. An example for this would be different\n * geometry writers based on the geometry type.\n * @param {Array<*>} values Values to serialize. An example would be an array\n * of {@link module:ol/Feature~Feature} instances.\n * @param {Array<*>} objectStack Node stack.\n * @param {Array<string>=} opt_keys Keys of the `values`. Will be passed to the\n * `nodeFactory`. This is used for serializing object literals where the\n * node name relates to the property key. The array length of `opt_keys` has\n * to match the length of `values`. For serializing a sequence, `opt_keys`\n * determines the order of the sequence.\n * @param {T=} opt_this The object to use as `this` for the node factory and\n * serializers.\n * @return {O|undefined} Object.\n * @template O, T\n */\nexport function pushSerializeAndPop(object, serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this) {\n objectStack.push(object);\n serialize(serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this);\n return /** @type {O|undefined} */ (objectStack.pop());\n}\n\n//# sourceMappingURL=xml.js.map","/**\n * @module ol/format/XMLFeature\n */\nimport {abstract} from '../util.js';\nimport {extend} from '../array.js';\nimport FeatureFormat from '../format/Feature.js';\nimport FormatType from '../format/FormatType.js';\nimport {isDocument, parse} from '../xml.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 XML feature formats.\n *\n * @abstract\n */\nvar XMLFeature = /*@__PURE__*/(function (FeatureFormat) {\n function XMLFeature() {\n FeatureFormat.call(this);\n\n /**\n * @type {XMLSerializer}\n * @private\n */\n this.xmlSerializer_ = new XMLSerializer();\n }\n\n if ( FeatureFormat ) XMLFeature.__proto__ = FeatureFormat;\n XMLFeature.prototype = Object.create( FeatureFormat && FeatureFormat.prototype );\n XMLFeature.prototype.constructor = XMLFeature;\n\n /**\n * @inheritDoc\n */\n XMLFeature.prototype.getType = function getType () {\n return FormatType.XML;\n };\n\n /**\n * Read a single feature.\n *\n * @param {Document|Node|Object|string} source Source.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {import(\"../Feature.js\").default} Feature.\n * @api\n */\n XMLFeature.prototype.readFeature = function readFeature (source, opt_options) {\n if (!source) {\n return null;\n } else if (typeof source === 'string') {\n var doc = parse(source);\n return this.readFeatureFromDocument(doc, opt_options);\n } else if (isDocument(source)) {\n return this.readFeatureFromDocument(/** @type {Document} */ (source), opt_options);\n } else {\n return this.readFeatureFromNode(/** @type {Node} */ (source), opt_options);\n }\n };\n\n /**\n * @param {Document} doc Document.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n * @return {import(\"../Feature.js\").default} Feature.\n */\n XMLFeature.prototype.readFeatureFromDocument = function readFeatureFromDocument (doc, opt_options) {\n var features = this.readFeaturesFromDocument(doc, opt_options);\n if (features.length > 0) {\n return features[0];\n } else {\n return null;\n }\n };\n\n /**\n * @param {Node} node Node.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n * @return {import(\"../Feature.js\").default} Feature.\n */\n XMLFeature.prototype.readFeatureFromNode = function readFeatureFromNode (node, opt_options) {\n return null; // not implemented\n };\n\n /**\n * Read all features from a feature collection.\n *\n * @param {Document|Node|Object|string} source Source.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n * @return {Array<import(\"../Feature.js\").default>} Features.\n * @api\n */\n XMLFeature.prototype.readFeatures = function readFeatures (source, opt_options) {\n if (!source) {\n return [];\n } else if (typeof source === 'string') {\n var doc = parse(source);\n return this.readFeaturesFromDocument(doc, opt_options);\n } else if (isDocument(source)) {\n return this.readFeaturesFromDocument(\n /** @type {Document} */ (source), opt_options);\n } else {\n return this.readFeaturesFromNode(/** @type {Node} */ (source), opt_options);\n }\n };\n\n /**\n * @param {Document} doc Document.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n * @protected\n * @return {Array<import(\"../Feature.js\").default>} Features.\n */\n XMLFeature.prototype.readFeaturesFromDocument = function readFeaturesFromDocument (doc, opt_options) {\n /** @type {Array<import(\"../Feature.js\").default>} */\n var features = [];\n for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n if (n.nodeType == Node.ELEMENT_NODE) {\n extend(features, this.readFeaturesFromNode(n, opt_options));\n }\n }\n return features;\n };\n\n /**\n * @abstract\n * @param {Node} node Node.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n * @protected\n * @return {Array<import(\"../Feature.js\").default>} Features.\n */\n XMLFeature.prototype.readFeaturesFromNode = function readFeaturesFromNode (node, opt_options) {\n return abstract();\n };\n\n /**\n * @inheritDoc\n */\n XMLFeature.prototype.readGeometry = function readGeometry (source, opt_options) {\n if (!source) {\n return null;\n } else if (typeof source === 'string') {\n var doc = parse(source);\n return this.readGeometryFromDocument(doc, opt_options);\n } else if (isDocument(source)) {\n return this.readGeometryFromDocument(\n /** @type {Document} */ (source), opt_options);\n } else {\n return this.readGeometryFromNode(/** @type {Node} */ (source), opt_options);\n }\n };\n\n /**\n * @param {Document} doc Document.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n * @protected\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\n XMLFeature.prototype.readGeometryFromDocument = function readGeometryFromDocument (doc, opt_options) {\n return null; // not implemented\n };\n\n /**\n * @param {Node} node Node.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n * @protected\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\n XMLFeature.prototype.readGeometryFromNode = function readGeometryFromNode (node, opt_options) {\n return null; // not implemented\n };\n\n /**\n * Read the projection from the source.\n *\n * @param {Document|Node|Object|string} source Source.\n * @return {import(\"../proj/Projection.js\").default} Projection.\n * @api\n */\n XMLFeature.prototype.readProjection = function readProjection (source) {\n if (!source) {\n return null;\n } else if (typeof source === 'string') {\n var doc = parse(source);\n return this.readProjectionFromDocument(doc);\n } else if (isDocument(source)) {\n return this.readProjectionFromDocument(/** @type {Document} */ (source));\n } else {\n return this.readProjectionFromNode(/** @type {Node} */ (source));\n }\n };\n\n /**\n * @param {Document} doc Document.\n * @protected\n * @return {import(\"../proj/Projection.js\").default} Projection.\n */\n XMLFeature.prototype.readProjectionFromDocument = function readProjectionFromDocument (doc) {\n return this.dataProjection;\n };\n\n /**\n * @param {Node} node Node.\n * @protected\n * @return {import(\"../proj/Projection.js\").default} Projection.\n */\n XMLFeature.prototype.readProjectionFromNode = function readProjectionFromNode (node) {\n return this.dataProjection;\n };\n\n /**\n * @inheritDoc\n */\n XMLFeature.prototype.writeFeature = function writeFeature (feature, opt_options) {\n var node = this.writeFeatureNode(feature, opt_options);\n return this.xmlSerializer_.serializeToString(node);\n };\n\n /**\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n * @protected\n * @return {Node} Node.\n */\n XMLFeature.prototype.writeFeatureNode = function writeFeatureNode (feature, opt_options) {\n return null; // not implemented\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} Result.\n * @api\n */\n XMLFeature.prototype.writeFeatures = function writeFeatures (features, opt_options) {\n var node = this.writeFeaturesNode(features, opt_options);\n return this.xmlSerializer_.serializeToString(node);\n };\n\n /**\n * @param {Array<import(\"../Feature.js\").default>} features Features.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n * @return {Node} Node.\n */\n XMLFeature.prototype.writeFeaturesNode = function writeFeaturesNode (features, opt_options) {\n return null; // not implemented\n };\n\n /**\n * @inheritDoc\n */\n XMLFeature.prototype.writeGeometry = function writeGeometry (geometry, opt_options) {\n var node = this.writeGeometryNode(geometry, opt_options);\n return this.xmlSerializer_.serializeToString(node);\n };\n\n /**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n * @return {Node} Node.\n */\n XMLFeature.prototype.writeGeometryNode = function writeGeometryNode (geometry, opt_options) {\n return null; // not implemented\n };\n\n return XMLFeature;\n}(FeatureFormat));\n\n\nexport default XMLFeature;\n\n//# sourceMappingURL=XMLFeature.js.map","/**\n * @module ol/format/OSMXML\n */\n// FIXME add typedef for stack state objects\nimport {extend} from '../array.js';\nimport Feature from '../Feature.js';\nimport {transformWithOptions} from './Feature.js';\nimport XMLFeature from './XMLFeature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport {isEmpty} from '../obj.js';\nimport {get as getProjection} from '../proj.js';\nimport {pushParseAndPop, makeStructureNS} from '../xml.js';\n\n\n/**\n * @const\n * @type {Array<null>}\n */\nvar NAMESPACE_URIS = [null];\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar WAY_PARSERS = makeStructureNS(\n NAMESPACE_URIS, {\n 'nd': readNd,\n 'tag': readTag\n });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar PARSERS = makeStructureNS(\n NAMESPACE_URIS, {\n 'node': readNode,\n 'way': readWay\n });\n\n\n/**\n * @classdesc\n * Feature format for reading data in the\n * [OSMXML format](http://wiki.openstreetmap.org/wiki/OSM_XML).\n *\n * @api\n */\nvar OSMXML = /*@__PURE__*/(function (XMLFeature) {\n function OSMXML() {\n XMLFeature.call(this);\n\n /**\n * @inheritDoc\n */\n this.dataProjection = getProjection('EPSG:4326');\n }\n\n if ( XMLFeature ) OSMXML.__proto__ = XMLFeature;\n OSMXML.prototype = Object.create( XMLFeature && XMLFeature.prototype );\n OSMXML.prototype.constructor = OSMXML;\n\n /**\n * @inheritDoc\n */\n OSMXML.prototype.readFeaturesFromNode = function readFeaturesFromNode (node, opt_options) {\n var options = this.getReadOptions(node, opt_options);\n if (node.localName == 'osm') {\n var state = pushParseAndPop({\n nodes: {},\n ways: [],\n features: []\n }, PARSERS, node, [options]);\n // parse nodes in ways\n for (var j = 0; j < state.ways.length; j++) {\n var values = /** @type {Object} */ (state.ways[j]);\n /** @type {Array<number>} */\n var flatCoordinates = [];\n for (var i = 0, ii = values.ndrefs.length; i < ii; i++) {\n var point = state.nodes[values.ndrefs[i]];\n extend(flatCoordinates, point);\n }\n var geometry = (void 0);\n if (values.ndrefs[0] == values.ndrefs[values.ndrefs.length - 1]) {\n // closed way\n geometry = new Polygon(flatCoordinates, GeometryLayout.XY, [flatCoordinates.length]);\n } else {\n geometry = new LineString(flatCoordinates, GeometryLayout.XY);\n }\n transformWithOptions(geometry, false, options);\n var feature = new Feature(geometry);\n feature.setId(values.id);\n feature.setProperties(values.tags);\n state.features.push(feature);\n }\n if (state.features) {\n return state.features;\n }\n }\n return [];\n };\n\n return OSMXML;\n}(XMLFeature));\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar NODE_PARSERS = makeStructureNS(\n NAMESPACE_URIS, {\n 'tag': readTag\n });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction readNode(node, objectStack) {\n var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (objectStack[0]);\n var state = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n var id = node.getAttribute('id');\n /** @type {import(\"../coordinate.js\").Coordinate} */\n var coordinates = [\n parseFloat(node.getAttribute('lon')),\n parseFloat(node.getAttribute('lat'))\n ];\n state.nodes[id] = coordinates;\n\n var values = pushParseAndPop({\n tags: {}\n }, NODE_PARSERS, node, objectStack);\n if (!isEmpty(values.tags)) {\n var geometry = new Point(coordinates);\n transformWithOptions(geometry, false, options);\n var feature = new Feature(geometry);\n feature.setId(id);\n feature.setProperties(values.tags);\n state.features.push(feature);\n }\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction readWay(node, objectStack) {\n var id = node.getAttribute('id');\n var values = pushParseAndPop({\n id: id,\n ndrefs: [],\n tags: {}\n }, WAY_PARSERS, node, objectStack);\n var state = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n state.ways.push(values);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction readNd(node, objectStack) {\n var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n values.ndrefs.push(node.getAttribute('ref'));\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction readTag(node, objectStack) {\n var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n values.tags[node.getAttribute('k')] = node.getAttribute('v');\n}\n\n\nexport default OSMXML;\n\n//# sourceMappingURL=OSMXML.js.map","/**\n * @module ol/style/Text\n */\nimport Fill from './Fill.js';\nimport TextPlacement from './TextPlacement.js';\n\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 */\nvar DEFAULT_FILL_COLOR = '#333';\n\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] 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] Text placement.\n * @property {number} [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/**\n * @classdesc\n * Set text style for vector features.\n * @api\n */\nvar Text = function Text(opt_options) {\n\n var 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|undefined}\n */\n this.scale_ = options.scale;\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_ = options.fill !== undefined ? options.fill :\n new Fill({color: DEFAULT_FILL_COLOR});\n\n /**\n * @private\n * @type {number}\n */\n this.maxAngle_ = options.maxAngle !== undefined ? options.maxAngle : Math.PI / 4;\n\n /**\n * @private\n * @type {import(\"./TextPlacement.js\").default|string}\n */\n this.placement_ = 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 ? options.backgroundFill : null;\n\n /**\n * @private\n * @type {import(\"./Stroke.js\").default}\n */\n this.backgroundStroke_ = options.backgroundStroke ? options.backgroundStroke : 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*/\nText.prototype.clone = function clone () {\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: this.getScale(),\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() ? this.getBackgroundFill().clone() : undefined,\n backgroundStroke: this.getBackgroundStroke() ? this.getBackgroundStroke().clone() : undefined\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*/\nText.prototype.getOverflow = function getOverflow () {\n return this.overflow_;\n};\n\n/**\n* Get the font name.\n* @return {string|undefined} Font.\n* @api\n*/\nText.prototype.getFont = function 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*/\nText.prototype.getMaxAngle = function 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*/\nText.prototype.getPlacement = function 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*/\nText.prototype.getOffsetX = function 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*/\nText.prototype.getOffsetY = function 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*/\nText.prototype.getFill = function 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*/\nText.prototype.getRotateWithView = function getRotateWithView () {\n return this.rotateWithView_;\n};\n\n/**\n* Get the text rotation.\n* @return {number|undefined} Rotation.\n* @api\n*/\nText.prototype.getRotation = function getRotation () {\n return this.rotation_;\n};\n\n/**\n* Get the text scale.\n* @return {number|undefined} Scale.\n* @api\n*/\nText.prototype.getScale = function getScale () {\n return this.scale_;\n};\n\n/**\n* Get the stroke style for the text.\n* @return {import(\"./Stroke.js\").default} Stroke style.\n* @api\n*/\nText.prototype.getStroke = function getStroke () {\n return this.stroke_;\n};\n\n/**\n* Get the text to be rendered.\n* @return {string|undefined} Text.\n* @api\n*/\nText.prototype.getText = function getText () {\n return this.text_;\n};\n\n/**\n* Get the text alignment.\n* @return {string|undefined} Text align.\n* @api\n*/\nText.prototype.getTextAlign = function getTextAlign () {\n return this.textAlign_;\n};\n\n/**\n* Get the text baseline.\n* @return {string|undefined} Text baseline.\n* @api\n*/\nText.prototype.getTextBaseline = function 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*/\nText.prototype.getBackgroundFill = function 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*/\nText.prototype.getBackgroundStroke = function getBackgroundStroke () {\n return this.backgroundStroke_;\n};\n\n/**\n* Get the padding for the text.\n* @return {Array<number>} Padding.\n* @api\n*/\nText.prototype.getPadding = function 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*/\nText.prototype.setOverflow = function setOverflow (overflow) {\n this.overflow_ = overflow;\n};\n\n/**\n* Set the font.\n*\n* @param {string|undefined} font Font.\n* @api\n*/\nText.prototype.setFont = function 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*/\nText.prototype.setMaxAngle = function 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*/\nText.prototype.setOffsetX = function 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*/\nText.prototype.setOffsetY = function 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*/\nText.prototype.setPlacement = function setPlacement (placement) {\n this.placement_ = placement;\n};\n\n/**\n* Set the fill.\n*\n* @param {import(\"./Fill.js\").default} fill Fill style.\n* @api\n*/\nText.prototype.setFill = function setFill (fill) {\n this.fill_ = fill;\n};\n\n/**\n* Set the rotation.\n*\n* @param {number|undefined} rotation Rotation.\n* @api\n*/\nText.prototype.setRotation = function setRotation (rotation) {\n this.rotation_ = rotation;\n};\n\n/**\n* Set the scale.\n*\n* @param {number|undefined} scale Scale.\n* @api\n*/\nText.prototype.setScale = function setScale (scale) {\n this.scale_ = scale;\n};\n\n/**\n* Set the stroke.\n*\n* @param {import(\"./Stroke.js\").default} stroke Stroke style.\n* @api\n*/\nText.prototype.setStroke = function setStroke (stroke) {\n this.stroke_ = stroke;\n};\n\n/**\n* Set the text.\n*\n* @param {string|undefined} text Text.\n* @api\n*/\nText.prototype.setText = function 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*/\nText.prototype.setTextAlign = function 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*/\nText.prototype.setTextBaseline = function 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*/\nText.prototype.setBackgroundFill = function 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*/\nText.prototype.setBackgroundStroke = function 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*/\nText.prototype.setPadding = function setPadding (padding) {\n this.padding_ = padding;\n};\n\nexport default Text;\n\n//# sourceMappingURL=Text.js.map","\"use strict\";\nimport Map from 'ol/Map.js';\nimport WebGLMap from 'ol/WebGLMap.js';\nimport {WEBGL} from 'ol/has.js'\nimport View from 'ol/View.js';\nimport {defaults as defaultControls, Attribution as AttributionControl, ScaleLine as ScaleLineControl} from 'ol/control.js';\nimport MessureControl from './MessureControl.js';\nimport LayerSwitcher from 'ol-layerswitcher';\nimport {all as allStrategy} from 'ol/loadingstrategy';\nimport {bbox as bboxStrategy} from 'ol/loadingstrategy.js';\nimport LayerGroup from 'ol/layer/Group';\nimport LayerImage from 'ol/layer/Image';\nimport TileLayer from 'ol/layer/Tile';\nimport OSM from 'ol/source/OSM.js';\nimport XYZ from 'ol/source/XYZ';\nimport {fromLonLat, toLonLat} from 'ol/proj.js';\nimport VectorLayer from 'ol/layer/Vector.js';\nimport VectorSource from 'ol/source/Vector.js';\nimport VectorTileLayer from 'ol/layer/VectorTile.js';\nimport VectorTileSource from 'ol/source/VectorTile.js';\nimport OSMXML from 'ol/format/OSMXML.js';\nimport {Circle as CircleStyle, Fill, Stroke, Style, Text} from 'ol/style.js';\n\n\nconst coordinate_cccamp19 = fromLonLat([13.30735, 53.03127]);\n\nvar MapClass;\n\nif (WEBGL && false) {\n\tMapClass = WebGLMap;\n} else {\n\tMapClass = Map;\n}\n\nvar styles = {\n\t'amenity': {\n\t\t'parking': new Style({\n\t\t\tstroke: new Stroke({\n\t\t\t\tcolor: 'rgba(170, 170, 170, 1.0)',\n\t\t\t\twidth: 1\n\t\t\t}),\n\t\t\tfill: new Fill({\n\t\t\t\tcolor: 'rgba(170, 170, 170, 0.3)'\n\t\t\t})\n\t\t})\n\t},\n\t'building': {\n\t\t'.*': new Style({\n\t\t\tzIndex: 100,\n\t\t\tstroke: new Stroke({\n\t\t\t\tcolor: 'rgba(246, 99, 79, 1.0)',\n\t\t\t\twidth: 1\n\t\t\t}),\n\t\t\tfill: new Fill({\n\t\t\t\tcolor: 'rgba(246, 99, 79, 0.3)'\n\t\t\t}),\n\t\t\ttext: new Text({\n\t\t\t\tfont: '12px Calibri,sans-serif',\n\t\t\t\tfill: new Fill({\n\t\t\t\t\tcolor: '#000'\n\t\t\t\t}),\n\t\t\t\tstroke: new Stroke({\n\t\t\t\t\tcolor: '#fff',\n\t\t\t\t\twidth: 3\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\t},\n\t'highway': {\n\t\t'service': new Style({\n\t\t\tstroke: new Stroke({\n\t\t\t\tcolor: 'rgba(255, 255, 255, 1.0)',\n\t\t\t\twidth: 2\n\t\t\t})\n\t\t}),\n\t\t'.*': new Style({\n\t\t\tstroke: new Stroke({\n\t\t\t\tcolor: 'rgba(255, 255, 255, 1.0)',\n\t\t\t\twidth: 3\n\t\t\t})\n\t\t})\n\t},\n\t'landuse': {\n\t\t'forest|grass|allotments': new Style({\n\t\t\tstroke: new Stroke({\n\t\t\t\tcolor: 'rgba(0, 0, 170, 1.0)',\n\t\t\t\twidth: 1\n\t\t\t}),\n\t\t\tfill: new Fill({\n\t\t\t\tcolor: 'rgba(0, 0, 170, 0.3)'\n\t\t\t}),\n\t\t\ttext: new Text({\n\t\t\t\tfont: '12px Calibri,sans-serif',\n\t\t\t\tfill: new Fill({\n\t\t\t\t\tcolor: '#000'\n\t\t\t\t}),\n\t\t\t\tstroke: new Stroke({\n\t\t\t\t\tcolor: '#fff',\n\t\t\t\t\twidth: 3\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\t},\n\t'natural': {\n\t\t'tree': new Style({\n\t\t\timage: new CircleStyle({\n\t\t\t\tradius: 2,\n\t\t\t\tfill: new Fill({\n\t\t\t\t\t color: 'rgba(140, 208, 95, 1.0)'\n\t\t\t\t\t }),\n\t\t\t\tstroke: null\n\t\t\t})\n\t\t})\n\t},\n\t'name': {\n\t\t'.*': new Style({\n\t\t\ttext: new Text({\n\t\t\t\tfont: '12px Calibri,sans-serif',\n\t\t\t\tfill: new Fill({\n\t\t\t\t\tcolor: '#000'\n\t\t\t\t}),\n\t\t\t\tstroke: new Stroke({\n\t\t\t\t\tcolor: '#fff',\n\t\t\t\t\twidth: 3\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\t}\n};\n\nvar vectorSource = new VectorSource({\n\tformat: new OSMXML(),\n\turl: 'https://seafile.milliways.info/f/688170149668429f9598/?dl=1',\n\tstrategy: allStrategy,\n\tattributions: '&#169;<a href=\"https://git.milliways.info/Milliways/cccamp19-map\">Milliways</a>',\n});\n\nvar messureSource = new VectorSource();\nvar messureLayer = new VectorLayer({\n\ttitle: 'Messure',\n\tsource: messureSource,\n\tstyle: new Style({\n\t\tfill: new Fill({\n\t\t\tcolor: 'rgba(255, 255, 255, 0.2)'\n\t\t}),\n\t\tstroke: new Stroke({\n\t\t\tcolor: '#ffcc33',\n\t\t\twidth: 2\n\t\t}),\n\t\timage: new CircleStyle({\n\t\t\tradius: 7,\n\t\t\tfill: new Fill({\n\t\t\t\tcolor: '#ffcc33'\n\t\t\t})\n\t\t})\n\t})\n});\nvar orthoLayer = new TileLayer({\n\ttitle: 'Ortho Imagery',\n\ttype: 'base',\n\tsource: new XYZ({\n\t\turl: 'https://cdn.eventphone.de/maps/ziegeleipark/{z}/{x}/{y}.jpg',\n\t\tmaxZoom: 22,\n\t\tminZoom: 14,\n\t\tattributions: 'Bianco Veigel & Rene Hansen',\n\t\tattributionsCollapsible: false,\n\t})\n});\n\nvar vectorLayer = new VectorLayer({\n title: 'Milliways Overlay',\n source: vectorSource,\n style: function(feature) {\n for (var key in styles) {\n var value = feature.get(key);\n if (value !== undefined) {\n for (var regexp in styles[key]) {\n if (new RegExp(regexp).test(value)) {\n var style = styles[key][regexp];\n var text = feature.get('name');\n if(text !== undefined ) {\n if(feature.get('size') !== undefined) {\n text += '\\n' + feature.get('size');\n }\n }\n style.getText().setText(text);\n return style;\n }\n }\n }\n }\n return null;\n }\n});\n\n\nvar osmLayer = new TileLayer({\n\ttitle: 'OSM',\n\ttype: 'base',\n\tsource: new OSM()\n});\n\nvar map = new MapClass({\n\ttarget: 'map',\n\tcontrols: defaultControls().extend([\n\t\tnew LayerSwitcher(),\n\t\tnew ScaleLineControl(),\n\t\tnew MessureControl({ source: messureSource}),\n\t]),\n\tnumZoomLevels: 19,\n\tunits: 'm',\n\tlayers: [\n\t\tnew LayerGroup({\n\t\t\ttitle: 'Base Layers',\n\t\t\tlayers: [\n\t\t\t\torthoLayer,\n\t\t\t\tosmLayer\n\t\t\t]\n\t\t}),\n\t\tnew LayerGroup({\n\t\t\ttitle: 'overlays',\n\t\t\tlayers: [\n\t\t\t\tvectorLayer,\n\t\t\t\tmessureLayer,\n\t\t\t]\n\t\t})\n\t],\n\tview: new View({\n\t\tcenter: coordinate_cccamp19,\n\t\tzoom: 17\n\t})\n});\n\n\nfunction parseURL(url) {\n\n\tvar parser = document.createElement('a'),\n\t\tsearchObject = {},\n\t\tqueries, split, i;\n\n\t// Let the browser do the work\n\tparser.href = url;\n\n\t// Convert query string to object\n\tqueries = parser.search.replace(/^\\?/, '').split('&');\n\tfor( i = 0; i < queries.length; i++ ) {\n\t\tsplit = queries[i].split('=');\n\t\tif(searchObject[split[0]]) {\n\t\t\tif(!Array.isArray(searchObject[split[0]])) {\n\t\t\t\tsearchObject[split[0]] = [searchObject[split[0]]];\n\t\t\t}\n\t\t\tsearchObject[split[0]].push(decodeURI(split[1]));\n\t\t} else {\n\t\t\tsearchObject[split[0]] = decodeURI(split[1]);\n\t\t}\n\t}\n\n\treturn {\n\t\tpathname: parser.pathname,\n\t\tsearch: parser.search,\n\t\tsearchObject: searchObject,\n\t\thash: parser.hash\n\t};\n\n}\n\n// start show coordinate in param and pars it [[[\nfunction generateHash(info) {\n\tvar params=[]\n\tfor( var param in info.searchObject) {\n\t\tif(param!='') {\n\t\t\tif(Array.isArray(info.searchObject[param])){\n\t\t\t\tinfo.searchObject[param].map(function(value) {\n\t\t\t\t\tparams.push(`${encodeURI(param)}=${encodeURI(value)}`);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tparams.push(`${encodeURI(param)}=${encodeURI(info.searchObject[param])}`);\n\t\t\t}\n\t\t}\n\t}\n\treturn `#${info.pathname}?${params.join('&')}`;\n}\n\nvar layers = [orthoLayer, osmLayer, vectorLayer];\nvar hash_info;\n\nvar coordinate_parser = /^(\\d+)\\/(-?\\d*\\.?\\d*)\\/(-?\\d*\\.?\\d*)/;\n\nfunction parseHash() {\n\thash_info=parseURL(location.hash.substr(1))\n\tif( hash_info.searchObject['map'] && coordinate_parser.test(hash_info.searchObject['map'])){\n\t\tvar map_info = coordinate_parser.exec(hash_info.searchObject['map']);\n\t\tmap.getView().setCenter(fromLonLat([Number(map_info[3]), Number(map_info[2])]));\n\t\tmap.getView().setZoom(map_info[1]);\n\t}\n\tif( hash_info.searchObject['layer']) {\n\t\tvar _layers = hash_info.searchObject['layer'];\n\t\tif(!Array.isArray(_layers)) {\n\t\t\t_layers = [_layers];\n\t\t}\n\t\tlayers.map(function(layer){\n\t\t\tlayer.setVisible(\n\t\t\t\t_layers.indexOf(layer.get('title')) >=0\n\t\t\t);\n\t\t});\n\t}\n}\n\nparseHash();\nwindow.onhashchange = function() {\n\tparseHash()\n};\n\nmap.on(\"moveend\", function(evt){\n\tvar map = evt.map;\n\tvar [lon, lat] = toLonLat(map.getView().getCenter());\n\tvar zoom = map.getView().getZoom();\n\thash_info.searchObject['map'] = `${zoom}/${lat}/${lon}`;\n\tlocation.hash = generateHash(hash_info);\n});\n\n// map types\nlayers.map(function(layer){\n\tlayer.addEventListener('change:visible',function(e){\n\t\thash_info=parseURL(location.hash.substr(1));\n\t\tvar _layers = [];\n\t\tlayers.map(function(layer) {\n\t\t\tif(layer.getVisible()){\n\t\t\t\t_layers.push(layer.get('title'));\n\t\t\t}\n\t\t});\n\t\thash_info.searchObject['layer'] = _layers;\n\t\tlocation.hash = generateHash(hash_info);\n\t});\n});\n\n// end coordinate parser ]]]\n\ndocument.Map = map;\n\n"],"sourceRoot":""}