{"version":3,"file":"3012.863a1b0d9d6a9616.js","sources":["webpack://@terrestris/shogun-gis-client/./node_modules/ol/source/OSM.js","webpack://@terrestris/shogun-gis-client/./node_modules/ol/source/StadiaMaps.js","webpack://@terrestris/shogun-gis-client/./node_modules/ol/source/XYZ.js","webpack://@terrestris/shogun-gis-client/./node_modules/ol/util.js"],"sourcesContent":["/**\n * @module ol/source/OSM\n */\n\nimport XYZ from './XYZ.js';\n\n/**\n * The attribution containing a link to the OpenStreetMap Copyright and License\n * page.\n * @const\n * @type {string}\n * @api\n */\nexport const ATTRIBUTION =\n '© ' +\n 'OpenStreetMap ' +\n 'contributors.';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.\n * @property {null|string} [crossOrigin='anonymous'] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {number} [maxZoom=19] Max zoom.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [transition=250] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {string} [url='https://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 * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n\n/**\n * @classdesc\n * Layer source for the OpenStreetMap tile server.\n * @api\n */\nclass OSM extends XYZ {\n /**\n * @param {Options} [options] Open Street Map options.\n */\n constructor(options) {\n options = options || {};\n\n let attributions;\n if (options.attributions !== undefined) {\n attributions = options.attributions;\n } else {\n attributions = [ATTRIBUTION];\n }\n\n const crossOrigin =\n options.crossOrigin !== undefined ? options.crossOrigin : 'anonymous';\n\n const url =\n options.url !== undefined\n ? options.url\n : 'https://tile.openstreetmap.org/{z}/{x}/{y}.png';\n\n super({\n attributions: attributions,\n attributionsCollapsible: false,\n cacheSize: options.cacheSize,\n crossOrigin: crossOrigin,\n interpolate: options.interpolate,\n maxZoom: options.maxZoom !== undefined ? options.maxZoom : 19,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n tileLoadFunction: options.tileLoadFunction,\n transition: options.transition,\n url: url,\n wrapX: options.wrapX,\n zDirection: options.zDirection,\n });\n }\n}\n\nexport default OSM;\n","/**\n * @module ol/source/StadiaMaps\n */\n\nimport XYZ from './XYZ.js';\nimport {ATTRIBUTION as OSM_ATTRIBUTION} from './OSM.js';\n\n/**\n * @const\n * @type string\n */\nconst STADIA_ATTRIBUTION =\n '© Stadia Maps';\n\n/**\n * @const\n * @type string\n */\nconst OMT_ATTRIBUTION =\n '© OpenMapTiles';\n\n/**\n * @const\n * @type string\n */\nconst STAMEN_ATTRIBUTION =\n '© Stamen Design';\n\n/**\n * @type {Object}\n */\nconst LayerConfig = {\n 'stamen_terrain': {\n extension: 'png',\n },\n 'stamen_terrain_background': {\n extension: 'png',\n },\n 'stamen_terrain_labels': {\n extension: 'png',\n },\n 'stamen_terrain_lines': {\n extension: 'png',\n },\n 'stamen_toner_background': {\n extension: 'png',\n },\n 'stamen_toner': {\n extension: 'png',\n },\n 'stamen_toner_labels': {\n extension: 'png',\n },\n 'stamen_toner_lines': {\n extension: 'png',\n },\n 'stamen_toner_lite': {\n extension: 'png',\n },\n 'stamen_watercolor': {\n extension: 'jpg',\n },\n 'alidade_smooth': {\n extension: 'png',\n },\n 'alidade_smooth_dark': {\n extension: 'png',\n },\n 'alidade_satellite': {\n extension: 'png',\n },\n 'outdoors': {\n extension: 'png',\n },\n 'osm_bright': {\n extension: 'png',\n },\n};\n\n/**\n * @type {Object}\n */\nconst ProviderConfig = {\n 'stamen_terrain': {\n minZoom: 0,\n maxZoom: 18,\n retina: true,\n },\n 'stamen_toner': {\n minZoom: 0,\n maxZoom: 20,\n retina: true,\n },\n 'stamen_watercolor': {\n minZoom: 1,\n maxZoom: 18,\n retina: false,\n },\n};\n\n/**\n * @typedef {Object} Options\n * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {string} layer Layer name. Valid values: `alidade_smooth`, `alidade_smooth_dark`, `outdoors`, `stamen_terrain`, `stamen_terrain_background`, `stamen_terrain_labels`, `stamen_terrain_lines`, `stamen_toner_background`, `stamen_toner`, `stamen_toner_labels`, `stamen_toner_lines`, `stamen_toner_lite`, `stamen_watercolor`, and `osm_bright`.\n * @property {number} [minZoom] Minimum zoom.\n * @property {number} [maxZoom] Maximum zoom.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction]\n * Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [transition=250] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n * @property {string} [apiKey] Stadia Maps API key. Not required for localhost or most public web deployments. See https://docs.stadiamaps.com/authentication/ for details.\n * @property {boolean} [retina] Use retina tiles (if available; not available for Stamen Watercolor).\n */\n\n/**\n * @classdesc\n * Layer source for the Stadia Maps tile server.\n * @api\n */\nclass StadiaMaps extends XYZ {\n /**\n * @param {Options} options StadiaMaps options.\n */\n constructor(options) {\n const i = options.layer.indexOf('-');\n const provider = i == -1 ? options.layer : options.layer.slice(0, i);\n const providerConfig = ProviderConfig[provider] || {\n 'minZoom': 0,\n 'maxZoom': 20,\n 'retina': true,\n };\n\n const layerConfig = LayerConfig[options.layer];\n const query = options.apiKey ? '?api_key=' + options.apiKey : '';\n const retina = providerConfig.retina && options.retina ? '@2x' : '';\n\n const url =\n options.url !== undefined\n ? options.url\n : 'https://tiles.stadiamaps.com/tiles/' +\n options.layer +\n '/{z}/{x}/{y}' +\n retina +\n '.' +\n layerConfig.extension +\n query;\n\n const attributions = [STADIA_ATTRIBUTION, OMT_ATTRIBUTION, OSM_ATTRIBUTION];\n\n if (options.layer.startsWith('stamen_')) {\n attributions.splice(1, 0, STAMEN_ATTRIBUTION);\n }\n\n super({\n attributions: attributions,\n cacheSize: options.cacheSize,\n crossOrigin: 'anonymous',\n interpolate: options.interpolate,\n maxZoom:\n options.maxZoom !== undefined\n ? options.maxZoom\n : providerConfig.maxZoom,\n minZoom:\n options.minZoom !== undefined\n ? options.minZoom\n : providerConfig.minZoom,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n tileLoadFunction: options.tileLoadFunction,\n transition: options.transition,\n url: url,\n tilePixelRatio: retina ? 2 : 1,\n wrapX: options.wrapX,\n zDirection: options.zDirection,\n });\n }\n}\n\nexport default StadiaMaps;\n","/**\n * @module ol/source/XYZ\n */\n\nimport TileImage from './TileImage.js';\nimport {createXYZ, extentFromProjection} from '../tilegrid.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {number} [maxZoom=42] Optional max zoom level. Not used if `tileGrid` is provided.\n * @property {number} [minZoom=0] Optional min zoom level. Not used if `tileGrid` is provided.\n * @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Deprecated. Use an ImageTile source with a loader\n * instead. Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service.\n * For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {number|import(\"../size.js\").Size} [tileSize=[256, 256]] The tile size used by the tile service.\n * Not used if `tileGrid` is provided.\n * @property {number} [gutter=0] The size in pixels of the gutter around image tiles to ignore.\n * This allows artifacts of rendering at tile edges to be ignored.\n * Supported images should be wider and taller than the tile size by a value of `2 x gutter`.\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Deprecated. Use an ImageTile source and provide a function\n * for the url option instead.\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} [urls] Deprecated. Use an ImageTile source and provide an array of URLs for the\n * url option instead.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition=250] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n\n/**\n * @classdesc\n * Layer source for tile data with URLs in a set XYZ format that are\n * defined in a URL template. By default, this follows the widely-used\n * Google grid where `x` 0 and `y` 0 are in the top left. Grids like\n * TMS where `x` 0 and `y` 0 are in the bottom left can be used by\n * using the `{-y}` placeholder in the URL template, so long as the\n * source does not have a custom tile grid. In this case\n * a `tileUrlFunction` can be used, such as:\n * ```js\n * tileUrlFunction: function(coordinate) {\n * return 'http://mapserver.com/' + coordinate[0] + '/' +\n * coordinate[1] + '/' + (-coordinate[2] - 1) + '.png';\n * }\n * ```\n * @api\n */\nclass XYZ extends TileImage {\n /**\n * @param {Options} [options] XYZ options.\n */\n constructor(options) {\n options = options || {};\n\n const projection =\n options.projection !== undefined ? options.projection : 'EPSG:3857';\n\n const tileGrid =\n options.tileGrid !== undefined\n ? options.tileGrid\n : createXYZ({\n extent: extentFromProjection(projection),\n maxResolution: options.maxResolution,\n maxZoom: options.maxZoom,\n minZoom: options.minZoom,\n tileSize: options.tileSize,\n });\n\n super({\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n crossOrigin: options.crossOrigin,\n interpolate: options.interpolate,\n projection: projection,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n tileGrid: tileGrid,\n tileLoadFunction: options.tileLoadFunction,\n tilePixelRatio: options.tilePixelRatio,\n tileUrlFunction: options.tileUrlFunction,\n url: options.url,\n urls: options.urls,\n wrapX: options.wrapX !== undefined ? options.wrapX : true,\n transition: options.transition,\n attributionsCollapsible: options.attributionsCollapsible,\n zDirection: options.zDirection,\n });\n\n /**\n * @private\n * @type {number}\n */\n this.gutter_ = options.gutter !== undefined ? options.gutter : 0;\n }\n\n /**\n * @return {number} Gutter.\n * @override\n */\n getGutter() {\n return this.gutter_;\n }\n}\n\nexport default XYZ;\n","/**\n * @module ol/util\n */\n\n/**\n * @return {never} Any return.\n */\nexport function abstract() {\n throw new Error('Unimplemented abstract method.');\n}\n\n/**\n * Counter for getUid.\n * @type {number}\n * @private\n */\nlet 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 * @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 const VERSION = '10.3.1';\n"],"names":["ATTRIBUTION","OSM","options","attributions","undefined","crossOrigin","LayerConfig","ProviderConfig","StadiaMaps","i","providerConfig","layerConfig","query","retina","url","XYZ","projection","abstract","Error","uidCounter_","getUid","obj","String","VERSION"],"mappings":"uNAaO,IAAMA,EACX,0GAqCF,OAAMC,UAAY,SAAG,CAInB,YAAYC,CAAO,CAAE,KAGfC,EAEFA,EADED,AAAyBE,KAAAA,IAAzBF,AAHJA,CAAAA,EAAUA,GAAW,CAAC,GAGV,YAAY,CACPA,EAAQ,YAAY,CAEpB,CAACF,EAAY,CAG9B,IAAMK,EACJH,AAAwBE,KAAAA,IAAxBF,EAAQ,WAAW,CAAiBA,EAAQ,WAAW,CAAG,YAO5D,KAAK,CAAC,CACJ,aAAcC,EACd,wBAAyB,GACzB,UAAWD,EAAQ,SAAS,CAC5B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