dont minify charts or OL JS files #6338
Signed-off-by: si458 <simonsmith5521@gmail.com>
si458 committed
Aug 23, 2024 at 13:47 UTC
0ccce62c9d506c6a4505a39feec9a400d3f08d83
4 files changed
+1041
-4
public/scripts/chart.umd.js.map
new
+1
@@ -0,0 +1 @@
1
+{"version":3,"file":"chart.umd.js","sources":["../src/helpers/helpers.core.ts","../src/helpers/helpers.math.ts","../src/helpers/helpers.collection.ts","../src/helpers/helpers.extras.ts","../src/core/core.animator.js","../node_modules/.pnpm/@kurkle+color@0.3.2/node_modules/@kurkle/color/dist/color.esm.js","../src/helpers/helpers.color.ts","../src/core/core.animations.defaults.js","../src/helpers/helpers.intl.ts","../src/core/core.ticks.js","../src/core/core.defaults.js","../src/core/core.layouts.defaults.js","../src/core/core.scale.defaults.js","../src/helpers/helpers.dom.ts","../src/helpers/helpers.canvas.ts","../src/helpers/helpers.config.ts","../src/helpers/helpers.curve.ts","../src/helpers/helpers.easing.ts","../src/helpers/helpers.interpolation.ts","../src/helpers/helpers.options.ts","../src/helpers/helpers.rtl.ts","../src/helpers/helpers.segment.js","../src/core/core.interaction.js","../src/core/core.layouts.js","../src/platform/platform.base.js","../src/platform/platform.basic.js","../src/platform/platform.dom.js","../src/platform/index.js","../src/core/core.animation.js","../src/core/core.animations.js","../src/core/core.datasetController.js","../src/core/core.element.ts","../src/core/core.scale.autoskip.js","../src/core/core.scale.js","../src/core/core.typedRegistry.js","../src/core/core.registry.js","../src/core/core.plugins.js","../src/core/core.config.js","../src/core/core.controller.js","../src/core/core.adapters.ts","../src/controllers/controller.bar.js","../src/controllers/controller.doughnut.js","../src/controllers/controller.polarArea.js","../src/controllers/controller.bubble.js","../src/controllers/controller.line.js","../src/controllers/controller.pie.js","../src/controllers/controller.radar.js","../src/controllers/controller.scatter.js","../src/elements/element.arc.ts","../src/elements/element.line.js","../src/elements/element.point.ts","../src/elements/element.bar.js","../src/scales/scale.category.js","../src/scales/scale.linearbase.js","../src/scales/scale.linear.js","../src/scales/scale.logarithmic.js","../src/scales/scale.radialLinear.js","../src/scales/scale.time.js","../src/scales/scale.timeseries.js","../src/plugins/plugin.colors.ts","../src/plugins/plugin.decimation.js","../src/plugins/plugin.filler/filler.segment.js","../src/plugins/plugin.filler/filler.helper.js","../src/plugins/plugin.filler/filler.options.js","../src/plugins/plugin.filler/filler.target.stack.js","../src/plugins/plugin.filler/simpleArc.js","../src/plugins/plugin.filler/filler.target.js","../src/plugins/plugin.filler/filler.drawing.js","../src/plugins/plugin.filler/index.js","../src/plugins/plugin.legend.js","../src/plugins/plugin.title.js","../src/plugins/plugin.subtitle.js","../src/plugins/plugin.tooltip.js","../src/index.umd.ts"],"sourcesContent":["/**\n * @namespace Chart.helpers\n */\n\nimport type {AnyObject} from '../types/basic.js';\nimport type {ActiveDataPoint, ChartEvent} from '../types/index.js';\n\n/**\n * An empty function that can be used, for example, for optional callback.\n */\nexport function noop() {\n /* noop */\n}\n\n/**\n * Returns a unique id, sequentially generated from a global variable.\n */\nexport const uid = (() => {\n let id = 0;\n return () => id++;\n})();\n\n/**\n * Returns true if `value` is neither null nor undefined, else returns false.\n * @param value - The value to test.\n * @since 2.7.0\n */\nexport function isNullOrUndef(value: unknown): value is null | undefined {\n return value === null || typeof value === 'undefined';\n}\n\n/**\n * Returns true if `value` is an array (including typed arrays), else returns false.\n * @param value - The value to test.\n * @function\n */\nexport function isArray<T = unknown>(value: unknown): value is T[] {\n if (Array.isArray && Array.isArray(value)) {\n return true;\n }\n const type = Object.prototype.toString.call(value);\n if (type.slice(0, 7) === '[object' && type.slice(-6) === 'Array]') {\n return true;\n }\n return false;\n}\n\n/**\n * Returns true if `value` is an object (excluding null), else returns false.\n * @param value - The value to test.\n * @since 2.7.0\n */\nexport function isObject(value: unknown): value is AnyObject {\n return value !== null && Object.prototype.toString.call(value) === '[object Object]';\n}\n\n/**\n * Returns true if `value` is a finite number, else returns false\n * @param value - The value to test.\n */\nfunction isNumberFinite(value: unknown): value is number {\n return (typeof value === 'number' || value instanceof Number) && isFinite(+value);\n}\nexport {\n isNumberFinite as isFinite,\n};\n\n/**\n * Returns `value` if finite, else returns `defaultValue`.\n * @param value - The value to return if defined.\n * @param defaultValue - The value to return if `value` is not finite.\n */\nexport function finiteOrDefault(value: unknown, defaultValue: number) {\n return isNumberFinite(value) ? value : defaultValue;\n}\n\n/**\n * Returns `value` if defined, else returns `defaultValue`.\n * @param value - The value to return if defined.\n * @param defaultValue - The value to return if `value` is undefined.\n */\nexport function valueOrDefault<T>(value: T | undefined, defaultValue: T) {\n return typeof value === 'undefined' ? defaultValue : value;\n}\n\nexport const toPercentage = (value: number | string, dimension: number) =>\n typeof value === 'string' && value.endsWith('%') ?\n parseFloat(value) / 100\n : +value / dimension;\n\nexport const toDimension = (value: number | string, dimension: number) =>\n typeof value === 'string' && value.endsWith('%') ?\n parseFloat(value) / 100 * dimension\n : +value;\n\n/**\n * Calls `fn` with the given `args` in the scope defined by `thisArg` and returns the\n * value returned by `fn`. If `fn` is not a function, this method returns undefined.\n * @param fn - The function to call.\n * @param args - The arguments with which `fn` should be called.\n * @param [thisArg] - The value of `this` provided for the call to `fn`.\n */\nexport function callback<T extends (this: TA, ...restArgs: unknown[]) => R, TA, R>(\n fn: T | undefined,\n args: unknown[],\n thisArg?: TA\n): R | undefined {\n if (fn && typeof fn.call === 'function') {\n return fn.apply(thisArg, args);\n }\n}\n\n/**\n * Note(SB) for performance sake, this method should only be used when loopable type\n * is unknown or in none intensive code (not called often and small loopable). Else\n * it's preferable to use a regular for() loop and save extra function calls.\n * @param loopable - The object or array to be iterated.\n * @param fn - The function to call for each item.\n * @param [thisArg] - The value of `this` provided for the call to `fn`.\n * @param [reverse] - If true, iterates backward on the loopable.\n */\nexport function each<T, TA>(\n loopable: Record<string, T>,\n fn: (this: TA, v: T, i: string) => void,\n thisArg?: TA,\n reverse?: boolean\n): void;\nexport function each<T, TA>(\n loopable: T[],\n fn: (this: TA, v: T, i: number) => void,\n thisArg?: TA,\n reverse?: boolean\n): void;\nexport function each<T, TA>(\n loopable: T[] | Record<string, T>,\n fn: (this: TA, v: T, i: any) => void,\n thisArg?: TA,\n reverse?: boolean\n) {\n let i: number, len: number, keys: string[];\n if (isArray(loopable)) {\n len = loopable.length;\n if (reverse) {\n for (i = len - 1; i >= 0; i--) {\n fn.call(thisArg, loopable[i], i);\n }\n } else {\n for (i = 0; i < len; i++) {\n fn.call(thisArg, loopable[i], i);\n }\n }\n } else if (isObject(loopable)) {\n keys = Object.keys(loopable);\n len = keys.length;\n for (i = 0; i < len; i++) {\n fn.call(thisArg, loopable[keys[i]], keys[i]);\n }\n }\n}\n\n/**\n * Returns true if the `a0` and `a1` arrays have the same content, else returns false.\n * @param a0 - The array to compare\n * @param a1 - The array to compare\n * @private\n */\nexport function _elementsEqual(a0: ActiveDataPoint[], a1: ActiveDataPoint[]) {\n let i: number, ilen: number, v0: ActiveDataPoint, v1: ActiveDataPoint;\n\n if (!a0 || !a1 || a0.length !== a1.length) {\n return false;\n }\n\n for (i = 0, ilen = a0.length; i < ilen; ++i) {\n v0 = a0[i];\n v1 = a1[i];\n\n if (v0.datasetIndex !== v1.datasetIndex || v0.index !== v1.index) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Returns a deep copy of `source` without keeping references on objects and arrays.\n * @param source - The value to clone.\n */\nexport function clone<T>(source: T): T {\n if (isArray(source)) {\n return source.map(clone) as unknown as T;\n }\n\n if (isObject(source)) {\n const target = Object.create(null);\n const keys = Object.keys(source);\n const klen = keys.length;\n let k = 0;\n\n for (; k < klen; ++k) {\n target[keys[k]] = clone(source[keys[k]]);\n }\n\n return target;\n }\n\n return source;\n}\n\nfunction isValidKey(key: string) {\n return ['__proto__', 'prototype', 'constructor'].indexOf(key) === -1;\n}\n\n/**\n * The default merger when Chart.helpers.merge is called without merger option.\n * Note(SB): also used by mergeConfig and mergeScaleConfig as fallback.\n * @private\n */\nexport function _merger(key: string, target: AnyObject, source: AnyObject, options: AnyObject) {\n if (!isValidKey(key)) {\n return;\n }\n\n const tval = target[key];\n const sval = source[key];\n\n if (isObject(tval) && isObject(sval)) {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n merge(tval, sval, options);\n } else {\n target[key] = clone(sval);\n }\n}\n\nexport interface MergeOptions {\n merger?: (key: string, target: AnyObject, source: AnyObject, options?: AnyObject) => void;\n}\n\n/**\n * Recursively deep copies `source` properties into `target` with the given `options`.\n * IMPORTANT: `target` is not cloned and will be updated with `source` properties.\n * @param target - The target object in which all sources are merged into.\n * @param source - Object(s) to merge into `target`.\n * @param [options] - Merging options:\n * @param [options.merger] - The merge method (key, target, source, options)\n * @returns The `target` object.\n */\nexport function merge<T>(target: T, source: [], options?: MergeOptions): T;\nexport function merge<T, S1>(target: T, source: S1, options?: MergeOptions): T & S1;\nexport function merge<T, S1>(target: T, source: [S1], options?: MergeOptions): T & S1;\nexport function merge<T, S1, S2>(target: T, source: [S1, S2], options?: MergeOptions): T & S1 & S2;\nexport function merge<T, S1, S2, S3>(target: T, source: [S1, S2, S3], options?: MergeOptions): T & S1 & S2 & S3;\nexport function merge<T, S1, S2, S3, S4>(\n target: T,\n source: [S1, S2, S3, S4],\n options?: MergeOptions\n): T & S1 & S2 & S3 & S4;\nexport function merge<T>(target: T, source: AnyObject[], options?: MergeOptions): AnyObject;\nexport function merge<T>(target: T, source: AnyObject[], options?: MergeOptions): AnyObject {\n const sources = isArray(source) ? source : [source];\n const ilen = sources.length;\n\n if (!isObject(target)) {\n return target as AnyObject;\n }\n\n options = options || {};\n const merger = options.merger || _merger;\n let current: AnyObject;\n\n for (let i = 0; i < ilen; ++i) {\n current = sources[i];\n if (!isObject(current)) {\n continue;\n }\n\n const keys = Object.keys(current);\n for (let k = 0, klen = keys.length; k < klen; ++k) {\n merger(keys[k], target, current, options as AnyObject);\n }\n }\n\n return target;\n}\n\n/**\n * Recursively deep copies `source` properties into `target` *only* if not defined in target.\n * IMPORTANT: `target` is not cloned and will be updated with `source` properties.\n * @param target - The target object in which all sources are merged into.\n * @param source - Object(s) to merge into `target`.\n * @returns The `target` object.\n */\nexport function mergeIf<T>(target: T, source: []): T;\nexport function mergeIf<T, S1>(target: T, source: S1): T & S1;\nexport function mergeIf<T, S1>(target: T, source: [S1]): T & S1;\nexport function mergeIf<T, S1, S2>(target: T, source: [S1, S2]): T & S1 & S2;\nexport function mergeIf<T, S1, S2, S3>(target: T, source: [S1, S2, S3]): T & S1 & S2 & S3;\nexport function mergeIf<T, S1, S2, S3, S4>(target: T, source: [S1, S2, S3, S4]): T & S1 & S2 & S3 & S4;\nexport function mergeIf<T>(target: T, source: AnyObject[]): AnyObject;\nexport function mergeIf<T>(target: T, source: AnyObject[]): AnyObject {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return merge<T>(target, source, {merger: _mergerIf});\n}\n\n/**\n * Merges source[key] in target[key] only if target[key] is undefined.\n * @private\n */\nexport function _mergerIf(key: string, target: AnyObject, source: AnyObject) {\n if (!isValidKey(key)) {\n return;\n }\n\n const tval = target[key];\n const sval = source[key];\n\n if (isObject(tval) && isObject(sval)) {\n mergeIf(tval, sval);\n } else if (!Object.prototype.hasOwnProperty.call(target, key)) {\n target[key] = clone(sval);\n }\n}\n\n/**\n * @private\n */\nexport function _deprecated(scope: string, value: unknown, previous: string, current: string) {\n if (value !== undefined) {\n console.warn(scope + ': \"' + previous +\n '\" is deprecated. Please use \"' + current + '\" instead');\n }\n}\n\n// resolveObjectKey resolver cache\nconst keyResolvers = {\n // Chart.helpers.core resolveObjectKey should resolve empty key to root object\n '': v => v,\n // default resolvers\n x: o => o.x,\n y: o => o.y\n};\n\n/**\n * @private\n */\nexport function _splitKey(key: string) {\n const parts = key.split('.');\n const keys: string[] = [];\n let tmp = '';\n for (const part of parts) {\n tmp += part;\n if (tmp.endsWith('\\\\')) {\n tmp = tmp.slice(0, -1) + '.';\n } else {\n keys.push(tmp);\n tmp = '';\n }\n }\n return keys;\n}\n\nfunction _getKeyResolver(key: string) {\n const keys = _splitKey(key);\n return obj => {\n for (const k of keys) {\n if (k === '') {\n // For backward compatibility:\n // Chart.helpers.core resolveObjectKey should break at empty key\n break;\n }\n obj = obj && obj[k];\n }\n return obj;\n };\n}\n\nexport function resolveObjectKey(obj: AnyObject, key: string): any {\n const resolver = keyResolvers[key] || (keyResolvers[key] = _getKeyResolver(key));\n return resolver(obj);\n}\n\n/**\n * @private\n */\nexport function _capitalize(str: string) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n}\n\n\nexport const defined = (value: unknown) => typeof value !== 'undefined';\n\nexport const isFunction = (value: unknown): value is (...args: any[]) => any => typeof value === 'function';\n\n// Adapted from https://stackoverflow.com/questions/31128855/comparing-ecma6-sets-for-equality#31129384\nexport const setsEqual = <T>(a: Set<T>, b: Set<T>) => {\n if (a.size !== b.size) {\n return false;\n }\n\n for (const item of a) {\n if (!b.has(item)) {\n return false;\n }\n }\n\n return true;\n};\n\n/**\n * @param e - The event\n * @private\n */\nexport function _isClickEvent(e: ChartEvent) {\n return e.type === 'mouseup' || e.type === 'click' || e.type === 'contextmenu';\n}\n","import type {Point} from '../types/geometric.js';\nimport {isFinite as isFiniteNumber} from './helpers.core.js';\n\n/**\n * @alias Chart.helpers.math\n * @namespace\n */\n\nexport const PI = Math.PI;\nexport const TAU = 2 * PI;\nexport const PITAU = TAU + PI;\nexport const INFINITY = Number.POSITIVE_INFINITY;\nexport const RAD_PER_DEG = PI / 180;\nexport const HALF_PI = PI / 2;\nexport const QUARTER_PI = PI / 4;\nexport const TWO_THIRDS_PI = PI * 2 / 3;\n\nexport const log10 = Math.log10;\nexport const sign = Math.sign;\n\nexport function almostEquals(x: number, y: number, epsilon: number) {\n return Math.abs(x - y) < epsilon;\n}\n\n/**\n * Implementation of the nice number algorithm used in determining where axis labels will go\n */\nexport function niceNum(range: number) {\n const roundedRange = Math.round(range);\n range = almostEquals(range, roundedRange, range / 1000) ? roundedRange : range;\n const niceRange = Math.pow(10, Math.floor(log10(range)));\n const fraction = range / niceRange;\n const niceFraction = fraction <= 1 ? 1 : fraction <= 2 ? 2 : fraction <= 5 ? 5 : 10;\n return niceFraction * niceRange;\n}\n\n/**\n * Returns an array of factors sorted from 1 to sqrt(value)\n * @private\n */\nexport function _factorize(value: number) {\n const result: number[] = [];\n const sqrt = Math.sqrt(value);\n let i: number;\n\n for (i = 1; i < sqrt; i++) {\n if (value % i === 0) {\n result.push(i);\n result.push(value / i);\n }\n }\n if (sqrt === (sqrt | 0)) { // if value is a square number\n result.push(sqrt);\n }\n\n result.sort((a, b) => a - b).pop();\n return result;\n}\n\nexport function isNumber(n: unknown): n is number {\n return !isNaN(parseFloat(n as string)) && isFinite(n as number);\n}\n\nexport function almostWhole(x: number, epsilon: number) {\n const rounded = Math.round(x);\n return ((rounded - epsilon) <= x) && ((rounded + epsilon) >= x);\n}\n\n/**\n * @private\n */\nexport function _setMinAndMaxByKey(\n array: Record<string, number>[],\n target: { min: number, max: number },\n property: string\n) {\n let i: number, ilen: number, value: number;\n\n for (i = 0, ilen = array.length; i < ilen; i++) {\n value = array[i][property];\n if (!isNaN(value)) {\n target.min = Math.min(target.min, value);\n target.max = Math.max(target.max, value);\n }\n }\n}\n\nexport function toRadians(degrees: number) {\n return degrees * (PI / 180);\n}\n\nexport function toDegrees(radians: number) {\n return radians * (180 / PI);\n}\n\n/**\n * Returns the number of decimal places\n * i.e. the number of digits after the decimal point, of the value of this Number.\n * @param x - A number.\n * @returns The number of decimal places.\n * @private\n */\nexport function _decimalPlaces(x: number) {\n if (!isFiniteNumber(x)) {\n return;\n }\n let e = 1;\n let p = 0;\n while (Math.round(x * e) / e !== x) {\n e *= 10;\n p++;\n }\n return p;\n}\n\n// Gets the angle from vertical upright to the point about a centre.\nexport function getAngleFromPoint(\n centrePoint: Point,\n anglePoint: Point\n) {\n const distanceFromXCenter = anglePoint.x - centrePoint.x;\n const distanceFromYCenter = anglePoint.y - centrePoint.y;\n const radialDistanceFromCenter = Math.sqrt(distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);\n\n let angle = Math.atan2(distanceFromYCenter, distanceFromXCenter);\n\n if (angle < (-0.5 * PI)) {\n angle += TAU; // make sure the returned angle is in the range of (-PI/2, 3PI/2]\n }\n\n return {\n angle,\n distance: radialDistanceFromCenter\n };\n}\n\nexport function distanceBetweenPoints(pt1: Point, pt2: Point) {\n return Math.sqrt(Math.pow(pt2.x - pt1.x, 2) + Math.pow(pt2.y - pt1.y, 2));\n}\n\n/**\n * Shortest distance between angles, in either direction.\n * @private\n */\nexport function _angleDiff(a: number, b: number) {\n return (a - b + PITAU) % TAU - PI;\n}\n\n/**\n * Normalize angle to be between 0 and 2*PI\n * @private\n */\nexport function _normalizeAngle(a: number) {\n return (a % TAU + TAU) % TAU;\n}\n\n/**\n * @private\n */\nexport function _angleBetween(angle: number, start: number, end: number, sameAngleIsFullCircle?: boolean) {\n const a = _normalizeAngle(angle);\n const s = _normalizeAngle(start);\n const e = _normalizeAngle(end);\n const angleToStart = _normalizeAngle(s - a);\n const angleToEnd = _normalizeAngle(e - a);\n const startToAngle = _normalizeAngle(a - s);\n const endToAngle = _normalizeAngle(a - e);\n return a === s || a === e || (sameAngleIsFullCircle && s === e)\n || (angleToStart > angleToEnd && startToAngle < endToAngle);\n}\n\n/**\n * Limit `value` between `min` and `max`\n * @param value\n * @param min\n * @param max\n * @private\n */\nexport function _limitValue(value: number, min: number, max: number) {\n return Math.max(min, Math.min(max, value));\n}\n\n/**\n * @param {number} value\n * @private\n */\nexport function _int16Range(value: number) {\n return _limitValue(value, -32768, 32767);\n}\n\n/**\n * @param value\n * @param start\n * @param end\n * @param [epsilon]\n * @private\n */\nexport function _isBetween(value: number, start: number, end: number, epsilon = 1e-6) {\n return value >= Math.min(start, end) - epsilon && value <= Math.max(start, end) + epsilon;\n}\n","import {_capitalize} from './helpers.core.js';\n\n/**\n * Binary search\n * @param table - the table search. must be sorted!\n * @param value - value to find\n * @param cmp\n * @private\n */\nexport function _lookup(\n table: number[],\n value: number,\n cmp?: (value: number) => boolean\n): {lo: number, hi: number};\nexport function _lookup<T>(\n table: T[],\n value: number,\n cmp: (value: number) => boolean\n): {lo: number, hi: number};\nexport function _lookup(\n table: unknown[],\n value: number,\n cmp?: (value: number) => boolean\n) {\n cmp = cmp || ((index) => table[index] < value);\n let hi = table.length - 1;\n let lo = 0;\n let mid: number;\n\n while (hi - lo > 1) {\n mid = (lo + hi) >> 1;\n if (cmp(mid)) {\n lo = mid;\n } else {\n hi = mid;\n }\n }\n\n return {lo, hi};\n}\n\n/**\n * Binary search\n * @param table - the table search. must be sorted!\n * @param key - property name for the value in each entry\n * @param value - value to find\n * @param last - lookup last index\n * @private\n */\nexport const _lookupByKey = (\n table: Record<string, number>[],\n key: string,\n value: number,\n last?: boolean\n) =>\n _lookup(table, value, last\n ? index => {\n const ti = table[index][key];\n return ti < value || ti === value && table[index + 1][key] === value;\n }\n : index => table[index][key] < value);\n\n/**\n * Reverse binary search\n * @param table - the table search. must be sorted!\n * @param key - property name for the value in each entry\n * @param value - value to find\n * @private\n */\nexport const _rlookupByKey = (\n table: Record<string, number>[],\n key: string,\n value: number\n) =>\n _lookup(table, value, index => table[index][key] >= value);\n\n/**\n * Return subset of `values` between `min` and `max` inclusive.\n * Values are assumed to be in sorted order.\n * @param values - sorted array of values\n * @param min - min value\n * @param max - max value\n */\nexport function _filterBetween(values: number[], min: number, max: number) {\n let start = 0;\n let end = values.length;\n\n while (start < end && values[start] < min) {\n start++;\n }\n while (end > start && values[end - 1] > max) {\n end--;\n }\n\n return start > 0 || end < values.length\n ? values.slice(start, end)\n : values;\n}\n\nconst arrayEvents = ['push', 'pop', 'shift', 'splice', 'unshift'] as const;\n\nexport interface ArrayListener<T> {\n _onDataPush?(...item: T[]): void;\n _onDataPop?(): void;\n _onDataShift?(): void;\n _onDataSplice?(index: number, deleteCount: number, ...items: T[]): void;\n _onDataUnshift?(...item: T[]): void;\n}\n\n/**\n * Hooks the array methods that add or remove values ('push', pop', 'shift', 'splice',\n * 'unshift') and notify the listener AFTER the array has been altered. Listeners are\n * called on the '_onData*' callbacks (e.g. _onDataPush, etc.) with same arguments.\n */\nexport function listenArrayEvents<T>(array: T[], listener: ArrayListener<T>): void;\nexport function listenArrayEvents(array, listener) {\n if (array._chartjs) {\n array._chartjs.listeners.push(listener);\n return;\n }\n\n Object.defineProperty(array, '_chartjs', {\n configurable: true,\n enumerable: false,\n value: {\n listeners: [listener]\n }\n });\n\n arrayEvents.forEach((key) => {\n const method = '_onData' + _capitalize(key);\n const base = array[key];\n\n Object.defineProperty(array, key, {\n configurable: true,\n enumerable: false,\n value(...args) {\n const res = base.apply(this, args);\n\n array._chartjs.listeners.forEach((object) => {\n if (typeof object[method] === 'function') {\n object[method](...args);\n }\n });\n\n return res;\n }\n });\n });\n}\n\n\n/**\n * Removes the given array event listener and cleanup extra attached properties (such as\n * the _chartjs stub and overridden methods) if array doesn't have any more listeners.\n */\nexport function unlistenArrayEvents<T>(array: T[], listener: ArrayListener<T>): void;\nexport function unlistenArrayEvents(array, listener) {\n const stub = array._chartjs;\n if (!stub) {\n return;\n }\n\n const listeners = stub.listeners;\n const index = listeners.indexOf(listener);\n if (index !== -1) {\n listeners.splice(index, 1);\n }\n\n if (listeners.length > 0) {\n return;\n }\n\n arrayEvents.forEach((key) => {\n delete array[key];\n });\n\n delete array._chartjs;\n}\n\n/**\n * @param items\n */\nexport function _arrayUnique<T>(items: T[]) {\n const set = new Set<T>(items);\n\n if (set.size === items.length) {\n return items;\n }\n\n return Array.from(set);\n}\n","import type {ChartMeta, PointElement} from '../types/index.js';\n\nimport {_limitValue} from './helpers.math.js';\nimport {_lookupByKey} from './helpers.collection.js';\n\nexport function fontString(pixelSize: number, fontStyle: string, fontFamily: string) {\n return fontStyle + ' ' + pixelSize + 'px ' + fontFamily;\n}\n\n/**\n* Request animation polyfill\n*/\nexport const requestAnimFrame = (function() {\n if (typeof window === 'undefined') {\n return function(callback) {\n return callback();\n };\n }\n return window.requestAnimationFrame;\n}());\n\n/**\n * Throttles calling `fn` once per animation frame\n * Latest arguments are used on the actual call\n */\nexport function throttled<TArgs extends Array<any>>(\n fn: (...args: TArgs) => void,\n thisArg: any,\n) {\n let argsToUse = [] as TArgs;\n let ticking = false;\n\n return function(...args: TArgs) {\n // Save the args for use later\n argsToUse = args;\n if (!ticking) {\n ticking = true;\n requestAnimFrame.call(window, () => {\n ticking = false;\n fn.apply(thisArg, argsToUse);\n });\n }\n };\n}\n\n/**\n * Debounces calling `fn` for `delay` ms\n */\nexport function debounce<TArgs extends Array<any>>(fn: (...args: TArgs) => void, delay: number) {\n let timeout;\n return function(...args: TArgs) {\n if (delay) {\n clearTimeout(timeout);\n timeout = setTimeout(fn, delay, args);\n } else {\n fn.apply(this, args);\n }\n return delay;\n };\n}\n\n/**\n * Converts 'start' to 'left', 'end' to 'right' and others to 'center'\n * @private\n */\nexport const _toLeftRightCenter = (align: 'start' | 'end' | 'center') => align === 'start' ? 'left' : align === 'end' ? 'right' : 'center';\n\n/**\n * Returns `start`, `end` or `(start + end) / 2` depending on `align`. Defaults to `center`\n * @private\n */\nexport const _alignStartEnd = (align: 'start' | 'end' | 'center', start: number, end: number) => align === 'start' ? start : align === 'end' ? end : (start + end) / 2;\n\n/**\n * Returns `left`, `right` or `(left + right) / 2` depending on `align`. Defaults to `left`\n * @private\n */\nexport const _textX = (align: 'left' | 'right' | 'center', left: number, right: number, rtl: boolean) => {\n const check = rtl ? 'left' : 'right';\n return align === check ? right : align === 'center' ? (left + right) / 2 : left;\n};\n\n/**\n * Return start and count of visible points.\n * @private\n */\nexport function _getStartAndCountOfVisiblePoints(meta: ChartMeta<'line' | 'scatter'>, points: PointElement[], animationsDisabled: boolean) {\n const pointCount = points.length;\n\n let start = 0;\n let count = pointCount;\n\n if (meta._sorted) {\n const {iScale, _parsed} = meta;\n const axis = iScale.axis;\n const {min, max, minDefined, maxDefined} = iScale.getUserBounds();\n\n if (minDefined) {\n start = _limitValue(Math.min(\n // @ts-expect-error Need to type _parsed\n _lookupByKey(_parsed, axis, min).lo,\n // @ts-expect-error Need to fix types on _lookupByKey\n animationsDisabled ? pointCount : _lookupByKey(points, axis, iScale.getPixelForValue(min)).lo),\n 0, pointCount - 1);\n }\n if (maxDefined) {\n count = _limitValue(Math.max(\n // @ts-expect-error Need to type _parsed\n _lookupByKey(_parsed, iScale.axis, max, true).hi + 1,\n // @ts-expect-error Need to fix types on _lookupByKey\n animationsDisabled ? 0 : _lookupByKey(points, axis, iScale.getPixelForValue(max), true).hi + 1),\n start, pointCount) - start;\n } else {\n count = pointCount - start;\n }\n }\n\n return {start, count};\n}\n\n/**\n * Checks if the scale ranges have changed.\n * @param {object} meta - dataset meta.\n * @returns {boolean}\n * @private\n */\nexport function _scaleRangesChanged(meta) {\n const {xScale, yScale, _scaleRanges} = meta;\n const newRanges = {\n xmin: xScale.min,\n xmax: xScale.max,\n ymin: yScale.min,\n ymax: yScale.max\n };\n if (!_scaleRanges) {\n meta._scaleRanges = newRanges;\n return true;\n }\n const changed = _scaleRanges.xmin !== xScale.min\n\t\t|| _scaleRanges.xmax !== xScale.max\n\t\t|| _scaleRanges.ymin !== yScale.min\n\t\t|| _scaleRanges.ymax !== yScale.max;\n\n Object.assign(_scaleRanges, newRanges);\n return changed;\n}\n","import {requestAnimFrame} from '../helpers/helpers.extras.js';\n\n/**\n * @typedef { import('./core.animation.js').default } Animation\n * @typedef { import('./core.controller.js').default } Chart\n */\n\n/**\n * Please use the module's default export which provides a singleton instance\n * Note: class is export for typedoc\n */\nexport class Animator {\n constructor() {\n this._request = null;\n this._charts = new Map();\n this._running = false;\n this._lastDate = undefined;\n }\n\n /**\n\t * @private\n\t */\n _notify(chart, anims, date, type) {\n const callbacks = anims.listeners[type];\n const numSteps = anims.duration;\n\n callbacks.forEach(fn => fn({\n chart,\n initial: anims.initial,\n numSteps,\n currentStep: Math.min(date - anims.start, numSteps)\n }));\n }\n\n /**\n\t * @private\n\t */\n _refresh() {\n if (this._request) {\n return;\n }\n this._running = true;\n\n this._request = requestAnimFrame.call(window, () => {\n this._update();\n this._request = null;\n\n if (this._running) {\n this._refresh();\n }\n });\n }\n\n /**\n\t * @private\n\t */\n _update(date = Date.now()) {\n let remaining = 0;\n\n this._charts.forEach((anims, chart) => {\n if (!anims.running || !anims.items.length) {\n return;\n }\n const items = anims.items;\n let i = items.length - 1;\n let draw = false;\n let item;\n\n for (; i >= 0; --i) {\n item = items[i];\n\n if (item._active) {\n if (item._total > anims.duration) {\n // if the animation has been updated and its duration prolonged,\n // update to total duration of current animations run (for progress event)\n anims.duration = item._total;\n }\n item.tick(date);\n draw = true;\n } else {\n // Remove the item by replacing it with last item and removing the last\n // A lot faster than splice.\n items[i] = items[items.length - 1];\n items.pop();\n }\n }\n\n if (draw) {\n chart.draw();\n this._notify(chart, anims, date, 'progress');\n }\n\n if (!items.length) {\n anims.running = false;\n this._notify(chart, anims, date, 'complete');\n anims.initial = false;\n }\n\n remaining += items.length;\n });\n\n this._lastDate = date;\n\n if (remaining === 0) {\n this._running = false;\n }\n }\n\n /**\n\t * @private\n\t */\n _getAnims(chart) {\n const charts = this._charts;\n let anims = charts.get(chart);\n if (!anims) {\n anims = {\n running: false,\n initial: true,\n items: [],\n listeners: {\n complete: [],\n progress: []\n }\n };\n charts.set(chart, anims);\n }\n return anims;\n }\n\n /**\n\t * @param {Chart} chart\n\t * @param {string} event - event name\n\t * @param {Function} cb - callback\n\t */\n listen(chart, event, cb) {\n this._getAnims(chart).listeners[event].push(cb);\n }\n\n /**\n\t * Add animations\n\t * @param {Chart} chart\n\t * @param {Animation[]} items - animations\n\t */\n add(chart, items) {\n if (!items || !items.length) {\n return;\n }\n this._getAnims(chart).items.push(...items);\n }\n\n /**\n\t * Counts number of active animations for the chart\n\t * @param {Chart} chart\n\t */\n has(chart) {\n return this._getAnims(chart).items.length > 0;\n }\n\n /**\n\t * Start animating (all charts)\n\t * @param {Chart} chart\n\t */\n start(chart) {\n const anims = this._charts.get(chart);\n if (!anims) {\n return;\n }\n anims.running = true;\n anims.start = Date.now();\n anims.duration = anims.items.reduce((acc, cur) => Math.max(acc, cur._duration), 0);\n this._refresh();\n }\n\n running(chart) {\n if (!this._running) {\n return false;\n }\n const anims = this._charts.get(chart);\n if (!anims || !anims.running || !anims.items.length) {\n return false;\n }\n return true;\n }\n\n /**\n\t * Stop all animations for the chart\n\t * @param {Chart} chart\n\t */\n stop(chart) {\n const anims = this._charts.get(chart);\n if (!anims || !anims.items.length) {\n return;\n }\n const items = anims.items;\n let i = items.length - 1;\n\n for (; i >= 0; --i) {\n items[i].cancel();\n }\n anims.items = [];\n this._notify(chart, anims, Date.now(), 'complete');\n }\n\n /**\n\t * Remove chart from Animator\n\t * @param {Chart} chart\n\t */\n remove(chart) {\n return this._charts.delete(chart);\n }\n}\n\n// singleton instance\nexport default /* #__PURE__ */ new Animator();\n","/*!\n * @kurkle/color v0.3.2\n * https://github.com/kurkle/color#readme\n * (c) 2023 Jukka Kurkela\n * Released under the MIT License\n */\nfunction round(v) {\n return v + 0.5 | 0;\n}\nconst lim = (v, l, h) => Math.max(Math.min(v, h), l);\nfunction p2b(v) {\n return lim(round(v * 2.55), 0, 255);\n}\nfunction b2p(v) {\n return lim(round(v / 2.55), 0, 100);\n}\nfunction n2b(v) {\n return lim(round(v * 255), 0, 255);\n}\nfunction b2n(v) {\n return lim(round(v / 2.55) / 100, 0, 1);\n}\nfunction n2p(v) {\n return lim(round(v * 100), 0, 100);\n}\n\nconst map$1 = {0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, A: 10, B: 11, C: 12, D: 13, E: 14, F: 15, a: 10, b: 11, c: 12, d: 13, e: 14, f: 15};\nconst hex = [...'0123456789ABCDEF'];\nconst h1 = b => hex[b & 0xF];\nconst h2 = b => hex[(b & 0xF0) >> 4] + hex[b & 0xF];\nconst eq = b => ((b & 0xF0) >> 4) === (b & 0xF);\nconst isShort = v => eq(v.r) && eq(v.g) && eq(v.b) && eq(v.a);\nfunction hexParse(str) {\n var len = str.length;\n var ret;\n if (str[0] === '#') {\n if (len === 4 || len === 5) {\n ret = {\n r: 255 & map$1[str[1]] * 17,\n g: 255 & map$1[str[2]] * 17,\n b: 255 & map$1[str[3]] * 17,\n a: len === 5 ? map$1[str[4]] * 17 : 255\n };\n } else if (len === 7 || len === 9) {\n ret = {\n r: map$1[str[1]] << 4 | map$1[str[2]],\n g: map$1[str[3]] << 4 | map$1[str[4]],\n b: map$1[str[5]] << 4 | map$1[str[6]],\n a: len === 9 ? (map$1[str[7]] << 4 | map$1[str[8]]) : 255\n };\n }\n }\n return ret;\n}\nconst alpha = (a, f) => a < 255 ? f(a) : '';\nfunction hexString(v) {\n var f = isShort(v) ? h1 : h2;\n return v\n ? '#' + f(v.r) + f(v.g) + f(v.b) + alpha(v.a, f)\n : undefined;\n}\n\nconst HUE_RE = /^(hsla?|hwb|hsv)\\(\\s*([-+.e\\d]+)(?:deg)?[\\s,]+([-+.e\\d]+)%[\\s,]+([-+.e\\d]+)%(?:[\\s,]+([-+.e\\d]+)(%)?)?\\s*\\)$/;\nfunction hsl2rgbn(h, s, l) {\n const a = s * Math.min(l, 1 - l);\n const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n return [f(0), f(8), f(4)];\n}\nfunction hsv2rgbn(h, s, v) {\n const f = (n, k = (n + h / 60) % 6) => v - v * s * Math.max(Math.min(k, 4 - k, 1), 0);\n return [f(5), f(3), f(1)];\n}\nfunction hwb2rgbn(h, w, b) {\n const rgb = hsl2rgbn(h, 1, 0.5);\n let i;\n if (w + b > 1) {\n i = 1 / (w + b);\n w *= i;\n b *= i;\n }\n for (i = 0; i < 3; i++) {\n rgb[i] *= 1 - w - b;\n rgb[i] += w;\n }\n return rgb;\n}\nfunction hueValue(r, g, b, d, max) {\n if (r === max) {\n return ((g - b) / d) + (g < b ? 6 : 0);\n }\n if (g === max) {\n return (b - r) / d + 2;\n }\n return (r - g) / d + 4;\n}\nfunction rgb2hsl(v) {\n const range = 255;\n const r = v.r / range;\n const g = v.g / range;\n const b = v.b / range;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const l = (max + min) / 2;\n let h, s, d;\n if (max !== min) {\n d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n h = hueValue(r, g, b, d, max);\n h = h * 60 + 0.5;\n }\n return [h | 0, s || 0, l];\n}\nfunction calln(f, a, b, c) {\n return (\n Array.isArray(a)\n ? f(a[0], a[1], a[2])\n : f(a, b, c)\n ).map(n2b);\n}\nfunction hsl2rgb(h, s, l) {\n return calln(hsl2rgbn, h, s, l);\n}\nfunction hwb2rgb(h, w, b) {\n return calln(hwb2rgbn, h, w, b);\n}\nfunction hsv2rgb(h, s, v) {\n return calln(hsv2rgbn, h, s, v);\n}\nfunction hue(h) {\n return (h % 360 + 360) % 360;\n}\nfunction hueParse(str) {\n const m = HUE_RE.exec(str);\n let a = 255;\n let v;\n if (!m) {\n return;\n }\n if (m[5] !== v) {\n a = m[6] ? p2b(+m[5]) : n2b(+m[5]);\n }\n const h = hue(+m[2]);\n const p1 = +m[3] / 100;\n const p2 = +m[4] / 100;\n if (m[1] === 'hwb') {\n v = hwb2rgb(h, p1, p2);\n } else if (m[1] === 'hsv') {\n v = hsv2rgb(h, p1, p2);\n } else {\n v = hsl2rgb(h, p1, p2);\n }\n return {\n r: v[0],\n g: v[1],\n b: v[2],\n a: a\n };\n}\nfunction rotate(v, deg) {\n var h = rgb2hsl(v);\n h[0] = hue(h[0] + deg);\n h = hsl2rgb(h);\n v.r = h[0];\n v.g = h[1];\n v.b = h[2];\n}\nfunction hslString(v) {\n if (!v) {\n return;\n }\n const a = rgb2hsl(v);\n const h = a[0];\n const s = n2p(a[1]);\n const l = n2p(a[2]);\n return v.a < 255\n ? `hsla(${h}, ${s}%, ${l}%, ${b2n(v.a)})`\n : `hsl(${h}, ${s}%, ${l}%)`;\n}\n\nconst map = {\n x: 'dark',\n Z: 'light',\n Y: 're',\n X: 'blu',\n W: 'gr',\n V: 'medium',\n U: 'slate',\n A: 'ee',\n T: 'ol',\n S: 'or',\n B: 'ra',\n C: 'lateg',\n D: 'ights',\n R: 'in',\n Q: 'turquois',\n E: 'hi',\n P: 'ro',\n O: 'al',\n N: 'le',\n M: 'de',\n L: 'yello',\n F: 'en',\n K: 'ch',\n G: 'arks',\n H: 'ea',\n I: 'ightg',\n J: 'wh'\n};\nconst names$1 = {\n OiceXe: 'f0f8ff',\n antiquewEte: 'faebd7',\n aqua: 'ffff',\n aquamarRe: '7fffd4',\n azuY: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '0',\n blanKedOmond: 'ffebcd',\n Xe: 'ff',\n XeviTet: '8a2be2',\n bPwn: 'a52a2a',\n burlywood: 'deb887',\n caMtXe: '5f9ea0',\n KartYuse: '7fff00',\n KocTate: 'd2691e',\n cSO: 'ff7f50',\n cSnflowerXe: '6495ed',\n cSnsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: 'ffff',\n xXe: '8b',\n xcyan: '8b8b',\n xgTMnPd: 'b8860b',\n xWay: 'a9a9a9',\n xgYF: '6400',\n xgYy: 'a9a9a9',\n xkhaki: 'bdb76b',\n xmagFta: '8b008b',\n xTivegYF: '556b2f',\n xSange: 'ff8c00',\n xScEd: '9932cc',\n xYd: '8b0000',\n xsOmon: 'e9967a',\n xsHgYF: '8fbc8f',\n xUXe: '483d8b',\n xUWay: '2f4f4f',\n xUgYy: '2f4f4f',\n xQe: 'ced1',\n xviTet: '9400d3',\n dAppRk: 'ff1493',\n dApskyXe: 'bfff',\n dimWay: '696969',\n dimgYy: '696969',\n dodgerXe: '1e90ff',\n fiYbrick: 'b22222',\n flSOwEte: 'fffaf0',\n foYstWAn: '228b22',\n fuKsia: 'ff00ff',\n gaRsbSo: 'dcdcdc',\n ghostwEte: 'f8f8ff',\n gTd: 'ffd700',\n gTMnPd: 'daa520',\n Way: '808080',\n gYF: '8000',\n gYFLw: 'adff2f',\n gYy: '808080',\n honeyMw: 'f0fff0',\n hotpRk: 'ff69b4',\n RdianYd: 'cd5c5c',\n Rdigo: '4b0082',\n ivSy: 'fffff0',\n khaki: 'f0e68c',\n lavFMr: 'e6e6fa',\n lavFMrXsh: 'fff0f5',\n lawngYF: '7cfc00',\n NmoncEffon: 'fffacd',\n ZXe: 'add8e6',\n ZcSO: 'f08080',\n Zcyan: 'e0ffff',\n ZgTMnPdLw: 'fafad2',\n ZWay: 'd3d3d3',\n ZgYF: '90ee90',\n ZgYy: 'd3d3d3',\n ZpRk: 'ffb6c1',\n ZsOmon: 'ffa07a',\n ZsHgYF: '20b2aa',\n ZskyXe: '87cefa',\n ZUWay: '778899',\n ZUgYy: '778899',\n ZstAlXe: 'b0c4de',\n ZLw: 'ffffe0',\n lime: 'ff00',\n limegYF: '32cd32',\n lRF: 'faf0e6',\n magFta: 'ff00ff',\n maPon: '800000',\n VaquamarRe: '66cdaa',\n VXe: 'cd',\n VScEd: 'ba55d3',\n VpurpN: '9370db',\n VsHgYF: '3cb371',\n VUXe: '7b68ee',\n VsprRggYF: 'fa9a',\n VQe: '48d1cc',\n VviTetYd: 'c71585',\n midnightXe: '191970',\n mRtcYam: 'f5fffa',\n mistyPse: 'ffe4e1',\n moccasR: 'ffe4b5',\n navajowEte: 'ffdead',\n navy: '80',\n Tdlace: 'fdf5e6',\n Tive: '808000',\n TivedBb: '6b8e23',\n Sange: 'ffa500',\n SangeYd: 'ff4500',\n ScEd: 'da70d6',\n pOegTMnPd: 'eee8aa',\n pOegYF: '98fb98',\n pOeQe: 'afeeee',\n pOeviTetYd: 'db7093',\n papayawEp: 'ffefd5',\n pHKpuff: 'ffdab9',\n peru: 'cd853f',\n pRk: 'ffc0cb',\n plum: 'dda0dd',\n powMrXe: 'b0e0e6',\n purpN: '800080',\n YbeccapurpN: '663399',\n Yd: 'ff0000',\n Psybrown: 'bc8f8f',\n PyOXe: '4169e1',\n saddNbPwn: '8b4513',\n sOmon: 'fa8072',\n sandybPwn: 'f4a460',\n sHgYF: '2e8b57',\n sHshell: 'fff5ee',\n siFna: 'a0522d',\n silver: 'c0c0c0',\n skyXe: '87ceeb',\n UXe: '6a5acd',\n UWay: '708090',\n UgYy: '708090',\n snow: 'fffafa',\n sprRggYF: 'ff7f',\n stAlXe: '4682b4',\n tan: 'd2b48c',\n teO: '8080',\n tEstN: 'd8bfd8',\n tomato: 'ff6347',\n Qe: '40e0d0',\n viTet: 'ee82ee',\n JHt: 'f5deb3',\n wEte: 'ffffff',\n wEtesmoke: 'f5f5f5',\n Lw: 'ffff00',\n LwgYF: '9acd32'\n};\nfunction unpack() {\n const unpacked = {};\n const keys = Object.keys(names$1);\n const tkeys = Object.keys(map);\n let i, j, k, ok, nk;\n for (i = 0; i < keys.length; i++) {\n ok = nk = keys[i];\n for (j = 0; j < tkeys.length; j++) {\n k = tkeys[j];\n nk = nk.replace(k, map[k]);\n }\n k = parseInt(names$1[ok], 16);\n unpacked[nk] = [k >> 16 & 0xFF, k >> 8 & 0xFF, k & 0xFF];\n }\n return unpacked;\n}\n\nlet names;\nfunction nameParse(str) {\n if (!names) {\n names = unpack();\n names.transparent = [0, 0, 0, 0];\n }\n const a = names[str.toLowerCase()];\n return a && {\n r: a[0],\n g: a[1],\n b: a[2],\n a: a.length === 4 ? a[3] : 255\n };\n}\n\nconst RGB_RE = /^rgba?\\(\\s*([-+.\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?(?:[\\s,/]+([-+.e\\d]+)(%)?)?\\s*\\)$/;\nfunction rgbParse(str) {\n const m = RGB_RE.exec(str);\n let a = 255;\n let r, g, b;\n if (!m) {\n return;\n }\n if (m[7] !== r) {\n const v = +m[7];\n a = m[8] ? p2b(v) : lim(v * 255, 0, 255);\n }\n r = +m[1];\n g = +m[3];\n b = +m[5];\n r = 255 & (m[2] ? p2b(r) : lim(r, 0, 255));\n g = 255 & (m[4] ? p2b(g) : lim(g, 0, 255));\n b = 255 & (m[6] ? p2b(b) : lim(b, 0, 255));\n return {\n r: r,\n g: g,\n b: b,\n a: a\n };\n}\nfunction rgbString(v) {\n return v && (\n v.a < 255\n ? `rgba(${v.r}, ${v.g}, ${v.b}, ${b2n(v.a)})`\n : `rgb(${v.r}, ${v.g}, ${v.b})`\n );\n}\n\nconst to = v => v <= 0.0031308 ? v * 12.92 : Math.pow(v, 1.0 / 2.4) * 1.055 - 0.055;\nconst from = v => v <= 0.04045 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);\nfunction interpolate(rgb1, rgb2, t) {\n const r = from(b2n(rgb1.r));\n const g = from(b2n(rgb1.g));\n const b = from(b2n(rgb1.b));\n return {\n r: n2b(to(r + t * (from(b2n(rgb2.r)) - r))),\n g: n2b(to(g + t * (from(b2n(rgb2.g)) - g))),\n b: n2b(to(b + t * (from(b2n(rgb2.b)) - b))),\n a: rgb1.a + t * (rgb2.a - rgb1.a)\n };\n}\n\nfunction modHSL(v, i, ratio) {\n if (v) {\n let tmp = rgb2hsl(v);\n tmp[i] = Math.max(0, Math.min(tmp[i] + tmp[i] * ratio, i === 0 ? 360 : 1));\n tmp = hsl2rgb(tmp);\n v.r = tmp[0];\n v.g = tmp[1];\n v.b = tmp[2];\n }\n}\nfunction clone(v, proto) {\n return v ? Object.assign(proto || {}, v) : v;\n}\nfunction fromObject(input) {\n var v = {r: 0, g: 0, b: 0, a: 255};\n if (Array.isArray(input)) {\n if (input.length >= 3) {\n v = {r: input[0], g: input[1], b: input[2], a: 255};\n if (input.length > 3) {\n v.a = n2b(input[3]);\n }\n }\n } else {\n v = clone(input, {r: 0, g: 0, b: 0, a: 1});\n v.a = n2b(v.a);\n }\n return v;\n}\nfunction functionParse(str) {\n if (str.charAt(0) === 'r') {\n return rgbParse(str);\n }\n return hueParse(str);\n}\nclass Color {\n constructor(input) {\n if (input instanceof Color) {\n return input;\n }\n const type = typeof input;\n let v;\n if (type === 'object') {\n v = fromObject(input);\n } else if (type === 'string') {\n v = hexParse(input) || nameParse(input) || functionParse(input);\n }\n this._rgb = v;\n this._valid = !!v;\n }\n get valid() {\n return this._valid;\n }\n get rgb() {\n var v = clone(this._rgb);\n if (v) {\n v.a = b2n(v.a);\n }\n return v;\n }\n set rgb(obj) {\n this._rgb = fromObject(obj);\n }\n rgbString() {\n return this._valid ? rgbString(this._rgb) : undefined;\n }\n hexString() {\n return this._valid ? hexString(this._rgb) : undefined;\n }\n hslString() {\n return this._valid ? hslString(this._rgb) : undefined;\n }\n mix(color, weight) {\n if (color) {\n const c1 = this.rgb;\n const c2 = color.rgb;\n let w2;\n const p = weight === w2 ? 0.5 : weight;\n const w = 2 * p - 1;\n const a = c1.a - c2.a;\n const w1 = ((w * a === -1 ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n w2 = 1 - w1;\n c1.r = 0xFF & w1 * c1.r + w2 * c2.r + 0.5;\n c1.g = 0xFF & w1 * c1.g + w2 * c2.g + 0.5;\n c1.b = 0xFF & w1 * c1.b + w2 * c2.b + 0.5;\n c1.a = p * c1.a + (1 - p) * c2.a;\n this.rgb = c1;\n }\n return this;\n }\n interpolate(color, t) {\n if (color) {\n this._rgb = interpolate(this._rgb, color._rgb, t);\n }\n return this;\n }\n clone() {\n return new Color(this.rgb);\n }\n alpha(a) {\n this._rgb.a = n2b(a);\n return this;\n }\n clearer(ratio) {\n const rgb = this._rgb;\n rgb.a *= 1 - ratio;\n return this;\n }\n greyscale() {\n const rgb = this._rgb;\n const val = round(rgb.r * 0.3 + rgb.g * 0.59 + rgb.b * 0.11);\n rgb.r = rgb.g = rgb.b = val;\n return this;\n }\n opaquer(ratio) {\n const rgb = this._rgb;\n rgb.a *= 1 + ratio;\n return this;\n }\n negate() {\n const v = this._rgb;\n v.r = 255 - v.r;\n v.g = 255 - v.g;\n v.b = 255 - v.b;\n return this;\n }\n lighten(ratio) {\n modHSL(this._rgb, 2, ratio);\n return this;\n }\n darken(ratio) {\n modHSL(this._rgb, 2, -ratio);\n return this;\n }\n saturate(ratio) {\n modHSL(this._rgb, 1, ratio);\n return this;\n }\n desaturate(ratio) {\n modHSL(this._rgb, 1, -ratio);\n return this;\n }\n rotate(deg) {\n rotate(this._rgb, deg);\n return this;\n }\n}\n\nfunction index_esm(input) {\n return new Color(input);\n}\n\nexport { Color, b2n, b2p, index_esm as default, hexParse, hexString, hsl2rgb, hslString, hsv2rgb, hueParse, hwb2rgb, lim, n2b, n2p, nameParse, p2b, rgb2hsl, rgbParse, rgbString, rotate, round };\n","import {Color} from '@kurkle/color';\n\nexport function isPatternOrGradient(value: unknown): value is CanvasPattern | CanvasGradient {\n if (value && typeof value === 'object') {\n const type = value.toString();\n return type === '[object CanvasPattern]' || type === '[object CanvasGradient]';\n }\n\n return false;\n}\n\nexport function color(value: CanvasGradient): CanvasGradient;\nexport function color(value: CanvasPattern): CanvasPattern;\nexport function color(\n value:\n | string\n | { r: number; g: number; b: number; a: number }\n | [number, number, number]\n | [number, number, number, number]\n): Color;\nexport function color(value) {\n return isPatternOrGradient(value) ? value : new Color(value);\n}\n\nexport function getHoverColor(value: CanvasGradient): CanvasGradient;\nexport function getHoverColor(value: CanvasPattern): CanvasPattern;\nexport function getHoverColor(value: string): string;\nexport function getHoverColor(value) {\n return isPatternOrGradient(value)\n ? value\n : new Color(value).saturate(0.5).darken(0.1).hexString();\n}\n","const numbers = ['x', 'y', 'borderWidth', 'radius', 'tension'];\nconst colors = ['color', 'borderColor', 'backgroundColor'];\n\nexport function applyAnimationsDefaults(defaults) {\n defaults.set('animation', {\n delay: undefined,\n duration: 1000,\n easing: 'easeOutQuart',\n fn: undefined,\n from: undefined,\n loop: undefined,\n to: undefined,\n type: undefined,\n });\n\n defaults.describe('animation', {\n _fallback: false,\n _indexable: false,\n _scriptable: (name) => name !== 'onProgress' && name !== 'onComplete' && name !== 'fn',\n });\n\n defaults.set('animations', {\n colors: {\n type: 'color',\n properties: colors\n },\n numbers: {\n type: 'number',\n properties: numbers\n },\n });\n\n defaults.describe('animations', {\n _fallback: 'animation',\n });\n\n defaults.set('transitions', {\n active: {\n animation: {\n duration: 400\n }\n },\n resize: {\n animation: {\n duration: 0\n }\n },\n show: {\n animations: {\n colors: {\n from: 'transparent'\n },\n visible: {\n type: 'boolean',\n duration: 0 // show immediately\n },\n }\n },\n hide: {\n animations: {\n colors: {\n to: 'transparent'\n },\n visible: {\n type: 'boolean',\n easing: 'linear',\n fn: v => v | 0 // for keeping the dataset visible all the way through the animation\n },\n }\n }\n });\n}\n","\nconst intlCache = new Map<string, Intl.NumberFormat>();\n\nfunction getNumberFormat(locale: string, options?: Intl.NumberFormatOptions) {\n options = options || {};\n const cacheKey = locale + JSON.stringify(options);\n let formatter = intlCache.get(cacheKey);\n if (!formatter) {\n formatter = new Intl.NumberFormat(locale, options);\n intlCache.set(cacheKey, formatter);\n }\n return formatter;\n}\n\nexport function formatNumber(num: number, locale: string, options?: Intl.NumberFormatOptions) {\n return getNumberFormat(locale, options).format(num);\n}\n","import {isArray} from '../helpers/helpers.core.js';\nimport {formatNumber} from '../helpers/helpers.intl.js';\nimport {log10} from '../helpers/helpers.math.js';\n\n/**\n * Namespace to hold formatters for different types of ticks\n * @namespace Chart.Ticks.formatters\n */\nconst formatters = {\n /**\n * Formatter for value labels\n * @method Chart.Ticks.formatters.values\n * @param value the value to display\n * @return {string|string[]} the label to display\n */\n values(value) {\n return isArray(value) ? /** @type {string[]} */ (value) : '' + value;\n },\n\n /**\n * Formatter for numeric ticks\n * @method Chart.Ticks.formatters.numeric\n * @param tickValue {number} the value to be formatted\n * @param index {number} the position of the tickValue parameter in the ticks array\n * @param ticks {object[]} the list of ticks being converted\n * @return {string} string representation of the tickValue parameter\n */\n numeric(tickValue, index, ticks) {\n if (tickValue === 0) {\n return '0'; // never show decimal places for 0\n }\n\n const locale = this.chart.options.locale;\n let notation;\n let delta = tickValue; // This is used when there are less than 2 ticks as the tick interval.\n\n if (ticks.length > 1) {\n // all ticks are small or there huge numbers; use scientific notation\n const maxTick = Math.max(Math.abs(ticks[0].value), Math.abs(ticks[ticks.length - 1].value));\n if (maxTick < 1e-4 || maxTick > 1e+15) {\n notation = 'scientific';\n }\n\n delta = calculateDelta(tickValue, ticks);\n }\n\n const logDelta = log10(Math.abs(delta));\n\n // When datasets have values approaching Number.MAX_VALUE, the tick calculations might result in\n // infinity and eventually NaN. Passing NaN for minimumFractionDigits or maximumFractionDigits\n // will make the number formatter throw. So instead we check for isNaN and use a fallback value.\n //\n // toFixed has a max of 20 decimal places\n const numDecimal = isNaN(logDelta) ? 1 : Math.max(Math.min(-1 * Math.floor(logDelta), 20), 0);\n\n const options = {notation, minimumFractionDigits: numDecimal, maximumFractionDigits: numDecimal};\n Object.assign(options, this.options.ticks.format);\n\n return formatNumber(tickValue, locale, options);\n },\n\n\n /**\n * Formatter for logarithmic ticks\n * @method Chart.Ticks.formatters.logarithmic\n * @param tickValue {number} the value to be formatted\n * @param index {number} the position of the tickValue parameter in the ticks array\n * @param ticks {object[]} the list of ticks being converted\n * @return {string} string representation of the tickValue parameter\n */\n logarithmic(tickValue, index, ticks) {\n if (tickValue === 0) {\n return '0';\n }\n const remain = ticks[index].significand || (tickValue / (Math.pow(10, Math.floor(log10(tickValue)))));\n if ([1, 2, 3, 5, 10, 15].includes(remain) || index > 0.8 * ticks.length) {\n return formatters.numeric.call(this, tickValue, index, ticks);\n }\n return '';\n }\n\n};\n\n\nfunction calculateDelta(tickValue, ticks) {\n // Figure out how many digits to show\n // The space between the first two ticks might be smaller than normal spacing\n let delta = ticks.length > 3 ? ticks[2].value - ticks[1].value : ticks[1].value - ticks[0].value;\n\n // If we have a number like 2.5 as the delta, figure out how many decimal places we need\n if (Math.abs(delta) >= 1 && tickValue !== Math.floor(tickValue)) {\n // not an integer\n delta = tickValue - Math.floor(tickValue);\n }\n return delta;\n}\n\n/**\n * Namespace to hold static tick generation functions\n * @namespace Chart.Ticks\n */\nexport default {formatters};\n","import {getHoverColor} from '../helpers/helpers.color.js';\nimport {isObject, merge, valueOrDefault} from '../helpers/helpers.core.js';\nimport {applyAnimationsDefaults} from './core.animations.defaults.js';\nimport {applyLayoutsDefaults} from './core.layouts.defaults.js';\nimport {applyScaleDefaults} from './core.scale.defaults.js';\n\nexport const overrides = Object.create(null);\nexport const descriptors = Object.create(null);\n\n/**\n * @param {object} node\n * @param {string} key\n * @return {object}\n */\nfunction getScope(node, key) {\n if (!key) {\n return node;\n }\n const keys = key.split('.');\n for (let i = 0, n = keys.length; i < n; ++i) {\n const k = keys[i];\n node = node[k] || (node[k] = Object.create(null));\n }\n return node;\n}\n\nfunction set(root, scope, values) {\n if (typeof scope === 'string') {\n return merge(getScope(root, scope), values);\n }\n return merge(getScope(root, ''), scope);\n}\n\n/**\n * Please use the module's default export which provides a singleton instance\n * Note: class is exported for typedoc\n */\nexport class Defaults {\n constructor(_descriptors, _appliers) {\n this.animation = undefined;\n this.backgroundColor = 'rgba(0,0,0,0.1)';\n this.borderColor = 'rgba(0,0,0,0.1)';\n this.color = '#666';\n this.datasets = {};\n this.devicePixelRatio = (context) => context.chart.platform.getDevicePixelRatio();\n this.elements = {};\n this.events = [\n 'mousemove',\n 'mouseout',\n 'click',\n 'touchstart',\n 'touchmove'\n ];\n this.font = {\n family: \"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif\",\n size: 12,\n style: 'normal',\n lineHeight: 1.2,\n weight: null\n };\n this.hover = {};\n this.hoverBackgroundColor = (ctx, options) => getHoverColor(options.backgroundColor);\n this.hoverBorderColor = (ctx, options) => getHoverColor(options.borderColor);\n this.hoverColor = (ctx, options) => getHoverColor(options.color);\n this.indexAxis = 'x';\n this.interaction = {\n mode: 'nearest',\n intersect: true,\n includeInvisible: false\n };\n this.maintainAspectRatio = true;\n this.onHover = null;\n this.onClick = null;\n this.parsing = true;\n this.plugins = {};\n this.responsive = true;\n this.scale = undefined;\n this.scales = {};\n this.showLine = true;\n this.drawActiveElementsOnTop = true;\n\n this.describe(_descriptors);\n this.apply(_appliers);\n }\n\n /**\n\t * @param {string|object} scope\n\t * @param {object} [values]\n\t */\n set(scope, values) {\n return set(this, scope, values);\n }\n\n /**\n\t * @param {string} scope\n\t */\n get(scope) {\n return getScope(this, scope);\n }\n\n /**\n\t * @param {string|object} scope\n\t * @param {object} [values]\n\t */\n describe(scope, values) {\n return set(descriptors, scope, values);\n }\n\n override(scope, values) {\n return set(overrides, scope, values);\n }\n\n /**\n\t * Routes the named defaults to fallback to another scope/name.\n\t * This routing is useful when those target values, like defaults.color, are changed runtime.\n\t * If the values would be copied, the runtime change would not take effect. By routing, the\n\t * fallback is evaluated at each access, so its always up to date.\n\t *\n\t * Example:\n\t *\n\t * \tdefaults.route('elements.arc', 'backgroundColor', '', 'color')\n\t * - reads the backgroundColor from defaults.color when undefined locally\n\t *\n\t * @param {string} scope Scope this route applies to.\n\t * @param {string} name Property name that should be routed to different namespace when not defined here.\n\t * @param {string} targetScope The namespace where those properties should be routed to.\n\t * Empty string ('') is the root of defaults.\n\t * @param {string} targetName The target name in the target scope the property should be routed to.\n\t */\n route(scope, name, targetScope, targetName) {\n const scopeObject = getScope(this, scope);\n const targetScopeObject = getScope(this, targetScope);\n const privateName = '_' + name;\n\n Object.defineProperties(scopeObject, {\n // A private property is defined to hold the actual value, when this property is set in its scope (set in the setter)\n [privateName]: {\n value: scopeObject[name],\n writable: true\n },\n // The actual property is defined as getter/setter so we can do the routing when value is not locally set.\n [name]: {\n enumerable: true,\n get() {\n const local = this[privateName];\n const target = targetScopeObject[targetName];\n if (isObject(local)) {\n return Object.assign({}, target, local);\n }\n return valueOrDefault(local, target);\n },\n set(value) {\n this[privateName] = value;\n }\n }\n });\n }\n\n apply(appliers) {\n appliers.forEach((apply) => apply(this));\n }\n}\n\n// singleton instance\nexport default /* #__PURE__ */ new Defaults({\n _scriptable: (name) => !name.startsWith('on'),\n _indexable: (name) => name !== 'events',\n hover: {\n _fallback: 'interaction'\n },\n interaction: {\n _scriptable: false,\n _indexable: false,\n }\n}, [applyAnimationsDefaults, applyLayoutsDefaults, applyScaleDefaults]);\n","export function applyLayoutsDefaults(defaults) {\n defaults.set('layout', {\n autoPadding: true,\n padding: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n }\n });\n}\n","import Ticks from './core.ticks.js';\n\nexport function applyScaleDefaults(defaults) {\n defaults.set('scale', {\n display: true,\n offset: false,\n reverse: false,\n beginAtZero: false,\n\n /**\n * Scale boundary strategy (bypassed by min/max time options)\n * - `data`: make sure data are fully visible, ticks outside are removed\n * - `ticks`: make sure ticks are fully visible, data outside are truncated\n * @see https://github.com/chartjs/Chart.js/pull/4556\n * @since 3.0.0\n */\n bounds: 'ticks',\n\n /**\n * Addition grace added to max and reduced from min data value.\n * @since 3.0.0\n */\n grace: 0,\n\n // grid line settings\n grid: {\n display: true,\n lineWidth: 1,\n drawOnChartArea: true,\n drawTicks: true,\n tickLength: 8,\n tickWidth: (_ctx, options) => options.lineWidth,\n tickColor: (_ctx, options) => options.color,\n offset: false,\n },\n\n border: {\n display: true,\n dash: [],\n dashOffset: 0.0,\n width: 1\n },\n\n // scale title\n title: {\n // display property\n display: false,\n\n // actual label\n text: '',\n\n // top/bottom padding\n padding: {\n top: 4,\n bottom: 4\n }\n },\n\n // label settings\n ticks: {\n minRotation: 0,\n maxRotation: 50,\n mirror: false,\n textStrokeWidth: 0,\n textStrokeColor: '',\n padding: 3,\n display: true,\n autoSkip: true,\n autoSkipPadding: 3,\n labelOffset: 0,\n // We pass through arrays to be rendered as multiline labels, we convert Others to strings here.\n callback: Ticks.formatters.values,\n minor: {},\n major: {},\n align: 'center',\n crossAlign: 'near',\n\n showLabelBackdrop: false,\n backdropColor: 'rgba(255, 255, 255, 0.75)',\n backdropPadding: 2,\n }\n });\n\n defaults.route('scale.ticks', 'color', '', 'color');\n defaults.route('scale.grid', 'color', '', 'borderColor');\n defaults.route('scale.border', 'color', '', 'borderColor');\n defaults.route('scale.title', 'color', '', 'color');\n\n defaults.describe('scale', {\n _fallback: false,\n _scriptable: (name) => !name.startsWith('before') && !name.startsWith('after') && name !== 'callback' && name !== 'parser',\n _indexable: (name) => name !== 'borderDash' && name !== 'tickBorderDash' && name !== 'dash',\n });\n\n defaults.describe('scales', {\n _fallback: 'scale',\n });\n\n defaults.describe('scale.ticks', {\n _scriptable: (name) => name !== 'backdropPadding' && name !== 'callback',\n _indexable: (name) => name !== 'backdropPadding',\n });\n}\n","import type {ChartArea, Scale} from '../types/index.js';\nimport type Chart from '../core/core.controller.js';\nimport type {ChartEvent} from '../types.js';\nimport {INFINITY} from './helpers.math.js';\n\n/**\n * Note: typedefs are auto-exported, so use a made-up `dom` namespace where\n * necessary to avoid duplicates with `export * from './helpers`; see\n * https://github.com/microsoft/TypeScript/issues/46011\n * @typedef { import('../core/core.controller.js').default } dom.Chart\n * @typedef { import('../../types').ChartEvent } ChartEvent\n */\n\n/**\n * @private\n */\nexport function _isDomSupported(): boolean {\n return typeof window !== 'undefined' && typeof document !== 'undefined';\n}\n\n/**\n * @private\n */\nexport function _getParentNode(domNode: HTMLCanvasElement): HTMLCanvasElement {\n let parent = domNode.parentNode;\n if (parent && parent.toString() === '[object ShadowRoot]') {\n parent = (parent as ShadowRoot).host;\n }\n return parent as HTMLCanvasElement;\n}\n\n/**\n * convert max-width/max-height values that may be percentages into a number\n * @private\n */\n\nfunction parseMaxStyle(styleValue: string | number, node: HTMLElement, parentProperty: string) {\n let valueInPixels: number;\n if (typeof styleValue === 'string') {\n valueInPixels = parseInt(styleValue, 10);\n\n if (styleValue.indexOf('%') !== -1) {\n // percentage * size in dimension\n valueInPixels = (valueInPixels / 100) * node.parentNode[parentProperty];\n }\n } else {\n valueInPixels = styleValue;\n }\n\n return valueInPixels;\n}\n\nconst getComputedStyle = (element: HTMLElement): CSSStyleDeclaration =>\n element.ownerDocument.defaultView.getComputedStyle(element, null);\n\nexport function getStyle(el: HTMLElement, property: string): string {\n return getComputedStyle(el).getPropertyValue(property);\n}\n\nconst positions = ['top', 'right', 'bottom', 'left'];\nfunction getPositionedStyle(styles: CSSStyleDeclaration, style: string, suffix?: string): ChartArea {\n const result = {} as ChartArea;\n suffix = suffix ? '-' + suffix : '';\n for (let i = 0; i < 4; i++) {\n const pos = positions[i];\n result[pos] = parseFloat(styles[style + '-' + pos + suffix]) || 0;\n }\n result.width = result.left + result.right;\n result.height = result.top + result.bottom;\n return result;\n}\n\nconst useOffsetPos = (x: number, y: number, target: HTMLElement | EventTarget) =>\n (x > 0 || y > 0) && (!target || !(target as HTMLElement).shadowRoot);\n\n/**\n * @param e\n * @param canvas\n * @returns Canvas position\n */\nfunction getCanvasPosition(\n e: Event | TouchEvent | MouseEvent,\n canvas: HTMLCanvasElement\n): {\n x: number;\n y: number;\n box: boolean;\n } {\n const touches = (e as TouchEvent).touches;\n const source = (touches && touches.length ? touches[0] : e) as MouseEvent;\n const {offsetX, offsetY} = source as MouseEvent;\n let box = false;\n let x, y;\n if (useOffsetPos(offsetX, offsetY, e.target)) {\n x = offsetX;\n y = offsetY;\n } else {\n const rect = canvas.getBoundingClientRect();\n x = source.clientX - rect.left;\n y = source.clientY - rect.top;\n box = true;\n }\n return {x, y, box};\n}\n\n/**\n * Gets an event's x, y coordinates, relative to the chart area\n * @param event\n * @param chart\n * @returns x and y coordinates of the event\n */\n\nexport function getRelativePosition(\n event: Event | ChartEvent | TouchEvent | MouseEvent,\n chart: Chart\n): { x: number; y: number } {\n if ('native' in event) {\n return event;\n }\n\n const {canvas, currentDevicePixelRatio} = chart;\n const style = getComputedStyle(canvas);\n const borderBox = style.boxSizing === 'border-box';\n const paddings = getPositionedStyle(style, 'padding');\n const borders = getPositionedStyle(style, 'border', 'width');\n const {x, y, box} = getCanvasPosition(event, canvas);\n const xOffset = paddings.left + (box && borders.left);\n const yOffset = paddings.top + (box && borders.top);\n\n let {width, height} = chart;\n if (borderBox) {\n width -= paddings.width + borders.width;\n height -= paddings.height + borders.height;\n }\n return {\n x: Math.round((x - xOffset) / width * canvas.width / currentDevicePixelRatio),\n y: Math.round((y - yOffset) / height * canvas.height / currentDevicePixelRatio)\n };\n}\n\nfunction getContainerSize(canvas: HTMLCanvasElement, width: number, height: number): Partial<Scale> {\n let maxWidth: number, maxHeight: number;\n\n if (width === undefined || height === undefined) {\n const container = _getParentNode(canvas);\n if (!container) {\n width = canvas.clientWidth;\n height = canvas.clientHeight;\n } else {\n const rect = container.getBoundingClientRect(); // this is the border box of the container\n const containerStyle = getComputedStyle(container);\n const containerBorder = getPositionedStyle(containerStyle, 'border', 'width');\n const containerPadding = getPositionedStyle(containerStyle, 'padding');\n width = rect.width - containerPadding.width - containerBorder.width;\n height = rect.height - containerPadding.height - containerBorder.height;\n maxWidth = parseMaxStyle(containerStyle.maxWidth, container, 'clientWidth');\n maxHeight = parseMaxStyle(containerStyle.maxHeight, container, 'clientHeight');\n }\n }\n return {\n width,\n height,\n maxWidth: maxWidth || INFINITY,\n maxHeight: maxHeight || INFINITY\n };\n}\n\nconst round1 = (v: number) => Math.round(v * 10) / 10;\n\n// eslint-disable-next-line complexity\nexport function getMaximumSize(\n canvas: HTMLCanvasElement,\n bbWidth?: number,\n bbHeight?: number,\n aspectRatio?: number\n): { width: number; height: number } {\n const style = getComputedStyle(canvas);\n const margins = getPositionedStyle(style, 'margin');\n const maxWidth = parseMaxStyle(style.maxWidth, canvas, 'clientWidth') || INFINITY;\n const maxHeight = parseMaxStyle(style.maxHeight, canvas, 'clientHeight') || INFINITY;\n const containerSize = getContainerSize(canvas, bbWidth, bbHeight);\n let {width, height} = containerSize;\n\n if (style.boxSizing === 'content-box') {\n const borders = getPositionedStyle(style, 'border', 'width');\n const paddings = getPositionedStyle(style, 'padding');\n width -= paddings.width + borders.width;\n height -= paddings.height + borders.height;\n }\n width = Math.max(0, width - margins.width);\n height = Math.max(0, aspectRatio ? width / aspectRatio : height - margins.height);\n width = round1(Math.min(width, maxWidth, containerSize.maxWidth));\n height = round1(Math.min(height, maxHeight, containerSize.maxHeight));\n if (width && !height) {\n // https://github.com/chartjs/Chart.js/issues/4659\n // If the canvas has width, but no height, default to aspectRatio of 2 (canvas default)\n height = round1(width / 2);\n }\n\n const maintainHeight = bbWidth !== undefined || bbHeight !== undefined;\n\n if (maintainHeight && aspectRatio && containerSize.height && height > containerSize.height) {\n height = containerSize.height;\n width = round1(Math.floor(height * aspectRatio));\n }\n\n return {width, height};\n}\n\n/**\n * @param chart\n * @param forceRatio\n * @param forceStyle\n * @returns True if the canvas context size or transformation has changed.\n */\nexport function retinaScale(\n chart: Chart,\n forceRatio: number,\n forceStyle?: boolean\n): boolean | void {\n const pixelRatio = forceRatio || 1;\n const deviceHeight = Math.floor(chart.height * pixelRatio);\n const deviceWidth = Math.floor(chart.width * pixelRatio);\n\n chart.height = Math.floor(chart.height);\n chart.width = Math.floor(chart.width);\n\n const canvas = chart.canvas;\n\n // If no style has been set on the canvas, the render size is used as display size,\n // making the chart visually bigger, so let's enforce it to the \"correct\" values.\n // See https://github.com/chartjs/Chart.js/issues/3575\n if (canvas.style && (forceStyle || (!canvas.style.height && !canvas.style.width))) {\n canvas.style.height = `${chart.height}px`;\n canvas.style.width = `${chart.width}px`;\n }\n\n if (chart.currentDevicePixelRatio !== pixelRatio\n || canvas.height !== deviceHeight\n || canvas.width !== deviceWidth) {\n chart.currentDevicePixelRatio = pixelRatio;\n canvas.height = deviceHeight;\n canvas.width = deviceWidth;\n chart.ctx.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n return true;\n }\n return false;\n}\n\n/**\n * Detects support for options object argument in addEventListener.\n * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\n * @private\n */\nexport const supportsEventListenerOptions = (function() {\n let passiveSupported = false;\n try {\n const options = {\n get passive() { // This function will be called when the browser attempts to access the passive property.\n passiveSupported = true;\n return false;\n }\n } as EventListenerOptions;\n\n window.addEventListener('test', null, options);\n window.removeEventListener('test', null, options);\n } catch (e) {\n // continue regardless of error\n }\n return passiveSupported;\n}());\n\n/**\n * The \"used\" size is the final value of a dimension property after all calculations have\n * been performed. This method uses the computed style of `element` but returns undefined\n * if the computed style is not expressed in pixels. That can happen in some cases where\n * `element` has a size relative to its parent and this last one is not yet displayed,\n * for example because of `display: none` on a parent node.\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/used_value\n * @returns Size in pixels or undefined if unknown.\n */\n\nexport function readUsedSize(\n element: HTMLElement,\n property: 'width' | 'height'\n): number | undefined {\n const value = getStyle(element, property);\n const matches = value && value.match(/^(\\d+)(\\.\\d+)?px$/);\n return matches ? +matches[1] : undefined;\n}\n","import type {\n Chart,\n Point,\n FontSpec,\n CanvasFontSpec,\n PointStyle,\n RenderTextOpts,\n BackdropOptions\n} from '../types/index.js';\nimport type {\n TRBL,\n SplinePoint,\n RoundedRect,\n TRBLCorners\n} from '../types/geometric.js';\nimport {isArray, isNullOrUndef} from './helpers.core.js';\nimport {PI, TAU, HALF_PI, QUARTER_PI, TWO_THIRDS_PI, RAD_PER_DEG} from './helpers.math.js';\n\n/**\n * Converts the given font object into a CSS font string.\n * @param font - A font object.\n * @return The CSS font string. See https://developer.mozilla.org/en-US/docs/Web/CSS/font\n * @private\n */\nexport function toFontString(font: FontSpec) {\n if (!font || isNullOrUndef(font.size) || isNullOrUndef(font.family)) {\n return null;\n }\n\n return (font.style ? font.style + ' ' : '')\n\t\t+ (font.weight ? font.weight + ' ' : '')\n\t\t+ font.size + 'px '\n\t\t+ font.family;\n}\n\n/**\n * @private\n */\nexport function _measureText(\n ctx: CanvasRenderingContext2D,\n data: Record<string, number>,\n gc: string[],\n longest: number,\n string: string\n) {\n let textWidth = data[string];\n if (!textWidth) {\n textWidth = data[string] = ctx.measureText(string).width;\n gc.push(string);\n }\n if (textWidth > longest) {\n longest = textWidth;\n }\n return longest;\n}\n\ntype Thing = string | undefined | null\ntype Things = (Thing | Thing[])[]\n\n/**\n * @private\n */\n// eslint-disable-next-line complexity\nexport function _longestText(\n ctx: CanvasRenderingContext2D,\n font: string,\n arrayOfThings: Things,\n cache?: {data?: Record<string, number>, garbageCollect?: string[], font?: string}\n) {\n cache = cache || {};\n let data = cache.data = cache.data || {};\n let gc = cache.garbageCollect = cache.garbageCollect || [];\n\n if (cache.font !== font) {\n data = cache.data = {};\n gc = cache.garbageCollect = [];\n cache.font = font;\n }\n\n ctx.save();\n\n ctx.font = font;\n let longest = 0;\n const ilen = arrayOfThings.length;\n let i: number, j: number, jlen: number, thing: Thing | Thing[], nestedThing: Thing | Thing[];\n for (i = 0; i < ilen; i++) {\n thing = arrayOfThings[i];\n\n // Undefined strings and arrays should not be measured\n if (thing !== undefined && thing !== null && !isArray(thing)) {\n longest = _measureText(ctx, data, gc, longest, thing);\n } else if (isArray(thing)) {\n // if it is an array lets measure each element\n // to do maybe simplify this function a bit so we can do this more recursively?\n for (j = 0, jlen = thing.length; j < jlen; j++) {\n nestedThing = thing[j];\n // Undefined strings and arrays should not be measured\n if (nestedThing !== undefined && nestedThing !== null && !isArray(nestedThing)) {\n longest = _measureText(ctx, data, gc, longest, nestedThing);\n }\n }\n }\n }\n\n ctx.restore();\n\n const gcLen = gc.length / 2;\n if (gcLen > arrayOfThings.length) {\n for (i = 0; i < gcLen; i++) {\n delete data[gc[i]];\n }\n gc.splice(0, gcLen);\n }\n return longest;\n}\n\n/**\n * Returns the aligned pixel value to avoid anti-aliasing blur\n * @param chart - The chart instance.\n * @param pixel - A pixel value.\n * @param width - The width of the element.\n * @returns The aligned pixel value.\n * @private\n */\nexport function _alignPixel(chart: Chart, pixel: number, width: number) {\n const devicePixelRatio = chart.currentDevicePixelRatio;\n const halfWidth = width !== 0 ? Math.max(width / 2, 0.5) : 0;\n return Math.round((pixel - halfWidth) * devicePixelRatio) / devicePixelRatio + halfWidth;\n}\n\n/**\n * Clears the entire canvas.\n */\nexport function clearCanvas(canvas: HTMLCanvasElement, ctx?: CanvasRenderingContext2D) {\n ctx = ctx || canvas.getContext('2d');\n\n ctx.save();\n // canvas.width and canvas.height do not consider the canvas transform,\n // while clearRect does\n ctx.resetTransform();\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.restore();\n}\n\nexport interface DrawPointOptions {\n pointStyle: PointStyle;\n rotation?: number;\n radius: number;\n borderWidth: number;\n}\n\nexport function drawPoint(\n ctx: CanvasRenderingContext2D,\n options: DrawPointOptions,\n x: number,\n y: number\n) {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n drawPointLegend(ctx, options, x, y, null);\n}\n\n// eslint-disable-next-line complexity\nexport function drawPointLegend(\n ctx: CanvasRenderingContext2D,\n options: DrawPointOptions,\n x: number,\n y: number,\n w: number\n) {\n let type: string, xOffset: number, yOffset: number, size: number, cornerRadius: number, width: number, xOffsetW: number, yOffsetW: number;\n const style = options.pointStyle;\n const rotation = options.rotation;\n const radius = options.radius;\n let rad = (rotation || 0) * RAD_PER_DEG;\n\n if (style && typeof style === 'object') {\n type = style.toString();\n if (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') {\n ctx.save();\n ctx.translate(x, y);\n ctx.rotate(rad);\n ctx.drawImage(style, -style.width / 2, -style.height / 2, style.width, style.height);\n ctx.restore();\n return;\n }\n }\n\n if (isNaN(radius) || radius <= 0) {\n return;\n }\n\n ctx.beginPath();\n\n switch (style) {\n // Default includes circle\n default:\n if (w) {\n ctx.ellipse(x, y, w / 2, radius, 0, 0, TAU);\n } else {\n ctx.arc(x, y, radius, 0, TAU);\n }\n ctx.closePath();\n break;\n case 'triangle':\n width = w ? w / 2 : radius;\n ctx.moveTo(x + Math.sin(rad) * width, y - Math.cos(rad) * radius);\n rad += TWO_THIRDS_PI;\n ctx.lineTo(x + Math.sin(rad) * width, y - Math.cos(rad) * radius);\n rad += TWO_THIRDS_PI;\n ctx.lineTo(x + Math.sin(rad) * width, y - Math.cos(rad) * radius);\n ctx.closePath();\n break;\n case 'rectRounded':\n // NOTE: the rounded rect implementation changed to use `arc` instead of\n // `quadraticCurveTo` since it generates better results when rect is\n // almost a circle. 0.516 (instead of 0.5) produces results with visually\n // closer proportion to the previous impl and it is inscribed in the\n // circle with `radius`. For more details, see the following PRs:\n // https://github.com/chartjs/Chart.js/issues/5597\n // https://github.com/chartjs/Chart.js/issues/5858\n cornerRadius = radius * 0.516;\n size = radius - cornerRadius;\n xOffset = Math.cos(rad + QUARTER_PI) * size;\n xOffsetW = Math.cos(rad + QUARTER_PI) * (w ? w / 2 - cornerRadius : size);\n yOffset = Math.sin(rad + QUARTER_PI) * size;\n yOffsetW = Math.sin(rad + QUARTER_PI) * (w ? w / 2 - cornerRadius : size);\n ctx.arc(x - xOffsetW, y - yOffset, cornerRadius, rad - PI, rad - HALF_PI);\n ctx.arc(x + yOffsetW, y - xOffset, cornerRadius, rad - HALF_PI, rad);\n ctx.arc(x + xOffsetW, y + yOffset, cornerRadius, rad, rad + HALF_PI);\n ctx.arc(x - yOffsetW, y + xOffset, cornerRadius, rad + HALF_PI, rad + PI);\n ctx.closePath();\n break;\n case 'rect':\n if (!rotation) {\n size = Math.SQRT1_2 * radius;\n width = w ? w / 2 : size;\n ctx.rect(x - width, y - size, 2 * width, 2 * size);\n break;\n }\n rad += QUARTER_PI;\n /* falls through */\n case 'rectRot':\n xOffsetW = Math.cos(rad) * (w ? w / 2 : radius);\n xOffset = Math.cos(rad) * radius;\n yOffset = Math.sin(rad) * radius;\n yOffsetW = Math.sin(rad) * (w ? w / 2 : radius);\n ctx.moveTo(x - xOffsetW, y - yOffset);\n ctx.lineTo(x + yOffsetW, y - xOffset);\n ctx.lineTo(x + xOffsetW, y + yOffset);\n ctx.lineTo(x - yOffsetW, y + xOffset);\n ctx.closePath();\n break;\n case 'crossRot':\n rad += QUARTER_PI;\n /* falls through */\n case 'cross':\n xOffsetW = Math.cos(rad) * (w ? w / 2 : radius);\n xOffset = Math.cos(rad) * radius;\n yOffset = Math.sin(rad) * radius;\n yOffsetW = Math.sin(rad) * (w ? w / 2 : radius);\n ctx.moveTo(x - xOffsetW, y - yOffset);\n ctx.lineTo(x + xOffsetW, y + yOffset);\n ctx.moveTo(x + yOffsetW, y - xOffset);\n ctx.lineTo(x - yOffsetW, y + xOffset);\n break;\n case 'star':\n xOffsetW = Math.cos(rad) * (w ? w / 2 : radius);\n xOffset = Math.cos(rad) * radius;\n yOffset = Math.sin(rad) * radius;\n yOffsetW = Math.sin(rad) * (w ? w / 2 : radius);\n ctx.moveTo(x - xOffsetW, y - yOffset);\n ctx.lineTo(x + xOffsetW, y + yOffset);\n ctx.moveTo(x + yOffsetW, y - xOffset);\n ctx.lineTo(x - yOffsetW, y + xOffset);\n rad += QUARTER_PI;\n xOffsetW = Math.cos(rad) * (w ? w / 2 : radius);\n xOffset = Math.cos(rad) * radius;\n yOffset = Math.sin(rad) * radius;\n yOffsetW = Math.sin(rad) * (w ? w / 2 : radius);\n ctx.moveTo(x - xOffsetW, y - yOffset);\n ctx.lineTo(x + xOffsetW, y + yOffset);\n ctx.moveTo(x + yOffsetW, y - xOffset);\n ctx.lineTo(x - yOffsetW, y + xOffset);\n break;\n case 'line':\n xOffset = w ? w / 2 : Math.cos(rad) * radius;\n yOffset = Math.sin(rad) * radius;\n ctx.moveTo(x - xOffset, y - yOffset);\n ctx.lineTo(x + xOffset, y + yOffset);\n break;\n case 'dash':\n ctx.moveTo(x, y);\n ctx.lineTo(x + Math.cos(rad) * (w ? w / 2 : radius), y + Math.sin(rad) * radius);\n break;\n case false:\n ctx.closePath();\n break;\n }\n\n ctx.fill();\n if (options.borderWidth > 0) {\n ctx.stroke();\n }\n}\n\n/**\n * Returns true if the point is inside the rectangle\n * @param point - The point to test\n * @param area - The rectangle\n * @param margin - allowed margin\n * @private\n */\nexport function _isPointInArea(\n point: Point,\n area: TRBL,\n margin?: number\n) {\n margin = margin || 0.5; // margin - default is to match rounded decimals\n\n return !area || (point && point.x > area.left - margin && point.x < area.right + margin &&\n\t\tpoint.y > area.top - margin && point.y < area.bottom + margin);\n}\n\nexport function clipArea(ctx: CanvasRenderingContext2D, area: TRBL) {\n ctx.save();\n ctx.beginPath();\n ctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top);\n ctx.clip();\n}\n\nexport function unclipArea(ctx: CanvasRenderingContext2D) {\n ctx.restore();\n}\n\n/**\n * @private\n */\nexport function _steppedLineTo(\n ctx: CanvasRenderingContext2D,\n previous: Point,\n target: Point,\n flip?: boolean,\n mode?: string\n) {\n if (!previous) {\n return ctx.lineTo(target.x, target.y);\n }\n if (mode === 'middle') {\n const midpoint = (previous.x + target.x) / 2.0;\n ctx.lineTo(midpoint, previous.y);\n ctx.lineTo(midpoint, target.y);\n } else if (mode === 'after' !== !!flip) {\n ctx.lineTo(previous.x, target.y);\n } else {\n ctx.lineTo(target.x, previous.y);\n }\n ctx.lineTo(target.x, target.y);\n}\n\n/**\n * @private\n */\nexport function _bezierCurveTo(\n ctx: CanvasRenderingContext2D,\n previous: SplinePoint,\n target: SplinePoint,\n flip?: boolean\n) {\n if (!previous) {\n return ctx.lineTo(target.x, target.y);\n }\n ctx.bezierCurveTo(\n flip ? previous.cp1x : previous.cp2x,\n flip ? previous.cp1y : previous.cp2y,\n flip ? target.cp2x : target.cp1x,\n flip ? target.cp2y : target.cp1y,\n target.x,\n target.y);\n}\n\nfunction setRenderOpts(ctx: CanvasRenderingContext2D, opts: RenderTextOpts) {\n if (opts.translation) {\n ctx.translate(opts.translation[0], opts.translation[1]);\n }\n\n if (!isNullOrUndef(opts.rotation)) {\n ctx.rotate(opts.rotation);\n }\n\n if (opts.color) {\n ctx.fillStyle = opts.color;\n }\n\n if (opts.textAlign) {\n ctx.textAlign = opts.textAlign;\n }\n\n if (opts.textBaseline) {\n ctx.textBaseline = opts.textBaseline;\n }\n}\n\nfunction decorateText(\n ctx: CanvasRenderingContext2D,\n x: number,\n y: number,\n line: string,\n opts: RenderTextOpts\n) {\n if (opts.strikethrough || opts.underline) {\n /**\n * Now that IE11 support has been dropped, we can use more\n * of the TextMetrics object. The actual bounding boxes\n * are unflagged in Chrome, Firefox, Edge, and Safari so they\n * can be safely used.\n * See https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics#Browser_compatibility\n */\n const metrics = ctx.measureText(line);\n const left = x - metrics.actualBoundingBoxLeft;\n const right = x + metrics.actualBoundingBoxRight;\n const top = y - metrics.actualBoundingBoxAscent;\n const bottom = y + metrics.actualBoundingBoxDescent;\n const yDecoration = opts.strikethrough ? (top + bottom) / 2 : bottom;\n\n ctx.strokeStyle = ctx.fillStyle;\n ctx.beginPath();\n ctx.lineWidth = opts.decorationWidth || 2;\n ctx.moveTo(left, yDecoration);\n ctx.lineTo(right, yDecoration);\n ctx.stroke();\n }\n}\n\nfunction drawBackdrop(ctx: CanvasRenderingContext2D, opts: BackdropOptions) {\n const oldColor = ctx.fillStyle;\n\n ctx.fillStyle = opts.color as string;\n ctx.fillRect(opts.left, opts.top, opts.width, opts.height);\n ctx.fillStyle = oldColor;\n}\n\n/**\n * Render text onto the canvas\n */\nexport function renderText(\n ctx: CanvasRenderingContext2D,\n text: string | string[],\n x: number,\n y: number,\n font: CanvasFontSpec,\n opts: RenderTextOpts = {}\n) {\n const lines = isArray(text) ? text : [text];\n const stroke = opts.strokeWidth > 0 && opts.strokeColor !== '';\n let i: number, line: string;\n\n ctx.save();\n ctx.font = font.string;\n setRenderOpts(ctx, opts);\n\n for (i = 0; i < lines.length; ++i) {\n line = lines[i];\n\n if (opts.backdrop) {\n drawBackdrop(ctx, opts.backdrop);\n }\n\n if (stroke) {\n if (opts.strokeColor) {\n ctx.strokeStyle = opts.strokeColor;\n }\n\n if (!isNullOrUndef(opts.strokeWidth)) {\n ctx.lineWidth = opts.strokeWidth;\n }\n\n ctx.strokeText(line, x, y, opts.maxWidth);\n }\n\n ctx.fillText(line, x, y, opts.maxWidth);\n decorateText(ctx, x, y, line, opts);\n\n y += Number(font.lineHeight);\n }\n\n ctx.restore();\n}\n\n/**\n * Add a path of a rectangle with rounded corners to the current sub-path\n * @param ctx - Context\n * @param rect - Bounding rect\n */\nexport function addRoundedRectPath(\n ctx: CanvasRenderingContext2D,\n rect: RoundedRect & { radius: TRBLCorners }\n) {\n const {x, y, w, h, radius} = rect;\n\n // top left arc\n ctx.arc(x + radius.topLeft, y + radius.topLeft, radius.topLeft, -HALF_PI, PI, true);\n\n // line from top left to bottom left\n ctx.lineTo(x, y + h - radius.bottomLeft);\n\n // bottom left arc\n ctx.arc(x + radius.bottomLeft, y + h - radius.bottomLeft, radius.bottomLeft, PI, HALF_PI, true);\n\n // line from bottom left to bottom right\n ctx.lineTo(x + w - radius.bottomRight, y + h);\n\n // bottom right arc\n ctx.arc(x + w - radius.bottomRight, y + h - radius.bottomRight, radius.bottomRight, HALF_PI, 0, true);\n\n // line from bottom right to top right\n ctx.lineTo(x + w, y + radius.topRight);\n\n // top right arc\n ctx.arc(x + w - radius.topRight, y + radius.topRight, radius.topRight, 0, -HALF_PI, true);\n\n // line from top right to top left\n ctx.lineTo(x + radius.topLeft, y);\n}\n","/* eslint-disable @typescript-eslint/no-use-before-define */\nimport type {AnyObject} from '../types/basic.js';\nimport type {ChartMeta} from '../types/index.js';\nimport type {\n ResolverObjectKey,\n ResolverCache,\n ResolverProxy,\n DescriptorDefaults,\n Descriptor,\n ContextCache,\n ContextProxy\n} from './helpers.config.types.js';\nimport {isArray, isFunction, isObject, resolveObjectKey, _capitalize} from './helpers.core.js';\n\nexport * from './helpers.config.types.js';\n\n/**\n * Creates a Proxy for resolving raw values for options.\n * @param scopes - The option scopes to look for values, in resolution order\n * @param prefixes - The prefixes for values, in resolution order.\n * @param rootScopes - The root option scopes\n * @param fallback - Parent scopes fallback\n * @param getTarget - callback for getting the target for changed values\n * @returns Proxy\n * @private\n */\nexport function _createResolver<\n T extends AnyObject[] = AnyObject[],\n R extends AnyObject[] = T\n>(\n scopes: T,\n prefixes = [''],\n rootScopes?: R,\n fallback?: ResolverObjectKey,\n getTarget = () => scopes[0]\n) {\n const finalRootScopes = rootScopes || scopes;\n if (typeof fallback === 'undefined') {\n fallback = _resolve('_fallback', scopes);\n }\n const cache: ResolverCache<T, R> = {\n [Symbol.toStringTag]: 'Object',\n _cacheable: true,\n _scopes: scopes,\n _rootScopes: finalRootScopes,\n _fallback: fallback,\n _getTarget: getTarget,\n override: (scope: AnyObject) => _createResolver([scope, ...scopes], prefixes, finalRootScopes, fallback),\n };\n return new Proxy(cache, {\n /**\n * A trap for the delete operator.\n */\n deleteProperty(target, prop: string) {\n delete target[prop]; // remove from cache\n delete target._keys; // remove cached keys\n delete scopes[0][prop]; // remove from top level scope\n return true;\n },\n\n /**\n * A trap for getting property values.\n */\n get(target, prop: string) {\n return _cached(target, prop,\n () => _resolveWithPrefixes(prop, prefixes, scopes, target));\n },\n\n /**\n * A trap for Object.getOwnPropertyDescriptor.\n * Also used by Object.hasOwnProperty.\n */\n getOwnPropertyDescriptor(target, prop) {\n return Reflect.getOwnPropertyDescriptor(target._scopes[0], prop);\n },\n\n /**\n * A trap for Object.getPrototypeOf.\n */\n getPrototypeOf() {\n return Reflect.getPrototypeOf(scopes[0]);\n },\n\n /**\n * A trap for the in operator.\n */\n has(target, prop: string) {\n return getKeysFromAllScopes(target).includes(prop);\n },\n\n /**\n * A trap for Object.getOwnPropertyNames and Object.getOwnPropertySymbols.\n */\n ownKeys(target) {\n return getKeysFromAllScopes(target);\n },\n\n /**\n * A trap for setting property values.\n */\n set(target, prop: string, value) {\n const storage = target._storage || (target._storage = getTarget());\n target[prop] = storage[prop] = value; // set to top level scope + cache\n delete target._keys; // remove cached keys\n return true;\n }\n }) as ResolverProxy<T, R>;\n}\n\n/**\n * Returns an Proxy for resolving option values with context.\n * @param proxy - The Proxy returned by `_createResolver`\n * @param context - Context object for scriptable/indexable options\n * @param subProxy - The proxy provided for scriptable options\n * @param descriptorDefaults - Defaults for descriptors\n * @private\n */\nexport function _attachContext<\n T extends AnyObject[] = AnyObject[],\n R extends AnyObject[] = T\n>(\n proxy: ResolverProxy<T, R>,\n context: AnyObject,\n subProxy?: ResolverProxy<T, R>,\n descriptorDefaults?: DescriptorDefaults\n) {\n const cache: ContextCache<T, R> = {\n _cacheable: false,\n _proxy: proxy,\n _context: context,\n _subProxy: subProxy,\n _stack: new Set(),\n _descriptors: _descriptors(proxy, descriptorDefaults),\n setContext: (ctx: AnyObject) => _attachContext(proxy, ctx, subProxy, descriptorDefaults),\n override: (scope: AnyObject) => _attachContext(proxy.override(scope), context, subProxy, descriptorDefaults)\n };\n return new Proxy(cache, {\n /**\n * A trap for the delete operator.\n */\n deleteProperty(target, prop) {\n delete target[prop]; // remove from cache\n delete proxy[prop]; // remove from proxy\n return true;\n },\n\n /**\n * A trap for getting property values.\n */\n get(target, prop: string, receiver) {\n return _cached(target, prop,\n () => _resolveWithContext(target, prop, receiver));\n },\n\n /**\n * A trap for Object.getOwnPropertyDescriptor.\n * Also used by Object.hasOwnProperty.\n */\n getOwnPropertyDescriptor(target, prop) {\n return target._descriptors.allKeys\n ? Reflect.has(proxy, prop) ? {enumerable: true, configurable: true} : undefined\n : Reflect.getOwnPropertyDescriptor(proxy, prop);\n },\n\n /**\n * A trap for Object.getPrototypeOf.\n */\n getPrototypeOf() {\n return Reflect.getPrototypeOf(proxy);\n },\n\n /**\n * A trap for the in operator.\n */\n has(target, prop) {\n return Reflect.has(proxy, prop);\n },\n\n /**\n * A trap for Object.getOwnPropertyNames and Object.getOwnPropertySymbols.\n */\n ownKeys() {\n return Reflect.ownKeys(proxy);\n },\n\n /**\n * A trap for setting property values.\n */\n set(target, prop, value) {\n proxy[prop] = value; // set to proxy\n delete target[prop]; // remove from cache\n return true;\n }\n }) as ContextProxy<T, R>;\n}\n\n/**\n * @private\n */\nexport function _descriptors(\n proxy: ResolverCache,\n defaults: DescriptorDefaults = {scriptable: true, indexable: true}\n): Descriptor {\n const {_scriptable = defaults.scriptable, _indexable = defaults.indexable, _allKeys = defaults.allKeys} = proxy;\n return {\n allKeys: _allKeys,\n scriptable: _scriptable,\n indexable: _indexable,\n isScriptable: isFunction(_scriptable) ? _scriptable : () => _scriptable,\n isIndexable: isFunction(_indexable) ? _indexable : () => _indexable\n };\n}\n\nconst readKey = (prefix: string, name: string) => prefix ? prefix + _capitalize(name) : name;\nconst needsSubResolver = (prop: string, value: unknown) => isObject(value) && prop !== 'adapters' &&\n (Object.getPrototypeOf(value) === null || value.constructor === Object);\n\nfunction _cached(\n target: AnyObject,\n prop: string,\n resolve: () => unknown\n) {\n if (Object.prototype.hasOwnProperty.call(target, prop)) {\n return target[prop];\n }\n\n const value = resolve();\n // cache the resolved value\n target[prop] = value;\n return value;\n}\n\nfunction _resolveWithContext(\n target: ContextCache,\n prop: string,\n receiver: AnyObject\n) {\n const {_proxy, _context, _subProxy, _descriptors: descriptors} = target;\n let value = _proxy[prop]; // resolve from proxy\n\n // resolve with context\n if (isFunction(value) && descriptors.isScriptable(prop)) {\n value = _resolveScriptable(prop, value, target, receiver);\n }\n if (isArray(value) && value.length) {\n value = _resolveArray(prop, value, target, descriptors.isIndexable);\n }\n if (needsSubResolver(prop, value)) {\n // if the resolved value is an object, create a sub resolver for it\n value = _attachContext(value, _context, _subProxy && _subProxy[prop], descriptors);\n }\n return value;\n}\n\nfunction _resolveScriptable(\n prop: string,\n getValue: (ctx: AnyObject, sub: AnyObject) => unknown,\n target: ContextCache,\n receiver: AnyObject\n) {\n const {_proxy, _context, _subProxy, _stack} = target;\n if (_stack.has(prop)) {\n throw new Error('Recursion detected: ' + Array.from(_stack).join('->') + '->' + prop);\n }\n _stack.add(prop);\n let value = getValue(_context, _subProxy || receiver);\n _stack.delete(prop);\n if (needsSubResolver(prop, value)) {\n // When scriptable option returns an object, create a resolver on that.\n value = createSubResolver(_proxy._scopes, _proxy, prop, value);\n }\n return value;\n}\n\nfunction _resolveArray(\n prop: string,\n value: unknown[],\n target: ContextCache,\n isIndexable: (key: string) => boolean\n) {\n const {_proxy, _context, _subProxy, _descriptors: descriptors} = target;\n\n if (typeof _context.index !== 'undefined' && isIndexable(prop)) {\n return value[_context.index % value.length];\n } else if (isObject(value[0])) {\n // Array of objects, return array or resolvers\n const arr = value;\n const scopes = _proxy._scopes.filter(s => s !== arr);\n value = [];\n for (const item of arr) {\n const resolver = createSubResolver(scopes, _proxy, prop, item);\n value.push(_attachContext(resolver, _context, _subProxy && _subProxy[prop], descriptors));\n }\n }\n return value;\n}\n\nfunction resolveFallback(\n fallback: ResolverObjectKey | ((prop: ResolverObjectKey, value: unknown) => ResolverObjectKey),\n prop: ResolverObjectKey,\n value: unknown\n) {\n return isFunction(fallback) ? fallback(prop, value) : fallback;\n}\n\nconst getScope = (key: ResolverObjectKey, parent: AnyObject) => key === true ? parent\n : typeof key === 'string' ? resolveObjectKey(parent, key) : undefined;\n\nfunction addScopes(\n set: Set<AnyObject>,\n parentScopes: AnyObject[],\n key: ResolverObjectKey,\n parentFallback: ResolverObjectKey,\n value: unknown\n) {\n for (const parent of parentScopes) {\n const scope = getScope(key, parent);\n if (scope) {\n set.add(scope);\n const fallback = resolveFallback(scope._fallback, key, value);\n if (typeof fallback !== 'undefined' && fallback !== key && fallback !== parentFallback) {\n // When we reach the descriptor that defines a new _fallback, return that.\n // The fallback will resume to that new scope.\n return fallback;\n }\n } else if (scope === false && typeof parentFallback !== 'undefined' && key !== parentFallback) {\n // Fallback to `false` results to `false`, when falling back to different key.\n // For example `interaction` from `hover` or `plugins.tooltip` and `animation` from `animations`\n return null;\n }\n }\n return false;\n}\n\nfunction createSubResolver(\n parentScopes: AnyObject[],\n resolver: ResolverCache,\n prop: ResolverObjectKey,\n value: unknown\n) {\n const rootScopes = resolver._rootScopes;\n const fallback = resolveFallback(resolver._fallback, prop, value);\n const allScopes = [...parentScopes, ...rootScopes];\n const set = new Set<AnyObject>();\n set.add(value);\n let key = addScopesFromKey(set, allScopes, prop, fallback || prop, value);\n if (key === null) {\n return false;\n }\n if (typeof fallback !== 'undefined' && fallback !== prop) {\n key = addScopesFromKey(set, allScopes, fallback, key, value);\n if (key === null) {\n return false;\n }\n }\n return _createResolver(Array.from(set), [''], rootScopes, fallback,\n () => subGetTarget(resolver, prop as string, value));\n}\n\nfunction addScopesFromKey(\n set: Set<AnyObject>,\n allScopes: AnyObject[],\n key: ResolverObjectKey,\n fallback: ResolverObjectKey,\n item: unknown\n) {\n while (key) {\n key = addScopes(set, allScopes, key, fallback, item);\n }\n return key;\n}\n\nfunction subGetTarget(\n resolver: ResolverCache,\n prop: string,\n value: unknown\n) {\n const parent = resolver._getTarget();\n if (!(prop in parent)) {\n parent[prop] = {};\n }\n const target = parent[prop];\n if (isArray(target) && isObject(value)) {\n // For array of objects, the object is used to store updated values\n return value;\n }\n return target || {};\n}\n\nfunction _resolveWithPrefixes(\n prop: string,\n prefixes: string[],\n scopes: AnyObject[],\n proxy: ResolverProxy\n) {\n let value: unknown;\n for (const prefix of prefixes) {\n value = _resolve(readKey(prefix, prop), scopes);\n if (typeof value !== 'undefined') {\n return needsSubResolver(prop, value)\n ? createSubResolver(scopes, proxy, prop, value)\n : value;\n }\n }\n}\n\nfunction _resolve(key: string, scopes: AnyObject[]) {\n for (const scope of scopes) {\n if (!scope) {\n continue;\n }\n const value = scope[key];\n if (typeof value !== 'undefined') {\n return value;\n }\n }\n}\n\nfunction getKeysFromAllScopes(target: ResolverCache) {\n let keys = target._keys;\n if (!keys) {\n keys = target._keys = resolveKeysFromAllScopes(target._scopes);\n }\n return keys;\n}\n\nfunction resolveKeysFromAllScopes(scopes: AnyObject[]) {\n const set = new Set<string>();\n for (const scope of scopes) {\n for (const key of Object.keys(scope).filter(k => !k.startsWith('_'))) {\n set.add(key);\n }\n }\n return Array.from(set);\n}\n\nexport function _parseObjectDataRadialScale(\n meta: ChartMeta<'line' | 'scatter'>,\n data: AnyObject[],\n start: number,\n count: number\n) {\n const {iScale} = meta;\n const {key = 'r'} = this._parsing;\n const parsed = new Array<{r: unknown}>(count);\n let i: number, ilen: number, index: number, item: AnyObject;\n\n for (i = 0, ilen = count; i < ilen; ++i) {\n index = i + start;\n item = data[index];\n parsed[i] = {\n r: iScale.parse(resolveObjectKey(item, key), index)\n };\n }\n return parsed;\n}\n","import {almostEquals, distanceBetweenPoints, sign} from './helpers.math.js';\nimport {_isPointInArea} from './helpers.canvas.js';\nimport type {ChartArea} from '../types/index.js';\nimport type {SplinePoint} from '../types/geometric.js';\n\nconst EPSILON = Number.EPSILON || 1e-14;\n\ntype OptionalSplinePoint = SplinePoint | false\nconst getPoint = (points: SplinePoint[], i: number): OptionalSplinePoint => i < points.length && !points[i].skip && points[i];\nconst getValueAxis = (indexAxis: 'x' | 'y') => indexAxis === 'x' ? 'y' : 'x';\n\nexport function splineCurve(\n firstPoint: SplinePoint,\n middlePoint: SplinePoint,\n afterPoint: SplinePoint,\n t: number\n): {\n previous: SplinePoint\n next: SplinePoint\n } {\n // Props to Rob Spencer at scaled innovation for his post on splining between points\n // http://scaledinnovation.com/analytics/splines/aboutSplines.html\n\n // This function must also respect \"skipped\" points\n\n const previous = firstPoint.skip ? middlePoint : firstPoint;\n const current = middlePoint;\n const next = afterPoint.skip ? middlePoint : afterPoint;\n const d01 = distanceBetweenPoints(current, previous);\n const d12 = distanceBetweenPoints(next, current);\n\n let s01 = d01 / (d01 + d12);\n let s12 = d12 / (d01 + d12);\n\n // If all points are the same, s01 & s02 will be inf\n s01 = isNaN(s01) ? 0 : s01;\n s12 = isNaN(s12) ? 0 : s12;\n\n const fa = t * s01; // scaling factor for triangle Ta\n const fb = t * s12;\n\n return {\n previous: {\n x: current.x - fa * (next.x - previous.x),\n y: current.y - fa * (next.y - previous.y)\n },\n next: {\n x: current.x + fb * (next.x - previous.x),\n y: current.y + fb * (next.y - previous.y)\n }\n };\n}\n\n/**\n * Adjust tangents to ensure monotonic properties\n */\nfunction monotoneAdjust(points: SplinePoint[], deltaK: number[], mK: number[]) {\n const pointsLen = points.length;\n\n let alphaK: number, betaK: number, tauK: number, squaredMagnitude: number, pointCurrent: OptionalSplinePoint;\n let pointAfter = getPoint(points, 0);\n for (let i = 0; i < pointsLen - 1; ++i) {\n pointCurrent = pointAfter;\n pointAfter = getPoint(points, i + 1);\n if (!pointCurrent || !pointAfter) {\n continue;\n }\n\n if (almostEquals(deltaK[i], 0, EPSILON)) {\n mK[i] = mK[i + 1] = 0;\n continue;\n }\n\n alphaK = mK[i] / deltaK[i];\n betaK = mK[i + 1] / deltaK[i];\n squaredMagnitude = Math.pow(alphaK, 2) + Math.pow(betaK, 2);\n if (squaredMagnitude <= 9) {\n continue;\n }\n\n tauK = 3 / Math.sqrt(squaredMagnitude);\n mK[i] = alphaK * tauK * deltaK[i];\n mK[i + 1] = betaK * tauK * deltaK[i];\n }\n}\n\nfunction monotoneCompute(points: SplinePoint[], mK: number[], indexAxis: 'x' | 'y' = 'x') {\n const valueAxis = getValueAxis(indexAxis);\n const pointsLen = points.length;\n let delta: number, pointBefore: OptionalSplinePoint, pointCurrent: OptionalSplinePoint;\n let pointAfter = getPoint(points, 0);\n\n for (let i = 0; i < pointsLen; ++i) {\n pointBefore = pointCurrent;\n pointCurrent = pointAfter;\n pointAfter = getPoint(points, i + 1);\n if (!pointCurrent) {\n continue;\n }\n\n const iPixel = pointCurrent[indexAxis];\n const vPixel = pointCurrent[valueAxis];\n if (pointBefore) {\n delta = (iPixel - pointBefore[indexAxis]) / 3;\n pointCurrent[`cp1${indexAxis}`] = iPixel - delta;\n pointCurrent[`cp1${valueAxis}`] = vPixel - delta * mK[i];\n }\n if (pointAfter) {\n delta = (pointAfter[indexAxis] - iPixel) / 3;\n pointCurrent[`cp2${indexAxis}`] = iPixel + delta;\n pointCurrent[`cp2${valueAxis}`] = vPixel + delta * mK[i];\n }\n }\n}\n\n/**\n * This function calculates Bézier control points in a similar way than |splineCurve|,\n * but preserves monotonicity of the provided data and ensures no local extremums are added\n * between the dataset discrete points due to the interpolation.\n * See : https://en.wikipedia.org/wiki/Monotone_cubic_interpolation\n */\nexport function splineCurveMonotone(points: SplinePoint[], indexAxis: 'x' | 'y' = 'x') {\n const valueAxis = getValueAxis(indexAxis);\n const pointsLen = points.length;\n const deltaK: number[] = Array(pointsLen).fill(0);\n const mK: number[] = Array(pointsLen);\n\n // Calculate slopes (deltaK) and initialize tangents (mK)\n let i, pointBefore: OptionalSplinePoint, pointCurrent: OptionalSplinePoint;\n let pointAfter = getPoint(points, 0);\n\n for (i = 0; i < pointsLen; ++i) {\n pointBefore = pointCurrent;\n pointCurrent = pointAfter;\n pointAfter = getPoint(points, i + 1);\n if (!pointCurrent) {\n continue;\n }\n\n if (pointAfter) {\n const slopeDelta = pointAfter[indexAxis] - pointCurrent[indexAxis];\n\n // In the case of two points that appear at the same x pixel, slopeDeltaX is 0\n deltaK[i] = slopeDelta !== 0 ? (pointAfter[valueAxis] - pointCurrent[valueAxis]) / slopeDelta : 0;\n }\n mK[i] = !pointBefore ? deltaK[i]\n : !pointAfter ? deltaK[i - 1]\n : (sign(deltaK[i - 1]) !== sign(deltaK[i])) ? 0\n : (deltaK[i - 1] + deltaK[i]) / 2;\n }\n\n monotoneAdjust(points, deltaK, mK);\n\n monotoneCompute(points, mK, indexAxis);\n}\n\nfunction capControlPoint(pt: number, min: number, max: number) {\n return Math.max(Math.min(pt, max), min);\n}\n\nfunction capBezierPoints(points: SplinePoint[], area: ChartArea) {\n let i, ilen, point, inArea, inAreaPrev;\n let inAreaNext = _isPointInArea(points[0], area);\n for (i = 0, ilen = points.length; i < ilen; ++i) {\n inAreaPrev = inArea;\n inArea = inAreaNext;\n inAreaNext = i < ilen - 1 && _isPointInArea(points[i + 1], area);\n if (!inArea) {\n continue;\n }\n point = points[i];\n if (inAreaPrev) {\n point.cp1x = capControlPoint(point.cp1x, area.left, area.right);\n point.cp1y = capControlPoint(point.cp1y, area.top, area.bottom);\n }\n if (inAreaNext) {\n point.cp2x = capControlPoint(point.cp2x, area.left, area.right);\n point.cp2y = capControlPoint(point.cp2y, area.top, area.bottom);\n }\n }\n}\n\n/**\n * @private\n */\nexport function _updateBezierControlPoints(\n points: SplinePoint[],\n options,\n area: ChartArea,\n loop: boolean,\n indexAxis: 'x' | 'y'\n) {\n let i: number, ilen: number, point: SplinePoint, controlPoints: ReturnType<typeof splineCurve>;\n\n // Only consider points that are drawn in case the spanGaps option is used\n if (options.spanGaps) {\n points = points.filter((pt) => !pt.skip);\n }\n\n if (options.cubicInterpolationMode === 'monotone') {\n splineCurveMonotone(points, indexAxis);\n } else {\n let prev = loop ? points[points.length - 1] : points[0];\n for (i = 0, ilen = points.length; i < ilen; ++i) {\n point = points[i];\n controlPoints = splineCurve(\n prev,\n point,\n points[Math.min(i + 1, ilen - (loop ? 0 : 1)) % ilen],\n options.tension\n );\n point.cp1x = controlPoints.previous.x;\n point.cp1y = controlPoints.previous.y;\n point.cp2x = controlPoints.next.x;\n point.cp2y = controlPoints.next.y;\n prev = point;\n }\n }\n\n if (options.capBezierPoints) {\n capBezierPoints(points, area);\n }\n}\n","import {PI, TAU, HALF_PI} from './helpers.math.js';\n\nconst atEdge = (t: number) => t === 0 || t === 1;\nconst elasticIn = (t: number, s: number, p: number) => -(Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * TAU / p));\nconst elasticOut = (t: number, s: number, p: number) => Math.pow(2, -10 * t) * Math.sin((t - s) * TAU / p) + 1;\n\n/**\n * Easing functions adapted from Robert Penner's easing equations.\n * @namespace Chart.helpers.easing.effects\n * @see http://www.robertpenner.com/easing/\n */\nconst effects = {\n linear: (t: number) => t,\n\n easeInQuad: (t: number) => t * t,\n\n easeOutQuad: (t: number) => -t * (t - 2),\n\n easeInOutQuad: (t: number) => ((t /= 0.5) < 1)\n ? 0.5 * t * t\n : -0.5 * ((--t) * (t - 2) - 1),\n\n easeInCubic: (t: number) => t * t * t,\n\n easeOutCubic: (t: number) => (t -= 1) * t * t + 1,\n\n easeInOutCubic: (t: number) => ((t /= 0.5) < 1)\n ? 0.5 * t * t * t\n : 0.5 * ((t -= 2) * t * t + 2),\n\n easeInQuart: (t: number) => t * t * t * t,\n\n easeOutQuart: (t: number) => -((t -= 1) * t * t * t - 1),\n\n easeInOutQuart: (t: number) => ((t /= 0.5) < 1)\n ? 0.5 * t * t * t * t\n : -0.5 * ((t -= 2) * t * t * t - 2),\n\n easeInQuint: (t: number) => t * t * t * t * t,\n\n easeOutQuint: (t: number) => (t -= 1) * t * t * t * t + 1,\n\n easeInOutQuint: (t: number) => ((t /= 0.5) < 1)\n ? 0.5 * t * t * t * t * t\n : 0.5 * ((t -= 2) * t * t * t * t + 2),\n\n easeInSine: (t: number) => -Math.cos(t * HALF_PI) + 1,\n\n easeOutSine: (t: number) => Math.sin(t * HALF_PI),\n\n easeInOutSine: (t: number) => -0.5 * (Math.cos(PI * t) - 1),\n\n easeInExpo: (t: number) => (t === 0) ? 0 : Math.pow(2, 10 * (t - 1)),\n\n easeOutExpo: (t: number) => (t === 1) ? 1 : -Math.pow(2, -10 * t) + 1,\n\n easeInOutExpo: (t: number) => atEdge(t) ? t : t < 0.5\n ? 0.5 * Math.pow(2, 10 * (t * 2 - 1))\n : 0.5 * (-Math.pow(2, -10 * (t * 2 - 1)) + 2),\n\n easeInCirc: (t: number) => (t >= 1) ? t : -(Math.sqrt(1 - t * t) - 1),\n\n easeOutCirc: (t: number) => Math.sqrt(1 - (t -= 1) * t),\n\n easeInOutCirc: (t: number) => ((t /= 0.5) < 1)\n ? -0.5 * (Math.sqrt(1 - t * t) - 1)\n : 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1),\n\n easeInElastic: (t: number) => atEdge(t) ? t : elasticIn(t, 0.075, 0.3),\n\n easeOutElastic: (t: number) => atEdge(t) ? t : elasticOut(t, 0.075, 0.3),\n\n easeInOutElastic(t: number) {\n const s = 0.1125;\n const p = 0.45;\n return atEdge(t) ? t :\n t < 0.5\n ? 0.5 * elasticIn(t * 2, s, p)\n : 0.5 + 0.5 * elasticOut(t * 2 - 1, s, p);\n },\n\n easeInBack(t: number) {\n const s = 1.70158;\n return t * t * ((s + 1) * t - s);\n },\n\n easeOutBack(t: number) {\n const s = 1.70158;\n return (t -= 1) * t * ((s + 1) * t + s) + 1;\n },\n\n easeInOutBack(t: number) {\n let s = 1.70158;\n if ((t /= 0.5) < 1) {\n return 0.5 * (t * t * (((s *= (1.525)) + 1) * t - s));\n }\n return 0.5 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2);\n },\n\n easeInBounce: (t: number) => 1 - effects.easeOutBounce(1 - t),\n\n easeOutBounce(t: number) {\n const m = 7.5625;\n const d = 2.75;\n if (t < (1 / d)) {\n return m * t * t;\n }\n if (t < (2 / d)) {\n return m * (t -= (1.5 / d)) * t + 0.75;\n }\n if (t < (2.5 / d)) {\n return m * (t -= (2.25 / d)) * t + 0.9375;\n }\n return m * (t -= (2.625 / d)) * t + 0.984375;\n },\n\n easeInOutBounce: (t: number) => (t < 0.5)\n ? effects.easeInBounce(t * 2) * 0.5\n : effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5,\n} as const;\n\nexport type EasingFunction = keyof typeof effects\n\nexport default effects;\n","import type {Point, SplinePoint} from '../types/geometric.js';\n\n/**\n * @private\n */\nexport function _pointInLine(p1: Point, p2: Point, t: number, mode?) { // eslint-disable-line @typescript-eslint/no-unused-vars\n return {\n x: p1.x + t * (p2.x - p1.x),\n y: p1.y + t * (p2.y - p1.y)\n };\n}\n\n/**\n * @private\n */\nexport function _steppedInterpolation(\n p1: Point,\n p2: Point,\n t: number, mode: 'middle' | 'after' | unknown\n) {\n return {\n x: p1.x + t * (p2.x - p1.x),\n y: mode === 'middle' ? t < 0.5 ? p1.y : p2.y\n : mode === 'after' ? t < 1 ? p1.y : p2.y\n : t > 0 ? p2.y : p1.y\n };\n}\n\n/**\n * @private\n */\nexport function _bezierInterpolation(p1: SplinePoint, p2: SplinePoint, t: number, mode?) { // eslint-disable-line @typescript-eslint/no-unused-vars\n const cp1 = {x: p1.cp2x, y: p1.cp2y};\n const cp2 = {x: p2.cp1x, y: p2.cp1y};\n const a = _pointInLine(p1, cp1, t);\n const b = _pointInLine(cp1, cp2, t);\n const c = _pointInLine(cp2, p2, t);\n const d = _pointInLine(a, b, t);\n const e = _pointInLine(b, c, t);\n return _pointInLine(d, e, t);\n}\n","import defaults from '../core/core.defaults.js';\nimport {isArray, isObject, toDimension, valueOrDefault} from './helpers.core.js';\nimport {toFontString} from './helpers.canvas.js';\nimport type {ChartArea, FontSpec, Point} from '../types/index.js';\nimport type {TRBL, TRBLCorners} from '../types/geometric.js';\n\nconst LINE_HEIGHT = /^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/;\nconst FONT_STYLE = /^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;\n\n/**\n * @alias Chart.helpers.options\n * @namespace\n */\n/**\n * Converts the given line height `value` in pixels for a specific font `size`.\n * @param value - The lineHeight to parse (eg. 1.6, '14px', '75%', '1.6em').\n * @param size - The font size (in pixels) used to resolve relative `value`.\n * @returns The effective line height in pixels (size * 1.2 if value is invalid).\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height\n * @since 2.7.0\n */\nexport function toLineHeight(value: number | string, size: number): number {\n const matches = ('' + value).match(LINE_HEIGHT);\n if (!matches || matches[1] === 'normal') {\n return size * 1.2;\n }\n\n value = +matches[2];\n\n switch (matches[3]) {\n case 'px':\n return value;\n case '%':\n value /= 100;\n break;\n default:\n break;\n }\n\n return size * value;\n}\n\nconst numberOrZero = (v: unknown) => +v || 0;\n\n/**\n * @param value\n * @param props\n */\nexport function _readValueToProps<K extends string>(value: number | Record<K, number>, props: K[]): Record<K, number>;\nexport function _readValueToProps<K extends string, T extends string>(value: number | Record<K & T, number>, props: Record<T, K>): Record<T, number>;\nexport function _readValueToProps(value: number | Record<string, number>, props: string[] | Record<string, string>) {\n const ret = {};\n const objProps = isObject(props);\n const keys = objProps ? Object.keys(props) : props;\n const read = isObject(value)\n ? objProps\n ? prop => valueOrDefault(value[prop], value[props[prop]])\n : prop => value[prop]\n : () => value;\n\n for (const prop of keys) {\n ret[prop] = numberOrZero(read(prop));\n }\n return ret;\n}\n\n/**\n * Converts the given value into a TRBL object.\n * @param value - If a number, set the value to all TRBL component,\n * else, if an object, use defined properties and sets undefined ones to 0.\n * x / y are shorthands for same value for left/right and top/bottom.\n * @returns The padding values (top, right, bottom, left)\n * @since 3.0.0\n */\nexport function toTRBL(value: number | TRBL | Point) {\n return _readValueToProps(value, {top: 'y', right: 'x', bottom: 'y', left: 'x'});\n}\n\n/**\n * Converts the given value into a TRBL corners object (similar with css border-radius).\n * @param value - If a number, set the value to all TRBL corner components,\n * else, if an object, use defined properties and sets undefined ones to 0.\n * @returns The TRBL corner values (topLeft, topRight, bottomLeft, bottomRight)\n * @since 3.0.0\n */\nexport function toTRBLCorners(value: number | TRBLCorners) {\n return _readValueToProps(value, ['topLeft', 'topRight', 'bottomLeft', 'bottomRight']);\n}\n\n/**\n * Converts the given value into a padding object with pre-computed width/height.\n * @param value - If a number, set the value to all TRBL component,\n * else, if an object, use defined properties and sets undefined ones to 0.\n * x / y are shorthands for same value for left/right and top/bottom.\n * @returns The padding values (top, right, bottom, left, width, height)\n * @since 2.7.0\n */\nexport function toPadding(value?: number | TRBL): ChartArea {\n const obj = toTRBL(value) as ChartArea;\n\n obj.width = obj.left + obj.right;\n obj.height = obj.top + obj.bottom;\n\n return obj;\n}\n\n/**\n * Parses font options and returns the font object.\n * @param options - A object that contains font options to be parsed.\n * @param fallback - A object that contains fallback font options.\n * @return The font object.\n * @private\n */\n\nexport function toFont(options: Partial<FontSpec>, fallback?: Partial<FontSpec>) {\n options = options || {};\n fallback = fallback || defaults.font as FontSpec;\n\n let size = valueOrDefault(options.size, fallback.size);\n\n if (typeof size === 'string') {\n size = parseInt(size, 10);\n }\n let style = valueOrDefault(options.style, fallback.style);\n if (style && !('' + style).match(FONT_STYLE)) {\n console.warn('Invalid font style specified: \"' + style + '\"');\n style = undefined;\n }\n\n const font = {\n family: valueOrDefault(options.family, fallback.family),\n lineHeight: toLineHeight(valueOrDefault(options.lineHeight, fallback.lineHeight), size),\n size,\n style,\n weight: valueOrDefault(options.weight, fallback.weight),\n string: ''\n };\n\n font.string = toFontString(font);\n return font;\n}\n\n/**\n * Evaluates the given `inputs` sequentially and returns the first defined value.\n * @param inputs - An array of values, falling back to the last value.\n * @param context - If defined and the current value is a function, the value\n * is called with `context` as first argument and the result becomes the new input.\n * @param index - If defined and the current value is an array, the value\n * at `index` become the new input.\n * @param info - object to return information about resolution in\n * @param info.cacheable - Will be set to `false` if option is not cacheable.\n * @since 2.7.0\n */\nexport function resolve(inputs: Array<unknown>, context?: object, index?: number, info?: { cacheable: boolean }) {\n let cacheable = true;\n let i: number, ilen: number, value: unknown;\n\n for (i = 0, ilen = inputs.length; i < ilen; ++i) {\n value = inputs[i];\n if (value === undefined) {\n continue;\n }\n if (context !== undefined && typeof value === 'function') {\n value = value(context);\n cacheable = false;\n }\n if (index !== undefined && isArray(value)) {\n value = value[index % value.length];\n cacheable = false;\n }\n if (value !== undefined) {\n if (info && !cacheable) {\n info.cacheable = false;\n }\n return value;\n }\n }\n}\n\n/**\n * @param minmax\n * @param grace\n * @param beginAtZero\n * @private\n */\nexport function _addGrace(minmax: { min: number; max: number; }, grace: number | string, beginAtZero: boolean) {\n const {min, max} = minmax;\n const change = toDimension(grace, (max - min) / 2);\n const keepZero = (value: number, add: number) => beginAtZero && value === 0 ? 0 : value + add;\n return {\n min: keepZero(min, -Math.abs(change)),\n max: keepZero(max, change)\n };\n}\n\n/**\n * Create a context inheriting parentContext\n * @param parentContext\n * @param context\n * @returns\n */\nexport function createContext<T extends object>(parentContext: null, context: T): T;\nexport function createContext<T extends object, P extends T>(parentContext: P, context: T): P & T;\nexport function createContext(parentContext: object, context: object) {\n return Object.assign(Object.create(parentContext), context);\n}\n","export interface RTLAdapter {\n x(x: number): number;\n setWidth(w: number): void;\n textAlign(align: 'center' | 'left' | 'right'): 'center' | 'left' | 'right';\n xPlus(x: number, value: number): number;\n leftForLtr(x: number, itemWidth: number): number;\n}\n\nconst getRightToLeftAdapter = function(rectX: number, width: number): RTLAdapter {\n return {\n x(x) {\n return rectX + rectX + width - x;\n },\n setWidth(w) {\n width = w;\n },\n textAlign(align) {\n if (align === 'center') {\n return align;\n }\n return align === 'right' ? 'left' : 'right';\n },\n xPlus(x, value) {\n return x - value;\n },\n leftForLtr(x, itemWidth) {\n return x - itemWidth;\n },\n };\n};\n\nconst getLeftToRightAdapter = function(): RTLAdapter {\n return {\n x(x) {\n return x;\n },\n setWidth(w) { // eslint-disable-line no-unused-vars\n },\n textAlign(align) {\n return align;\n },\n xPlus(x, value) {\n return x + value;\n },\n leftForLtr(x, _itemWidth) { // eslint-disable-line @typescript-eslint/no-unused-vars\n return x;\n },\n };\n};\n\nexport function getRtlAdapter(rtl: boolean, rectX: number, width: number) {\n return rtl ? getRightToLeftAdapter(rectX, width) : getLeftToRightAdapter();\n}\n\nexport function overrideTextDirection(ctx: CanvasRenderingContext2D, direction: 'ltr' | 'rtl') {\n let style: CSSStyleDeclaration, original: [string, string];\n if (direction === 'ltr' || direction === 'rtl') {\n style = ctx.canvas.style;\n original = [\n style.getPropertyValue('direction'),\n style.getPropertyPriority('direction'),\n ];\n\n style.setProperty('direction', direction, 'important');\n (ctx as { prevTextDirection?: [string, string] }).prevTextDirection = original;\n }\n}\n\nexport function restoreTextDirection(ctx: CanvasRenderingContext2D, original?: [string, string]) {\n if (original !== undefined) {\n delete (ctx as { prevTextDirection?: [string, string] }).prevTextDirection;\n ctx.canvas.style.setProperty('direction', original[0], original[1]);\n }\n}\n","import {_angleBetween, _angleDiff, _isBetween, _normalizeAngle} from './helpers.math.js';\nimport {createContext} from './helpers.options.js';\nimport {isPatternOrGradient} from './helpers.color.js';\n\n/**\n * @typedef { import('../elements/element.line.js').default } LineElement\n * @typedef { import('../elements/element.point.js').default } PointElement\n * @typedef {{start: number, end: number, loop: boolean, style?: any}} Segment\n */\n\nfunction propertyFn(property) {\n if (property === 'angle') {\n return {\n between: _angleBetween,\n compare: _angleDiff,\n normalize: _normalizeAngle,\n };\n }\n return {\n between: _isBetween,\n compare: (a, b) => a - b,\n normalize: x => x\n };\n}\n\nfunction normalizeSegment({start, end, count, loop, style}) {\n return {\n start: start % count,\n end: end % count,\n loop: loop && (end - start + 1) % count === 0,\n style\n };\n}\n\nfunction getSegment(segment, points, bounds) {\n const {property, start: startBound, end: endBound} = bounds;\n const {between, normalize} = propertyFn(property);\n const count = points.length;\n // eslint-disable-next-line prefer-const\n let {start, end, loop} = segment;\n let i, ilen;\n\n if (loop) {\n start += count;\n end += count;\n for (i = 0, ilen = count; i < ilen; ++i) {\n if (!between(normalize(points[start % count][property]), startBound, endBound)) {\n break;\n }\n start--;\n end--;\n }\n start %= count;\n end %= count;\n }\n\n if (end < start) {\n end += count;\n }\n return {start, end, loop, style: segment.style};\n}\n\n/**\n * Returns the sub-segment(s) of a line segment that fall in the given bounds\n * @param {object} segment\n * @param {number} segment.start - start index of the segment, referring the points array\n * @param {number} segment.end - end index of the segment, referring the points array\n * @param {boolean} segment.loop - indicates that the segment is a loop\n * @param {object} [segment.style] - segment style\n * @param {PointElement[]} points - the points that this segment refers to\n * @param {object} [bounds]\n * @param {string} bounds.property - the property of a `PointElement` we are bounding. `x`, `y` or `angle`.\n * @param {number} bounds.start - start value of the property\n * @param {number} bounds.end - end value of the property\n * @private\n **/\nexport function _boundSegment(segment, points, bounds) {\n if (!bounds) {\n return [segment];\n }\n\n const {property, start: startBound, end: endBound} = bounds;\n const count = points.length;\n const {compare, between, normalize} = propertyFn(property);\n const {start, end, loop, style} = getSegment(segment, points, bounds);\n\n const result = [];\n let inside = false;\n let subStart = null;\n let value, point, prevValue;\n\n const startIsBefore = () => between(startBound, prevValue, value) && compare(startBound, prevValue) !== 0;\n const endIsBefore = () => compare(endBound, value) === 0 || between(endBound, prevValue, value);\n const shouldStart = () => inside || startIsBefore();\n const shouldStop = () => !inside || endIsBefore();\n\n for (let i = start, prev = start; i <= end; ++i) {\n point = points[i % count];\n\n if (point.skip) {\n continue;\n }\n\n value = normalize(point[property]);\n\n if (value === prevValue) {\n continue;\n }\n\n inside = between(value, startBound, endBound);\n\n if (subStart === null && shouldStart()) {\n subStart = compare(value, startBound) === 0 ? i : prev;\n }\n\n if (subStart !== null && shouldStop()) {\n result.push(normalizeSegment({start: subStart, end: i, loop, count, style}));\n subStart = null;\n }\n prev = i;\n prevValue = value;\n }\n\n if (subStart !== null) {\n result.push(normalizeSegment({start: subStart, end, loop, count, style}));\n }\n\n return result;\n}\n\n\n/**\n * Returns the segments of the line that are inside given bounds\n * @param {LineElement} line\n * @param {object} [bounds]\n * @param {string} bounds.property - the property we are bounding with. `x`, `y` or `angle`.\n * @param {number} bounds.start - start value of the `property`\n * @param {number} bounds.end - end value of the `property`\n * @private\n */\nexport function _boundSegments(line, bounds) {\n const result = [];\n const segments = line.segments;\n\n for (let i = 0; i < segments.length; i++) {\n const sub = _boundSegment(segments[i], line.points, bounds);\n if (sub.length) {\n result.push(...sub);\n }\n }\n return result;\n}\n\n/**\n * Find start and end index of a line.\n */\nfunction findStartAndEnd(points, count, loop, spanGaps) {\n let start = 0;\n let end = count - 1;\n\n if (loop && !spanGaps) {\n // loop and not spanning gaps, first find a gap to start from\n while (start < count && !points[start].skip) {\n start++;\n }\n }\n\n // find first non skipped point (after the first gap possibly)\n while (start < count && points[start].skip) {\n start++;\n }\n\n // if we looped to count, start needs to be 0\n start %= count;\n\n if (loop) {\n // loop will go past count, if start > 0\n end += start;\n }\n\n while (end > start && points[end % count].skip) {\n end--;\n }\n\n // end could be more than count, normalize\n end %= count;\n\n return {start, end};\n}\n\n/**\n * Compute solid segments from Points, when spanGaps === false\n * @param {PointElement[]} points - the points\n * @param {number} start - start index\n * @param {number} max - max index (can go past count on a loop)\n * @param {boolean} loop - boolean indicating that this would be a loop if no gaps are found\n */\nfunction solidSegments(points, start, max, loop) {\n const count = points.length;\n const result = [];\n let last = start;\n let prev = points[start];\n let end;\n\n for (end = start + 1; end <= max; ++end) {\n const cur = points[end % count];\n if (cur.skip || cur.stop) {\n if (!prev.skip) {\n loop = false;\n result.push({start: start % count, end: (end - 1) % count, loop});\n // @ts-ignore\n start = last = cur.stop ? end : null;\n }\n } else {\n last = end;\n if (prev.skip) {\n start = end;\n }\n }\n prev = cur;\n }\n\n if (last !== null) {\n result.push({start: start % count, end: last % count, loop});\n }\n\n return result;\n}\n\n/**\n * Compute the continuous segments that define the whole line\n * There can be skipped points within a segment, if spanGaps is true.\n * @param {LineElement} line\n * @param {object} [segmentOptions]\n * @return {Segment[]}\n * @private\n */\nexport function _computeSegments(line, segmentOptions) {\n const points = line.points;\n const spanGaps = line.options.spanGaps;\n const count = points.length;\n\n if (!count) {\n return [];\n }\n\n const loop = !!line._loop;\n const {start, end} = findStartAndEnd(points, count, loop, spanGaps);\n\n if (spanGaps === true) {\n return splitByStyles(line, [{start, end, loop}], points, segmentOptions);\n }\n\n const max = end < start ? end + count : end;\n const completeLoop = !!line._fullLoop && start === 0 && end === count - 1;\n return splitByStyles(line, solidSegments(points, start, max, completeLoop), points, segmentOptions);\n}\n\n/**\n * @param {Segment[]} segments\n * @param {PointElement[]} points\n * @param {object} [segmentOptions]\n * @return {Segment[]}\n */\nfunction splitByStyles(line, segments, points, segmentOptions) {\n if (!segmentOptions || !segmentOptions.setContext || !points) {\n return segments;\n }\n return doSplitByStyles(line, segments, points, segmentOptions);\n}\n\n/**\n * @param {LineElement} line\n * @param {Segment[]} segments\n * @param {PointElement[]} points\n * @param {object} [segmentOptions]\n * @return {Segment[]}\n */\nfunction doSplitByStyles(line, segments, points, segmentOptions) {\n const chartContext = line._chart.getContext();\n const baseStyle = readStyle(line.options);\n const {_datasetIndex: datasetIndex, options: {spanGaps}} = line;\n const count = points.length;\n const result = [];\n let prevStyle = baseStyle;\n let start = segments[0].start;\n let i = start;\n\n function addStyle(s, e, l, st) {\n const dir = spanGaps ? -1 : 1;\n if (s === e) {\n return;\n }\n // Style can not start/end on a skipped point, adjust indices accordingly\n s += count;\n while (points[s % count].skip) {\n s -= dir;\n }\n while (points[e % count].skip) {\n e += dir;\n }\n if (s % count !== e % count) {\n result.push({start: s % count, end: e % count, loop: l, style: st});\n prevStyle = st;\n start = e % count;\n }\n }\n\n for (const segment of segments) {\n start = spanGaps ? start : segment.start;\n let prev = points[start % count];\n let style;\n for (i = start + 1; i <= segment.end; i++) {\n const pt = points[i % count];\n style = readStyle(segmentOptions.setContext(createContext(chartContext, {\n type: 'segment',\n p0: prev,\n p1: pt,\n p0DataIndex: (i - 1) % count,\n p1DataIndex: i % count,\n datasetIndex\n })));\n if (styleChanged(style, prevStyle)) {\n addStyle(start, i - 1, segment.loop, prevStyle);\n }\n prev = pt;\n prevStyle = style;\n }\n if (start < i - 1) {\n addStyle(start, i - 1, segment.loop, prevStyle);\n }\n }\n\n return result;\n}\n\nfunction readStyle(options) {\n return {\n backgroundColor: options.backgroundColor,\n borderCapStyle: options.borderCapStyle,\n borderDash: options.borderDash,\n borderDashOffset: options.borderDashOffset,\n borderJoinStyle: options.borderJoinStyle,\n borderWidth: options.borderWidth,\n borderColor: options.borderColor\n };\n}\n\nfunction styleChanged(style, prevStyle) {\n if (!prevStyle) {\n return false;\n }\n const cache = [];\n const replacer = function(key, value) {\n if (!isPatternOrGradient(value)) {\n return value;\n }\n if (!cache.includes(value)) {\n cache.push(value);\n }\n return cache.indexOf(value);\n };\n return JSON.stringify(style, replacer) !== JSON.stringify(prevStyle, replacer);\n}\n","import {_lookupByKey, _rlookupByKey} from '../helpers/helpers.collection.js';\nimport {getRelativePosition} from '../helpers/helpers.dom.js';\nimport {_angleBetween, getAngleFromPoint} from '../helpers/helpers.math.js';\nimport {_isPointInArea} from '../helpers/index.js';\n\n/**\n * @typedef { import('./core.controller.js').default } Chart\n * @typedef { import('../types/index.js').ChartEvent } ChartEvent\n * @typedef {{axis?: string, intersect?: boolean, includeInvisible?: boolean}} InteractionOptions\n * @typedef {{datasetIndex: number, index: number, element: import('./core.element.js').default}} InteractionItem\n * @typedef { import('../types/index.js').Point } Point\n */\n\n/**\n * Helper function to do binary search when possible\n * @param {object} metaset - the dataset meta\n * @param {string} axis - the axis mode. x|y|xy|r\n * @param {number} value - the value to find\n * @param {boolean} [intersect] - should the element intersect\n * @returns {{lo:number, hi:number}} indices to search data array between\n */\nfunction binarySearch(metaset, axis, value, intersect) {\n const {controller, data, _sorted} = metaset;\n const iScale = controller._cachedMeta.iScale;\n if (iScale && axis === iScale.axis && axis !== 'r' && _sorted && data.length) {\n const lookupMethod = iScale._reversePixels ? _rlookupByKey : _lookupByKey;\n if (!intersect) {\n return lookupMethod(data, axis, value);\n } else if (controller._sharedOptions) {\n // _sharedOptions indicates that each element has equal options -> equal proportions\n // So we can do a ranged binary search based on the range of first element and\n // be confident to get the full range of indices that can intersect with the value.\n const el = data[0];\n const range = typeof el.getRange === 'function' && el.getRange(axis);\n if (range) {\n const start = lookupMethod(data, axis, value - range);\n const end = lookupMethod(data, axis, value + range);\n return {lo: start.lo, hi: end.hi};\n }\n }\n }\n // Default to all elements, when binary search can not be used.\n return {lo: 0, hi: data.length - 1};\n}\n\n/**\n * Helper function to select candidate elements for interaction\n * @param {Chart} chart - the chart\n * @param {string} axis - the axis mode. x|y|xy|r\n * @param {Point} position - the point to be nearest to, in relative coordinates\n * @param {function} handler - the callback to execute for each visible item\n * @param {boolean} [intersect] - consider intersecting items\n */\nfunction evaluateInteractionItems(chart, axis, position, handler, intersect) {\n const metasets = chart.getSortedVisibleDatasetMetas();\n const value = position[axis];\n for (let i = 0, ilen = metasets.length; i < ilen; ++i) {\n const {index, data} = metasets[i];\n const {lo, hi} = binarySearch(metasets[i], axis, value, intersect);\n for (let j = lo; j <= hi; ++j) {\n const element = data[j];\n if (!element.skip) {\n handler(element, index, j);\n }\n }\n }\n}\n\n/**\n * Get a distance metric function for two points based on the\n * axis mode setting\n * @param {string} axis - the axis mode. x|y|xy|r\n */\nfunction getDistanceMetricForAxis(axis) {\n const useX = axis.indexOf('x') !== -1;\n const useY = axis.indexOf('y') !== -1;\n\n return function(pt1, pt2) {\n const deltaX = useX ? Math.abs(pt1.x - pt2.x) : 0;\n const deltaY = useY ? Math.abs(pt1.y - pt2.y) : 0;\n return Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));\n };\n}\n\n/**\n * Helper function to get the items that intersect the event position\n * @param {Chart} chart - the chart\n * @param {Point} position - the point to be nearest to, in relative coordinates\n * @param {string} axis - the axis mode. x|y|xy|r\n * @param {boolean} [useFinalPosition] - use the element's animation target instead of current position\n * @param {boolean} [includeInvisible] - include invisible points that are outside of the chart area\n * @return {InteractionItem[]} the nearest items\n */\nfunction getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible) {\n const items = [];\n\n if (!includeInvisible && !chart.isPointInArea(position)) {\n return items;\n }\n\n const evaluationFunc = function(element, datasetIndex, index) {\n if (!includeInvisible && !_isPointInArea(element, chart.chartArea, 0)) {\n return;\n }\n if (element.inRange(position.x, position.y, useFinalPosition)) {\n items.push({element, datasetIndex, index});\n }\n };\n\n evaluateInteractionItems(chart, axis, position, evaluationFunc, true);\n return items;\n}\n\n/**\n * Helper function to get the items nearest to the event position for a radial chart\n * @param {Chart} chart - the chart to look at elements from\n * @param {Point} position - the point to be nearest to, in relative coordinates\n * @param {string} axis - the axes along which to measure distance\n * @param {boolean} [useFinalPosition] - use the element's animation target instead of current position\n * @return {InteractionItem[]} the nearest items\n */\nfunction getNearestRadialItems(chart, position, axis, useFinalPosition) {\n let items = [];\n\n function evaluationFunc(element, datasetIndex, index) {\n const {startAngle, endAngle} = element.getProps(['startAngle', 'endAngle'], useFinalPosition);\n const {angle} = getAngleFromPoint(element, {x: position.x, y: position.y});\n\n if (_angleBetween(angle, startAngle, endAngle)) {\n items.push({element, datasetIndex, index});\n }\n }\n\n evaluateInteractionItems(chart, axis, position, evaluationFunc);\n return items;\n}\n\n/**\n * Helper function to get the items nearest to the event position for a cartesian chart\n * @param {Chart} chart - the chart to look at elements from\n * @param {Point} position - the point to be nearest to, in relative coordinates\n * @param {string} axis - the axes along which to measure distance\n * @param {boolean} [intersect] - if true, only consider items that intersect the position\n * @param {boolean} [useFinalPosition] - use the element's animation target instead of current position\n * @param {boolean} [includeInvisible] - include invisible points that are outside of the chart area\n * @return {InteractionItem[]} the nearest items\n */\nfunction getNearestCartesianItems(chart, position, axis, intersect, useFinalPosition, includeInvisible) {\n let items = [];\n const distanceMetric = getDistanceMetricForAxis(axis);\n let minDistance = Number.POSITIVE_INFINITY;\n\n function evaluationFunc(element, datasetIndex, index) {\n const inRange = element.inRange(position.x, position.y, useFinalPosition);\n if (intersect && !inRange) {\n return;\n }\n\n const center = element.getCenterPoint(useFinalPosition);\n const pointInArea = !!includeInvisible || chart.isPointInArea(center);\n if (!pointInArea && !inRange) {\n return;\n }\n\n const distance = distanceMetric(position, center);\n if (distance < minDistance) {\n items = [{element, datasetIndex, index}];\n minDistance = distance;\n } else if (distance === minDistance) {\n // Can have multiple items at the same distance in which case we sort by size\n items.push({element, datasetIndex, index});\n }\n }\n\n evaluateInteractionItems(chart, axis, position, evaluationFunc);\n return items;\n}\n\n/**\n * Helper function to get the items nearest to the event position considering all visible items in the chart\n * @param {Chart} chart - the chart to look at elements from\n * @param {Point} position - the point to be nearest to, in relative coordinates\n * @param {string} axis - the axes along which to measure distance\n * @param {boolean} [intersect] - if true, only consider items that intersect the position\n * @param {boolean} [useFinalPosition] - use the element's animation target instead of current position\n * @param {boolean} [includeInvisible] - include invisible points that are outside of the chart area\n * @return {InteractionItem[]} the nearest items\n */\nfunction getNearestItems(chart, position, axis, intersect, useFinalPosition, includeInvisible) {\n if (!includeInvisible && !chart.isPointInArea(position)) {\n return [];\n }\n\n return axis === 'r' && !intersect\n ? getNearestRadialItems(chart, position, axis, useFinalPosition)\n : getNearestCartesianItems(chart, position, axis, intersect, useFinalPosition, includeInvisible);\n}\n\n/**\n * Helper function to get the items matching along the given X or Y axis\n * @param {Chart} chart - the chart to look at elements from\n * @param {Point} position - the point to be nearest to, in relative coordinates\n * @param {string} axis - the axis to match\n * @param {boolean} [intersect] - if true, only consider items that intersect the position\n * @param {boolean} [useFinalPosition] - use the element's animation target instead of current position\n * @return {InteractionItem[]} the nearest items\n */\nfunction getAxisItems(chart, position, axis, intersect, useFinalPosition) {\n const items = [];\n const rangeMethod = axis === 'x' ? 'inXRange' : 'inYRange';\n let intersectsItem = false;\n\n evaluateInteractionItems(chart, axis, position, (element, datasetIndex, index) => {\n if (element[rangeMethod](position[axis], useFinalPosition)) {\n items.push({element, datasetIndex, index});\n intersectsItem = intersectsItem || element.inRange(position.x, position.y, useFinalPosition);\n }\n });\n\n // If we want to trigger on an intersect and we don't have any items\n // that intersect the position, return nothing\n if (intersect && !intersectsItem) {\n return [];\n }\n return items;\n}\n\n/**\n * Contains interaction related functions\n * @namespace Chart.Interaction\n */\nexport default {\n // Part of the public API to facilitate developers creating their own modes\n evaluateInteractionItems,\n\n // Helper function for different modes\n modes: {\n /**\n\t\t * Returns items at the same index. If the options.intersect parameter is true, we only return items if we intersect something\n\t\t * If the options.intersect mode is false, we find the nearest item and return the items at the same index as that item\n\t\t * @function Chart.Interaction.modes.index\n\t\t * @since v2.4.0\n\t\t * @param {Chart} chart - the chart we are returning items from\n\t\t * @param {Event} e - the event we are find things at\n\t\t * @param {InteractionOptions} options - options to use\n\t\t * @param {boolean} [useFinalPosition] - use final element position (animation target)\n\t\t * @return {InteractionItem[]} - items that are found\n\t\t */\n index(chart, e, options, useFinalPosition) {\n const position = getRelativePosition(e, chart);\n // Default axis for index mode is 'x' to match old behaviour\n const axis = options.axis || 'x';\n const includeInvisible = options.includeInvisible || false;\n const items = options.intersect\n ? getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible)\n : getNearestItems(chart, position, axis, false, useFinalPosition, includeInvisible);\n const elements = [];\n\n if (!items.length) {\n return [];\n }\n\n chart.getSortedVisibleDatasetMetas().forEach((meta) => {\n const index = items[0].index;\n const element = meta.data[index];\n\n // don't count items that are skipped (null data)\n if (element && !element.skip) {\n elements.push({element, datasetIndex: meta.index, index});\n }\n });\n\n return elements;\n },\n\n /**\n\t\t * Returns items in the same dataset. If the options.intersect parameter is true, we only return items if we intersect something\n\t\t * If the options.intersect is false, we find the nearest item and return the items in that dataset\n\t\t * @function Chart.Interaction.modes.dataset\n\t\t * @param {Chart} chart - the chart we are returning items from\n\t\t * @param {Event} e - the event we are find things at\n\t\t * @param {InteractionOptions} options - options to use\n\t\t * @param {boolean} [useFinalPosition] - use final element position (animation target)\n\t\t * @return {InteractionItem[]} - items that are found\n\t\t */\n dataset(chart, e, options, useFinalPosition) {\n const position = getRelativePosition(e, chart);\n const axis = options.axis || 'xy';\n const includeInvisible = options.includeInvisible || false;\n let items = options.intersect\n ? getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible) :\n getNearestItems(chart, position, axis, false, useFinalPosition, includeInvisible);\n\n if (items.length > 0) {\n const datasetIndex = items[0].datasetIndex;\n const data = chart.getDatasetMeta(datasetIndex).data;\n items = [];\n for (let i = 0; i < data.length; ++i) {\n items.push({element: data[i], datasetIndex, index: i});\n }\n }\n\n return items;\n },\n\n /**\n\t\t * Point mode returns all elements that hit test based on the event position\n\t\t * of the event\n\t\t * @function Chart.Interaction.modes.intersect\n\t\t * @param {Chart} chart - the chart we are returning items from\n\t\t * @param {Event} e - the event we are find things at\n\t\t * @param {InteractionOptions} options - options to use\n\t\t * @param {boolean} [useFinalPosition] - use final element position (animation target)\n\t\t * @return {InteractionItem[]} - items that are found\n\t\t */\n point(chart, e, options, useFinalPosition) {\n const position = getRelativePosition(e, chart);\n const axis = options.axis || 'xy';\n const includeInvisible = options.includeInvisible || false;\n return getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible);\n },\n\n /**\n\t\t * nearest mode returns the element closest to the point\n\t\t * @function Chart.Interaction.modes.intersect\n\t\t * @param {Chart} chart - the chart we are returning items from\n\t\t * @param {Event} e - the event we are find things at\n\t\t * @param {InteractionOptions} options - options to use\n\t\t * @param {boolean} [useFinalPosition] - use final element position (animation target)\n\t\t * @return {InteractionItem[]} - items that are found\n\t\t */\n nearest(chart, e, options, useFinalPosition) {\n const position = getRelativePosition(e, chart);\n const axis = options.axis || 'xy';\n const includeInvisible = options.includeInvisible || false;\n return getNearestItems(chart, position, axis, options.intersect, useFinalPosition, includeInvisible);\n },\n\n /**\n\t\t * x mode returns the elements that hit-test at the current x coordinate\n\t\t * @function Chart.Interaction.modes.x\n\t\t * @param {Chart} chart - the chart we are returning items from\n\t\t * @param {Event} e - the event we are find things at\n\t\t * @param {InteractionOptions} options - options to use\n\t\t * @param {boolean} [useFinalPosition] - use final element position (animation target)\n\t\t * @return {InteractionItem[]} - items that are found\n\t\t */\n x(chart, e, options, useFinalPosition) {\n const position = getRelativePosition(e, chart);\n return getAxisItems(chart, position, 'x', options.intersect, useFinalPosition);\n },\n\n /**\n\t\t * y mode returns the elements that hit-test at the current y coordinate\n\t\t * @function Chart.Interaction.modes.y\n\t\t * @param {Chart} chart - the chart we are returning items from\n\t\t * @param {Event} e - the event we are find things at\n\t\t * @param {InteractionOptions} options - options to use\n\t\t * @param {boolean} [useFinalPosition] - use final element position (animation target)\n\t\t * @return {InteractionItem[]} - items that are found\n\t\t */\n y(chart, e, options, useFinalPosition) {\n const position = getRelativePosition(e, chart);\n return getAxisItems(chart, position, 'y', options.intersect, useFinalPosition);\n }\n }\n};\n","import {defined, each, isObject} from '../helpers/helpers.core.js';\nimport {toPadding} from '../helpers/helpers.options.js';\n\n/**\n * @typedef { import('./core.controller.js').default } Chart\n */\n\nconst STATIC_POSITIONS = ['left', 'top', 'right', 'bottom'];\n\nfunction filterByPosition(array, position) {\n return array.filter(v => v.pos === position);\n}\n\nfunction filterDynamicPositionByAxis(array, axis) {\n return array.filter(v => STATIC_POSITIONS.indexOf(v.pos) === -1 && v.box.axis === axis);\n}\n\nfunction sortByWeight(array, reverse) {\n return array.sort((a, b) => {\n const v0 = reverse ? b : a;\n const v1 = reverse ? a : b;\n return v0.weight === v1.weight ?\n v0.index - v1.index :\n v0.weight - v1.weight;\n });\n}\n\nfunction wrapBoxes(boxes) {\n const layoutBoxes = [];\n let i, ilen, box, pos, stack, stackWeight;\n\n for (i = 0, ilen = (boxes || []).length; i < ilen; ++i) {\n box = boxes[i];\n ({position: pos, options: {stack, stackWeight = 1}} = box);\n layoutBoxes.push({\n index: i,\n box,\n pos,\n horizontal: box.isHorizontal(),\n weight: box.weight,\n stack: stack && (pos + stack),\n stackWeight\n });\n }\n return layoutBoxes;\n}\n\nfunction buildStacks(layouts) {\n const stacks = {};\n for (const wrap of layouts) {\n const {stack, pos, stackWeight} = wrap;\n if (!stack || !STATIC_POSITIONS.includes(pos)) {\n continue;\n }\n const _stack = stacks[stack] || (stacks[stack] = {count: 0, placed: 0, weight: 0, size: 0});\n _stack.count++;\n _stack.weight += stackWeight;\n }\n return stacks;\n}\n\n/**\n * store dimensions used instead of available chartArea in fitBoxes\n **/\nfunction setLayoutDims(layouts, params) {\n const stacks = buildStacks(layouts);\n const {vBoxMaxWidth, hBoxMaxHeight} = params;\n let i, ilen, layout;\n for (i = 0, ilen = layouts.length; i < ilen; ++i) {\n layout = layouts[i];\n const {fullSize} = layout.box;\n const stack = stacks[layout.stack];\n const factor = stack && layout.stackWeight / stack.weight;\n if (layout.horizontal) {\n layout.width = factor ? factor * vBoxMaxWidth : fullSize && params.availableWidth;\n layout.height = hBoxMaxHeight;\n } else {\n layout.width = vBoxMaxWidth;\n layout.height = factor ? factor * hBoxMaxHeight : fullSize && params.availableHeight;\n }\n }\n return stacks;\n}\n\nfunction buildLayoutBoxes(boxes) {\n const layoutBoxes = wrapBoxes(boxes);\n const fullSize = sortByWeight(layoutBoxes.filter(wrap => wrap.box.fullSize), true);\n const left = sortByWeight(filterByPosition(layoutBoxes, 'left'), true);\n const right = sortByWeight(filterByPosition(layoutBoxes, 'right'));\n const top = sortByWeight(filterByPosition(layoutBoxes, 'top'), true);\n const bottom = sortByWeight(filterByPosition(layoutBoxes, 'bottom'));\n const centerHorizontal = filterDynamicPositionByAxis(layoutBoxes, 'x');\n const centerVertical = filterDynamicPositionByAxis(layoutBoxes, 'y');\n\n return {\n fullSize,\n leftAndTop: left.concat(top),\n rightAndBottom: right.concat(centerVertical).concat(bottom).concat(centerHorizontal),\n chartArea: filterByPosition(layoutBoxes, 'chartArea'),\n vertical: left.concat(right).concat(centerVertical),\n horizontal: top.concat(bottom).concat(centerHorizontal)\n };\n}\n\nfunction getCombinedMax(maxPadding, chartArea, a, b) {\n return Math.max(maxPadding[a], chartArea[a]) + Math.max(maxPadding[b], chartArea[b]);\n}\n\nfunction updateMaxPadding(maxPadding, boxPadding) {\n maxPadding.top = Math.max(maxPadding.top, boxPadding.top);\n maxPadding.left = Math.max(maxPadding.left, boxPadding.left);\n maxPadding.bottom = Math.max(maxPadding.bottom, boxPadding.bottom);\n maxPadding.right = Math.max(maxPadding.right, boxPadding.right);\n}\n\nfunction updateDims(chartArea, params, layout, stacks) {\n const {pos, box} = layout;\n const maxPadding = chartArea.maxPadding;\n\n // dynamically placed boxes size is not considered\n if (!isObject(pos)) {\n if (layout.size) {\n // this layout was already counted for, lets first reduce old size\n chartArea[pos] -= layout.size;\n }\n const stack = stacks[layout.stack] || {size: 0, count: 1};\n stack.size = Math.max(stack.size, layout.horizontal ? box.height : box.width);\n layout.size = stack.size / stack.count;\n chartArea[pos] += layout.size;\n }\n\n if (box.getPadding) {\n updateMaxPadding(maxPadding, box.getPadding());\n }\n\n const newWidth = Math.max(0, params.outerWidth - getCombinedMax(maxPadding, chartArea, 'left', 'right'));\n const newHeight = Math.max(0, params.outerHeight - getCombinedMax(maxPadding, chartArea, 'top', 'bottom'));\n const widthChanged = newWidth !== chartArea.w;\n const heightChanged = newHeight !== chartArea.h;\n chartArea.w = newWidth;\n chartArea.h = newHeight;\n\n // return booleans on the changes per direction\n return layout.horizontal\n ? {same: widthChanged, other: heightChanged}\n : {same: heightChanged, other: widthChanged};\n}\n\nfunction handleMaxPadding(chartArea) {\n const maxPadding = chartArea.maxPadding;\n\n function updatePos(pos) {\n const change = Math.max(maxPadding[pos] - chartArea[pos], 0);\n chartArea[pos] += change;\n return change;\n }\n chartArea.y += updatePos('top');\n chartArea.x += updatePos('left');\n updatePos('right');\n updatePos('bottom');\n}\n\nfunction getMargins(horizontal, chartArea) {\n const maxPadding = chartArea.maxPadding;\n\n function marginForPositions(positions) {\n const margin = {left: 0, top: 0, right: 0, bottom: 0};\n positions.forEach((pos) => {\n margin[pos] = Math.max(chartArea[pos], maxPadding[pos]);\n });\n return margin;\n }\n\n return horizontal\n ? marginForPositions(['left', 'right'])\n : marginForPositions(['top', 'bottom']);\n}\n\nfunction fitBoxes(boxes, chartArea, params, stacks) {\n const refitBoxes = [];\n let i, ilen, layout, box, refit, changed;\n\n for (i = 0, ilen = boxes.length, refit = 0; i < ilen; ++i) {\n layout = boxes[i];\n box = layout.box;\n\n box.update(\n layout.width || chartArea.w,\n layout.height || chartArea.h,\n getMargins(layout.horizontal, chartArea)\n );\n const {same, other} = updateDims(chartArea, params, layout, stacks);\n\n // Dimensions changed and there were non full width boxes before this\n // -> we have to refit those\n refit |= same && refitBoxes.length;\n\n // Chart area changed in the opposite direction\n changed = changed || other;\n\n if (!box.fullSize) { // fullSize boxes don't need to be re-fitted in any case\n refitBoxes.push(layout);\n }\n }\n\n return refit && fitBoxes(refitBoxes, chartArea, params, stacks) || changed;\n}\n\nfunction setBoxDims(box, left, top, width, height) {\n box.top = top;\n box.left = left;\n box.right = left + width;\n box.bottom = top + height;\n box.width = width;\n box.height = height;\n}\n\nfunction placeBoxes(boxes, chartArea, params, stacks) {\n const userPadding = params.padding;\n let {x, y} = chartArea;\n\n for (const layout of boxes) {\n const box = layout.box;\n const stack = stacks[layout.stack] || {count: 1, placed: 0, weight: 1};\n const weight = (layout.stackWeight / stack.weight) || 1;\n if (layout.horizontal) {\n const width = chartArea.w * weight;\n const height = stack.size || box.height;\n if (defined(stack.start)) {\n y = stack.start;\n }\n if (box.fullSize) {\n setBoxDims(box, userPadding.left, y, params.outerWidth - userPadding.right - userPadding.left, height);\n } else {\n setBoxDims(box, chartArea.left + stack.placed, y, width, height);\n }\n stack.start = y;\n stack.placed += width;\n y = box.bottom;\n } else {\n const height = chartArea.h * weight;\n const width = stack.size || box.width;\n if (defined(stack.start)) {\n x = stack.start;\n }\n if (box.fullSize) {\n setBoxDims(box, x, userPadding.top, width, params.outerHeight - userPadding.bottom - userPadding.top);\n } else {\n setBoxDims(box, x, chartArea.top + stack.placed, width, height);\n }\n stack.start = x;\n stack.placed += height;\n x = box.right;\n }\n }\n\n chartArea.x = x;\n chartArea.y = y;\n}\n\n/**\n * @interface LayoutItem\n * @typedef {object} LayoutItem\n * @prop {string} position - The position of the item in the chart layout. Possible values are\n * 'left', 'top', 'right', 'bottom', and 'chartArea'\n * @prop {number} weight - The weight used to sort the item. Higher weights are further away from the chart area\n * @prop {boolean} fullSize - if true, and the item is horizontal, then push vertical boxes down\n * @prop {function} isHorizontal - returns true if the layout item is horizontal (ie. top or bottom)\n * @prop {function} update - Takes two parameters: width and height. Returns size of item\n * @prop {function} draw - Draws the element\n * @prop {function} [getPadding] - Returns an object with padding on the edges\n * @prop {number} width - Width of item. Must be valid after update()\n * @prop {number} height - Height of item. Must be valid after update()\n * @prop {number} left - Left edge of the item. Set by layout system and cannot be used in update\n * @prop {number} top - Top edge of the item. Set by layout system and cannot be used in update\n * @prop {number} right - Right edge of the item. Set by layout system and cannot be used in update\n * @prop {number} bottom - Bottom edge of the item. Set by layout system and cannot be used in update\n */\n\n// The layout service is very self explanatory. It's responsible for the layout within a chart.\n// Scales, Legends and Plugins all rely on the layout service and can easily register to be placed anywhere they need\n// It is this service's responsibility of carrying out that layout.\nexport default {\n\n /**\n\t * Register a box to a chart.\n\t * A box is simply a reference to an object that requires layout. eg. Scales, Legend, Title.\n\t * @param {Chart} chart - the chart to use\n\t * @param {LayoutItem} item - the item to add to be laid out\n\t */\n addBox(chart, item) {\n if (!chart.boxes) {\n chart.boxes = [];\n }\n\n // initialize item with default values\n item.fullSize = item.fullSize || false;\n item.position = item.position || 'top';\n item.weight = item.weight || 0;\n // @ts-ignore\n item._layers = item._layers || function() {\n return [{\n z: 0,\n draw(chartArea) {\n item.draw(chartArea);\n }\n }];\n };\n\n chart.boxes.push(item);\n },\n\n /**\n\t * Remove a layoutItem from a chart\n\t * @param {Chart} chart - the chart to remove the box from\n\t * @param {LayoutItem} layoutItem - the item to remove from the layout\n\t */\n removeBox(chart, layoutItem) {\n const index = chart.boxes ? chart.boxes.indexOf(layoutItem) : -1;\n if (index !== -1) {\n chart.boxes.splice(index, 1);\n }\n },\n\n /**\n\t * Sets (or updates) options on the given `item`.\n\t * @param {Chart} chart - the chart in which the item lives (or will be added to)\n\t * @param {LayoutItem} item - the item to configure with the given options\n\t * @param {object} options - the new item options.\n\t */\n configure(chart, item, options) {\n item.fullSize = options.fullSize;\n item.position = options.position;\n item.weight = options.weight;\n },\n\n /**\n\t * Fits boxes of the given chart into the given size by having each box measure itself\n\t * then running a fitting algorithm\n\t * @param {Chart} chart - the chart\n\t * @param {number} width - the width to fit into\n\t * @param {number} height - the height to fit into\n * @param {number} minPadding - minimum padding required for each side of chart area\n\t */\n update(chart, width, height, minPadding) {\n if (!chart) {\n return;\n }\n\n const padding = toPadding(chart.options.layout.padding);\n const availableWidth = Math.max(width - padding.width, 0);\n const availableHeight = Math.max(height - padding.height, 0);\n const boxes = buildLayoutBoxes(chart.boxes);\n const verticalBoxes = boxes.vertical;\n const horizontalBoxes = boxes.horizontal;\n\n // Before any changes are made, notify boxes that an update is about to being\n // This is used to clear any cached data (e.g. scale limits)\n each(chart.boxes, box => {\n if (typeof box.beforeLayout === 'function') {\n box.beforeLayout();\n }\n });\n\n // Essentially we now have any number of boxes on each of the 4 sides.\n // Our canvas looks like the following.\n // The areas L1 and L2 are the left axes. R1 is the right axis, T1 is the top axis and\n // B1 is the bottom axis\n // There are also 4 quadrant-like locations (left to right instead of clockwise) reserved for chart overlays\n // These locations are single-box locations only, when trying to register a chartArea location that is already taken,\n // an error will be thrown.\n //\n // |----------------------------------------------------|\n // | T1 (Full Width) |\n // |----------------------------------------------------|\n // | | | T2 | |\n // | |----|-------------------------------------|----|\n // | | | C1 | | C2 | |\n // | | |----| |----| |\n // | | | | |\n // | L1 | L2 | ChartArea (C0) | R1 |\n // | | | | |\n // | | |----| |----| |\n // | | | C3 | | C4 | |\n // | |----|-------------------------------------|----|\n // | | | B1 | |\n // |----------------------------------------------------|\n // | B2 (Full Width) |\n // |----------------------------------------------------|\n //\n\n const visibleVerticalBoxCount = verticalBoxes.reduce((total, wrap) =>\n wrap.box.options && wrap.box.options.display === false ? total : total + 1, 0) || 1;\n\n const params = Object.freeze({\n outerWidth: width,\n outerHeight: height,\n padding,\n availableWidth,\n availableHeight,\n vBoxMaxWidth: availableWidth / 2 / visibleVerticalBoxCount,\n hBoxMaxHeight: availableHeight / 2\n });\n const maxPadding = Object.assign({}, padding);\n updateMaxPadding(maxPadding, toPadding(minPadding));\n const chartArea = Object.assign({\n maxPadding,\n w: availableWidth,\n h: availableHeight,\n x: padding.left,\n y: padding.top\n }, padding);\n\n const stacks = setLayoutDims(verticalBoxes.concat(horizontalBoxes), params);\n\n // First fit the fullSize boxes, to reduce probability of re-fitting.\n fitBoxes(boxes.fullSize, chartArea, params, stacks);\n\n // Then fit vertical boxes\n fitBoxes(verticalBoxes, chartArea, params, stacks);\n\n // Then fit horizontal boxes\n if (fitBoxes(horizontalBoxes, chartArea, params, stacks)) {\n // if the area changed, re-fit vertical boxes\n fitBoxes(verticalBoxes, chartArea, params, stacks);\n }\n\n handleMaxPadding(chartArea);\n\n // Finally place the boxes to correct coordinates\n placeBoxes(boxes.leftAndTop, chartArea, params, stacks);\n\n // Move to opposite side of chart\n chartArea.x += chartArea.w;\n chartArea.y += chartArea.h;\n\n placeBoxes(boxes.rightAndBottom, chartArea, params, stacks);\n\n chart.chartArea = {\n left: chartArea.left,\n top: chartArea.top,\n right: chartArea.left + chartArea.w,\n bottom: chartArea.top + chartArea.h,\n height: chartArea.h,\n width: chartArea.w,\n };\n\n // Finally update boxes in chartArea (radial scale for example)\n each(boxes.chartArea, (layout) => {\n const box = layout.box;\n Object.assign(box, chart.chartArea);\n box.update(chartArea.w, chartArea.h, {left: 0, top: 0, right: 0, bottom: 0});\n });\n }\n};\n","\n/**\n * @typedef { import('../core/core.controller.js').default } Chart\n */\n\n/**\n * Abstract class that allows abstracting platform dependencies away from the chart.\n */\nexport default class BasePlatform {\n /**\n\t * Called at chart construction time, returns a context2d instance implementing\n\t * the [W3C Canvas 2D Context API standard]{@link https://www.w3.org/TR/2dcontext/}.\n\t * @param {HTMLCanvasElement} canvas - The canvas from which to acquire context (platform specific)\n\t * @param {number} [aspectRatio] - The chart options\n\t */\n acquireContext(canvas, aspectRatio) {} // eslint-disable-line no-unused-vars\n\n /**\n\t * Called at chart destruction time, releases any resources associated to the context\n\t * previously returned by the acquireContext() method.\n\t * @param {CanvasRenderingContext2D} context - The context2d instance\n\t * @returns {boolean} true if the method succeeded, else false\n\t */\n releaseContext(context) { // eslint-disable-line no-unused-vars\n return false;\n }\n\n /**\n\t * Registers the specified listener on the given chart.\n\t * @param {Chart} chart - Chart from which to listen for event\n\t * @param {string} type - The ({@link ChartEvent}) type to listen for\n\t * @param {function} listener - Receives a notification (an object that implements\n\t * the {@link ChartEvent} interface) when an event of the specified type occurs.\n\t */\n addEventListener(chart, type, listener) {} // eslint-disable-line no-unused-vars\n\n /**\n\t * Removes the specified listener previously registered with addEventListener.\n\t * @param {Chart} chart - Chart from which to remove the listener\n\t * @param {string} type - The ({@link ChartEvent}) type to remove\n\t * @param {function} listener - The listener function to remove from the event target.\n\t */\n removeEventListener(chart, type, listener) {} // eslint-disable-line no-unused-vars\n\n /**\n\t * @returns {number} the current devicePixelRatio of the device this platform is connected to.\n\t */\n getDevicePixelRatio() {\n return 1;\n }\n\n /**\n\t * Returns the maximum size in pixels of given canvas element.\n\t * @param {HTMLCanvasElement} element\n\t * @param {number} [width] - content width of parent element\n\t * @param {number} [height] - content height of parent element\n\t * @param {number} [aspectRatio] - aspect ratio to maintain\n\t */\n getMaximumSize(element, width, height, aspectRatio) {\n width = Math.max(0, width || element.width);\n height = height || element.height;\n return {\n width,\n height: Math.max(0, aspectRatio ? Math.floor(width / aspectRatio) : height)\n };\n }\n\n /**\n\t * @param {HTMLCanvasElement} canvas\n\t * @returns {boolean} true if the canvas is attached to the platform, false if not.\n\t */\n isAttached(canvas) { // eslint-disable-line no-unused-vars\n return true;\n }\n\n /**\n * Updates config with platform specific requirements\n * @param {import('../core/core.config.js').default} config\n */\n updateConfig(config) { // eslint-disable-line no-unused-vars\n // no-op\n }\n}\n","/**\n * Platform fallback implementation (minimal).\n * @see https://github.com/chartjs/Chart.js/pull/4591#issuecomment-319575939\n */\n\nimport BasePlatform from './platform.base.js';\n\n/**\n * Platform class for charts without access to the DOM or to many element properties\n * This platform is used by default for any chart passed an OffscreenCanvas.\n * @extends BasePlatform\n */\nexport default class BasicPlatform extends BasePlatform {\n acquireContext(item) {\n // To prevent canvas fingerprinting, some add-ons undefine the getContext\n // method, for example: https://github.com/kkapsner/CanvasBlocker\n // https://github.com/chartjs/Chart.js/issues/2807\n return item && item.getContext && item.getContext('2d') || null;\n }\n updateConfig(config) {\n config.options.animation = false;\n }\n}\n","/**\n * Chart.Platform implementation for targeting a web browser\n */\n\nimport BasePlatform from './platform.base.js';\nimport {_getParentNode, getRelativePosition, supportsEventListenerOptions, readUsedSize, getMaximumSize} from '../helpers/helpers.dom.js';\nimport {throttled} from '../helpers/helpers.extras.js';\nimport {isNullOrUndef} from '../helpers/helpers.core.js';\n\n/**\n * @typedef { import('../core/core.controller.js').default } Chart\n */\n\nconst EXPANDO_KEY = '$chartjs';\n\n/**\n * DOM event types -> Chart.js event types.\n * Note: only events with different types are mapped.\n * @see https://developer.mozilla.org/en-US/docs/Web/Events\n */\nconst EVENT_TYPES = {\n touchstart: 'mousedown',\n touchmove: 'mousemove',\n touchend: 'mouseup',\n pointerenter: 'mouseenter',\n pointerdown: 'mousedown',\n pointermove: 'mousemove',\n pointerup: 'mouseup',\n pointerleave: 'mouseout',\n pointerout: 'mouseout'\n};\n\nconst isNullOrEmpty = value => value === null || value === '';\n/**\n * Initializes the canvas style and render size without modifying the canvas display size,\n * since responsiveness is handled by the controller.resize() method. The config is used\n * to determine the aspect ratio to apply in case no explicit height has been specified.\n * @param {HTMLCanvasElement} canvas\n * @param {number} [aspectRatio]\n */\nfunction initCanvas(canvas, aspectRatio) {\n const style = canvas.style;\n\n // NOTE(SB) canvas.getAttribute('width') !== canvas.width: in the first case it\n // returns null or '' if no explicit value has been set to the canvas attribute.\n const renderHeight = canvas.getAttribute('height');\n const renderWidth = canvas.getAttribute('width');\n\n // Chart.js modifies some canvas values that we want to restore on destroy\n canvas[EXPANDO_KEY] = {\n initial: {\n height: renderHeight,\n width: renderWidth,\n style: {\n display: style.display,\n height: style.height,\n width: style.width\n }\n }\n };\n\n // Force canvas to display as block to avoid extra space caused by inline\n // elements, which would interfere with the responsive resize process.\n // https://github.com/chartjs/Chart.js/issues/2538\n style.display = style.display || 'block';\n // Include possible borders in the size\n style.boxSizing = style.boxSizing || 'border-box';\n\n if (isNullOrEmpty(renderWidth)) {\n const displayWidth = readUsedSize(canvas, 'width');\n if (displayWidth !== undefined) {\n canvas.width = displayWidth;\n }\n }\n\n if (isNullOrEmpty(renderHeight)) {\n if (canvas.style.height === '') {\n // If no explicit render height and style height, let's apply the aspect ratio,\n // which one can be specified by the user but also by charts as default option\n // (i.e. options.aspectRatio). If not specified, use canvas aspect ratio of 2.\n canvas.height = canvas.width / (aspectRatio || 2);\n } else {\n const displayHeight = readUsedSize(canvas, 'height');\n if (displayHeight !== undefined) {\n canvas.height = displayHeight;\n }\n }\n }\n\n return canvas;\n}\n\n// Default passive to true as expected by Chrome for 'touchstart' and 'touchend' events.\n// https://github.com/chartjs/Chart.js/issues/4287\nconst eventListenerOptions = supportsEventListenerOptions ? {passive: true} : false;\n\nfunction addListener(node, type, listener) {\n node.addEventListener(type, listener, eventListenerOptions);\n}\n\nfunction removeListener(chart, type, listener) {\n chart.canvas.removeEventListener(type, listener, eventListenerOptions);\n}\n\nfunction fromNativeEvent(event, chart) {\n const type = EVENT_TYPES[event.type] || event.type;\n const {x, y} = getRelativePosition(event, chart);\n return {\n type,\n chart,\n native: event,\n x: x !== undefined ? x : null,\n y: y !== undefined ? y : null,\n };\n}\n\nfunction nodeListContains(nodeList, canvas) {\n for (const node of nodeList) {\n if (node === canvas || node.contains(canvas)) {\n return true;\n }\n }\n}\n\nfunction createAttachObserver(chart, type, listener) {\n const canvas = chart.canvas;\n const observer = new MutationObserver(entries => {\n let trigger = false;\n for (const entry of entries) {\n trigger = trigger || nodeListContains(entry.addedNodes, canvas);\n trigger = trigger && !nodeListContains(entry.removedNodes, canvas);\n }\n if (trigger) {\n listener();\n }\n });\n observer.observe(document, {childList: true, subtree: true});\n return observer;\n}\n\nfunction createDetachObserver(chart, type, listener) {\n const canvas = chart.canvas;\n const observer = new MutationObserver(entries => {\n let trigger = false;\n for (const entry of entries) {\n trigger = trigger || nodeListContains(entry.removedNodes, canvas);\n trigger = trigger && !nodeListContains(entry.addedNodes, canvas);\n }\n if (trigger) {\n listener();\n }\n });\n observer.observe(document, {childList: true, subtree: true});\n return observer;\n}\n\nconst drpListeningCharts = new Map();\nlet oldDevicePixelRatio = 0;\n\nfunction onWindowResize() {\n const dpr = window.devicePixelRatio;\n if (dpr === oldDevicePixelRatio) {\n return;\n }\n oldDevicePixelRatio = dpr;\n drpListeningCharts.forEach((resize, chart) => {\n if (chart.currentDevicePixelRatio !== dpr) {\n resize();\n }\n });\n}\n\nfunction listenDevicePixelRatioChanges(chart, resize) {\n if (!drpListeningCharts.size) {\n window.addEventListener('resize', onWindowResize);\n }\n drpListeningCharts.set(chart, resize);\n}\n\nfunction unlistenDevicePixelRatioChanges(chart) {\n drpListeningCharts.delete(chart);\n if (!drpListeningCharts.size) {\n window.removeEventListener('resize', onWindowResize);\n }\n}\n\nfunction createResizeObserver(chart, type, listener) {\n const canvas = chart.canvas;\n const container = canvas && _getParentNode(canvas);\n if (!container) {\n return;\n }\n const resize = throttled((width, height) => {\n const w = container.clientWidth;\n listener(width, height);\n if (w < container.clientWidth) {\n // If the container size shrank during chart resize, let's assume\n // scrollbar appeared. So we resize again with the scrollbar visible -\n // effectively making chart smaller and the scrollbar hidden again.\n // Because we are inside `throttled`, and currently `ticking`, scroll\n // events are ignored during this whole 2 resize process.\n // If we assumed wrong and something else happened, we are resizing\n // twice in a frame (potential performance issue)\n listener();\n }\n }, window);\n\n // @ts-ignore until https://github.com/microsoft/TypeScript/issues/37861 implemented\n const observer = new ResizeObserver(entries => {\n const entry = entries[0];\n const width = entry.contentRect.width;\n const height = entry.contentRect.height;\n // When its container's display is set to 'none' the callback will be called with a\n // size of (0, 0), which will cause the chart to lose its original height, so skip\n // resizing in such case.\n if (width === 0 && height === 0) {\n return;\n }\n resize(width, height);\n });\n observer.observe(container);\n listenDevicePixelRatioChanges(chart, resize);\n\n return observer;\n}\n\nfunction releaseObserver(chart, type, observer) {\n if (observer) {\n observer.disconnect();\n }\n if (type === 'resize') {\n unlistenDevicePixelRatioChanges(chart);\n }\n}\n\nfunction createProxyAndListen(chart, type, listener) {\n const canvas = chart.canvas;\n const proxy = throttled((event) => {\n // This case can occur if the chart is destroyed while waiting\n // for the throttled function to occur. We prevent crashes by checking\n // for a destroyed chart\n if (chart.ctx !== null) {\n listener(fromNativeEvent(event, chart));\n }\n }, chart);\n\n addListener(canvas, type, proxy);\n\n return proxy;\n}\n\n/**\n * Platform class for charts that can access the DOM and global window/document properties\n * @extends BasePlatform\n */\nexport default class DomPlatform extends BasePlatform {\n\n /**\n\t * @param {HTMLCanvasElement} canvas\n\t * @param {number} [aspectRatio]\n\t * @return {CanvasRenderingContext2D|null}\n\t */\n acquireContext(canvas, aspectRatio) {\n // To prevent canvas fingerprinting, some add-ons undefine the getContext\n // method, for example: https://github.com/kkapsner/CanvasBlocker\n // https://github.com/chartjs/Chart.js/issues/2807\n const context = canvas && canvas.getContext && canvas.getContext('2d');\n\n // `instanceof HTMLCanvasElement/CanvasRenderingContext2D` fails when the canvas is\n // inside an iframe or when running in a protected environment. We could guess the\n // types from their toString() value but let's keep things flexible and assume it's\n // a sufficient condition if the canvas has a context2D which has canvas as `canvas`.\n // https://github.com/chartjs/Chart.js/issues/3887\n // https://github.com/chartjs/Chart.js/issues/4102\n // https://github.com/chartjs/Chart.js/issues/4152\n if (context && context.canvas === canvas) {\n // Load platform resources on first chart creation, to make it possible to\n // import the library before setting platform options.\n initCanvas(canvas, aspectRatio);\n return context;\n }\n\n return null;\n }\n\n /**\n\t * @param {CanvasRenderingContext2D} context\n\t */\n releaseContext(context) {\n const canvas = context.canvas;\n if (!canvas[EXPANDO_KEY]) {\n return false;\n }\n\n const initial = canvas[EXPANDO_KEY].initial;\n ['height', 'width'].forEach((prop) => {\n const value = initial[prop];\n if (isNullOrUndef(value)) {\n canvas.removeAttribute(prop);\n } else {\n canvas.setAttribute(prop, value);\n }\n });\n\n const style = initial.style || {};\n Object.keys(style).forEach((key) => {\n canvas.style[key] = style[key];\n });\n\n // The canvas render size might have been changed (and thus the state stack discarded),\n // we can't use save() and restore() to restore the initial state. So make sure that at\n // least the canvas context is reset to the default state by setting the canvas width.\n // https://www.w3.org/TR/2011/WD-html5-20110525/the-canvas-element.html\n // eslint-disable-next-line no-self-assign\n canvas.width = canvas.width;\n\n delete canvas[EXPANDO_KEY];\n return true;\n }\n\n /**\n\t *\n\t * @param {Chart} chart\n\t * @param {string} type\n\t * @param {function} listener\n\t */\n addEventListener(chart, type, listener) {\n // Can have only one listener per type, so make sure previous is removed\n this.removeEventListener(chart, type);\n\n const proxies = chart.$proxies || (chart.$proxies = {});\n const handlers = {\n attach: createAttachObserver,\n detach: createDetachObserver,\n resize: createResizeObserver\n };\n const handler = handlers[type] || createProxyAndListen;\n proxies[type] = handler(chart, type, listener);\n }\n\n\n /**\n\t * @param {Chart} chart\n\t * @param {string} type\n\t */\n removeEventListener(chart, type) {\n const proxies = chart.$proxies || (chart.$proxies = {});\n const proxy = proxies[type];\n\n if (!proxy) {\n return;\n }\n\n const handlers = {\n attach: releaseObserver,\n detach: releaseObserver,\n resize: releaseObserver\n };\n const handler = handlers[type] || removeListener;\n handler(chart, type, proxy);\n proxies[type] = undefined;\n }\n\n getDevicePixelRatio() {\n return window.devicePixelRatio;\n }\n\n /**\n\t * @param {HTMLCanvasElement} canvas\n\t * @param {number} [width] - content width of parent element\n\t * @param {number} [height] - content height of parent element\n\t * @param {number} [aspectRatio] - aspect ratio to maintain\n\t */\n getMaximumSize(canvas, width, height, aspectRatio) {\n return getMaximumSize(canvas, width, height, aspectRatio);\n }\n\n /**\n\t * @param {HTMLCanvasElement} canvas\n\t */\n isAttached(canvas) {\n const container = _getParentNode(canvas);\n return !!(container && container.isConnected);\n }\n}\n","import {_isDomSupported} from '../helpers/index.js';\nimport BasePlatform from './platform.base.js';\nimport BasicPlatform from './platform.basic.js';\nimport DomPlatform from './platform.dom.js';\n\nexport function _detectPlatform(canvas) {\n if (!_isDomSupported() || (typeof OffscreenCanvas !== 'undefined' && canvas instanceof OffscreenCanvas)) {\n return BasicPlatform;\n }\n return DomPlatform;\n}\n\nexport {BasePlatform, BasicPlatform, DomPlatform};\n","import effects from '../helpers/helpers.easing.js';\nimport {resolve} from '../helpers/helpers.options.js';\nimport {color as helpersColor} from '../helpers/helpers.color.js';\n\nconst transparent = 'transparent';\nconst interpolators = {\n boolean(from, to, factor) {\n return factor > 0.5 ? to : from;\n },\n /**\n * @param {string} from\n * @param {string} to\n * @param {number} factor\n */\n color(from, to, factor) {\n const c0 = helpersColor(from || transparent);\n const c1 = c0.valid && helpersColor(to || transparent);\n return c1 && c1.valid\n ? c1.mix(c0, factor).hexString()\n : to;\n },\n number(from, to, factor) {\n return from + (to - from) * factor;\n }\n};\n\nexport default class Animation {\n constructor(cfg, target, prop, to) {\n const currentValue = target[prop];\n\n to = resolve([cfg.to, to, currentValue, cfg.from]);\n const from = resolve([cfg.from, currentValue, to]);\n\n this._active = true;\n this._fn = cfg.fn || interpolators[cfg.type || typeof from];\n this._easing = effects[cfg.easing] || effects.linear;\n this._start = Math.floor(Date.now() + (cfg.delay || 0));\n this._duration = this._total = Math.floor(cfg.duration);\n this._loop = !!cfg.loop;\n this._target = target;\n this._prop = prop;\n this._from = from;\n this._to = to;\n this._promises = undefined;\n }\n\n active() {\n return this._active;\n }\n\n update(cfg, to, date) {\n if (this._active) {\n this._notify(false);\n\n const currentValue = this._target[this._prop];\n const elapsed = date - this._start;\n const remain = this._duration - elapsed;\n this._start = date;\n this._duration = Math.floor(Math.max(remain, cfg.duration));\n this._total += elapsed;\n this._loop = !!cfg.loop;\n this._to = resolve([cfg.to, to, currentValue, cfg.from]);\n this._from = resolve([cfg.from, currentValue, to]);\n }\n }\n\n cancel() {\n if (this._active) {\n // update current evaluated value, for smoother animations\n this.tick(Date.now());\n this._active = false;\n this._notify(false);\n }\n }\n\n tick(date) {\n const elapsed = date - this._start;\n const duration = this._duration;\n const prop = this._prop;\n const from = this._from;\n const loop = this._loop;\n const to = this._to;\n let factor;\n\n this._active = from !== to && (loop || (elapsed < duration));\n\n if (!this._active) {\n this._target[prop] = to;\n this._notify(true);\n return;\n }\n\n if (elapsed < 0) {\n this._target[prop] = from;\n return;\n }\n\n factor = (elapsed / duration) % 2;\n factor = loop && factor > 1 ? 2 - factor : factor;\n factor = this._easing(Math.min(1, Math.max(0, factor)));\n\n this._target[prop] = this._fn(from, to, factor);\n }\n\n wait() {\n const promises = this._promises || (this._promises = []);\n return new Promise((res, rej) => {\n promises.push({res, rej});\n });\n }\n\n _notify(resolved) {\n const method = resolved ? 'res' : 'rej';\n const promises = this._promises || [];\n for (let i = 0; i < promises.length; i++) {\n promises[i][method]();\n }\n }\n}\n","import animator from './core.animator.js';\nimport Animation from './core.animation.js';\nimport defaults from './core.defaults.js';\nimport {isArray, isObject} from '../helpers/helpers.core.js';\n\nexport default class Animations {\n constructor(chart, config) {\n this._chart = chart;\n this._properties = new Map();\n this.configure(config);\n }\n\n configure(config) {\n if (!isObject(config)) {\n return;\n }\n\n const animationOptions = Object.keys(defaults.animation);\n const animatedProps = this._properties;\n\n Object.getOwnPropertyNames(config).forEach(key => {\n const cfg = config[key];\n if (!isObject(cfg)) {\n return;\n }\n const resolved = {};\n for (const option of animationOptions) {\n resolved[option] = cfg[option];\n }\n\n (isArray(cfg.properties) && cfg.properties || [key]).forEach((prop) => {\n if (prop === key || !animatedProps.has(prop)) {\n animatedProps.set(prop, resolved);\n }\n });\n });\n }\n\n /**\n\t * Utility to handle animation of `options`.\n\t * @private\n\t */\n _animateOptions(target, values) {\n const newOptions = values.options;\n const options = resolveTargetOptions(target, newOptions);\n if (!options) {\n return [];\n }\n\n const animations = this._createAnimations(options, newOptions);\n if (newOptions.$shared) {\n // Going to shared options:\n // After all animations are done, assign the shared options object to the element\n // So any new updates to the shared options are observed\n awaitAll(target.options.$animations, newOptions).then(() => {\n target.options = newOptions;\n }, () => {\n // rejected, noop\n });\n }\n\n return animations;\n }\n\n /**\n\t * @private\n\t */\n _createAnimations(target, values) {\n const animatedProps = this._properties;\n const animations = [];\n const running = target.$animations || (target.$animations = {});\n const props = Object.keys(values);\n const date = Date.now();\n let i;\n\n for (i = props.length - 1; i >= 0; --i) {\n const prop = props[i];\n if (prop.charAt(0) === '$') {\n continue;\n }\n\n if (prop === 'options') {\n animations.push(...this._animateOptions(target, values));\n continue;\n }\n const value = values[prop];\n let animation = running[prop];\n const cfg = animatedProps.get(prop);\n\n if (animation) {\n if (cfg && animation.active()) {\n // There is an existing active animation, let's update that\n animation.update(cfg, value, date);\n continue;\n } else {\n animation.cancel();\n }\n }\n if (!cfg || !cfg.duration) {\n // not animated, set directly to new value\n target[prop] = value;\n continue;\n }\n\n running[prop] = animation = new Animation(cfg, target, prop, value);\n animations.push(animation);\n }\n return animations;\n }\n\n\n /**\n\t * Update `target` properties to new values, using configured animations\n\t * @param {object} target - object to update\n\t * @param {object} values - new target properties\n\t * @returns {boolean|undefined} - `true` if animations were started\n\t **/\n update(target, values) {\n if (this._properties.size === 0) {\n // Nothing is animated, just apply the new values.\n Object.assign(target, values);\n return;\n }\n\n const animations = this._createAnimations(target, values);\n\n if (animations.length) {\n animator.add(this._chart, animations);\n return true;\n }\n }\n}\n\nfunction awaitAll(animations, properties) {\n const running = [];\n const keys = Object.keys(properties);\n for (let i = 0; i < keys.length; i++) {\n const anim = animations[keys[i]];\n if (anim && anim.active()) {\n running.push(anim.wait());\n }\n }\n // @ts-ignore\n return Promise.all(running);\n}\n\nfunction resolveTargetOptions(target, newOptions) {\n if (!newOptions) {\n return;\n }\n let options = target.options;\n if (!options) {\n target.options = newOptions;\n return;\n }\n if (options.$shared) {\n // Going from shared options to distinct one:\n // Create new options object containing the old shared values and start updating that.\n target.options = options = Object.assign({}, options, {$shared: false, $animations: {}});\n }\n return options;\n}\n","import Animations from './core.animations.js';\nimport defaults from './core.defaults.js';\nimport {isArray, isFinite, isObject, valueOrDefault, resolveObjectKey, defined} from '../helpers/helpers.core.js';\nimport {listenArrayEvents, unlistenArrayEvents} from '../helpers/helpers.collection.js';\nimport {createContext, sign} from '../helpers/index.js';\n\n/**\n * @typedef { import('./core.controller.js').default } Chart\n * @typedef { import('./core.scale.js').default } Scale\n */\n\nfunction scaleClip(scale, allowedOverflow) {\n const opts = scale && scale.options || {};\n const reverse = opts.reverse;\n const min = opts.min === undefined ? allowedOverflow : 0;\n const max = opts.max === undefined ? allowedOverflow : 0;\n return {\n start: reverse ? max : min,\n end: reverse ? min : max\n };\n}\n\nfunction defaultClip(xScale, yScale, allowedOverflow) {\n if (allowedOverflow === false) {\n return false;\n }\n const x = scaleClip(xScale, allowedOverflow);\n const y = scaleClip(yScale, allowedOverflow);\n\n return {\n top: y.end,\n right: x.end,\n bottom: y.start,\n left: x.start\n };\n}\n\nfunction toClip(value) {\n let t, r, b, l;\n\n if (isObject(value)) {\n t = value.top;\n r = value.right;\n b = value.bottom;\n l = value.left;\n } else {\n t = r = b = l = value;\n }\n\n return {\n top: t,\n right: r,\n bottom: b,\n left: l,\n disabled: value === false\n };\n}\n\nfunction getSortedDatasetIndices(chart, filterVisible) {\n const keys = [];\n const metasets = chart._getSortedDatasetMetas(filterVisible);\n let i, ilen;\n\n for (i = 0, ilen = metasets.length; i < ilen; ++i) {\n keys.push(metasets[i].index);\n }\n return keys;\n}\n\nfunction applyStack(stack, value, dsIndex, options = {}) {\n const keys = stack.keys;\n const singleMode = options.mode === 'single';\n let i, ilen, datasetIndex, otherValue;\n\n if (value === null) {\n return;\n }\n\n for (i = 0, ilen = keys.length; i < ilen; ++i) {\n datasetIndex = +keys[i];\n if (datasetIndex === dsIndex) {\n if (options.all) {\n continue;\n }\n break;\n }\n otherValue = stack.values[datasetIndex];\n if (isFinite(otherValue) && (singleMode || (value === 0 || sign(value) === sign(otherValue)))) {\n value += otherValue;\n }\n }\n return value;\n}\n\nfunction convertObjectDataToArray(data) {\n const keys = Object.keys(data);\n const adata = new Array(keys.length);\n let i, ilen, key;\n for (i = 0, ilen = keys.length; i < ilen; ++i) {\n key = keys[i];\n adata[i] = {\n x: key,\n y: data[key]\n };\n }\n return adata;\n}\n\nfunction isStacked(scale, meta) {\n const stacked = scale && scale.options.stacked;\n return stacked || (stacked === undefined && meta.stack !== undefined);\n}\n\nfunction getStackKey(indexScale, valueScale, meta) {\n return `${indexScale.id}.${valueScale.id}.${meta.stack || meta.type}`;\n}\n\nfunction getUserBounds(scale) {\n const {min, max, minDefined, maxDefined} = scale.getUserBounds();\n return {\n min: minDefined ? min : Number.NEGATIVE_INFINITY,\n max: maxDefined ? max : Number.POSITIVE_INFINITY\n };\n}\n\nfunction getOrCreateStack(stacks, stackKey, indexValue) {\n const subStack = stacks[stackKey] || (stacks[stackKey] = {});\n return subStack[indexValue] || (subStack[indexValue] = {});\n}\n\nfunction getLastIndexInStack(stack, vScale, positive, type) {\n for (const meta of vScale.getMatchingVisibleMetas(type).reverse()) {\n const value = stack[meta.index];\n if ((positive && value > 0) || (!positive && value < 0)) {\n return meta.index;\n }\n }\n\n return null;\n}\n\nfunction updateStacks(controller, parsed) {\n const {chart, _cachedMeta: meta} = controller;\n const stacks = chart._stacks || (chart._stacks = {}); // map structure is {stackKey: {datasetIndex: value}}\n const {iScale, vScale, index: datasetIndex} = meta;\n const iAxis = iScale.axis;\n const vAxis = vScale.axis;\n const key = getStackKey(iScale, vScale, meta);\n const ilen = parsed.length;\n let stack;\n\n for (let i = 0; i < ilen; ++i) {\n const item = parsed[i];\n const {[iAxis]: index, [vAxis]: value} = item;\n const itemStacks = item._stacks || (item._stacks = {});\n stack = itemStacks[vAxis] = getOrCreateStack(stacks, key, index);\n stack[datasetIndex] = value;\n\n stack._top = getLastIndexInStack(stack, vScale, true, meta.type);\n stack._bottom = getLastIndexInStack(stack, vScale, false, meta.type);\n\n const visualValues = stack._visualValues || (stack._visualValues = {});\n visualValues[datasetIndex] = value;\n }\n}\n\nfunction getFirstScaleId(chart, axis) {\n const scales = chart.scales;\n return Object.keys(scales).filter(key => scales[key].axis === axis).shift();\n}\n\nfunction createDatasetContext(parent, index) {\n return createContext(parent,\n {\n active: false,\n dataset: undefined,\n datasetIndex: index,\n index,\n mode: 'default',\n type: 'dataset'\n }\n );\n}\n\nfunction createDataContext(parent, index, element) {\n return createContext(parent, {\n active: false,\n dataIndex: index,\n parsed: undefined,\n raw: undefined,\n element,\n index,\n mode: 'default',\n type: 'data'\n });\n}\n\nfunction clearStacks(meta, items) {\n // Not using meta.index here, because it might be already updated if the dataset changed location\n const datasetIndex = meta.controller.index;\n const axis = meta.vScale && meta.vScale.axis;\n if (!axis) {\n return;\n }\n\n items = items || meta._parsed;\n for (const parsed of items) {\n const stacks = parsed._stacks;\n if (!stacks || stacks[axis] === undefined || stacks[axis][datasetIndex] === undefined) {\n return;\n }\n delete stacks[axis][datasetIndex];\n if (stacks[axis]._visualValues !== undefined && stacks[axis]._visualValues[datasetIndex] !== undefined) {\n delete stacks[axis]._visualValues[datasetIndex];\n }\n }\n}\n\nconst isDirectUpdateMode = (mode) => mode === 'reset' || mode === 'none';\nconst cloneIfNotShared = (cached, shared) => shared ? cached : Object.assign({}, cached);\nconst createStack = (canStack, meta, chart) => canStack && !meta.hidden && meta._stacked\n && {keys: getSortedDatasetIndices(chart, true), values: null};\n\nexport default class DatasetController {\n\n /**\n * @type {any}\n */\n static defaults = {};\n\n /**\n * Element type used to generate a meta dataset (e.g. Chart.element.LineElement).\n */\n static datasetElementType = null;\n\n /**\n * Element type used to generate a meta data (e.g. Chart.element.PointElement).\n */\n static dataElementType = null;\n\n /**\n\t * @param {Chart} chart\n\t * @param {number} datasetIndex\n\t */\n constructor(chart, datasetIndex) {\n this.chart = chart;\n this._ctx = chart.ctx;\n this.index = datasetIndex;\n this._cachedDataOpts = {};\n this._cachedMeta = this.getMeta();\n this._type = this._cachedMeta.type;\n this.options = undefined;\n /** @type {boolean | object} */\n this._parsing = false;\n this._data = undefined;\n this._objectData = undefined;\n this._sharedOptions = undefined;\n this._drawStart = undefined;\n this._drawCount = undefined;\n this.enableOptionSharing = false;\n this.supportsDecimation = false;\n this.$context = undefined;\n this._syncList = [];\n this.datasetElementType = new.target.datasetElementType;\n this.dataElementType = new.target.dataElementType;\n\n this.initialize();\n }\n\n initialize() {\n const meta = this._cachedMeta;\n this.configure();\n this.linkScales();\n meta._stacked = isStacked(meta.vScale, meta);\n this.addElements();\n\n if (this.options.fill && !this.chart.isPluginEnabled('filler')) {\n console.warn(\"Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options\");\n }\n }\n\n updateIndex(datasetIndex) {\n if (this.index !== datasetIndex) {\n clearStacks(this._cachedMeta);\n }\n this.index = datasetIndex;\n }\n\n linkScales() {\n const chart = this.chart;\n const meta = this._cachedMeta;\n const dataset = this.getDataset();\n\n const chooseId = (axis, x, y, r) => axis === 'x' ? x : axis === 'r' ? r : y;\n\n const xid = meta.xAxisID = valueOrDefault(dataset.xAxisID, getFirstScaleId(chart, 'x'));\n const yid = meta.yAxisID = valueOrDefault(dataset.yAxisID, getFirstScaleId(chart, 'y'));\n const rid = meta.rAxisID = valueOrDefault(dataset.rAxisID, getFirstScaleId(chart, 'r'));\n const indexAxis = meta.indexAxis;\n const iid = meta.iAxisID = chooseId(indexAxis, xid, yid, rid);\n const vid = meta.vAxisID = chooseId(indexAxis, yid, xid, rid);\n meta.xScale = this.getScaleForId(xid);\n meta.yScale = this.getScaleForId(yid);\n meta.rScale = this.getScaleForId(rid);\n meta.iScale = this.getScaleForId(iid);\n meta.vScale = this.getScaleForId(vid);\n }\n\n getDataset() {\n return this.chart.data.datasets[this.index];\n }\n\n getMeta() {\n return this.chart.getDatasetMeta(this.index);\n }\n\n /**\n\t * @param {string} scaleID\n\t * @return {Scale}\n\t */\n getScaleForId(scaleID) {\n return this.chart.scales[scaleID];\n }\n\n /**\n\t * @private\n\t */\n _getOtherScale(scale) {\n const meta = this._cachedMeta;\n return scale === meta.iScale\n ? meta.vScale\n : meta.iScale;\n }\n\n reset() {\n this._update('reset');\n }\n\n /**\n\t * @private\n\t */\n _destroy() {\n const meta = this._cachedMeta;\n if (this._data) {\n unlistenArrayEvents(this._data, this);\n }\n if (meta._stacked) {\n clearStacks(meta);\n }\n }\n\n /**\n\t * @private\n\t */\n _dataCheck() {\n const dataset = this.getDataset();\n const data = dataset.data || (dataset.data = []);\n const _data = this._data;\n\n // In order to correctly handle data addition/deletion animation (and thus simulate\n // real-time charts), we need to monitor these data modifications and synchronize\n // the internal metadata accordingly.\n\n if (isObject(data)) {\n this._data = convertObjectDataToArray(data);\n } else if (_data !== data) {\n if (_data) {\n // This case happens when the user replaced the data array instance.\n unlistenArrayEvents(_data, this);\n // Discard old parsed data and stacks\n const meta = this._cachedMeta;\n clearStacks(meta);\n meta._parsed = [];\n }\n if (data && Object.isExtensible(data)) {\n listenArrayEvents(data, this);\n }\n this._syncList = [];\n this._data = data;\n }\n }\n\n addElements() {\n const meta = this._cachedMeta;\n\n this._dataCheck();\n\n if (this.datasetElementType) {\n meta.dataset = new this.datasetElementType();\n }\n }\n\n buildOrUpdateElements(resetNewElements) {\n const meta = this._cachedMeta;\n const dataset = this.getDataset();\n let stackChanged = false;\n\n this._dataCheck();\n\n // make sure cached _stacked status is current\n const oldStacked = meta._stacked;\n meta._stacked = isStacked(meta.vScale, meta);\n\n // detect change in stack option\n if (meta.stack !== dataset.stack) {\n stackChanged = true;\n // remove values from old stack\n clearStacks(meta);\n meta.stack = dataset.stack;\n }\n\n // Re-sync meta data in case the user replaced the data array or if we missed\n // any updates and so make sure that we handle number of datapoints changing.\n this._resyncElements(resetNewElements);\n\n // if stack changed, update stack values for the whole dataset\n if (stackChanged || oldStacked !== meta._stacked) {\n updateStacks(this, meta._parsed);\n }\n }\n\n /**\n\t * Merges user-supplied and default dataset-level options\n\t * @private\n\t */\n configure() {\n const config = this.chart.config;\n const scopeKeys = config.datasetScopeKeys(this._type);\n const scopes = config.getOptionScopes(this.getDataset(), scopeKeys, true);\n this.options = config.createResolver(scopes, this.getContext());\n this._parsing = this.options.parsing;\n this._cachedDataOpts = {};\n }\n\n /**\n\t * @param {number} start\n\t * @param {number} count\n\t */\n parse(start, count) {\n const {_cachedMeta: meta, _data: data} = this;\n const {iScale, _stacked} = meta;\n const iAxis = iScale.axis;\n\n let sorted = start === 0 && count === data.length ? true : meta._sorted;\n let prev = start > 0 && meta._parsed[start - 1];\n let i, cur, parsed;\n\n if (this._parsing === false) {\n meta._parsed = data;\n meta._sorted = true;\n parsed = data;\n } else {\n if (isArray(data[start])) {\n parsed = this.parseArrayData(meta, data, start, count);\n } else if (isObject(data[start])) {\n parsed = this.parseObjectData(meta, data, start, count);\n } else {\n parsed = this.parsePrimitiveData(meta, data, start, count);\n }\n\n const isNotInOrderComparedToPrev = () => cur[iAxis] === null || (prev && cur[iAxis] < prev[iAxis]);\n for (i = 0; i < count; ++i) {\n meta._parsed[i + start] = cur = parsed[i];\n if (sorted) {\n if (isNotInOrderComparedToPrev()) {\n sorted = false;\n }\n prev = cur;\n }\n }\n meta._sorted = sorted;\n }\n\n if (_stacked) {\n updateStacks(this, parsed);\n }\n }\n\n /**\n\t * Parse array of primitive values\n\t * @param {object} meta - dataset meta\n\t * @param {array} data - data array. Example [1,3,4]\n\t * @param {number} start - start index\n\t * @param {number} count - number of items to parse\n\t * @returns {object} parsed item - item containing index and a parsed value\n\t * for each scale id.\n\t * Example: {xScale0: 0, yScale0: 1}\n\t * @protected\n\t */\n parsePrimitiveData(meta, data, start, count) {\n const {iScale, vScale} = meta;\n const iAxis = iScale.axis;\n const vAxis = vScale.axis;\n const labels = iScale.getLabels();\n const singleScale = iScale === vScale;\n const parsed = new Array(count);\n let i, ilen, index;\n\n for (i = 0, ilen = count; i < ilen; ++i) {\n index = i + start;\n parsed[i] = {\n [iAxis]: singleScale || iScale.parse(labels[index], index),\n [vAxis]: vScale.parse(data[index], index)\n };\n }\n return parsed;\n }\n\n /**\n\t * Parse array of arrays\n\t * @param {object} meta - dataset meta\n\t * @param {array} data - data array. Example [[1,2],[3,4]]\n\t * @param {number} start - start index\n\t * @param {number} count - number of items to parse\n\t * @returns {object} parsed item - item containing index and a parsed value\n\t * for each scale id.\n\t * Example: {x: 0, y: 1}\n\t * @protected\n\t */\n parseArrayData(meta, data, start, count) {\n const {xScale, yScale} = meta;\n const parsed = new Array(count);\n let i, ilen, index, item;\n\n for (i = 0, ilen = count; i < ilen; ++i) {\n index = i + start;\n item = data[index];\n parsed[i] = {\n x: xScale.parse(item[0], index),\n y: yScale.parse(item[1], index)\n };\n }\n return parsed;\n }\n\n /**\n\t * Parse array of objects\n\t * @param {object} meta - dataset meta\n\t * @param {array} data - data array. Example [{x:1, y:5}, {x:2, y:10}]\n\t * @param {number} start - start index\n\t * @param {number} count - number of items to parse\n\t * @returns {object} parsed item - item containing index and a parsed value\n\t * for each scale id. _custom is optional\n\t * Example: {xScale0: 0, yScale0: 1, _custom: {r: 10, foo: 'bar'}}\n\t * @protected\n\t */\n parseObjectData(meta, data, start, count) {\n const {xScale, yScale} = meta;\n const {xAxisKey = 'x', yAxisKey = 'y'} = this._parsing;\n const parsed = new Array(count);\n let i, ilen, index, item;\n\n for (i = 0, ilen = count; i < ilen; ++i) {\n index = i + start;\n item = data[index];\n parsed[i] = {\n x: xScale.parse(resolveObjectKey(item, xAxisKey), index),\n y: yScale.parse(resolveObjectKey(item, yAxisKey), index)\n };\n }\n return parsed;\n }\n\n /**\n\t * @protected\n\t */\n getParsed(index) {\n return this._cachedMeta._parsed[index];\n }\n\n /**\n\t * @protected\n\t */\n getDataElement(index) {\n return this._cachedMeta.data[index];\n }\n\n /**\n\t * @protected\n\t */\n applyStack(scale, parsed, mode) {\n const chart = this.chart;\n const meta = this._cachedMeta;\n const value = parsed[scale.axis];\n const stack = {\n keys: getSortedDatasetIndices(chart, true),\n values: parsed._stacks[scale.axis]._visualValues\n };\n return applyStack(stack, value, meta.index, {mode});\n }\n\n /**\n\t * @protected\n\t */\n updateRangeFromParsed(range, scale, parsed, stack) {\n const parsedValue = parsed[scale.axis];\n let value = parsedValue === null ? NaN : parsedValue;\n const values = stack && parsed._stacks[scale.axis];\n if (stack && values) {\n stack.values = values;\n value = applyStack(stack, parsedValue, this._cachedMeta.index);\n }\n range.min = Math.min(range.min, value);\n range.max = Math.max(range.max, value);\n }\n\n /**\n\t * @protected\n\t */\n getMinMax(scale, canStack) {\n const meta = this._cachedMeta;\n const _parsed = meta._parsed;\n const sorted = meta._sorted && scale === meta.iScale;\n const ilen = _parsed.length;\n const otherScale = this._getOtherScale(scale);\n const stack = createStack(canStack, meta, this.chart);\n const range = {min: Number.POSITIVE_INFINITY, max: Number.NEGATIVE_INFINITY};\n const {min: otherMin, max: otherMax} = getUserBounds(otherScale);\n let i, parsed;\n\n function _skip() {\n parsed = _parsed[i];\n const otherValue = parsed[otherScale.axis];\n return !isFinite(parsed[scale.axis]) || otherMin > otherValue || otherMax < otherValue;\n }\n\n for (i = 0; i < ilen; ++i) {\n if (_skip()) {\n continue;\n }\n this.updateRangeFromParsed(range, scale, parsed, stack);\n if (sorted) {\n // if the data is sorted, we don't need to check further from this end of array\n break;\n }\n }\n if (sorted) {\n // in the sorted case, find first non-skipped value from other end of array\n for (i = ilen - 1; i >= 0; --i) {\n if (_skip()) {\n continue;\n }\n this.updateRangeFromParsed(range, scale, parsed, stack);\n break;\n }\n }\n return range;\n }\n\n getAllParsedValues(scale) {\n const parsed = this._cachedMeta._parsed;\n const values = [];\n let i, ilen, value;\n\n for (i = 0, ilen = parsed.length; i < ilen; ++i) {\n value = parsed[i][scale.axis];\n if (isFinite(value)) {\n values.push(value);\n }\n }\n return values;\n }\n\n /**\n\t * @return {number|boolean}\n\t * @protected\n\t */\n getMaxOverflow() {\n return false;\n }\n\n /**\n\t * @protected\n\t */\n getLabelAndValue(index) {\n const meta = this._cachedMeta;\n const iScale = meta.iScale;\n const vScale = meta.vScale;\n const parsed = this.getParsed(index);\n return {\n label: iScale ? '' + iScale.getLabelForValue(parsed[iScale.axis]) : '',\n value: vScale ? '' + vScale.getLabelForValue(parsed[vScale.axis]) : ''\n };\n }\n\n /**\n\t * @private\n\t */\n _update(mode) {\n const meta = this._cachedMeta;\n this.update(mode || 'default');\n meta._clip = toClip(valueOrDefault(this.options.clip, defaultClip(meta.xScale, meta.yScale, this.getMaxOverflow())));\n }\n\n /**\n\t * @param {string} mode\n\t */\n update(mode) {} // eslint-disable-line no-unused-vars\n\n draw() {\n const ctx = this._ctx;\n const chart = this.chart;\n const meta = this._cachedMeta;\n const elements = meta.data || [];\n const area = chart.chartArea;\n const active = [];\n const start = this._drawStart || 0;\n const count = this._drawCount || (elements.length - start);\n const drawActiveElementsOnTop = this.options.drawActiveElementsOnTop;\n let i;\n\n if (meta.dataset) {\n meta.dataset.draw(ctx, area, start, count);\n }\n\n for (i = start; i < start + count; ++i) {\n const element = elements[i];\n if (element.hidden) {\n continue;\n }\n if (element.active && drawActiveElementsOnTop) {\n active.push(element);\n } else {\n element.draw(ctx, area);\n }\n }\n\n for (i = 0; i < active.length; ++i) {\n active[i].draw(ctx, area);\n }\n }\n\n /**\n\t * Returns a set of predefined style properties that should be used to represent the dataset\n\t * or the data if the index is specified\n\t * @param {number} index - data index\n\t * @param {boolean} [active] - true if hover\n\t * @return {object} style object\n\t */\n getStyle(index, active) {\n const mode = active ? 'active' : 'default';\n return index === undefined && this._cachedMeta.dataset\n ? this.resolveDatasetElementOptions(mode)\n : this.resolveDataElementOptions(index || 0, mode);\n }\n\n /**\n\t * @protected\n\t */\n getContext(index, active, mode) {\n const dataset = this.getDataset();\n let context;\n if (index >= 0 && index < this._cachedMeta.data.length) {\n const element = this._cachedMeta.data[index];\n context = element.$context ||\n (element.$context = createDataContext(this.getContext(), index, element));\n context.parsed = this.getParsed(index);\n context.raw = dataset.data[index];\n context.index = context.dataIndex = index;\n } else {\n context = this.$context ||\n (this.$context = createDatasetContext(this.chart.getContext(), this.index));\n context.dataset = dataset;\n context.index = context.datasetIndex = this.index;\n }\n\n context.active = !!active;\n context.mode = mode;\n return context;\n }\n\n /**\n\t * @param {string} [mode]\n\t * @protected\n\t */\n resolveDatasetElementOptions(mode) {\n return this._resolveElementOptions(this.datasetElementType.id, mode);\n }\n\n /**\n\t * @param {number} index\n\t * @param {string} [mode]\n\t * @protected\n\t */\n resolveDataElementOptions(index, mode) {\n return this._resolveElementOptions(this.dataElementType.id, mode, index);\n }\n\n /**\n\t * @private\n\t */\n _resolveElementOptions(elementType, mode = 'default', index) {\n const active = mode === 'active';\n const cache = this._cachedDataOpts;\n const cacheKey = elementType + '-' + mode;\n const cached = cache[cacheKey];\n const sharing = this.enableOptionSharing && defined(index);\n if (cached) {\n return cloneIfNotShared(cached, sharing);\n }\n const config = this.chart.config;\n const scopeKeys = config.datasetElementScopeKeys(this._type, elementType);\n const prefixes = active ? [`${elementType}Hover`, 'hover', elementType, ''] : [elementType, ''];\n const scopes = config.getOptionScopes(this.getDataset(), scopeKeys);\n const names = Object.keys(defaults.elements[elementType]);\n // context is provided as a function, and is called only if needed,\n // so we don't create a context for each element if not needed.\n const context = () => this.getContext(index, active, mode);\n const values = config.resolveNamedOptions(scopes, names, context, prefixes);\n\n if (values.$shared) {\n // `$shared` indicates this set of options can be shared between multiple elements.\n // Sharing is used to reduce number of properties to change during animation.\n values.$shared = sharing;\n\n // We cache options by `mode`, which can be 'active' for example. This enables us\n // to have the 'active' element options and 'default' options to switch between\n // when interacting.\n cache[cacheKey] = Object.freeze(cloneIfNotShared(values, sharing));\n }\n\n return values;\n }\n\n\n /**\n\t * @private\n\t */\n _resolveAnimations(index, transition, active) {\n const chart = this.chart;\n const cache = this._cachedDataOpts;\n const cacheKey = `animation-${transition}`;\n const cached = cache[cacheKey];\n if (cached) {\n return cached;\n }\n let options;\n if (chart.options.animation !== false) {\n const config = this.chart.config;\n const scopeKeys = config.datasetAnimationScopeKeys(this._type, transition);\n const scopes = config.getOptionScopes(this.getDataset(), scopeKeys);\n options = config.createResolver(scopes, this.getContext(index, active, transition));\n }\n const animations = new Animations(chart, options && options.animations);\n if (options && options._cacheable) {\n cache[cacheKey] = Object.freeze(animations);\n }\n return animations;\n }\n\n /**\n\t * Utility for getting the options object shared between elements\n\t * @protected\n\t */\n getSharedOptions(options) {\n if (!options.$shared) {\n return;\n }\n return this._sharedOptions || (this._sharedOptions = Object.assign({}, options));\n }\n\n /**\n\t * Utility for determining if `options` should be included in the updated properties\n\t * @protected\n\t */\n includeOptions(mode, sharedOptions) {\n return !sharedOptions || isDirectUpdateMode(mode) || this.chart._animationsDisabled;\n }\n\n /**\n * @todo v4, rename to getSharedOptions and remove excess functions\n */\n _getSharedOptions(start, mode) {\n const firstOpts = this.resolveDataElementOptions(start, mode);\n const previouslySharedOptions = this._sharedOptions;\n const sharedOptions = this.getSharedOptions(firstOpts);\n const includeOptions = this.includeOptions(mode, sharedOptions) || (sharedOptions !== previouslySharedOptions);\n this.updateSharedOptions(sharedOptions, mode, firstOpts);\n return {sharedOptions, includeOptions};\n }\n\n /**\n\t * Utility for updating an element with new properties, using animations when appropriate.\n\t * @protected\n\t */\n updateElement(element, index, properties, mode) {\n if (isDirectUpdateMode(mode)) {\n Object.assign(element, properties);\n } else {\n this._resolveAnimations(index, mode).update(element, properties);\n }\n }\n\n /**\n\t * Utility to animate the shared options, that are potentially affecting multiple elements.\n\t * @protected\n\t */\n updateSharedOptions(sharedOptions, mode, newOptions) {\n if (sharedOptions && !isDirectUpdateMode(mode)) {\n this._resolveAnimations(undefined, mode).update(sharedOptions, newOptions);\n }\n }\n\n /**\n\t * @private\n\t */\n _setStyle(element, index, mode, active) {\n element.active = active;\n const options = this.getStyle(index, active);\n this._resolveAnimations(index, mode, active).update(element, {\n // When going from active to inactive, we need to update to the shared options.\n // This way the once hovered element will end up with the same original shared options instance, after animation.\n options: (!active && this.getSharedOptions(options)) || options\n });\n }\n\n removeHoverStyle(element, datasetIndex, index) {\n this._setStyle(element, index, 'active', false);\n }\n\n setHoverStyle(element, datasetIndex, index) {\n this._setStyle(element, index, 'active', true);\n }\n\n /**\n\t * @private\n\t */\n _removeDatasetHoverStyle() {\n const element = this._cachedMeta.dataset;\n\n if (element) {\n this._setStyle(element, undefined, 'active', false);\n }\n }\n\n /**\n\t * @private\n\t */\n _setDatasetHoverStyle() {\n const element = this._cachedMeta.dataset;\n\n if (element) {\n this._setStyle(element, undefined, 'active', true);\n }\n }\n\n /**\n\t * @private\n\t */\n _resyncElements(resetNewElements) {\n const data = this._data;\n const elements = this._cachedMeta.data;\n\n // Apply changes detected through array listeners\n for (const [method, arg1, arg2] of this._syncList) {\n this[method](arg1, arg2);\n }\n this._syncList = [];\n\n const numMeta = elements.length;\n const numData = data.length;\n const count = Math.min(numData, numMeta);\n\n if (count) {\n // TODO: It is not optimal to always parse the old data\n // This is done because we are not detecting direct assignments:\n // chart.data.datasets[0].data[5] = 10;\n // chart.data.datasets[0].data[5].y = 10;\n this.parse(0, count);\n }\n\n if (numData > numMeta) {\n this._insertElements(numMeta, numData - numMeta, resetNewElements);\n } else if (numData < numMeta) {\n this._removeElements(numData, numMeta - numData);\n }\n }\n\n /**\n\t * @private\n\t */\n _insertElements(start, count, resetNewElements = true) {\n const meta = this._cachedMeta;\n const data = meta.data;\n const end = start + count;\n let i;\n\n const move = (arr) => {\n arr.length += count;\n for (i = arr.length - 1; i >= end; i--) {\n arr[i] = arr[i - count];\n }\n };\n move(data);\n\n for (i = start; i < end; ++i) {\n data[i] = new this.dataElementType();\n }\n\n if (this._parsing) {\n move(meta._parsed);\n }\n this.parse(start, count);\n\n if (resetNewElements) {\n this.updateElements(data, start, count, 'reset');\n }\n }\n\n updateElements(element, start, count, mode) {} // eslint-disable-line no-unused-vars\n\n /**\n\t * @private\n\t */\n _removeElements(start, count) {\n const meta = this._cachedMeta;\n if (this._parsing) {\n const removed = meta._parsed.splice(start, count);\n if (meta._stacked) {\n clearStacks(meta, removed);\n }\n }\n meta.data.splice(start, count);\n }\n\n /**\n\t * @private\n */\n _sync(args) {\n if (this._parsing) {\n this._syncList.push(args);\n } else {\n const [method, arg1, arg2] = args;\n this[method](arg1, arg2);\n }\n this.chart._dataChanges.push([this.index, ...args]);\n }\n\n _onDataPush() {\n const count = arguments.length;\n this._sync(['_insertElements', this.getDataset().data.length - count, count]);\n }\n\n _onDataPop() {\n this._sync(['_removeElements', this._cachedMeta.data.length - 1, 1]);\n }\n\n _onDataShift() {\n this._sync(['_removeElements', 0, 1]);\n }\n\n _onDataSplice(start, count) {\n if (count) {\n this._sync(['_removeElements', start, count]);\n }\n const newCount = arguments.length - 2;\n if (newCount) {\n this._sync(['_insertElements', start, newCount]);\n }\n }\n\n _onDataUnshift() {\n this._sync(['_insertElements', 0, arguments.length]);\n }\n}\n","import type {AnyObject} from '../types/basic.js';\nimport type {Point} from '../types/geometric.js';\nimport type {Animation} from '../types/animation.js';\nimport {isNumber} from '../helpers/helpers.math.js';\n\nexport default class Element<T = AnyObject, O = AnyObject> {\n\n static defaults = {};\n static defaultRoutes = undefined;\n\n x: number;\n y: number;\n active = false;\n options: O;\n $animations: Record<keyof T, Animation>;\n\n tooltipPosition(useFinalPosition: boolean): Point {\n const {x, y} = this.getProps(['x', 'y'], useFinalPosition);\n return {x, y} as Point;\n }\n\n hasValue() {\n return isNumber(this.x) && isNumber(this.y);\n }\n\n /**\n * Gets the current or final value of each prop. Can return extra properties (whole object).\n * @param props - properties to get\n * @param [final] - get the final value (animation target)\n */\n getProps<P extends (keyof T)[]>(props: P, final?: boolean): Pick<T, P[number]>;\n getProps<P extends string>(props: P[], final?: boolean): Partial<Record<P, unknown>>;\n getProps(props: string[], final?: boolean): Partial<Record<string, unknown>> {\n const anims = this.$animations;\n if (!final || !anims) {\n // let's not create an object, if not needed\n return this as Record<string, unknown>;\n }\n const ret: Record<string, unknown> = {};\n props.forEach((prop) => {\n ret[prop] = anims[prop] && anims[prop].active() ? anims[prop]._to : this[prop as string];\n });\n return ret;\n }\n}\n","import {isNullOrUndef, valueOrDefault} from '../helpers/helpers.core.js';\nimport {_factorize} from '../helpers/helpers.math.js';\n\n\n/**\n * @typedef { import('./core.controller.js').default } Chart\n * @typedef {{value:number | string, label?:string, major?:boolean, $context?:any}} Tick\n */\n\n/**\n * Returns a subset of ticks to be plotted to avoid overlapping labels.\n * @param {import('./core.scale.js').default} scale\n * @param {Tick[]} ticks\n * @return {Tick[]}\n * @private\n */\nexport function autoSkip(scale, ticks) {\n const tickOpts = scale.options.ticks;\n const determinedMaxTicks = determineMaxTicks(scale);\n const ticksLimit = Math.min(tickOpts.maxTicksLimit || determinedMaxTicks, determinedMaxTicks);\n const majorIndices = tickOpts.major.enabled ? getMajorIndices(ticks) : [];\n const numMajorIndices = majorIndices.length;\n const first = majorIndices[0];\n const last = majorIndices[numMajorIndices - 1];\n const newTicks = [];\n\n // If there are too many major ticks to display them all\n if (numMajorIndices > ticksLimit) {\n skipMajors(ticks, newTicks, majorIndices, numMajorIndices / ticksLimit);\n return newTicks;\n }\n\n const spacing = calculateSpacing(majorIndices, ticks, ticksLimit);\n\n if (numMajorIndices > 0) {\n let i, ilen;\n const avgMajorSpacing = numMajorIndices > 1 ? Math.round((last - first) / (numMajorIndices - 1)) : null;\n skip(ticks, newTicks, spacing, isNullOrUndef(avgMajorSpacing) ? 0 : first - avgMajorSpacing, first);\n for (i = 0, ilen = numMajorIndices - 1; i < ilen; i++) {\n skip(ticks, newTicks, spacing, majorIndices[i], majorIndices[i + 1]);\n }\n skip(ticks, newTicks, spacing, last, isNullOrUndef(avgMajorSpacing) ? ticks.length : last + avgMajorSpacing);\n return newTicks;\n }\n skip(ticks, newTicks, spacing);\n return newTicks;\n}\n\nfunction determineMaxTicks(scale) {\n const offset = scale.options.offset;\n const tickLength = scale._tickSize();\n const maxScale = scale._length / tickLength + (offset ? 0 : 1);\n const maxChart = scale._maxLength / tickLength;\n return Math.floor(Math.min(maxScale, maxChart));\n}\n\n/**\n * @param {number[]} majorIndices\n * @param {Tick[]} ticks\n * @param {number} ticksLimit\n */\nfunction calculateSpacing(majorIndices, ticks, ticksLimit) {\n const evenMajorSpacing = getEvenSpacing(majorIndices);\n const spacing = ticks.length / ticksLimit;\n\n // If the major ticks are evenly spaced apart, place the minor ticks\n // so that they divide the major ticks into even chunks\n if (!evenMajorSpacing) {\n return Math.max(spacing, 1);\n }\n\n const factors = _factorize(evenMajorSpacing);\n for (let i = 0, ilen = factors.length - 1; i < ilen; i++) {\n const factor = factors[i];\n if (factor > spacing) {\n return factor;\n }\n }\n return Math.max(spacing, 1);\n}\n\n/**\n * @param {Tick[]} ticks\n */\nfunction getMajorIndices(ticks) {\n const result = [];\n let i, ilen;\n for (i = 0, ilen = ticks.length; i < ilen; i++) {\n if (ticks[i].major) {\n result.push(i);\n }\n }\n return result;\n}\n\n/**\n * @param {Tick[]} ticks\n * @param {Tick[]} newTicks\n * @param {number[]} majorIndices\n * @param {number} spacing\n */\nfunction skipMajors(ticks, newTicks, majorIndices, spacing) {\n let count = 0;\n let next = majorIndices[0];\n let i;\n\n spacing = Math.ceil(spacing);\n for (i = 0; i < ticks.length; i++) {\n if (i === next) {\n newTicks.push(ticks[i]);\n count++;\n next = majorIndices[count * spacing];\n }\n }\n}\n\n/**\n * @param {Tick[]} ticks\n * @param {Tick[]} newTicks\n * @param {number} spacing\n * @param {number} [majorStart]\n * @param {number} [majorEnd]\n */\nfunction skip(ticks, newTicks, spacing, majorStart, majorEnd) {\n const start = valueOrDefault(majorStart, 0);\n const end = Math.min(valueOrDefault(majorEnd, ticks.length), ticks.length);\n let count = 0;\n let length, i, next;\n\n spacing = Math.ceil(spacing);\n if (majorEnd) {\n length = majorEnd - majorStart;\n spacing = length / Math.floor(length / spacing);\n }\n\n next = start;\n\n while (next < 0) {\n count++;\n next = Math.round(start + count * spacing);\n }\n\n for (i = Math.max(start, 0); i < end; i++) {\n if (i === next) {\n newTicks.push(ticks[i]);\n count++;\n next = Math.round(start + count * spacing);\n }\n }\n}\n\n\n/**\n * @param {number[]} arr\n */\nfunction getEvenSpacing(arr) {\n const len = arr.length;\n let i, diff;\n\n if (len < 2) {\n return false;\n }\n\n for (diff = arr[0], i = 1; i < len; ++i) {\n if (arr[i] - arr[i - 1] !== diff) {\n return false;\n }\n }\n return diff;\n}\n","import Element from './core.element.js';\nimport {_alignPixel, _measureText, renderText, clipArea, unclipArea} from '../helpers/helpers.canvas.js';\nimport {callback as call, each, finiteOrDefault, isArray, isFinite, isNullOrUndef, isObject, valueOrDefault} from '../helpers/helpers.core.js';\nimport {toDegrees, toRadians, _int16Range, _limitValue, HALF_PI} from '../helpers/helpers.math.js';\nimport {_alignStartEnd, _toLeftRightCenter} from '../helpers/helpers.extras.js';\nimport {createContext, toFont, toPadding, _addGrace} from '../helpers/helpers.options.js';\nimport {autoSkip} from './core.scale.autoskip.js';\n\nconst reverseAlign = (align) => align === 'left' ? 'right' : align === 'right' ? 'left' : align;\nconst offsetFromEdge = (scale, edge, offset) => edge === 'top' || edge === 'left' ? scale[edge] + offset : scale[edge] - offset;\nconst getTicksLimit = (ticksLength, maxTicksLimit) => Math.min(maxTicksLimit || ticksLength, ticksLength);\n\n/**\n * @typedef { import('../types/index.js').Chart } Chart\n * @typedef {{value:number | string, label?:string, major?:boolean, $context?:any}} Tick\n */\n\n/**\n * Returns a new array containing numItems from arr\n * @param {any[]} arr\n * @param {number} numItems\n */\nfunction sample(arr, numItems) {\n const result = [];\n const increment = arr.length / numItems;\n const len = arr.length;\n let i = 0;\n\n for (; i < len; i += increment) {\n result.push(arr[Math.floor(i)]);\n }\n return result;\n}\n\n/**\n * @param {Scale} scale\n * @param {number} index\n * @param {boolean} offsetGridLines\n */\nfunction getPixelForGridLine(scale, index, offsetGridLines) {\n const length = scale.ticks.length;\n const validIndex = Math.min(index, length - 1);\n const start = scale._startPixel;\n const end = scale._endPixel;\n const epsilon = 1e-6; // 1e-6 is margin in pixels for accumulated error.\n let lineValue = scale.getPixelForTick(validIndex);\n let offset;\n\n if (offsetGridLines) {\n if (length === 1) {\n offset = Math.max(lineValue - start, end - lineValue);\n } else if (index === 0) {\n offset = (scale.getPixelForTick(1) - lineValue) / 2;\n } else {\n offset = (lineValue - scale.getPixelForTick(validIndex - 1)) / 2;\n }\n lineValue += validIndex < index ? offset : -offset;\n\n // Return undefined if the pixel is out of the range\n if (lineValue < start - epsilon || lineValue > end + epsilon) {\n return;\n }\n }\n return lineValue;\n}\n\n/**\n * @param {object} caches\n * @param {number} length\n */\nfunction garbageCollect(caches, length) {\n each(caches, (cache) => {\n const gc = cache.gc;\n const gcLen = gc.length / 2;\n let i;\n if (gcLen > length) {\n for (i = 0; i < gcLen; ++i) {\n delete cache.data[gc[i]];\n }\n gc.splice(0, gcLen);\n }\n });\n}\n\n/**\n * @param {object} options\n */\nfunction getTickMarkLength(options) {\n return options.drawTicks ? options.tickLength : 0;\n}\n\n/**\n * @param {object} options\n */\nfunction getTitleHeight(options, fallback) {\n if (!options.display) {\n return 0;\n }\n\n const font = toFont(options.font, fallback);\n const padding = toPadding(options.padding);\n const lines = isArray(options.text) ? options.text.length : 1;\n\n return (lines * font.lineHeight) + padding.height;\n}\n\nfunction createScaleContext(parent, scale) {\n return createContext(parent, {\n scale,\n type: 'scale'\n });\n}\n\nfunction createTickContext(parent, index, tick) {\n return createContext(parent, {\n tick,\n index,\n type: 'tick'\n });\n}\n\nfunction titleAlign(align, position, reverse) {\n /** @type {CanvasTextAlign} */\n let ret = _toLeftRightCenter(align);\n if ((reverse && position !== 'right') || (!reverse && position === 'right')) {\n ret = reverseAlign(ret);\n }\n return ret;\n}\n\nfunction titleArgs(scale, offset, position, align) {\n const {top, left, bottom, right, chart} = scale;\n const {chartArea, scales} = chart;\n let rotation = 0;\n let maxWidth, titleX, titleY;\n const height = bottom - top;\n const width = right - left;\n\n if (scale.isHorizontal()) {\n titleX = _alignStartEnd(align, left, right);\n\n if (isObject(position)) {\n const positionAxisID = Object.keys(position)[0];\n const value = position[positionAxisID];\n titleY = scales[positionAxisID].getPixelForValue(value) + height - offset;\n } else if (position === 'center') {\n titleY = (chartArea.bottom + chartArea.top) / 2 + height - offset;\n } else {\n titleY = offsetFromEdge(scale, position, offset);\n }\n maxWidth = right - left;\n } else {\n if (isObject(position)) {\n const positionAxisID = Object.keys(position)[0];\n const value = position[positionAxisID];\n titleX = scales[positionAxisID].getPixelForValue(value) - width + offset;\n } else if (position === 'center') {\n titleX = (chartArea.left + chartArea.right) / 2 - width + offset;\n } else {\n titleX = offsetFromEdge(scale, position, offset);\n }\n titleY = _alignStartEnd(align, bottom, top);\n rotation = position === 'left' ? -HALF_PI : HALF_PI;\n }\n return {titleX, titleY, maxWidth, rotation};\n}\n\nexport default class Scale extends Element {\n\n // eslint-disable-next-line max-statements\n constructor(cfg) {\n super();\n\n /** @type {string} */\n this.id = cfg.id;\n /** @type {string} */\n this.type = cfg.type;\n /** @type {any} */\n this.options = undefined;\n /** @type {CanvasRenderingContext2D} */\n this.ctx = cfg.ctx;\n /** @type {Chart} */\n this.chart = cfg.chart;\n\n // implements box\n /** @type {number} */\n this.top = undefined;\n /** @type {number} */\n this.bottom = undefined;\n /** @type {number} */\n this.left = undefined;\n /** @type {number} */\n this.right = undefined;\n /** @type {number} */\n this.width = undefined;\n /** @type {number} */\n this.height = undefined;\n this._margins = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n };\n /** @type {number} */\n this.maxWidth = undefined;\n /** @type {number} */\n this.maxHeight = undefined;\n /** @type {number} */\n this.paddingTop = undefined;\n /** @type {number} */\n this.paddingBottom = undefined;\n /** @type {number} */\n this.paddingLeft = undefined;\n /** @type {number} */\n this.paddingRight = undefined;\n\n // scale-specific properties\n /** @type {string=} */\n this.axis = undefined;\n /** @type {number=} */\n this.labelRotation = undefined;\n this.min = undefined;\n this.max = undefined;\n this._range = undefined;\n /** @type {Tick[]} */\n this.ticks = [];\n /** @type {object[]|null} */\n this._gridLineItems = null;\n /** @type {object[]|null} */\n this._labelItems = null;\n /** @type {object|null} */\n this._labelSizes = null;\n this._length = 0;\n this._maxLength = 0;\n this._longestTextCache = {};\n /** @type {number} */\n this._startPixel = undefined;\n /** @type {number} */\n this._endPixel = undefined;\n this._reversePixels = false;\n this._userMax = undefined;\n this._userMin = undefined;\n this._suggestedMax = undefined;\n this._suggestedMin = undefined;\n this._ticksLength = 0;\n this._borderValue = 0;\n this._cache = {};\n this._dataLimitsCached = false;\n this.$context = undefined;\n }\n\n /**\n\t * @param {any} options\n\t * @since 3.0\n\t */\n init(options) {\n this.options = options.setContext(this.getContext());\n\n this.axis = options.axis;\n\n // parse min/max value, so we can properly determine min/max for other scales\n this._userMin = this.parse(options.min);\n this._userMax = this.parse(options.max);\n this._suggestedMin = this.parse(options.suggestedMin);\n this._suggestedMax = this.parse(options.suggestedMax);\n }\n\n /**\n\t * Parse a supported input value to internal representation.\n\t * @param {*} raw\n\t * @param {number} [index]\n\t * @since 3.0\n\t */\n parse(raw, index) { // eslint-disable-line no-unused-vars\n return raw;\n }\n\n /**\n\t * @return {{min: number, max: number, minDefined: boolean, maxDefined: boolean}}\n\t * @protected\n\t * @since 3.0\n\t */\n getUserBounds() {\n let {_userMin, _userMax, _suggestedMin, _suggestedMax} = this;\n _userMin = finiteOrDefault(_userMin, Number.POSITIVE_INFINITY);\n _userMax = finiteOrDefault(_userMax, Number.NEGATIVE_INFINITY);\n _suggestedMin = finiteOrDefault(_suggestedMin, Number.POSITIVE_INFINITY);\n _suggestedMax = finiteOrDefault(_suggestedMax, Number.NEGATIVE_INFINITY);\n return {\n min: finiteOrDefault(_userMin, _suggestedMin),\n max: finiteOrDefault(_userMax, _suggestedMax),\n minDefined: isFinite(_userMin),\n maxDefined: isFinite(_userMax)\n };\n }\n\n /**\n\t * @param {boolean} canStack\n\t * @return {{min: number, max: number}}\n\t * @protected\n\t * @since 3.0\n\t */\n getMinMax(canStack) {\n // eslint-disable-next-line prefer-const\n let {min, max, minDefined, maxDefined} = this.getUserBounds();\n let range;\n\n if (minDefined && maxDefined) {\n return {min, max};\n }\n\n const metas = this.getMatchingVisibleMetas();\n for (let i = 0, ilen = metas.length; i < ilen; ++i) {\n range = metas[i].controller.getMinMax(this, canStack);\n if (!minDefined) {\n min = Math.min(min, range.min);\n }\n if (!maxDefined) {\n max = Math.max(max, range.max);\n }\n }\n\n // Make sure min <= max when only min or max is defined by user and the data is outside that range\n min = maxDefined && min > max ? max : min;\n max = minDefined && min > max ? min : max;\n\n return {\n min: finiteOrDefault(min, finiteOrDefault(max, min)),\n max: finiteOrDefault(max, finiteOrDefault(min, max))\n };\n }\n\n /**\n\t * Get the padding needed for the scale\n\t * @return {{top: number, left: number, bottom: number, right: number}} the necessary padding\n\t * @private\n\t */\n getPadding() {\n return {\n left: this.paddingLeft || 0,\n top: this.paddingTop || 0,\n right: this.paddingRight || 0,\n bottom: this.paddingBottom || 0\n };\n }\n\n /**\n\t * Returns the scale tick objects\n\t * @return {Tick[]}\n\t * @since 2.7\n\t */\n getTicks() {\n return this.ticks;\n }\n\n /**\n\t * @return {string[]}\n\t */\n getLabels() {\n const data = this.chart.data;\n return this.options.labels || (this.isHorizontal() ? data.xLabels : data.yLabels) || data.labels || [];\n }\n\n /**\n * @return {import('../types.js').LabelItem[]}\n */\n getLabelItems(chartArea = this.chart.chartArea) {\n const items = this._labelItems || (this._labelItems = this._computeLabelItems(chartArea));\n return items;\n }\n\n // When a new layout is created, reset the data limits cache\n beforeLayout() {\n this._cache = {};\n this._dataLimitsCached = false;\n }\n\n // These methods are ordered by lifecycle. Utilities then follow.\n // Any function defined here is inherited by all scale types.\n // Any function can be extended by the scale type\n\n beforeUpdate() {\n call(this.options.beforeUpdate, [this]);\n }\n\n /**\n\t * @param {number} maxWidth - the max width in pixels\n\t * @param {number} maxHeight - the max height in pixels\n\t * @param {{top: number, left: number, bottom: number, right: number}} margins - the space between the edge of the other scales and edge of the chart\n\t * This space comes from two sources:\n\t * - padding - space that's required to show the labels at the edges of the scale\n\t * - thickness of scales or legends in another orientation\n\t */\n update(maxWidth, maxHeight, margins) {\n const {beginAtZero, grace, ticks: tickOpts} = this.options;\n const sampleSize = tickOpts.sampleSize;\n\n // Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)\n this.beforeUpdate();\n\n // Absorb the master measurements\n this.maxWidth = maxWidth;\n this.maxHeight = maxHeight;\n this._margins = margins = Object.assign({\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n }, margins);\n\n this.ticks = null;\n this._labelSizes = null;\n this._gridLineItems = null;\n this._labelItems = null;\n\n // Dimensions\n this.beforeSetDimensions();\n this.setDimensions();\n this.afterSetDimensions();\n\n this._maxLength = this.isHorizontal()\n ? this.width + margins.left + margins.right\n : this.height + margins.top + margins.bottom;\n\n // Data min/max\n if (!this._dataLimitsCached) {\n this.beforeDataLimits();\n this.determineDataLimits();\n this.afterDataLimits();\n this._range = _addGrace(this, grace, beginAtZero);\n this._dataLimitsCached = true;\n }\n\n this.beforeBuildTicks();\n\n this.ticks = this.buildTicks() || [];\n\n // Allow modification of ticks in callback.\n this.afterBuildTicks();\n\n // Compute tick rotation and fit using a sampled subset of labels\n // We generally don't need to compute the size of every single label for determining scale size\n const samplingEnabled = sampleSize < this.ticks.length;\n this._convertTicksToLabels(samplingEnabled ? sample(this.ticks, sampleSize) : this.ticks);\n\n // configure is called twice, once here, once from core.controller.updateLayout.\n // Here we haven't been positioned yet, but dimensions are correct.\n // Variables set in configure are needed for calculateLabelRotation, and\n // it's ok that coordinates are not correct there, only dimensions matter.\n this.configure();\n\n // Tick Rotation\n this.beforeCalculateLabelRotation();\n this.calculateLabelRotation(); // Preconditions: number of ticks and sizes of largest labels must be calculated beforehand\n this.afterCalculateLabelRotation();\n\n // Auto-skip\n if (tickOpts.display && (tickOpts.autoSkip || tickOpts.source === 'auto')) {\n this.ticks = autoSkip(this, this.ticks);\n this._labelSizes = null;\n this.afterAutoSkip();\n }\n\n if (samplingEnabled) {\n // Generate labels using all non-skipped ticks\n this._convertTicksToLabels(this.ticks);\n }\n\n this.beforeFit();\n this.fit(); // Preconditions: label rotation and label sizes must be calculated beforehand\n this.afterFit();\n\n // IMPORTANT: after this point, we consider that `this.ticks` will NEVER change!\n\n this.afterUpdate();\n }\n\n /**\n\t * @protected\n\t */\n configure() {\n let reversePixels = this.options.reverse;\n let startPixel, endPixel;\n\n if (this.isHorizontal()) {\n startPixel = this.left;\n endPixel = this.right;\n } else {\n startPixel = this.top;\n endPixel = this.bottom;\n // by default vertical scales are from bottom to top, so pixels are reversed\n reversePixels = !reversePixels;\n }\n this._startPixel = startPixel;\n this._endPixel = endPixel;\n this._reversePixels = reversePixels;\n this._length = endPixel - startPixel;\n this._alignToPixels = this.options.alignToPixels;\n }\n\n afterUpdate() {\n call(this.options.afterUpdate, [this]);\n }\n\n //\n\n beforeSetDimensions() {\n call(this.options.beforeSetDimensions, [this]);\n }\n setDimensions() {\n // Set the unconstrained dimension before label rotation\n if (this.isHorizontal()) {\n // Reset position before calculating rotation\n this.width = this.maxWidth;\n this.left = 0;\n this.right = this.width;\n } else {\n this.height = this.maxHeight;\n\n // Reset position before calculating rotation\n this.top = 0;\n this.bottom = this.height;\n }\n\n // Reset padding\n this.paddingLeft = 0;\n this.paddingTop = 0;\n this.paddingRight = 0;\n this.paddingBottom = 0;\n }\n afterSetDimensions() {\n call(this.options.afterSetDimensions, [this]);\n }\n\n _callHooks(name) {\n this.chart.notifyPlugins(name, this.getContext());\n call(this.options[name], [this]);\n }\n\n // Data limits\n beforeDataLimits() {\n this._callHooks('beforeDataLimits');\n }\n determineDataLimits() {}\n afterDataLimits() {\n this._callHooks('afterDataLimits');\n }\n\n //\n beforeBuildTicks() {\n this._callHooks('beforeBuildTicks');\n }\n /**\n\t * @return {object[]} the ticks\n\t */\n buildTicks() {\n return [];\n }\n afterBuildTicks() {\n this._callHooks('afterBuildTicks');\n }\n\n beforeTickToLabelConversion() {\n call(this.options.beforeTickToLabelConversion, [this]);\n }\n /**\n\t * Convert ticks to label strings\n\t * @param {Tick[]} ticks\n\t */\n generateTickLabels(ticks) {\n const tickOpts = this.options.ticks;\n let i, ilen, tick;\n for (i = 0, ilen = ticks.length; i < ilen; i++) {\n tick = ticks[i];\n tick.label = call(tickOpts.callback, [tick.value, i, ticks], this);\n }\n }\n afterTickToLabelConversion() {\n call(this.options.afterTickToLabelConversion, [this]);\n }\n\n //\n\n beforeCalculateLabelRotation() {\n call(this.options.beforeCalculateLabelRotation, [this]);\n }\n calculateLabelRotation() {\n const options = this.options;\n const tickOpts = options.ticks;\n const numTicks = getTicksLimit(this.ticks.length, options.ticks.maxTicksLimit);\n const minRotation = tickOpts.minRotation || 0;\n const maxRotation = tickOpts.maxRotation;\n let labelRotation = minRotation;\n let tickWidth, maxHeight, maxLabelDiagonal;\n\n if (!this._isVisible() || !tickOpts.display || minRotation >= maxRotation || numTicks <= 1 || !this.isHorizontal()) {\n this.labelRotation = minRotation;\n return;\n }\n\n const labelSizes = this._getLabelSizes();\n const maxLabelWidth = labelSizes.widest.width;\n const maxLabelHeight = labelSizes.highest.height;\n\n // Estimate the width of each grid based on the canvas width, the maximum\n // label width and the number of tick intervals\n const maxWidth = _limitValue(this.chart.width - maxLabelWidth, 0, this.maxWidth);\n tickWidth = options.offset ? this.maxWidth / numTicks : maxWidth / (numTicks - 1);\n\n // Allow 3 pixels x2 padding either side for label readability\n if (maxLabelWidth + 6 > tickWidth) {\n tickWidth = maxWidth / (numTicks - (options.offset ? 0.5 : 1));\n maxHeight = this.maxHeight - getTickMarkLength(options.grid)\n\t\t\t\t- tickOpts.padding - getTitleHeight(options.title, this.chart.options.font);\n maxLabelDiagonal = Math.sqrt(maxLabelWidth * maxLabelWidth + maxLabelHeight * maxLabelHeight);\n labelRotation = toDegrees(Math.min(\n Math.asin(_limitValue((labelSizes.highest.height + 6) / tickWidth, -1, 1)),\n Math.asin(_limitValue(maxHeight / maxLabelDiagonal, -1, 1)) - Math.asin(_limitValue(maxLabelHeight / maxLabelDiagonal, -1, 1))\n ));\n labelRotation = Math.max(minRotation, Math.min(maxRotation, labelRotation));\n }\n\n this.labelRotation = labelRotation;\n }\n afterCalculateLabelRotation() {\n call(this.options.afterCalculateLabelRotation, [this]);\n }\n afterAutoSkip() {}\n\n //\n\n beforeFit() {\n call(this.options.beforeFit, [this]);\n }\n fit() {\n // Reset\n const minSize = {\n width: 0,\n height: 0\n };\n\n const {chart, options: {ticks: tickOpts, title: titleOpts, grid: gridOpts}} = this;\n const display = this._isVisible();\n const isHorizontal = this.isHorizontal();\n\n if (display) {\n const titleHeight = getTitleHeight(titleOpts, chart.options.font);\n if (isHorizontal) {\n minSize.width = this.maxWidth;\n minSize.height = getTickMarkLength(gridOpts) + titleHeight;\n } else {\n minSize.height = this.maxHeight; // fill all the height\n minSize.width = getTickMarkLength(gridOpts) + titleHeight;\n }\n\n // Don't bother fitting the ticks if we are not showing the labels\n if (tickOpts.display && this.ticks.length) {\n const {first, last, widest, highest} = this._getLabelSizes();\n const tickPadding = tickOpts.padding * 2;\n const angleRadians = toRadians(this.labelRotation);\n const cos = Math.cos(angleRadians);\n const sin = Math.sin(angleRadians);\n\n if (isHorizontal) {\n // A horizontal axis is more constrained by the height.\n const labelHeight = tickOpts.mirror ? 0 : sin * widest.width + cos * highest.height;\n minSize.height = Math.min(this.maxHeight, minSize.height + labelHeight + tickPadding);\n } else {\n // A vertical axis is more constrained by the width. Labels are the\n // dominant factor here, so get that length first and account for padding\n const labelWidth = tickOpts.mirror ? 0 : cos * widest.width + sin * highest.height;\n\n minSize.width = Math.min(this.maxWidth, minSize.width + labelWidth + tickPadding);\n }\n this._calculatePadding(first, last, sin, cos);\n }\n }\n\n this._handleMargins();\n\n if (isHorizontal) {\n this.width = this._length = chart.width - this._margins.left - this._margins.right;\n this.height = minSize.height;\n } else {\n this.width = minSize.width;\n this.height = this._length = chart.height - this._margins.top - this._margins.bottom;\n }\n }\n\n _calculatePadding(first, last, sin, cos) {\n const {ticks: {align, padding}, position} = this.options;\n const isRotated = this.labelRotation !== 0;\n const labelsBelowTicks = position !== 'top' && this.axis === 'x';\n\n if (this.isHorizontal()) {\n const offsetLeft = this.getPixelForTick(0) - this.left;\n const offsetRight = this.right - this.getPixelForTick(this.ticks.length - 1);\n let paddingLeft = 0;\n let paddingRight = 0;\n\n // Ensure that our ticks are always inside the canvas. When rotated, ticks are right aligned\n // which means that the right padding is dominated by the font height\n if (isRotated) {\n if (labelsBelowTicks) {\n paddingLeft = cos * first.width;\n paddingRight = sin * last.height;\n } else {\n paddingLeft = sin * first.height;\n paddingRight = cos * last.width;\n }\n } else if (align === 'start') {\n paddingRight = last.width;\n } else if (align === 'end') {\n paddingLeft = first.width;\n } else if (align !== 'inner') {\n paddingLeft = first.width / 2;\n paddingRight = last.width / 2;\n }\n\n // Adjust padding taking into account changes in offsets\n this.paddingLeft = Math.max((paddingLeft - offsetLeft + padding) * this.width / (this.width - offsetLeft), 0);\n this.paddingRight = Math.max((paddingRight - offsetRight + padding) * this.width / (this.width - offsetRight), 0);\n } else {\n let paddingTop = last.height / 2;\n let paddingBottom = first.height / 2;\n\n if (align === 'start') {\n paddingTop = 0;\n paddingBottom = first.height;\n } else if (align === 'end') {\n paddingTop = last.height;\n paddingBottom = 0;\n }\n\n this.paddingTop = paddingTop + padding;\n this.paddingBottom = paddingBottom + padding;\n }\n }\n\n /**\n\t * Handle margins and padding interactions\n\t * @private\n\t */\n _handleMargins() {\n if (this._margins) {\n this._margins.left = Math.max(this.paddingLeft, this._margins.left);\n this._margins.top = Math.max(this.paddingTop, this._margins.top);\n this._margins.right = Math.max(this.paddingRight, this._margins.right);\n this._margins.bottom = Math.max(this.paddingBottom, this._margins.bottom);\n }\n }\n\n afterFit() {\n call(this.options.afterFit, [this]);\n }\n\n // Shared Methods\n /**\n\t * @return {boolean}\n\t */\n isHorizontal() {\n const {axis, position} = this.options;\n return position === 'top' || position === 'bottom' || axis === 'x';\n }\n /**\n\t * @return {boolean}\n\t */\n isFullSize() {\n return this.options.fullSize;\n }\n\n /**\n\t * @param {Tick[]} ticks\n\t * @private\n\t */\n _convertTicksToLabels(ticks) {\n this.beforeTickToLabelConversion();\n\n this.generateTickLabels(ticks);\n\n // Ticks should be skipped when callback returns null or undef, so lets remove those.\n let i, ilen;\n for (i = 0, ilen = ticks.length; i < ilen; i++) {\n if (isNullOrUndef(ticks[i].label)) {\n ticks.splice(i, 1);\n ilen--;\n i--;\n }\n }\n\n this.afterTickToLabelConversion();\n }\n\n /**\n\t * @return {{ first: object, last: object, widest: object, highest: object, widths: Array, heights: array }}\n\t * @private\n\t */\n _getLabelSizes() {\n let labelSizes = this._labelSizes;\n\n if (!labelSizes) {\n const sampleSize = this.options.ticks.sampleSize;\n let ticks = this.ticks;\n if (sampleSize < ticks.length) {\n ticks = sample(ticks, sampleSize);\n }\n\n this._labelSizes = labelSizes = this._computeLabelSizes(ticks, ticks.length, this.options.ticks.maxTicksLimit);\n }\n\n return labelSizes;\n }\n\n /**\n\t * Returns {width, height, offset} objects for the first, last, widest, highest tick\n\t * labels where offset indicates the anchor point offset from the top in pixels.\n\t * @return {{ first: object, last: object, widest: object, highest: object, widths: Array, heights: array }}\n\t * @private\n\t */\n _computeLabelSizes(ticks, length, maxTicksLimit) {\n const {ctx, _longestTextCache: caches} = this;\n const widths = [];\n const heights = [];\n const increment = Math.floor(length / getTicksLimit(length, maxTicksLimit));\n let widestLabelSize = 0;\n let highestLabelSize = 0;\n let i, j, jlen, label, tickFont, fontString, cache, lineHeight, width, height, nestedLabel;\n\n for (i = 0; i < length; i += increment) {\n label = ticks[i].label;\n tickFont = this._resolveTickFontOptions(i);\n ctx.font = fontString = tickFont.string;\n cache = caches[fontString] = caches[fontString] || {data: {}, gc: []};\n lineHeight = tickFont.lineHeight;\n width = height = 0;\n // Undefined labels and arrays should not be measured\n if (!isNullOrUndef(label) && !isArray(label)) {\n width = _measureText(ctx, cache.data, cache.gc, width, label);\n height = lineHeight;\n } else if (isArray(label)) {\n // if it is an array let's measure each element\n for (j = 0, jlen = label.length; j < jlen; ++j) {\n nestedLabel = /** @type {string} */ (label[j]);\n // Undefined labels and arrays should not be measured\n if (!isNullOrUndef(nestedLabel) && !isArray(nestedLabel)) {\n width = _measureText(ctx, cache.data, cache.gc, width, nestedLabel);\n height += lineHeight;\n }\n }\n }\n widths.push(width);\n heights.push(height);\n widestLabelSize = Math.max(width, widestLabelSize);\n highestLabelSize = Math.max(height, highestLabelSize);\n }\n garbageCollect(caches, length);\n\n const widest = widths.indexOf(widestLabelSize);\n const highest = heights.indexOf(highestLabelSize);\n\n const valueAt = (idx) => ({width: widths[idx] || 0, height: heights[idx] || 0});\n\n return {\n first: valueAt(0),\n last: valueAt(length - 1),\n widest: valueAt(widest),\n highest: valueAt(highest),\n widths,\n heights,\n };\n }\n\n /**\n\t * Used to get the label to display in the tooltip for the given value\n\t * @param {*} value\n\t * @return {string}\n\t */\n getLabelForValue(value) {\n return value;\n }\n\n /**\n\t * Returns the location of the given data point. Value can either be an index or a numerical value\n\t * The coordinate (0, 0) is at the upper-left corner of the canvas\n\t * @param {*} value\n\t * @param {number} [index]\n\t * @return {number}\n\t */\n getPixelForValue(value, index) { // eslint-disable-line no-unused-vars\n return NaN;\n }\n\n /**\n\t * Used to get the data value from a given pixel. This is the inverse of getPixelForValue\n\t * The coordinate (0, 0) is at the upper-left corner of the canvas\n\t * @param {number} pixel\n\t * @return {*}\n\t */\n getValueForPixel(pixel) {} // eslint-disable-line no-unused-vars\n\n /**\n\t * Returns the location of the tick at the given index\n\t * The coordinate (0, 0) is at the upper-left corner of the canvas\n\t * @param {number} index\n\t * @return {number}\n\t */\n getPixelForTick(index) {\n const ticks = this.ticks;\n if (index < 0 || index > ticks.length - 1) {\n return null;\n }\n return this.getPixelForValue(ticks[index].value);\n }\n\n /**\n\t * Utility for getting the pixel location of a percentage of scale\n\t * The coordinate (0, 0) is at the upper-left corner of the canvas\n\t * @param {number} decimal\n\t * @return {number}\n\t */\n getPixelForDecimal(decimal) {\n if (this._reversePixels) {\n decimal = 1 - decimal;\n }\n\n const pixel = this._startPixel + decimal * this._length;\n return _int16Range(this._alignToPixels ? _alignPixel(this.chart, pixel, 0) : pixel);\n }\n\n /**\n\t * @param {number} pixel\n\t * @return {number}\n\t */\n getDecimalForPixel(pixel) {\n const decimal = (pixel - this._startPixel) / this._length;\n return this._reversePixels ? 1 - decimal : decimal;\n }\n\n /**\n\t * Returns the pixel for the minimum chart value\n\t * The coordinate (0, 0) is at the upper-left corner of the canvas\n\t * @return {number}\n\t */\n getBasePixel() {\n return this.getPixelForValue(this.getBaseValue());\n }\n\n /**\n\t * @return {number}\n\t */\n getBaseValue() {\n const {min, max} = this;\n\n return min < 0 && max < 0 ? max :\n min > 0 && max > 0 ? min :\n 0;\n }\n\n /**\n\t * @protected\n\t */\n getContext(index) {\n const ticks = this.ticks || [];\n\n if (index >= 0 && index < ticks.length) {\n const tick = ticks[index];\n return tick.$context ||\n\t\t\t\t(tick.$context = createTickContext(this.getContext(), index, tick));\n }\n return this.$context ||\n\t\t\t(this.$context = createScaleContext(this.chart.getContext(), this));\n }\n\n /**\n\t * @return {number}\n\t * @private\n\t */\n _tickSize() {\n const optionTicks = this.options.ticks;\n\n // Calculate space needed by label in axis direction.\n const rot = toRadians(this.labelRotation);\n const cos = Math.abs(Math.cos(rot));\n const sin = Math.abs(Math.sin(rot));\n\n const labelSizes = this._getLabelSizes();\n const padding = optionTicks.autoSkipPadding || 0;\n const w = labelSizes ? labelSizes.widest.width + padding : 0;\n const h = labelSizes ? labelSizes.highest.height + padding : 0;\n\n // Calculate space needed for 1 tick in axis direction.\n return this.isHorizontal()\n ? h * cos > w * sin ? w / cos : h / sin\n : h * sin < w * cos ? h / cos : w / sin;\n }\n\n /**\n\t * @return {boolean}\n\t * @private\n\t */\n _isVisible() {\n const display = this.options.display;\n\n if (display !== 'auto') {\n return !!display;\n }\n\n return this.getMatchingVisibleMetas().length > 0;\n }\n\n /**\n\t * @private\n\t */\n _computeGridLineItems(chartArea) {\n const axis = this.axis;\n const chart = this.chart;\n const options = this.options;\n const {grid, position, border} = options;\n const offset = grid.offset;\n const isHorizontal = this.isHorizontal();\n const ticks = this.ticks;\n const ticksLength = ticks.length + (offset ? 1 : 0);\n const tl = getTickMarkLength(grid);\n const items = [];\n\n const borderOpts = border.setContext(this.getContext());\n const axisWidth = borderOpts.display ? borderOpts.width : 0;\n const axisHalfWidth = axisWidth / 2;\n const alignBorderValue = function(pixel) {\n return _alignPixel(chart, pixel, axisWidth);\n };\n let borderValue, i, lineValue, alignedLineValue;\n let tx1, ty1, tx2, ty2, x1, y1, x2, y2;\n\n if (position === 'top') {\n borderValue = alignBorderValue(this.bottom);\n ty1 = this.bottom - tl;\n ty2 = borderValue - axisHalfWidth;\n y1 = alignBorderValue(chartArea.top) + axisHalfWidth;\n y2 = chartArea.bottom;\n } else if (position === 'bottom') {\n borderValue = alignBorderValue(this.top);\n y1 = chartArea.top;\n y2 = alignBorderValue(chartArea.bottom) - axisHalfWidth;\n ty1 = borderValue + axisHalfWidth;\n ty2 = this.top + tl;\n } else if (position === 'left') {\n borderValue = alignBorderValue(this.right);\n tx1 = this.right - tl;\n tx2 = borderValue - axisHalfWidth;\n x1 = alignBorderValue(chartArea.left) + axisHalfWidth;\n x2 = chartArea.right;\n } else if (position === 'right') {\n borderValue = alignBorderValue(this.left);\n x1 = chartArea.left;\n x2 = alignBorderValue(chartArea.right) - axisHalfWidth;\n tx1 = borderValue + axisHalfWidth;\n tx2 = this.left + tl;\n } else if (axis === 'x') {\n if (position === 'center') {\n borderValue = alignBorderValue((chartArea.top + chartArea.bottom) / 2 + 0.5);\n } else if (isObject(position)) {\n const positionAxisID = Object.keys(position)[0];\n const value = position[positionAxisID];\n borderValue = alignBorderValue(this.chart.scales[positionAxisID].getPixelForValue(value));\n }\n\n y1 = chartArea.top;\n y2 = chartArea.bottom;\n ty1 = borderValue + axisHalfWidth;\n ty2 = ty1 + tl;\n } else if (axis === 'y') {\n if (position === 'center') {\n borderValue = alignBorderValue((chartArea.left + chartArea.right) / 2);\n } else if (isObject(position)) {\n const positionAxisID = Object.keys(position)[0];\n const value = position[positionAxisID];\n borderValue = alignBorderValue(this.chart.scales[positionAxisID].getPixelForValue(value));\n }\n\n tx1 = borderValue - axisHalfWidth;\n tx2 = tx1 - tl;\n x1 = chartArea.left;\n x2 = chartArea.right;\n }\n\n const limit = valueOrDefault(options.ticks.maxTicksLimit, ticksLength);\n const step = Math.max(1, Math.ceil(ticksLength / limit));\n for (i = 0; i < ticksLength; i += step) {\n const context = this.getContext(i);\n const optsAtIndex = grid.setContext(context);\n const optsAtIndexBorder = border.setContext(context);\n\n const lineWidth = optsAtIndex.lineWidth;\n const lineColor = optsAtIndex.color;\n const borderDash = optsAtIndexBorder.dash || [];\n const borderDashOffset = optsAtIndexBorder.dashOffset;\n\n const tickWidth = optsAtIndex.tickWidth;\n const tickColor = optsAtIndex.tickColor;\n const tickBorderDash = optsAtIndex.tickBorderDash || [];\n const tickBorderDashOffset = optsAtIndex.tickBorderDashOffset;\n\n lineValue = getPixelForGridLine(this, i, offset);\n\n // Skip if the pixel is out of the range\n if (lineValue === undefined) {\n continue;\n }\n\n alignedLineValue = _alignPixel(chart, lineValue, lineWidth);\n\n if (isHorizontal) {\n tx1 = tx2 = x1 = x2 = alignedLineValue;\n } else {\n ty1 = ty2 = y1 = y2 = alignedLineValue;\n }\n\n items.push({\n tx1,\n ty1,\n tx2,\n ty2,\n x1,\n y1,\n x2,\n y2,\n width: lineWidth,\n color: lineColor,\n borderDash,\n borderDashOffset,\n tickWidth,\n tickColor,\n tickBorderDash,\n tickBorderDashOffset,\n });\n }\n\n this._ticksLength = ticksLength;\n this._borderValue = borderValue;\n\n return items;\n }\n\n /**\n\t * @private\n\t */\n _computeLabelItems(chartArea) {\n const axis = this.axis;\n const options = this.options;\n const {position, ticks: optionTicks} = options;\n const isHorizontal = this.isHorizontal();\n const ticks = this.ticks;\n const {align, crossAlign, padding, mirror} = optionTicks;\n const tl = getTickMarkLength(options.grid);\n const tickAndPadding = tl + padding;\n const hTickAndPadding = mirror ? -padding : tickAndPadding;\n const rotation = -toRadians(this.labelRotation);\n const items = [];\n let i, ilen, tick, label, x, y, textAlign, pixel, font, lineHeight, lineCount, textOffset;\n let textBaseline = 'middle';\n\n if (position === 'top') {\n y = this.bottom - hTickAndPadding;\n textAlign = this._getXAxisLabelAlignment();\n } else if (position === 'bottom') {\n y = this.top + hTickAndPadding;\n textAlign = this._getXAxisLabelAlignment();\n } else if (position === 'left') {\n const ret = this._getYAxisLabelAlignment(tl);\n textAlign = ret.textAlign;\n x = ret.x;\n } else if (position === 'right') {\n const ret = this._getYAxisLabelAlignment(tl);\n textAlign = ret.textAlign;\n x = ret.x;\n } else if (axis === 'x') {\n if (position === 'center') {\n y = ((chartArea.top + chartArea.bottom) / 2) + tickAndPadding;\n } else if (isObject(position)) {\n const positionAxisID = Object.keys(position)[0];\n const value = position[positionAxisID];\n y = this.chart.scales[positionAxisID].getPixelForValue(value) + tickAndPadding;\n }\n textAlign = this._getXAxisLabelAlignment();\n } else if (axis === 'y') {\n if (position === 'center') {\n x = ((chartArea.left + chartArea.right) / 2) - tickAndPadding;\n } else if (isObject(position)) {\n const positionAxisID = Object.keys(position)[0];\n const value = position[positionAxisID];\n x = this.chart.scales[positionAxisID].getPixelForValue(value);\n }\n textAlign = this._getYAxisLabelAlignment(tl).textAlign;\n }\n\n if (axis === 'y') {\n if (align === 'start') {\n textBaseline = 'top';\n } else if (align === 'end') {\n textBaseline = 'bottom';\n }\n }\n\n const labelSizes = this._getLabelSizes();\n for (i = 0, ilen = ticks.length; i < ilen; ++i) {\n tick = ticks[i];\n label = tick.label;\n\n const optsAtIndex = optionTicks.setContext(this.getContext(i));\n pixel = this.getPixelForTick(i) + optionTicks.labelOffset;\n font = this._resolveTickFontOptions(i);\n lineHeight = font.lineHeight;\n lineCount = isArray(label) ? label.length : 1;\n const halfCount = lineCount / 2;\n const color = optsAtIndex.color;\n const strokeColor = optsAtIndex.textStrokeColor;\n const strokeWidth = optsAtIndex.textStrokeWidth;\n let tickTextAlign = textAlign;\n\n if (isHorizontal) {\n x = pixel;\n\n if (textAlign === 'inner') {\n if (i === ilen - 1) {\n tickTextAlign = !this.options.reverse ? 'right' : 'left';\n } else if (i === 0) {\n tickTextAlign = !this.options.reverse ? 'left' : 'right';\n } else {\n tickTextAlign = 'center';\n }\n }\n\n if (position === 'top') {\n if (crossAlign === 'near' || rotation !== 0) {\n textOffset = -lineCount * lineHeight + lineHeight / 2;\n } else if (crossAlign === 'center') {\n textOffset = -labelSizes.highest.height / 2 - halfCount * lineHeight + lineHeight;\n } else {\n textOffset = -labelSizes.highest.height + lineHeight / 2;\n }\n } else {\n // eslint-disable-next-line no-lonely-if\n if (crossAlign === 'near' || rotation !== 0) {\n textOffset = lineHeight / 2;\n } else if (crossAlign === 'center') {\n textOffset = labelSizes.highest.height / 2 - halfCount * lineHeight;\n } else {\n textOffset = labelSizes.highest.height - lineCount * lineHeight;\n }\n }\n if (mirror) {\n textOffset *= -1;\n }\n if (rotation !== 0 && !optsAtIndex.showLabelBackdrop) {\n x += (lineHeight / 2) * Math.sin(rotation);\n }\n } else {\n y = pixel;\n textOffset = (1 - lineCount) * lineHeight / 2;\n }\n\n let backdrop;\n\n if (optsAtIndex.showLabelBackdrop) {\n const labelPadding = toPadding(optsAtIndex.backdropPadding);\n const height = labelSizes.heights[i];\n const width = labelSizes.widths[i];\n\n let top = textOffset - labelPadding.top;\n let left = 0 - labelPadding.left;\n\n switch (textBaseline) {\n case 'middle':\n top -= height / 2;\n break;\n case 'bottom':\n top -= height;\n break;\n default:\n break;\n }\n\n switch (textAlign) {\n case 'center':\n left -= width / 2;\n break;\n case 'right':\n left -= width;\n break;\n default:\n break;\n }\n\n backdrop = {\n left,\n top,\n width: width + labelPadding.width,\n height: height + labelPadding.height,\n\n color: optsAtIndex.backdropColor,\n };\n }\n\n items.push({\n label,\n font,\n textOffset,\n options: {\n rotation,\n color,\n strokeColor,\n strokeWidth,\n textAlign: tickTextAlign,\n textBaseline,\n translation: [x, y],\n backdrop,\n }\n });\n }\n\n return items;\n }\n\n _getXAxisLabelAlignment() {\n const {position, ticks} = this.options;\n const rotation = -toRadians(this.labelRotation);\n\n if (rotation) {\n return position === 'top' ? 'left' : 'right';\n }\n\n let align = 'center';\n\n if (ticks.align === 'start') {\n align = 'left';\n } else if (ticks.align === 'end') {\n align = 'right';\n } else if (ticks.align === 'inner') {\n align = 'inner';\n }\n\n return align;\n }\n\n _getYAxisLabelAlignment(tl) {\n const {position, ticks: {crossAlign, mirror, padding}} = this.options;\n const labelSizes = this._getLabelSizes();\n const tickAndPadding = tl + padding;\n const widest = labelSizes.widest.width;\n\n let textAlign;\n let x;\n\n if (position === 'left') {\n if (mirror) {\n x = this.right + padding;\n\n if (crossAlign === 'near') {\n textAlign = 'left';\n } else if (crossAlign === 'center') {\n textAlign = 'center';\n x += (widest / 2);\n } else {\n textAlign = 'right';\n x += widest;\n }\n } else {\n x = this.right - tickAndPadding;\n\n if (crossAlign === 'near') {\n textAlign = 'right';\n } else if (crossAlign === 'center') {\n textAlign = 'center';\n x -= (widest / 2);\n } else {\n textAlign = 'left';\n x = this.left;\n }\n }\n } else if (position === 'right') {\n if (mirror) {\n x = this.left + padding;\n\n if (crossAlign === 'near') {\n textAlign = 'right';\n } else if (crossAlign === 'center') {\n textAlign = 'center';\n x -= (widest / 2);\n } else {\n textAlign = 'left';\n x -= widest;\n }\n } else {\n x = this.left + tickAndPadding;\n\n if (crossAlign === 'near') {\n textAlign = 'left';\n } else if (crossAlign === 'center') {\n textAlign = 'center';\n x += widest / 2;\n } else {\n textAlign = 'right';\n x = this.right;\n }\n }\n } else {\n textAlign = 'right';\n }\n\n return {textAlign, x};\n }\n\n /**\n\t * @private\n\t */\n _computeLabelArea() {\n if (this.options.ticks.mirror) {\n return;\n }\n\n const chart = this.chart;\n const position = this.options.position;\n\n if (position === 'left' || position === 'right') {\n return {top: 0, left: this.left, bottom: chart.height, right: this.right};\n } if (position === 'top' || position === 'bottom') {\n return {top: this.top, left: 0, bottom: this.bottom, right: chart.width};\n }\n }\n\n /**\n * @protected\n */\n drawBackground() {\n const {ctx, options: {backgroundColor}, left, top, width, height} = this;\n if (backgroundColor) {\n ctx.save();\n ctx.fillStyle = backgroundColor;\n ctx.fillRect(left, top, width, height);\n ctx.restore();\n }\n }\n\n getLineWidthForValue(value) {\n const grid = this.options.grid;\n if (!this._isVisible() || !grid.display) {\n return 0;\n }\n const ticks = this.ticks;\n const index = ticks.findIndex(t => t.value === value);\n if (index >= 0) {\n const opts = grid.setContext(this.getContext(index));\n return opts.lineWidth;\n }\n return 0;\n }\n\n /**\n\t * @protected\n\t */\n drawGrid(chartArea) {\n const grid = this.options.grid;\n const ctx = this.ctx;\n const items = this._gridLineItems || (this._gridLineItems = this._computeGridLineItems(chartArea));\n let i, ilen;\n\n const drawLine = (p1, p2, style) => {\n if (!style.width || !style.color) {\n return;\n }\n ctx.save();\n ctx.lineWidth = style.width;\n ctx.strokeStyle = style.color;\n ctx.setLineDash(style.borderDash || []);\n ctx.lineDashOffset = style.borderDashOffset;\n\n ctx.beginPath();\n ctx.moveTo(p1.x, p1.y);\n ctx.lineTo(p2.x, p2.y);\n ctx.stroke();\n ctx.restore();\n };\n\n if (grid.display) {\n for (i = 0, ilen = items.length; i < ilen; ++i) {\n const item = items[i];\n\n if (grid.drawOnChartArea) {\n drawLine(\n {x: item.x1, y: item.y1},\n {x: item.x2, y: item.y2},\n item\n );\n }\n\n if (grid.drawTicks) {\n drawLine(\n {x: item.tx1, y: item.ty1},\n {x: item.tx2, y: item.ty2},\n {\n color: item.tickColor,\n width: item.tickWidth,\n borderDash: item.tickBorderDash,\n borderDashOffset: item.tickBorderDashOffset\n }\n );\n }\n }\n }\n }\n\n /**\n\t * @protected\n\t */\n drawBorder() {\n const {chart, ctx, options: {border, grid}} = this;\n const borderOpts = border.setContext(this.getContext());\n const axisWidth = border.display ? borderOpts.width : 0;\n if (!axisWidth) {\n return;\n }\n const lastLineWidth = grid.setContext(this.getContext(0)).lineWidth;\n const borderValue = this._borderValue;\n let x1, x2, y1, y2;\n\n if (this.isHorizontal()) {\n x1 = _alignPixel(chart, this.left, axisWidth) - axisWidth / 2;\n x2 = _alignPixel(chart, this.right, lastLineWidth) + lastLineWidth / 2;\n y1 = y2 = borderValue;\n } else {\n y1 = _alignPixel(chart, this.top, axisWidth) - axisWidth / 2;\n y2 = _alignPixel(chart, this.bottom, lastLineWidth) + lastLineWidth / 2;\n x1 = x2 = borderValue;\n }\n ctx.save();\n ctx.lineWidth = borderOpts.width;\n ctx.strokeStyle = borderOpts.color;\n\n ctx.beginPath();\n ctx.moveTo(x1, y1);\n ctx.lineTo(x2, y2);\n ctx.stroke();\n\n ctx.restore();\n }\n\n /**\n\t * @protected\n\t */\n drawLabels(chartArea) {\n const optionTicks = this.options.ticks;\n\n if (!optionTicks.display) {\n return;\n }\n\n const ctx = this.ctx;\n\n const area = this._computeLabelArea();\n if (area) {\n clipArea(ctx, area);\n }\n\n const items = this.getLabelItems(chartArea);\n for (const item of items) {\n const renderTextOptions = item.options;\n const tickFont = item.font;\n const label = item.label;\n const y = item.textOffset;\n renderText(ctx, label, 0, y, tickFont, renderTextOptions);\n }\n\n if (area) {\n unclipArea(ctx);\n }\n }\n\n /**\n\t * @protected\n\t */\n drawTitle() {\n const {ctx, options: {position, title, reverse}} = this;\n\n if (!title.display) {\n return;\n }\n\n const font = toFont(title.font);\n const padding = toPadding(title.padding);\n const align = title.align;\n let offset = font.lineHeight / 2;\n\n if (position === 'bottom' || position === 'center' || isObject(position)) {\n offset += padding.bottom;\n if (isArray(title.text)) {\n offset += font.lineHeight * (title.text.length - 1);\n }\n } else {\n offset += padding.top;\n }\n\n const {titleX, titleY, maxWidth, rotation} = titleArgs(this, offset, position, align);\n\n renderText(ctx, title.text, 0, 0, font, {\n color: title.color,\n maxWidth,\n rotation,\n textAlign: titleAlign(align, position, reverse),\n textBaseline: 'middle',\n translation: [titleX, titleY],\n });\n }\n\n draw(chartArea) {\n if (!this._isVisible()) {\n return;\n }\n\n this.drawBackground();\n this.drawGrid(chartArea);\n this.drawBorder();\n this.drawTitle();\n this.drawLabels(chartArea);\n }\n\n /**\n\t * @return {object[]}\n\t * @private\n\t */\n _layers() {\n const opts = this.options;\n const tz = opts.ticks && opts.ticks.z || 0;\n const gz = valueOrDefault(opts.grid && opts.grid.z, -1);\n const bz = valueOrDefault(opts.border && opts.border.z, 0);\n\n if (!this._isVisible() || this.draw !== Scale.prototype.draw) {\n // backward compatibility: draw has been overridden by custom scale\n return [{\n z: tz,\n draw: (chartArea) => {\n this.draw(chartArea);\n }\n }];\n }\n\n return [{\n z: gz,\n draw: (chartArea) => {\n this.drawBackground();\n this.drawGrid(chartArea);\n this.drawTitle();\n }\n }, {\n z: bz,\n draw: () => {\n this.drawBorder();\n }\n }, {\n z: tz,\n draw: (chartArea) => {\n this.drawLabels(chartArea);\n }\n }];\n }\n\n /**\n\t * Returns visible dataset metas that are attached to this scale\n\t * @param {string} [type] - if specified, also filter by dataset type\n\t * @return {object[]}\n\t */\n getMatchingVisibleMetas(type) {\n const metas = this.chart.getSortedVisibleDatasetMetas();\n const axisID = this.axis + 'AxisID';\n const result = [];\n let i, ilen;\n\n for (i = 0, ilen = metas.length; i < ilen; ++i) {\n const meta = metas[i];\n if (meta[axisID] === this.id && (!type || meta.type === type)) {\n result.push(meta);\n }\n }\n return result;\n }\n\n /**\n\t * @param {number} index\n\t * @return {object}\n\t * @protected\n \t */\n _resolveTickFontOptions(index) {\n const opts = this.options.ticks.setContext(this.getContext(index));\n return toFont(opts.font);\n }\n\n /**\n * @protected\n */\n _maxDigits() {\n const fontSize = this._resolveTickFontOptions(0).lineHeight;\n return (this.isHorizontal() ? this.width : this.height) / fontSize;\n }\n}\n","import {merge} from '../helpers/index.js';\nimport defaults, {overrides} from './core.defaults.js';\n\n/**\n * @typedef {{id: string, defaults: any, overrides?: any, defaultRoutes: any}} IChartComponent\n */\n\nexport default class TypedRegistry {\n constructor(type, scope, override) {\n this.type = type;\n this.scope = scope;\n this.override = override;\n this.items = Object.create(null);\n }\n\n isForType(type) {\n return Object.prototype.isPrototypeOf.call(this.type.prototype, type.prototype);\n }\n\n /**\n\t * @param {IChartComponent} item\n\t * @returns {string} The scope where items defaults were registered to.\n\t */\n register(item) {\n const proto = Object.getPrototypeOf(item);\n let parentScope;\n\n if (isIChartComponent(proto)) {\n // Make sure the parent is registered and note the scope where its defaults are.\n parentScope = this.register(proto);\n }\n\n const items = this.items;\n const id = item.id;\n const scope = this.scope + '.' + id;\n\n if (!id) {\n throw new Error('class does not have id: ' + item);\n }\n\n if (id in items) {\n // already registered\n return scope;\n }\n\n items[id] = item;\n registerDefaults(item, scope, parentScope);\n if (this.override) {\n defaults.override(item.id, item.overrides);\n }\n\n return scope;\n }\n\n /**\n\t * @param {string} id\n\t * @returns {object?}\n\t */\n get(id) {\n return this.items[id];\n }\n\n /**\n\t * @param {IChartComponent} item\n\t */\n unregister(item) {\n const items = this.items;\n const id = item.id;\n const scope = this.scope;\n\n if (id in items) {\n delete items[id];\n }\n\n if (scope && id in defaults[scope]) {\n delete defaults[scope][id];\n if (this.override) {\n delete overrides[id];\n }\n }\n }\n}\n\nfunction registerDefaults(item, scope, parentScope) {\n // Inherit the parent's defaults and keep existing defaults\n const itemDefaults = merge(Object.create(null), [\n parentScope ? defaults.get(parentScope) : {},\n defaults.get(scope),\n item.defaults\n ]);\n\n defaults.set(scope, itemDefaults);\n\n if (item.defaultRoutes) {\n routeDefaults(scope, item.defaultRoutes);\n }\n\n if (item.descriptors) {\n defaults.describe(scope, item.descriptors);\n }\n}\n\nfunction routeDefaults(scope, routes) {\n Object.keys(routes).forEach(property => {\n const propertyParts = property.split('.');\n const sourceName = propertyParts.pop();\n const sourceScope = [scope].concat(propertyParts).join('.');\n const parts = routes[property].split('.');\n const targetName = parts.pop();\n const targetScope = parts.join('.');\n defaults.route(sourceScope, sourceName, targetScope, targetName);\n });\n}\n\nfunction isIChartComponent(proto) {\n return 'id' in proto && 'defaults' in proto;\n}\n","import DatasetController from './core.datasetController.js';\nimport Element from './core.element.js';\nimport Scale from './core.scale.js';\nimport TypedRegistry from './core.typedRegistry.js';\nimport {each, callback as call, _capitalize} from '../helpers/helpers.core.js';\n\n/**\n * Please use the module's default export which provides a singleton instance\n * Note: class is exported for typedoc\n */\nexport class Registry {\n constructor() {\n this.controllers = new TypedRegistry(DatasetController, 'datasets', true);\n this.elements = new TypedRegistry(Element, 'elements');\n this.plugins = new TypedRegistry(Object, 'plugins');\n this.scales = new TypedRegistry(Scale, 'scales');\n // Order is important, Scale has Element in prototype chain,\n // so Scales must be before Elements. Plugins are a fallback, so not listed here.\n this._typedRegistries = [this.controllers, this.scales, this.elements];\n }\n\n /**\n\t * @param {...any} args\n\t */\n add(...args) {\n this._each('register', args);\n }\n\n remove(...args) {\n this._each('unregister', args);\n }\n\n /**\n\t * @param {...typeof DatasetController} args\n\t */\n addControllers(...args) {\n this._each('register', args, this.controllers);\n }\n\n /**\n\t * @param {...typeof Element} args\n\t */\n addElements(...args) {\n this._each('register', args, this.elements);\n }\n\n /**\n\t * @param {...any} args\n\t */\n addPlugins(...args) {\n this._each('register', args, this.plugins);\n }\n\n /**\n\t * @param {...typeof Scale} args\n\t */\n addScales(...args) {\n this._each('register', args, this.scales);\n }\n\n /**\n\t * @param {string} id\n\t * @returns {typeof DatasetController}\n\t */\n getController(id) {\n return this._get(id, this.controllers, 'controller');\n }\n\n /**\n\t * @param {string} id\n\t * @returns {typeof Element}\n\t */\n getElement(id) {\n return this._get(id, this.elements, 'element');\n }\n\n /**\n\t * @param {string} id\n\t * @returns {object}\n\t */\n getPlugin(id) {\n return this._get(id, this.plugins, 'plugin');\n }\n\n /**\n\t * @param {string} id\n\t * @returns {typeof Scale}\n\t */\n getScale(id) {\n return this._get(id, this.scales, 'scale');\n }\n\n /**\n\t * @param {...typeof DatasetController} args\n\t */\n removeControllers(...args) {\n this._each('unregister', args, this.controllers);\n }\n\n /**\n\t * @param {...typeof Element} args\n\t */\n removeElements(...args) {\n this._each('unregister', args, this.elements);\n }\n\n /**\n\t * @param {...any} args\n\t */\n removePlugins(...args) {\n this._each('unregister', args, this.plugins);\n }\n\n /**\n\t * @param {...typeof Scale} args\n\t */\n removeScales(...args) {\n this._each('unregister', args, this.scales);\n }\n\n /**\n\t * @private\n\t */\n _each(method, args, typedRegistry) {\n [...args].forEach(arg => {\n const reg = typedRegistry || this._getRegistryForType(arg);\n if (typedRegistry || reg.isForType(arg) || (reg === this.plugins && arg.id)) {\n this._exec(method, reg, arg);\n } else {\n // Handle loopable args\n // Use case:\n // import * as plugins from './plugins.js';\n // Chart.register(plugins);\n each(arg, item => {\n // If there are mixed types in the loopable, make sure those are\n // registered in correct registry\n // Use case: (treemap exporting controller, elements etc)\n // import * as treemap from 'chartjs-chart-treemap.js';\n // Chart.register(treemap);\n\n const itemReg = typedRegistry || this._getRegistryForType(item);\n this._exec(method, itemReg, item);\n });\n }\n });\n }\n\n /**\n\t * @private\n\t */\n _exec(method, registry, component) {\n const camelMethod = _capitalize(method);\n call(component['before' + camelMethod], [], component); // beforeRegister / beforeUnregister\n registry[method](component);\n call(component['after' + camelMethod], [], component); // afterRegister / afterUnregister\n }\n\n /**\n\t * @private\n\t */\n _getRegistryForType(type) {\n for (let i = 0; i < this._typedRegistries.length; i++) {\n const reg = this._typedRegistries[i];\n if (reg.isForType(type)) {\n return reg;\n }\n }\n // plugins is the fallback registry\n return this.plugins;\n }\n\n /**\n\t * @private\n\t */\n _get(id, typedRegistry, type) {\n const item = typedRegistry.get(id);\n if (item === undefined) {\n throw new Error('\"' + id + '\" is not a registered ' + type + '.');\n }\n return item;\n }\n\n}\n\n// singleton instance\nexport default /* #__PURE__ */ new Registry();\n","import registry from './core.registry.js';\nimport {callback as callCallback, isNullOrUndef, valueOrDefault} from '../helpers/helpers.core.js';\n\n/**\n * @typedef { import('./core.controller.js').default } Chart\n * @typedef { import('../types/index.js').ChartEvent } ChartEvent\n * @typedef { import('../plugins/plugin.tooltip.js').default } Tooltip\n */\n\n/**\n * @callback filterCallback\n * @param {{plugin: object, options: object}} value\n * @param {number} [index]\n * @param {array} [array]\n * @param {object} [thisArg]\n * @return {boolean}\n */\n\n\nexport default class PluginService {\n constructor() {\n this._init = [];\n }\n\n /**\n\t * Calls enabled plugins for `chart` on the specified hook and with the given args.\n\t * This method immediately returns as soon as a plugin explicitly returns false. The\n\t * returned value can be used, for instance, to interrupt the current action.\n\t * @param {Chart} chart - The chart instance for which plugins should be called.\n\t * @param {string} hook - The name of the plugin method to call (e.g. 'beforeUpdate').\n\t * @param {object} [args] - Extra arguments to apply to the hook call.\n * @param {filterCallback} [filter] - Filtering function for limiting which plugins are notified\n\t * @returns {boolean} false if any of the plugins return false, else returns true.\n\t */\n notify(chart, hook, args, filter) {\n if (hook === 'beforeInit') {\n this._init = this._createDescriptors(chart, true);\n this._notify(this._init, chart, 'install');\n }\n\n const descriptors = filter ? this._descriptors(chart).filter(filter) : this._descriptors(chart);\n const result = this._notify(descriptors, chart, hook, args);\n\n if (hook === 'afterDestroy') {\n this._notify(descriptors, chart, 'stop');\n this._notify(this._init, chart, 'uninstall');\n }\n return result;\n }\n\n /**\n\t * @private\n\t */\n _notify(descriptors, chart, hook, args) {\n args = args || {};\n for (const descriptor of descriptors) {\n const plugin = descriptor.plugin;\n const method = plugin[hook];\n const params = [chart, args, descriptor.options];\n if (callCallback(method, params, plugin) === false && args.cancelable) {\n return false;\n }\n }\n\n return true;\n }\n\n invalidate() {\n // When plugins are registered, there is the possibility of a double\n // invalidate situation. In this case, we only want to invalidate once.\n // If we invalidate multiple times, the `_oldCache` is lost and all of the\n // plugins are restarted without being correctly stopped.\n // See https://github.com/chartjs/Chart.js/issues/8147\n if (!isNullOrUndef(this._cache)) {\n this._oldCache = this._cache;\n this._cache = undefined;\n }\n }\n\n /**\n\t * @param {Chart} chart\n\t * @private\n\t */\n _descriptors(chart) {\n if (this._cache) {\n return this._cache;\n }\n\n const descriptors = this._cache = this._createDescriptors(chart);\n\n this._notifyStateChanges(chart);\n\n return descriptors;\n }\n\n _createDescriptors(chart, all) {\n const config = chart && chart.config;\n const options = valueOrDefault(config.options && config.options.plugins, {});\n const plugins = allPlugins(config);\n // options === false => all plugins are disabled\n return options === false && !all ? [] : createDescriptors(chart, plugins, options, all);\n }\n\n /**\n\t * @param {Chart} chart\n\t * @private\n\t */\n _notifyStateChanges(chart) {\n const previousDescriptors = this._oldCache || [];\n const descriptors = this._cache;\n const diff = (a, b) => a.filter(x => !b.some(y => x.plugin.id === y.plugin.id));\n this._notify(diff(previousDescriptors, descriptors), chart, 'stop');\n this._notify(diff(descriptors, previousDescriptors), chart, 'start');\n }\n}\n\n/**\n * @param {import('./core.config.js').default} config\n */\nfunction allPlugins(config) {\n const localIds = {};\n const plugins = [];\n const keys = Object.keys(registry.plugins.items);\n for (let i = 0; i < keys.length; i++) {\n plugins.push(registry.getPlugin(keys[i]));\n }\n\n const local = config.plugins || [];\n for (let i = 0; i < local.length; i++) {\n const plugin = local[i];\n\n if (plugins.indexOf(plugin) === -1) {\n plugins.push(plugin);\n localIds[plugin.id] = true;\n }\n }\n\n return {plugins, localIds};\n}\n\nfunction getOpts(options, all) {\n if (!all && options === false) {\n return null;\n }\n if (options === true) {\n return {};\n }\n return options;\n}\n\nfunction createDescriptors(chart, {plugins, localIds}, options, all) {\n const result = [];\n const context = chart.getContext();\n\n for (const plugin of plugins) {\n const id = plugin.id;\n const opts = getOpts(options[id], all);\n if (opts === null) {\n continue;\n }\n result.push({\n plugin,\n options: pluginOpts(chart.config, {plugin, local: localIds[id]}, opts, context)\n });\n }\n\n return result;\n}\n\nfunction pluginOpts(config, {plugin, local}, opts, context) {\n const keys = config.pluginScopeKeys(plugin);\n const scopes = config.getOptionScopes(opts, keys);\n if (local && plugin.defaults) {\n // make sure plugin defaults are in scopes for local (not registered) plugins\n scopes.push(plugin.defaults);\n }\n return config.createResolver(scopes, context, [''], {\n // These are just defaults that plugins can override\n scriptable: false,\n indexable: false,\n allKeys: true\n });\n}\n","import defaults, {overrides, descriptors} from './core.defaults.js';\nimport {mergeIf, resolveObjectKey, isArray, isFunction, valueOrDefault, isObject} from '../helpers/helpers.core.js';\nimport {_attachContext, _createResolver, _descriptors} from '../helpers/helpers.config.js';\n\nexport function getIndexAxis(type, options) {\n const datasetDefaults = defaults.datasets[type] || {};\n const datasetOptions = (options.datasets || {})[type] || {};\n return datasetOptions.indexAxis || options.indexAxis || datasetDefaults.indexAxis || 'x';\n}\n\nfunction getAxisFromDefaultScaleID(id, indexAxis) {\n let axis = id;\n if (id === '_index_') {\n axis = indexAxis;\n } else if (id === '_value_') {\n axis = indexAxis === 'x' ? 'y' : 'x';\n }\n return axis;\n}\n\nfunction getDefaultScaleIDFromAxis(axis, indexAxis) {\n return axis === indexAxis ? '_index_' : '_value_';\n}\n\nfunction idMatchesAxis(id) {\n if (id === 'x' || id === 'y' || id === 'r') {\n return id;\n }\n}\n\nfunction axisFromPosition(position) {\n if (position === 'top' || position === 'bottom') {\n return 'x';\n }\n if (position === 'left' || position === 'right') {\n return 'y';\n }\n}\n\nexport function determineAxis(id, ...scaleOptions) {\n if (idMatchesAxis(id)) {\n return id;\n }\n for (const opts of scaleOptions) {\n const axis = opts.axis\n || axisFromPosition(opts.position)\n || id.length > 1 && idMatchesAxis(id[0].toLowerCase());\n if (axis) {\n return axis;\n }\n }\n throw new Error(`Cannot determine type of '${id}' axis. Please provide 'axis' or 'position' option.`);\n}\n\nfunction getAxisFromDataset(id, axis, dataset) {\n if (dataset[axis + 'AxisID'] === id) {\n return {axis};\n }\n}\n\nfunction retrieveAxisFromDatasets(id, config) {\n if (config.data && config.data.datasets) {\n const boundDs = config.data.datasets.filter((d) => d.xAxisID === id || d.yAxisID === id);\n if (boundDs.length) {\n return getAxisFromDataset(id, 'x', boundDs[0]) || getAxisFromDataset(id, 'y', boundDs[0]);\n }\n }\n return {};\n}\n\nfunction mergeScaleConfig(config, options) {\n const chartDefaults = overrides[config.type] || {scales: {}};\n const configScales = options.scales || {};\n const chartIndexAxis = getIndexAxis(config.type, options);\n const scales = Object.create(null);\n\n // First figure out first scale id's per axis.\n Object.keys(configScales).forEach(id => {\n const scaleConf = configScales[id];\n if (!isObject(scaleConf)) {\n return console.error(`Invalid scale configuration for scale: ${id}`);\n }\n if (scaleConf._proxy) {\n return console.warn(`Ignoring resolver passed as options for scale: ${id}`);\n }\n const axis = determineAxis(id, scaleConf, retrieveAxisFromDatasets(id, config), defaults.scales[scaleConf.type]);\n const defaultId = getDefaultScaleIDFromAxis(axis, chartIndexAxis);\n const defaultScaleOptions = chartDefaults.scales || {};\n scales[id] = mergeIf(Object.create(null), [{axis}, scaleConf, defaultScaleOptions[axis], defaultScaleOptions[defaultId]]);\n });\n\n // Then merge dataset defaults to scale configs\n config.data.datasets.forEach(dataset => {\n const type = dataset.type || config.type;\n const indexAxis = dataset.indexAxis || getIndexAxis(type, options);\n const datasetDefaults = overrides[type] || {};\n const defaultScaleOptions = datasetDefaults.scales || {};\n Object.keys(defaultScaleOptions).forEach(defaultID => {\n const axis = getAxisFromDefaultScaleID(defaultID, indexAxis);\n const id = dataset[axis + 'AxisID'] || axis;\n scales[id] = scales[id] || Object.create(null);\n mergeIf(scales[id], [{axis}, configScales[id], defaultScaleOptions[defaultID]]);\n });\n });\n\n // apply scale defaults, if not overridden by dataset defaults\n Object.keys(scales).forEach(key => {\n const scale = scales[key];\n mergeIf(scale, [defaults.scales[scale.type], defaults.scale]);\n });\n\n return scales;\n}\n\nfunction initOptions(config) {\n const options = config.options || (config.options = {});\n\n options.plugins = valueOrDefault(options.plugins, {});\n options.scales = mergeScaleConfig(config, options);\n}\n\nfunction initData(data) {\n data = data || {};\n data.datasets = data.datasets || [];\n data.labels = data.labels || [];\n return data;\n}\n\nfunction initConfig(config) {\n config = config || {};\n config.data = initData(config.data);\n\n initOptions(config);\n\n return config;\n}\n\nconst keyCache = new Map();\nconst keysCached = new Set();\n\nfunction cachedKeys(cacheKey, generate) {\n let keys = keyCache.get(cacheKey);\n if (!keys) {\n keys = generate();\n keyCache.set(cacheKey, keys);\n keysCached.add(keys);\n }\n return keys;\n}\n\nconst addIfFound = (set, obj, key) => {\n const opts = resolveObjectKey(obj, key);\n if (opts !== undefined) {\n set.add(opts);\n }\n};\n\nexport default class Config {\n constructor(config) {\n this._config = initConfig(config);\n this._scopeCache = new Map();\n this._resolverCache = new Map();\n }\n\n get platform() {\n return this._config.platform;\n }\n\n get type() {\n return this._config.type;\n }\n\n set type(type) {\n this._config.type = type;\n }\n\n get data() {\n return this._config.data;\n }\n\n set data(data) {\n this._config.data = initData(data);\n }\n\n get options() {\n return this._config.options;\n }\n\n set options(options) {\n this._config.options = options;\n }\n\n get plugins() {\n return this._config.plugins;\n }\n\n update() {\n const config = this._config;\n this.clearCache();\n initOptions(config);\n }\n\n clearCache() {\n this._scopeCache.clear();\n this._resolverCache.clear();\n }\n\n /**\n * Returns the option scope keys for resolving dataset options.\n * These keys do not include the dataset itself, because it is not under options.\n * @param {string} datasetType\n * @return {string[][]}\n */\n datasetScopeKeys(datasetType) {\n return cachedKeys(datasetType,\n () => [[\n `datasets.${datasetType}`,\n ''\n ]]);\n }\n\n /**\n * Returns the option scope keys for resolving dataset animation options.\n * These keys do not include the dataset itself, because it is not under options.\n * @param {string} datasetType\n * @param {string} transition\n * @return {string[][]}\n */\n datasetAnimationScopeKeys(datasetType, transition) {\n return cachedKeys(`${datasetType}.transition.${transition}`,\n () => [\n [\n `datasets.${datasetType}.transitions.${transition}`,\n `transitions.${transition}`,\n ],\n // The following are used for looking up the `animations` and `animation` keys\n [\n `datasets.${datasetType}`,\n ''\n ]\n ]);\n }\n\n /**\n * Returns the options scope keys for resolving element options that belong\n * to an dataset. These keys do not include the dataset itself, because it\n * is not under options.\n * @param {string} datasetType\n * @param {string} elementType\n * @return {string[][]}\n */\n datasetElementScopeKeys(datasetType, elementType) {\n return cachedKeys(`${datasetType}-${elementType}`,\n () => [[\n `datasets.${datasetType}.elements.${elementType}`,\n `datasets.${datasetType}`,\n `elements.${elementType}`,\n ''\n ]]);\n }\n\n /**\n * Returns the options scope keys for resolving plugin options.\n * @param {{id: string, additionalOptionScopes?: string[]}} plugin\n * @return {string[][]}\n */\n pluginScopeKeys(plugin) {\n const id = plugin.id;\n const type = this.type;\n return cachedKeys(`${type}-plugin-${id}`,\n () => [[\n `plugins.${id}`,\n ...plugin.additionalOptionScopes || [],\n ]]);\n }\n\n /**\n * @private\n */\n _cachedScopes(mainScope, resetCache) {\n const _scopeCache = this._scopeCache;\n let cache = _scopeCache.get(mainScope);\n if (!cache || resetCache) {\n cache = new Map();\n _scopeCache.set(mainScope, cache);\n }\n return cache;\n }\n\n /**\n * Resolves the objects from options and defaults for option value resolution.\n * @param {object} mainScope - The main scope object for options\n * @param {string[][]} keyLists - The arrays of keys in resolution order\n * @param {boolean} [resetCache] - reset the cache for this mainScope\n */\n getOptionScopes(mainScope, keyLists, resetCache) {\n const {options, type} = this;\n const cache = this._cachedScopes(mainScope, resetCache);\n const cached = cache.get(keyLists);\n if (cached) {\n return cached;\n }\n\n const scopes = new Set();\n\n keyLists.forEach(keys => {\n if (mainScope) {\n scopes.add(mainScope);\n keys.forEach(key => addIfFound(scopes, mainScope, key));\n }\n keys.forEach(key => addIfFound(scopes, options, key));\n keys.forEach(key => addIfFound(scopes, overrides[type] || {}, key));\n keys.forEach(key => addIfFound(scopes, defaults, key));\n keys.forEach(key => addIfFound(scopes, descriptors, key));\n });\n\n const array = Array.from(scopes);\n if (array.length === 0) {\n array.push(Object.create(null));\n }\n if (keysCached.has(keyLists)) {\n cache.set(keyLists, array);\n }\n return array;\n }\n\n /**\n * Returns the option scopes for resolving chart options\n * @return {object[]}\n */\n chartOptionScopes() {\n const {options, type} = this;\n\n return [\n options,\n overrides[type] || {},\n defaults.datasets[type] || {}, // https://github.com/chartjs/Chart.js/issues/8531\n {type},\n defaults,\n descriptors\n ];\n }\n\n /**\n * @param {object[]} scopes\n * @param {string[]} names\n * @param {function|object} context\n * @param {string[]} [prefixes]\n * @return {object}\n */\n resolveNamedOptions(scopes, names, context, prefixes = ['']) {\n const result = {$shared: true};\n const {resolver, subPrefixes} = getResolver(this._resolverCache, scopes, prefixes);\n let options = resolver;\n if (needContext(resolver, names)) {\n result.$shared = false;\n context = isFunction(context) ? context() : context;\n // subResolver is passed to scriptable options. It should not resolve to hover options.\n const subResolver = this.createResolver(scopes, context, subPrefixes);\n options = _attachContext(resolver, context, subResolver);\n }\n\n for (const prop of names) {\n result[prop] = options[prop];\n }\n return result;\n }\n\n /**\n * @param {object[]} scopes\n * @param {object} [context]\n * @param {string[]} [prefixes]\n * @param {{scriptable: boolean, indexable: boolean, allKeys?: boolean}} [descriptorDefaults]\n */\n createResolver(scopes, context, prefixes = [''], descriptorDefaults) {\n const {resolver} = getResolver(this._resolverCache, scopes, prefixes);\n return isObject(context)\n ? _attachContext(resolver, context, undefined, descriptorDefaults)\n : resolver;\n }\n}\n\nfunction getResolver(resolverCache, scopes, prefixes) {\n let cache = resolverCache.get(scopes);\n if (!cache) {\n cache = new Map();\n resolverCache.set(scopes, cache);\n }\n const cacheKey = prefixes.join();\n let cached = cache.get(cacheKey);\n if (!cached) {\n const resolver = _createResolver(scopes, prefixes);\n cached = {\n resolver,\n subPrefixes: prefixes.filter(p => !p.toLowerCase().includes('hover'))\n };\n cache.set(cacheKey, cached);\n }\n return cached;\n}\n\nconst hasFunction = value => isObject(value)\n && Object.getOwnPropertyNames(value).reduce((acc, key) => acc || isFunction(value[key]), false);\n\nfunction needContext(proxy, names) {\n const {isScriptable, isIndexable} = _descriptors(proxy);\n\n for (const prop of names) {\n const scriptable = isScriptable(prop);\n const indexable = isIndexable(prop);\n const value = (indexable || scriptable) && proxy[prop];\n if ((scriptable && (isFunction(value) || hasFunction(value)))\n || (indexable && isArray(value))) {\n return true;\n }\n }\n return false;\n}\n","import animator from './core.animator.js';\nimport defaults, {overrides} from './core.defaults.js';\nimport Interaction from './core.interaction.js';\nimport layouts from './core.layouts.js';\nimport {_detectPlatform} from '../platform/index.js';\nimport PluginService from './core.plugins.js';\nimport registry from './core.registry.js';\nimport Config, {determineAxis, getIndexAxis} from './core.config.js';\nimport {retinaScale, _isDomSupported} from '../helpers/helpers.dom.js';\nimport {each, callback as callCallback, uid, valueOrDefault, _elementsEqual, isNullOrUndef, setsEqual, defined, isFunction, _isClickEvent} from '../helpers/helpers.core.js';\nimport {clearCanvas, clipArea, createContext, unclipArea, _isPointInArea} from '../helpers/index.js';\n// @ts-ignore\nimport {version} from '../../package.json';\nimport {debounce} from '../helpers/helpers.extras.js';\n\n/**\n * @typedef { import('../types/index.js').ChartEvent } ChartEvent\n * @typedef { import('../types/index.js').Point } Point\n */\n\nconst KNOWN_POSITIONS = ['top', 'bottom', 'left', 'right', 'chartArea'];\nfunction positionIsHorizontal(position, axis) {\n return position === 'top' || position === 'bottom' || (KNOWN_POSITIONS.indexOf(position) === -1 && axis === 'x');\n}\n\nfunction compare2Level(l1, l2) {\n return function(a, b) {\n return a[l1] === b[l1]\n ? a[l2] - b[l2]\n : a[l1] - b[l1];\n };\n}\n\nfunction onAnimationsComplete(context) {\n const chart = context.chart;\n const animationOptions = chart.options.animation;\n\n chart.notifyPlugins('afterRender');\n callCallback(animationOptions && animationOptions.onComplete, [context], chart);\n}\n\nfunction onAnimationProgress(context) {\n const chart = context.chart;\n const animationOptions = chart.options.animation;\n callCallback(animationOptions && animationOptions.onProgress, [context], chart);\n}\n\n/**\n * Chart.js can take a string id of a canvas element, a 2d context, or a canvas element itself.\n * Attempt to unwrap the item passed into the chart constructor so that it is a canvas element (if possible).\n */\nfunction getCanvas(item) {\n if (_isDomSupported() && typeof item === 'string') {\n item = document.getElementById(item);\n } else if (item && item.length) {\n // Support for array based queries (such as jQuery)\n item = item[0];\n }\n\n if (item && item.canvas) {\n // Support for any object associated to a canvas (including a context2d)\n item = item.canvas;\n }\n return item;\n}\n\nconst instances = {};\nconst getChart = (key) => {\n const canvas = getCanvas(key);\n return Object.values(instances).filter((c) => c.canvas === canvas).pop();\n};\n\nfunction moveNumericKeys(obj, start, move) {\n const keys = Object.keys(obj);\n for (const key of keys) {\n const intKey = +key;\n if (intKey >= start) {\n const value = obj[key];\n delete obj[key];\n if (move > 0 || intKey > start) {\n obj[intKey + move] = value;\n }\n }\n }\n}\n\n/**\n * @param {ChartEvent} e\n * @param {ChartEvent|null} lastEvent\n * @param {boolean} inChartArea\n * @param {boolean} isClick\n * @returns {ChartEvent|null}\n */\nfunction determineLastEvent(e, lastEvent, inChartArea, isClick) {\n if (!inChartArea || e.type === 'mouseout') {\n return null;\n }\n if (isClick) {\n return lastEvent;\n }\n return e;\n}\n\nfunction getDatasetArea(meta) {\n const {xScale, yScale} = meta;\n if (xScale && yScale) {\n return {\n left: xScale.left,\n right: xScale.right,\n top: yScale.top,\n bottom: yScale.bottom\n };\n }\n}\n\nclass Chart {\n\n static defaults = defaults;\n static instances = instances;\n static overrides = overrides;\n static registry = registry;\n static version = version;\n static getChart = getChart;\n\n static register(...items) {\n registry.add(...items);\n invalidatePlugins();\n }\n\n static unregister(...items) {\n registry.remove(...items);\n invalidatePlugins();\n }\n\n // eslint-disable-next-line max-statements\n constructor(item, userConfig) {\n const config = this.config = new Config(userConfig);\n const initialCanvas = getCanvas(item);\n const existingChart = getChart(initialCanvas);\n if (existingChart) {\n throw new Error(\n 'Canvas is already in use. Chart with ID \\'' + existingChart.id + '\\'' +\n\t\t\t\t' must be destroyed before the canvas with ID \\'' + existingChart.canvas.id + '\\' can be reused.'\n );\n }\n\n const options = config.createResolver(config.chartOptionScopes(), this.getContext());\n\n this.platform = new (config.platform || _detectPlatform(initialCanvas))();\n this.platform.updateConfig(config);\n\n const context = this.platform.acquireContext(initialCanvas, options.aspectRatio);\n const canvas = context && context.canvas;\n const height = canvas && canvas.height;\n const width = canvas && canvas.width;\n\n this.id = uid();\n this.ctx = context;\n this.canvas = canvas;\n this.width = width;\n this.height = height;\n this._options = options;\n // Store the previously used aspect ratio to determine if a resize\n // is needed during updates. Do this after _options is set since\n // aspectRatio uses a getter\n this._aspectRatio = this.aspectRatio;\n this._layers = [];\n this._metasets = [];\n this._stacks = undefined;\n this.boxes = [];\n this.currentDevicePixelRatio = undefined;\n this.chartArea = undefined;\n this._active = [];\n this._lastEvent = undefined;\n this._listeners = {};\n /** @type {?{attach?: function, detach?: function, resize?: function}} */\n this._responsiveListeners = undefined;\n this._sortedMetasets = [];\n this.scales = {};\n this._plugins = new PluginService();\n this.$proxies = {};\n this._hiddenIndices = {};\n this.attached = false;\n this._animationsDisabled = undefined;\n this.$context = undefined;\n this._doResize = debounce(mode => this.update(mode), options.resizeDelay || 0);\n this._dataChanges = [];\n\n // Add the chart instance to the global namespace\n instances[this.id] = this;\n\n if (!context || !canvas) {\n // The given item is not a compatible context2d element, let's return before finalizing\n // the chart initialization but after setting basic chart / controller properties that\n // can help to figure out that the chart is not valid (e.g chart.canvas !== null);\n // https://github.com/chartjs/Chart.js/issues/2807\n console.error(\"Failed to create chart: can't acquire context from the given item\");\n return;\n }\n\n animator.listen(this, 'complete', onAnimationsComplete);\n animator.listen(this, 'progress', onAnimationProgress);\n\n this._initialize();\n if (this.attached) {\n this.update();\n }\n }\n\n get aspectRatio() {\n const {options: {aspectRatio, maintainAspectRatio}, width, height, _aspectRatio} = this;\n if (!isNullOrUndef(aspectRatio)) {\n // If aspectRatio is defined in options, use that.\n return aspectRatio;\n }\n\n if (maintainAspectRatio && _aspectRatio) {\n // If maintainAspectRatio is truthly and we had previously determined _aspectRatio, use that\n return _aspectRatio;\n }\n\n // Calculate\n return height ? width / height : null;\n }\n\n get data() {\n return this.config.data;\n }\n\n set data(data) {\n this.config.data = data;\n }\n\n get options() {\n return this._options;\n }\n\n set options(options) {\n this.config.options = options;\n }\n\n get registry() {\n return registry;\n }\n\n /**\n\t * @private\n\t */\n _initialize() {\n // Before init plugin notification\n this.notifyPlugins('beforeInit');\n\n if (this.options.responsive) {\n this.resize();\n } else {\n retinaScale(this, this.options.devicePixelRatio);\n }\n\n this.bindEvents();\n\n // After init plugin notification\n this.notifyPlugins('afterInit');\n\n return this;\n }\n\n clear() {\n clearCanvas(this.canvas, this.ctx);\n return this;\n }\n\n stop() {\n animator.stop(this);\n return this;\n }\n\n /**\n\t * Resize the chart to its container or to explicit dimensions.\n\t * @param {number} [width]\n\t * @param {number} [height]\n\t */\n resize(width, height) {\n if (!animator.running(this)) {\n this._resize(width, height);\n } else {\n this._resizeBeforeDraw = {width, height};\n }\n }\n\n _resize(width, height) {\n const options = this.options;\n const canvas = this.canvas;\n const aspectRatio = options.maintainAspectRatio && this.aspectRatio;\n const newSize = this.platform.getMaximumSize(canvas, width, height, aspectRatio);\n const newRatio = options.devicePixelRatio || this.platform.getDevicePixelRatio();\n const mode = this.width ? 'resize' : 'attach';\n\n this.width = newSize.width;\n this.height = newSize.height;\n this._aspectRatio = this.aspectRatio;\n if (!retinaScale(this, newRatio, true)) {\n return;\n }\n\n this.notifyPlugins('resize', {size: newSize});\n\n callCallback(options.onResize, [this, newSize], this);\n\n if (this.attached) {\n if (this._doResize(mode)) {\n // The resize update is delayed, only draw without updating.\n this.render();\n }\n }\n }\n\n ensureScalesHaveIDs() {\n const options = this.options;\n const scalesOptions = options.scales || {};\n\n each(scalesOptions, (axisOptions, axisID) => {\n axisOptions.id = axisID;\n });\n }\n\n /**\n\t * Builds a map of scale ID to scale object for future lookup.\n\t */\n buildOrUpdateScales() {\n const options = this.options;\n const scaleOpts = options.scales;\n const scales = this.scales;\n const updated = Object.keys(scales).reduce((obj, id) => {\n obj[id] = false;\n return obj;\n }, {});\n let items = [];\n\n if (scaleOpts) {\n items = items.concat(\n Object.keys(scaleOpts).map((id) => {\n const scaleOptions = scaleOpts[id];\n const axis = determineAxis(id, scaleOptions);\n const isRadial = axis === 'r';\n const isHorizontal = axis === 'x';\n return {\n options: scaleOptions,\n dposition: isRadial ? 'chartArea' : isHorizontal ? 'bottom' : 'left',\n dtype: isRadial ? 'radialLinear' : isHorizontal ? 'category' : 'linear'\n };\n })\n );\n }\n\n each(items, (item) => {\n const scaleOptions = item.options;\n const id = scaleOptions.id;\n const axis = determineAxis(id, scaleOptions);\n const scaleType = valueOrDefault(scaleOptions.type, item.dtype);\n\n if (scaleOptions.position === undefined || positionIsHorizontal(scaleOptions.position, axis) !== positionIsHorizontal(item.dposition)) {\n scaleOptions.position = item.dposition;\n }\n\n updated[id] = true;\n let scale = null;\n if (id in scales && scales[id].type === scaleType) {\n scale = scales[id];\n } else {\n const scaleClass = registry.getScale(scaleType);\n scale = new scaleClass({\n id,\n type: scaleType,\n ctx: this.ctx,\n chart: this\n });\n scales[scale.id] = scale;\n }\n\n scale.init(scaleOptions, options);\n });\n // clear up discarded scales\n each(updated, (hasUpdated, id) => {\n if (!hasUpdated) {\n delete scales[id];\n }\n });\n\n each(scales, (scale) => {\n layouts.configure(this, scale, scale.options);\n layouts.addBox(this, scale);\n });\n }\n\n /**\n\t * @private\n\t */\n _updateMetasets() {\n const metasets = this._metasets;\n const numData = this.data.datasets.length;\n const numMeta = metasets.length;\n\n metasets.sort((a, b) => a.index - b.index);\n if (numMeta > numData) {\n for (let i = numData; i < numMeta; ++i) {\n this._destroyDatasetMeta(i);\n }\n metasets.splice(numData, numMeta - numData);\n }\n this._sortedMetasets = metasets.slice(0).sort(compare2Level('order', 'index'));\n }\n\n /**\n\t * @private\n\t */\n _removeUnreferencedMetasets() {\n const {_metasets: metasets, data: {datasets}} = this;\n if (metasets.length > datasets.length) {\n delete this._stacks;\n }\n metasets.forEach((meta, index) => {\n if (datasets.filter(x => x === meta._dataset).length === 0) {\n this._destroyDatasetMeta(index);\n }\n });\n }\n\n buildOrUpdateControllers() {\n const newControllers = [];\n const datasets = this.data.datasets;\n let i, ilen;\n\n this._removeUnreferencedMetasets();\n\n for (i = 0, ilen = datasets.length; i < ilen; i++) {\n const dataset = datasets[i];\n let meta = this.getDatasetMeta(i);\n const type = dataset.type || this.config.type;\n\n if (meta.type && meta.type !== type) {\n this._destroyDatasetMeta(i);\n meta = this.getDatasetMeta(i);\n }\n meta.type = type;\n meta.indexAxis = dataset.indexAxis || getIndexAxis(type, this.options);\n meta.order = dataset.order || 0;\n meta.index = i;\n meta.label = '' + dataset.label;\n meta.visible = this.isDatasetVisible(i);\n\n if (meta.controller) {\n meta.controller.updateIndex(i);\n meta.controller.linkScales();\n } else {\n const ControllerClass = registry.getController(type);\n const {datasetElementType, dataElementType} = defaults.datasets[type];\n Object.assign(ControllerClass, {\n dataElementType: registry.getElement(dataElementType),\n datasetElementType: datasetElementType && registry.getElement(datasetElementType)\n });\n meta.controller = new ControllerClass(this, i);\n newControllers.push(meta.controller);\n }\n }\n\n this._updateMetasets();\n return newControllers;\n }\n\n /**\n\t * Reset the elements of all datasets\n\t * @private\n\t */\n _resetElements() {\n each(this.data.datasets, (dataset, datasetIndex) => {\n this.getDatasetMeta(datasetIndex).controller.reset();\n }, this);\n }\n\n /**\n\t* Resets the chart back to its state before the initial animation\n\t*/\n reset() {\n this._resetElements();\n this.notifyPlugins('reset');\n }\n\n update(mode) {\n const config = this.config;\n\n config.update();\n const options = this._options = config.createResolver(config.chartOptionScopes(), this.getContext());\n const animsDisabled = this._animationsDisabled = !options.animation;\n\n this._updateScales();\n this._checkEventBindings();\n this._updateHiddenIndices();\n\n // plugins options references might have change, let's invalidate the cache\n // https://github.com/chartjs/Chart.js/issues/5111#issuecomment-355934167\n this._plugins.invalidate();\n\n if (this.notifyPlugins('beforeUpdate', {mode, cancelable: true}) === false) {\n return;\n }\n\n // Make sure dataset controllers are updated and new controllers are reset\n const newControllers = this.buildOrUpdateControllers();\n\n this.notifyPlugins('beforeElementsUpdate');\n\n // Make sure all dataset controllers have correct meta data counts\n let minPadding = 0;\n for (let i = 0, ilen = this.data.datasets.length; i < ilen; i++) {\n const {controller} = this.getDatasetMeta(i);\n const reset = !animsDisabled && newControllers.indexOf(controller) === -1;\n // New controllers will be reset after the layout pass, so we only want to modify\n // elements added to new datasets\n controller.buildOrUpdateElements(reset);\n minPadding = Math.max(+controller.getMaxOverflow(), minPadding);\n }\n minPadding = this._minPadding = options.layout.autoPadding ? minPadding : 0;\n this._updateLayout(minPadding);\n\n // Only reset the controllers if we have animations\n if (!animsDisabled) {\n // Can only reset the new controllers after the scales have been updated\n // Reset is done to get the starting point for the initial animation\n each(newControllers, (controller) => {\n controller.reset();\n });\n }\n\n this._updateDatasets(mode);\n\n // Do this before render so that any plugins that need final scale updates can use it\n this.notifyPlugins('afterUpdate', {mode});\n\n this._layers.sort(compare2Level('z', '_idx'));\n\n // Replay last event from before update, or set hover styles on active elements\n const {_active, _lastEvent} = this;\n if (_lastEvent) {\n this._eventHandler(_lastEvent, true);\n } else if (_active.length) {\n this._updateHoverStyles(_active, _active, true);\n }\n\n this.render();\n }\n\n /**\n * @private\n */\n _updateScales() {\n each(this.scales, (scale) => {\n layouts.removeBox(this, scale);\n });\n\n this.ensureScalesHaveIDs();\n this.buildOrUpdateScales();\n }\n\n /**\n * @private\n */\n _checkEventBindings() {\n const options = this.options;\n const existingEvents = new Set(Object.keys(this._listeners));\n const newEvents = new Set(options.events);\n\n if (!setsEqual(existingEvents, newEvents) || !!this._responsiveListeners !== options.responsive) {\n // The configured events have changed. Rebind.\n this.unbindEvents();\n this.bindEvents();\n }\n }\n\n /**\n * @private\n */\n _updateHiddenIndices() {\n const {_hiddenIndices} = this;\n const changes = this._getUniformDataChanges() || [];\n for (const {method, start, count} of changes) {\n const move = method === '_removeElements' ? -count : count;\n moveNumericKeys(_hiddenIndices, start, move);\n }\n }\n\n /**\n * @private\n */\n _getUniformDataChanges() {\n const _dataChanges = this._dataChanges;\n if (!_dataChanges || !_dataChanges.length) {\n return;\n }\n\n this._dataChanges = [];\n const datasetCount = this.data.datasets.length;\n const makeSet = (idx) => new Set(\n _dataChanges\n .filter(c => c[0] === idx)\n .map((c, i) => i + ',' + c.splice(1).join(','))\n );\n\n const changeSet = makeSet(0);\n for (let i = 1; i < datasetCount; i++) {\n if (!setsEqual(changeSet, makeSet(i))) {\n return;\n }\n }\n return Array.from(changeSet)\n .map(c => c.split(','))\n .map(a => ({method: a[1], start: +a[2], count: +a[3]}));\n }\n\n /**\n\t * Updates the chart layout unless a plugin returns `false` to the `beforeLayout`\n\t * hook, in which case, plugins will not be called on `afterLayout`.\n\t * @private\n\t */\n _updateLayout(minPadding) {\n if (this.notifyPlugins('beforeLayout', {cancelable: true}) === false) {\n return;\n }\n\n layouts.update(this, this.width, this.height, minPadding);\n\n const area = this.chartArea;\n const noArea = area.width <= 0 || area.height <= 0;\n\n this._layers = [];\n each(this.boxes, (box) => {\n if (noArea && box.position === 'chartArea') {\n // Skip drawing and configuring chartArea boxes when chartArea is zero or negative\n return;\n }\n\n // configure is called twice, once in core.scale.update and once here.\n // Here the boxes are fully updated and at their final positions.\n if (box.configure) {\n box.configure();\n }\n this._layers.push(...box._layers());\n }, this);\n\n this._layers.forEach((item, index) => {\n item._idx = index;\n });\n\n this.notifyPlugins('afterLayout');\n }\n\n /**\n\t * Updates all datasets unless a plugin returns `false` to the `beforeDatasetsUpdate`\n\t * hook, in which case, plugins will not be called on `afterDatasetsUpdate`.\n\t * @private\n\t */\n _updateDatasets(mode) {\n if (this.notifyPlugins('beforeDatasetsUpdate', {mode, cancelable: true}) === false) {\n return;\n }\n\n for (let i = 0, ilen = this.data.datasets.length; i < ilen; ++i) {\n this.getDatasetMeta(i).controller.configure();\n }\n\n for (let i = 0, ilen = this.data.datasets.length; i < ilen; ++i) {\n this._updateDataset(i, isFunction(mode) ? mode({datasetIndex: i}) : mode);\n }\n\n this.notifyPlugins('afterDatasetsUpdate', {mode});\n }\n\n /**\n\t * Updates dataset at index unless a plugin returns `false` to the `beforeDatasetUpdate`\n\t * hook, in which case, plugins will not be called on `afterDatasetUpdate`.\n\t * @private\n\t */\n _updateDataset(index, mode) {\n const meta = this.getDatasetMeta(index);\n const args = {meta, index, mode, cancelable: true};\n\n if (this.notifyPlugins('beforeDatasetUpdate', args) === false) {\n return;\n }\n\n meta.controller._update(mode);\n\n args.cancelable = false;\n this.notifyPlugins('afterDatasetUpdate', args);\n }\n\n render() {\n if (this.notifyPlugins('beforeRender', {cancelable: true}) === false) {\n return;\n }\n\n if (animator.has(this)) {\n if (this.attached && !animator.running(this)) {\n animator.start(this);\n }\n } else {\n this.draw();\n onAnimationsComplete({chart: this});\n }\n }\n\n draw() {\n let i;\n if (this._resizeBeforeDraw) {\n const {width, height} = this._resizeBeforeDraw;\n this._resize(width, height);\n this._resizeBeforeDraw = null;\n }\n this.clear();\n\n if (this.width <= 0 || this.height <= 0) {\n return;\n }\n\n if (this.notifyPlugins('beforeDraw', {cancelable: true}) === false) {\n return;\n }\n\n // Because of plugin hooks (before/afterDatasetsDraw), datasets can't\n // currently be part of layers. Instead, we draw\n // layers <= 0 before(default, backward compat), and the rest after\n const layers = this._layers;\n for (i = 0; i < layers.length && layers[i].z <= 0; ++i) {\n layers[i].draw(this.chartArea);\n }\n\n this._drawDatasets();\n\n // Rest of layers\n for (; i < layers.length; ++i) {\n layers[i].draw(this.chartArea);\n }\n\n this.notifyPlugins('afterDraw');\n }\n\n /**\n\t * @private\n\t */\n _getSortedDatasetMetas(filterVisible) {\n const metasets = this._sortedMetasets;\n const result = [];\n let i, ilen;\n\n for (i = 0, ilen = metasets.length; i < ilen; ++i) {\n const meta = metasets[i];\n if (!filterVisible || meta.visible) {\n result.push(meta);\n }\n }\n\n return result;\n }\n\n /**\n\t * Gets the visible dataset metas in drawing order\n\t * @return {object[]}\n\t */\n getSortedVisibleDatasetMetas() {\n return this._getSortedDatasetMetas(true);\n }\n\n /**\n\t * Draws all datasets unless a plugin returns `false` to the `beforeDatasetsDraw`\n\t * hook, in which case, plugins will not be called on `afterDatasetsDraw`.\n\t * @private\n\t */\n _drawDatasets() {\n if (this.notifyPlugins('beforeDatasetsDraw', {cancelable: true}) === false) {\n return;\n }\n\n const metasets = this.getSortedVisibleDatasetMetas();\n for (let i = metasets.length - 1; i >= 0; --i) {\n this._drawDataset(metasets[i]);\n }\n\n this.notifyPlugins('afterDatasetsDraw');\n }\n\n /**\n\t * Draws dataset at index unless a plugin returns `false` to the `beforeDatasetDraw`\n\t * hook, in which case, plugins will not be called on `afterDatasetDraw`.\n\t * @private\n\t */\n _drawDataset(meta) {\n const ctx = this.ctx;\n const clip = meta._clip;\n const useClip = !clip.disabled;\n const area = getDatasetArea(meta) || this.chartArea;\n const args = {\n meta,\n index: meta.index,\n cancelable: true\n };\n\n if (this.notifyPlugins('beforeDatasetDraw', args) === false) {\n return;\n }\n\n if (useClip) {\n clipArea(ctx, {\n left: clip.left === false ? 0 : area.left - clip.left,\n right: clip.right === false ? this.width : area.right + clip.right,\n top: clip.top === false ? 0 : area.top - clip.top,\n bottom: clip.bottom === false ? this.height : area.bottom + clip.bottom\n });\n }\n\n meta.controller.draw();\n\n if (useClip) {\n unclipArea(ctx);\n }\n\n args.cancelable = false;\n this.notifyPlugins('afterDatasetDraw', args);\n }\n\n /**\n * Checks whether the given point is in the chart area.\n * @param {Point} point - in relative coordinates (see, e.g., getRelativePosition)\n * @returns {boolean}\n */\n isPointInArea(point) {\n return _isPointInArea(point, this.chartArea, this._minPadding);\n }\n\n getElementsAtEventForMode(e, mode, options, useFinalPosition) {\n const method = Interaction.modes[mode];\n if (typeof method === 'function') {\n return method(this, e, options, useFinalPosition);\n }\n\n return [];\n }\n\n getDatasetMeta(datasetIndex) {\n const dataset = this.data.datasets[datasetIndex];\n const metasets = this._metasets;\n let meta = metasets.filter(x => x && x._dataset === dataset).pop();\n\n if (!meta) {\n meta = {\n type: null,\n data: [],\n dataset: null,\n controller: null,\n hidden: null,\t\t\t// See isDatasetVisible() comment\n xAxisID: null,\n yAxisID: null,\n order: dataset && dataset.order || 0,\n index: datasetIndex,\n _dataset: dataset,\n _parsed: [],\n _sorted: false\n };\n metasets.push(meta);\n }\n\n return meta;\n }\n\n getContext() {\n return this.$context || (this.$context = createContext(null, {chart: this, type: 'chart'}));\n }\n\n getVisibleDatasetCount() {\n return this.getSortedVisibleDatasetMetas().length;\n }\n\n isDatasetVisible(datasetIndex) {\n const dataset = this.data.datasets[datasetIndex];\n if (!dataset) {\n return false;\n }\n\n const meta = this.getDatasetMeta(datasetIndex);\n\n // meta.hidden is a per chart dataset hidden flag override with 3 states: if true or false,\n // the dataset.hidden value is ignored, else if null, the dataset hidden state is returned.\n return typeof meta.hidden === 'boolean' ? !meta.hidden : !dataset.hidden;\n }\n\n setDatasetVisibility(datasetIndex, visible) {\n const meta = this.getDatasetMeta(datasetIndex);\n meta.hidden = !visible;\n }\n\n toggleDataVisibility(index) {\n this._hiddenIndices[index] = !this._hiddenIndices[index];\n }\n\n getDataVisibility(index) {\n return !this._hiddenIndices[index];\n }\n\n /**\n\t * @private\n\t */\n _updateVisibility(datasetIndex, dataIndex, visible) {\n const mode = visible ? 'show' : 'hide';\n const meta = this.getDatasetMeta(datasetIndex);\n const anims = meta.controller._resolveAnimations(undefined, mode);\n\n if (defined(dataIndex)) {\n meta.data[dataIndex].hidden = !visible;\n this.update();\n } else {\n this.setDatasetVisibility(datasetIndex, visible);\n // Animate visible state, so hide animation can be seen. This could be handled better if update / updateDataset returned a Promise.\n anims.update(meta, {visible});\n this.update((ctx) => ctx.datasetIndex === datasetIndex ? mode : undefined);\n }\n }\n\n hide(datasetIndex, dataIndex) {\n this._updateVisibility(datasetIndex, dataIndex, false);\n }\n\n show(datasetIndex, dataIndex) {\n this._updateVisibility(datasetIndex, dataIndex, true);\n }\n\n /**\n\t * @private\n\t */\n _destroyDatasetMeta(datasetIndex) {\n const meta = this._metasets[datasetIndex];\n if (meta && meta.controller) {\n meta.controller._destroy();\n }\n delete this._metasets[datasetIndex];\n }\n\n _stop() {\n let i, ilen;\n this.stop();\n animator.remove(this);\n\n for (i = 0, ilen = this.data.datasets.length; i < ilen; ++i) {\n this._destroyDatasetMeta(i);\n }\n }\n\n destroy() {\n this.notifyPlugins('beforeDestroy');\n const {canvas, ctx} = this;\n\n this._stop();\n this.config.clearCache();\n\n if (canvas) {\n this.unbindEvents();\n clearCanvas(canvas, ctx);\n this.platform.releaseContext(ctx);\n this.canvas = null;\n this.ctx = null;\n }\n\n delete instances[this.id];\n\n this.notifyPlugins('afterDestroy');\n }\n\n toBase64Image(...args) {\n return this.canvas.toDataURL(...args);\n }\n\n /**\n\t * @private\n\t */\n bindEvents() {\n this.bindUserEvents();\n if (this.options.responsive) {\n this.bindResponsiveEvents();\n } else {\n this.attached = true;\n }\n }\n\n /**\n * @private\n */\n bindUserEvents() {\n const listeners = this._listeners;\n const platform = this.platform;\n\n const _add = (type, listener) => {\n platform.addEventListener(this, type, listener);\n listeners[type] = listener;\n };\n\n const listener = (e, x, y) => {\n e.offsetX = x;\n e.offsetY = y;\n this._eventHandler(e);\n };\n\n each(this.options.events, (type) => _add(type, listener));\n }\n\n /**\n * @private\n */\n bindResponsiveEvents() {\n if (!this._responsiveListeners) {\n this._responsiveListeners = {};\n }\n const listeners = this._responsiveListeners;\n const platform = this.platform;\n\n const _add = (type, listener) => {\n platform.addEventListener(this, type, listener);\n listeners[type] = listener;\n };\n const _remove = (type, listener) => {\n if (listeners[type]) {\n platform.removeEventListener(this, type, listener);\n delete listeners[type];\n }\n };\n\n const listener = (width, height) => {\n if (this.canvas) {\n this.resize(width, height);\n }\n };\n\n let detached; // eslint-disable-line prefer-const\n const attached = () => {\n _remove('attach', attached);\n\n this.attached = true;\n this.resize();\n\n _add('resize', listener);\n _add('detach', detached);\n };\n\n detached = () => {\n this.attached = false;\n\n _remove('resize', listener);\n\n // Stop animating and remove metasets, so when re-attached, the animations start from beginning.\n this._stop();\n this._resize(0, 0);\n\n _add('attach', attached);\n };\n\n if (platform.isAttached(this.canvas)) {\n attached();\n } else {\n detached();\n }\n }\n\n /**\n\t * @private\n\t */\n unbindEvents() {\n each(this._listeners, (listener, type) => {\n this.platform.removeEventListener(this, type, listener);\n });\n this._listeners = {};\n\n each(this._responsiveListeners, (listener, type) => {\n this.platform.removeEventListener(this, type, listener);\n });\n this._responsiveListeners = undefined;\n }\n\n updateHoverStyle(items, mode, enabled) {\n const prefix = enabled ? 'set' : 'remove';\n let meta, item, i, ilen;\n\n if (mode === 'dataset') {\n meta = this.getDatasetMeta(items[0].datasetIndex);\n meta.controller['_' + prefix + 'DatasetHoverStyle']();\n }\n\n for (i = 0, ilen = items.length; i < ilen; ++i) {\n item = items[i];\n const controller = item && this.getDatasetMeta(item.datasetIndex).controller;\n if (controller) {\n controller[prefix + 'HoverStyle'](item.element, item.datasetIndex, item.index);\n }\n }\n }\n\n /**\n\t * Get active (hovered) elements\n\t * @returns array\n\t */\n getActiveElements() {\n return this._active || [];\n }\n\n /**\n\t * Set active (hovered) elements\n\t * @param {array} activeElements New active data points\n\t */\n setActiveElements(activeElements) {\n const lastActive = this._active || [];\n const active = activeElements.map(({datasetIndex, index}) => {\n const meta = this.getDatasetMeta(datasetIndex);\n if (!meta) {\n throw new Error('No dataset found at index ' + datasetIndex);\n }\n\n return {\n datasetIndex,\n element: meta.data[index],\n index,\n };\n });\n const changed = !_elementsEqual(active, lastActive);\n\n if (changed) {\n this._active = active;\n // Make sure we don't use the previous mouse event to override the active elements in update.\n this._lastEvent = null;\n this._updateHoverStyles(active, lastActive);\n }\n }\n\n /**\n\t * Calls enabled plugins on the specified hook and with the given args.\n\t * This method immediately returns as soon as a plugin explicitly returns false. The\n\t * returned value can be used, for instance, to interrupt the current action.\n\t * @param {string} hook - The name of the plugin method to call (e.g. 'beforeUpdate').\n\t * @param {Object} [args] - Extra arguments to apply to the hook call.\n * @param {import('./core.plugins.js').filterCallback} [filter] - Filtering function for limiting which plugins are notified\n\t * @returns {boolean} false if any of the plugins return false, else returns true.\n\t */\n notifyPlugins(hook, args, filter) {\n return this._plugins.notify(this, hook, args, filter);\n }\n\n /**\n * Check if a plugin with the specific ID is registered and enabled\n * @param {string} pluginId - The ID of the plugin of which to check if it is enabled\n * @returns {boolean}\n */\n isPluginEnabled(pluginId) {\n return this._plugins._cache.filter(p => p.plugin.id === pluginId).length === 1;\n }\n\n /**\n\t * @private\n\t */\n _updateHoverStyles(active, lastActive, replay) {\n const hoverOptions = this.options.hover;\n const diff = (a, b) => a.filter(x => !b.some(y => x.datasetIndex === y.datasetIndex && x.index === y.index));\n const deactivated = diff(lastActive, active);\n const activated = replay ? active : diff(active, lastActive);\n\n if (deactivated.length) {\n this.updateHoverStyle(deactivated, hoverOptions.mode, false);\n }\n\n if (activated.length && hoverOptions.mode) {\n this.updateHoverStyle(activated, hoverOptions.mode, true);\n }\n }\n\n /**\n\t * @private\n\t */\n _eventHandler(e, replay) {\n const args = {\n event: e,\n replay,\n cancelable: true,\n inChartArea: this.isPointInArea(e)\n };\n const eventFilter = (plugin) => (plugin.options.events || this.options.events).includes(e.native.type);\n\n if (this.notifyPlugins('beforeEvent', args, eventFilter) === false) {\n return;\n }\n\n const changed = this._handleEvent(e, replay, args.inChartArea);\n\n args.cancelable = false;\n this.notifyPlugins('afterEvent', args, eventFilter);\n\n if (changed || args.changed) {\n this.render();\n }\n\n return this;\n }\n\n /**\n\t * Handle an event\n\t * @param {ChartEvent} e the event to handle\n\t * @param {boolean} [replay] - true if the event was replayed by `update`\n * @param {boolean} [inChartArea] - true if the event is inside chartArea\n\t * @return {boolean} true if the chart needs to re-render\n\t * @private\n\t */\n _handleEvent(e, replay, inChartArea) {\n const {_active: lastActive = [], options} = this;\n\n // If the event is replayed from `update`, we should evaluate with the final positions.\n //\n // The `replay`:\n // It's the last event (excluding click) that has occurred before `update`.\n // So mouse has not moved. It's also over the chart, because there is a `replay`.\n //\n // The why:\n // If animations are active, the elements haven't moved yet compared to state before update.\n // But if they will, we are activating the elements that would be active, if this check\n // was done after the animations have completed. => \"final positions\".\n // If there is no animations, the \"final\" and \"current\" positions are equal.\n // This is done so we do not have to evaluate the active elements each animation frame\n // - it would be expensive.\n const useFinalPosition = replay;\n const active = this._getActiveElements(e, lastActive, inChartArea, useFinalPosition);\n const isClick = _isClickEvent(e);\n const lastEvent = determineLastEvent(e, this._lastEvent, inChartArea, isClick);\n\n if (inChartArea) {\n // Set _lastEvent to null while we are processing the event handlers.\n // This prevents recursion if the handler calls chart.update()\n this._lastEvent = null;\n\n // Invoke onHover hook\n callCallback(options.onHover, [e, active, this], this);\n\n if (isClick) {\n callCallback(options.onClick, [e, active, this], this);\n }\n }\n\n const changed = !_elementsEqual(active, lastActive);\n if (changed || replay) {\n this._active = active;\n this._updateHoverStyles(active, lastActive, replay);\n }\n\n this._lastEvent = lastEvent;\n\n return changed;\n }\n\n /**\n * @param {ChartEvent} e - The event\n * @param {import('../types/index.js').ActiveElement[]} lastActive - Previously active elements\n * @param {boolean} inChartArea - Is the envent inside chartArea\n * @param {boolean} useFinalPosition - Should the evaluation be done with current or final (after animation) element positions\n * @returns {import('../types/index.js').ActiveElement[]} - The active elements\n * @pravate\n */\n _getActiveElements(e, lastActive, inChartArea, useFinalPosition) {\n if (e.type === 'mouseout') {\n return [];\n }\n\n if (!inChartArea) {\n // Let user control the active elements outside chartArea. Eg. using Legend.\n return lastActive;\n }\n\n const hoverOptions = this.options.hover;\n return this.getElementsAtEventForMode(e, hoverOptions.mode, hoverOptions, useFinalPosition);\n }\n}\n\n// @ts-ignore\nfunction invalidatePlugins() {\n return each(Chart.instances, (chart) => chart._plugins.invalidate());\n}\n\nexport default Chart;\n","/**\n * @namespace Chart._adapters\n * @since 2.8.0\n * @private\n */\n\nimport type {AnyObject} from '../types/basic.js';\nimport type {ChartOptions} from '../types/index.js';\n\nexport type TimeUnit = 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';\n\nexport interface DateAdapter<T extends AnyObject = AnyObject> {\n readonly options: T;\n /**\n * Will called with chart options after adapter creation.\n */\n init(this: DateAdapter<T>, chartOptions: ChartOptions): void;\n /**\n * Returns a map of time formats for the supported formatting units defined\n * in Unit as well as 'datetime' representing a detailed date/time string.\n */\n formats(this: DateAdapter<T>): Record<string, string>;\n /**\n * Parses the given `value` and return the associated timestamp.\n * @param value - the value to parse (usually comes from the data)\n * @param [format] - the expected data format\n */\n parse(this: DateAdapter<T>, value: unknown, format?: TimeUnit): number | null;\n /**\n * Returns the formatted date in the specified `format` for a given `timestamp`.\n * @param timestamp - the timestamp to format\n * @param format - the date/time token\n */\n format(this: DateAdapter<T>, timestamp: number, format: TimeUnit): string;\n /**\n * Adds the specified `amount` of `unit` to the given `timestamp`.\n * @param timestamp - the input timestamp\n * @param amount - the amount to add\n * @param unit - the unit as string\n */\n add(this: DateAdapter<T>, timestamp: number, amount: number, unit: TimeUnit): number;\n /**\n * Returns the number of `unit` between the given timestamps.\n * @param a - the input timestamp (reference)\n * @param b - the timestamp to subtract\n * @param unit - the unit as string\n */\n diff(this: DateAdapter<T>, a: number, b: number, unit: TimeUnit): number;\n /**\n * Returns start of `unit` for the given `timestamp`.\n * @param timestamp - the input timestamp\n * @param unit - the unit as string\n * @param [weekday] - the ISO day of the week with 1 being Monday\n * and 7 being Sunday (only needed if param *unit* is `isoWeek`).\n */\n startOf(this: DateAdapter<T>, timestamp: number, unit: TimeUnit | 'isoWeek', weekday?: number): number;\n /**\n * Returns end of `unit` for the given `timestamp`.\n * @param timestamp - the input timestamp\n * @param unit - the unit as string\n */\n endOf(this: DateAdapter<T>, timestamp: number, unit: TimeUnit | 'isoWeek'): number;\n}\n\nfunction abstract<T = void>(): T {\n throw new Error('This method is not implemented: Check that a complete date adapter is provided.');\n}\n\n/**\n * Date adapter (current used by the time scale)\n * @namespace Chart._adapters._date\n * @memberof Chart._adapters\n * @private\n */\nclass DateAdapterBase implements DateAdapter {\n\n /**\n * Override default date adapter methods.\n * Accepts type parameter to define options type.\n * @example\n * Chart._adapters._date.override<{myAdapterOption: string}>({\n * init() {\n * console.log(this.options.myAdapterOption);\n * }\n * })\n */\n static override<T extends AnyObject = AnyObject>(\n members: Partial<Omit<DateAdapter<T>, 'options'>>\n ) {\n Object.assign(DateAdapterBase.prototype, members);\n }\n\n readonly options: AnyObject;\n\n constructor(options: AnyObject) {\n this.options = options || {};\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n init() {}\n\n formats(): Record<string, string> {\n return abstract();\n }\n\n parse(): number | null {\n return abstract();\n }\n\n format(): string {\n return abstract();\n }\n\n add(): number {\n return abstract();\n }\n\n diff(): number {\n return abstract();\n }\n\n startOf(): number {\n return abstract();\n }\n\n endOf(): number {\n return abstract();\n }\n}\n\nexport default {\n _date: DateAdapterBase\n};\n","import DatasetController from '../core/core.datasetController.js';\nimport {\n _arrayUnique, isArray, isNullOrUndef,\n valueOrDefault, resolveObjectKey, sign, defined\n} from '../helpers/index.js';\n\nfunction getAllScaleValues(scale, type) {\n if (!scale._cache.$bar) {\n const visibleMetas = scale.getMatchingVisibleMetas(type);\n let values = [];\n\n for (let i = 0, ilen = visibleMetas.length; i < ilen; i++) {\n values = values.concat(visibleMetas[i].controller.getAllParsedValues(scale));\n }\n scale._cache.$bar = _arrayUnique(values.sort((a, b) => a - b));\n }\n return scale._cache.$bar;\n}\n\n/**\n * Computes the \"optimal\" sample size to maintain bars equally sized while preventing overlap.\n * @private\n */\nfunction computeMinSampleSize(meta) {\n const scale = meta.iScale;\n const values = getAllScaleValues(scale, meta.type);\n let min = scale._length;\n let i, ilen, curr, prev;\n const updateMinAndPrev = () => {\n if (curr === 32767 || curr === -32768) {\n // Ignore truncated pixels\n return;\n }\n if (defined(prev)) {\n // curr - prev === 0 is ignored\n min = Math.min(min, Math.abs(curr - prev) || min);\n }\n prev = curr;\n };\n\n for (i = 0, ilen = values.length; i < ilen; ++i) {\n curr = scale.getPixelForValue(values[i]);\n updateMinAndPrev();\n }\n\n prev = undefined;\n for (i = 0, ilen = scale.ticks.length; i < ilen; ++i) {\n curr = scale.getPixelForTick(i);\n updateMinAndPrev();\n }\n\n return min;\n}\n\n/**\n * Computes an \"ideal\" category based on the absolute bar thickness or, if undefined or null,\n * uses the smallest interval (see computeMinSampleSize) that prevents bar overlapping. This\n * mode currently always generates bars equally sized (until we introduce scriptable options?).\n * @private\n */\nfunction computeFitCategoryTraits(index, ruler, options, stackCount) {\n const thickness = options.barThickness;\n let size, ratio;\n\n if (isNullOrUndef(thickness)) {\n size = ruler.min * options.categoryPercentage;\n ratio = options.barPercentage;\n } else {\n // When bar thickness is enforced, category and bar percentages are ignored.\n // Note(SB): we could add support for relative bar thickness (e.g. barThickness: '50%')\n // and deprecate barPercentage since this value is ignored when thickness is absolute.\n size = thickness * stackCount;\n ratio = 1;\n }\n\n return {\n chunk: size / stackCount,\n ratio,\n start: ruler.pixels[index] - (size / 2)\n };\n}\n\n/**\n * Computes an \"optimal\" category that globally arranges bars side by side (no gap when\n * percentage options are 1), based on the previous and following categories. This mode\n * generates bars with different widths when data are not evenly spaced.\n * @private\n */\nfunction computeFlexCategoryTraits(index, ruler, options, stackCount) {\n const pixels = ruler.pixels;\n const curr = pixels[index];\n let prev = index > 0 ? pixels[index - 1] : null;\n let next = index < pixels.length - 1 ? pixels[index + 1] : null;\n const percent = options.categoryPercentage;\n\n if (prev === null) {\n // first data: its size is double based on the next point or,\n // if it's also the last data, we use the scale size.\n prev = curr - (next === null ? ruler.end - ruler.start : next - curr);\n }\n\n if (next === null) {\n // last data: its size is also double based on the previous point.\n next = curr + curr - prev;\n }\n\n const start = curr - (curr - Math.min(prev, next)) / 2 * percent;\n const size = Math.abs(next - prev) / 2 * percent;\n\n return {\n chunk: size / stackCount,\n ratio: options.barPercentage,\n start\n };\n}\n\nfunction parseFloatBar(entry, item, vScale, i) {\n const startValue = vScale.parse(entry[0], i);\n const endValue = vScale.parse(entry[1], i);\n const min = Math.min(startValue, endValue);\n const max = Math.max(startValue, endValue);\n let barStart = min;\n let barEnd = max;\n\n if (Math.abs(min) > Math.abs(max)) {\n barStart = max;\n barEnd = min;\n }\n\n // Store `barEnd` (furthest away from origin) as parsed value,\n // to make stacking straight forward\n item[vScale.axis] = barEnd;\n\n item._custom = {\n barStart,\n barEnd,\n start: startValue,\n end: endValue,\n min,\n max\n };\n}\n\nfunction parseValue(entry, item, vScale, i) {\n if (isArray(entry)) {\n parseFloatBar(entry, item, vScale, i);\n } else {\n item[vScale.axis] = vScale.parse(entry, i);\n }\n return item;\n}\n\nfunction parseArrayOrPrimitive(meta, data, start, count) {\n const iScale = meta.iScale;\n const vScale = meta.vScale;\n const labels = iScale.getLabels();\n const singleScale = iScale === vScale;\n const parsed = [];\n let i, ilen, item, entry;\n\n for (i = start, ilen = start + count; i < ilen; ++i) {\n entry = data[i];\n item = {};\n item[iScale.axis] = singleScale || iScale.parse(labels[i], i);\n parsed.push(parseValue(entry, item, vScale, i));\n }\n return parsed;\n}\n\nfunction isFloatBar(custom) {\n return custom && custom.barStart !== undefined && custom.barEnd !== undefined;\n}\n\nfunction barSign(size, vScale, actualBase) {\n if (size !== 0) {\n return sign(size);\n }\n return (vScale.isHorizontal() ? 1 : -1) * (vScale.min >= actualBase ? 1 : -1);\n}\n\nfunction borderProps(properties) {\n let reverse, start, end, top, bottom;\n if (properties.horizontal) {\n reverse = properties.base > properties.x;\n start = 'left';\n end = 'right';\n } else {\n reverse = properties.base < properties.y;\n start = 'bottom';\n end = 'top';\n }\n if (reverse) {\n top = 'end';\n bottom = 'start';\n } else {\n top = 'start';\n bottom = 'end';\n }\n return {start, end, reverse, top, bottom};\n}\n\nfunction setBorderSkipped(properties, options, stack, index) {\n let edge = options.borderSkipped;\n const res = {};\n\n if (!edge) {\n properties.borderSkipped = res;\n return;\n }\n\n if (edge === true) {\n properties.borderSkipped = {top: true, right: true, bottom: true, left: true};\n return;\n }\n\n const {start, end, reverse, top, bottom} = borderProps(properties);\n\n if (edge === 'middle' && stack) {\n properties.enableBorderRadius = true;\n if ((stack._top || 0) === index) {\n edge = top;\n } else if ((stack._bottom || 0) === index) {\n edge = bottom;\n } else {\n res[parseEdge(bottom, start, end, reverse)] = true;\n edge = top;\n }\n }\n\n res[parseEdge(edge, start, end, reverse)] = true;\n properties.borderSkipped = res;\n}\n\nfunction parseEdge(edge, a, b, reverse) {\n if (reverse) {\n edge = swap(edge, a, b);\n edge = startEnd(edge, b, a);\n } else {\n edge = startEnd(edge, a, b);\n }\n return edge;\n}\n\nfunction swap(orig, v1, v2) {\n return orig === v1 ? v2 : orig === v2 ? v1 : orig;\n}\n\nfunction startEnd(v, start, end) {\n return v === 'start' ? start : v === 'end' ? end : v;\n}\n\nfunction setInflateAmount(properties, {inflateAmount}, ratio) {\n properties.inflateAmount = inflateAmount === 'auto'\n ? ratio === 1 ? 0.33 : 0\n : inflateAmount;\n}\n\nexport default class BarController extends DatasetController {\n\n static id = 'bar';\n\n /**\n * @type {any}\n */\n static defaults = {\n datasetElementType: false,\n dataElementType: 'bar',\n\n categoryPercentage: 0.8,\n barPercentage: 0.9,\n grouped: true,\n\n animations: {\n numbers: {\n type: 'number',\n properties: ['x', 'y', 'base', 'width', 'height']\n }\n }\n };\n\n /**\n * @type {any}\n */\n static overrides = {\n scales: {\n _index_: {\n type: 'category',\n offset: true,\n grid: {\n offset: true\n }\n },\n _value_: {\n type: 'linear',\n beginAtZero: true,\n }\n }\n };\n\n\n /**\n\t * Overriding primitive data parsing since we support mixed primitive/array\n\t * data for float bars\n\t * @protected\n\t */\n parsePrimitiveData(meta, data, start, count) {\n return parseArrayOrPrimitive(meta, data, start, count);\n }\n\n /**\n\t * Overriding array data parsing since we support mixed primitive/array\n\t * data for float bars\n\t * @protected\n\t */\n parseArrayData(meta, data, start, count) {\n return parseArrayOrPrimitive(meta, data, start, count);\n }\n\n /**\n\t * Overriding object data parsing since we support mixed primitive/array\n\t * value-scale data for float bars\n\t * @protected\n\t */\n parseObjectData(meta, data, start, count) {\n const {iScale, vScale} = meta;\n const {xAxisKey = 'x', yAxisKey = 'y'} = this._parsing;\n const iAxisKey = iScale.axis === 'x' ? xAxisKey : yAxisKey;\n const vAxisKey = vScale.axis === 'x' ? xAxisKey : yAxisKey;\n const parsed = [];\n let i, ilen, item, obj;\n for (i = start, ilen = start + count; i < ilen; ++i) {\n obj = data[i];\n item = {};\n item[iScale.axis] = iScale.parse(resolveObjectKey(obj, iAxisKey), i);\n parsed.push(parseValue(resolveObjectKey(obj, vAxisKey), item, vScale, i));\n }\n return parsed;\n }\n\n /**\n\t * @protected\n\t */\n updateRangeFromParsed(range, scale, parsed, stack) {\n super.updateRangeFromParsed(range, scale, parsed, stack);\n const custom = parsed._custom;\n if (custom && scale === this._cachedMeta.vScale) {\n // float bar: only one end of the bar is considered by `super`\n range.min = Math.min(range.min, custom.min);\n range.max = Math.max(range.max, custom.max);\n }\n }\n\n /**\n\t * @return {number|boolean}\n\t * @protected\n\t */\n getMaxOverflow() {\n return 0;\n }\n\n /**\n\t * @protected\n\t */\n getLabelAndValue(index) {\n const meta = this._cachedMeta;\n const {iScale, vScale} = meta;\n const parsed = this.getParsed(index);\n const custom = parsed._custom;\n const value = isFloatBar(custom)\n ? '[' + custom.start + ', ' + custom.end + ']'\n : '' + vScale.getLabelForValue(parsed[vScale.axis]);\n\n return {\n label: '' + iScale.getLabelForValue(parsed[iScale.axis]),\n value\n };\n }\n\n initialize() {\n this.enableOptionSharing = true;\n\n super.initialize();\n\n const meta = this._cachedMeta;\n meta.stack = this.getDataset().stack;\n }\n\n update(mode) {\n const meta = this._cachedMeta;\n this.updateElements(meta.data, 0, meta.data.length, mode);\n }\n\n updateElements(bars, start, count, mode) {\n const reset = mode === 'reset';\n const {index, _cachedMeta: {vScale}} = this;\n const base = vScale.getBasePixel();\n const horizontal = vScale.isHorizontal();\n const ruler = this._getRuler();\n const {sharedOptions, includeOptions} = this._getSharedOptions(start, mode);\n\n for (let i = start; i < start + count; i++) {\n const parsed = this.getParsed(i);\n const vpixels = reset || isNullOrUndef(parsed[vScale.axis]) ? {base, head: base} : this._calculateBarValuePixels(i);\n const ipixels = this._calculateBarIndexPixels(i, ruler);\n const stack = (parsed._stacks || {})[vScale.axis];\n\n const properties = {\n horizontal,\n base: vpixels.base,\n enableBorderRadius: !stack || isFloatBar(parsed._custom) || (index === stack._top || index === stack._bottom),\n x: horizontal ? vpixels.head : ipixels.center,\n y: horizontal ? ipixels.center : vpixels.head,\n height: horizontal ? ipixels.size : Math.abs(vpixels.size),\n width: horizontal ? Math.abs(vpixels.size) : ipixels.size\n };\n\n if (includeOptions) {\n properties.options = sharedOptions || this.resolveDataElementOptions(i, bars[i].active ? 'active' : mode);\n }\n const options = properties.options || bars[i].options;\n setBorderSkipped(properties, options, stack, index);\n setInflateAmount(properties, options, ruler.ratio);\n this.updateElement(bars[i], i, properties, mode);\n }\n }\n\n /**\n\t * Returns the stacks based on groups and bar visibility.\n\t * @param {number} [last] - The dataset index\n\t * @param {number} [dataIndex] - The data index of the ruler\n\t * @returns {string[]} The list of stack IDs\n\t * @private\n\t */\n _getStacks(last, dataIndex) {\n const {iScale} = this._cachedMeta;\n const metasets = iScale.getMatchingVisibleMetas(this._type)\n .filter(meta => meta.controller.options.grouped);\n const stacked = iScale.options.stacked;\n const stacks = [];\n\n const skipNull = (meta) => {\n const parsed = meta.controller.getParsed(dataIndex);\n const val = parsed && parsed[meta.vScale.axis];\n\n if (isNullOrUndef(val) || isNaN(val)) {\n return true;\n }\n };\n\n for (const meta of metasets) {\n if (dataIndex !== undefined && skipNull(meta)) {\n continue;\n }\n\n // stacked | meta.stack\n // | found | not found | undefined\n // false | x | x | x\n // true | | x |\n // undefined | | x | x\n if (stacked === false || stacks.indexOf(meta.stack) === -1 ||\n\t\t\t\t(stacked === undefined && meta.stack === undefined)) {\n stacks.push(meta.stack);\n }\n if (meta.index === last) {\n break;\n }\n }\n\n // No stacks? that means there is no visible data. Let's still initialize an `undefined`\n // stack where possible invisible bars will be located.\n // https://github.com/chartjs/Chart.js/issues/6368\n if (!stacks.length) {\n stacks.push(undefined);\n }\n\n return stacks;\n }\n\n /**\n\t * Returns the effective number of stacks based on groups and bar visibility.\n\t * @private\n\t */\n _getStackCount(index) {\n return this._getStacks(undefined, index).length;\n }\n\n /**\n\t * Returns the stack index for the given dataset based on groups and bar visibility.\n\t * @param {number} [datasetIndex] - The dataset index\n\t * @param {string} [name] - The stack name to find\n * @param {number} [dataIndex]\n\t * @returns {number} The stack index\n\t * @private\n\t */\n _getStackIndex(datasetIndex, name, dataIndex) {\n const stacks = this._getStacks(datasetIndex, dataIndex);\n const index = (name !== undefined)\n ? stacks.indexOf(name)\n : -1; // indexOf returns -1 if element is not present\n\n return (index === -1)\n ? stacks.length - 1\n : index;\n }\n\n /**\n\t * @private\n\t */\n _getRuler() {\n const opts = this.options;\n const meta = this._cachedMeta;\n const iScale = meta.iScale;\n const pixels = [];\n let i, ilen;\n\n for (i = 0, ilen = meta.data.length; i < ilen; ++i) {\n pixels.push(iScale.getPixelForValue(this.getParsed(i)[iScale.axis], i));\n }\n\n const barThickness = opts.barThickness;\n const min = barThickness || computeMinSampleSize(meta);\n\n return {\n min,\n pixels,\n start: iScale._startPixel,\n end: iScale._endPixel,\n stackCount: this._getStackCount(),\n scale: iScale,\n grouped: opts.grouped,\n // bar thickness ratio used for non-grouped bars\n ratio: barThickness ? 1 : opts.categoryPercentage * opts.barPercentage\n };\n }\n\n /**\n\t * Note: pixel values are not clamped to the scale area.\n\t * @private\n\t */\n _calculateBarValuePixels(index) {\n const {_cachedMeta: {vScale, _stacked, index: datasetIndex}, options: {base: baseValue, minBarLength}} = this;\n const actualBase = baseValue || 0;\n const parsed = this.getParsed(index);\n const custom = parsed._custom;\n const floating = isFloatBar(custom);\n let value = parsed[vScale.axis];\n let start = 0;\n let length = _stacked ? this.applyStack(vScale, parsed, _stacked) : value;\n let head, size;\n\n if (length !== value) {\n start = length - value;\n length = value;\n }\n\n if (floating) {\n value = custom.barStart;\n length = custom.barEnd - custom.barStart;\n // bars crossing origin are not stacked\n if (value !== 0 && sign(value) !== sign(custom.barEnd)) {\n start = 0;\n }\n start += value;\n }\n\n const startValue = !isNullOrUndef(baseValue) && !floating ? baseValue : start;\n let base = vScale.getPixelForValue(startValue);\n\n if (this.chart.getDataVisibility(index)) {\n head = vScale.getPixelForValue(start + length);\n } else {\n // When not visible, no height\n head = base;\n }\n\n size = head - base;\n\n if (Math.abs(size) < minBarLength) {\n size = barSign(size, vScale, actualBase) * minBarLength;\n if (value === actualBase) {\n base -= size / 2;\n }\n const startPixel = vScale.getPixelForDecimal(0);\n const endPixel = vScale.getPixelForDecimal(1);\n const min = Math.min(startPixel, endPixel);\n const max = Math.max(startPixel, endPixel);\n base = Math.max(Math.min(base, max), min);\n head = base + size;\n\n if (_stacked && !floating) {\n // visual data coordinates after applying minBarLength\n parsed._stacks[vScale.axis]._visualValues[datasetIndex] = vScale.getValueForPixel(head) - vScale.getValueForPixel(base);\n }\n }\n\n if (base === vScale.getPixelForValue(actualBase)) {\n const halfGrid = sign(size) * vScale.getLineWidthForValue(actualBase) / 2;\n base += halfGrid;\n size -= halfGrid;\n }\n\n return {\n size,\n base,\n head,\n center: head + size / 2\n };\n }\n\n /**\n\t * @private\n\t */\n _calculateBarIndexPixels(index, ruler) {\n const scale = ruler.scale;\n const options = this.options;\n const skipNull = options.skipNull;\n const maxBarThickness = valueOrDefault(options.maxBarThickness, Infinity);\n let center, size;\n if (ruler.grouped) {\n const stackCount = skipNull ? this._getStackCount(index) : ruler.stackCount;\n const range = options.barThickness === 'flex'\n ? computeFlexCategoryTraits(index, ruler, options, stackCount)\n : computeFitCategoryTraits(index, ruler, options, stackCount);\n\n const stackIndex = this._getStackIndex(this.index, this._cachedMeta.stack, skipNull ? index : undefined);\n center = range.start + (range.chunk * stackIndex) + (range.chunk / 2);\n size = Math.min(maxBarThickness, range.chunk * range.ratio);\n } else {\n // For non-grouped bar charts, exact pixel values are used\n center = scale.getPixelForValue(this.getParsed(index)[scale.axis], index);\n size = Math.min(maxBarThickness, ruler.min * ruler.ratio);\n }\n\n return {\n base: center - size / 2,\n head: center + size / 2,\n center,\n size\n };\n }\n\n draw() {\n const meta = this._cachedMeta;\n const vScale = meta.vScale;\n const rects = meta.data;\n const ilen = rects.length;\n let i = 0;\n\n for (; i < ilen; ++i) {\n if (this.getParsed(i)[vScale.axis] !== null) {\n rects[i].draw(this._ctx);\n }\n }\n }\n\n}\n","import DatasetController from '../core/core.datasetController.js';\nimport {isObject, resolveObjectKey, toPercentage, toDimension, valueOrDefault} from '../helpers/helpers.core.js';\nimport {formatNumber} from '../helpers/helpers.intl.js';\nimport {toRadians, PI, TAU, HALF_PI, _angleBetween} from '../helpers/helpers.math.js';\n\n/**\n * @typedef { import('../core/core.controller.js').default } Chart\n */\n\nfunction getRatioAndOffset(rotation, circumference, cutout) {\n let ratioX = 1;\n let ratioY = 1;\n let offsetX = 0;\n let offsetY = 0;\n // If the chart's circumference isn't a full circle, calculate size as a ratio of the width/height of the arc\n if (circumference < TAU) {\n const startAngle = rotation;\n const endAngle = startAngle + circumference;\n const startX = Math.cos(startAngle);\n const startY = Math.sin(startAngle);\n const endX = Math.cos(endAngle);\n const endY = Math.sin(endAngle);\n const calcMax = (angle, a, b) => _angleBetween(angle, startAngle, endAngle, true) ? 1 : Math.max(a, a * cutout, b, b * cutout);\n const calcMin = (angle, a, b) => _angleBetween(angle, startAngle, endAngle, true) ? -1 : Math.min(a, a * cutout, b, b * cutout);\n const maxX = calcMax(0, startX, endX);\n const maxY = calcMax(HALF_PI, startY, endY);\n const minX = calcMin(PI, startX, endX);\n const minY = calcMin(PI + HALF_PI, startY, endY);\n ratioX = (maxX - minX) / 2;\n ratioY = (maxY - minY) / 2;\n offsetX = -(maxX + minX) / 2;\n offsetY = -(maxY + minY) / 2;\n }\n return {ratioX, ratioY, offsetX, offsetY};\n}\n\nexport default class DoughnutController extends DatasetController {\n\n static id = 'doughnut';\n\n /**\n * @type {any}\n */\n static defaults = {\n datasetElementType: false,\n dataElementType: 'arc',\n animation: {\n // Boolean - Whether we animate the rotation of the Doughnut\n animateRotate: true,\n // Boolean - Whether we animate scaling the Doughnut from the centre\n animateScale: false\n },\n animations: {\n numbers: {\n type: 'number',\n properties: ['circumference', 'endAngle', 'innerRadius', 'outerRadius', 'startAngle', 'x', 'y', 'offset', 'borderWidth', 'spacing']\n },\n },\n // The percentage of the chart that we cut out of the middle.\n cutout: '50%',\n\n // The rotation of the chart, where the first data arc begins.\n rotation: 0,\n\n // The total circumference of the chart.\n circumference: 360,\n\n // The outer radius of the chart\n radius: '100%',\n\n // Spacing between arcs\n spacing: 0,\n\n indexAxis: 'r',\n };\n\n static descriptors = {\n _scriptable: (name) => name !== 'spacing',\n _indexable: (name) => name !== 'spacing' && !name.startsWith('borderDash') && !name.startsWith('hoverBorderDash'),\n };\n\n /**\n * @type {any}\n */\n static overrides = {\n aspectRatio: 1,\n\n // Need to override these to give a nice default\n plugins: {\n legend: {\n labels: {\n generateLabels(chart) {\n const data = chart.data;\n if (data.labels.length && data.datasets.length) {\n const {labels: {pointStyle, color}} = chart.legend.options;\n\n return data.labels.map((label, i) => {\n const meta = chart.getDatasetMeta(0);\n const style = meta.controller.getStyle(i);\n\n return {\n text: label,\n fillStyle: style.backgroundColor,\n strokeStyle: style.borderColor,\n fontColor: color,\n lineWidth: style.borderWidth,\n pointStyle: pointStyle,\n hidden: !chart.getDataVisibility(i),\n\n // Extra data used for toggling the correct item\n index: i\n };\n });\n }\n return [];\n }\n },\n\n onClick(e, legendItem, legend) {\n legend.chart.toggleDataVisibility(legendItem.index);\n legend.chart.update();\n }\n }\n }\n };\n\n constructor(chart, datasetIndex) {\n super(chart, datasetIndex);\n\n this.enableOptionSharing = true;\n this.innerRadius = undefined;\n this.outerRadius = undefined;\n this.offsetX = undefined;\n this.offsetY = undefined;\n }\n\n linkScales() {}\n\n /**\n\t * Override data parsing, since we are not using scales\n\t */\n parse(start, count) {\n const data = this.getDataset().data;\n const meta = this._cachedMeta;\n\n if (this._parsing === false) {\n meta._parsed = data;\n } else {\n let getter = (i) => +data[i];\n\n if (isObject(data[start])) {\n const {key = 'value'} = this._parsing;\n getter = (i) => +resolveObjectKey(data[i], key);\n }\n\n let i, ilen;\n for (i = start, ilen = start + count; i < ilen; ++i) {\n meta._parsed[i] = getter(i);\n }\n }\n }\n\n /**\n\t * @private\n\t */\n _getRotation() {\n return toRadians(this.options.rotation - 90);\n }\n\n /**\n\t * @private\n\t */\n _getCircumference() {\n return toRadians(this.options.circumference);\n }\n\n /**\n\t * Get the maximal rotation & circumference extents\n\t * across all visible datasets.\n\t */\n _getRotationExtents() {\n let min = TAU;\n let max = -TAU;\n\n for (let i = 0; i < this.chart.data.datasets.length; ++i) {\n if (this.chart.isDatasetVisible(i) && this.chart.getDatasetMeta(i).type === this._type) {\n const controller = this.chart.getDatasetMeta(i).controller;\n const rotation = controller._getRotation();\n const circumference = controller._getCircumference();\n\n min = Math.min(min, rotation);\n max = Math.max(max, rotation + circumference);\n }\n }\n\n return {\n rotation: min,\n circumference: max - min,\n };\n }\n\n /**\n\t * @param {string} mode\n\t */\n update(mode) {\n const chart = this.chart;\n const {chartArea} = chart;\n const meta = this._cachedMeta;\n const arcs = meta.data;\n const spacing = this.getMaxBorderWidth() + this.getMaxOffset(arcs) + this.options.spacing;\n const maxSize = Math.max((Math.min(chartArea.width, chartArea.height) - spacing) / 2, 0);\n const cutout = Math.min(toPercentage(this.options.cutout, maxSize), 1);\n const chartWeight = this._getRingWeight(this.index);\n\n // Compute the maximal rotation & circumference limits.\n // If we only consider our dataset, this can cause problems when two datasets\n // are both less than a circle with different rotations (starting angles)\n const {circumference, rotation} = this._getRotationExtents();\n const {ratioX, ratioY, offsetX, offsetY} = getRatioAndOffset(rotation, circumference, cutout);\n const maxWidth = (chartArea.width - spacing) / ratioX;\n const maxHeight = (chartArea.height - spacing) / ratioY;\n const maxRadius = Math.max(Math.min(maxWidth, maxHeight) / 2, 0);\n const outerRadius = toDimension(this.options.radius, maxRadius);\n const innerRadius = Math.max(outerRadius * cutout, 0);\n const radiusLength = (outerRadius - innerRadius) / this._getVisibleDatasetWeightTotal();\n this.offsetX = offsetX * outerRadius;\n this.offsetY = offsetY * outerRadius;\n\n meta.total = this.calculateTotal();\n\n this.outerRadius = outerRadius - radiusLength * this._getRingWeightOffset(this.index);\n this.innerRadius = Math.max(this.outerRadius - radiusLength * chartWeight, 0);\n\n this.updateElements(arcs, 0, arcs.length, mode);\n }\n\n /**\n * @private\n */\n _circumference(i, reset) {\n const opts = this.options;\n const meta = this._cachedMeta;\n const circumference = this._getCircumference();\n if ((reset && opts.animation.animateRotate) || !this.chart.getDataVisibility(i) || meta._parsed[i] === null || meta.data[i].hidden) {\n return 0;\n }\n return this.calculateCircumference(meta._parsed[i] * circumference / TAU);\n }\n\n updateElements(arcs, start, count, mode) {\n const reset = mode === 'reset';\n const chart = this.chart;\n const chartArea = chart.chartArea;\n const opts = chart.options;\n const animationOpts = opts.animation;\n const centerX = (chartArea.left + chartArea.right) / 2;\n const centerY = (chartArea.top + chartArea.bottom) / 2;\n const animateScale = reset && animationOpts.animateScale;\n const innerRadius = animateScale ? 0 : this.innerRadius;\n const outerRadius = animateScale ? 0 : this.outerRadius;\n const {sharedOptions, includeOptions} = this._getSharedOptions(start, mode);\n let startAngle = this._getRotation();\n let i;\n\n for (i = 0; i < start; ++i) {\n startAngle += this._circumference(i, reset);\n }\n\n for (i = start; i < start + count; ++i) {\n const circumference = this._circumference(i, reset);\n const arc = arcs[i];\n const properties = {\n x: centerX + this.offsetX,\n y: centerY + this.offsetY,\n startAngle,\n endAngle: startAngle + circumference,\n circumference,\n outerRadius,\n innerRadius\n };\n if (includeOptions) {\n properties.options = sharedOptions || this.resolveDataElementOptions(i, arc.active ? 'active' : mode);\n }\n startAngle += circumference;\n\n this.updateElement(arc, i, properties, mode);\n }\n }\n\n calculateTotal() {\n const meta = this._cachedMeta;\n const metaData = meta.data;\n let total = 0;\n let i;\n\n for (i = 0; i < metaData.length; i++) {\n const value = meta._parsed[i];\n if (value !== null && !isNaN(value) && this.chart.getDataVisibility(i) && !metaData[i].hidden) {\n total += Math.abs(value);\n }\n }\n\n return total;\n }\n\n calculateCircumference(value) {\n const total = this._cachedMeta.total;\n if (total > 0 && !isNaN(value)) {\n return TAU * (Math.abs(value) / total);\n }\n return 0;\n }\n\n getLabelAndValue(index) {\n const meta = this._cachedMeta;\n const chart = this.chart;\n const labels = chart.data.labels || [];\n const value = formatNumber(meta._parsed[index], chart.options.locale);\n\n return {\n label: labels[index] || '',\n value,\n };\n }\n\n getMaxBorderWidth(arcs) {\n let max = 0;\n const chart = this.chart;\n let i, ilen, meta, controller, options;\n\n if (!arcs) {\n // Find the outmost visible dataset\n for (i = 0, ilen = chart.data.datasets.length; i < ilen; ++i) {\n if (chart.isDatasetVisible(i)) {\n meta = chart.getDatasetMeta(i);\n arcs = meta.data;\n controller = meta.controller;\n break;\n }\n }\n }\n\n if (!arcs) {\n return 0;\n }\n\n for (i = 0, ilen = arcs.length; i < ilen; ++i) {\n options = controller.resolveDataElementOptions(i);\n if (options.borderAlign !== 'inner') {\n max = Math.max(max, options.borderWidth || 0, options.hoverBorderWidth || 0);\n }\n }\n return max;\n }\n\n getMaxOffset(arcs) {\n let max = 0;\n\n for (let i = 0, ilen = arcs.length; i < ilen; ++i) {\n const options = this.resolveDataElementOptions(i);\n max = Math.max(max, options.offset || 0, options.hoverOffset || 0);\n }\n return max;\n }\n\n /**\n\t * Get radius length offset of the dataset in relation to the visible datasets weights. This allows determining the inner and outer radius correctly\n\t * @private\n\t */\n _getRingWeightOffset(datasetIndex) {\n let ringWeightOffset = 0;\n\n for (let i = 0; i < datasetIndex; ++i) {\n if (this.chart.isDatasetVisible(i)) {\n ringWeightOffset += this._getRingWeight(i);\n }\n }\n\n return ringWeightOffset;\n }\n\n /**\n\t * @private\n\t */\n _getRingWeight(datasetIndex) {\n return Math.max(valueOrDefault(this.chart.data.datasets[datasetIndex].weight, 1), 0);\n }\n\n /**\n\t * Returns the sum of all visible data set weights.\n\t * @private\n\t */\n _getVisibleDatasetWeightTotal() {\n return this._getRingWeightOffset(this.chart.data.datasets.length) || 1;\n }\n}\n","import DatasetController from '../core/core.datasetController.js';\nimport {toRadians, PI, formatNumber, _parseObjectDataRadialScale} from '../helpers/index.js';\n\nexport default class PolarAreaController extends DatasetController {\n\n static id = 'polarArea';\n\n /**\n * @type {any}\n */\n static defaults = {\n dataElementType: 'arc',\n animation: {\n animateRotate: true,\n animateScale: true\n },\n animations: {\n numbers: {\n type: 'number',\n properties: ['x', 'y', 'startAngle', 'endAngle', 'innerRadius', 'outerRadius']\n },\n },\n indexAxis: 'r',\n startAngle: 0,\n };\n\n /**\n * @type {any}\n */\n static overrides = {\n aspectRatio: 1,\n\n plugins: {\n legend: {\n labels: {\n generateLabels(chart) {\n const data = chart.data;\n if (data.labels.length && data.datasets.length) {\n const {labels: {pointStyle, color}} = chart.legend.options;\n\n return data.labels.map((label, i) => {\n const meta = chart.getDatasetMeta(0);\n const style = meta.controller.getStyle(i);\n\n return {\n text: label,\n fillStyle: style.backgroundColor,\n strokeStyle: style.borderColor,\n fontColor: color,\n lineWidth: style.borderWidth,\n pointStyle: pointStyle,\n hidden: !chart.getDataVisibility(i),\n\n // Extra data used for toggling the correct item\n index: i\n };\n });\n }\n return [];\n }\n },\n\n onClick(e, legendItem, legend) {\n legend.chart.toggleDataVisibility(legendItem.index);\n legend.chart.update();\n }\n }\n },\n\n scales: {\n r: {\n type: 'radialLinear',\n angleLines: {\n display: false\n },\n beginAtZero: true,\n grid: {\n circular: true\n },\n pointLabels: {\n display: false\n },\n startAngle: 0\n }\n }\n };\n\n constructor(chart, datasetIndex) {\n super(chart, datasetIndex);\n\n this.innerRadius = undefined;\n this.outerRadius = undefined;\n }\n\n getLabelAndValue(index) {\n const meta = this._cachedMeta;\n const chart = this.chart;\n const labels = chart.data.labels || [];\n const value = formatNumber(meta._parsed[index].r, chart.options.locale);\n\n return {\n label: labels[index] || '',\n value,\n };\n }\n\n parseObjectData(meta, data, start, count) {\n return _parseObjectDataRadialScale.bind(this)(meta, data, start, count);\n }\n\n update(mode) {\n const arcs = this._cachedMeta.data;\n\n this._updateRadius();\n this.updateElements(arcs, 0, arcs.length, mode);\n }\n\n /**\n * @protected\n */\n getMinMax() {\n const meta = this._cachedMeta;\n const range = {min: Number.POSITIVE_INFINITY, max: Number.NEGATIVE_INFINITY};\n\n meta.data.forEach((element, index) => {\n const parsed = this.getParsed(index).r;\n\n if (!isNaN(parsed) && this.chart.getDataVisibility(index)) {\n if (parsed < range.min) {\n range.min = parsed;\n }\n\n if (parsed > range.max) {\n range.max = parsed;\n }\n }\n });\n\n return range;\n }\n\n /**\n\t * @private\n\t */\n _updateRadius() {\n const chart = this.chart;\n const chartArea = chart.chartArea;\n const opts = chart.options;\n const minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top);\n\n const outerRadius = Math.max(minSize / 2, 0);\n const innerRadius = Math.max(opts.cutoutPercentage ? (outerRadius / 100) * (opts.cutoutPercentage) : 1, 0);\n const radiusLength = (outerRadius - innerRadius) / chart.getVisibleDatasetCount();\n\n this.outerRadius = outerRadius - (radiusLength * this.index);\n this.innerRadius = this.outerRadius - radiusLength;\n }\n\n updateElements(arcs, start, count, mode) {\n const reset = mode === 'reset';\n const chart = this.chart;\n const opts = chart.options;\n const animationOpts = opts.animation;\n const scale = this._cachedMeta.rScale;\n const centerX = scale.xCenter;\n const centerY = scale.yCenter;\n const datasetStartAngle = scale.getIndexAngle(0) - 0.5 * PI;\n let angle = datasetStartAngle;\n let i;\n\n const defaultAngle = 360 / this.countVisibleElements();\n\n for (i = 0; i < start; ++i) {\n angle += this._computeAngle(i, mode, defaultAngle);\n }\n for (i = start; i < start + count; i++) {\n const arc = arcs[i];\n let startAngle = angle;\n let endAngle = angle + this._computeAngle(i, mode, defaultAngle);\n let outerRadius = chart.getDataVisibility(i) ? scale.getDistanceFromCenterForValue(this.getParsed(i).r) : 0;\n angle = endAngle;\n\n if (reset) {\n if (animationOpts.animateScale) {\n outerRadius = 0;\n }\n if (animationOpts.animateRotate) {\n startAngle = endAngle = datasetStartAngle;\n }\n }\n\n const properties = {\n x: centerX,\n y: centerY,\n innerRadius: 0,\n outerRadius,\n startAngle,\n endAngle,\n options: this.resolveDataElementOptions(i, arc.active ? 'active' : mode)\n };\n\n this.updateElement(arc, i, properties, mode);\n }\n }\n\n countVisibleElements() {\n const meta = this._cachedMeta;\n let count = 0;\n\n meta.data.forEach((element, index) => {\n if (!isNaN(this.getParsed(index).r) && this.chart.getDataVisibility(index)) {\n count++;\n }\n });\n\n return count;\n }\n\n /**\n\t * @private\n\t */\n _computeAngle(index, mode, defaultAngle) {\n return this.chart.getDataVisibility(index)\n ? toRadians(this.resolveDataElementOptions(index, mode).angle || defaultAngle)\n : 0;\n }\n}\n","import DatasetController from '../core/core.datasetController.js';\nimport {valueOrDefault} from '../helpers/helpers.core.js';\n\nexport default class BubbleController extends DatasetController {\n\n static id = 'bubble';\n\n /**\n * @type {any}\n */\n static defaults = {\n datasetElementType: false,\n dataElementType: 'point',\n\n animations: {\n numbers: {\n type: 'number',\n properties: ['x', 'y', 'borderWidth', 'radius']\n }\n }\n };\n\n /**\n * @type {any}\n */\n static overrides = {\n scales: {\n x: {\n type: 'linear'\n },\n y: {\n type: 'linear'\n }\n }\n };\n\n initialize() {\n this.enableOptionSharing = true;\n super.initialize();\n }\n\n /**\n\t * Parse array of primitive values\n\t * @protected\n\t */\n parsePrimitiveData(meta, data, start, count) {\n const parsed = super.parsePrimitiveData(meta, data, start, count);\n for (let i = 0; i < parsed.length; i++) {\n parsed[i]._custom = this.resolveDataElementOptions(i + start).radius;\n }\n return parsed;\n }\n\n /**\n\t * Parse array of arrays\n\t * @protected\n\t */\n parseArrayData(meta, data, start, count) {\n const parsed = super.parseArrayData(meta, data, start, count);\n for (let i = 0; i < parsed.length; i++) {\n const item = data[start + i];\n parsed[i]._custom = valueOrDefault(item[2], this.resolveDataElementOptions(i + start).radius);\n }\n return parsed;\n }\n\n /**\n\t * Parse array of objects\n\t * @protected\n\t */\n parseObjectData(meta, data, start, count) {\n const parsed = super.parseObjectData(meta, data, start, count);\n for (let i = 0; i < parsed.length; i++) {\n const item = data[start + i];\n parsed[i]._custom = valueOrDefault(item && item.r && +item.r, this.resolveDataElementOptions(i + start).radius);\n }\n return parsed;\n }\n\n /**\n\t * @protected\n\t */\n getMaxOverflow() {\n const data = this._cachedMeta.data;\n\n let max = 0;\n for (let i = data.length - 1; i >= 0; --i) {\n max = Math.max(max, data[i].size(this.resolveDataElementOptions(i)) / 2);\n }\n return max > 0 && max;\n }\n\n /**\n\t * @protected\n\t */\n getLabelAndValue(index) {\n const meta = this._cachedMeta;\n const labels = this.chart.data.labels || [];\n const {xScale, yScale} = meta;\n const parsed = this.getParsed(index);\n const x = xScale.getLabelForValue(parsed.x);\n const y = yScale.getLabelForValue(parsed.y);\n const r = parsed._custom;\n\n return {\n label: labels[index] || '',\n value: '(' + x + ', ' + y + (r ? ', ' + r : '') + ')'\n };\n }\n\n update(mode) {\n const points = this._cachedMeta.data;\n\n // Update Points\n this.updateElements(points, 0, points.length, mode);\n }\n\n updateElements(points, start, count, mode) {\n const reset = mode === 'reset';\n const {iScale, vScale} = this._cachedMeta;\n const {sharedOptions, includeOptions} = this._getSharedOptions(start, mode);\n const iAxis = iScale.axis;\n const vAxis = vScale.axis;\n\n for (let i = start; i < start + count; i++) {\n const point = points[i];\n const parsed = !reset && this.getParsed(i);\n const properties = {};\n const iPixel = properties[iAxis] = reset ? iScale.getPixelForDecimal(0.5) : iScale.getPixelForValue(parsed[iAxis]);\n const vPixel = properties[vAxis] = reset ? vScale.getBasePixel() : vScale.getPixelForValue(parsed[vAxis]);\n\n properties.skip = isNaN(iPixel) || isNaN(vPixel);\n\n if (includeOptions) {\n properties.options = sharedOptions || this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n\n if (reset) {\n properties.options.radius = 0;\n }\n }\n\n this.updateElement(point, i, properties, mode);\n }\n }\n\n /**\n\t * @param {number} index\n\t * @param {string} [mode]\n\t * @protected\n\t */\n resolveDataElementOptions(index, mode) {\n const parsed = this.getParsed(index);\n let values = super.resolveDataElementOptions(index, mode);\n\n // In case values were cached (and thus frozen), we need to clone the values\n if (values.$shared) {\n values = Object.assign({}, values, {$shared: false});\n }\n\n // Custom radius resolution\n const radius = values.radius;\n if (mode !== 'active') {\n values.radius = 0;\n }\n values.radius += valueOrDefault(parsed && parsed._custom, radius);\n\n return values;\n }\n}\n","import DatasetController from '../core/core.datasetController.js';\nimport {isNullOrUndef} from '../helpers/index.js';\nimport {isNumber} from '../helpers/helpers.math.js';\nimport {_getStartAndCountOfVisiblePoints, _scaleRangesChanged} from '../helpers/helpers.extras.js';\n\nexport default class LineController extends DatasetController {\n\n static id = 'line';\n\n /**\n * @type {any}\n */\n static defaults = {\n datasetElementType: 'line',\n dataElementType: 'point',\n\n showLine: true,\n spanGaps: false,\n };\n\n /**\n * @type {any}\n */\n static overrides = {\n scales: {\n _index_: {\n type: 'category',\n },\n _value_: {\n type: 'linear',\n },\n }\n };\n\n initialize() {\n this.enableOptionSharing = true;\n this.supportsDecimation = true;\n super.initialize();\n }\n\n update(mode) {\n const meta = this._cachedMeta;\n const {dataset: line, data: points = [], _dataset} = meta;\n // @ts-ignore\n const animationsDisabled = this.chart._animationsDisabled;\n let {start, count} = _getStartAndCountOfVisiblePoints(meta, points, animationsDisabled);\n\n this._drawStart = start;\n this._drawCount = count;\n\n if (_scaleRangesChanged(meta)) {\n start = 0;\n count = points.length;\n }\n\n // Update Line\n line._chart = this.chart;\n line._datasetIndex = this.index;\n line._decimated = !!_dataset._decimated;\n line.points = points;\n\n const options = this.resolveDatasetElementOptions(mode);\n if (!this.options.showLine) {\n options.borderWidth = 0;\n }\n options.segment = this.options.segment;\n this.updateElement(line, undefined, {\n animated: !animationsDisabled,\n options\n }, mode);\n\n // Update Points\n this.updateElements(points, start, count, mode);\n }\n\n updateElements(points, start, count, mode) {\n const reset = mode === 'reset';\n const {iScale, vScale, _stacked, _dataset} = this._cachedMeta;\n const {sharedOptions, includeOptions} = this._getSharedOptions(start, mode);\n const iAxis = iScale.axis;\n const vAxis = vScale.axis;\n const {spanGaps, segment} = this.options;\n const maxGapLength = isNumber(spanGaps) ? spanGaps : Number.POSITIVE_INFINITY;\n const directUpdate = this.chart._animationsDisabled || reset || mode === 'none';\n const end = start + count;\n const pointsCount = points.length;\n let prevParsed = start > 0 && this.getParsed(start - 1);\n\n for (let i = 0; i < pointsCount; ++i) {\n const point = points[i];\n const properties = directUpdate ? point : {};\n\n if (i < start || i >= end) {\n properties.skip = true;\n continue;\n }\n\n const parsed = this.getParsed(i);\n const nullData = isNullOrUndef(parsed[vAxis]);\n const iPixel = properties[iAxis] = iScale.getPixelForValue(parsed[iAxis], i);\n const vPixel = properties[vAxis] = reset || nullData ? vScale.getBasePixel() : vScale.getPixelForValue(_stacked ? this.applyStack(vScale, parsed, _stacked) : parsed[vAxis], i);\n\n properties.skip = isNaN(iPixel) || isNaN(vPixel) || nullData;\n properties.stop = i > 0 && (Math.abs(parsed[iAxis] - prevParsed[iAxis])) > maxGapLength;\n if (segment) {\n properties.parsed = parsed;\n properties.raw = _dataset.data[i];\n }\n\n if (includeOptions) {\n properties.options = sharedOptions || this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n }\n\n if (!directUpdate) {\n this.updateElement(point, i, properties, mode);\n }\n\n prevParsed = parsed;\n }\n }\n\n /**\n\t * @protected\n\t */\n getMaxOverflow() {\n const meta = this._cachedMeta;\n const dataset = meta.dataset;\n const border = dataset.options && dataset.options.borderWidth || 0;\n const data = meta.data || [];\n if (!data.length) {\n return border;\n }\n const firstPoint = data[0].size(this.resolveDataElementOptions(0));\n const lastPoint = data[data.length - 1].size(this.resolveDataElementOptions(data.length - 1));\n return Math.max(border, firstPoint, lastPoint) / 2;\n }\n\n draw() {\n const meta = this._cachedMeta;\n meta.dataset.updateControlPoints(this.chart.chartArea, meta.iScale.axis);\n super.draw();\n }\n}\n","import DoughnutController from './controller.doughnut.js';\n\n// Pie charts are Doughnut chart with different defaults\nexport default class PieController extends DoughnutController {\n\n static id = 'pie';\n\n /**\n * @type {any}\n */\n static defaults = {\n // The percentage of the chart that we cut out of the middle.\n cutout: 0,\n\n // The rotation of the chart, where the first data arc begins.\n rotation: 0,\n\n // The total circumference of the chart.\n circumference: 360,\n\n // The outer radius of the chart\n radius: '100%'\n };\n}\n","import DatasetController from '../core/core.datasetController.js';\nimport {_parseObjectDataRadialScale} from '../helpers/index.js';\n\nexport default class RadarController extends DatasetController {\n\n static id = 'radar';\n\n /**\n * @type {any}\n */\n static defaults = {\n datasetElementType: 'line',\n dataElementType: 'point',\n indexAxis: 'r',\n showLine: true,\n elements: {\n line: {\n fill: 'start'\n }\n },\n };\n\n /**\n * @type {any}\n */\n static overrides = {\n aspectRatio: 1,\n\n scales: {\n r: {\n type: 'radialLinear',\n }\n }\n };\n\n /**\n\t * @protected\n\t */\n getLabelAndValue(index) {\n const vScale = this._cachedMeta.vScale;\n const parsed = this.getParsed(index);\n\n return {\n label: vScale.getLabels()[index],\n value: '' + vScale.getLabelForValue(parsed[vScale.axis])\n };\n }\n\n parseObjectData(meta, data, start, count) {\n return _parseObjectDataRadialScale.bind(this)(meta, data, start, count);\n }\n\n update(mode) {\n const meta = this._cachedMeta;\n const line = meta.dataset;\n const points = meta.data || [];\n const labels = meta.iScale.getLabels();\n\n // Update Line\n line.points = points;\n // In resize mode only point locations change, so no need to set the points or options.\n if (mode !== 'resize') {\n const options = this.resolveDatasetElementOptions(mode);\n if (!this.options.showLine) {\n options.borderWidth = 0;\n }\n\n const properties = {\n _loop: true,\n _fullLoop: labels.length === points.length,\n options\n };\n\n this.updateElement(line, undefined, properties, mode);\n }\n\n // Update Points\n this.updateElements(points, 0, points.length, mode);\n }\n\n updateElements(points, start, count, mode) {\n const scale = this._cachedMeta.rScale;\n const reset = mode === 'reset';\n\n for (let i = start; i < start + count; i++) {\n const point = points[i];\n const options = this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n const pointPosition = scale.getPointPositionForValue(i, this.getParsed(i).r);\n\n const x = reset ? scale.xCenter : pointPosition.x;\n const y = reset ? scale.yCenter : pointPosition.y;\n\n const properties = {\n x,\n y,\n angle: pointPosition.angle,\n skip: isNaN(x) || isNaN(y),\n options\n };\n\n this.updateElement(point, i, properties, mode);\n }\n }\n}\n","import DatasetController from '../core/core.datasetController.js';\nimport {isNullOrUndef} from '../helpers/index.js';\nimport {isNumber} from '../helpers/helpers.math.js';\nimport {_getStartAndCountOfVisiblePoints, _scaleRangesChanged} from '../helpers/helpers.extras.js';\n\nexport default class ScatterController extends DatasetController {\n\n static id = 'scatter';\n\n /**\n * @type {any}\n */\n static defaults = {\n datasetElementType: false,\n dataElementType: 'point',\n showLine: false,\n fill: false\n };\n\n /**\n * @type {any}\n */\n static overrides = {\n\n interaction: {\n mode: 'point'\n },\n\n scales: {\n x: {\n type: 'linear'\n },\n y: {\n type: 'linear'\n }\n }\n };\n\n /**\n\t * @protected\n\t */\n getLabelAndValue(index) {\n const meta = this._cachedMeta;\n const labels = this.chart.data.labels || [];\n const {xScale, yScale} = meta;\n const parsed = this.getParsed(index);\n const x = xScale.getLabelForValue(parsed.x);\n const y = yScale.getLabelForValue(parsed.y);\n\n return {\n label: labels[index] || '',\n value: '(' + x + ', ' + y + ')'\n };\n }\n\n update(mode) {\n const meta = this._cachedMeta;\n const {data: points = []} = meta;\n // @ts-ignore\n const animationsDisabled = this.chart._animationsDisabled;\n let {start, count} = _getStartAndCountOfVisiblePoints(meta, points, animationsDisabled);\n\n this._drawStart = start;\n this._drawCount = count;\n\n if (_scaleRangesChanged(meta)) {\n start = 0;\n count = points.length;\n }\n\n if (this.options.showLine) {\n\n // https://github.com/chartjs/Chart.js/issues/11333\n if (!this.datasetElementType) {\n this.addElements();\n }\n const {dataset: line, _dataset} = meta;\n\n // Update Line\n line._chart = this.chart;\n line._datasetIndex = this.index;\n line._decimated = !!_dataset._decimated;\n line.points = points;\n\n const options = this.resolveDatasetElementOptions(mode);\n options.segment = this.options.segment;\n this.updateElement(line, undefined, {\n animated: !animationsDisabled,\n options\n }, mode);\n } else if (this.datasetElementType) {\n // https://github.com/chartjs/Chart.js/issues/11333\n delete meta.dataset;\n this.datasetElementType = false;\n }\n\n // Update Points\n this.updateElements(points, start, count, mode);\n }\n\n addElements() {\n const {showLine} = this.options;\n\n if (!this.datasetElementType && showLine) {\n this.datasetElementType = this.chart.registry.getElement('line');\n }\n\n super.addElements();\n }\n\n updateElements(points, start, count, mode) {\n const reset = mode === 'reset';\n const {iScale, vScale, _stacked, _dataset} = this._cachedMeta;\n const firstOpts = this.resolveDataElementOptions(start, mode);\n const sharedOptions = this.getSharedOptions(firstOpts);\n const includeOptions = this.includeOptions(mode, sharedOptions);\n const iAxis = iScale.axis;\n const vAxis = vScale.axis;\n const {spanGaps, segment} = this.options;\n const maxGapLength = isNumber(spanGaps) ? spanGaps : Number.POSITIVE_INFINITY;\n const directUpdate = this.chart._animationsDisabled || reset || mode === 'none';\n let prevParsed = start > 0 && this.getParsed(start - 1);\n\n for (let i = start; i < start + count; ++i) {\n const point = points[i];\n const parsed = this.getParsed(i);\n const properties = directUpdate ? point : {};\n const nullData = isNullOrUndef(parsed[vAxis]);\n const iPixel = properties[iAxis] = iScale.getPixelForValue(parsed[iAxis], i);\n const vPixel = properties[vAxis] = reset || nullData ? vScale.getBasePixel() : vScale.getPixelForValue(_stacked ? this.applyStack(vScale, parsed, _stacked) : parsed[vAxis], i);\n\n properties.skip = isNaN(iPixel) || isNaN(vPixel) || nullData;\n properties.stop = i > 0 && (Math.abs(parsed[iAxis] - prevParsed[iAxis])) > maxGapLength;\n if (segment) {\n properties.parsed = parsed;\n properties.raw = _dataset.data[i];\n }\n\n if (includeOptions) {\n properties.options = sharedOptions || this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n }\n\n if (!directUpdate) {\n this.updateElement(point, i, properties, mode);\n }\n\n prevParsed = parsed;\n }\n\n this.updateSharedOptions(sharedOptions, mode, firstOpts);\n }\n\n /**\n\t * @protected\n\t */\n getMaxOverflow() {\n const meta = this._cachedMeta;\n const data = meta.data || [];\n\n if (!this.options.showLine) {\n let max = 0;\n for (let i = data.length - 1; i >= 0; --i) {\n max = Math.max(max, data[i].size(this.resolveDataElementOptions(i)) / 2);\n }\n return max > 0 && max;\n }\n\n const dataset = meta.dataset;\n const border = dataset.options && dataset.options.borderWidth || 0;\n\n if (!data.length) {\n return border;\n }\n\n const firstPoint = data[0].size(this.resolveDataElementOptions(0));\n const lastPoint = data[data.length - 1].size(this.resolveDataElementOptions(data.length - 1));\n return Math.max(border, firstPoint, lastPoint) / 2;\n }\n}\n","import Element from '../core/core.element.js';\nimport {_angleBetween, getAngleFromPoint, TAU, HALF_PI, valueOrDefault} from '../helpers/index.js';\nimport {PI, _isBetween, _limitValue} from '../helpers/helpers.math.js';\nimport {_readValueToProps} from '../helpers/helpers.options.js';\nimport type {ArcOptions, Point} from '../types/index.js';\n\n\nfunction clipArc(ctx: CanvasRenderingContext2D, element: ArcElement, endAngle: number) {\n const {startAngle, pixelMargin, x, y, outerRadius, innerRadius} = element;\n let angleMargin = pixelMargin / outerRadius;\n\n // Draw an inner border by clipping the arc and drawing a double-width border\n // Enlarge the clipping arc by 0.33 pixels to eliminate glitches between borders\n ctx.beginPath();\n ctx.arc(x, y, outerRadius, startAngle - angleMargin, endAngle + angleMargin);\n if (innerRadius > pixelMargin) {\n angleMargin = pixelMargin / innerRadius;\n ctx.arc(x, y, innerRadius, endAngle + angleMargin, startAngle - angleMargin, true);\n } else {\n ctx.arc(x, y, pixelMargin, endAngle + HALF_PI, startAngle - HALF_PI);\n }\n ctx.closePath();\n ctx.clip();\n}\n\nfunction toRadiusCorners(value) {\n return _readValueToProps(value, ['outerStart', 'outerEnd', 'innerStart', 'innerEnd']);\n}\n\n/**\n * Parse border radius from the provided options\n */\nfunction parseBorderRadius(arc: ArcElement, innerRadius: number, outerRadius: number, angleDelta: number) {\n const o = toRadiusCorners(arc.options.borderRadius);\n const halfThickness = (outerRadius - innerRadius) / 2;\n const innerLimit = Math.min(halfThickness, angleDelta * innerRadius / 2);\n\n // Outer limits are complicated. We want to compute the available angular distance at\n // a radius of outerRadius - borderRadius because for small angular distances, this term limits.\n // We compute at r = outerRadius - borderRadius because this circle defines the center of the border corners.\n //\n // If the borderRadius is large, that value can become negative.\n // This causes the outer borders to lose their radius entirely, which is rather unexpected. To solve that, if borderRadius > outerRadius\n // we know that the thickness term will dominate and compute the limits at that point\n const computeOuterLimit = (val) => {\n const outerArcLimit = (outerRadius - Math.min(halfThickness, val)) * angleDelta / 2;\n return _limitValue(val, 0, Math.min(halfThickness, outerArcLimit));\n };\n\n return {\n outerStart: computeOuterLimit(o.outerStart),\n outerEnd: computeOuterLimit(o.outerEnd),\n innerStart: _limitValue(o.innerStart, 0, innerLimit),\n innerEnd: _limitValue(o.innerEnd, 0, innerLimit),\n };\n}\n\n/**\n * Convert (r, 𝜃) to (x, y)\n */\nfunction rThetaToXY(r: number, theta: number, x: number, y: number) {\n return {\n x: x + r * Math.cos(theta),\n y: y + r * Math.sin(theta),\n };\n}\n\n\n/**\n * Path the arc, respecting border radius by separating into left and right halves.\n *\n * Start End\n *\n * 1--->a--->2 Outer\n * / \\\n * 8 3\n * | |\n * | |\n * 7 4\n * \\ /\n * 6<---b<---5 Inner\n */\nfunction pathArc(\n ctx: CanvasRenderingContext2D,\n element: ArcElement,\n offset: number,\n spacing: number,\n end: number,\n circular: boolean,\n) {\n const {x, y, startAngle: start, pixelMargin, innerRadius: innerR} = element;\n\n const outerRadius = Math.max(element.outerRadius + spacing + offset - pixelMargin, 0);\n const innerRadius = innerR > 0 ? innerR + spacing + offset + pixelMargin : 0;\n\n let spacingOffset = 0;\n const alpha = end - start;\n\n if (spacing) {\n // When spacing is present, it is the same for all items\n // So we adjust the start and end angle of the arc such that\n // the distance is the same as it would be without the spacing\n const noSpacingInnerRadius = innerR > 0 ? innerR - spacing : 0;\n const noSpacingOuterRadius = outerRadius > 0 ? outerRadius - spacing : 0;\n const avNogSpacingRadius = (noSpacingInnerRadius + noSpacingOuterRadius) / 2;\n const adjustedAngle = avNogSpacingRadius !== 0 ? (alpha * avNogSpacingRadius) / (avNogSpacingRadius + spacing) : alpha;\n spacingOffset = (alpha - adjustedAngle) / 2;\n }\n\n const beta = Math.max(0.001, alpha * outerRadius - offset / PI) / outerRadius;\n const angleOffset = (alpha - beta) / 2;\n const startAngle = start + angleOffset + spacingOffset;\n const endAngle = end - angleOffset - spacingOffset;\n const {outerStart, outerEnd, innerStart, innerEnd} = parseBorderRadius(element, innerRadius, outerRadius, endAngle - startAngle);\n\n const outerStartAdjustedRadius = outerRadius - outerStart;\n const outerEndAdjustedRadius = outerRadius - outerEnd;\n const outerStartAdjustedAngle = startAngle + outerStart / outerStartAdjustedRadius;\n const outerEndAdjustedAngle = endAngle - outerEnd / outerEndAdjustedRadius;\n\n const innerStartAdjustedRadius = innerRadius + innerStart;\n const innerEndAdjustedRadius = innerRadius + innerEnd;\n const innerStartAdjustedAngle = startAngle + innerStart / innerStartAdjustedRadius;\n const innerEndAdjustedAngle = endAngle - innerEnd / innerEndAdjustedRadius;\n\n ctx.beginPath();\n\n if (circular) {\n // The first arc segments from point 1 to point a to point 2\n const outerMidAdjustedAngle = (outerStartAdjustedAngle + outerEndAdjustedAngle) / 2;\n ctx.arc(x, y, outerRadius, outerStartAdjustedAngle, outerMidAdjustedAngle);\n ctx.arc(x, y, outerRadius, outerMidAdjustedAngle, outerEndAdjustedAngle);\n\n // The corner segment from point 2 to point 3\n if (outerEnd > 0) {\n const pCenter = rThetaToXY(outerEndAdjustedRadius, outerEndAdjustedAngle, x, y);\n ctx.arc(pCenter.x, pCenter.y, outerEnd, outerEndAdjustedAngle, endAngle + HALF_PI);\n }\n\n // The line from point 3 to point 4\n const p4 = rThetaToXY(innerEndAdjustedRadius, endAngle, x, y);\n ctx.lineTo(p4.x, p4.y);\n\n // The corner segment from point 4 to point 5\n if (innerEnd > 0) {\n const pCenter = rThetaToXY(innerEndAdjustedRadius, innerEndAdjustedAngle, x, y);\n ctx.arc(pCenter.x, pCenter.y, innerEnd, endAngle + HALF_PI, innerEndAdjustedAngle + Math.PI);\n }\n\n // The inner arc from point 5 to point b to point 6\n const innerMidAdjustedAngle = ((endAngle - (innerEnd / innerRadius)) + (startAngle + (innerStart / innerRadius))) / 2;\n ctx.arc(x, y, innerRadius, endAngle - (innerEnd / innerRadius), innerMidAdjustedAngle, true);\n ctx.arc(x, y, innerRadius, innerMidAdjustedAngle, startAngle + (innerStart / innerRadius), true);\n\n // The corner segment from point 6 to point 7\n if (innerStart > 0) {\n const pCenter = rThetaToXY(innerStartAdjustedRadius, innerStartAdjustedAngle, x, y);\n ctx.arc(pCenter.x, pCenter.y, innerStart, innerStartAdjustedAngle + Math.PI, startAngle - HALF_PI);\n }\n\n // The line from point 7 to point 8\n const p8 = rThetaToXY(outerStartAdjustedRadius, startAngle, x, y);\n ctx.lineTo(p8.x, p8.y);\n\n // The corner segment from point 8 to point 1\n if (outerStart > 0) {\n const pCenter = rThetaToXY(outerStartAdjustedRadius, outerStartAdjustedAngle, x, y);\n ctx.arc(pCenter.x, pCenter.y, outerStart, startAngle - HALF_PI, outerStartAdjustedAngle);\n }\n } else {\n ctx.moveTo(x, y);\n\n const outerStartX = Math.cos(outerStartAdjustedAngle) * outerRadius + x;\n const outerStartY = Math.sin(outerStartAdjustedAngle) * outerRadius + y;\n ctx.lineTo(outerStartX, outerStartY);\n\n const outerEndX = Math.cos(outerEndAdjustedAngle) * outerRadius + x;\n const outerEndY = Math.sin(outerEndAdjustedAngle) * outerRadius + y;\n ctx.lineTo(outerEndX, outerEndY);\n }\n\n ctx.closePath();\n}\n\nfunction drawArc(\n ctx: CanvasRenderingContext2D,\n element: ArcElement,\n offset: number,\n spacing: number,\n circular: boolean,\n) {\n const {fullCircles, startAngle, circumference} = element;\n let endAngle = element.endAngle;\n if (fullCircles) {\n pathArc(ctx, element, offset, spacing, endAngle, circular);\n for (let i = 0; i < fullCircles; ++i) {\n ctx.fill();\n }\n if (!isNaN(circumference)) {\n endAngle = startAngle + (circumference % TAU || TAU);\n }\n }\n pathArc(ctx, element, offset, spacing, endAngle, circular);\n ctx.fill();\n return endAngle;\n}\n\nfunction drawBorder(\n ctx: CanvasRenderingContext2D,\n element: ArcElement,\n offset: number,\n spacing: number,\n circular: boolean,\n) {\n const {fullCircles, startAngle, circumference, options} = element;\n const {borderWidth, borderJoinStyle, borderDash, borderDashOffset} = options;\n const inner = options.borderAlign === 'inner';\n\n if (!borderWidth) {\n return;\n }\n\n ctx.setLineDash(borderDash || []);\n ctx.lineDashOffset = borderDashOffset;\n\n if (inner) {\n ctx.lineWidth = borderWidth * 2;\n ctx.lineJoin = borderJoinStyle || 'round';\n } else {\n ctx.lineWidth = borderWidth;\n ctx.lineJoin = borderJoinStyle || 'bevel';\n }\n\n let endAngle = element.endAngle;\n if (fullCircles) {\n pathArc(ctx, element, offset, spacing, endAngle, circular);\n for (let i = 0; i < fullCircles; ++i) {\n ctx.stroke();\n }\n if (!isNaN(circumference)) {\n endAngle = startAngle + (circumference % TAU || TAU);\n }\n }\n\n if (inner) {\n clipArc(ctx, element, endAngle);\n }\n\n if (!fullCircles) {\n pathArc(ctx, element, offset, spacing, endAngle, circular);\n ctx.stroke();\n }\n}\n\nexport interface ArcProps extends Point {\n startAngle: number;\n endAngle: number;\n innerRadius: number;\n outerRadius: number;\n circumference: number;\n}\n\nexport default class ArcElement extends Element<ArcProps, ArcOptions> {\n\n static id = 'arc';\n\n static defaults = {\n borderAlign: 'center',\n borderColor: '#fff',\n borderDash: [],\n borderDashOffset: 0,\n borderJoinStyle: undefined,\n borderRadius: 0,\n borderWidth: 2,\n offset: 0,\n spacing: 0,\n angle: undefined,\n circular: true,\n };\n\n static defaultRoutes = {\n backgroundColor: 'backgroundColor'\n };\n\n static descriptors = {\n _scriptable: true,\n _indexable: (name) => name !== 'borderDash'\n };\n\n circumference: number;\n endAngle: number;\n fullCircles: number;\n innerRadius: number;\n outerRadius: number;\n pixelMargin: number;\n startAngle: number;\n\n constructor(cfg) {\n super();\n\n this.options = undefined;\n this.circumference = undefined;\n this.startAngle = undefined;\n this.endAngle = undefined;\n this.innerRadius = undefined;\n this.outerRadius = undefined;\n this.pixelMargin = 0;\n this.fullCircles = 0;\n\n if (cfg) {\n Object.assign(this, cfg);\n }\n }\n\n inRange(chartX: number, chartY: number, useFinalPosition: boolean) {\n const point = this.getProps(['x', 'y'], useFinalPosition);\n const {angle, distance} = getAngleFromPoint(point, {x: chartX, y: chartY});\n const {startAngle, endAngle, innerRadius, outerRadius, circumference} = this.getProps([\n 'startAngle',\n 'endAngle',\n 'innerRadius',\n 'outerRadius',\n 'circumference'\n ], useFinalPosition);\n const rAdjust = (this.options.spacing + this.options.borderWidth) / 2;\n const _circumference = valueOrDefault(circumference, endAngle - startAngle);\n const betweenAngles = _circumference >= TAU || _angleBetween(angle, startAngle, endAngle);\n const withinRadius = _isBetween(distance, innerRadius + rAdjust, outerRadius + rAdjust);\n\n return (betweenAngles && withinRadius);\n }\n\n getCenterPoint(useFinalPosition: boolean) {\n const {x, y, startAngle, endAngle, innerRadius, outerRadius} = this.getProps([\n 'x',\n 'y',\n 'startAngle',\n 'endAngle',\n 'innerRadius',\n 'outerRadius'\n ], useFinalPosition);\n const {offset, spacing} = this.options;\n const halfAngle = (startAngle + endAngle) / 2;\n const halfRadius = (innerRadius + outerRadius + spacing + offset) / 2;\n return {\n x: x + Math.cos(halfAngle) * halfRadius,\n y: y + Math.sin(halfAngle) * halfRadius\n };\n }\n\n tooltipPosition(useFinalPosition: boolean) {\n return this.getCenterPoint(useFinalPosition);\n }\n\n draw(ctx: CanvasRenderingContext2D) {\n const {options, circumference} = this;\n const offset = (options.offset || 0) / 4;\n const spacing = (options.spacing || 0) / 2;\n const circular = options.circular;\n this.pixelMargin = (options.borderAlign === 'inner') ? 0.33 : 0;\n this.fullCircles = circumference > TAU ? Math.floor(circumference / TAU) : 0;\n\n if (circumference === 0 || this.innerRadius < 0 || this.outerRadius < 0) {\n return;\n }\n\n ctx.save();\n\n const halfAngle = (this.startAngle + this.endAngle) / 2;\n ctx.translate(Math.cos(halfAngle) * offset, Math.sin(halfAngle) * offset);\n const fix = 1 - Math.sin(Math.min(PI, circumference || 0));\n const radiusOffset = offset * fix;\n\n ctx.fillStyle = options.backgroundColor;\n ctx.strokeStyle = options.borderColor;\n\n drawArc(ctx, this, radiusOffset, spacing, circular);\n drawBorder(ctx, this, radiusOffset, spacing, circular);\n\n ctx.restore();\n }\n}\n","import Element from '../core/core.element.js';\nimport {_bezierInterpolation, _pointInLine, _steppedInterpolation} from '../helpers/helpers.interpolation.js';\nimport {_computeSegments, _boundSegments} from '../helpers/helpers.segment.js';\nimport {_steppedLineTo, _bezierCurveTo} from '../helpers/helpers.canvas.js';\nimport {_updateBezierControlPoints} from '../helpers/helpers.curve.js';\nimport {valueOrDefault} from '../helpers/index.js';\n\n/**\n * @typedef { import('./element.point.js').default } PointElement\n */\n\nfunction setStyle(ctx, options, style = options) {\n ctx.lineCap = valueOrDefault(style.borderCapStyle, options.borderCapStyle);\n ctx.setLineDash(valueOrDefault(style.borderDash, options.borderDash));\n ctx.lineDashOffset = valueOrDefault(style.borderDashOffset, options.borderDashOffset);\n ctx.lineJoin = valueOrDefault(style.borderJoinStyle, options.borderJoinStyle);\n ctx.lineWidth = valueOrDefault(style.borderWidth, options.borderWidth);\n ctx.strokeStyle = valueOrDefault(style.borderColor, options.borderColor);\n}\n\nfunction lineTo(ctx, previous, target) {\n ctx.lineTo(target.x, target.y);\n}\n\n/**\n * @returns {any}\n */\nfunction getLineMethod(options) {\n if (options.stepped) {\n return _steppedLineTo;\n }\n\n if (options.tension || options.cubicInterpolationMode === 'monotone') {\n return _bezierCurveTo;\n }\n\n return lineTo;\n}\n\nfunction pathVars(points, segment, params = {}) {\n const count = points.length;\n const {start: paramsStart = 0, end: paramsEnd = count - 1} = params;\n const {start: segmentStart, end: segmentEnd} = segment;\n const start = Math.max(paramsStart, segmentStart);\n const end = Math.min(paramsEnd, segmentEnd);\n const outside = paramsStart < segmentStart && paramsEnd < segmentStart || paramsStart > segmentEnd && paramsEnd > segmentEnd;\n\n return {\n count,\n start,\n loop: segment.loop,\n ilen: end < start && !outside ? count + end - start : end - start\n };\n}\n\n/**\n * Create path from points, grouping by truncated x-coordinate\n * Points need to be in order by x-coordinate for this to work efficiently\n * @param {CanvasRenderingContext2D|Path2D} ctx - Context\n * @param {LineElement} line\n * @param {object} segment\n * @param {number} segment.start - start index of the segment, referring the points array\n * @param {number} segment.end - end index of the segment, referring the points array\n * @param {boolean} segment.loop - indicates that the segment is a loop\n * @param {object} params\n * @param {boolean} params.move - move to starting point (vs line to it)\n * @param {boolean} params.reverse - path the segment from end to start\n * @param {number} params.start - limit segment to points starting from `start` index\n * @param {number} params.end - limit segment to points ending at `start` + `count` index\n */\nfunction pathSegment(ctx, line, segment, params) {\n const {points, options} = line;\n const {count, start, loop, ilen} = pathVars(points, segment, params);\n const lineMethod = getLineMethod(options);\n // eslint-disable-next-line prefer-const\n let {move = true, reverse} = params || {};\n let i, point, prev;\n\n for (i = 0; i <= ilen; ++i) {\n point = points[(start + (reverse ? ilen - i : i)) % count];\n\n if (point.skip) {\n // If there is a skipped point inside a segment, spanGaps must be true\n continue;\n } else if (move) {\n ctx.moveTo(point.x, point.y);\n move = false;\n } else {\n lineMethod(ctx, prev, point, reverse, options.stepped);\n }\n\n prev = point;\n }\n\n if (loop) {\n point = points[(start + (reverse ? ilen : 0)) % count];\n lineMethod(ctx, prev, point, reverse, options.stepped);\n }\n\n return !!loop;\n}\n\n/**\n * Create path from points, grouping by truncated x-coordinate\n * Points need to be in order by x-coordinate for this to work efficiently\n * @param {CanvasRenderingContext2D|Path2D} ctx - Context\n * @param {LineElement} line\n * @param {object} segment\n * @param {number} segment.start - start index of the segment, referring the points array\n * @param {number} segment.end - end index of the segment, referring the points array\n * @param {boolean} segment.loop - indicates that the segment is a loop\n * @param {object} params\n * @param {boolean} params.move - move to starting point (vs line to it)\n * @param {boolean} params.reverse - path the segment from end to start\n * @param {number} params.start - limit segment to points starting from `start` index\n * @param {number} params.end - limit segment to points ending at `start` + `count` index\n */\nfunction fastPathSegment(ctx, line, segment, params) {\n const points = line.points;\n const {count, start, ilen} = pathVars(points, segment, params);\n const {move = true, reverse} = params || {};\n let avgX = 0;\n let countX = 0;\n let i, point, prevX, minY, maxY, lastY;\n\n const pointIndex = (index) => (start + (reverse ? ilen - index : index)) % count;\n const drawX = () => {\n if (minY !== maxY) {\n // Draw line to maxY and minY, using the average x-coordinate\n ctx.lineTo(avgX, maxY);\n ctx.lineTo(avgX, minY);\n // Line to y-value of last point in group. So the line continues\n // from correct position. Not using move, to have solid path.\n ctx.lineTo(avgX, lastY);\n }\n };\n\n if (move) {\n point = points[pointIndex(0)];\n ctx.moveTo(point.x, point.y);\n }\n\n for (i = 0; i <= ilen; ++i) {\n point = points[pointIndex(i)];\n\n if (point.skip) {\n // If there is a skipped point inside a segment, spanGaps must be true\n continue;\n }\n\n const x = point.x;\n const y = point.y;\n const truncX = x | 0; // truncated x-coordinate\n\n if (truncX === prevX) {\n // Determine `minY` / `maxY` and `avgX` while we stay within same x-position\n if (y < minY) {\n minY = y;\n } else if (y > maxY) {\n maxY = y;\n }\n // For first point in group, countX is `0`, so average will be `x` / 1.\n avgX = (countX * avgX + x) / ++countX;\n } else {\n drawX();\n // Draw line to next x-position, using the first (or only)\n // y-value in that group\n ctx.lineTo(x, y);\n\n prevX = truncX;\n countX = 0;\n minY = maxY = y;\n }\n // Keep track of the last y-value in group\n lastY = y;\n }\n drawX();\n}\n\n/**\n * @param {LineElement} line - the line\n * @returns {function}\n * @private\n */\nfunction _getSegmentMethod(line) {\n const opts = line.options;\n const borderDash = opts.borderDash && opts.borderDash.length;\n const useFastPath = !line._decimated && !line._loop && !opts.tension && opts.cubicInterpolationMode !== 'monotone' && !opts.stepped && !borderDash;\n return useFastPath ? fastPathSegment : pathSegment;\n}\n\n/**\n * @private\n */\nfunction _getInterpolationMethod(options) {\n if (options.stepped) {\n return _steppedInterpolation;\n }\n\n if (options.tension || options.cubicInterpolationMode === 'monotone') {\n return _bezierInterpolation;\n }\n\n return _pointInLine;\n}\n\nfunction strokePathWithCache(ctx, line, start, count) {\n let path = line._path;\n if (!path) {\n path = line._path = new Path2D();\n if (line.path(path, start, count)) {\n path.closePath();\n }\n }\n setStyle(ctx, line.options);\n ctx.stroke(path);\n}\n\nfunction strokePathDirect(ctx, line, start, count) {\n const {segments, options} = line;\n const segmentMethod = _getSegmentMethod(line);\n\n for (const segment of segments) {\n setStyle(ctx, options, segment.style);\n ctx.beginPath();\n if (segmentMethod(ctx, line, segment, {start, end: start + count - 1})) {\n ctx.closePath();\n }\n ctx.stroke();\n }\n}\n\nconst usePath2D = typeof Path2D === 'function';\n\nfunction draw(ctx, line, start, count) {\n if (usePath2D && !line.options.segment) {\n strokePathWithCache(ctx, line, start, count);\n } else {\n strokePathDirect(ctx, line, start, count);\n }\n}\n\nexport default class LineElement extends Element {\n\n static id = 'line';\n\n /**\n * @type {any}\n */\n static defaults = {\n borderCapStyle: 'butt',\n borderDash: [],\n borderDashOffset: 0,\n borderJoinStyle: 'miter',\n borderWidth: 3,\n capBezierPoints: true,\n cubicInterpolationMode: 'default',\n fill: false,\n spanGaps: false,\n stepped: false,\n tension: 0,\n };\n\n /**\n * @type {any}\n */\n static defaultRoutes = {\n backgroundColor: 'backgroundColor',\n borderColor: 'borderColor'\n };\n\n\n static descriptors = {\n _scriptable: true,\n _indexable: (name) => name !== 'borderDash' && name !== 'fill',\n };\n\n\n constructor(cfg) {\n super();\n\n this.animated = true;\n this.options = undefined;\n this._chart = undefined;\n this._loop = undefined;\n this._fullLoop = undefined;\n this._path = undefined;\n this._points = undefined;\n this._segments = undefined;\n this._decimated = false;\n this._pointsUpdated = false;\n this._datasetIndex = undefined;\n\n if (cfg) {\n Object.assign(this, cfg);\n }\n }\n\n updateControlPoints(chartArea, indexAxis) {\n const options = this.options;\n if ((options.tension || options.cubicInterpolationMode === 'monotone') && !options.stepped && !this._pointsUpdated) {\n const loop = options.spanGaps ? this._loop : this._fullLoop;\n _updateBezierControlPoints(this._points, options, chartArea, loop, indexAxis);\n this._pointsUpdated = true;\n }\n }\n\n set points(points) {\n this._points = points;\n delete this._segments;\n delete this._path;\n this._pointsUpdated = false;\n }\n\n get points() {\n return this._points;\n }\n\n get segments() {\n return this._segments || (this._segments = _computeSegments(this, this.options.segment));\n }\n\n /**\n\t * First non-skipped point on this line\n\t * @returns {PointElement|undefined}\n\t */\n first() {\n const segments = this.segments;\n const points = this.points;\n return segments.length && points[segments[0].start];\n }\n\n /**\n\t * Last non-skipped point on this line\n\t * @returns {PointElement|undefined}\n\t */\n last() {\n const segments = this.segments;\n const points = this.points;\n const count = segments.length;\n return count && points[segments[count - 1].end];\n }\n\n /**\n\t * Interpolate a point in this line at the same value on `property` as\n\t * the reference `point` provided\n\t * @param {PointElement} point - the reference point\n\t * @param {string} property - the property to match on\n\t * @returns {PointElement|undefined}\n\t */\n interpolate(point, property) {\n const options = this.options;\n const value = point[property];\n const points = this.points;\n const segments = _boundSegments(this, {property, start: value, end: value});\n\n if (!segments.length) {\n return;\n }\n\n const result = [];\n const _interpolate = _getInterpolationMethod(options);\n let i, ilen;\n for (i = 0, ilen = segments.length; i < ilen; ++i) {\n const {start, end} = segments[i];\n const p1 = points[start];\n const p2 = points[end];\n if (p1 === p2) {\n result.push(p1);\n continue;\n }\n const t = Math.abs((value - p1[property]) / (p2[property] - p1[property]));\n const interpolated = _interpolate(p1, p2, t, options.stepped);\n interpolated[property] = point[property];\n result.push(interpolated);\n }\n return result.length === 1 ? result[0] : result;\n }\n\n /**\n\t * Append a segment of this line to current path.\n\t * @param {CanvasRenderingContext2D} ctx\n\t * @param {object} segment\n\t * @param {number} segment.start - start index of the segment, referring the points array\n \t * @param {number} segment.end - end index of the segment, referring the points array\n \t * @param {boolean} segment.loop - indicates that the segment is a loop\n\t * @param {object} params\n\t * @param {boolean} params.move - move to starting point (vs line to it)\n\t * @param {boolean} params.reverse - path the segment from end to start\n\t * @param {number} params.start - limit segment to points starting from `start` index\n\t * @param {number} params.end - limit segment to points ending at `start` + `count` index\n\t * @returns {undefined|boolean} - true if the segment is a full loop (path should be closed)\n\t */\n pathSegment(ctx, segment, params) {\n const segmentMethod = _getSegmentMethod(this);\n return segmentMethod(ctx, this, segment, params);\n }\n\n /**\n\t * Append all segments of this line to current path.\n\t * @param {CanvasRenderingContext2D|Path2D} ctx\n\t * @param {number} [start]\n\t * @param {number} [count]\n\t * @returns {undefined|boolean} - true if line is a full loop (path should be closed)\n\t */\n path(ctx, start, count) {\n const segments = this.segments;\n const segmentMethod = _getSegmentMethod(this);\n let loop = this._loop;\n\n start = start || 0;\n count = count || (this.points.length - start);\n\n for (const segment of segments) {\n loop &= segmentMethod(ctx, this, segment, {start, end: start + count - 1});\n }\n return !!loop;\n }\n\n /**\n\t * Draw\n\t * @param {CanvasRenderingContext2D} ctx\n\t * @param {object} chartArea\n\t * @param {number} [start]\n\t * @param {number} [count]\n\t */\n draw(ctx, chartArea, start, count) {\n const options = this.options || {};\n const points = this.points || [];\n\n if (points.length && options.borderWidth) {\n ctx.save();\n\n draw(ctx, this, start, count);\n\n ctx.restore();\n }\n\n if (this.animated) {\n // When line is animated, the control points and path are not cached.\n this._pointsUpdated = false;\n this._path = undefined;\n }\n }\n}\n","import Element from '../core/core.element.js';\nimport {drawPoint, _isPointInArea} from '../helpers/helpers.canvas.js';\nimport type {\n CartesianParsedData,\n ChartArea,\n Point,\n PointHoverOptions,\n PointOptions,\n} from '../types/index.js';\n\nfunction inRange(el: PointElement, pos: number, axis: 'x' | 'y', useFinalPosition?: boolean) {\n const options = el.options;\n const {[axis]: value} = el.getProps([axis], useFinalPosition);\n\n return (Math.abs(pos - value) < options.radius + options.hitRadius);\n}\n\nexport type PointProps = Point\n\nexport default class PointElement extends Element<PointProps, PointOptions & PointHoverOptions> {\n\n static id = 'point';\n\n parsed: CartesianParsedData;\n skip?: boolean;\n stop?: boolean;\n\n /**\n * @type {any}\n */\n static defaults = {\n borderWidth: 1,\n hitRadius: 1,\n hoverBorderWidth: 1,\n hoverRadius: 4,\n pointStyle: 'circle',\n radius: 3,\n rotation: 0\n };\n\n /**\n * @type {any}\n */\n static defaultRoutes = {\n backgroundColor: 'backgroundColor',\n borderColor: 'borderColor'\n };\n\n constructor(cfg) {\n super();\n\n this.options = undefined;\n this.parsed = undefined;\n this.skip = undefined;\n this.stop = undefined;\n\n if (cfg) {\n Object.assign(this, cfg);\n }\n }\n\n inRange(mouseX: number, mouseY: number, useFinalPosition?: boolean) {\n const options = this.options;\n const {x, y} = this.getProps(['x', 'y'], useFinalPosition);\n return ((Math.pow(mouseX - x, 2) + Math.pow(mouseY - y, 2)) < Math.pow(options.hitRadius + options.radius, 2));\n }\n\n inXRange(mouseX: number, useFinalPosition?: boolean) {\n return inRange(this, mouseX, 'x', useFinalPosition);\n }\n\n inYRange(mouseY: number, useFinalPosition?: boolean) {\n return inRange(this, mouseY, 'y', useFinalPosition);\n }\n\n getCenterPoint(useFinalPosition?: boolean) {\n const {x, y} = this.getProps(['x', 'y'], useFinalPosition);\n return {x, y};\n }\n\n size(options?: Partial<PointOptions & PointHoverOptions>) {\n options = options || this.options || {};\n let radius = options.radius || 0;\n radius = Math.max(radius, radius && options.hoverRadius || 0);\n const borderWidth = radius && options.borderWidth || 0;\n return (radius + borderWidth) * 2;\n }\n\n draw(ctx: CanvasRenderingContext2D, area: ChartArea) {\n const options = this.options;\n\n if (this.skip || options.radius < 0.1 || !_isPointInArea(this, area, this.size(options) / 2)) {\n return;\n }\n\n ctx.strokeStyle = options.borderColor;\n ctx.lineWidth = options.borderWidth;\n ctx.fillStyle = options.backgroundColor;\n drawPoint(ctx, options, this.x, this.y);\n }\n\n getRange() {\n const options = this.options || {};\n // @ts-expect-error Fallbacks should never be hit in practice\n return options.radius + options.hitRadius;\n }\n}\n","import Element from '../core/core.element.js';\nimport {isObject, _isBetween, _limitValue} from '../helpers/index.js';\nimport {addRoundedRectPath} from '../helpers/helpers.canvas.js';\nimport {toTRBL, toTRBLCorners} from '../helpers/helpers.options.js';\n\n/** @typedef {{ x: number, y: number, base: number, horizontal: boolean, width: number, height: number }} BarProps */\n\n/**\n * Helper function to get the bounds of the bar regardless of the orientation\n * @param {BarElement} bar the bar\n * @param {boolean} [useFinalPosition]\n * @return {object} bounds of the bar\n * @private\n */\nfunction getBarBounds(bar, useFinalPosition) {\n const {x, y, base, width, height} = /** @type {BarProps} */ (bar.getProps(['x', 'y', 'base', 'width', 'height'], useFinalPosition));\n\n let left, right, top, bottom, half;\n\n if (bar.horizontal) {\n half = height / 2;\n left = Math.min(x, base);\n right = Math.max(x, base);\n top = y - half;\n bottom = y + half;\n } else {\n half = width / 2;\n left = x - half;\n right = x + half;\n top = Math.min(y, base);\n bottom = Math.max(y, base);\n }\n\n return {left, top, right, bottom};\n}\n\nfunction skipOrLimit(skip, value, min, max) {\n return skip ? 0 : _limitValue(value, min, max);\n}\n\nfunction parseBorderWidth(bar, maxW, maxH) {\n const value = bar.options.borderWidth;\n const skip = bar.borderSkipped;\n const o = toTRBL(value);\n\n return {\n t: skipOrLimit(skip.top, o.top, 0, maxH),\n r: skipOrLimit(skip.right, o.right, 0, maxW),\n b: skipOrLimit(skip.bottom, o.bottom, 0, maxH),\n l: skipOrLimit(skip.left, o.left, 0, maxW)\n };\n}\n\nfunction parseBorderRadius(bar, maxW, maxH) {\n const {enableBorderRadius} = bar.getProps(['enableBorderRadius']);\n const value = bar.options.borderRadius;\n const o = toTRBLCorners(value);\n const maxR = Math.min(maxW, maxH);\n const skip = bar.borderSkipped;\n\n // If the value is an object, assume the user knows what they are doing\n // and apply as directed.\n const enableBorder = enableBorderRadius || isObject(value);\n\n return {\n topLeft: skipOrLimit(!enableBorder || skip.top || skip.left, o.topLeft, 0, maxR),\n topRight: skipOrLimit(!enableBorder || skip.top || skip.right, o.topRight, 0, maxR),\n bottomLeft: skipOrLimit(!enableBorder || skip.bottom || skip.left, o.bottomLeft, 0, maxR),\n bottomRight: skipOrLimit(!enableBorder || skip.bottom || skip.right, o.bottomRight, 0, maxR)\n };\n}\n\nfunction boundingRects(bar) {\n const bounds = getBarBounds(bar);\n const width = bounds.right - bounds.left;\n const height = bounds.bottom - bounds.top;\n const border = parseBorderWidth(bar, width / 2, height / 2);\n const radius = parseBorderRadius(bar, width / 2, height / 2);\n\n return {\n outer: {\n x: bounds.left,\n y: bounds.top,\n w: width,\n h: height,\n radius\n },\n inner: {\n x: bounds.left + border.l,\n y: bounds.top + border.t,\n w: width - border.l - border.r,\n h: height - border.t - border.b,\n radius: {\n topLeft: Math.max(0, radius.topLeft - Math.max(border.t, border.l)),\n topRight: Math.max(0, radius.topRight - Math.max(border.t, border.r)),\n bottomLeft: Math.max(0, radius.bottomLeft - Math.max(border.b, border.l)),\n bottomRight: Math.max(0, radius.bottomRight - Math.max(border.b, border.r)),\n }\n }\n };\n}\n\nfunction inRange(bar, x, y, useFinalPosition) {\n const skipX = x === null;\n const skipY = y === null;\n const skipBoth = skipX && skipY;\n const bounds = bar && !skipBoth && getBarBounds(bar, useFinalPosition);\n\n return bounds\n\t\t&& (skipX || _isBetween(x, bounds.left, bounds.right))\n\t\t&& (skipY || _isBetween(y, bounds.top, bounds.bottom));\n}\n\nfunction hasRadius(radius) {\n return radius.topLeft || radius.topRight || radius.bottomLeft || radius.bottomRight;\n}\n\n/**\n * Add a path of a rectangle to the current sub-path\n * @param {CanvasRenderingContext2D} ctx Context\n * @param {*} rect Bounding rect\n */\nfunction addNormalRectPath(ctx, rect) {\n ctx.rect(rect.x, rect.y, rect.w, rect.h);\n}\n\nfunction inflateRect(rect, amount, refRect = {}) {\n const x = rect.x !== refRect.x ? -amount : 0;\n const y = rect.y !== refRect.y ? -amount : 0;\n const w = (rect.x + rect.w !== refRect.x + refRect.w ? amount : 0) - x;\n const h = (rect.y + rect.h !== refRect.y + refRect.h ? amount : 0) - y;\n return {\n x: rect.x + x,\n y: rect.y + y,\n w: rect.w + w,\n h: rect.h + h,\n radius: rect.radius\n };\n}\n\nexport default class BarElement extends Element {\n\n static id = 'bar';\n\n /**\n * @type {any}\n */\n static defaults = {\n borderSkipped: 'start',\n borderWidth: 0,\n borderRadius: 0,\n inflateAmount: 'auto',\n pointStyle: undefined\n };\n\n /**\n * @type {any}\n */\n static defaultRoutes = {\n backgroundColor: 'backgroundColor',\n borderColor: 'borderColor'\n };\n\n constructor(cfg) {\n super();\n\n this.options = undefined;\n this.horizontal = undefined;\n this.base = undefined;\n this.width = undefined;\n this.height = undefined;\n this.inflateAmount = undefined;\n\n if (cfg) {\n Object.assign(this, cfg);\n }\n }\n\n draw(ctx) {\n const {inflateAmount, options: {borderColor, backgroundColor}} = this;\n const {inner, outer} = boundingRects(this);\n const addRectPath = hasRadius(outer.radius) ? addRoundedRectPath : addNormalRectPath;\n\n ctx.save();\n\n if (outer.w !== inner.w || outer.h !== inner.h) {\n ctx.beginPath();\n addRectPath(ctx, inflateRect(outer, inflateAmount, inner));\n ctx.clip();\n addRectPath(ctx, inflateRect(inner, -inflateAmount, outer));\n ctx.fillStyle = borderColor;\n ctx.fill('evenodd');\n }\n\n ctx.beginPath();\n addRectPath(ctx, inflateRect(inner, inflateAmount));\n ctx.fillStyle = backgroundColor;\n ctx.fill();\n\n ctx.restore();\n }\n\n inRange(mouseX, mouseY, useFinalPosition) {\n return inRange(this, mouseX, mouseY, useFinalPosition);\n }\n\n inXRange(mouseX, useFinalPosition) {\n return inRange(this, mouseX, null, useFinalPosition);\n }\n\n inYRange(mouseY, useFinalPosition) {\n return inRange(this, null, mouseY, useFinalPosition);\n }\n\n getCenterPoint(useFinalPosition) {\n const {x, y, base, horizontal} = /** @type {BarProps} */ (this.getProps(['x', 'y', 'base', 'horizontal'], useFinalPosition));\n return {\n x: horizontal ? (x + base) / 2 : x,\n y: horizontal ? y : (y + base) / 2\n };\n }\n\n getRange(axis) {\n return axis === 'x' ? this.width / 2 : this.height / 2;\n }\n}\n","import Scale from '../core/core.scale.js';\nimport {isNullOrUndef, valueOrDefault, _limitValue} from '../helpers/index.js';\n\nconst addIfString = (labels, raw, index, addedLabels) => {\n if (typeof raw === 'string') {\n index = labels.push(raw) - 1;\n addedLabels.unshift({index, label: raw});\n } else if (isNaN(raw)) {\n index = null;\n }\n return index;\n};\n\nfunction findOrAddLabel(labels, raw, index, addedLabels) {\n const first = labels.indexOf(raw);\n if (first === -1) {\n return addIfString(labels, raw, index, addedLabels);\n }\n const last = labels.lastIndexOf(raw);\n return first !== last ? index : first;\n}\n\nconst validIndex = (index, max) => index === null ? null : _limitValue(Math.round(index), 0, max);\n\nfunction _getLabelForValue(value) {\n const labels = this.getLabels();\n\n if (value >= 0 && value < labels.length) {\n return labels[value];\n }\n return value;\n}\n\nexport default class CategoryScale extends Scale {\n\n static id = 'category';\n\n /**\n * @type {any}\n */\n static defaults = {\n ticks: {\n callback: _getLabelForValue\n }\n };\n\n constructor(cfg) {\n super(cfg);\n\n /** @type {number} */\n this._startValue = undefined;\n this._valueRange = 0;\n this._addedLabels = [];\n }\n\n init(scaleOptions) {\n const added = this._addedLabels;\n if (added.length) {\n const labels = this.getLabels();\n for (const {index, label} of added) {\n if (labels[index] === label) {\n labels.splice(index, 1);\n }\n }\n this._addedLabels = [];\n }\n super.init(scaleOptions);\n }\n\n parse(raw, index) {\n if (isNullOrUndef(raw)) {\n return null;\n }\n const labels = this.getLabels();\n index = isFinite(index) && labels[index] === raw ? index\n : findOrAddLabel(labels, raw, valueOrDefault(index, raw), this._addedLabels);\n return validIndex(index, labels.length - 1);\n }\n\n determineDataLimits() {\n const {minDefined, maxDefined} = this.getUserBounds();\n let {min, max} = this.getMinMax(true);\n\n if (this.options.bounds === 'ticks') {\n if (!minDefined) {\n min = 0;\n }\n if (!maxDefined) {\n max = this.getLabels().length - 1;\n }\n }\n\n this.min = min;\n this.max = max;\n }\n\n buildTicks() {\n const min = this.min;\n const max = this.max;\n const offset = this.options.offset;\n const ticks = [];\n let labels = this.getLabels();\n\n // If we are viewing some subset of labels, slice the original array\n labels = (min === 0 && max === labels.length - 1) ? labels : labels.slice(min, max + 1);\n\n this._valueRange = Math.max(labels.length - (offset ? 0 : 1), 1);\n this._startValue = this.min - (offset ? 0.5 : 0);\n\n for (let value = min; value <= max; value++) {\n ticks.push({value});\n }\n return ticks;\n }\n\n getLabelForValue(value) {\n return _getLabelForValue.call(this, value);\n }\n\n /**\n\t * @protected\n\t */\n configure() {\n super.configure();\n\n if (!this.isHorizontal()) {\n // For backward compatibility, vertical category scale reverse is inverted.\n this._reversePixels = !this._reversePixels;\n }\n }\n\n // Used to get data value locations. Value can either be an index or a numerical value\n getPixelForValue(value) {\n if (typeof value !== 'number') {\n value = this.parse(value);\n }\n\n return value === null ? NaN : this.getPixelForDecimal((value - this._startValue) / this._valueRange);\n }\n\n // Must override base implementation because it calls getPixelForValue\n // and category scale can have duplicate values\n getPixelForTick(index) {\n const ticks = this.ticks;\n if (index < 0 || index > ticks.length - 1) {\n return null;\n }\n return this.getPixelForValue(ticks[index].value);\n }\n\n getValueForPixel(pixel) {\n return Math.round(this._startValue + this.getDecimalForPixel(pixel) * this._valueRange);\n }\n\n getBasePixel() {\n return this.bottom;\n }\n}\n","import {isNullOrUndef} from '../helpers/helpers.core.js';\nimport {almostEquals, almostWhole, niceNum, _decimalPlaces, _setMinAndMaxByKey, sign, toRadians} from '../helpers/helpers.math.js';\nimport Scale from '../core/core.scale.js';\nimport {formatNumber} from '../helpers/helpers.intl.js';\n\n/**\n * Generate a set of linear ticks for an axis\n * 1. If generationOptions.min, generationOptions.max, and generationOptions.step are defined:\n * if (max - min) / step is an integer, ticks are generated as [min, min + step, ..., max]\n * Note that the generationOptions.maxCount setting is respected in this scenario\n *\n * 2. If generationOptions.min, generationOptions.max, and generationOptions.count is defined\n * spacing = (max - min) / count\n * Ticks are generated as [min, min + spacing, ..., max]\n *\n * 3. If generationOptions.count is defined\n * spacing = (niceMax - niceMin) / count\n *\n * 4. Compute optimal spacing of ticks using niceNum algorithm\n *\n * @param generationOptions the options used to generate the ticks\n * @param dataRange the range of the data\n * @returns {object[]} array of tick objects\n */\nfunction generateTicks(generationOptions, dataRange) {\n const ticks = [];\n // To get a \"nice\" value for the tick spacing, we will use the appropriately named\n // \"nice number\" algorithm. See https://stackoverflow.com/questions/8506881/nice-label-algorithm-for-charts-with-minimum-ticks\n // for details.\n\n const MIN_SPACING = 1e-14;\n const {bounds, step, min, max, precision, count, maxTicks, maxDigits, includeBounds} = generationOptions;\n const unit = step || 1;\n const maxSpaces = maxTicks - 1;\n const {min: rmin, max: rmax} = dataRange;\n const minDefined = !isNullOrUndef(min);\n const maxDefined = !isNullOrUndef(max);\n const countDefined = !isNullOrUndef(count);\n const minSpacing = (rmax - rmin) / (maxDigits + 1);\n let spacing = niceNum((rmax - rmin) / maxSpaces / unit) * unit;\n let factor, niceMin, niceMax, numSpaces;\n\n // Beyond MIN_SPACING floating point numbers being to lose precision\n // such that we can't do the math necessary to generate ticks\n if (spacing < MIN_SPACING && !minDefined && !maxDefined) {\n return [{value: rmin}, {value: rmax}];\n }\n\n numSpaces = Math.ceil(rmax / spacing) - Math.floor(rmin / spacing);\n if (numSpaces > maxSpaces) {\n // If the calculated num of spaces exceeds maxNumSpaces, recalculate it\n spacing = niceNum(numSpaces * spacing / maxSpaces / unit) * unit;\n }\n\n if (!isNullOrUndef(precision)) {\n // If the user specified a precision, round to that number of decimal places\n factor = Math.pow(10, precision);\n spacing = Math.ceil(spacing * factor) / factor;\n }\n\n if (bounds === 'ticks') {\n niceMin = Math.floor(rmin / spacing) * spacing;\n niceMax = Math.ceil(rmax / spacing) * spacing;\n } else {\n niceMin = rmin;\n niceMax = rmax;\n }\n\n if (minDefined && maxDefined && step && almostWhole((max - min) / step, spacing / 1000)) {\n // Case 1: If min, max and stepSize are set and they make an evenly spaced scale use it.\n // spacing = step;\n // numSpaces = (max - min) / spacing;\n // Note that we round here to handle the case where almostWhole translated an FP error\n numSpaces = Math.round(Math.min((max - min) / spacing, maxTicks));\n spacing = (max - min) / numSpaces;\n niceMin = min;\n niceMax = max;\n } else if (countDefined) {\n // Cases 2 & 3, we have a count specified. Handle optional user defined edges to the range.\n // Sometimes these are no-ops, but it makes the code a lot clearer\n // and when a user defined range is specified, we want the correct ticks\n niceMin = minDefined ? min : niceMin;\n niceMax = maxDefined ? max : niceMax;\n numSpaces = count - 1;\n spacing = (niceMax - niceMin) / numSpaces;\n } else {\n // Case 4\n numSpaces = (niceMax - niceMin) / spacing;\n\n // If very close to our rounded value, use it.\n if (almostEquals(numSpaces, Math.round(numSpaces), spacing / 1000)) {\n numSpaces = Math.round(numSpaces);\n } else {\n numSpaces = Math.ceil(numSpaces);\n }\n }\n\n // The spacing will have changed in cases 1, 2, and 3 so the factor cannot be computed\n // until this point\n const decimalPlaces = Math.max(\n _decimalPlaces(spacing),\n _decimalPlaces(niceMin)\n );\n factor = Math.pow(10, isNullOrUndef(precision) ? decimalPlaces : precision);\n niceMin = Math.round(niceMin * factor) / factor;\n niceMax = Math.round(niceMax * factor) / factor;\n\n let j = 0;\n if (minDefined) {\n if (includeBounds && niceMin !== min) {\n ticks.push({value: min});\n\n if (niceMin < min) {\n j++; // Skip niceMin\n }\n // If the next nice tick is close to min, skip it\n if (almostEquals(Math.round((niceMin + j * spacing) * factor) / factor, min, relativeLabelSize(min, minSpacing, generationOptions))) {\n j++;\n }\n } else if (niceMin < min) {\n j++;\n }\n }\n\n for (; j < numSpaces; ++j) {\n const tickValue = Math.round((niceMin + j * spacing) * factor) / factor;\n if (maxDefined && tickValue > max) {\n break;\n }\n ticks.push({value: tickValue});\n }\n\n if (maxDefined && includeBounds && niceMax !== max) {\n // If the previous tick is too close to max, replace it with max, else add max\n if (ticks.length && almostEquals(ticks[ticks.length - 1].value, max, relativeLabelSize(max, minSpacing, generationOptions))) {\n ticks[ticks.length - 1].value = max;\n } else {\n ticks.push({value: max});\n }\n } else if (!maxDefined || niceMax === max) {\n ticks.push({value: niceMax});\n }\n\n return ticks;\n}\n\nfunction relativeLabelSize(value, minSpacing, {horizontal, minRotation}) {\n const rad = toRadians(minRotation);\n const ratio = (horizontal ? Math.sin(rad) : Math.cos(rad)) || 0.001;\n const length = 0.75 * minSpacing * ('' + value).length;\n return Math.min(minSpacing / ratio, length);\n}\n\nexport default class LinearScaleBase extends Scale {\n\n constructor(cfg) {\n super(cfg);\n\n /** @type {number} */\n this.start = undefined;\n /** @type {number} */\n this.end = undefined;\n /** @type {number} */\n this._startValue = undefined;\n /** @type {number} */\n this._endValue = undefined;\n this._valueRange = 0;\n }\n\n parse(raw, index) { // eslint-disable-line no-unused-vars\n if (isNullOrUndef(raw)) {\n return null;\n }\n if ((typeof raw === 'number' || raw instanceof Number) && !isFinite(+raw)) {\n return null;\n }\n\n return +raw;\n }\n\n handleTickRangeOptions() {\n const {beginAtZero} = this.options;\n const {minDefined, maxDefined} = this.getUserBounds();\n let {min, max} = this;\n\n const setMin = v => (min = minDefined ? min : v);\n const setMax = v => (max = maxDefined ? max : v);\n\n if (beginAtZero) {\n const minSign = sign(min);\n const maxSign = sign(max);\n\n if (minSign < 0 && maxSign < 0) {\n setMax(0);\n } else if (minSign > 0 && maxSign > 0) {\n setMin(0);\n }\n }\n\n if (min === max) {\n let offset = max === 0 ? 1 : Math.abs(max * 0.05);\n\n setMax(max + offset);\n\n if (!beginAtZero) {\n setMin(min - offset);\n }\n }\n this.min = min;\n this.max = max;\n }\n\n getTickLimit() {\n const tickOpts = this.options.ticks;\n // eslint-disable-next-line prefer-const\n let {maxTicksLimit, stepSize} = tickOpts;\n let maxTicks;\n\n if (stepSize) {\n maxTicks = Math.ceil(this.max / stepSize) - Math.floor(this.min / stepSize) + 1;\n if (maxTicks > 1000) {\n console.warn(`scales.${this.id}.ticks.stepSize: ${stepSize} would result generating up to ${maxTicks} ticks. Limiting to 1000.`);\n maxTicks = 1000;\n }\n } else {\n maxTicks = this.computeTickLimit();\n maxTicksLimit = maxTicksLimit || 11;\n }\n\n if (maxTicksLimit) {\n maxTicks = Math.min(maxTicksLimit, maxTicks);\n }\n\n return maxTicks;\n }\n\n /**\n\t * @protected\n\t */\n computeTickLimit() {\n return Number.POSITIVE_INFINITY;\n }\n\n buildTicks() {\n const opts = this.options;\n const tickOpts = opts.ticks;\n\n // Figure out what the max number of ticks we can support it is based on the size of\n // the axis area. For now, we say that the minimum tick spacing in pixels must be 40\n // We also limit the maximum number of ticks to 11 which gives a nice 10 squares on\n // the graph. Make sure we always have at least 2 ticks\n let maxTicks = this.getTickLimit();\n maxTicks = Math.max(2, maxTicks);\n\n const numericGeneratorOptions = {\n maxTicks,\n bounds: opts.bounds,\n min: opts.min,\n max: opts.max,\n precision: tickOpts.precision,\n step: tickOpts.stepSize,\n count: tickOpts.count,\n maxDigits: this._maxDigits(),\n horizontal: this.isHorizontal(),\n minRotation: tickOpts.minRotation || 0,\n includeBounds: tickOpts.includeBounds !== false\n };\n const dataRange = this._range || this;\n const ticks = generateTicks(numericGeneratorOptions, dataRange);\n\n // At this point, we need to update our max and min given the tick values,\n // since we probably have expanded the range of the scale\n if (opts.bounds === 'ticks') {\n _setMinAndMaxByKey(ticks, this, 'value');\n }\n\n if (opts.reverse) {\n ticks.reverse();\n\n this.start = this.max;\n this.end = this.min;\n } else {\n this.start = this.min;\n this.end = this.max;\n }\n\n return ticks;\n }\n\n /**\n\t * @protected\n\t */\n configure() {\n const ticks = this.ticks;\n let start = this.min;\n let end = this.max;\n\n super.configure();\n\n if (this.options.offset && ticks.length) {\n const offset = (end - start) / Math.max(ticks.length - 1, 1) / 2;\n start -= offset;\n end += offset;\n }\n this._startValue = start;\n this._endValue = end;\n this._valueRange = end - start;\n }\n\n getLabelForValue(value) {\n return formatNumber(value, this.chart.options.locale, this.options.ticks.format);\n }\n}\n","import {isFinite} from '../helpers/helpers.core.js';\nimport LinearScaleBase from './scale.linearbase.js';\nimport Ticks from '../core/core.ticks.js';\nimport {toRadians} from '../helpers/index.js';\n\nexport default class LinearScale extends LinearScaleBase {\n\n static id = 'linear';\n\n /**\n * @type {any}\n */\n static defaults = {\n ticks: {\n callback: Ticks.formatters.numeric\n }\n };\n\n\n determineDataLimits() {\n const {min, max} = this.getMinMax(true);\n\n this.min = isFinite(min) ? min : 0;\n this.max = isFinite(max) ? max : 1;\n\n // Common base implementation to handle min, max, beginAtZero\n this.handleTickRangeOptions();\n }\n\n /**\n\t * Returns the maximum number of ticks based on the scale dimension\n\t * @protected\n \t */\n computeTickLimit() {\n const horizontal = this.isHorizontal();\n const length = horizontal ? this.width : this.height;\n const minRotation = toRadians(this.options.ticks.minRotation);\n const ratio = (horizontal ? Math.sin(minRotation) : Math.cos(minRotation)) || 0.001;\n const tickFont = this._resolveTickFontOptions(0);\n return Math.ceil(length / Math.min(40, tickFont.lineHeight / ratio));\n }\n\n // Utils\n getPixelForValue(value) {\n return value === null ? NaN : this.getPixelForDecimal((value - this._startValue) / this._valueRange);\n }\n\n getValueForPixel(pixel) {\n return this._startValue + this.getDecimalForPixel(pixel) * this._valueRange;\n }\n}\n","import {finiteOrDefault, isFinite} from '../helpers/helpers.core.js';\nimport {formatNumber} from '../helpers/helpers.intl.js';\nimport {_setMinAndMaxByKey, log10} from '../helpers/helpers.math.js';\nimport Scale from '../core/core.scale.js';\nimport LinearScaleBase from './scale.linearbase.js';\nimport Ticks from '../core/core.ticks.js';\n\nconst log10Floor = v => Math.floor(log10(v));\nconst changeExponent = (v, m) => Math.pow(10, log10Floor(v) + m);\n\nfunction isMajor(tickVal) {\n const remain = tickVal / (Math.pow(10, log10Floor(tickVal)));\n return remain === 1;\n}\n\nfunction steps(min, max, rangeExp) {\n const rangeStep = Math.pow(10, rangeExp);\n const start = Math.floor(min / rangeStep);\n const end = Math.ceil(max / rangeStep);\n return end - start;\n}\n\nfunction startExp(min, max) {\n const range = max - min;\n let rangeExp = log10Floor(range);\n while (steps(min, max, rangeExp) > 10) {\n rangeExp++;\n }\n while (steps(min, max, rangeExp) < 10) {\n rangeExp--;\n }\n return Math.min(rangeExp, log10Floor(min));\n}\n\n\n/**\n * Generate a set of logarithmic ticks\n * @param generationOptions the options used to generate the ticks\n * @param dataRange the range of the data\n * @returns {object[]} array of tick objects\n */\nfunction generateTicks(generationOptions, {min, max}) {\n min = finiteOrDefault(generationOptions.min, min);\n const ticks = [];\n const minExp = log10Floor(min);\n let exp = startExp(min, max);\n let precision = exp < 0 ? Math.pow(10, Math.abs(exp)) : 1;\n const stepSize = Math.pow(10, exp);\n const base = minExp > exp ? Math.pow(10, minExp) : 0;\n const start = Math.round((min - base) * precision) / precision;\n const offset = Math.floor((min - base) / stepSize / 10) * stepSize * 10;\n let significand = Math.floor((start - offset) / Math.pow(10, exp));\n let value = finiteOrDefault(generationOptions.min, Math.round((base + offset + significand * Math.pow(10, exp)) * precision) / precision);\n while (value < max) {\n ticks.push({value, major: isMajor(value), significand});\n if (significand >= 10) {\n significand = significand < 15 ? 15 : 20;\n } else {\n significand++;\n }\n if (significand >= 20) {\n exp++;\n significand = 2;\n precision = exp >= 0 ? 1 : precision;\n }\n value = Math.round((base + offset + significand * Math.pow(10, exp)) * precision) / precision;\n }\n const lastTick = finiteOrDefault(generationOptions.max, value);\n ticks.push({value: lastTick, major: isMajor(lastTick), significand});\n\n return ticks;\n}\n\nexport default class LogarithmicScale extends Scale {\n\n static id = 'logarithmic';\n\n /**\n * @type {any}\n */\n static defaults = {\n ticks: {\n callback: Ticks.formatters.logarithmic,\n major: {\n enabled: true\n }\n }\n };\n\n\n constructor(cfg) {\n super(cfg);\n\n /** @type {number} */\n this.start = undefined;\n /** @type {number} */\n this.end = undefined;\n /** @type {number} */\n this._startValue = undefined;\n this._valueRange = 0;\n }\n\n parse(raw, index) {\n const value = LinearScaleBase.prototype.parse.apply(this, [raw, index]);\n if (value === 0) {\n this._zero = true;\n return undefined;\n }\n return isFinite(value) && value > 0 ? value : null;\n }\n\n determineDataLimits() {\n const {min, max} = this.getMinMax(true);\n\n this.min = isFinite(min) ? Math.max(0, min) : null;\n this.max = isFinite(max) ? Math.max(0, max) : null;\n\n if (this.options.beginAtZero) {\n this._zero = true;\n }\n\n // if data has `0` in it or `beginAtZero` is true, min (non zero) value is at bottom\n // of scale, and it does not equal suggestedMin, lower the min bound by one exp.\n if (this._zero && this.min !== this._suggestedMin && !isFinite(this._userMin)) {\n this.min = min === changeExponent(this.min, 0) ? changeExponent(this.min, -1) : changeExponent(this.min, 0);\n }\n\n this.handleTickRangeOptions();\n }\n\n handleTickRangeOptions() {\n const {minDefined, maxDefined} = this.getUserBounds();\n let min = this.min;\n let max = this.max;\n\n const setMin = v => (min = minDefined ? min : v);\n const setMax = v => (max = maxDefined ? max : v);\n\n if (min === max) {\n if (min <= 0) { // includes null\n setMin(1);\n setMax(10);\n } else {\n setMin(changeExponent(min, -1));\n setMax(changeExponent(max, +1));\n }\n }\n if (min <= 0) {\n setMin(changeExponent(max, -1));\n }\n if (max <= 0) {\n\n setMax(changeExponent(min, +1));\n }\n\n this.min = min;\n this.max = max;\n }\n\n buildTicks() {\n const opts = this.options;\n\n const generationOptions = {\n min: this._userMin,\n max: this._userMax\n };\n const ticks = generateTicks(generationOptions, this);\n\n // At this point, we need to update our max and min given the tick values,\n // since we probably have expanded the range of the scale\n if (opts.bounds === 'ticks') {\n _setMinAndMaxByKey(ticks, this, 'value');\n }\n\n if (opts.reverse) {\n ticks.reverse();\n\n this.start = this.max;\n this.end = this.min;\n } else {\n this.start = this.min;\n this.end = this.max;\n }\n\n return ticks;\n }\n\n /**\n\t * @param {number} value\n\t * @return {string}\n\t */\n getLabelForValue(value) {\n return value === undefined\n ? '0'\n : formatNumber(value, this.chart.options.locale, this.options.ticks.format);\n }\n\n /**\n\t * @protected\n\t */\n configure() {\n const start = this.min;\n\n super.configure();\n\n this._startValue = log10(start);\n this._valueRange = log10(this.max) - log10(start);\n }\n\n getPixelForValue(value) {\n if (value === undefined || value === 0) {\n value = this.min;\n }\n if (value === null || isNaN(value)) {\n return NaN;\n }\n return this.getPixelForDecimal(value === this.min\n ? 0\n : (log10(value) - this._startValue) / this._valueRange);\n }\n\n getValueForPixel(pixel) {\n const decimal = this.getDecimalForPixel(pixel);\n return Math.pow(10, this._startValue + decimal * this._valueRange);\n }\n}\n","import defaults from '../core/core.defaults.js';\nimport {_longestText, addRoundedRectPath, renderText, _isPointInArea} from '../helpers/helpers.canvas.js';\nimport {HALF_PI, TAU, toDegrees, toRadians, _normalizeAngle, PI} from '../helpers/helpers.math.js';\nimport LinearScaleBase from './scale.linearbase.js';\nimport Ticks from '../core/core.ticks.js';\nimport {valueOrDefault, isArray, isFinite, callback as callCallback, isNullOrUndef} from '../helpers/helpers.core.js';\nimport {createContext, toFont, toPadding, toTRBLCorners} from '../helpers/helpers.options.js';\n\nfunction getTickBackdropHeight(opts) {\n const tickOpts = opts.ticks;\n\n if (tickOpts.display && opts.display) {\n const padding = toPadding(tickOpts.backdropPadding);\n return valueOrDefault(tickOpts.font && tickOpts.font.size, defaults.font.size) + padding.height;\n }\n return 0;\n}\n\nfunction measureLabelSize(ctx, font, label) {\n label = isArray(label) ? label : [label];\n return {\n w: _longestText(ctx, font.string, label),\n h: label.length * font.lineHeight\n };\n}\n\nfunction determineLimits(angle, pos, size, min, max) {\n if (angle === min || angle === max) {\n return {\n start: pos - (size / 2),\n end: pos + (size / 2)\n };\n } else if (angle < min || angle > max) {\n return {\n start: pos - size,\n end: pos\n };\n }\n\n return {\n start: pos,\n end: pos + size\n };\n}\n\n/**\n * Helper function to fit a radial linear scale with point labels\n */\nfunction fitWithPointLabels(scale) {\n\n // Right, this is really confusing and there is a lot of maths going on here\n // The gist of the problem is here: https://gist.github.com/nnnick/696cc9c55f4b0beb8fe9\n //\n // Reaction: https://dl.dropboxusercontent.com/u/34601363/toomuchscience.gif\n //\n // Solution:\n //\n // We assume the radius of the polygon is half the size of the canvas at first\n // at each index we check if the text overlaps.\n //\n // Where it does, we store that angle and that index.\n //\n // After finding the largest index and angle we calculate how much we need to remove\n // from the shape radius to move the point inwards by that x.\n //\n // We average the left and right distances to get the maximum shape radius that can fit in the box\n // along with labels.\n //\n // Once we have that, we can find the centre point for the chart, by taking the x text protrusion\n // on each side, removing that from the size, halving it and adding the left x protrusion width.\n //\n // This will mean we have a shape fitted to the canvas, as large as it can be with the labels\n // and position it in the most space efficient manner\n //\n // https://dl.dropboxusercontent.com/u/34601363/yeahscience.gif\n\n // Get maximum radius of the polygon. Either half the height (minus the text width) or half the width.\n // Use this to calculate the offset + change. - Make sure L/R protrusion is at least 0 to stop issues with centre points\n const orig = {\n l: scale.left + scale._padding.left,\n r: scale.right - scale._padding.right,\n t: scale.top + scale._padding.top,\n b: scale.bottom - scale._padding.bottom\n };\n const limits = Object.assign({}, orig);\n const labelSizes = [];\n const padding = [];\n const valueCount = scale._pointLabels.length;\n const pointLabelOpts = scale.options.pointLabels;\n const additionalAngle = pointLabelOpts.centerPointLabels ? PI / valueCount : 0;\n\n for (let i = 0; i < valueCount; i++) {\n const opts = pointLabelOpts.setContext(scale.getPointLabelContext(i));\n padding[i] = opts.padding;\n const pointPosition = scale.getPointPosition(i, scale.drawingArea + padding[i], additionalAngle);\n const plFont = toFont(opts.font);\n const textSize = measureLabelSize(scale.ctx, plFont, scale._pointLabels[i]);\n labelSizes[i] = textSize;\n\n const angleRadians = _normalizeAngle(scale.getIndexAngle(i) + additionalAngle);\n const angle = Math.round(toDegrees(angleRadians));\n const hLimits = determineLimits(angle, pointPosition.x, textSize.w, 0, 180);\n const vLimits = determineLimits(angle, pointPosition.y, textSize.h, 90, 270);\n updateLimits(limits, orig, angleRadians, hLimits, vLimits);\n }\n\n scale.setCenterPoint(\n orig.l - limits.l,\n limits.r - orig.r,\n orig.t - limits.t,\n limits.b - orig.b\n );\n\n // Now that text size is determined, compute the full positions\n scale._pointLabelItems = buildPointLabelItems(scale, labelSizes, padding);\n}\n\nfunction updateLimits(limits, orig, angle, hLimits, vLimits) {\n const sin = Math.abs(Math.sin(angle));\n const cos = Math.abs(Math.cos(angle));\n let x = 0;\n let y = 0;\n if (hLimits.start < orig.l) {\n x = (orig.l - hLimits.start) / sin;\n limits.l = Math.min(limits.l, orig.l - x);\n } else if (hLimits.end > orig.r) {\n x = (hLimits.end - orig.r) / sin;\n limits.r = Math.max(limits.r, orig.r + x);\n }\n if (vLimits.start < orig.t) {\n y = (orig.t - vLimits.start) / cos;\n limits.t = Math.min(limits.t, orig.t - y);\n } else if (vLimits.end > orig.b) {\n y = (vLimits.end - orig.b) / cos;\n limits.b = Math.max(limits.b, orig.b + y);\n }\n}\n\nfunction createPointLabelItem(scale, index, itemOpts) {\n const outerDistance = scale.drawingArea;\n const {extra, additionalAngle, padding, size} = itemOpts;\n const pointLabelPosition = scale.getPointPosition(index, outerDistance + extra + padding, additionalAngle);\n const angle = Math.round(toDegrees(_normalizeAngle(pointLabelPosition.angle + HALF_PI)));\n const y = yForAngle(pointLabelPosition.y, size.h, angle);\n const textAlign = getTextAlignForAngle(angle);\n const left = leftForTextAlign(pointLabelPosition.x, size.w, textAlign);\n return {\n // if to draw or overlapped\n visible: true,\n\n // Text position\n x: pointLabelPosition.x,\n y,\n\n // Text rendering data\n textAlign,\n\n // Bounding box\n left,\n top: y,\n right: left + size.w,\n bottom: y + size.h\n };\n}\n\nfunction isNotOverlapped(item, area) {\n if (!area) {\n return true;\n }\n const {left, top, right, bottom} = item;\n const apexesInArea = _isPointInArea({x: left, y: top}, area) || _isPointInArea({x: left, y: bottom}, area) ||\n _isPointInArea({x: right, y: top}, area) || _isPointInArea({x: right, y: bottom}, area);\n return !apexesInArea;\n}\n\nfunction buildPointLabelItems(scale, labelSizes, padding) {\n const items = [];\n const valueCount = scale._pointLabels.length;\n const opts = scale.options;\n const {centerPointLabels, display} = opts.pointLabels;\n const itemOpts = {\n extra: getTickBackdropHeight(opts) / 2,\n additionalAngle: centerPointLabels ? PI / valueCount : 0\n };\n let area;\n\n for (let i = 0; i < valueCount; i++) {\n itemOpts.padding = padding[i];\n itemOpts.size = labelSizes[i];\n\n const item = createPointLabelItem(scale, i, itemOpts);\n items.push(item);\n if (display === 'auto') {\n item.visible = isNotOverlapped(item, area);\n if (item.visible) {\n area = item;\n }\n }\n }\n return items;\n}\n\nfunction getTextAlignForAngle(angle) {\n if (angle === 0 || angle === 180) {\n return 'center';\n } else if (angle < 180) {\n return 'left';\n }\n\n return 'right';\n}\n\nfunction leftForTextAlign(x, w, align) {\n if (align === 'right') {\n x -= w;\n } else if (align === 'center') {\n x -= (w / 2);\n }\n return x;\n}\n\nfunction yForAngle(y, h, angle) {\n if (angle === 90 || angle === 270) {\n y -= (h / 2);\n } else if (angle > 270 || angle < 90) {\n y -= h;\n }\n return y;\n}\n\nfunction drawPointLabelBox(ctx, opts, item) {\n const {left, top, right, bottom} = item;\n const {backdropColor} = opts;\n\n if (!isNullOrUndef(backdropColor)) {\n const borderRadius = toTRBLCorners(opts.borderRadius);\n const padding = toPadding(opts.backdropPadding);\n ctx.fillStyle = backdropColor;\n\n const backdropLeft = left - padding.left;\n const backdropTop = top - padding.top;\n const backdropWidth = right - left + padding.width;\n const backdropHeight = bottom - top + padding.height;\n\n if (Object.values(borderRadius).some(v => v !== 0)) {\n ctx.beginPath();\n addRoundedRectPath(ctx, {\n x: backdropLeft,\n y: backdropTop,\n w: backdropWidth,\n h: backdropHeight,\n radius: borderRadius,\n });\n ctx.fill();\n } else {\n ctx.fillRect(backdropLeft, backdropTop, backdropWidth, backdropHeight);\n }\n }\n}\n\nfunction drawPointLabels(scale, labelCount) {\n const {ctx, options: {pointLabels}} = scale;\n\n for (let i = labelCount - 1; i >= 0; i--) {\n const item = scale._pointLabelItems[i];\n if (!item.visible) {\n // overlapping\n continue;\n }\n const optsAtIndex = pointLabels.setContext(scale.getPointLabelContext(i));\n drawPointLabelBox(ctx, optsAtIndex, item);\n const plFont = toFont(optsAtIndex.font);\n const {x, y, textAlign} = item;\n\n renderText(\n ctx,\n scale._pointLabels[i],\n x,\n y + (plFont.lineHeight / 2),\n plFont,\n {\n color: optsAtIndex.color,\n textAlign: textAlign,\n textBaseline: 'middle'\n }\n );\n }\n}\n\nfunction pathRadiusLine(scale, radius, circular, labelCount) {\n const {ctx} = scale;\n if (circular) {\n // Draw circular arcs between the points\n ctx.arc(scale.xCenter, scale.yCenter, radius, 0, TAU);\n } else {\n // Draw straight lines connecting each index\n let pointPosition = scale.getPointPosition(0, radius);\n ctx.moveTo(pointPosition.x, pointPosition.y);\n\n for (let i = 1; i < labelCount; i++) {\n pointPosition = scale.getPointPosition(i, radius);\n ctx.lineTo(pointPosition.x, pointPosition.y);\n }\n }\n}\n\nfunction drawRadiusLine(scale, gridLineOpts, radius, labelCount, borderOpts) {\n const ctx = scale.ctx;\n const circular = gridLineOpts.circular;\n\n const {color, lineWidth} = gridLineOpts;\n\n if ((!circular && !labelCount) || !color || !lineWidth || radius < 0) {\n return;\n }\n\n ctx.save();\n ctx.strokeStyle = color;\n ctx.lineWidth = lineWidth;\n ctx.setLineDash(borderOpts.dash);\n ctx.lineDashOffset = borderOpts.dashOffset;\n\n ctx.beginPath();\n pathRadiusLine(scale, radius, circular, labelCount);\n ctx.closePath();\n ctx.stroke();\n ctx.restore();\n}\n\nfunction createPointLabelContext(parent, index, label) {\n return createContext(parent, {\n label,\n index,\n type: 'pointLabel'\n });\n}\n\nexport default class RadialLinearScale extends LinearScaleBase {\n\n static id = 'radialLinear';\n\n /**\n * @type {any}\n */\n static defaults = {\n display: true,\n\n // Boolean - Whether to animate scaling the chart from the centre\n animate: true,\n position: 'chartArea',\n\n angleLines: {\n display: true,\n lineWidth: 1,\n borderDash: [],\n borderDashOffset: 0.0\n },\n\n grid: {\n circular: false\n },\n\n startAngle: 0,\n\n // label settings\n ticks: {\n // Boolean - Show a backdrop to the scale label\n showLabelBackdrop: true,\n\n callback: Ticks.formatters.numeric\n },\n\n pointLabels: {\n backdropColor: undefined,\n\n // Number - The backdrop padding above & below the label in pixels\n backdropPadding: 2,\n\n // Boolean - if true, show point labels\n display: true,\n\n // Number - Point label font size in pixels\n font: {\n size: 10\n },\n\n // Function - Used to convert point labels\n callback(label) {\n return label;\n },\n\n // Number - Additionl padding between scale and pointLabel\n padding: 5,\n\n // Boolean - if true, center point labels to slices in polar chart\n centerPointLabels: false\n }\n };\n\n static defaultRoutes = {\n 'angleLines.color': 'borderColor',\n 'pointLabels.color': 'color',\n 'ticks.color': 'color'\n };\n\n static descriptors = {\n angleLines: {\n _fallback: 'grid'\n }\n };\n\n constructor(cfg) {\n super(cfg);\n\n /** @type {number} */\n this.xCenter = undefined;\n /** @type {number} */\n this.yCenter = undefined;\n /** @type {number} */\n this.drawingArea = undefined;\n /** @type {string[]} */\n this._pointLabels = [];\n this._pointLabelItems = [];\n }\n\n setDimensions() {\n // Set the unconstrained dimension before label rotation\n const padding = this._padding = toPadding(getTickBackdropHeight(this.options) / 2);\n const w = this.width = this.maxWidth - padding.width;\n const h = this.height = this.maxHeight - padding.height;\n this.xCenter = Math.floor(this.left + w / 2 + padding.left);\n this.yCenter = Math.floor(this.top + h / 2 + padding.top);\n this.drawingArea = Math.floor(Math.min(w, h) / 2);\n }\n\n determineDataLimits() {\n const {min, max} = this.getMinMax(false);\n\n this.min = isFinite(min) && !isNaN(min) ? min : 0;\n this.max = isFinite(max) && !isNaN(max) ? max : 0;\n\n // Common base implementation to handle min, max, beginAtZero\n this.handleTickRangeOptions();\n }\n\n /**\n\t * Returns the maximum number of ticks based on the scale dimension\n\t * @protected\n\t */\n computeTickLimit() {\n return Math.ceil(this.drawingArea / getTickBackdropHeight(this.options));\n }\n\n generateTickLabels(ticks) {\n LinearScaleBase.prototype.generateTickLabels.call(this, ticks);\n\n // Point labels\n this._pointLabels = this.getLabels()\n .map((value, index) => {\n const label = callCallback(this.options.pointLabels.callback, [value, index], this);\n return label || label === 0 ? label : '';\n })\n .filter((v, i) => this.chart.getDataVisibility(i));\n }\n\n fit() {\n const opts = this.options;\n\n if (opts.display && opts.pointLabels.display) {\n fitWithPointLabels(this);\n } else {\n this.setCenterPoint(0, 0, 0, 0);\n }\n }\n\n setCenterPoint(leftMovement, rightMovement, topMovement, bottomMovement) {\n this.xCenter += Math.floor((leftMovement - rightMovement) / 2);\n this.yCenter += Math.floor((topMovement - bottomMovement) / 2);\n this.drawingArea -= Math.min(this.drawingArea / 2, Math.max(leftMovement, rightMovement, topMovement, bottomMovement));\n }\n\n getIndexAngle(index) {\n const angleMultiplier = TAU / (this._pointLabels.length || 1);\n const startAngle = this.options.startAngle || 0;\n\n return _normalizeAngle(index * angleMultiplier + toRadians(startAngle));\n }\n\n getDistanceFromCenterForValue(value) {\n if (isNullOrUndef(value)) {\n return NaN;\n }\n\n // Take into account half font size + the yPadding of the top value\n const scalingFactor = this.drawingArea / (this.max - this.min);\n if (this.options.reverse) {\n return (this.max - value) * scalingFactor;\n }\n return (value - this.min) * scalingFactor;\n }\n\n getValueForDistanceFromCenter(distance) {\n if (isNullOrUndef(distance)) {\n return NaN;\n }\n\n const scaledDistance = distance / (this.drawingArea / (this.max - this.min));\n return this.options.reverse ? this.max - scaledDistance : this.min + scaledDistance;\n }\n\n getPointLabelContext(index) {\n const pointLabels = this._pointLabels || [];\n\n if (index >= 0 && index < pointLabels.length) {\n const pointLabel = pointLabels[index];\n return createPointLabelContext(this.getContext(), index, pointLabel);\n }\n }\n\n getPointPosition(index, distanceFromCenter, additionalAngle = 0) {\n const angle = this.getIndexAngle(index) - HALF_PI + additionalAngle;\n return {\n x: Math.cos(angle) * distanceFromCenter + this.xCenter,\n y: Math.sin(angle) * distanceFromCenter + this.yCenter,\n angle\n };\n }\n\n getPointPositionForValue(index, value) {\n return this.getPointPosition(index, this.getDistanceFromCenterForValue(value));\n }\n\n getBasePosition(index) {\n return this.getPointPositionForValue(index || 0, this.getBaseValue());\n }\n\n getPointLabelPosition(index) {\n const {left, top, right, bottom} = this._pointLabelItems[index];\n return {\n left,\n top,\n right,\n bottom,\n };\n }\n\n /**\n\t * @protected\n\t */\n drawBackground() {\n const {backgroundColor, grid: {circular}} = this.options;\n if (backgroundColor) {\n const ctx = this.ctx;\n ctx.save();\n ctx.beginPath();\n pathRadiusLine(this, this.getDistanceFromCenterForValue(this._endValue), circular, this._pointLabels.length);\n ctx.closePath();\n ctx.fillStyle = backgroundColor;\n ctx.fill();\n ctx.restore();\n }\n }\n\n /**\n\t * @protected\n\t */\n drawGrid() {\n const ctx = this.ctx;\n const opts = this.options;\n const {angleLines, grid, border} = opts;\n const labelCount = this._pointLabels.length;\n\n let i, offset, position;\n\n if (opts.pointLabels.display) {\n drawPointLabels(this, labelCount);\n }\n\n if (grid.display) {\n this.ticks.forEach((tick, index) => {\n if (index !== 0) {\n offset = this.getDistanceFromCenterForValue(tick.value);\n const context = this.getContext(index);\n const optsAtIndex = grid.setContext(context);\n const optsAtIndexBorder = border.setContext(context);\n\n drawRadiusLine(this, optsAtIndex, offset, labelCount, optsAtIndexBorder);\n }\n });\n }\n\n if (angleLines.display) {\n ctx.save();\n\n for (i = labelCount - 1; i >= 0; i--) {\n const optsAtIndex = angleLines.setContext(this.getPointLabelContext(i));\n const {color, lineWidth} = optsAtIndex;\n\n if (!lineWidth || !color) {\n continue;\n }\n\n ctx.lineWidth = lineWidth;\n ctx.strokeStyle = color;\n\n ctx.setLineDash(optsAtIndex.borderDash);\n ctx.lineDashOffset = optsAtIndex.borderDashOffset;\n\n offset = this.getDistanceFromCenterForValue(opts.ticks.reverse ? this.min : this.max);\n position = this.getPointPosition(i, offset);\n ctx.beginPath();\n ctx.moveTo(this.xCenter, this.yCenter);\n ctx.lineTo(position.x, position.y);\n ctx.stroke();\n }\n\n ctx.restore();\n }\n }\n\n /**\n\t * @protected\n\t */\n drawBorder() {}\n\n /**\n\t * @protected\n\t */\n drawLabels() {\n const ctx = this.ctx;\n const opts = this.options;\n const tickOpts = opts.ticks;\n\n if (!tickOpts.display) {\n return;\n }\n\n const startAngle = this.getIndexAngle(0);\n let offset, width;\n\n ctx.save();\n ctx.translate(this.xCenter, this.yCenter);\n ctx.rotate(startAngle);\n ctx.textAlign = 'center';\n ctx.textBaseline = 'middle';\n\n this.ticks.forEach((tick, index) => {\n if (index === 0 && !opts.reverse) {\n return;\n }\n\n const optsAtIndex = tickOpts.setContext(this.getContext(index));\n const tickFont = toFont(optsAtIndex.font);\n offset = this.getDistanceFromCenterForValue(this.ticks[index].value);\n\n if (optsAtIndex.showLabelBackdrop) {\n ctx.font = tickFont.string;\n width = ctx.measureText(tick.label).width;\n ctx.fillStyle = optsAtIndex.backdropColor;\n\n const padding = toPadding(optsAtIndex.backdropPadding);\n ctx.fillRect(\n -width / 2 - padding.left,\n -offset - tickFont.size / 2 - padding.top,\n width + padding.width,\n tickFont.size + padding.height\n );\n }\n\n renderText(ctx, tick.label, 0, -offset, tickFont, {\n color: optsAtIndex.color,\n strokeColor: optsAtIndex.textStrokeColor,\n strokeWidth: optsAtIndex.textStrokeWidth,\n });\n });\n\n ctx.restore();\n }\n\n /**\n\t * @protected\n\t */\n drawTitle() {}\n}\n","import adapters from '../core/core.adapters.js';\nimport {callback as call, isFinite, isNullOrUndef, mergeIf, valueOrDefault} from '../helpers/helpers.core.js';\nimport {toRadians, isNumber, _limitValue} from '../helpers/helpers.math.js';\nimport Scale from '../core/core.scale.js';\nimport {_arrayUnique, _filterBetween, _lookup} from '../helpers/helpers.collection.js';\n\n/**\n * @typedef { import('../core/core.adapters.js').TimeUnit } Unit\n * @typedef {{common: boolean, size: number, steps?: number}} Interval\n * @typedef { import('../core/core.adapters.js').DateAdapter } DateAdapter\n */\n\n/**\n * @type {Object<Unit, Interval>}\n */\nconst INTERVALS = {\n millisecond: {common: true, size: 1, steps: 1000},\n second: {common: true, size: 1000, steps: 60},\n minute: {common: true, size: 60000, steps: 60},\n hour: {common: true, size: 3600000, steps: 24},\n day: {common: true, size: 86400000, steps: 30},\n week: {common: false, size: 604800000, steps: 4},\n month: {common: true, size: 2.628e9, steps: 12},\n quarter: {common: false, size: 7.884e9, steps: 4},\n year: {common: true, size: 3.154e10}\n};\n\n/**\n * @type {Unit[]}\n */\nconst UNITS = /** @type Unit[] */ /* #__PURE__ */ (Object.keys(INTERVALS));\n\n/**\n * @param {number} a\n * @param {number} b\n */\nfunction sorter(a, b) {\n return a - b;\n}\n\n/**\n * @param {TimeScale} scale\n * @param {*} input\n * @return {number}\n */\nfunction parse(scale, input) {\n if (isNullOrUndef(input)) {\n return null;\n }\n\n const adapter = scale._adapter;\n const {parser, round, isoWeekday} = scale._parseOpts;\n let value = input;\n\n if (typeof parser === 'function') {\n value = parser(value);\n }\n\n // Only parse if it's not a timestamp already\n if (!isFinite(value)) {\n value = typeof parser === 'string'\n ? adapter.parse(value, /** @type {Unit} */ (parser))\n : adapter.parse(value);\n }\n\n if (value === null) {\n return null;\n }\n\n if (round) {\n value = round === 'week' && (isNumber(isoWeekday) || isoWeekday === true)\n ? adapter.startOf(value, 'isoWeek', isoWeekday)\n : adapter.startOf(value, round);\n }\n\n return +value;\n}\n\n/**\n * Figures out what unit results in an appropriate number of auto-generated ticks\n * @param {Unit} minUnit\n * @param {number} min\n * @param {number} max\n * @param {number} capacity\n * @return {object}\n */\nfunction determineUnitForAutoTicks(minUnit, min, max, capacity) {\n const ilen = UNITS.length;\n\n for (let i = UNITS.indexOf(minUnit); i < ilen - 1; ++i) {\n const interval = INTERVALS[UNITS[i]];\n const factor = interval.steps ? interval.steps : Number.MAX_SAFE_INTEGER;\n\n if (interval.common && Math.ceil((max - min) / (factor * interval.size)) <= capacity) {\n return UNITS[i];\n }\n }\n\n return UNITS[ilen - 1];\n}\n\n/**\n * Figures out what unit to format a set of ticks with\n * @param {TimeScale} scale\n * @param {number} numTicks\n * @param {Unit} minUnit\n * @param {number} min\n * @param {number} max\n * @return {Unit}\n */\nfunction determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\n for (let i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {\n const unit = UNITS[i];\n if (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\n return unit;\n }\n }\n\n return UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}\n\n/**\n * @param {Unit} unit\n * @return {object}\n */\nfunction determineMajorUnit(unit) {\n for (let i = UNITS.indexOf(unit) + 1, ilen = UNITS.length; i < ilen; ++i) {\n if (INTERVALS[UNITS[i]].common) {\n return UNITS[i];\n }\n }\n}\n\n/**\n * @param {object} ticks\n * @param {number} time\n * @param {number[]} [timestamps] - if defined, snap to these timestamps\n */\nfunction addTick(ticks, time, timestamps) {\n if (!timestamps) {\n ticks[time] = true;\n } else if (timestamps.length) {\n const {lo, hi} = _lookup(timestamps, time);\n const timestamp = timestamps[lo] >= time ? timestamps[lo] : timestamps[hi];\n ticks[timestamp] = true;\n }\n}\n\n/**\n * @param {TimeScale} scale\n * @param {object[]} ticks\n * @param {object} map\n * @param {Unit} majorUnit\n * @return {object[]}\n */\nfunction setMajorTicks(scale, ticks, map, majorUnit) {\n const adapter = scale._adapter;\n const first = +adapter.startOf(ticks[0].value, majorUnit);\n const last = ticks[ticks.length - 1].value;\n let major, index;\n\n for (major = first; major <= last; major = +adapter.add(major, 1, majorUnit)) {\n index = map[major];\n if (index >= 0) {\n ticks[index].major = true;\n }\n }\n return ticks;\n}\n\n/**\n * @param {TimeScale} scale\n * @param {number[]} values\n * @param {Unit|undefined} [majorUnit]\n * @return {object[]}\n */\nfunction ticksFromTimestamps(scale, values, majorUnit) {\n const ticks = [];\n /** @type {Object<number,object>} */\n const map = {};\n const ilen = values.length;\n let i, value;\n\n for (i = 0; i < ilen; ++i) {\n value = values[i];\n map[value] = i;\n\n ticks.push({\n value,\n major: false\n });\n }\n\n // We set the major ticks separately from the above loop because calling startOf for every tick\n // is expensive when there is a large number of ticks\n return (ilen === 0 || !majorUnit) ? ticks : setMajorTicks(scale, ticks, map, majorUnit);\n}\n\nexport default class TimeScale extends Scale {\n\n static id = 'time';\n\n /**\n * @type {any}\n */\n static defaults = {\n /**\n * Scale boundary strategy (bypassed by min/max time options)\n * - `data`: make sure data are fully visible, ticks outside are removed\n * - `ticks`: make sure ticks are fully visible, data outside are truncated\n * @see https://github.com/chartjs/Chart.js/pull/4556\n * @since 2.7.0\n */\n bounds: 'data',\n\n adapters: {},\n time: {\n parser: false, // false == a pattern string from or a custom callback that converts its argument to a timestamp\n unit: false, // false == automatic or override with week, month, year, etc.\n round: false, // none, or override with week, month, year, etc.\n isoWeekday: false, // override week start day\n minUnit: 'millisecond',\n displayFormats: {}\n },\n ticks: {\n /**\n * Ticks generation input values:\n * - 'auto': generates \"optimal\" ticks based on scale size and time options.\n * - 'data': generates ticks from data (including labels from data {t|x|y} objects).\n * - 'labels': generates ticks from user given `data.labels` values ONLY.\n * @see https://github.com/chartjs/Chart.js/pull/4507\n * @since 2.7.0\n */\n source: 'auto',\n\n callback: false,\n\n major: {\n enabled: false\n }\n }\n };\n\n /**\n\t * @param {object} props\n\t */\n constructor(props) {\n super(props);\n\n /** @type {{data: number[], labels: number[], all: number[]}} */\n this._cache = {\n data: [],\n labels: [],\n all: []\n };\n\n /** @type {Unit} */\n this._unit = 'day';\n /** @type {Unit=} */\n this._majorUnit = undefined;\n this._offsets = {};\n this._normalized = false;\n this._parseOpts = undefined;\n }\n\n init(scaleOpts, opts = {}) {\n const time = scaleOpts.time || (scaleOpts.time = {});\n /** @type {DateAdapter} */\n const adapter = this._adapter = new adapters._date(scaleOpts.adapters.date);\n\n adapter.init(opts);\n\n // Backward compatibility: before introducing adapter, `displayFormats` was\n // supposed to contain *all* unit/string pairs but this can't be resolved\n // when loading the scale (adapters are loaded afterward), so let's populate\n // missing formats on update\n mergeIf(time.displayFormats, adapter.formats());\n\n this._parseOpts = {\n parser: time.parser,\n round: time.round,\n isoWeekday: time.isoWeekday\n };\n\n super.init(scaleOpts);\n\n this._normalized = opts.normalized;\n }\n\n /**\n\t * @param {*} raw\n\t * @param {number?} [index]\n\t * @return {number}\n\t */\n parse(raw, index) { // eslint-disable-line no-unused-vars\n if (raw === undefined) {\n return null;\n }\n return parse(this, raw);\n }\n\n beforeLayout() {\n super.beforeLayout();\n this._cache = {\n data: [],\n labels: [],\n all: []\n };\n }\n\n determineDataLimits() {\n const options = this.options;\n const adapter = this._adapter;\n const unit = options.time.unit || 'day';\n // eslint-disable-next-line prefer-const\n let {min, max, minDefined, maxDefined} = this.getUserBounds();\n\n /**\n\t\t * @param {object} bounds\n\t\t */\n function _applyBounds(bounds) {\n if (!minDefined && !isNaN(bounds.min)) {\n min = Math.min(min, bounds.min);\n }\n if (!maxDefined && !isNaN(bounds.max)) {\n max = Math.max(max, bounds.max);\n }\n }\n\n // If we have user provided `min` and `max` labels / data bounds can be ignored\n if (!minDefined || !maxDefined) {\n // Labels are always considered, when user did not force bounds\n _applyBounds(this._getLabelBounds());\n\n // If `bounds` is `'ticks'` and `ticks.source` is `'labels'`,\n // data bounds are ignored (and don't need to be determined)\n if (options.bounds !== 'ticks' || options.ticks.source !== 'labels') {\n _applyBounds(this.getMinMax(false));\n }\n }\n\n min = isFinite(min) && !isNaN(min) ? min : +adapter.startOf(Date.now(), unit);\n max = isFinite(max) && !isNaN(max) ? max : +adapter.endOf(Date.now(), unit) + 1;\n\n // Make sure that max is strictly higher than min (required by the timeseries lookup table)\n this.min = Math.min(min, max - 1);\n this.max = Math.max(min + 1, max);\n }\n\n /**\n\t * @private\n\t */\n _getLabelBounds() {\n const arr = this.getLabelTimestamps();\n let min = Number.POSITIVE_INFINITY;\n let max = Number.NEGATIVE_INFINITY;\n\n if (arr.length) {\n min = arr[0];\n max = arr[arr.length - 1];\n }\n return {min, max};\n }\n\n /**\n\t * @return {object[]}\n\t */\n buildTicks() {\n const options = this.options;\n const timeOpts = options.time;\n const tickOpts = options.ticks;\n const timestamps = tickOpts.source === 'labels' ? this.getLabelTimestamps() : this._generate();\n\n if (options.bounds === 'ticks' && timestamps.length) {\n this.min = this._userMin || timestamps[0];\n this.max = this._userMax || timestamps[timestamps.length - 1];\n }\n\n const min = this.min;\n const max = this.max;\n\n const ticks = _filterBetween(timestamps, min, max);\n\n // PRIVATE\n // determineUnitForFormatting relies on the number of ticks so we don't use it when\n // autoSkip is enabled because we don't yet know what the final number of ticks will be\n this._unit = timeOpts.unit || (tickOpts.autoSkip\n ? determineUnitForAutoTicks(timeOpts.minUnit, this.min, this.max, this._getLabelCapacity(min))\n : determineUnitForFormatting(this, ticks.length, timeOpts.minUnit, this.min, this.max));\n this._majorUnit = !tickOpts.major.enabled || this._unit === 'year' ? undefined\n : determineMajorUnit(this._unit);\n this.initOffsets(timestamps);\n\n if (options.reverse) {\n ticks.reverse();\n }\n\n return ticksFromTimestamps(this, ticks, this._majorUnit);\n }\n\n afterAutoSkip() {\n // Offsets for bar charts need to be handled with the auto skipped\n // ticks. Once ticks have been skipped, we re-compute the offsets.\n if (this.options.offsetAfterAutoskip) {\n this.initOffsets(this.ticks.map(tick => +tick.value));\n }\n }\n\n /**\n\t * Returns the start and end offsets from edges in the form of {start, end}\n\t * where each value is a relative width to the scale and ranges between 0 and 1.\n\t * They add extra margins on the both sides by scaling down the original scale.\n\t * Offsets are added when the `offset` option is true.\n\t * @param {number[]} timestamps\n\t * @protected\n\t */\n initOffsets(timestamps = []) {\n let start = 0;\n let end = 0;\n let first, last;\n\n if (this.options.offset && timestamps.length) {\n first = this.getDecimalForValue(timestamps[0]);\n if (timestamps.length === 1) {\n start = 1 - first;\n } else {\n start = (this.getDecimalForValue(timestamps[1]) - first) / 2;\n }\n last = this.getDecimalForValue(timestamps[timestamps.length - 1]);\n if (timestamps.length === 1) {\n end = last;\n } else {\n end = (last - this.getDecimalForValue(timestamps[timestamps.length - 2])) / 2;\n }\n }\n const limit = timestamps.length < 3 ? 0.5 : 0.25;\n start = _limitValue(start, 0, limit);\n end = _limitValue(end, 0, limit);\n\n this._offsets = {start, end, factor: 1 / (start + 1 + end)};\n }\n\n /**\n\t * Generates a maximum of `capacity` timestamps between min and max, rounded to the\n\t * `minor` unit using the given scale time `options`.\n\t * Important: this method can return ticks outside the min and max range, it's the\n\t * responsibility of the calling code to clamp values if needed.\n\t * @protected\n\t */\n _generate() {\n const adapter = this._adapter;\n const min = this.min;\n const max = this.max;\n const options = this.options;\n const timeOpts = options.time;\n // @ts-ignore\n const minor = timeOpts.unit || determineUnitForAutoTicks(timeOpts.minUnit, min, max, this._getLabelCapacity(min));\n const stepSize = valueOrDefault(options.ticks.stepSize, 1);\n const weekday = minor === 'week' ? timeOpts.isoWeekday : false;\n const hasWeekday = isNumber(weekday) || weekday === true;\n const ticks = {};\n let first = min;\n let time, count;\n\n // For 'week' unit, handle the first day of week option\n if (hasWeekday) {\n first = +adapter.startOf(first, 'isoWeek', weekday);\n }\n\n // Align first ticks on unit\n first = +adapter.startOf(first, hasWeekday ? 'day' : minor);\n\n // Prevent browser from freezing in case user options request millions of milliseconds\n if (adapter.diff(max, min, minor) > 100000 * stepSize) {\n throw new Error(min + ' and ' + max + ' are too far apart with stepSize of ' + stepSize + ' ' + minor);\n }\n\n const timestamps = options.ticks.source === 'data' && this.getDataTimestamps();\n for (time = first, count = 0; time < max; time = +adapter.add(time, stepSize, minor), count++) {\n addTick(ticks, time, timestamps);\n }\n\n if (time === max || options.bounds === 'ticks' || count === 1) {\n addTick(ticks, time, timestamps);\n }\n\n // @ts-ignore\n return Object.keys(ticks).sort(sorter).map(x => +x);\n }\n\n /**\n\t * @param {number} value\n\t * @return {string}\n\t */\n getLabelForValue(value) {\n const adapter = this._adapter;\n const timeOpts = this.options.time;\n\n if (timeOpts.tooltipFormat) {\n return adapter.format(value, timeOpts.tooltipFormat);\n }\n return adapter.format(value, timeOpts.displayFormats.datetime);\n }\n\n /**\n\t * @param {number} value\n\t * @param {string|undefined} format\n\t * @return {string}\n\t */\n format(value, format) {\n const options = this.options;\n const formats = options.time.displayFormats;\n const unit = this._unit;\n const fmt = format || formats[unit];\n return this._adapter.format(value, fmt);\n }\n\n /**\n\t * Function to format an individual tick mark\n\t * @param {number} time\n\t * @param {number} index\n\t * @param {object[]} ticks\n\t * @param {string|undefined} [format]\n\t * @return {string}\n\t * @private\n\t */\n _tickFormatFunction(time, index, ticks, format) {\n const options = this.options;\n const formatter = options.ticks.callback;\n\n if (formatter) {\n return call(formatter, [time, index, ticks], this);\n }\n\n const formats = options.time.displayFormats;\n const unit = this._unit;\n const majorUnit = this._majorUnit;\n const minorFormat = unit && formats[unit];\n const majorFormat = majorUnit && formats[majorUnit];\n const tick = ticks[index];\n const major = majorUnit && majorFormat && tick && tick.major;\n\n return this._adapter.format(time, format || (major ? majorFormat : minorFormat));\n }\n\n /**\n\t * @param {object[]} ticks\n\t */\n generateTickLabels(ticks) {\n let i, ilen, tick;\n\n for (i = 0, ilen = ticks.length; i < ilen; ++i) {\n tick = ticks[i];\n tick.label = this._tickFormatFunction(tick.value, i, ticks);\n }\n }\n\n /**\n\t * @param {number} value - Milliseconds since epoch (1 January 1970 00:00:00 UTC)\n\t * @return {number}\n\t */\n getDecimalForValue(value) {\n return value === null ? NaN : (value - this.min) / (this.max - this.min);\n }\n\n /**\n\t * @param {number} value - Milliseconds since epoch (1 January 1970 00:00:00 UTC)\n\t * @return {number}\n\t */\n getPixelForValue(value) {\n const offsets = this._offsets;\n const pos = this.getDecimalForValue(value);\n return this.getPixelForDecimal((offsets.start + pos) * offsets.factor);\n }\n\n /**\n\t * @param {number} pixel\n\t * @return {number}\n\t */\n getValueForPixel(pixel) {\n const offsets = this._offsets;\n const pos = this.getDecimalForPixel(pixel) / offsets.factor - offsets.end;\n return this.min + pos * (this.max - this.min);\n }\n\n /**\n\t * @param {string} label\n\t * @return {{w:number, h:number}}\n\t * @private\n\t */\n _getLabelSize(label) {\n const ticksOpts = this.options.ticks;\n const tickLabelWidth = this.ctx.measureText(label).width;\n const angle = toRadians(this.isHorizontal() ? ticksOpts.maxRotation : ticksOpts.minRotation);\n const cosRotation = Math.cos(angle);\n const sinRotation = Math.sin(angle);\n const tickFontSize = this._resolveTickFontOptions(0).size;\n\n return {\n w: (tickLabelWidth * cosRotation) + (tickFontSize * sinRotation),\n h: (tickLabelWidth * sinRotation) + (tickFontSize * cosRotation)\n };\n }\n\n /**\n\t * @param {number} exampleTime\n\t * @return {number}\n\t * @private\n\t */\n _getLabelCapacity(exampleTime) {\n const timeOpts = this.options.time;\n const displayFormats = timeOpts.displayFormats;\n\n // pick the longest format (milliseconds) for guesstimation\n const format = displayFormats[timeOpts.unit] || displayFormats.millisecond;\n const exampleLabel = this._tickFormatFunction(exampleTime, 0, ticksFromTimestamps(this, [exampleTime], this._majorUnit), format);\n const size = this._getLabelSize(exampleLabel);\n // subtract 1 - if offset then there's one less label than tick\n // if not offset then one half label padding is added to each end leaving room for one less label\n const capacity = Math.floor(this.isHorizontal() ? this.width / size.w : this.height / size.h) - 1;\n return capacity > 0 ? capacity : 1;\n }\n\n /**\n\t * @protected\n\t */\n getDataTimestamps() {\n let timestamps = this._cache.data || [];\n let i, ilen;\n\n if (timestamps.length) {\n return timestamps;\n }\n\n const metas = this.getMatchingVisibleMetas();\n\n if (this._normalized && metas.length) {\n return (this._cache.data = metas[0].controller.getAllParsedValues(this));\n }\n\n for (i = 0, ilen = metas.length; i < ilen; ++i) {\n timestamps = timestamps.concat(metas[i].controller.getAllParsedValues(this));\n }\n\n return (this._cache.data = this.normalize(timestamps));\n }\n\n /**\n\t * @protected\n\t */\n getLabelTimestamps() {\n const timestamps = this._cache.labels || [];\n let i, ilen;\n\n if (timestamps.length) {\n return timestamps;\n }\n\n const labels = this.getLabels();\n for (i = 0, ilen = labels.length; i < ilen; ++i) {\n timestamps.push(parse(this, labels[i]));\n }\n\n return (this._cache.labels = this._normalized ? timestamps : this.normalize(timestamps));\n }\n\n /**\n\t * @param {number[]} values\n\t * @protected\n\t */\n normalize(values) {\n // It seems to be somewhat faster to do sorting first\n return _arrayUnique(values.sort(sorter));\n }\n}\n","import TimeScale from './scale.time.js';\nimport {_lookupByKey} from '../helpers/helpers.collection.js';\n\n/**\n * Linearly interpolates the given source `val` using the table. If value is out of bounds, values\n * at edges are used for the interpolation.\n * @param {object} table\n * @param {number} val\n * @param {boolean} [reverse] lookup time based on position instead of vice versa\n * @return {object}\n */\nfunction interpolate(table, val, reverse) {\n let lo = 0;\n let hi = table.length - 1;\n let prevSource, nextSource, prevTarget, nextTarget;\n if (reverse) {\n if (val >= table[lo].pos && val <= table[hi].pos) {\n ({lo, hi} = _lookupByKey(table, 'pos', val));\n }\n ({pos: prevSource, time: prevTarget} = table[lo]);\n ({pos: nextSource, time: nextTarget} = table[hi]);\n } else {\n if (val >= table[lo].time && val <= table[hi].time) {\n ({lo, hi} = _lookupByKey(table, 'time', val));\n }\n ({time: prevSource, pos: prevTarget} = table[lo]);\n ({time: nextSource, pos: nextTarget} = table[hi]);\n }\n\n const span = nextSource - prevSource;\n return span ? prevTarget + (nextTarget - prevTarget) * (val - prevSource) / span : prevTarget;\n}\n\nclass TimeSeriesScale extends TimeScale {\n\n static id = 'timeseries';\n\n /**\n * @type {any}\n */\n static defaults = TimeScale.defaults;\n\n /**\n\t * @param {object} props\n\t */\n constructor(props) {\n super(props);\n\n /** @type {object[]} */\n this._table = [];\n /** @type {number} */\n this._minPos = undefined;\n /** @type {number} */\n this._tableRange = undefined;\n }\n\n /**\n\t * @protected\n\t */\n initOffsets() {\n const timestamps = this._getTimestampsForTable();\n const table = this._table = this.buildLookupTable(timestamps);\n this._minPos = interpolate(table, this.min);\n this._tableRange = interpolate(table, this.max) - this._minPos;\n super.initOffsets(timestamps);\n }\n\n /**\n\t * Returns an array of {time, pos} objects used to interpolate a specific `time` or position\n\t * (`pos`) on the scale, by searching entries before and after the requested value. `pos` is\n\t * a decimal between 0 and 1: 0 being the start of the scale (left or top) and 1 the other\n\t * extremity (left + width or top + height). Note that it would be more optimized to directly\n\t * store pre-computed pixels, but the scale dimensions are not guaranteed at the time we need\n\t * to create the lookup table. The table ALWAYS contains at least two items: min and max.\n\t * @param {number[]} timestamps\n\t * @return {object[]}\n\t * @protected\n\t */\n buildLookupTable(timestamps) {\n const {min, max} = this;\n const items = [];\n const table = [];\n let i, ilen, prev, curr, next;\n\n for (i = 0, ilen = timestamps.length; i < ilen; ++i) {\n curr = timestamps[i];\n if (curr >= min && curr <= max) {\n items.push(curr);\n }\n }\n\n if (items.length < 2) {\n // In case there is less that 2 timestamps between min and max, the scale is defined by min and max\n return [\n {time: min, pos: 0},\n {time: max, pos: 1}\n ];\n }\n\n for (i = 0, ilen = items.length; i < ilen; ++i) {\n next = items[i + 1];\n prev = items[i - 1];\n curr = items[i];\n\n // only add points that breaks the scale linearity\n if (Math.round((next + prev) / 2) !== curr) {\n table.push({time: curr, pos: i / (ilen - 1)});\n }\n }\n return table;\n }\n\n /**\n * Generates all timestamps defined in the data.\n * Important: this method can return ticks outside the min and max range, it's the\n * responsibility of the calling code to clamp values if needed.\n * @protected\n */\n _generate() {\n const min = this.min;\n const max = this.max;\n let timestamps = super.getDataTimestamps();\n if (!timestamps.includes(min) || !timestamps.length) {\n timestamps.splice(0, 0, min);\n }\n if (!timestamps.includes(max) || timestamps.length === 1) {\n timestamps.push(max);\n }\n return timestamps.sort((a, b) => a - b);\n }\n\n /**\n\t * Returns all timestamps\n\t * @return {number[]}\n\t * @private\n\t */\n _getTimestampsForTable() {\n let timestamps = this._cache.all || [];\n\n if (timestamps.length) {\n return timestamps;\n }\n\n const data = this.getDataTimestamps();\n const label = this.getLabelTimestamps();\n if (data.length && label.length) {\n // If combining labels and data (data might not contain all labels),\n // we need to recheck uniqueness and sort\n timestamps = this.normalize(data.concat(label));\n } else {\n timestamps = data.length ? data : label;\n }\n timestamps = this._cache.all = timestamps;\n\n return timestamps;\n }\n\n /**\n\t * @param {number} value - Milliseconds since epoch (1 January 1970 00:00:00 UTC)\n\t * @return {number}\n\t */\n getDecimalForValue(value) {\n return (interpolate(this._table, value) - this._minPos) / this._tableRange;\n }\n\n /**\n\t * @param {number} pixel\n\t * @return {number}\n\t */\n getValueForPixel(pixel) {\n const offsets = this._offsets;\n const decimal = this.getDecimalForPixel(pixel) / offsets.factor - offsets.end;\n return interpolate(this._table, decimal * this._tableRange + this._minPos, true);\n }\n}\n\nexport default TimeSeriesScale;\n","import {DoughnutController, PolarAreaController} from '../index.js';\nimport type {Chart, ChartDataset} from '../types.js';\n\nexport interface ColorsPluginOptions {\n enabled?: boolean;\n forceOverride?: boolean;\n}\n\ninterface ColorsDescriptor {\n backgroundColor?: unknown;\n borderColor?: unknown;\n}\n\nconst BORDER_COLORS = [\n 'rgb(54, 162, 235)', // blue\n 'rgb(255, 99, 132)', // red\n 'rgb(255, 159, 64)', // orange\n 'rgb(255, 205, 86)', // yellow\n 'rgb(75, 192, 192)', // green\n 'rgb(153, 102, 255)', // purple\n 'rgb(201, 203, 207)' // grey\n];\n\n// Border colors with 50% transparency\nconst BACKGROUND_COLORS = /* #__PURE__ */ BORDER_COLORS.map(color => color.replace('rgb(', 'rgba(').replace(')', ', 0.5)'));\n\nfunction getBorderColor(i: number) {\n return BORDER_COLORS[i % BORDER_COLORS.length];\n}\n\nfunction getBackgroundColor(i: number) {\n return BACKGROUND_COLORS[i % BACKGROUND_COLORS.length];\n}\n\nfunction colorizeDefaultDataset(dataset: ChartDataset, i: number) {\n dataset.borderColor = getBorderColor(i);\n dataset.backgroundColor = getBackgroundColor(i);\n\n return ++i;\n}\n\nfunction colorizeDoughnutDataset(dataset: ChartDataset, i: number) {\n dataset.backgroundColor = dataset.data.map(() => getBorderColor(i++));\n\n return i;\n}\n\nfunction colorizePolarAreaDataset(dataset: ChartDataset, i: number) {\n dataset.backgroundColor = dataset.data.map(() => getBackgroundColor(i++));\n\n return i;\n}\n\nfunction getColorizer(chart: Chart) {\n let i = 0;\n\n return (dataset: ChartDataset, datasetIndex: number) => {\n const controller = chart.getDatasetMeta(datasetIndex).controller;\n\n if (controller instanceof DoughnutController) {\n i = colorizeDoughnutDataset(dataset, i);\n } else if (controller instanceof PolarAreaController) {\n i = colorizePolarAreaDataset(dataset, i);\n } else if (controller) {\n i = colorizeDefaultDataset(dataset, i);\n }\n };\n}\n\nfunction containsColorsDefinitions(\n descriptors: ColorsDescriptor[] | Record<string, ColorsDescriptor>\n) {\n let k: number | string;\n\n for (k in descriptors) {\n if (descriptors[k].borderColor || descriptors[k].backgroundColor) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction containsColorsDefinition(\n descriptor: ColorsDescriptor\n) {\n return descriptor && (descriptor.borderColor || descriptor.backgroundColor);\n}\n\nexport default {\n id: 'colors',\n\n defaults: {\n enabled: true,\n forceOverride: false\n } as ColorsPluginOptions,\n\n beforeLayout(chart: Chart, _args, options: ColorsPluginOptions) {\n if (!options.enabled) {\n return;\n }\n\n const {\n data: {datasets},\n options: chartOptions\n } = chart.config;\n const {elements} = chartOptions;\n\n if (!options.forceOverride && (containsColorsDefinitions(datasets) || containsColorsDefinition(chartOptions) || (elements && containsColorsDefinitions(elements)))) {\n return;\n }\n\n const colorizer = getColorizer(chart);\n\n datasets.forEach(colorizer);\n }\n};\n","import {_limitValue, _lookupByKey, isNullOrUndef, resolve} from '../helpers/index.js';\n\nfunction lttbDecimation(data, start, count, availableWidth, options) {\n /**\n * Implementation of the Largest Triangle Three Buckets algorithm.\n *\n * This implementation is based on the original implementation by Sveinn Steinarsson\n * in https://github.com/sveinn-steinarsson/flot-downsample/blob/master/jquery.flot.downsample.js\n *\n * The original implementation is MIT licensed.\n */\n const samples = options.samples || availableWidth;\n // There are less points than the threshold, returning the whole array\n if (samples >= count) {\n return data.slice(start, start + count);\n }\n\n const decimated = [];\n\n const bucketWidth = (count - 2) / (samples - 2);\n let sampledIndex = 0;\n const endIndex = start + count - 1;\n // Starting from offset\n let a = start;\n let i, maxAreaPoint, maxArea, area, nextA;\n\n decimated[sampledIndex++] = data[a];\n\n for (i = 0; i < samples - 2; i++) {\n let avgX = 0;\n let avgY = 0;\n let j;\n\n // Adding offset\n const avgRangeStart = Math.floor((i + 1) * bucketWidth) + 1 + start;\n const avgRangeEnd = Math.min(Math.floor((i + 2) * bucketWidth) + 1, count) + start;\n const avgRangeLength = avgRangeEnd - avgRangeStart;\n\n for (j = avgRangeStart; j < avgRangeEnd; j++) {\n avgX += data[j].x;\n avgY += data[j].y;\n }\n\n avgX /= avgRangeLength;\n avgY /= avgRangeLength;\n\n // Adding offset\n const rangeOffs = Math.floor(i * bucketWidth) + 1 + start;\n const rangeTo = Math.min(Math.floor((i + 1) * bucketWidth) + 1, count) + start;\n const {x: pointAx, y: pointAy} = data[a];\n\n // Note that this is changed from the original algorithm which initializes these\n // values to 1. The reason for this change is that if the area is small, nextA\n // would never be set and thus a crash would occur in the next loop as `a` would become\n // `undefined`. Since the area is always positive, but could be 0 in the case of a flat trace,\n // initializing with a negative number is the correct solution.\n maxArea = area = -1;\n\n for (j = rangeOffs; j < rangeTo; j++) {\n area = 0.5 * Math.abs(\n (pointAx - avgX) * (data[j].y - pointAy) -\n (pointAx - data[j].x) * (avgY - pointAy)\n );\n\n if (area > maxArea) {\n maxArea = area;\n maxAreaPoint = data[j];\n nextA = j;\n }\n }\n\n decimated[sampledIndex++] = maxAreaPoint;\n a = nextA;\n }\n\n // Include the last point\n decimated[sampledIndex++] = data[endIndex];\n\n return decimated;\n}\n\nfunction minMaxDecimation(data, start, count, availableWidth) {\n let avgX = 0;\n let countX = 0;\n let i, point, x, y, prevX, minIndex, maxIndex, startIndex, minY, maxY;\n const decimated = [];\n const endIndex = start + count - 1;\n\n const xMin = data[start].x;\n const xMax = data[endIndex].x;\n const dx = xMax - xMin;\n\n for (i = start; i < start + count; ++i) {\n point = data[i];\n x = (point.x - xMin) / dx * availableWidth;\n y = point.y;\n const truncX = x | 0;\n\n if (truncX === prevX) {\n // Determine `minY` / `maxY` and `avgX` while we stay within same x-position\n if (y < minY) {\n minY = y;\n minIndex = i;\n } else if (y > maxY) {\n maxY = y;\n maxIndex = i;\n }\n // For first point in group, countX is `0`, so average will be `x` / 1.\n // Use point.x here because we're computing the average data `x` value\n avgX = (countX * avgX + point.x) / ++countX;\n } else {\n // Push up to 4 points, 3 for the last interval and the first point for this interval\n const lastIndex = i - 1;\n\n if (!isNullOrUndef(minIndex) && !isNullOrUndef(maxIndex)) {\n // The interval is defined by 4 points: start, min, max, end.\n // The starting point is already considered at this point, so we need to determine which\n // of the other points to add. We need to sort these points to ensure the decimated data\n // is still sorted and then ensure there are no duplicates.\n const intermediateIndex1 = Math.min(minIndex, maxIndex);\n const intermediateIndex2 = Math.max(minIndex, maxIndex);\n\n if (intermediateIndex1 !== startIndex && intermediateIndex1 !== lastIndex) {\n decimated.push({\n ...data[intermediateIndex1],\n x: avgX,\n });\n }\n if (intermediateIndex2 !== startIndex && intermediateIndex2 !== lastIndex) {\n decimated.push({\n ...data[intermediateIndex2],\n x: avgX\n });\n }\n }\n\n // lastIndex === startIndex will occur when a range has only 1 point which could\n // happen with very uneven data\n if (i > 0 && lastIndex !== startIndex) {\n // Last point in the previous interval\n decimated.push(data[lastIndex]);\n }\n\n // Start of the new interval\n decimated.push(point);\n prevX = truncX;\n countX = 0;\n minY = maxY = y;\n minIndex = maxIndex = startIndex = i;\n }\n }\n\n return decimated;\n}\n\nfunction cleanDecimatedDataset(dataset) {\n if (dataset._decimated) {\n const data = dataset._data;\n delete dataset._decimated;\n delete dataset._data;\n Object.defineProperty(dataset, 'data', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: data,\n });\n }\n}\n\nfunction cleanDecimatedData(chart) {\n chart.data.datasets.forEach((dataset) => {\n cleanDecimatedDataset(dataset);\n });\n}\n\nfunction getStartAndCountOfVisiblePointsSimplified(meta, points) {\n const pointCount = points.length;\n\n let start = 0;\n let count;\n\n const {iScale} = meta;\n const {min, max, minDefined, maxDefined} = iScale.getUserBounds();\n\n if (minDefined) {\n start = _limitValue(_lookupByKey(points, iScale.axis, min).lo, 0, pointCount - 1);\n }\n if (maxDefined) {\n count = _limitValue(_lookupByKey(points, iScale.axis, max).hi + 1, start, pointCount) - start;\n } else {\n count = pointCount - start;\n }\n\n return {start, count};\n}\n\nexport default {\n id: 'decimation',\n\n defaults: {\n algorithm: 'min-max',\n enabled: false,\n },\n\n beforeElementsUpdate: (chart, args, options) => {\n if (!options.enabled) {\n // The decimation plugin may have been previously enabled. Need to remove old `dataset._data` handlers\n cleanDecimatedData(chart);\n return;\n }\n\n // Assume the entire chart is available to show a few more points than needed\n const availableWidth = chart.width;\n\n chart.data.datasets.forEach((dataset, datasetIndex) => {\n const {_data, indexAxis} = dataset;\n const meta = chart.getDatasetMeta(datasetIndex);\n const data = _data || dataset.data;\n\n if (resolve([indexAxis, chart.options.indexAxis]) === 'y') {\n // Decimation is only supported for lines that have an X indexAxis\n return;\n }\n\n if (!meta.controller.supportsDecimation) {\n // Only line datasets are supported\n return;\n }\n\n const xAxis = chart.scales[meta.xAxisID];\n if (xAxis.type !== 'linear' && xAxis.type !== 'time') {\n // Only linear interpolation is supported\n return;\n }\n\n if (chart.options.parsing) {\n // Plugin only supports data that does not need parsing\n return;\n }\n\n let {start, count} = getStartAndCountOfVisiblePointsSimplified(meta, data);\n const threshold = options.threshold || 4 * availableWidth;\n if (count <= threshold) {\n // No decimation is required until we are above this threshold\n cleanDecimatedDataset(dataset);\n return;\n }\n\n if (isNullOrUndef(_data)) {\n // First time we are seeing this dataset\n // We override the 'data' property with a setter that stores the\n // raw data in _data, but reads the decimated data from _decimated\n dataset._data = data;\n delete dataset.data;\n Object.defineProperty(dataset, 'data', {\n configurable: true,\n enumerable: true,\n get: function() {\n return this._decimated;\n },\n set: function(d) {\n this._data = d;\n }\n });\n }\n\n // Point the chart to the decimated data\n let decimated;\n switch (options.algorithm) {\n case 'lttb':\n decimated = lttbDecimation(data, start, count, availableWidth, options);\n break;\n case 'min-max':\n decimated = minMaxDecimation(data, start, count, availableWidth);\n break;\n default:\n throw new Error(`Unsupported decimation algorithm '${options.algorithm}'`);\n }\n\n dataset._decimated = decimated;\n });\n },\n\n destroy(chart) {\n cleanDecimatedData(chart);\n }\n};\n","import {_boundSegment, _boundSegments, _normalizeAngle} from '../../helpers/index.js';\n\nexport function _segments(line, target, property) {\n const segments = line.segments;\n const points = line.points;\n const tpoints = target.points;\n const parts = [];\n\n for (const segment of segments) {\n let {start, end} = segment;\n end = _findSegmentEnd(start, end, points);\n\n const bounds = _getBounds(property, points[start], points[end], segment.loop);\n\n if (!target.segments) {\n // Special case for boundary not supporting `segments` (simpleArc)\n // Bounds are provided as `target` for partial circle, or undefined for full circle\n parts.push({\n source: segment,\n target: bounds,\n start: points[start],\n end: points[end]\n });\n continue;\n }\n\n // Get all segments from `target` that intersect the bounds of current segment of `line`\n const targetSegments = _boundSegments(target, bounds);\n\n for (const tgt of targetSegments) {\n const subBounds = _getBounds(property, tpoints[tgt.start], tpoints[tgt.end], tgt.loop);\n const fillSources = _boundSegment(segment, points, subBounds);\n\n for (const fillSource of fillSources) {\n parts.push({\n source: fillSource,\n target: tgt,\n start: {\n [property]: _getEdge(bounds, subBounds, 'start', Math.max)\n },\n end: {\n [property]: _getEdge(bounds, subBounds, 'end', Math.min)\n }\n });\n }\n }\n }\n return parts;\n}\n\nexport function _getBounds(property, first, last, loop) {\n if (loop) {\n return;\n }\n let start = first[property];\n let end = last[property];\n\n if (property === 'angle') {\n start = _normalizeAngle(start);\n end = _normalizeAngle(end);\n }\n return {property, start, end};\n}\n\nexport function _pointsFromSegments(boundary, line) {\n const {x = null, y = null} = boundary || {};\n const linePoints = line.points;\n const points = [];\n line.segments.forEach(({start, end}) => {\n end = _findSegmentEnd(start, end, linePoints);\n const first = linePoints[start];\n const last = linePoints[end];\n if (y !== null) {\n points.push({x: first.x, y});\n points.push({x: last.x, y});\n } else if (x !== null) {\n points.push({x, y: first.y});\n points.push({x, y: last.y});\n }\n });\n return points;\n}\n\nexport function _findSegmentEnd(start, end, points) {\n for (;end > start; end--) {\n const point = points[end];\n if (!isNaN(point.x) && !isNaN(point.y)) {\n break;\n }\n }\n return end;\n}\n\nfunction _getEdge(a, b, prop, fn) {\n if (a && b) {\n return fn(a[prop], b[prop]);\n }\n return a ? a[prop] : b ? b[prop] : 0;\n}\n","/**\n * @typedef { import('../../core/core.controller.js').default } Chart\n * @typedef { import('../../core/core.scale.js').default } Scale\n * @typedef { import('../../elements/element.point.js').default } PointElement\n */\n\nimport {LineElement} from '../../elements/index.js';\nimport {isArray} from '../../helpers/index.js';\nimport {_pointsFromSegments} from './filler.segment.js';\n\n/**\n * @param {PointElement[] | { x: number; y: number; }} boundary\n * @param {LineElement} line\n * @return {LineElement?}\n */\nexport function _createBoundaryLine(boundary, line) {\n let points = [];\n let _loop = false;\n\n if (isArray(boundary)) {\n _loop = true;\n // @ts-ignore\n points = boundary;\n } else {\n points = _pointsFromSegments(boundary, line);\n }\n\n return points.length ? new LineElement({\n points,\n options: {tension: 0},\n _loop,\n _fullLoop: _loop\n }) : null;\n}\n\nexport function _shouldApplyFill(source) {\n return source && source.fill !== false;\n}\n","import {isObject, isFinite, valueOrDefault} from '../../helpers/helpers.core.js';\n\n/**\n * @typedef { import('../../core/core.scale.js').default } Scale\n * @typedef { import('../../elements/element.line.js').default } LineElement\n * @typedef { import('../../types/index.js').FillTarget } FillTarget\n * @typedef { import('../../types/index.js').ComplexFillTarget } ComplexFillTarget\n */\n\nexport function _resolveTarget(sources, index, propagate) {\n const source = sources[index];\n let fill = source.fill;\n const visited = [index];\n let target;\n\n if (!propagate) {\n return fill;\n }\n\n while (fill !== false && visited.indexOf(fill) === -1) {\n if (!isFinite(fill)) {\n return fill;\n }\n\n target = sources[fill];\n if (!target) {\n return false;\n }\n\n if (target.visible) {\n return fill;\n }\n\n visited.push(fill);\n fill = target.fill;\n }\n\n return false;\n}\n\n/**\n * @param {LineElement} line\n * @param {number} index\n * @param {number} count\n */\nexport function _decodeFill(line, index, count) {\n /** @type {string | {value: number}} */\n const fill = parseFillOption(line);\n\n if (isObject(fill)) {\n return isNaN(fill.value) ? false : fill;\n }\n\n let target = parseFloat(fill);\n\n if (isFinite(target) && Math.floor(target) === target) {\n return decodeTargetIndex(fill[0], index, target, count);\n }\n\n return ['origin', 'start', 'end', 'stack', 'shape'].indexOf(fill) >= 0 && fill;\n}\n\nfunction decodeTargetIndex(firstCh, index, target, count) {\n if (firstCh === '-' || firstCh === '+') {\n target = index + target;\n }\n\n if (target === index || target < 0 || target >= count) {\n return false;\n }\n\n return target;\n}\n\n/**\n * @param {FillTarget | ComplexFillTarget} fill\n * @param {Scale} scale\n * @returns {number | null}\n */\nexport function _getTargetPixel(fill, scale) {\n let pixel = null;\n if (fill === 'start') {\n pixel = scale.bottom;\n } else if (fill === 'end') {\n pixel = scale.top;\n } else if (isObject(fill)) {\n // @ts-ignore\n pixel = scale.getPixelForValue(fill.value);\n } else if (scale.getBasePixel) {\n pixel = scale.getBasePixel();\n }\n return pixel;\n}\n\n/**\n * @param {FillTarget | ComplexFillTarget} fill\n * @param {Scale} scale\n * @param {number} startValue\n * @returns {number | undefined}\n */\nexport function _getTargetValue(fill, scale, startValue) {\n let value;\n\n if (fill === 'start') {\n value = startValue;\n } else if (fill === 'end') {\n value = scale.options.reverse ? scale.min : scale.max;\n } else if (isObject(fill)) {\n // @ts-ignore\n value = fill.value;\n } else {\n value = scale.getBaseValue();\n }\n return value;\n}\n\n/**\n * @param {LineElement} line\n */\nfunction parseFillOption(line) {\n const options = line.options;\n const fillOption = options.fill;\n let fill = valueOrDefault(fillOption && fillOption.target, fillOption);\n\n if (fill === undefined) {\n fill = !!options.backgroundColor;\n }\n\n if (fill === false || fill === null) {\n return false;\n }\n\n if (fill === true) {\n return 'origin';\n }\n return fill;\n}\n","/**\n * @typedef { import('../../core/core.controller.js').default } Chart\n * @typedef { import('../../core/core.scale.js').default } Scale\n * @typedef { import('../../elements/element.point.js').default } PointElement\n */\n\nimport {LineElement} from '../../elements/index.js';\nimport {_isBetween} from '../../helpers/index.js';\nimport {_createBoundaryLine} from './filler.helper.js';\n\n/**\n * @param {{ chart: Chart; scale: Scale; index: number; line: LineElement; }} source\n * @return {LineElement}\n */\nexport function _buildStackLine(source) {\n const {scale, index, line} = source;\n const points = [];\n const segments = line.segments;\n const sourcePoints = line.points;\n const linesBelow = getLinesBelow(scale, index);\n linesBelow.push(_createBoundaryLine({x: null, y: scale.bottom}, line));\n\n for (let i = 0; i < segments.length; i++) {\n const segment = segments[i];\n for (let j = segment.start; j <= segment.end; j++) {\n addPointsBelow(points, sourcePoints[j], linesBelow);\n }\n }\n return new LineElement({points, options: {}});\n}\n\n/**\n * @param {Scale} scale\n * @param {number} index\n * @return {LineElement[]}\n */\nfunction getLinesBelow(scale, index) {\n const below = [];\n const metas = scale.getMatchingVisibleMetas('line');\n\n for (let i = 0; i < metas.length; i++) {\n const meta = metas[i];\n if (meta.index === index) {\n break;\n }\n if (!meta.hidden) {\n below.unshift(meta.dataset);\n }\n }\n return below;\n}\n\n/**\n * @param {PointElement[]} points\n * @param {PointElement} sourcePoint\n * @param {LineElement[]} linesBelow\n */\nfunction addPointsBelow(points, sourcePoint, linesBelow) {\n const postponed = [];\n for (let j = 0; j < linesBelow.length; j++) {\n const line = linesBelow[j];\n const {first, last, point} = findPoint(line, sourcePoint, 'x');\n\n if (!point || (first && last)) {\n continue;\n }\n if (first) {\n // First point of an segment -> need to add another point before this,\n // from next line below.\n postponed.unshift(point);\n } else {\n points.push(point);\n if (!last) {\n // In the middle of an segment, no need to add more points.\n break;\n }\n }\n }\n points.push(...postponed);\n}\n\n/**\n * @param {LineElement} line\n * @param {PointElement} sourcePoint\n * @param {string} property\n * @returns {{point?: PointElement, first?: boolean, last?: boolean}}\n */\nfunction findPoint(line, sourcePoint, property) {\n const point = line.interpolate(sourcePoint, property);\n if (!point) {\n return {};\n }\n\n const pointValue = point[property];\n const segments = line.segments;\n const linePoints = line.points;\n let first = false;\n let last = false;\n for (let i = 0; i < segments.length; i++) {\n const segment = segments[i];\n const firstValue = linePoints[segment.start][property];\n const lastValue = linePoints[segment.end][property];\n if (_isBetween(pointValue, firstValue, lastValue)) {\n first = pointValue === firstValue;\n last = pointValue === lastValue;\n break;\n }\n }\n return {first, last, point};\n}\n","import {TAU} from '../../helpers/index.js';\n\n// TODO: use elements.ArcElement instead\nexport class simpleArc {\n constructor(opts) {\n this.x = opts.x;\n this.y = opts.y;\n this.radius = opts.radius;\n }\n\n pathSegment(ctx, bounds, opts) {\n const {x, y, radius} = this;\n bounds = bounds || {start: 0, end: TAU};\n ctx.arc(x, y, radius, bounds.end, bounds.start, true);\n return !opts.bounds;\n }\n\n interpolate(point) {\n const {x, y, radius} = this;\n const angle = point.angle;\n return {\n x: x + Math.cos(angle) * radius,\n y: y + Math.sin(angle) * radius,\n angle\n };\n }\n}\n","import {isFinite} from '../../helpers/index.js';\nimport {_createBoundaryLine} from './filler.helper.js';\nimport {_getTargetPixel, _getTargetValue} from './filler.options.js';\nimport {_buildStackLine} from './filler.target.stack.js';\nimport {simpleArc} from './simpleArc.js';\n\n/**\n * @typedef { import('../../core/core.controller.js').default } Chart\n * @typedef { import('../../core/core.scale.js').default } Scale\n * @typedef { import('../../elements/element.point.js').default } PointElement\n */\n\nexport function _getTarget(source) {\n const {chart, fill, line} = source;\n\n if (isFinite(fill)) {\n return getLineByIndex(chart, fill);\n }\n\n if (fill === 'stack') {\n return _buildStackLine(source);\n }\n\n if (fill === 'shape') {\n return true;\n }\n\n const boundary = computeBoundary(source);\n\n if (boundary instanceof simpleArc) {\n return boundary;\n }\n\n return _createBoundaryLine(boundary, line);\n}\n\n/**\n * @param {Chart} chart\n * @param {number} index\n */\nfunction getLineByIndex(chart, index) {\n const meta = chart.getDatasetMeta(index);\n const visible = meta && chart.isDatasetVisible(index);\n return visible ? meta.dataset : null;\n}\n\nfunction computeBoundary(source) {\n const scale = source.scale || {};\n\n if (scale.getPointPositionForValue) {\n return computeCircularBoundary(source);\n }\n return computeLinearBoundary(source);\n}\n\n\nfunction computeLinearBoundary(source) {\n const {scale = {}, fill} = source;\n const pixel = _getTargetPixel(fill, scale);\n\n if (isFinite(pixel)) {\n const horizontal = scale.isHorizontal();\n\n return {\n x: horizontal ? pixel : null,\n y: horizontal ? null : pixel\n };\n }\n\n return null;\n}\n\nfunction computeCircularBoundary(source) {\n const {scale, fill} = source;\n const options = scale.options;\n const length = scale.getLabels().length;\n const start = options.reverse ? scale.max : scale.min;\n const value = _getTargetValue(fill, scale, start);\n const target = [];\n\n if (options.grid.circular) {\n const center = scale.getPointPositionForValue(0, start);\n return new simpleArc({\n x: center.x,\n y: center.y,\n radius: scale.getDistanceFromCenterForValue(value)\n });\n }\n\n for (let i = 0; i < length; ++i) {\n target.push(scale.getPointPositionForValue(i, value));\n }\n return target;\n}\n\n","import {clipArea, unclipArea} from '../../helpers/index.js';\nimport {_findSegmentEnd, _getBounds, _segments} from './filler.segment.js';\nimport {_getTarget} from './filler.target.js';\n\nexport function _drawfill(ctx, source, area) {\n const target = _getTarget(source);\n const {line, scale, axis} = source;\n const lineOpts = line.options;\n const fillOption = lineOpts.fill;\n const color = lineOpts.backgroundColor;\n const {above = color, below = color} = fillOption || {};\n if (target && line.points.length) {\n clipArea(ctx, area);\n doFill(ctx, {line, target, above, below, area, scale, axis});\n unclipArea(ctx);\n }\n}\n\nfunction doFill(ctx, cfg) {\n const {line, target, above, below, area, scale} = cfg;\n const property = line._loop ? 'angle' : cfg.axis;\n\n ctx.save();\n\n if (property === 'x' && below !== above) {\n clipVertical(ctx, target, area.top);\n fill(ctx, {line, target, color: above, scale, property});\n ctx.restore();\n ctx.save();\n clipVertical(ctx, target, area.bottom);\n }\n fill(ctx, {line, target, color: below, scale, property});\n\n ctx.restore();\n}\n\nfunction clipVertical(ctx, target, clipY) {\n const {segments, points} = target;\n let first = true;\n let lineLoop = false;\n\n ctx.beginPath();\n for (const segment of segments) {\n const {start, end} = segment;\n const firstPoint = points[start];\n const lastPoint = points[_findSegmentEnd(start, end, points)];\n if (first) {\n ctx.moveTo(firstPoint.x, firstPoint.y);\n first = false;\n } else {\n ctx.lineTo(firstPoint.x, clipY);\n ctx.lineTo(firstPoint.x, firstPoint.y);\n }\n lineLoop = !!target.pathSegment(ctx, segment, {move: lineLoop});\n if (lineLoop) {\n ctx.closePath();\n } else {\n ctx.lineTo(lastPoint.x, clipY);\n }\n }\n\n ctx.lineTo(target.first().x, clipY);\n ctx.closePath();\n ctx.clip();\n}\n\nfunction fill(ctx, cfg) {\n const {line, target, property, color, scale} = cfg;\n const segments = _segments(line, target, property);\n\n for (const {source: src, target: tgt, start, end} of segments) {\n const {style: {backgroundColor = color} = {}} = src;\n const notShape = target !== true;\n\n ctx.save();\n ctx.fillStyle = backgroundColor;\n\n clipBounds(ctx, scale, notShape && _getBounds(property, start, end));\n\n ctx.beginPath();\n\n const lineLoop = !!line.pathSegment(ctx, src);\n\n let loop;\n if (notShape) {\n if (lineLoop) {\n ctx.closePath();\n } else {\n interpolatedLineTo(ctx, target, end, property);\n }\n\n const targetLoop = !!target.pathSegment(ctx, tgt, {move: lineLoop, reverse: true});\n loop = lineLoop && targetLoop;\n if (!loop) {\n interpolatedLineTo(ctx, target, start, property);\n }\n }\n\n ctx.closePath();\n ctx.fill(loop ? 'evenodd' : 'nonzero');\n\n ctx.restore();\n }\n}\n\nfunction clipBounds(ctx, scale, bounds) {\n const {top, bottom} = scale.chart.chartArea;\n const {property, start, end} = bounds || {};\n if (property === 'x') {\n ctx.beginPath();\n ctx.rect(start, top, end - start, bottom - top);\n ctx.clip();\n }\n}\n\nfunction interpolatedLineTo(ctx, target, point, property) {\n const interpolatedPoint = target.interpolate(point, property);\n if (interpolatedPoint) {\n ctx.lineTo(interpolatedPoint.x, interpolatedPoint.y);\n }\n}\n\n","/**\n * Plugin based on discussion from the following Chart.js issues:\n * @see https://github.com/chartjs/Chart.js/issues/2380#issuecomment-279961569\n * @see https://github.com/chartjs/Chart.js/issues/2440#issuecomment-256461897\n */\n\nimport LineElement from '../../elements/element.line.js';\nimport {_drawfill} from './filler.drawing.js';\nimport {_shouldApplyFill} from './filler.helper.js';\nimport {_decodeFill, _resolveTarget} from './filler.options.js';\n\nexport default {\n id: 'filler',\n\n afterDatasetsUpdate(chart, _args, options) {\n const count = (chart.data.datasets || []).length;\n const sources = [];\n let meta, i, line, source;\n\n for (i = 0; i < count; ++i) {\n meta = chart.getDatasetMeta(i);\n line = meta.dataset;\n source = null;\n\n if (line && line.options && line instanceof LineElement) {\n source = {\n visible: chart.isDatasetVisible(i),\n index: i,\n fill: _decodeFill(line, i, count),\n chart,\n axis: meta.controller.options.indexAxis,\n scale: meta.vScale,\n line,\n };\n }\n\n meta.$filler = source;\n sources.push(source);\n }\n\n for (i = 0; i < count; ++i) {\n source = sources[i];\n if (!source || source.fill === false) {\n continue;\n }\n\n source.fill = _resolveTarget(sources, i, options.propagate);\n }\n },\n\n beforeDraw(chart, _args, options) {\n const draw = options.drawTime === 'beforeDraw';\n const metasets = chart.getSortedVisibleDatasetMetas();\n const area = chart.chartArea;\n for (let i = metasets.length - 1; i >= 0; --i) {\n const source = metasets[i].$filler;\n if (!source) {\n continue;\n }\n\n source.line.updateControlPoints(area, source.axis);\n if (draw && source.fill) {\n _drawfill(chart.ctx, source, area);\n }\n }\n },\n\n beforeDatasetsDraw(chart, _args, options) {\n if (options.drawTime !== 'beforeDatasetsDraw') {\n return;\n }\n\n const metasets = chart.getSortedVisibleDatasetMetas();\n for (let i = metasets.length - 1; i >= 0; --i) {\n const source = metasets[i].$filler;\n\n if (_shouldApplyFill(source)) {\n _drawfill(chart.ctx, source, chart.chartArea);\n }\n }\n },\n\n beforeDatasetDraw(chart, args, options) {\n const source = args.meta.$filler;\n\n if (!_shouldApplyFill(source) || options.drawTime !== 'beforeDatasetDraw') {\n return;\n }\n\n _drawfill(chart.ctx, source, chart.chartArea);\n },\n\n defaults: {\n propagate: true,\n drawTime: 'beforeDatasetDraw'\n }\n};\n","import defaults from '../core/core.defaults.js';\nimport Element from '../core/core.element.js';\nimport layouts from '../core/core.layouts.js';\nimport {addRoundedRectPath, drawPointLegend, renderText} from '../helpers/helpers.canvas.js';\nimport {\n _isBetween,\n callback as call,\n clipArea,\n getRtlAdapter,\n overrideTextDirection,\n restoreTextDirection,\n toFont,\n toPadding,\n unclipArea,\n valueOrDefault,\n} from '../helpers/index.js';\nimport {_alignStartEnd, _textX, _toLeftRightCenter} from '../helpers/helpers.extras.js';\nimport {toTRBLCorners} from '../helpers/helpers.options.js';\n\n/**\n * @typedef { import('../types/index.js').ChartEvent } ChartEvent\n */\n\nconst getBoxSize = (labelOpts, fontSize) => {\n let {boxHeight = fontSize, boxWidth = fontSize} = labelOpts;\n\n if (labelOpts.usePointStyle) {\n boxHeight = Math.min(boxHeight, fontSize);\n boxWidth = labelOpts.pointStyleWidth || Math.min(boxWidth, fontSize);\n }\n\n return {\n boxWidth,\n boxHeight,\n itemHeight: Math.max(fontSize, boxHeight)\n };\n};\n\nconst itemsEqual = (a, b) => a !== null && b !== null && a.datasetIndex === b.datasetIndex && a.index === b.index;\n\nexport class Legend extends Element {\n\n /**\n\t * @param {{ ctx: any; options: any; chart: any; }} config\n\t */\n constructor(config) {\n super();\n\n this._added = false;\n\n // Contains hit boxes for each dataset (in dataset order)\n this.legendHitBoxes = [];\n\n /**\n \t\t * @private\n \t\t */\n this._hoveredItem = null;\n\n // Are we in doughnut mode which has a different data type\n this.doughnutMode = false;\n\n this.chart = config.chart;\n this.options = config.options;\n this.ctx = config.ctx;\n this.legendItems = undefined;\n this.columnSizes = undefined;\n this.lineWidths = undefined;\n this.maxHeight = undefined;\n this.maxWidth = undefined;\n this.top = undefined;\n this.bottom = undefined;\n this.left = undefined;\n this.right = undefined;\n this.height = undefined;\n this.width = undefined;\n this._margins = undefined;\n this.position = undefined;\n this.weight = undefined;\n this.fullSize = undefined;\n }\n\n update(maxWidth, maxHeight, margins) {\n this.maxWidth = maxWidth;\n this.maxHeight = maxHeight;\n this._margins = margins;\n\n this.setDimensions();\n this.buildLabels();\n this.fit();\n }\n\n setDimensions() {\n if (this.isHorizontal()) {\n this.width = this.maxWidth;\n this.left = this._margins.left;\n this.right = this.width;\n } else {\n this.height = this.maxHeight;\n this.top = this._margins.top;\n this.bottom = this.height;\n }\n }\n\n buildLabels() {\n const labelOpts = this.options.labels || {};\n let legendItems = call(labelOpts.generateLabels, [this.chart], this) || [];\n\n if (labelOpts.filter) {\n legendItems = legendItems.filter((item) => labelOpts.filter(item, this.chart.data));\n }\n\n if (labelOpts.sort) {\n legendItems = legendItems.sort((a, b) => labelOpts.sort(a, b, this.chart.data));\n }\n\n if (this.options.reverse) {\n legendItems.reverse();\n }\n\n this.legendItems = legendItems;\n }\n\n fit() {\n const {options, ctx} = this;\n\n // The legend may not be displayed for a variety of reasons including\n // the fact that the defaults got set to `false`.\n // When the legend is not displayed, there are no guarantees that the options\n // are correctly formatted so we need to bail out as early as possible.\n if (!options.display) {\n this.width = this.height = 0;\n return;\n }\n\n const labelOpts = options.labels;\n const labelFont = toFont(labelOpts.font);\n const fontSize = labelFont.size;\n const titleHeight = this._computeTitleHeight();\n const {boxWidth, itemHeight} = getBoxSize(labelOpts, fontSize);\n\n let width, height;\n\n ctx.font = labelFont.string;\n\n if (this.isHorizontal()) {\n width = this.maxWidth; // fill all the width\n height = this._fitRows(titleHeight, fontSize, boxWidth, itemHeight) + 10;\n } else {\n height = this.maxHeight; // fill all the height\n width = this._fitCols(titleHeight, labelFont, boxWidth, itemHeight) + 10;\n }\n\n this.width = Math.min(width, options.maxWidth || this.maxWidth);\n this.height = Math.min(height, options.maxHeight || this.maxHeight);\n }\n\n /**\n\t * @private\n\t */\n _fitRows(titleHeight, fontSize, boxWidth, itemHeight) {\n const {ctx, maxWidth, options: {labels: {padding}}} = this;\n const hitboxes = this.legendHitBoxes = [];\n // Width of each line of legend boxes. Labels wrap onto multiple lines when there are too many to fit on one\n const lineWidths = this.lineWidths = [0];\n const lineHeight = itemHeight + padding;\n let totalHeight = titleHeight;\n\n ctx.textAlign = 'left';\n ctx.textBaseline = 'middle';\n\n let row = -1;\n let top = -lineHeight;\n this.legendItems.forEach((legendItem, i) => {\n const itemWidth = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;\n\n if (i === 0 || lineWidths[lineWidths.length - 1] + itemWidth + 2 * padding > maxWidth) {\n totalHeight += lineHeight;\n lineWidths[lineWidths.length - (i > 0 ? 0 : 1)] = 0;\n top += lineHeight;\n row++;\n }\n\n hitboxes[i] = {left: 0, top, row, width: itemWidth, height: itemHeight};\n\n lineWidths[lineWidths.length - 1] += itemWidth + padding;\n });\n\n return totalHeight;\n }\n\n _fitCols(titleHeight, labelFont, boxWidth, _itemHeight) {\n const {ctx, maxHeight, options: {labels: {padding}}} = this;\n const hitboxes = this.legendHitBoxes = [];\n const columnSizes = this.columnSizes = [];\n const heightLimit = maxHeight - titleHeight;\n\n let totalWidth = padding;\n let currentColWidth = 0;\n let currentColHeight = 0;\n\n let left = 0;\n let col = 0;\n\n this.legendItems.forEach((legendItem, i) => {\n const {itemWidth, itemHeight} = calculateItemSize(boxWidth, labelFont, ctx, legendItem, _itemHeight);\n\n // If too tall, go to new column\n if (i > 0 && currentColHeight + itemHeight + 2 * padding > heightLimit) {\n totalWidth += currentColWidth + padding;\n columnSizes.push({width: currentColWidth, height: currentColHeight}); // previous column size\n left += currentColWidth + padding;\n col++;\n currentColWidth = currentColHeight = 0;\n }\n\n // Store the hitbox width and height here. Final position will be updated in `draw`\n hitboxes[i] = {left, top: currentColHeight, col, width: itemWidth, height: itemHeight};\n\n // Get max width\n currentColWidth = Math.max(currentColWidth, itemWidth);\n currentColHeight += itemHeight + padding;\n });\n\n totalWidth += currentColWidth;\n columnSizes.push({width: currentColWidth, height: currentColHeight}); // previous column size\n\n return totalWidth;\n }\n\n adjustHitBoxes() {\n if (!this.options.display) {\n return;\n }\n const titleHeight = this._computeTitleHeight();\n const {legendHitBoxes: hitboxes, options: {align, labels: {padding}, rtl}} = this;\n const rtlHelper = getRtlAdapter(rtl, this.left, this.width);\n if (this.isHorizontal()) {\n let row = 0;\n let left = _alignStartEnd(align, this.left + padding, this.right - this.lineWidths[row]);\n for (const hitbox of hitboxes) {\n if (row !== hitbox.row) {\n row = hitbox.row;\n left = _alignStartEnd(align, this.left + padding, this.right - this.lineWidths[row]);\n }\n hitbox.top += this.top + titleHeight + padding;\n hitbox.left = rtlHelper.leftForLtr(rtlHelper.x(left), hitbox.width);\n left += hitbox.width + padding;\n }\n } else {\n let col = 0;\n let top = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - this.columnSizes[col].height);\n for (const hitbox of hitboxes) {\n if (hitbox.col !== col) {\n col = hitbox.col;\n top = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - this.columnSizes[col].height);\n }\n hitbox.top = top;\n hitbox.left += this.left + padding;\n hitbox.left = rtlHelper.leftForLtr(rtlHelper.x(hitbox.left), hitbox.width);\n top += hitbox.height + padding;\n }\n }\n }\n\n isHorizontal() {\n return this.options.position === 'top' || this.options.position === 'bottom';\n }\n\n draw() {\n if (this.options.display) {\n const ctx = this.ctx;\n clipArea(ctx, this);\n\n this._draw();\n\n unclipArea(ctx);\n }\n }\n\n /**\n\t * @private\n\t */\n _draw() {\n const {options: opts, columnSizes, lineWidths, ctx} = this;\n const {align, labels: labelOpts} = opts;\n const defaultColor = defaults.color;\n const rtlHelper = getRtlAdapter(opts.rtl, this.left, this.width);\n const labelFont = toFont(labelOpts.font);\n const {padding} = labelOpts;\n const fontSize = labelFont.size;\n const halfFontSize = fontSize / 2;\n let cursor;\n\n this.drawTitle();\n\n // Canvas setup\n ctx.textAlign = rtlHelper.textAlign('left');\n ctx.textBaseline = 'middle';\n ctx.lineWidth = 0.5;\n ctx.font = labelFont.string;\n\n const {boxWidth, boxHeight, itemHeight} = getBoxSize(labelOpts, fontSize);\n\n // current position\n const drawLegendBox = function(x, y, legendItem) {\n if (isNaN(boxWidth) || boxWidth <= 0 || isNaN(boxHeight) || boxHeight < 0) {\n return;\n }\n\n // Set the ctx for the box\n ctx.save();\n\n const lineWidth = valueOrDefault(legendItem.lineWidth, 1);\n ctx.fillStyle = valueOrDefault(legendItem.fillStyle, defaultColor);\n ctx.lineCap = valueOrDefault(legendItem.lineCap, 'butt');\n ctx.lineDashOffset = valueOrDefault(legendItem.lineDashOffset, 0);\n ctx.lineJoin = valueOrDefault(legendItem.lineJoin, 'miter');\n ctx.lineWidth = lineWidth;\n ctx.strokeStyle = valueOrDefault(legendItem.strokeStyle, defaultColor);\n\n ctx.setLineDash(valueOrDefault(legendItem.lineDash, []));\n\n if (labelOpts.usePointStyle) {\n // Recalculate x and y for drawPoint() because its expecting\n // x and y to be center of figure (instead of top left)\n const drawOptions = {\n radius: boxHeight * Math.SQRT2 / 2,\n pointStyle: legendItem.pointStyle,\n rotation: legendItem.rotation,\n borderWidth: lineWidth\n };\n const centerX = rtlHelper.xPlus(x, boxWidth / 2);\n const centerY = y + halfFontSize;\n\n // Draw pointStyle as legend symbol\n drawPointLegend(ctx, drawOptions, centerX, centerY, labelOpts.pointStyleWidth && boxWidth);\n } else {\n // Draw box as legend symbol\n // Adjust position when boxHeight < fontSize (want it centered)\n const yBoxTop = y + Math.max((fontSize - boxHeight) / 2, 0);\n const xBoxLeft = rtlHelper.leftForLtr(x, boxWidth);\n const borderRadius = toTRBLCorners(legendItem.borderRadius);\n\n ctx.beginPath();\n\n if (Object.values(borderRadius).some(v => v !== 0)) {\n addRoundedRectPath(ctx, {\n x: xBoxLeft,\n y: yBoxTop,\n w: boxWidth,\n h: boxHeight,\n radius: borderRadius,\n });\n } else {\n ctx.rect(xBoxLeft, yBoxTop, boxWidth, boxHeight);\n }\n\n ctx.fill();\n if (lineWidth !== 0) {\n ctx.stroke();\n }\n }\n\n ctx.restore();\n };\n\n const fillText = function(x, y, legendItem) {\n renderText(ctx, legendItem.text, x, y + (itemHeight / 2), labelFont, {\n strikethrough: legendItem.hidden,\n textAlign: rtlHelper.textAlign(legendItem.textAlign)\n });\n };\n\n // Horizontal\n const isHorizontal = this.isHorizontal();\n const titleHeight = this._computeTitleHeight();\n if (isHorizontal) {\n cursor = {\n x: _alignStartEnd(align, this.left + padding, this.right - lineWidths[0]),\n y: this.top + padding + titleHeight,\n line: 0\n };\n } else {\n cursor = {\n x: this.left + padding,\n y: _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - columnSizes[0].height),\n line: 0\n };\n }\n\n overrideTextDirection(this.ctx, opts.textDirection);\n\n const lineHeight = itemHeight + padding;\n this.legendItems.forEach((legendItem, i) => {\n ctx.strokeStyle = legendItem.fontColor; // for strikethrough effect\n ctx.fillStyle = legendItem.fontColor; // render in correct colour\n\n const textWidth = ctx.measureText(legendItem.text).width;\n const textAlign = rtlHelper.textAlign(legendItem.textAlign || (legendItem.textAlign = labelOpts.textAlign));\n const width = boxWidth + halfFontSize + textWidth;\n let x = cursor.x;\n let y = cursor.y;\n\n rtlHelper.setWidth(this.width);\n\n if (isHorizontal) {\n if (i > 0 && x + width + padding > this.right) {\n y = cursor.y += lineHeight;\n cursor.line++;\n x = cursor.x = _alignStartEnd(align, this.left + padding, this.right - lineWidths[cursor.line]);\n }\n } else if (i > 0 && y + lineHeight > this.bottom) {\n x = cursor.x = x + columnSizes[cursor.line].width + padding;\n cursor.line++;\n y = cursor.y = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - columnSizes[cursor.line].height);\n }\n\n const realX = rtlHelper.x(x);\n\n drawLegendBox(realX, y, legendItem);\n\n x = _textX(textAlign, x + boxWidth + halfFontSize, isHorizontal ? x + width : this.right, opts.rtl);\n\n // Fill the actual label\n fillText(rtlHelper.x(x), y, legendItem);\n\n if (isHorizontal) {\n cursor.x += width + padding;\n } else if (typeof legendItem.text !== 'string') {\n const fontLineHeight = labelFont.lineHeight;\n cursor.y += calculateLegendItemHeight(legendItem, fontLineHeight) + padding;\n } else {\n cursor.y += lineHeight;\n }\n });\n\n restoreTextDirection(this.ctx, opts.textDirection);\n }\n\n /**\n\t * @protected\n\t */\n drawTitle() {\n const opts = this.options;\n const titleOpts = opts.title;\n const titleFont = toFont(titleOpts.font);\n const titlePadding = toPadding(titleOpts.padding);\n\n if (!titleOpts.display) {\n return;\n }\n\n const rtlHelper = getRtlAdapter(opts.rtl, this.left, this.width);\n const ctx = this.ctx;\n const position = titleOpts.position;\n const halfFontSize = titleFont.size / 2;\n const topPaddingPlusHalfFontSize = titlePadding.top + halfFontSize;\n let y;\n\n // These defaults are used when the legend is vertical.\n // When horizontal, they are computed below.\n let left = this.left;\n let maxWidth = this.width;\n\n if (this.isHorizontal()) {\n // Move left / right so that the title is above the legend lines\n maxWidth = Math.max(...this.lineWidths);\n y = this.top + topPaddingPlusHalfFontSize;\n left = _alignStartEnd(opts.align, left, this.right - maxWidth);\n } else {\n // Move down so that the title is above the legend stack in every alignment\n const maxHeight = this.columnSizes.reduce((acc, size) => Math.max(acc, size.height), 0);\n y = topPaddingPlusHalfFontSize + _alignStartEnd(opts.align, this.top, this.bottom - maxHeight - opts.labels.padding - this._computeTitleHeight());\n }\n\n // Now that we know the left edge of the inner legend box, compute the correct\n // X coordinate from the title alignment\n const x = _alignStartEnd(position, left, left + maxWidth);\n\n // Canvas setup\n ctx.textAlign = rtlHelper.textAlign(_toLeftRightCenter(position));\n ctx.textBaseline = 'middle';\n ctx.strokeStyle = titleOpts.color;\n ctx.fillStyle = titleOpts.color;\n ctx.font = titleFont.string;\n\n renderText(ctx, titleOpts.text, x, y, titleFont);\n }\n\n /**\n\t * @private\n\t */\n _computeTitleHeight() {\n const titleOpts = this.options.title;\n const titleFont = toFont(titleOpts.font);\n const titlePadding = toPadding(titleOpts.padding);\n return titleOpts.display ? titleFont.lineHeight + titlePadding.height : 0;\n }\n\n /**\n\t * @private\n\t */\n _getLegendItemAt(x, y) {\n let i, hitBox, lh;\n\n if (_isBetween(x, this.left, this.right)\n && _isBetween(y, this.top, this.bottom)) {\n // See if we are touching one of the dataset boxes\n lh = this.legendHitBoxes;\n for (i = 0; i < lh.length; ++i) {\n hitBox = lh[i];\n\n if (_isBetween(x, hitBox.left, hitBox.left + hitBox.width)\n && _isBetween(y, hitBox.top, hitBox.top + hitBox.height)) {\n // Touching an element\n return this.legendItems[i];\n }\n }\n }\n\n return null;\n }\n\n /**\n\t * Handle an event\n\t * @param {ChartEvent} e - The event to handle\n\t */\n handleEvent(e) {\n const opts = this.options;\n if (!isListened(e.type, opts)) {\n return;\n }\n\n // Chart event already has relative position in it\n const hoveredItem = this._getLegendItemAt(e.x, e.y);\n\n if (e.type === 'mousemove' || e.type === 'mouseout') {\n const previous = this._hoveredItem;\n const sameItem = itemsEqual(previous, hoveredItem);\n if (previous && !sameItem) {\n call(opts.onLeave, [e, previous, this], this);\n }\n\n this._hoveredItem = hoveredItem;\n\n if (hoveredItem && !sameItem) {\n call(opts.onHover, [e, hoveredItem, this], this);\n }\n } else if (hoveredItem) {\n call(opts.onClick, [e, hoveredItem, this], this);\n }\n }\n}\n\nfunction calculateItemSize(boxWidth, labelFont, ctx, legendItem, _itemHeight) {\n const itemWidth = calculateItemWidth(legendItem, boxWidth, labelFont, ctx);\n const itemHeight = calculateItemHeight(_itemHeight, legendItem, labelFont.lineHeight);\n return {itemWidth, itemHeight};\n}\n\nfunction calculateItemWidth(legendItem, boxWidth, labelFont, ctx) {\n let legendItemText = legendItem.text;\n if (legendItemText && typeof legendItemText !== 'string') {\n legendItemText = legendItemText.reduce((a, b) => a.length > b.length ? a : b);\n }\n return boxWidth + (labelFont.size / 2) + ctx.measureText(legendItemText).width;\n}\n\nfunction calculateItemHeight(_itemHeight, legendItem, fontLineHeight) {\n let itemHeight = _itemHeight;\n if (typeof legendItem.text !== 'string') {\n itemHeight = calculateLegendItemHeight(legendItem, fontLineHeight);\n }\n return itemHeight;\n}\n\nfunction calculateLegendItemHeight(legendItem, fontLineHeight) {\n const labelHeight = legendItem.text ? legendItem.text.length : 0;\n return fontLineHeight * labelHeight;\n}\n\nfunction isListened(type, opts) {\n if ((type === 'mousemove' || type === 'mouseout') && (opts.onHover || opts.onLeave)) {\n return true;\n }\n if (opts.onClick && (type === 'click' || type === 'mouseup')) {\n return true;\n }\n return false;\n}\n\nexport default {\n id: 'legend',\n\n /**\n\t * For tests\n\t * @private\n\t */\n _element: Legend,\n\n start(chart, _args, options) {\n const legend = chart.legend = new Legend({ctx: chart.ctx, options, chart});\n layouts.configure(chart, legend, options);\n layouts.addBox(chart, legend);\n },\n\n stop(chart) {\n layouts.removeBox(chart, chart.legend);\n delete chart.legend;\n },\n\n // During the beforeUpdate step, the layout configuration needs to run\n // This ensures that if the legend position changes (via an option update)\n // the layout system respects the change. See https://github.com/chartjs/Chart.js/issues/7527\n beforeUpdate(chart, _args, options) {\n const legend = chart.legend;\n layouts.configure(chart, legend, options);\n legend.options = options;\n },\n\n // The labels need to be built after datasets are updated to ensure that colors\n // and other styling are correct. See https://github.com/chartjs/Chart.js/issues/6968\n afterUpdate(chart) {\n const legend = chart.legend;\n legend.buildLabels();\n legend.adjustHitBoxes();\n },\n\n\n afterEvent(chart, args) {\n if (!args.replay) {\n chart.legend.handleEvent(args.event);\n }\n },\n\n defaults: {\n display: true,\n position: 'top',\n align: 'center',\n fullSize: true,\n reverse: false,\n weight: 1000,\n\n // a callback that will handle\n onClick(e, legendItem, legend) {\n const index = legendItem.datasetIndex;\n const ci = legend.chart;\n if (ci.isDatasetVisible(index)) {\n ci.hide(index);\n legendItem.hidden = true;\n } else {\n ci.show(index);\n legendItem.hidden = false;\n }\n },\n\n onHover: null,\n onLeave: null,\n\n labels: {\n color: (ctx) => ctx.chart.options.color,\n boxWidth: 40,\n padding: 10,\n // Generates labels shown in the legend\n // Valid properties to return:\n // text : text to display\n // fillStyle : fill of coloured box\n // strokeStyle: stroke of coloured box\n // hidden : if this legend item refers to a hidden item\n // lineCap : cap style for line\n // lineDash\n // lineDashOffset :\n // lineJoin :\n // lineWidth :\n generateLabels(chart) {\n const datasets = chart.data.datasets;\n const {labels: {usePointStyle, pointStyle, textAlign, color, useBorderRadius, borderRadius}} = chart.legend.options;\n\n return chart._getSortedDatasetMetas().map((meta) => {\n const style = meta.controller.getStyle(usePointStyle ? 0 : undefined);\n const borderWidth = toPadding(style.borderWidth);\n\n return {\n text: datasets[meta.index].label,\n fillStyle: style.backgroundColor,\n fontColor: color,\n hidden: !meta.visible,\n lineCap: style.borderCapStyle,\n lineDash: style.borderDash,\n lineDashOffset: style.borderDashOffset,\n lineJoin: style.borderJoinStyle,\n lineWidth: (borderWidth.width + borderWidth.height) / 4,\n strokeStyle: style.borderColor,\n pointStyle: pointStyle || style.pointStyle,\n rotation: style.rotation,\n textAlign: textAlign || style.textAlign,\n borderRadius: useBorderRadius && (borderRadius || style.borderRadius),\n\n // Below is extra data used for toggling the datasets\n datasetIndex: meta.index\n };\n }, this);\n }\n },\n\n title: {\n color: (ctx) => ctx.chart.options.color,\n display: false,\n position: 'center',\n text: '',\n }\n },\n\n descriptors: {\n _scriptable: (name) => !name.startsWith('on'),\n labels: {\n _scriptable: (name) => !['generateLabels', 'filter', 'sort'].includes(name),\n }\n },\n};\n","import Element from '../core/core.element.js';\nimport layouts from '../core/core.layouts.js';\nimport {PI, isArray, toPadding, toFont} from '../helpers/index.js';\nimport {_toLeftRightCenter, _alignStartEnd} from '../helpers/helpers.extras.js';\nimport {renderText} from '../helpers/helpers.canvas.js';\n\nexport class Title extends Element {\n /**\n\t * @param {{ ctx: any; options: any; chart: any; }} config\n\t */\n constructor(config) {\n super();\n\n this.chart = config.chart;\n this.options = config.options;\n this.ctx = config.ctx;\n this._padding = undefined;\n this.top = undefined;\n this.bottom = undefined;\n this.left = undefined;\n this.right = undefined;\n this.width = undefined;\n this.height = undefined;\n this.position = undefined;\n this.weight = undefined;\n this.fullSize = undefined;\n }\n\n update(maxWidth, maxHeight) {\n const opts = this.options;\n\n this.left = 0;\n this.top = 0;\n\n if (!opts.display) {\n this.width = this.height = this.right = this.bottom = 0;\n return;\n }\n\n this.width = this.right = maxWidth;\n this.height = this.bottom = maxHeight;\n\n const lineCount = isArray(opts.text) ? opts.text.length : 1;\n this._padding = toPadding(opts.padding);\n const textSize = lineCount * toFont(opts.font).lineHeight + this._padding.height;\n\n if (this.isHorizontal()) {\n this.height = textSize;\n } else {\n this.width = textSize;\n }\n }\n\n isHorizontal() {\n const pos = this.options.position;\n return pos === 'top' || pos === 'bottom';\n }\n\n _drawArgs(offset) {\n const {top, left, bottom, right, options} = this;\n const align = options.align;\n let rotation = 0;\n let maxWidth, titleX, titleY;\n\n if (this.isHorizontal()) {\n titleX = _alignStartEnd(align, left, right);\n titleY = top + offset;\n maxWidth = right - left;\n } else {\n if (options.position === 'left') {\n titleX = left + offset;\n titleY = _alignStartEnd(align, bottom, top);\n rotation = PI * -0.5;\n } else {\n titleX = right - offset;\n titleY = _alignStartEnd(align, top, bottom);\n rotation = PI * 0.5;\n }\n maxWidth = bottom - top;\n }\n return {titleX, titleY, maxWidth, rotation};\n }\n\n draw() {\n const ctx = this.ctx;\n const opts = this.options;\n\n if (!opts.display) {\n return;\n }\n\n const fontOpts = toFont(opts.font);\n const lineHeight = fontOpts.lineHeight;\n const offset = lineHeight / 2 + this._padding.top;\n const {titleX, titleY, maxWidth, rotation} = this._drawArgs(offset);\n\n renderText(ctx, opts.text, 0, 0, fontOpts, {\n color: opts.color,\n maxWidth,\n rotation,\n textAlign: _toLeftRightCenter(opts.align),\n textBaseline: 'middle',\n translation: [titleX, titleY],\n });\n }\n}\n\nfunction createTitle(chart, titleOpts) {\n const title = new Title({\n ctx: chart.ctx,\n options: titleOpts,\n chart\n });\n\n layouts.configure(chart, title, titleOpts);\n layouts.addBox(chart, title);\n chart.titleBlock = title;\n}\n\nexport default {\n id: 'title',\n\n /**\n\t * For tests\n\t * @private\n\t */\n _element: Title,\n\n start(chart, _args, options) {\n createTitle(chart, options);\n },\n\n stop(chart) {\n const titleBlock = chart.titleBlock;\n layouts.removeBox(chart, titleBlock);\n delete chart.titleBlock;\n },\n\n beforeUpdate(chart, _args, options) {\n const title = chart.titleBlock;\n layouts.configure(chart, title, options);\n title.options = options;\n },\n\n defaults: {\n align: 'center',\n display: false,\n font: {\n weight: 'bold',\n },\n fullSize: true,\n padding: 10,\n position: 'top',\n text: '',\n weight: 2000 // by default greater than legend (1000) to be above\n },\n\n defaultRoutes: {\n color: 'color'\n },\n\n descriptors: {\n _scriptable: true,\n _indexable: false,\n },\n};\n","import {Title} from './plugin.title.js';\nimport layouts from '../core/core.layouts.js';\n\nconst map = new WeakMap();\n\nexport default {\n id: 'subtitle',\n\n start(chart, _args, options) {\n const title = new Title({\n ctx: chart.ctx,\n options,\n chart\n });\n\n layouts.configure(chart, title, options);\n layouts.addBox(chart, title);\n map.set(chart, title);\n },\n\n stop(chart) {\n layouts.removeBox(chart, map.get(chart));\n map.delete(chart);\n },\n\n beforeUpdate(chart, _args, options) {\n const title = map.get(chart);\n layouts.configure(chart, title, options);\n title.options = options;\n },\n\n defaults: {\n align: 'center',\n display: false,\n font: {\n weight: 'normal',\n },\n fullSize: true,\n padding: 0,\n position: 'top',\n text: '',\n weight: 1500 // by default greater than legend (1000) and smaller than title (2000)\n },\n\n defaultRoutes: {\n color: 'color'\n },\n\n descriptors: {\n _scriptable: true,\n _indexable: false,\n },\n};\n","import Animations from '../core/core.animations.js';\nimport Element from '../core/core.element.js';\nimport {addRoundedRectPath} from '../helpers/helpers.canvas.js';\nimport {each, noop, isNullOrUndef, isArray, _elementsEqual, isObject} from '../helpers/helpers.core.js';\nimport {toFont, toPadding, toTRBLCorners} from '../helpers/helpers.options.js';\nimport {getRtlAdapter, overrideTextDirection, restoreTextDirection} from '../helpers/helpers.rtl.js';\nimport {distanceBetweenPoints, _limitValue} from '../helpers/helpers.math.js';\nimport {createContext, drawPoint} from '../helpers/index.js';\n\n/**\n * @typedef { import('../platform/platform.base.js').Chart } Chart\n * @typedef { import('../types/index.js').ChartEvent } ChartEvent\n * @typedef { import('../types/index.js').ActiveElement } ActiveElement\n * @typedef { import('../core/core.interaction.js').InteractionItem } InteractionItem\n */\n\nconst positioners = {\n /**\n\t * Average mode places the tooltip at the average position of the elements shown\n\t */\n average(items) {\n if (!items.length) {\n return false;\n }\n\n let i, len;\n let x = 0;\n let y = 0;\n let count = 0;\n\n for (i = 0, len = items.length; i < len; ++i) {\n const el = items[i].element;\n if (el && el.hasValue()) {\n const pos = el.tooltipPosition();\n x += pos.x;\n y += pos.y;\n ++count;\n }\n }\n\n return {\n x: x / count,\n y: y / count\n };\n },\n\n /**\n\t * Gets the tooltip position nearest of the item nearest to the event position\n\t */\n nearest(items, eventPosition) {\n if (!items.length) {\n return false;\n }\n\n let x = eventPosition.x;\n let y = eventPosition.y;\n let minDistance = Number.POSITIVE_INFINITY;\n let i, len, nearestElement;\n\n for (i = 0, len = items.length; i < len; ++i) {\n const el = items[i].element;\n if (el && el.hasValue()) {\n const center = el.getCenterPoint();\n const d = distanceBetweenPoints(eventPosition, center);\n\n if (d < minDistance) {\n minDistance = d;\n nearestElement = el;\n }\n }\n }\n\n if (nearestElement) {\n const tp = nearestElement.tooltipPosition();\n x = tp.x;\n y = tp.y;\n }\n\n return {\n x,\n y\n };\n }\n};\n\n// Helper to push or concat based on if the 2nd parameter is an array or not\nfunction pushOrConcat(base, toPush) {\n if (toPush) {\n if (isArray(toPush)) {\n // base = base.concat(toPush);\n Array.prototype.push.apply(base, toPush);\n } else {\n base.push(toPush);\n }\n }\n\n return base;\n}\n\n/**\n * Returns array of strings split by newline\n * @param {*} str - The value to split by newline.\n * @returns {string|string[]} value if newline present - Returned from String split() method\n * @function\n */\nfunction splitNewlines(str) {\n if ((typeof str === 'string' || str instanceof String) && str.indexOf('\\n') > -1) {\n return str.split('\\n');\n }\n return str;\n}\n\n\n/**\n * Private helper to create a tooltip item model\n * @param {Chart} chart\n * @param {ActiveElement} item - {element, index, datasetIndex} to create the tooltip item for\n * @return new tooltip item\n */\nfunction createTooltipItem(chart, item) {\n const {element, datasetIndex, index} = item;\n const controller = chart.getDatasetMeta(datasetIndex).controller;\n const {label, value} = controller.getLabelAndValue(index);\n\n return {\n chart,\n label,\n parsed: controller.getParsed(index),\n raw: chart.data.datasets[datasetIndex].data[index],\n formattedValue: value,\n dataset: controller.getDataset(),\n dataIndex: index,\n datasetIndex,\n element\n };\n}\n\n/**\n * Get the size of the tooltip\n */\nfunction getTooltipSize(tooltip, options) {\n const ctx = tooltip.chart.ctx;\n const {body, footer, title} = tooltip;\n const {boxWidth, boxHeight} = options;\n const bodyFont = toFont(options.bodyFont);\n const titleFont = toFont(options.titleFont);\n const footerFont = toFont(options.footerFont);\n const titleLineCount = title.length;\n const footerLineCount = footer.length;\n const bodyLineItemCount = body.length;\n\n const padding = toPadding(options.padding);\n let height = padding.height;\n let width = 0;\n\n // Count of all lines in the body\n let combinedBodyLength = body.reduce((count, bodyItem) => count + bodyItem.before.length + bodyItem.lines.length + bodyItem.after.length, 0);\n combinedBodyLength += tooltip.beforeBody.length + tooltip.afterBody.length;\n\n if (titleLineCount) {\n height += titleLineCount * titleFont.lineHeight\n\t\t\t+ (titleLineCount - 1) * options.titleSpacing\n\t\t\t+ options.titleMarginBottom;\n }\n if (combinedBodyLength) {\n // Body lines may include some extra height depending on boxHeight\n const bodyLineHeight = options.displayColors ? Math.max(boxHeight, bodyFont.lineHeight) : bodyFont.lineHeight;\n height += bodyLineItemCount * bodyLineHeight\n\t\t\t+ (combinedBodyLength - bodyLineItemCount) * bodyFont.lineHeight\n\t\t\t+ (combinedBodyLength - 1) * options.bodySpacing;\n }\n if (footerLineCount) {\n height += options.footerMarginTop\n\t\t\t+ footerLineCount * footerFont.lineHeight\n\t\t\t+ (footerLineCount - 1) * options.footerSpacing;\n }\n\n // Title width\n let widthPadding = 0;\n const maxLineWidth = function(line) {\n width = Math.max(width, ctx.measureText(line).width + widthPadding);\n };\n\n ctx.save();\n\n ctx.font = titleFont.string;\n each(tooltip.title, maxLineWidth);\n\n // Body width\n ctx.font = bodyFont.string;\n each(tooltip.beforeBody.concat(tooltip.afterBody), maxLineWidth);\n\n // Body lines may include some extra width due to the color box\n widthPadding = options.displayColors ? (boxWidth + 2 + options.boxPadding) : 0;\n each(body, (bodyItem) => {\n each(bodyItem.before, maxLineWidth);\n each(bodyItem.lines, maxLineWidth);\n each(bodyItem.after, maxLineWidth);\n });\n\n // Reset back to 0\n widthPadding = 0;\n\n // Footer width\n ctx.font = footerFont.string;\n each(tooltip.footer, maxLineWidth);\n\n ctx.restore();\n\n // Add padding\n width += padding.width;\n\n return {width, height};\n}\n\nfunction determineYAlign(chart, size) {\n const {y, height} = size;\n\n if (y < height / 2) {\n return 'top';\n } else if (y > (chart.height - height / 2)) {\n return 'bottom';\n }\n return 'center';\n}\n\nfunction doesNotFitWithAlign(xAlign, chart, options, size) {\n const {x, width} = size;\n const caret = options.caretSize + options.caretPadding;\n if (xAlign === 'left' && x + width + caret > chart.width) {\n return true;\n }\n\n if (xAlign === 'right' && x - width - caret < 0) {\n return true;\n }\n}\n\nfunction determineXAlign(chart, options, size, yAlign) {\n const {x, width} = size;\n const {width: chartWidth, chartArea: {left, right}} = chart;\n let xAlign = 'center';\n\n if (yAlign === 'center') {\n xAlign = x <= (left + right) / 2 ? 'left' : 'right';\n } else if (x <= width / 2) {\n xAlign = 'left';\n } else if (x >= chartWidth - width / 2) {\n xAlign = 'right';\n }\n\n if (doesNotFitWithAlign(xAlign, chart, options, size)) {\n xAlign = 'center';\n }\n\n return xAlign;\n}\n\n/**\n * Helper to get the alignment of a tooltip given the size\n */\nfunction determineAlignment(chart, options, size) {\n const yAlign = size.yAlign || options.yAlign || determineYAlign(chart, size);\n\n return {\n xAlign: size.xAlign || options.xAlign || determineXAlign(chart, options, size, yAlign),\n yAlign\n };\n}\n\nfunction alignX(size, xAlign) {\n let {x, width} = size;\n if (xAlign === 'right') {\n x -= width;\n } else if (xAlign === 'center') {\n x -= (width / 2);\n }\n return x;\n}\n\nfunction alignY(size, yAlign, paddingAndSize) {\n // eslint-disable-next-line prefer-const\n let {y, height} = size;\n if (yAlign === 'top') {\n y += paddingAndSize;\n } else if (yAlign === 'bottom') {\n y -= height + paddingAndSize;\n } else {\n y -= (height / 2);\n }\n return y;\n}\n\n/**\n * Helper to get the location a tooltip needs to be placed at given the initial position (via the vm) and the size and alignment\n */\nfunction getBackgroundPoint(options, size, alignment, chart) {\n const {caretSize, caretPadding, cornerRadius} = options;\n const {xAlign, yAlign} = alignment;\n const paddingAndSize = caretSize + caretPadding;\n const {topLeft, topRight, bottomLeft, bottomRight} = toTRBLCorners(cornerRadius);\n\n let x = alignX(size, xAlign);\n const y = alignY(size, yAlign, paddingAndSize);\n\n if (yAlign === 'center') {\n if (xAlign === 'left') {\n x += paddingAndSize;\n } else if (xAlign === 'right') {\n x -= paddingAndSize;\n }\n } else if (xAlign === 'left') {\n x -= Math.max(topLeft, bottomLeft) + caretSize;\n } else if (xAlign === 'right') {\n x += Math.max(topRight, bottomRight) + caretSize;\n }\n\n return {\n x: _limitValue(x, 0, chart.width - size.width),\n y: _limitValue(y, 0, chart.height - size.height)\n };\n}\n\nfunction getAlignedX(tooltip, align, options) {\n const padding = toPadding(options.padding);\n\n return align === 'center'\n ? tooltip.x + tooltip.width / 2\n : align === 'right'\n ? tooltip.x + tooltip.width - padding.right\n : tooltip.x + padding.left;\n}\n\n/**\n * Helper to build before and after body lines\n */\nfunction getBeforeAfterBodyLines(callback) {\n return pushOrConcat([], splitNewlines(callback));\n}\n\nfunction createTooltipContext(parent, tooltip, tooltipItems) {\n return createContext(parent, {\n tooltip,\n tooltipItems,\n type: 'tooltip'\n });\n}\n\nfunction overrideCallbacks(callbacks, context) {\n const override = context && context.dataset && context.dataset.tooltip && context.dataset.tooltip.callbacks;\n return override ? callbacks.override(override) : callbacks;\n}\n\nconst defaultCallbacks = {\n // Args are: (tooltipItems, data)\n beforeTitle: noop,\n title(tooltipItems) {\n if (tooltipItems.length > 0) {\n const item = tooltipItems[0];\n const labels = item.chart.data.labels;\n const labelCount = labels ? labels.length : 0;\n\n if (this && this.options && this.options.mode === 'dataset') {\n return item.dataset.label || '';\n } else if (item.label) {\n return item.label;\n } else if (labelCount > 0 && item.dataIndex < labelCount) {\n return labels[item.dataIndex];\n }\n }\n\n return '';\n },\n afterTitle: noop,\n\n // Args are: (tooltipItems, data)\n beforeBody: noop,\n\n // Args are: (tooltipItem, data)\n beforeLabel: noop,\n label(tooltipItem) {\n if (this && this.options && this.options.mode === 'dataset') {\n return tooltipItem.label + ': ' + tooltipItem.formattedValue || tooltipItem.formattedValue;\n }\n\n let label = tooltipItem.dataset.label || '';\n\n if (label) {\n label += ': ';\n }\n const value = tooltipItem.formattedValue;\n if (!isNullOrUndef(value)) {\n label += value;\n }\n return label;\n },\n labelColor(tooltipItem) {\n const meta = tooltipItem.chart.getDatasetMeta(tooltipItem.datasetIndex);\n const options = meta.controller.getStyle(tooltipItem.dataIndex);\n return {\n borderColor: options.borderColor,\n backgroundColor: options.backgroundColor,\n borderWidth: options.borderWidth,\n borderDash: options.borderDash,\n borderDashOffset: options.borderDashOffset,\n borderRadius: 0,\n };\n },\n labelTextColor() {\n return this.options.bodyColor;\n },\n labelPointStyle(tooltipItem) {\n const meta = tooltipItem.chart.getDatasetMeta(tooltipItem.datasetIndex);\n const options = meta.controller.getStyle(tooltipItem.dataIndex);\n return {\n pointStyle: options.pointStyle,\n rotation: options.rotation,\n };\n },\n afterLabel: noop,\n\n // Args are: (tooltipItems, data)\n afterBody: noop,\n\n // Args are: (tooltipItems, data)\n beforeFooter: noop,\n footer: noop,\n afterFooter: noop\n};\n\n/**\n * Invoke callback from object with context and arguments.\n * If callback returns `undefined`, then will be invoked default callback.\n * @param {Record<keyof typeof defaultCallbacks, Function>} callbacks\n * @param {keyof typeof defaultCallbacks} name\n * @param {*} ctx\n * @param {*} arg\n * @returns {any}\n */\nfunction invokeCallbackWithFallback(callbacks, name, ctx, arg) {\n const result = callbacks[name].call(ctx, arg);\n\n if (typeof result === 'undefined') {\n return defaultCallbacks[name].call(ctx, arg);\n }\n\n return result;\n}\n\nexport class Tooltip extends Element {\n\n /**\n * @namespace Chart.Tooltip.positioners\n */\n static positioners = positioners;\n\n constructor(config) {\n super();\n\n this.opacity = 0;\n this._active = [];\n this._eventPosition = undefined;\n this._size = undefined;\n this._cachedAnimations = undefined;\n this._tooltipItems = [];\n this.$animations = undefined;\n this.$context = undefined;\n this.chart = config.chart;\n this.options = config.options;\n this.dataPoints = undefined;\n this.title = undefined;\n this.beforeBody = undefined;\n this.body = undefined;\n this.afterBody = undefined;\n this.footer = undefined;\n this.xAlign = undefined;\n this.yAlign = undefined;\n this.x = undefined;\n this.y = undefined;\n this.height = undefined;\n this.width = undefined;\n this.caretX = undefined;\n this.caretY = undefined;\n // TODO: V4, make this private, rename to `_labelStyles`, and combine with `labelPointStyles`\n // and `labelTextColors` to create a single variable\n this.labelColors = undefined;\n this.labelPointStyles = undefined;\n this.labelTextColors = undefined;\n }\n\n initialize(options) {\n this.options = options;\n this._cachedAnimations = undefined;\n this.$context = undefined;\n }\n\n /**\n\t * @private\n\t */\n _resolveAnimations() {\n const cached = this._cachedAnimations;\n\n if (cached) {\n return cached;\n }\n\n const chart = this.chart;\n const options = this.options.setContext(this.getContext());\n const opts = options.enabled && chart.options.animation && options.animations;\n const animations = new Animations(this.chart, opts);\n if (opts._cacheable) {\n this._cachedAnimations = Object.freeze(animations);\n }\n\n return animations;\n }\n\n /**\n\t * @protected\n\t */\n getContext() {\n return this.$context ||\n\t\t\t(this.$context = createTooltipContext(this.chart.getContext(), this, this._tooltipItems));\n }\n\n getTitle(context, options) {\n const {callbacks} = options;\n\n const beforeTitle = invokeCallbackWithFallback(callbacks, 'beforeTitle', this, context);\n const title = invokeCallbackWithFallback(callbacks, 'title', this, context);\n const afterTitle = invokeCallbackWithFallback(callbacks, 'afterTitle', this, context);\n\n let lines = [];\n lines = pushOrConcat(lines, splitNewlines(beforeTitle));\n lines = pushOrConcat(lines, splitNewlines(title));\n lines = pushOrConcat(lines, splitNewlines(afterTitle));\n\n return lines;\n }\n\n getBeforeBody(tooltipItems, options) {\n return getBeforeAfterBodyLines(\n invokeCallbackWithFallback(options.callbacks, 'beforeBody', this, tooltipItems)\n );\n }\n\n getBody(tooltipItems, options) {\n const {callbacks} = options;\n const bodyItems = [];\n\n each(tooltipItems, (context) => {\n const bodyItem = {\n before: [],\n lines: [],\n after: []\n };\n const scoped = overrideCallbacks(callbacks, context);\n pushOrConcat(bodyItem.before, splitNewlines(invokeCallbackWithFallback(scoped, 'beforeLabel', this, context)));\n pushOrConcat(bodyItem.lines, invokeCallbackWithFallback(scoped, 'label', this, context));\n pushOrConcat(bodyItem.after, splitNewlines(invokeCallbackWithFallback(scoped, 'afterLabel', this, context)));\n\n bodyItems.push(bodyItem);\n });\n\n return bodyItems;\n }\n\n getAfterBody(tooltipItems, options) {\n return getBeforeAfterBodyLines(\n invokeCallbackWithFallback(options.callbacks, 'afterBody', this, tooltipItems)\n );\n }\n\n // Get the footer and beforeFooter and afterFooter lines\n getFooter(tooltipItems, options) {\n const {callbacks} = options;\n\n const beforeFooter = invokeCallbackWithFallback(callbacks, 'beforeFooter', this, tooltipItems);\n const footer = invokeCallbackWithFallback(callbacks, 'footer', this, tooltipItems);\n const afterFooter = invokeCallbackWithFallback(callbacks, 'afterFooter', this, tooltipItems);\n\n let lines = [];\n lines = pushOrConcat(lines, splitNewlines(beforeFooter));\n lines = pushOrConcat(lines, splitNewlines(footer));\n lines = pushOrConcat(lines, splitNewlines(afterFooter));\n\n return lines;\n }\n\n /**\n\t * @private\n\t */\n _createItems(options) {\n const active = this._active;\n const data = this.chart.data;\n const labelColors = [];\n const labelPointStyles = [];\n const labelTextColors = [];\n let tooltipItems = [];\n let i, len;\n\n for (i = 0, len = active.length; i < len; ++i) {\n tooltipItems.push(createTooltipItem(this.chart, active[i]));\n }\n\n // If the user provided a filter function, use it to modify the tooltip items\n if (options.filter) {\n tooltipItems = tooltipItems.filter((element, index, array) => options.filter(element, index, array, data));\n }\n\n // If the user provided a sorting function, use it to modify the tooltip items\n if (options.itemSort) {\n tooltipItems = tooltipItems.sort((a, b) => options.itemSort(a, b, data));\n }\n\n // Determine colors for boxes\n each(tooltipItems, (context) => {\n const scoped = overrideCallbacks(options.callbacks, context);\n labelColors.push(invokeCallbackWithFallback(scoped, 'labelColor', this, context));\n labelPointStyles.push(invokeCallbackWithFallback(scoped, 'labelPointStyle', this, context));\n labelTextColors.push(invokeCallbackWithFallback(scoped, 'labelTextColor', this, context));\n });\n\n this.labelColors = labelColors;\n this.labelPointStyles = labelPointStyles;\n this.labelTextColors = labelTextColors;\n this.dataPoints = tooltipItems;\n return tooltipItems;\n }\n\n update(changed, replay) {\n const options = this.options.setContext(this.getContext());\n const active = this._active;\n let properties;\n let tooltipItems = [];\n\n if (!active.length) {\n if (this.opacity !== 0) {\n properties = {\n opacity: 0\n };\n }\n } else {\n const position = positioners[options.position].call(this, active, this._eventPosition);\n tooltipItems = this._createItems(options);\n\n this.title = this.getTitle(tooltipItems, options);\n this.beforeBody = this.getBeforeBody(tooltipItems, options);\n this.body = this.getBody(tooltipItems, options);\n this.afterBody = this.getAfterBody(tooltipItems, options);\n this.footer = this.getFooter(tooltipItems, options);\n\n const size = this._size = getTooltipSize(this, options);\n const positionAndSize = Object.assign({}, position, size);\n const alignment = determineAlignment(this.chart, options, positionAndSize);\n const backgroundPoint = getBackgroundPoint(options, positionAndSize, alignment, this.chart);\n\n this.xAlign = alignment.xAlign;\n this.yAlign = alignment.yAlign;\n\n properties = {\n opacity: 1,\n x: backgroundPoint.x,\n y: backgroundPoint.y,\n width: size.width,\n height: size.height,\n caretX: position.x,\n caretY: position.y\n };\n }\n\n this._tooltipItems = tooltipItems;\n this.$context = undefined;\n\n if (properties) {\n this._resolveAnimations().update(this, properties);\n }\n\n if (changed && options.external) {\n options.external.call(this, {chart: this.chart, tooltip: this, replay});\n }\n }\n\n drawCaret(tooltipPoint, ctx, size, options) {\n const caretPosition = this.getCaretPosition(tooltipPoint, size, options);\n\n ctx.lineTo(caretPosition.x1, caretPosition.y1);\n ctx.lineTo(caretPosition.x2, caretPosition.y2);\n ctx.lineTo(caretPosition.x3, caretPosition.y3);\n }\n\n getCaretPosition(tooltipPoint, size, options) {\n const {xAlign, yAlign} = this;\n const {caretSize, cornerRadius} = options;\n const {topLeft, topRight, bottomLeft, bottomRight} = toTRBLCorners(cornerRadius);\n const {x: ptX, y: ptY} = tooltipPoint;\n const {width, height} = size;\n let x1, x2, x3, y1, y2, y3;\n\n if (yAlign === 'center') {\n y2 = ptY + (height / 2);\n\n if (xAlign === 'left') {\n x1 = ptX;\n x2 = x1 - caretSize;\n\n // Left draws bottom -> top, this y1 is on the bottom\n y1 = y2 + caretSize;\n y3 = y2 - caretSize;\n } else {\n x1 = ptX + width;\n x2 = x1 + caretSize;\n\n // Right draws top -> bottom, thus y1 is on the top\n y1 = y2 - caretSize;\n y3 = y2 + caretSize;\n }\n\n x3 = x1;\n } else {\n if (xAlign === 'left') {\n x2 = ptX + Math.max(topLeft, bottomLeft) + (caretSize);\n } else if (xAlign === 'right') {\n x2 = ptX + width - Math.max(topRight, bottomRight) - caretSize;\n } else {\n x2 = this.caretX;\n }\n\n if (yAlign === 'top') {\n y1 = ptY;\n y2 = y1 - caretSize;\n\n // Top draws left -> right, thus x1 is on the left\n x1 = x2 - caretSize;\n x3 = x2 + caretSize;\n } else {\n y1 = ptY + height;\n y2 = y1 + caretSize;\n\n // Bottom draws right -> left, thus x1 is on the right\n x1 = x2 + caretSize;\n x3 = x2 - caretSize;\n }\n y3 = y1;\n }\n return {x1, x2, x3, y1, y2, y3};\n }\n\n drawTitle(pt, ctx, options) {\n const title = this.title;\n const length = title.length;\n let titleFont, titleSpacing, i;\n\n if (length) {\n const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);\n\n pt.x = getAlignedX(this, options.titleAlign, options);\n\n ctx.textAlign = rtlHelper.textAlign(options.titleAlign);\n ctx.textBaseline = 'middle';\n\n titleFont = toFont(options.titleFont);\n titleSpacing = options.titleSpacing;\n\n ctx.fillStyle = options.titleColor;\n ctx.font = titleFont.string;\n\n for (i = 0; i < length; ++i) {\n ctx.fillText(title[i], rtlHelper.x(pt.x), pt.y + titleFont.lineHeight / 2);\n pt.y += titleFont.lineHeight + titleSpacing; // Line Height and spacing\n\n if (i + 1 === length) {\n pt.y += options.titleMarginBottom - titleSpacing; // If Last, add margin, remove spacing\n }\n }\n }\n }\n\n /**\n\t * @private\n\t */\n _drawColorBox(ctx, pt, i, rtlHelper, options) {\n const labelColor = this.labelColors[i];\n const labelPointStyle = this.labelPointStyles[i];\n const {boxHeight, boxWidth} = options;\n const bodyFont = toFont(options.bodyFont);\n const colorX = getAlignedX(this, 'left', options);\n const rtlColorX = rtlHelper.x(colorX);\n const yOffSet = boxHeight < bodyFont.lineHeight ? (bodyFont.lineHeight - boxHeight) / 2 : 0;\n const colorY = pt.y + yOffSet;\n\n if (options.usePointStyle) {\n const drawOptions = {\n radius: Math.min(boxWidth, boxHeight) / 2, // fit the circle in the box\n pointStyle: labelPointStyle.pointStyle,\n rotation: labelPointStyle.rotation,\n borderWidth: 1\n };\n // Recalculate x and y for drawPoint() because its expecting\n // x and y to be center of figure (instead of top left)\n const centerX = rtlHelper.leftForLtr(rtlColorX, boxWidth) + boxWidth / 2;\n const centerY = colorY + boxHeight / 2;\n\n // Fill the point with white so that colours merge nicely if the opacity is < 1\n ctx.strokeStyle = options.multiKeyBackground;\n ctx.fillStyle = options.multiKeyBackground;\n drawPoint(ctx, drawOptions, centerX, centerY);\n\n // Draw the point\n ctx.strokeStyle = labelColor.borderColor;\n ctx.fillStyle = labelColor.backgroundColor;\n drawPoint(ctx, drawOptions, centerX, centerY);\n } else {\n // Border\n ctx.lineWidth = isObject(labelColor.borderWidth) ? Math.max(...Object.values(labelColor.borderWidth)) : (labelColor.borderWidth || 1); // TODO, v4 remove fallback\n ctx.strokeStyle = labelColor.borderColor;\n ctx.setLineDash(labelColor.borderDash || []);\n ctx.lineDashOffset = labelColor.borderDashOffset || 0;\n\n // Fill a white rect so that colours merge nicely if the opacity is < 1\n const outerX = rtlHelper.leftForLtr(rtlColorX, boxWidth);\n const innerX = rtlHelper.leftForLtr(rtlHelper.xPlus(rtlColorX, 1), boxWidth - 2);\n const borderRadius = toTRBLCorners(labelColor.borderRadius);\n\n if (Object.values(borderRadius).some(v => v !== 0)) {\n ctx.beginPath();\n ctx.fillStyle = options.multiKeyBackground;\n addRoundedRectPath(ctx, {\n x: outerX,\n y: colorY,\n w: boxWidth,\n h: boxHeight,\n radius: borderRadius,\n });\n ctx.fill();\n ctx.stroke();\n\n // Inner square\n ctx.fillStyle = labelColor.backgroundColor;\n ctx.beginPath();\n addRoundedRectPath(ctx, {\n x: innerX,\n y: colorY + 1,\n w: boxWidth - 2,\n h: boxHeight - 2,\n radius: borderRadius,\n });\n ctx.fill();\n } else {\n // Normal rect\n ctx.fillStyle = options.multiKeyBackground;\n ctx.fillRect(outerX, colorY, boxWidth, boxHeight);\n ctx.strokeRect(outerX, colorY, boxWidth, boxHeight);\n // Inner square\n ctx.fillStyle = labelColor.backgroundColor;\n ctx.fillRect(innerX, colorY + 1, boxWidth - 2, boxHeight - 2);\n }\n }\n\n // restore fillStyle\n ctx.fillStyle = this.labelTextColors[i];\n }\n\n drawBody(pt, ctx, options) {\n const {body} = this;\n const {bodySpacing, bodyAlign, displayColors, boxHeight, boxWidth, boxPadding} = options;\n const bodyFont = toFont(options.bodyFont);\n let bodyLineHeight = bodyFont.lineHeight;\n let xLinePadding = 0;\n\n const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);\n\n const fillLineOfText = function(line) {\n ctx.fillText(line, rtlHelper.x(pt.x + xLinePadding), pt.y + bodyLineHeight / 2);\n pt.y += bodyLineHeight + bodySpacing;\n };\n\n const bodyAlignForCalculation = rtlHelper.textAlign(bodyAlign);\n let bodyItem, textColor, lines, i, j, ilen, jlen;\n\n ctx.textAlign = bodyAlign;\n ctx.textBaseline = 'middle';\n ctx.font = bodyFont.string;\n\n pt.x = getAlignedX(this, bodyAlignForCalculation, options);\n\n // Before body lines\n ctx.fillStyle = options.bodyColor;\n each(this.beforeBody, fillLineOfText);\n\n xLinePadding = displayColors && bodyAlignForCalculation !== 'right'\n ? bodyAlign === 'center' ? (boxWidth / 2 + boxPadding) : (boxWidth + 2 + boxPadding)\n : 0;\n\n // Draw body lines now\n for (i = 0, ilen = body.length; i < ilen; ++i) {\n bodyItem = body[i];\n textColor = this.labelTextColors[i];\n\n ctx.fillStyle = textColor;\n each(bodyItem.before, fillLineOfText);\n\n lines = bodyItem.lines;\n // Draw Legend-like boxes if needed\n if (displayColors && lines.length) {\n this._drawColorBox(ctx, pt, i, rtlHelper, options);\n bodyLineHeight = Math.max(bodyFont.lineHeight, boxHeight);\n }\n\n for (j = 0, jlen = lines.length; j < jlen; ++j) {\n fillLineOfText(lines[j]);\n // Reset for any lines that don't include colorbox\n bodyLineHeight = bodyFont.lineHeight;\n }\n\n each(bodyItem.after, fillLineOfText);\n }\n\n // Reset back to 0 for after body\n xLinePadding = 0;\n bodyLineHeight = bodyFont.lineHeight;\n\n // After body lines\n each(this.afterBody, fillLineOfText);\n pt.y -= bodySpacing; // Remove last body spacing\n }\n\n drawFooter(pt, ctx, options) {\n const footer = this.footer;\n const length = footer.length;\n let footerFont, i;\n\n if (length) {\n const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);\n\n pt.x = getAlignedX(this, options.footerAlign, options);\n pt.y += options.footerMarginTop;\n\n ctx.textAlign = rtlHelper.textAlign(options.footerAlign);\n ctx.textBaseline = 'middle';\n\n footerFont = toFont(options.footerFont);\n\n ctx.fillStyle = options.footerColor;\n ctx.font = footerFont.string;\n\n for (i = 0; i < length; ++i) {\n ctx.fillText(footer[i], rtlHelper.x(pt.x), pt.y + footerFont.lineHeight / 2);\n pt.y += footerFont.lineHeight + options.footerSpacing;\n }\n }\n }\n\n drawBackground(pt, ctx, tooltipSize, options) {\n const {xAlign, yAlign} = this;\n const {x, y} = pt;\n const {width, height} = tooltipSize;\n const {topLeft, topRight, bottomLeft, bottomRight} = toTRBLCorners(options.cornerRadius);\n\n ctx.fillStyle = options.backgroundColor;\n ctx.strokeStyle = options.borderColor;\n ctx.lineWidth = options.borderWidth;\n\n ctx.beginPath();\n ctx.moveTo(x + topLeft, y);\n if (yAlign === 'top') {\n this.drawCaret(pt, ctx, tooltipSize, options);\n }\n ctx.lineTo(x + width - topRight, y);\n ctx.quadraticCurveTo(x + width, y, x + width, y + topRight);\n if (yAlign === 'center' && xAlign === 'right') {\n this.drawCaret(pt, ctx, tooltipSize, options);\n }\n ctx.lineTo(x + width, y + height - bottomRight);\n ctx.quadraticCurveTo(x + width, y + height, x + width - bottomRight, y + height);\n if (yAlign === 'bottom') {\n this.drawCaret(pt, ctx, tooltipSize, options);\n }\n ctx.lineTo(x + bottomLeft, y + height);\n ctx.quadraticCurveTo(x, y + height, x, y + height - bottomLeft);\n if (yAlign === 'center' && xAlign === 'left') {\n this.drawCaret(pt, ctx, tooltipSize, options);\n }\n ctx.lineTo(x, y + topLeft);\n ctx.quadraticCurveTo(x, y, x + topLeft, y);\n ctx.closePath();\n\n ctx.fill();\n\n if (options.borderWidth > 0) {\n ctx.stroke();\n }\n }\n\n /**\n\t * Update x/y animation targets when _active elements are animating too\n\t * @private\n\t */\n _updateAnimationTarget(options) {\n const chart = this.chart;\n const anims = this.$animations;\n const animX = anims && anims.x;\n const animY = anims && anims.y;\n if (animX || animY) {\n const position = positioners[options.position].call(this, this._active, this._eventPosition);\n if (!position) {\n return;\n }\n const size = this._size = getTooltipSize(this, options);\n const positionAndSize = Object.assign({}, position, this._size);\n const alignment = determineAlignment(chart, options, positionAndSize);\n const point = getBackgroundPoint(options, positionAndSize, alignment, chart);\n if (animX._to !== point.x || animY._to !== point.y) {\n this.xAlign = alignment.xAlign;\n this.yAlign = alignment.yAlign;\n this.width = size.width;\n this.height = size.height;\n this.caretX = position.x;\n this.caretY = position.y;\n this._resolveAnimations().update(this, point);\n }\n }\n }\n\n /**\n * Determine if the tooltip will draw anything\n * @returns {boolean} True if the tooltip will render\n */\n _willRender() {\n return !!this.opacity;\n }\n\n draw(ctx) {\n const options = this.options.setContext(this.getContext());\n let opacity = this.opacity;\n\n if (!opacity) {\n return;\n }\n\n this._updateAnimationTarget(options);\n\n const tooltipSize = {\n width: this.width,\n height: this.height\n };\n const pt = {\n x: this.x,\n y: this.y\n };\n\n // IE11/Edge does not like very small opacities, so snap to 0\n opacity = Math.abs(opacity) < 1e-3 ? 0 : opacity;\n\n const padding = toPadding(options.padding);\n\n // Truthy/falsey value for empty tooltip\n const hasTooltipContent = this.title.length || this.beforeBody.length || this.body.length || this.afterBody.length || this.footer.length;\n\n if (options.enabled && hasTooltipContent) {\n ctx.save();\n ctx.globalAlpha = opacity;\n\n // Draw Background\n this.drawBackground(pt, ctx, tooltipSize, options);\n\n overrideTextDirection(ctx, options.textDirection);\n\n pt.y += padding.top;\n\n // Titles\n this.drawTitle(pt, ctx, options);\n\n // Body\n this.drawBody(pt, ctx, options);\n\n // Footer\n this.drawFooter(pt, ctx, options);\n\n restoreTextDirection(ctx, options.textDirection);\n\n ctx.restore();\n }\n }\n\n /**\n\t * Get active elements in the tooltip\n\t * @returns {Array} Array of elements that are active in the tooltip\n\t */\n getActiveElements() {\n return this._active || [];\n }\n\n /**\n\t * Set active elements in the tooltip\n\t * @param {array} activeElements Array of active datasetIndex/index pairs.\n\t * @param {object} eventPosition Synthetic event position used in positioning\n\t */\n setActiveElements(activeElements, eventPosition) {\n const lastActive = this._active;\n const active = activeElements.map(({datasetIndex, index}) => {\n const meta = this.chart.getDatasetMeta(datasetIndex);\n\n if (!meta) {\n throw new Error('Cannot find a dataset at index ' + datasetIndex);\n }\n\n return {\n datasetIndex,\n element: meta.data[index],\n index,\n };\n });\n const changed = !_elementsEqual(lastActive, active);\n const positionChanged = this._positionChanged(active, eventPosition);\n\n if (changed || positionChanged) {\n this._active = active;\n this._eventPosition = eventPosition;\n this._ignoreReplayEvents = true;\n this.update(true);\n }\n }\n\n /**\n\t * Handle an event\n\t * @param {ChartEvent} e - The event to handle\n\t * @param {boolean} [replay] - This is a replayed event (from update)\n\t * @param {boolean} [inChartArea] - The event is inside chartArea\n\t * @returns {boolean} true if the tooltip changed\n\t */\n handleEvent(e, replay, inChartArea = true) {\n if (replay && this._ignoreReplayEvents) {\n return false;\n }\n this._ignoreReplayEvents = false;\n\n const options = this.options;\n const lastActive = this._active || [];\n const active = this._getActiveElements(e, lastActive, replay, inChartArea);\n\n // When there are multiple items shown, but the tooltip position is nearest mode\n // an update may need to be made because our position may have changed even though\n // the items are the same as before.\n const positionChanged = this._positionChanged(active, e);\n\n // Remember Last Actives\n const changed = replay || !_elementsEqual(active, lastActive) || positionChanged;\n\n // Only handle target event on tooltip change\n if (changed) {\n this._active = active;\n\n if (options.enabled || options.external) {\n this._eventPosition = {\n x: e.x,\n y: e.y\n };\n\n this.update(true, replay);\n }\n }\n\n return changed;\n }\n\n /**\n\t * Helper for determining the active elements for event\n\t * @param {ChartEvent} e - The event to handle\n\t * @param {InteractionItem[]} lastActive - Previously active elements\n\t * @param {boolean} [replay] - This is a replayed event (from update)\n\t * @param {boolean} [inChartArea] - The event is inside chartArea\n\t * @returns {InteractionItem[]} - Active elements\n\t * @private\n\t */\n _getActiveElements(e, lastActive, replay, inChartArea) {\n const options = this.options;\n\n if (e.type === 'mouseout') {\n return [];\n }\n\n if (!inChartArea) {\n // Let user control the active elements outside chartArea. Eg. using Legend.\n return lastActive;\n }\n\n // Find Active Elements for tooltips\n const active = this.chart.getElementsAtEventForMode(e, options.mode, options, replay);\n\n if (options.reverse) {\n active.reverse();\n }\n\n return active;\n }\n\n /**\n\t * Determine if the active elements + event combination changes the\n\t * tooltip position\n\t * @param {array} active - Active elements\n\t * @param {ChartEvent} e - Event that triggered the position change\n\t * @returns {boolean} True if the position has changed\n\t */\n _positionChanged(active, e) {\n const {caretX, caretY, options} = this;\n const position = positioners[options.position].call(this, active, e);\n return position !== false && (caretX !== position.x || caretY !== position.y);\n }\n}\n\nexport default {\n id: 'tooltip',\n _element: Tooltip,\n positioners,\n\n afterInit(chart, _args, options) {\n if (options) {\n chart.tooltip = new Tooltip({chart, options});\n }\n },\n\n beforeUpdate(chart, _args, options) {\n if (chart.tooltip) {\n chart.tooltip.initialize(options);\n }\n },\n\n reset(chart, _args, options) {\n if (chart.tooltip) {\n chart.tooltip.initialize(options);\n }\n },\n\n afterDraw(chart) {\n const tooltip = chart.tooltip;\n\n if (tooltip && tooltip._willRender()) {\n const args = {\n tooltip\n };\n\n if (chart.notifyPlugins('beforeTooltipDraw', {...args, cancelable: true}) === false) {\n return;\n }\n\n tooltip.draw(chart.ctx);\n\n chart.notifyPlugins('afterTooltipDraw', args);\n }\n },\n\n afterEvent(chart, args) {\n if (chart.tooltip) {\n // If the event is replayed from `update`, we should evaluate with the final positions.\n const useFinalPosition = args.replay;\n if (chart.tooltip.handleEvent(args.event, useFinalPosition, args.inChartArea)) {\n // notify chart about the change, so it will render\n args.changed = true;\n }\n }\n },\n\n defaults: {\n enabled: true,\n external: null,\n position: 'average',\n backgroundColor: 'rgba(0,0,0,0.8)',\n titleColor: '#fff',\n titleFont: {\n weight: 'bold',\n },\n titleSpacing: 2,\n titleMarginBottom: 6,\n titleAlign: 'left',\n bodyColor: '#fff',\n bodySpacing: 2,\n bodyFont: {\n },\n bodyAlign: 'left',\n footerColor: '#fff',\n footerSpacing: 2,\n footerMarginTop: 6,\n footerFont: {\n weight: 'bold',\n },\n footerAlign: 'left',\n padding: 6,\n caretPadding: 2,\n caretSize: 5,\n cornerRadius: 6,\n boxHeight: (ctx, opts) => opts.bodyFont.size,\n boxWidth: (ctx, opts) => opts.bodyFont.size,\n multiKeyBackground: '#fff',\n displayColors: true,\n boxPadding: 0,\n borderColor: 'rgba(0,0,0,0)',\n borderWidth: 0,\n animation: {\n duration: 400,\n easing: 'easeOutQuart',\n },\n animations: {\n numbers: {\n type: 'number',\n properties: ['x', 'y', 'width', 'height', 'caretX', 'caretY'],\n },\n opacity: {\n easing: 'linear',\n duration: 200\n }\n },\n callbacks: defaultCallbacks\n },\n\n defaultRoutes: {\n bodyFont: 'font',\n footerFont: 'font',\n titleFont: 'font'\n },\n\n descriptors: {\n _scriptable: (name) => name !== 'filter' && name !== 'itemSort' && name !== 'external',\n _indexable: false,\n callbacks: {\n _scriptable: false,\n _indexable: false,\n },\n animation: {\n _fallback: false\n },\n animations: {\n _fallback: 'animation'\n }\n },\n\n // Resolve additionally from `interaction` options and defaults.\n additionalOptionScopes: ['interaction']\n};\n","// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\n\n/**\n * @namespace Chart\n */\nimport Chart from './core/core.controller.js';\n\nimport * as helpers from './helpers/index.js';\nimport _adapters from './core/core.adapters.js';\nimport Animation from './core/core.animation.js';\nimport animator from './core/core.animator.js';\nimport Animations from './core/core.animations.js';\nimport * as controllers from './controllers/index.js';\nimport DatasetController from './core/core.datasetController.js';\nimport Element from './core/core.element.js';\nimport * as elements from './elements/index.js';\nimport Interaction from './core/core.interaction.js';\nimport layouts from './core/core.layouts.js';\nimport * as platforms from './platform/index.js';\nimport * as plugins from './plugins/index.js';\nimport registry from './core/core.registry.js';\nimport Scale from './core/core.scale.js';\nimport * as scales from './scales/index.js';\nimport Ticks from './core/core.ticks.js';\n\n// Register built-ins\nChart.register(controllers, scales, elements, plugins);\n\nChart.helpers = {...helpers};\nChart._adapters = _adapters;\nChart.Animation = Animation;\nChart.Animations = Animations;\nChart.animator = animator;\nChart.controllers = registry.controllers.items;\nChart.DatasetController = DatasetController;\nChart.Element = Element;\nChart.elements = elements;\nChart.Interaction = Interaction;\nChart.layouts = layouts;\nChart.platforms = platforms;\nChart.Scale = Scale;\nChart.Ticks = Ticks;\n\n// Compatibility with ESM extensions\nObject.assign(Chart, controllers, scales, elements, plugins, platforms);\nChart.Chart = Chart;\n\nif (typeof window !== 'undefined') {\n window.Chart = Chart;\n}\n\nexport default Chart;\n\n"],"names":["noop","uid","id","isNullOrUndef","value","isArray","Array","type","Object","prototype","toString","call","slice","isObject","isNumberFinite","Number","isFinite","finiteOrDefault","defaultValue","valueOrDefault","toPercentage","dimension","endsWith","parseFloat","toDimension","callback","fn","args","thisArg","apply","each","loopable","reverse","i","len","keys","length","_elementsEqual","a0","a1","ilen","v0","v1","datasetIndex","index","clone","source","map","target","create","klen","k","isValidKey","key","indexOf","_merger","options","tval","sval","merge","sources","merger","current","mergeIf","_mergerIf","hasOwnProperty","keyResolvers","v","x","o","y","_splitKey","parts","split","tmp","part","push","resolveObjectKey","obj","resolver","_getKeyResolver","_capitalize","str","charAt","toUpperCase","defined","isFunction","setsEqual","a","b","size","item","has","_isClickEvent","e","PI","Math","TAU","PITAU","INFINITY","POSITIVE_INFINITY","RAD_PER_DEG","HALF_PI","QUARTER_PI","TWO_THIRDS_PI","log10","sign","almostEquals","epsilon","abs","niceNum","range","roundedRange","round","niceRange","pow","floor","fraction","_factorize","result","sqrt","sort","pop","isNumber","n","isNaN","almostWhole","rounded","_setMinAndMaxByKey","array","property","min","max","toRadians","degrees","toDegrees","radians","_decimalPlaces","isFiniteNumber","p","getAngleFromPoint","centrePoint","anglePoint","distanceFromXCenter","distanceFromYCenter","radialDistanceFromCenter","angle","atan2","distance","distanceBetweenPoints","pt1","pt2","_angleDiff","_normalizeAngle","_angleBetween","start","end","sameAngleIsFullCircle","s","angleToStart","angleToEnd","startToAngle","endToAngle","_limitValue","_int16Range","_isBetween","_lookup","table","cmp","mid","hi","lo","_lookupByKey","last","ti","_rlookupByKey","_filterBetween","values","arrayEvents","listenArrayEvents","listener","_chartjs","listeners","defineProperty","configurable","enumerable","forEach","method","base","res","this","object","unlistenArrayEvents","stub","splice","_arrayUnique","items","set","Set","from","requestAnimFrame","window","requestAnimationFrame","throttled","argsToUse","ticking","debounce","delay","timeout","clearTimeout","setTimeout","_toLeftRightCenter","align","_alignStartEnd","_textX","left","right","rtl","_getStartAndCountOfVisiblePoints","meta","points","animationsDisabled","pointCount","count","_sorted","iScale","_parsed","axis","minDefined","maxDefined","getUserBounds","getPixelForValue","_scaleRangesChanged","xScale","yScale","_scaleRanges","newRanges","xmin","xmax","ymin","ymax","changed","assign","Animator","constructor","_request","_charts","Map","_running","_lastDate","undefined","_notify","chart","anims","date","callbacks","numSteps","duration","initial","currentStep","_refresh","_update","Date","now","remaining","running","draw","_active","_total","tick","_getAnims","charts","get","complete","progress","listen","event","cb","add","reduce","acc","cur","_duration","stop","cancel","remove","delete","animator","lim","l","h","p2b","n2b","b2n","n2p","map$1","A","B","C","D","E","F","c","d","f","hex","h1","h2","eq","hexString","r","g","isShort","alpha","HUE_RE","hsl2rgbn","hsv2rgbn","hwb2rgbn","w","rgb","rgb2hsl","hueValue","calln","hsl2rgb","hue","hueParse","m","exec","p1","p2","hwb2rgb","hsv2rgb","Z","Y","X","W","V","U","T","S","R","Q","P","O","N","M","L","K","G","H","I","J","names$1","OiceXe","antiquewEte","aqua","aquamarRe","azuY","beige","bisque","black","blanKedOmond","Xe","XeviTet","bPwn","burlywood","caMtXe","KartYuse","KocTate","cSO","cSnflowerXe","cSnsilk","crimson","cyan","xXe","xcyan","xgTMnPd","xWay","xgYF","xgYy","xkhaki","xmagFta","xTivegYF","xSange","xScEd","xYd","xsOmon","xsHgYF","xUXe","xUWay","xUgYy","xQe","xviTet","dAppRk","dApskyXe","dimWay","dimgYy","dodgerXe","fiYbrick","flSOwEte","foYstWAn","fuKsia","gaRsbSo","ghostwEte","gTd","gTMnPd","Way","gYF","gYFLw","gYy","honeyMw","hotpRk","RdianYd","Rdigo","ivSy","khaki","lavFMr","lavFMrXsh","lawngYF","NmoncEffon","ZXe","ZcSO","Zcyan","ZgTMnPdLw","ZWay","ZgYF","ZgYy","ZpRk","ZsOmon","ZsHgYF","ZskyXe","ZUWay","ZUgYy","ZstAlXe","ZLw","lime","limegYF","lRF","magFta","maPon","VaquamarRe","VXe","VScEd","VpurpN","VsHgYF","VUXe","VsprRggYF","VQe","VviTetYd","midnightXe","mRtcYam","mistyPse","moccasR","navajowEte","navy","Tdlace","Tive","TivedBb","Sange","SangeYd","ScEd","pOegTMnPd","pOegYF","pOeQe","pOeviTetYd","papayawEp","pHKpuff","peru","pRk","plum","powMrXe","purpN","YbeccapurpN","Yd","Psybrown","PyOXe","saddNbPwn","sOmon","sandybPwn","sHgYF","sHshell","siFna","silver","skyXe","UXe","UWay","UgYy","snow","sprRggYF","stAlXe","tan","teO","tEstN","tomato","Qe","viTet","JHt","wEte","wEtesmoke","Lw","LwgYF","names","nameParse","unpacked","tkeys","j","ok","nk","replace","parseInt","unpack","transparent","toLowerCase","RGB_RE","to","modHSL","ratio","proto","fromObject","input","functionParse","rgbParse","Color","ret","_rgb","_valid","valid","rgbString","hslString","mix","color","weight","c1","c2","w2","w1","interpolate","t","rgb1","rgb2","clearer","greyscale","val","opaquer","negate","lighten","darken","saturate","desaturate","rotate","deg","isPatternOrGradient","getHoverColor","numbers","colors","intlCache","formatNumber","num","locale","cacheKey","JSON","stringify","formatter","Intl","NumberFormat","getNumberFormat","format","formatters","numeric","tickValue","ticks","notation","delta","maxTick","calculateDelta","logDelta","numDecimal","minimumFractionDigits","maximumFractionDigits","logarithmic","remain","significand","includes","Ticks","overrides","descriptors","getScope","node","root","scope","Defaults","_descriptors","_appliers","animation","backgroundColor","borderColor","datasets","devicePixelRatio","context","platform","getDevicePixelRatio","elements","events","font","family","style","lineHeight","hover","hoverBackgroundColor","ctx","hoverBorderColor","hoverColor","indexAxis","interaction","mode","intersect","includeInvisible","maintainAspectRatio","onHover","onClick","parsing","plugins","responsive","scale","scales","showLine","drawActiveElementsOnTop","describe","override","route","name","targetScope","targetName","scopeObject","targetScopeObject","privateName","defineProperties","writable","local","appliers","defaults","_scriptable","startsWith","_indexable","_fallback","easing","loop","properties","active","resize","show","animations","visible","hide","autoPadding","padding","top","bottom","display","offset","beginAtZero","bounds","grace","grid","lineWidth","drawOnChartArea","drawTicks","tickLength","tickWidth","_ctx","tickColor","border","dash","dashOffset","width","title","text","minRotation","maxRotation","mirror","textStrokeWidth","textStrokeColor","autoSkip","autoSkipPadding","labelOffset","minor","major","crossAlign","showLabelBackdrop","backdropColor","backdropPadding","_isDomSupported","document","_getParentNode","domNode","parent","parentNode","host","parseMaxStyle","styleValue","parentProperty","valueInPixels","getComputedStyle","element","ownerDocument","defaultView","getStyle","el","getPropertyValue","positions","getPositionedStyle","styles","suffix","pos","height","useOffsetPos","shadowRoot","getRelativePosition","canvas","currentDevicePixelRatio","borderBox","boxSizing","paddings","borders","box","touches","offsetX","offsetY","rect","getBoundingClientRect","clientX","clientY","getCanvasPosition","xOffset","yOffset","round1","getMaximumSize","bbWidth","bbHeight","aspectRatio","margins","maxWidth","maxHeight","containerSize","container","containerStyle","containerBorder","containerPadding","clientWidth","clientHeight","getContainerSize","retinaScale","forceRatio","forceStyle","pixelRatio","deviceHeight","deviceWidth","setTransform","supportsEventListenerOptions","passiveSupported","passive","addEventListener","removeEventListener","readUsedSize","matches","match","toFontString","_measureText","data","gc","longest","string","textWidth","measureText","_longestText","arrayOfThings","cache","garbageCollect","save","jlen","thing","nestedThing","restore","gcLen","_alignPixel","pixel","halfWidth","clearCanvas","getContext","resetTransform","clearRect","drawPoint","drawPointLegend","cornerRadius","xOffsetW","yOffsetW","pointStyle","rotation","radius","rad","translate","drawImage","beginPath","ellipse","arc","closePath","moveTo","sin","cos","lineTo","SQRT1_2","fill","borderWidth","stroke","_isPointInArea","point","area","margin","clipArea","clip","unclipArea","_steppedLineTo","previous","flip","midpoint","_bezierCurveTo","bezierCurveTo","cp1x","cp2x","cp1y","cp2y","decorateText","line","opts","strikethrough","underline","metrics","actualBoundingBoxLeft","actualBoundingBoxRight","actualBoundingBoxAscent","actualBoundingBoxDescent","yDecoration","strokeStyle","fillStyle","decorationWidth","drawBackdrop","oldColor","fillRect","renderText","lines","strokeWidth","strokeColor","translation","textAlign","textBaseline","setRenderOpts","backdrop","strokeText","fillText","addRoundedRectPath","topLeft","bottomLeft","bottomRight","topRight","_createResolver","scopes","prefixes","rootScopes","fallback","getTarget","finalRootScopes","_resolve","Symbol","toStringTag","_cacheable","_scopes","_rootScopes","_getTarget","Proxy","deleteProperty","prop","_keys","_cached","proxy","prefix","readKey","needsSubResolver","createSubResolver","_resolveWithPrefixes","getOwnPropertyDescriptor","Reflect","getPrototypeOf","getKeysFromAllScopes","ownKeys","storage","_storage","_attachContext","subProxy","descriptorDefaults","_proxy","_context","_subProxy","_stack","setContext","receiver","isScriptable","getValue","Error","join","_resolveScriptable","isIndexable","arr","filter","_resolveArray","_resolveWithContext","allKeys","scriptable","indexable","_allKeys","resolve","resolveFallback","addScopes","parentScopes","parentFallback","allScopes","addScopesFromKey","subGetTarget","resolveKeysFromAllScopes","_parseObjectDataRadialScale","_parsing","parsed","parse","EPSILON","getPoint","skip","getValueAxis","splineCurve","firstPoint","middlePoint","afterPoint","next","d01","d12","s01","s12","fa","fb","splineCurveMonotone","valueAxis","pointsLen","deltaK","mK","pointBefore","pointCurrent","pointAfter","slopeDelta","alphaK","betaK","tauK","squaredMagnitude","monotoneAdjust","iPixel","vPixel","monotoneCompute","capControlPoint","pt","_updateBezierControlPoints","controlPoints","spanGaps","cubicInterpolationMode","prev","tension","capBezierPoints","inArea","inAreaPrev","inAreaNext","atEdge","elasticIn","elasticOut","effects","linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInSine","easeOutSine","easeInOutSine","easeInExpo","easeOutExpo","easeInOutExpo","easeInCirc","easeOutCirc","easeInOutCirc","easeInElastic","easeOutElastic","easeInOutElastic","easeInBack","easeOutBack","easeInOutBack","easeInBounce","easeOutBounce","easeInOutBounce","_pointInLine","_steppedInterpolation","_bezierInterpolation","cp1","cp2","LINE_HEIGHT","FONT_STYLE","toLineHeight","numberOrZero","_readValueToProps","props","objProps","read","toTRBL","toTRBLCorners","toPadding","toFont","console","warn","inputs","info","cacheable","_addGrace","minmax","change","keepZero","createContext","parentContext","getRtlAdapter","rectX","setWidth","xPlus","leftForLtr","itemWidth","getRightToLeftAdapter","_itemWidth","overrideTextDirection","direction","original","getPropertyPriority","setProperty","prevTextDirection","restoreTextDirection","propertyFn","between","compare","normalize","normalizeSegment","_boundSegment","segment","startBound","endBound","getSegment","prevValue","inside","subStart","shouldStart","shouldStop","_boundSegments","segments","sub","_computeSegments","segmentOptions","_loop","findStartAndEnd","splitByStyles","solidSegments","_fullLoop","chartContext","_chart","baseStyle","readStyle","_datasetIndex","prevStyle","addStyle","st","dir","p0","p0DataIndex","p1DataIndex","styleChanged","doSplitByStyles","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","replacer","pixelSize","fontStyle","fontFamily","binarySearch","metaset","controller","_cachedMeta","lookupMethod","_reversePixels","_sharedOptions","getRange","evaluateInteractionItems","position","handler","metasets","getSortedVisibleDatasetMetas","getIntersectItems","useFinalPosition","isPointInArea","chartArea","inRange","getNearestCartesianItems","distanceMetric","useX","useY","deltaX","deltaY","getDistanceMetricForAxis","minDistance","center","getCenterPoint","getNearestItems","startAngle","endAngle","getProps","getNearestRadialItems","getAxisItems","rangeMethod","intersectsItem","Interaction","modes","dataset","getDatasetMeta","nearest","STATIC_POSITIONS","filterByPosition","filterDynamicPositionByAxis","sortByWeight","setLayoutDims","layouts","params","stacks","wrap","stack","stackWeight","placed","buildStacks","vBoxMaxWidth","hBoxMaxHeight","layout","fullSize","factor","horizontal","availableWidth","availableHeight","getCombinedMax","maxPadding","updateMaxPadding","boxPadding","updateDims","getPadding","newWidth","outerWidth","newHeight","outerHeight","widthChanged","heightChanged","same","other","getMargins","marginForPositions","fitBoxes","boxes","refitBoxes","refit","update","setBoxDims","placeBoxes","userPadding","addBox","_layers","z","removeBox","layoutItem","configure","minPadding","layoutBoxes","isHorizontal","wrapBoxes","centerHorizontal","centerVertical","leftAndTop","concat","rightAndBottom","vertical","buildLayoutBoxes","verticalBoxes","horizontalBoxes","beforeLayout","visibleVerticalBoxCount","total","freeze","updatePos","handleMaxPadding","BasePlatform","acquireContext","releaseContext","isAttached","updateConfig","config","BasicPlatform","EXPANDO_KEY","EVENT_TYPES","touchstart","touchmove","touchend","pointerenter","pointerdown","pointermove","pointerup","pointerleave","pointerout","isNullOrEmpty","eventListenerOptions","removeListener","nodeListContains","nodeList","contains","createAttachObserver","observer","MutationObserver","entries","trigger","entry","addedNodes","removedNodes","observe","childList","subtree","createDetachObserver","drpListeningCharts","oldDevicePixelRatio","onWindowResize","dpr","createResizeObserver","ResizeObserver","contentRect","listenDevicePixelRatioChanges","releaseObserver","disconnect","unlistenDevicePixelRatioChanges","createProxyAndListen","native","fromNativeEvent","addListener","DomPlatform","renderHeight","getAttribute","renderWidth","displayWidth","displayHeight","initCanvas","removeAttribute","setAttribute","proxies","$proxies","attach","detach","isConnected","_detectPlatform","OffscreenCanvas","interpolators","boolean","c0","helpersColor","number","Animation","cfg","currentValue","_fn","_easing","_start","_target","_prop","_from","_to","_promises","elapsed","wait","promises","Promise","rej","resolved","Animations","_properties","animationOptions","animatedProps","getOwnPropertyNames","option","_animateOptions","newOptions","$shared","$animations","resolveTargetOptions","_createAnimations","anim","all","awaitAll","then","scaleClip","allowedOverflow","getSortedDatasetIndices","filterVisible","_getSortedDatasetMetas","applyStack","dsIndex","singleMode","otherValue","isStacked","stacked","getOrCreateStack","stackKey","indexValue","subStack","getLastIndexInStack","vScale","positive","getMatchingVisibleMetas","updateStacks","_stacks","iAxis","vAxis","indexScale","valueScale","getStackKey","_top","_bottom","_visualValues","getFirstScaleId","shift","clearStacks","isDirectUpdateMode","cloneIfNotShared","cached","shared","DatasetController","static","_cachedDataOpts","getMeta","_type","_data","_objectData","_drawStart","_drawCount","enableOptionSharing","supportsDecimation","$context","_syncList","datasetElementType","dataElementType","initialize","linkScales","_stacked","addElements","isPluginEnabled","updateIndex","getDataset","chooseId","xid","xAxisID","yid","yAxisID","rid","rAxisID","iid","iAxisID","vid","vAxisID","getScaleForId","rScale","scaleID","_getOtherScale","reset","_destroy","_dataCheck","adata","convertObjectDataToArray","isExtensible","buildOrUpdateElements","resetNewElements","stackChanged","oldStacked","_resyncElements","scopeKeys","datasetScopeKeys","getOptionScopes","createResolver","sorted","parseArrayData","parseObjectData","parsePrimitiveData","isNotInOrderComparedToPrev","labels","getLabels","singleScale","xAxisKey","yAxisKey","getParsed","getDataElement","updateRangeFromParsed","parsedValue","NaN","getMinMax","canStack","otherScale","hidden","createStack","NEGATIVE_INFINITY","otherMin","otherMax","_skip","getAllParsedValues","getMaxOverflow","getLabelAndValue","label","getLabelForValue","_clip","disabled","toClip","defaultClip","resolveDatasetElementOptions","resolveDataElementOptions","dataIndex","raw","createDataContext","createDatasetContext","_resolveElementOptions","elementType","sharing","datasetElementScopeKeys","resolveNamedOptions","_resolveAnimations","transition","datasetAnimationScopeKeys","getSharedOptions","includeOptions","sharedOptions","_animationsDisabled","_getSharedOptions","firstOpts","previouslySharedOptions","updateSharedOptions","updateElement","_setStyle","removeHoverStyle","setHoverStyle","_removeDatasetHoverStyle","_setDatasetHoverStyle","arg1","arg2","numMeta","numData","_insertElements","_removeElements","move","updateElements","removed","_sync","_dataChanges","_onDataPush","arguments","_onDataPop","_onDataShift","_onDataSplice","newCount","_onDataUnshift","Element","tooltipPosition","hasValue","final","tickOpts","determinedMaxTicks","_tickSize","maxScale","_length","maxChart","_maxLength","determineMaxTicks","ticksLimit","maxTicksLimit","majorIndices","enabled","getMajorIndices","numMajorIndices","first","newTicks","spacing","ceil","skipMajors","evenMajorSpacing","diff","getEvenSpacing","factors","calculateSpacing","avgMajorSpacing","majorStart","majorEnd","offsetFromEdge","edge","getTicksLimit","ticksLength","sample","numItems","increment","getPixelForGridLine","offsetGridLines","validIndex","_startPixel","_endPixel","lineValue","getPixelForTick","getTickMarkLength","getTitleHeight","titleAlign","reverseAlign","Scale","super","_margins","paddingTop","paddingBottom","paddingLeft","paddingRight","labelRotation","_range","_gridLineItems","_labelItems","_labelSizes","_longestTextCache","_userMax","_userMin","_suggestedMax","_suggestedMin","_ticksLength","_borderValue","_cache","_dataLimitsCached","init","suggestedMin","suggestedMax","metas","getTicks","xLabels","yLabels","getLabelItems","_computeLabelItems","beforeUpdate","sampleSize","beforeSetDimensions","setDimensions","afterSetDimensions","beforeDataLimits","determineDataLimits","afterDataLimits","beforeBuildTicks","buildTicks","afterBuildTicks","samplingEnabled","_convertTicksToLabels","beforeCalculateLabelRotation","calculateLabelRotation","afterCalculateLabelRotation","afterAutoSkip","beforeFit","fit","afterFit","afterUpdate","startPixel","endPixel","reversePixels","_alignToPixels","alignToPixels","_callHooks","notifyPlugins","beforeTickToLabelConversion","generateTickLabels","afterTickToLabelConversion","numTicks","maxLabelDiagonal","_isVisible","labelSizes","_getLabelSizes","maxLabelWidth","widest","maxLabelHeight","highest","asin","minSize","titleOpts","gridOpts","titleHeight","tickPadding","angleRadians","labelHeight","labelWidth","_calculatePadding","_handleMargins","isRotated","labelsBelowTicks","offsetLeft","offsetRight","isFullSize","_computeLabelSizes","caches","widths","heights","tickFont","fontString","nestedLabel","widestLabelSize","highestLabelSize","_resolveTickFontOptions","valueAt","idx","getValueForPixel","getPixelForDecimal","decimal","getDecimalForPixel","getBasePixel","getBaseValue","createTickContext","optionTicks","rot","_computeGridLineItems","tl","borderOpts","axisWidth","axisHalfWidth","alignBorderValue","borderValue","alignedLineValue","tx1","ty1","tx2","ty2","x1","y1","x2","y2","positionAxisID","limit","step","optsAtIndex","optsAtIndexBorder","lineColor","tickBorderDash","tickBorderDashOffset","tickAndPadding","hTickAndPadding","lineCount","textOffset","_getXAxisLabelAlignment","_getYAxisLabelAlignment","halfCount","tickTextAlign","labelPadding","_computeLabelArea","drawBackground","getLineWidthForValue","findIndex","drawGrid","drawLine","setLineDash","lineDashOffset","drawBorder","lastLineWidth","drawLabels","renderTextOptions","drawTitle","titleX","titleY","titleArgs","tz","gz","bz","axisID","_maxDigits","fontSize","TypedRegistry","isForType","isPrototypeOf","register","parentScope","isIChartComponent","itemDefaults","defaultRoutes","routes","propertyParts","sourceName","sourceScope","routeDefaults","registerDefaults","unregister","Registry","controllers","_typedRegistries","_each","addControllers","addPlugins","addScales","getController","_get","getElement","getPlugin","getScale","removeControllers","removeElements","removePlugins","removeScales","typedRegistry","arg","reg","_getRegistryForType","_exec","itemReg","registry","component","camelMethod","PluginService","_init","notify","hook","_createDescriptors","descriptor","plugin","callCallback","cancelable","invalidate","_oldCache","_notifyStateChanges","localIds","allPlugins","getOpts","pluginOpts","createDescriptors","previousDescriptors","some","pluginScopeKeys","getIndexAxis","datasetDefaults","idMatchesAxis","determineAxis","scaleOptions","getAxisFromDataset","mergeScaleConfig","chartDefaults","configScales","chartIndexAxis","scaleConf","error","boundDs","retrieveAxisFromDatasets","defaultId","getDefaultScaleIDFromAxis","defaultScaleOptions","defaultID","getAxisFromDefaultScaleID","initOptions","initData","keyCache","keysCached","cachedKeys","generate","addIfFound","Config","_config","initConfig","_scopeCache","_resolverCache","clearCache","clear","datasetType","additionalOptionScopes","_cachedScopes","mainScope","resetCache","keyLists","chartOptionScopes","subPrefixes","getResolver","hasFunction","needContext","resolverCache","KNOWN_POSITIONS","positionIsHorizontal","compare2Level","l1","l2","onAnimationsComplete","onComplete","onAnimationProgress","onProgress","getCanvas","getElementById","instances","getChart","moveNumericKeys","intKey","Chart","invalidatePlugins","userConfig","initialCanvas","existingChart","_options","_aspectRatio","_metasets","_lastEvent","_listeners","_responsiveListeners","_sortedMetasets","_plugins","_hiddenIndices","attached","_doResize","resizeDelay","_initialize","bindEvents","_resizeBeforeDraw","_resize","newSize","newRatio","onResize","render","ensureScalesHaveIDs","axisOptions","buildOrUpdateScales","scaleOpts","updated","isRadial","dposition","dtype","scaleType","hasUpdated","_updateMetasets","_destroyDatasetMeta","_removeUnreferencedMetasets","_dataset","buildOrUpdateControllers","newControllers","order","isDatasetVisible","ControllerClass","_resetElements","animsDisabled","_updateScales","_checkEventBindings","_updateHiddenIndices","_minPadding","_updateLayout","_updateDatasets","_eventHandler","_updateHoverStyles","existingEvents","newEvents","unbindEvents","changes","_getUniformDataChanges","datasetCount","makeSet","changeSet","noArea","_idx","_updateDataset","layers","_drawDatasets","_drawDataset","useClip","getDatasetArea","getElementsAtEventForMode","getVisibleDatasetCount","setDatasetVisibility","toggleDataVisibility","getDataVisibility","_updateVisibility","_stop","destroy","toBase64Image","toDataURL","bindUserEvents","bindResponsiveEvents","_add","_remove","detached","updateHoverStyle","getActiveElements","setActiveElements","activeElements","lastActive","pluginId","replay","hoverOptions","deactivated","activated","inChartArea","eventFilter","_handleEvent","_getActiveElements","isClick","lastEvent","determineLastEvent","abstract","DateAdapterBase","members","formats","startOf","endOf","_adapters","_date","computeMinSampleSize","$bar","visibleMetas","getAllScaleValues","curr","updateMinAndPrev","parseValue","startValue","endValue","barStart","barEnd","_custom","parseFloatBar","parseArrayOrPrimitive","isFloatBar","custom","setBorderSkipped","borderSkipped","borderProps","enableBorderRadius","parseEdge","orig","v2","startEnd","setInflateAmount","inflateAmount","DoughnutController","animateRotate","animateScale","cutout","circumference","legend","generateLabels","fontColor","legendItem","innerRadius","outerRadius","getter","_getRotation","_getCircumference","_getRotationExtents","arcs","getMaxBorderWidth","getMaxOffset","maxSize","chartWeight","_getRingWeight","ratioX","ratioY","startX","startY","endX","endY","calcMax","calcMin","maxX","maxY","minX","minY","getRatioAndOffset","maxRadius","radiusLength","_getVisibleDatasetWeightTotal","calculateTotal","_getRingWeightOffset","_circumference","calculateCircumference","animationOpts","centerX","centerY","metaData","borderAlign","hoverBorderWidth","hoverOffset","ringWeightOffset","PolarAreaController","angleLines","circular","pointLabels","bind","_updateRadius","cutoutPercentage","xCenter","yCenter","datasetStartAngle","getIndexAngle","defaultAngle","countVisibleElements","_computeAngle","getDistanceFromCenterForValue","categoryPercentage","barPercentage","grouped","_index_","_value_","iAxisKey","vAxisKey","bars","ruler","_getRuler","vpixels","head","_calculateBarValuePixels","ipixels","_calculateBarIndexPixels","_getStacks","skipNull","_getStackCount","_getStackIndex","pixels","barThickness","stackCount","baseValue","minBarLength","actualBase","floating","barSign","halfGrid","maxBarThickness","Infinity","percent","chunk","computeFlexCategoryTraits","thickness","computeFitCategoryTraits","stackIndex","rects","_decimated","animated","maxGapLength","directUpdate","pointsCount","prevParsed","nullData","lastPoint","updateControlPoints","pointPosition","getPointPositionForValue","parseBorderRadius","angleDelta","borderRadius","halfThickness","innerLimit","computeOuterLimit","outerArcLimit","outerStart","outerEnd","innerStart","innerEnd","rThetaToXY","theta","pathArc","pixelMargin","innerR","spacingOffset","avNogSpacingRadius","angleOffset","outerStartAdjustedRadius","outerEndAdjustedRadius","outerStartAdjustedAngle","outerEndAdjustedAngle","innerStartAdjustedRadius","innerEndAdjustedRadius","innerStartAdjustedAngle","innerEndAdjustedAngle","outerMidAdjustedAngle","pCenter","p4","innerMidAdjustedAngle","p8","outerStartX","outerStartY","outerEndX","outerEndY","fullCircles","inner","lineJoin","angleMargin","clipArc","setStyle","lineCap","pathVars","paramsStart","paramsEnd","segmentStart","segmentEnd","outside","pathSegment","lineMethod","stepped","getLineMethod","fastPathSegment","prevX","lastY","avgX","countX","pointIndex","drawX","truncX","_getSegmentMethod","usePath2D","Path2D","path","_path","strokePathWithCache","segmentMethod","strokePathDirect","LineElement","_points","_segments","_pointsUpdated","_interpolate","_getInterpolationMethod","interpolated","hitRadius","getBarBounds","bar","half","skipOrLimit","boundingRects","maxW","maxH","parseBorderWidth","maxR","enableBorder","outer","skipX","skipY","addNormalRectPath","inflateRect","amount","refRect","chartX","chartY","rAdjust","betweenAngles","withinRadius","halfAngle","halfRadius","radiusOffset","drawArc","addRectPath","mouseX","mouseY","inXRange","inYRange","hoverRadius","findOrAddLabel","addedLabels","unshift","addIfString","lastIndexOf","_getLabelForValue","relativeLabelSize","minSpacing","LinearScaleBase","_startValue","_endValue","_valueRange","handleTickRangeOptions","setMin","setMax","minSign","maxSign","getTickLimit","maxTicks","stepSize","computeTickLimit","generationOptions","dataRange","precision","maxDigits","includeBounds","unit","maxSpaces","rmin","rmax","countDefined","niceMin","niceMax","numSpaces","decimalPlaces","generateTicks","LinearScale","log10Floor","changeExponent","isMajor","tickVal","steps","rangeExp","rangeStep","minExp","exp","startExp","lastTick","LogarithmicScale","_zero","getTickBackdropHeight","determineLimits","fitWithPointLabels","_padding","limits","valueCount","_pointLabels","pointLabelOpts","additionalAngle","centerPointLabels","getPointLabelContext","getPointPosition","drawingArea","plFont","textSize","updateLimits","setCenterPoint","_pointLabelItems","itemOpts","extra","createPointLabelItem","isNotOverlapped","buildPointLabelItems","hLimits","vLimits","outerDistance","pointLabelPosition","yForAngle","getTextAlignForAngle","leftForTextAlign","drawPointLabelBox","backdropLeft","backdropTop","backdropWidth","backdropHeight","pathRadiusLine","labelCount","RadialLinearScale","animate","leftMovement","rightMovement","topMovement","bottomMovement","scalingFactor","getValueForDistanceFromCenter","scaledDistance","pointLabel","createPointLabelContext","distanceFromCenter","getBasePosition","getPointLabelPosition","drawPointLabels","gridLineOpts","drawRadiusLine","INTERVALS","millisecond","common","second","minute","hour","day","week","month","quarter","year","UNITS","sorter","adapter","_adapter","parser","isoWeekday","_parseOpts","determineUnitForAutoTicks","minUnit","capacity","interval","MAX_SAFE_INTEGER","addTick","time","timestamps","ticksFromTimestamps","majorUnit","setMajorTicks","TimeScale","adapters","displayFormats","_unit","_majorUnit","_offsets","_normalized","normalized","_applyBounds","_getLabelBounds","getLabelTimestamps","timeOpts","_generate","_getLabelCapacity","determineUnitForFormatting","determineMajorUnit","initOffsets","offsetAfterAutoskip","getDecimalForValue","weekday","hasWeekday","getDataTimestamps","tooltipFormat","datetime","fmt","_tickFormatFunction","minorFormat","majorFormat","offsets","_getLabelSize","ticksOpts","tickLabelWidth","cosRotation","sinRotation","tickFontSize","exampleTime","exampleLabel","prevSource","nextSource","prevTarget","nextTarget","span","_addedLabels","added","_table","_minPos","_tableRange","_getTimestampsForTable","buildLookupTable","BORDER_COLORS","BACKGROUND_COLORS","getBorderColor","getBackgroundColor","getColorizer","colorizeDoughnutDataset","colorizePolarAreaDataset","colorizeDefaultDataset","containsColorsDefinitions","plugin_colors","forceOverride","_args","chartOptions","colorizer","cleanDecimatedDataset","cleanDecimatedData","plugin_decimation","algorithm","beforeElementsUpdate","xAxis","getStartAndCountOfVisiblePointsSimplified","threshold","decimated","samples","bucketWidth","sampledIndex","endIndex","maxAreaPoint","maxArea","nextA","avgY","avgRangeStart","avgRangeEnd","avgRangeLength","rangeOffs","rangeTo","pointAx","pointAy","lttbDecimation","minIndex","maxIndex","startIndex","xMin","dx","lastIndex","intermediateIndex1","intermediateIndex2","minMaxDecimation","_getBounds","_findSegmentEnd","_getEdge","_createBoundaryLine","boundary","linePoints","_pointsFromSegments","_shouldApplyFill","_resolveTarget","propagate","visited","_decodeFill","fillOption","parseFillOption","firstCh","decodeTargetIndex","addPointsBelow","sourcePoint","linesBelow","postponed","findPoint","pointValue","firstValue","lastValue","simpleArc","getLineByIndex","sourcePoints","below","getLinesBelow","_buildStackLine","_getTargetValue","computeCircularBoundary","_getTargetPixel","computeLinearBoundary","computeBoundary","_drawfill","lineOpts","above","clipVertical","doFill","clipY","lineLoop","tpoints","targetSegments","tgt","subBounds","fillSources","fillSource","src","notShape","clipBounds","interpolatedLineTo","targetLoop","interpolatedPoint","afterDatasetsUpdate","$filler","beforeDraw","drawTime","beforeDatasetsDraw","beforeDatasetDraw","getBoxSize","labelOpts","boxHeight","boxWidth","usePointStyle","pointStyleWidth","itemHeight","Legend","_added","legendHitBoxes","_hoveredItem","doughnutMode","legendItems","columnSizes","lineWidths","buildLabels","labelFont","_computeTitleHeight","_fitRows","_fitCols","hitboxes","totalHeight","row","_itemHeight","heightLimit","totalWidth","currentColWidth","currentColHeight","col","legendItemText","calculateItemWidth","fontLineHeight","calculateLegendItemHeight","calculateItemHeight","calculateItemSize","adjustHitBoxes","rtlHelper","hitbox","_draw","defaultColor","halfFontSize","cursor","textDirection","lineDash","drawOptions","SQRT2","yBoxTop","xBoxLeft","drawLegendBox","titleFont","titlePadding","topPaddingPlusHalfFontSize","_getLegendItemAt","hitBox","lh","handleEvent","onLeave","isListened","hoveredItem","sameItem","plugin_legend","_element","afterEvent","ci","useBorderRadius","Title","_drawArgs","fontOpts","plugin_title","titleBlock","createTitle","WeakMap","plugin_subtitle","positioners","average","eventPosition","nearestElement","tp","pushOrConcat","toPush","splitNewlines","String","createTooltipItem","formattedValue","getTooltipSize","tooltip","body","footer","bodyFont","footerFont","titleLineCount","footerLineCount","bodyLineItemCount","combinedBodyLength","bodyItem","before","after","beforeBody","afterBody","titleSpacing","titleMarginBottom","displayColors","bodySpacing","footerMarginTop","footerSpacing","widthPadding","maxLineWidth","determineXAlign","yAlign","chartWidth","xAlign","caret","caretSize","caretPadding","doesNotFitWithAlign","determineAlignment","determineYAlign","getBackgroundPoint","alignment","paddingAndSize","alignX","alignY","getAlignedX","getBeforeAfterBodyLines","overrideCallbacks","defaultCallbacks","beforeTitle","tooltipItems","afterTitle","beforeLabel","tooltipItem","labelColor","labelTextColor","bodyColor","labelPointStyle","afterLabel","beforeFooter","afterFooter","invokeCallbackWithFallback","Tooltip","opacity","_eventPosition","_size","_cachedAnimations","_tooltipItems","dataPoints","caretX","caretY","labelColors","labelPointStyles","labelTextColors","getTitle","getBeforeBody","getBody","bodyItems","scoped","getAfterBody","getFooter","_createItems","itemSort","positionAndSize","backgroundPoint","external","drawCaret","tooltipPoint","caretPosition","getCaretPosition","x3","y3","ptX","ptY","titleColor","_drawColorBox","colorX","rtlColorX","yOffSet","colorY","multiKeyBackground","outerX","innerX","strokeRect","drawBody","bodyAlign","bodyLineHeight","xLinePadding","fillLineOfText","bodyAlignForCalculation","textColor","drawFooter","footerAlign","footerColor","tooltipSize","quadraticCurveTo","_updateAnimationTarget","animX","animY","_willRender","hasTooltipContent","globalAlpha","positionChanged","_positionChanged","_ignoreReplayEvents","plugin_tooltip","afterInit","afterDraw","helpers","platforms"],"mappings":";;;;;;0bAUO,SAASA,IAEf,CAKM,MAAMC,EAAO,MAClB,IAAIC,EAAK,EACT,MAAO,IAAMA,GACf,EAHoB,GAUb,SAASC,EAAcC,GAC5B,OAAOA,OACT,CAOO,SAASC,EAAqBD,GACnC,GAAIE,MAAMD,SAAWC,MAAMD,QAAQD,GACjC,OAAO,EAET,MAAMG,EAAOC,OAAOC,UAAUC,SAASC,KAAKP,GAC5C,MAAyB,YAArBG,EAAKK,MAAM,EAAG,IAAuC,WAAnBL,EAAKK,OAAO,EAIpD,CAOO,SAASC,EAAST,GACvB,OAAiB,OAAVA,GAA4D,oBAA1CI,OAAOC,UAAUC,SAASC,KAAKP,EAC1D,CAMA,SAASU,EAAeV,GACtB,OAAyB,iBAAVA,GAAsBA,aA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0B,GAAMrH,SAASa,GAAa/jC,GAAQvB,GAAUoB,GAE9C0qC,GAAMo1B,QAAU,IAAIA,IACpBp1B,GAAM4G,UAAYA,GAClB5G,GAAMnhB,UAAYA,GAClBmhB,GAAMlgB,WAAaA,GACnBkgB,GAAMx/C,SAAWA,GACjBw/C,GAAMxG,YAAcqB,GAASrB,YAAY3+C,MACzCmlD,GAAM9c,kBAAoBA,GAC1B8c,GAAM3U,QAAUA,GAChB2U,GAAM9rC,SAAWA,GACjB8rC,GAAMtqB,YAAcA,GACpBsqB,GAAM5pB,QAAUA,GAChB4pB,GAAMq1B,UAAYA,GAClBr1B,GAAM1R,MAAQA,GACd0R,GAAMhtC,MAAQA,GAGd/jB,OAAO0O,OAAOqiD,GAAOxG,GAAa/jC,GAAQvB,GAAUoB,EAAS+/D,IAC7Dr1B,GAAMA,MAAQA,GAEQ,oBAAX9kD,SACTA,OAAO8kD,MAAQA","x_google_ignoreList":[5]}
\ No newline at end of file
public/scripts/charts-min.js
+1
-1
@@ -1 +1 @@
1
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Chart=e()}(this,function(){var a=Object.freeze({__proto__:null,get Colors(){return hr},get Decimation(){return ur},get Filler(){return Sr},get Legend(){return Or},get SubTitle(){return Er},get Title(){return Tr},get Tooltip(){return Yr}});function t(){}let F=(()=>{let t=0;return()=>t++})();function P(t){return null==t}function O(t){return!(!Array.isArray||!Array.isArray(t))||"[object"===(t=Object.prototype.toString.call(t)).slice(0,7)&&"Array]"===t.slice(-6)}function A(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function p(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function u(t,e){return p(t)?t:e}function T(t,e){return void 0===t?e:t}let V=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:+t/e,B=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function c(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function k(t,e,i,a){let s,r,n;if(O(t))if(r=t.length,a)for(s=r-1;0<=s;s--)e.call(i,t[s],s);else for(s=0;s<r;s++)e.call(i,t[s],s);else if(A(t))for(n=Object.keys(t),r=n.length,s=0;s<r;s++)e.call(i,t[n[s]],n[s])}function W(t,e){let i,a,s,r;if(!t||!e||t.length!==e.length)return!1;for(i=0,a=t.length;i<a;++i)if(s=t[i],r=e[i],s.datasetIndex!==r.datasetIndex||s.index!==r.index)return!1;return!0}function N(e){if(O(e))return e.map(N);if(A(e)){var i=Object.create(null),a=Object.keys(e),s=a.length;let t=0;for(;t<s;++t)i[a[t]]=N(e[a[t]]);return i}return e}function H(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function j(t,e,i,a){var s;H(t)&&(s=e[t],i=i[t],A(s)&&A(i)?Y(s,i,a):e[t]=N(i))}function Y(a,t,s){var e=O(t)?t:[t],i=e.length;if(A(a)){var r,n=(s=s||{}).merger||j;for(let t=0;t<i;++t)if(A(r=e[t])){let i=Object.keys(r);for(let t=0,e=i.length;t<e;++t)n(i[t],a,r,s)}}return a}function $(t,e){return Y(t,e,{merger:U})}function U(t,e,i){var a;H(t)&&(a=e[t],i=i[t],A(a)&&A(i)?$(a,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=N(i)))}let X={"":t=>t,x:t=>t.x,y:t=>t.y};function q(t){var e=t.split("."),i=[];let a="";for(let t of e)a+=t,a=a.endsWith("\\")?a.slice(0,-1)+".":(i.push(a),"");return i}function f(t,e){return(X[e]||(X[e]=function(){let i=q(e);return t=>{for(var e of i){if(""===e)break;t=t&&t[e]}return t}}()))(t)}function K(t){return t.charAt(0).toUpperCase()+t.slice(1)}let G=t=>void 0!==t,g=t=>"function"==typeof t,Z=(t,e)=>{if(t.size!==e.size)return!1;for(var i of t)if(!e.has(i))return!1;return!0};function J(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}let S=Math.PI,v=2*S,Q=v+S,tt=Number.POSITIVE_INFINITY,et=S/180,D=S/2,it=S/4,at=2*S/3,o=Math.log10,_=Math.sign;function st(t,e,i){return Math.abs(t-e)<i}function rt(t){var e=Math.round(t),e=(t=st(t,e,t/1e3)?e:t,Math.pow(10,Math.floor(o(t)))),t=t/e;return(t<=1?1:t<=2?2:t<=5?5:10)*e}function nt(t){var e=[],i=Math.sqrt(t);let a;for(a=1;a<i;a++)t%a==0&&(e.push(a),e.push(t/a));return i===(0|i)&&e.push(i),e.sort((t,e)=>t-e).pop(),e}function ot(t){return!isNaN(parseFloat(t))&&isFinite(t)}function lt(t,e){var i=Math.round(t);return i-e<=t&&t<=i+e}function ht(t,e,i){let a,s,r;for(a=0,s=t.length;a<s;a++)r=t[a][i],isNaN(r)||(e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))}function L(t){return t*(S/180)}function dt(t){return t*(180/S)}function ct(i){if(p(i)){let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}}function ut(t,e){var i=e.x-t.x,e=e.y-t.y,t=Math.sqrt(i*i+e*e);let a=Math.atan2(e,i);return a<-.5*S&&(a+=v),{angle:a,distance:t}}function gt(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ft(t,e){return(t-e+Q)%v-S}function x(t){return(t%v+v)%v}function pt(t,e,i,a){var t=x(t),e=x(e),i=x(i),s=x(e-t),r=x(i-t),n=x(t-e),o=x(t-i);return t===e||t===i||a&&e===i||r<s&&n<o}function C(t,e,i){return Math.max(e,Math.min(i,t))}function mt(t){return C(t,-32768,32767)}function d(t,e,i,a=1e-6){return t>=Math.min(e,i)-a&&t<=Math.max(e,i)+a}function bt(e,i,t){t=t||(t=>e[t]<i);let a,s=e.length-1,r=0;for(;1<s-r;)t(a=r+s>>1)?r=a:s=a;return{lo:r,hi:s}}let m=(i,a,s,t)=>bt(i,s,t?t=>{var e=i[t][a];return e<s||e===s&&i[t+1][a]===s}:t=>i[t][a]<s),xt=(e,i,a)=>bt(e,a,t=>e[t][i]>=a);function vt(t,e,i){let a=0,s=t.length;for(;a<s&&t[a]<e;)a++;for(;s>a&&t[s-1]>i;)s--;return 0<a||s<t.length?t.slice(a,s):t}let _t=["push","pop","shift","splice","unshift"];function yt(s,t){s._chartjs?s._chartjs.listeners.push(t):(Object.defineProperty(s,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),_t.forEach(t=>{let i="_onData"+K(t),a=s[t];Object.defineProperty(s,t,{configurable:!0,enumerable:!1,value(...e){var t=a.apply(this,e);return s._chartjs.listeners.forEach(t=>{"function"==typeof t[i]&&t[i](...e)}),t}})}))}function Mt(e,t){var i=e._chartjs;i&&(-1!==(t=(i=i.listeners).indexOf(t))&&i.splice(t,1),0<i.length||(_t.forEach(t=>{delete e[t]}),delete e._chartjs))}function wt(t){var e=new Set(t);return e.size===t.length?t:Array.from(e)}let kt="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function St(e,i){let a,s=!1;return function(...t){a=t,s||(s=!0,kt.call(window,()=>{s=!1,e.apply(i,a)}))}}function Pt(e,i){let a;return function(...t){return i?(clearTimeout(a),a=setTimeout(e,i,t)):e.apply(this,t),i}}let Dt=t=>"start"===t?"left":"end"===t?"right":"center",E=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,Ct=(t,e,i,a)=>t===(a?"left":"right")?i:"center"===t?(e+i)/2:e;function Ot(t,e,i){var a,s,r,n,o,l,h=e.length;let d=0,c=h;return t._sorted&&({iScale:t,_parsed:a}=t,s=t.axis,{min:r,max:n,minDefined:o,maxDefined:l}=t.getUserBounds(),o&&(d=C(Math.min(m(a,s,r).lo,i?h:m(e,s,t.getPixelForValue(r)).lo),0,h-1)),c=l?C(Math.max(m(a,t.axis,n,!0).hi+1,i?0:m(e,s,t.getPixelForValue(n),!0).hi+1),d,h)-d:h-d),{start:d,count:c}}function At(t){var{xScale:e,yScale:i,_scaleRanges:a}=t,s={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};return a?(e=a.xmin!==e.min||a.xmax!==e.max||a.ymin!==i.min||a.ymax!==i.max,Object.assign(a,s),e):(t._scaleRanges=s,!0)}var r=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,i,a,t){let s=i.listeners[t],r=i.duration;s.forEach(t=>t({chart:e,initial:i.initial,numSteps:r,currentStep:Math.min(a-i.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=kt.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(n=Date.now()){let o=0;this._charts.forEach((a,s)=>{if(a.running&&a.items.length){var r=a.items;let t,e=r.length-1,i=!1;for(;0<=e;--e)(t=r[e])._active?(t._total>a.duration&&(a.duration=t._total),t.tick(n),i=!0):(r[e]=r[r.length-1],r.pop());i&&(s.draw(),this._notify(s,a,n,"progress")),r.length||(a.running=!1,this._notify(s,a,n,"complete"),a.initial=!1),o+=r.length}}),this._lastDate=n,0===o&&(this._running=!1)}_getAnims(t){var e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return 0<this._getAnims(t).items.length}start(t){t=this._charts.get(t);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){return!!this._running&&!!((t=this._charts.get(t))&&t.running&&t.items.length)}stop(e){var i=this._charts.get(e);if(i&&i.items.length){var a=i.items;let t=a.length-1;for(;0<=t;--t)a[t].cancel();i.items=[],this._notify(e,i,Date.now(),"complete")}}remove(t){return this._charts.delete(t)}};function Tt(t){return t+.5|0}let Lt=(t,e,i)=>Math.max(Math.min(t,i),e);function Et(t){return Lt(Tt(2.55*t),0,255)}function Rt(t){return Lt(Tt(255*t),0,255)}function n(t){return Lt(Tt(t/2.55)/100,0,1)}function It(t){return Lt(Tt(100*t),0,100)}let l={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},zt=[..."0123456789ABCDEF"],Ft=t=>zt[15&t],Vt=t=>zt[(240&t)>>4]+zt[15&t],Bt=t=>(240&t)>>4==(15&t);let Wt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Nt(i,t,a){let s=t*Math.min(a,1-a),e=(t,e=(t+i/30)%12)=>a-s*Math.max(Math.min(e-3,9-e,1),-1);return[e(0),e(8),e(4)]}function Ht(i,a,s){var t=(t,e=(t+i/60)%6)=>s-s*a*Math.max(Math.min(e,4-e,1),0);return[t(5),t(3),t(1)]}function jt(t,e,i){var a=Nt(t,1,.5);let s;for(1<e+i&&(e*=s=1/(e+i),i*=s),s=0;s<3;s++)a[s]*=1-e-i,a[s]+=e;return a}function Yt(t){var e=t.r/255,i=t.g/255,t=t.b/255,a=Math.max(e,i,t),s=Math.min(e,i,t),r=(a+s)/2;let n,o,l;return a!==s&&(l=a-s,o=.5<r?l/(2-a-s):l/(a+s),n=60*(n=(s=i,i=t,(t=e)===a?(s-i)/l+(s<i?6:0):s===a?(i-t)/l+2:(t-s)/l+4))+.5),[0|n,o||0,r]}function $t(t,e,i,a){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,a)).map(Rt)}function Ut(t,e,i){return $t(Nt,t,e,i)}function Xt(t){return(t%360+360)%360}let qt={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Kt={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"},Gt;let Zt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,Jt=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Qt=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function te(e,i,a){if(e){let t=Yt(e);t[i]=Math.max(0,Math.min(t[i]+t[i]*a,0===i?360:1)),t=Ut(t),e.r=t[0],e.g=t[1],e.b=t[2]}}function ee(t,e){return t&&Object.assign(e||{},t)}function ie(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?3<=t.length&&(e={r:t[0],g:t[1],b:t[2],a:255},3<t.length)&&(e.a=Rt(t[3])):(e=ee(t,{r:0,g:0,b:0,a:1})).a=Rt(e.a),e}function ae(t){return("r"===t.charAt(0)?function(t){var e=Zt.exec(t);let i,a,s,r=255;if(e){if(void 0!==e[7]){let t=+e[7];r=e[8]?Et(t):Lt(255*t,0,255)}return i=+e[1],a=+e[3],s=+e[5],{r:255&(e[2]?Et(i):Lt(i,0,255)),g:255&(e[4]?Et(a):Lt(a,0,255)),b:255&(e[6]?Et(s):Lt(s,0,255)),a:r}}}:function(t){var e,i,a,t=Wt.exec(t);let s,r=255;if(t)return void 0!==t[5]&&(r=(t[6]?Et:Rt)(+t[5])),e=Xt(+t[2]),i=+t[3]/100,a=+t[4]/100,{r:(s="hwb"===t[1]?$t(jt,e,i,a):"hsv"===t[1]?$t(Ht,e,i,a):Ut(e,i,a))[0],g:s[1],b:s[2],a:r}})(t)}class se{constructor(t){if(t instanceof se)return t;var e,i,a=typeof t;let s;"object"==a?s=ie(t):"string"==a&&(i=(a=t).length,"#"===a[0]&&(4===i||5===i?e={r:255&17*l[a[1]],g:255&17*l[a[2]],b:255&17*l[a[3]],a:5===i?17*l[a[4]]:255}:7!==i&&9!==i||(e={r:l[a[1]]<<4|l[a[2]],g:l[a[3]]<<4|l[a[4]],b:l[a[5]]<<4|l[a[6]],a:9===i?l[a[7]]<<4|l[a[8]]:255})),s=e||(i=t,Gt||((Gt=function(){var t={},e=Object.keys(Kt),i=Object.keys(qt);let a,s,r,n,o;for(a=0;a<e.length;a++){for(n=o=e[a],s=0;s<i.length;s++)r=i[s],o=o.replace(r,qt[r]);r=parseInt(Kt[n],16),t[o]=[r>>16&255,r>>8&255,255&r]}return t}()).transparent=[0,0,0,0]),(i=Gt[i.toLowerCase()])&&{r:i[0],g:i[1],b:i[2],a:4===i.length?i[3]:255})||ae(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=ee(this._rgb);return t&&(t.a=n(t.a)),t}set rgb(t){this._rgb=ie(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${n(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid&&(t=this._rgb,e=t,e=Bt(e.r)&&Bt(e.g)&&Bt(e.b)&&Bt(e.a)?Ft:Vt,t)?"#"+e(t.r)+e(t.g)+e(t.b)+((t=t.a)<255?e(t):""):void 0;var t,e}hslString(){if(this._valid){var t,e,i,a=this._rgb;if(a)return t=(i=Yt(a))[0],e=It(i[1]),i=It(i[2]),a.a<255?`hsla(${t}, ${e}%, ${i}%, ${n(a.a)})`:`hsl(${t}, ${e}%, ${i}%)`}}mix(t,e){var i,a,s;return t&&(i=this.rgb,t=t.rgb,s=i.a-t.a,i.r=255&(a=(1+((a=2*(e=void 0===e?.5:e)-1)*s==-1?a:(a+s)/(1+a*s)))/2)*i.r+(s=1-a)*t.r+.5,i.g=255&a*i.g+s*t.g+.5,i.b=255&a*i.b+s*t.b+.5,i.a=e*i.a+(1-e)*t.a,this.rgb=i),this}interpolate(t,e){return t&&(this._rgb=(i=this._rgb,t=t._rgb,e=e,a=Qt(n(i.r)),s=Qt(n(i.g)),r=Qt(n(i.b)),{r:Rt(Jt(a+e*(Qt(n(t.r))-a))),g:Rt(Jt(s+e*(Qt(n(t.g))-s))),b:Rt(Jt(r+e*(Qt(n(t.b))-r))),a:i.a+e*(t.a-i.a)})),this;var i,a,s,r}clone(){return new se(this.rgb)}alpha(t){return this._rgb.a=Rt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){var t=this._rgb,e=Tt(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){var t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return te(this._rgb,2,t),this}darken(t){return te(this._rgb,2,-t),this}saturate(t){return te(this._rgb,1,t),this}desaturate(t){return te(this._rgb,1,-t),this}rotate(t){return e=this._rgb,t=t,(i=Yt(e))[0]=Xt(i[0]+t),i=Ut(i),e.r=i[0],e.g=i[1],e.b=i[2],this;var e,i}}function re(t){return!(!t||"object"!=typeof t||"[object CanvasPattern]"!==(t=t.toString())&&"[object CanvasGradient]"!==t)}function ne(t){return re(t)?t:new se(t)}function oe(t){return re(t)?t:new se(t).saturate(.5).darken(.1).hexString()}let le=["x","y","borderWidth","radius","tension"],he=["color","borderColor","backgroundColor"],de=new Map;function ce(t,e,s){return function(t,e){e=s||{};var i=t+JSON.stringify(e);let a=de.get(i);return a||(a=new Intl.NumberFormat(t,e),de.set(i,a)),a}(e).format(t)}let ue={values:t=>O(t)?t:""+t,numeric(e,t,i){if(0===e)return"0";var a=this.chart.options.locale;let s,r=e;if(1<i.length){let t=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(t<1e-4||1e15<t)&&(s="scientific"),r=function(t){let e=3<i.length?i[2].value-i[1].value:i[1].value-i[0].value;return e=1<=Math.abs(e)&&t!==Math.floor(t)?t-Math.floor(t):e}(e)}var n=o(Math.abs(r)),n=isNaN(n)?1:Math.max(Math.min(-1*Math.floor(n),20),0),n={notation:s,minimumFractionDigits:n,maximumFractionDigits:n};return Object.assign(n,this.options.ticks.format),ce(e,a,n)},logarithmic(t,e,i){var a;return 0===t?"0":(a=i[e].significand||t/Math.pow(10,Math.floor(o(t))),[1,2,3,5,10,15].includes(a)||e>.8*i.length?ue.numeric.call(this,t,e,i):"")}};var ge={formatters:ue};let fe=Object.create(null),pe=Object.create(null);function me(i,t){if(t){var a=t.split(".");for(let t=0,e=a.length;t<e;++t){var s=a[t];i=i[s]||(i[s]=Object.create(null))}}return i}function be(t,e,i){return"string"==typeof e?Y(me(t,e),i):Y(me(t,""),e)}var R=new class{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>oe(e.backgroundColor),this.hoverBorderColor=(t,e)=>oe(e.borderColor),this.hoverColor=(t,e)=>oe(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return be(this,t,e)}get(t){return me(this,t)}describe(t,e){return be(pe,t,e)}override(t,e){return be(fe,t,e)}route(t,e,i,a){let s=me(this,t),r=me(this,i),n="_"+e;Object.defineProperties(s,{[n]:{value:s[e],writable:!0},[e]:{enumerable:!0,get(){var t=this[n],e=r[a];return A(t)?Object.assign({},e,t):T(t,e)},set(t){this[n]=t}}})}apply(t){t.forEach(t=>t(this))}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:he},numbers:{type:"number",properties:le}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:ge.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function xe(){return"undefined"!=typeof window&&"undefined"!=typeof document}function ve(t){let e=t.parentNode;return e=e&&"[object ShadowRoot]"===e.toString()?e.host:e}function _e(t,e,i){let a;return"string"==typeof t?(a=parseInt(t,10),-1!==t.indexOf("%")&&(a=a/100*e.parentNode[i])):a=t,a}let ye=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function Me(t,e){return ye(t).getPropertyValue(e)}let we=["top","right","bottom","left"];function ke(e,i,a){var s={};a=a?"-"+a:"";for(let t=0;t<4;t++){var r=we[t];s[r]=parseFloat(e[i+"-"+r+a])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}function Se(t,e){if("native"in t)return t;var{canvas:i,currentDevicePixelRatio:a}=e,s=ye(i),r="border-box"===s.boxSizing,n=ke(s,"padding"),s=ke(s,"border","width"),{x:t,y:o,box:l}=function(t,e){var i,a=t.touches,a=a&&a.length?a[0]:t,{offsetX:s,offsetY:r}=a;let n,o,l=!1;if(i=r,t=t.target,!(0<s||0<i)||t&&t.shadowRoot){let t=e.getBoundingClientRect();n=a.clientX-t.left,o=a.clientY-t.top,l=!0}else n=s,o=r;return{x:n,y:o,box:l}}(t,i),h=n.left+(l&&s.left),l=n.top+(l&&s.top);let{width:d,height:c}=e;return r&&(d-=n.width+s.width,c-=n.height+s.height),{x:Math.round((t-h)/d*i.width/a),y:Math.round((o-l)/c*i.height/a)}}let Pe=t=>Math.round(10*t)/10;function De(t,e,i,a){var s=ye(t),r=ke(s,"margin"),n=_e(s.maxWidth,t,"clientWidth")||tt,o=_e(s.maxHeight,t,"clientHeight")||tt,t=function(t,s,r){let n,o;if(void 0===s||void 0===r){var l=ve(t);if(l){let t=l.getBoundingClientRect(),e=ye(l),i=ke(e,"border","width"),a=ke(e,"padding");s=t.width-a.width-i.width,r=t.height-a.height-i.height,n=_e(e.maxWidth,l,"clientWidth"),o=_e(e.maxHeight,l,"clientHeight")}else s=t.clientWidth,r=t.clientHeight}return{width:s,height:r,maxWidth:n||tt,maxHeight:o||tt}}(t,e,i);let{width:l,height:h}=t;if("content-box"===s.boxSizing){let t=ke(s,"border","width"),e=ke(s,"padding");l-=e.width+t.width,h-=e.height+t.height}return l=Math.max(0,l-r.width),h=Math.max(0,a?l/a:h-r.height),l=Pe(Math.min(l,n,t.maxWidth)),h=Pe(Math.min(h,o,t.maxHeight)),l&&!h&&(h=Pe(l/2)),(void 0!==e||void 0!==i)&&a&&t.height&&h>t.height&&(h=t.height,l=Pe(Math.floor(h*a))),{width:l,height:h}}function Ce(t,e,i){var e=e||1,a=Math.floor(t.height*e),s=Math.floor(t.width*e),r=(t.height=Math.floor(t.height),t.width=Math.floor(t.width),t.canvas);return r.style&&(i||!r.style.height&&!r.style.width)&&(r.style.height=t.height+"px",r.style.width=t.width+"px"),(t.currentDevicePixelRatio!==e||r.height!==a||r.width!==s)&&(t.currentDevicePixelRatio=e,r.height=a,r.width=s,t.ctx.setTransform(e,0,0,e,0,0),!0)}var Oe=function(){let t=!1;try{var e={get passive(){return!(t=!0)}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function Ae(t,e){t=Me(t,e),e=t&&t.match(/^(\d+)(\.\d+)?px$/);return e?+e[1]:void 0}function Te(t){return!t||P(t.size)||P(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Le(t,e,i,a,s){let r=e[s];return r||(r=e[s]=t.measureText(s).width,i.push(s)),a=r>a?r:a}function Ee(t,e,i,a){let s=(a=a||{}).data=a.data||{},r=a.garbageCollect=a.garbageCollect||[],n=(a.font!==e&&(s=a.data={},r=a.garbageCollect=[],a.font=e),t.save(),t.font=e,0);var o=i.length;let l,h,d,c,u;for(l=0;l<o;l++)if(null==(c=i[l])||O(c)){if(O(c))for(h=0,d=c.length;h<d;h++)null==(u=c[h])||O(u)||(n=Le(t,s,r,n,u))}else n=Le(t,s,r,n,c);t.restore();var g=r.length/2;if(g>i.length){for(l=0;l<g;l++)delete s[r[l]];r.splice(0,g)}return n}function Re(t,e,i){t=t.currentDevicePixelRatio,i=0!==i?Math.max(i/2,.5):0;return Math.round((e-i)*t)/t+i}function Ie(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function ze(t,e,i,a){Fe(t,e,i,a,null)}function Fe(t,e,i,a,s){let r,n,o,l,h,d,c,u;var g=e.pointStyle,f=e.rotation,p=e.radius;let m=(f||0)*et;if(g&&"object"==typeof g&&("[object HTMLImageElement]"===(r=g.toString())||"[object HTMLCanvasElement]"===r))t.save(),t.translate(i,a),t.rotate(m),t.drawImage(g,-g.width/2,-g.height/2,g.width,g.height),t.restore();else if(!(isNaN(p)||p<=0)){switch(t.beginPath(),g){default:s?t.ellipse(i,a,s/2,p,0,0,v):t.arc(i,a,p,0,v),t.closePath();break;case"triangle":d=s?s/2:p,t.moveTo(i+Math.sin(m)*d,a-Math.cos(m)*p),m+=at,t.lineTo(i+Math.sin(m)*d,a-Math.cos(m)*p),m+=at,t.lineTo(i+Math.sin(m)*d,a-Math.cos(m)*p),t.closePath();break;case"rectRounded":h=.516*p,l=p-h,n=Math.cos(m+it)*l,c=Math.cos(m+it)*(s?s/2-h:l),o=Math.sin(m+it)*l,u=Math.sin(m+it)*(s?s/2-h:l),t.arc(i-c,a-o,h,m-S,m-D),t.arc(i+u,a-n,h,m-D,m),t.arc(i+c,a+o,h,m,m+D),t.arc(i-u,a+n,h,m+D,m+S),t.closePath();break;case"rect":if(!f){l=Math.SQRT1_2*p,d=s?s/2:l,t.rect(i-d,a-l,2*d,2*l);break}m+=it;case"rectRot":c=Math.cos(m)*(s?s/2:p),n=Math.cos(m)*p,o=Math.sin(m)*p,u=Math.sin(m)*(s?s/2:p),t.moveTo(i-c,a-o),t.lineTo(i+u,a-n),t.lineTo(i+c,a+o),t.lineTo(i-u,a+n),t.closePath();break;case"crossRot":m+=it;case"cross":c=Math.cos(m)*(s?s/2:p),n=Math.cos(m)*p,o=Math.sin(m)*p,u=Math.sin(m)*(s?s/2:p),t.moveTo(i-c,a-o),t.lineTo(i+c,a+o),t.moveTo(i+u,a-n),t.lineTo(i-u,a+n);break;case"star":c=Math.cos(m)*(s?s/2:p),n=Math.cos(m)*p,o=Math.sin(m)*p,u=Math.sin(m)*(s?s/2:p),t.moveTo(i-c,a-o),t.lineTo(i+c,a+o),t.moveTo(i+u,a-n),t.lineTo(i-u,a+n),m+=it,c=Math.cos(m)*(s?s/2:p),n=Math.cos(m)*p,o=Math.sin(m)*p,u=Math.sin(m)*(s?s/2:p),t.moveTo(i-c,a-o),t.lineTo(i+c,a+o),t.moveTo(i+u,a-n),t.lineTo(i-u,a+n);break;case"line":n=s?s/2:Math.cos(m)*p,o=Math.sin(m)*p,t.moveTo(i-n,a-o),t.lineTo(i+n,a+o);break;case"dash":t.moveTo(i,a),t.lineTo(i+Math.cos(m)*(s?s/2:p),a+Math.sin(m)*p);break;case!1:t.closePath()}t.fill(),0<e.borderWidth&&t.stroke()}}function y(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function Ve(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Be(t){t.restore()}function We(e,i,a,t,s){if(!i)return e.lineTo(a.x,a.y);if("middle"===s){let t=(i.x+a.x)/2;e.lineTo(t,i.y),e.lineTo(t,a.y)}else"after"===s!=!!t?e.lineTo(i.x,a.y):e.lineTo(a.x,i.y);e.lineTo(a.x,a.y)}function Ne(t,e,i,a){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(a?e.cp1x:e.cp2x,a?e.cp1y:e.cp2y,a?i.cp2x:i.cp1x,a?i.cp2y:i.cp1y,i.x,i.y)}function He(t,e,i,a,s,r={}){var n,o,l,h,d,c,u,g,f=O(e)?e:[e],p=0<r.strokeWidth&&""!==r.strokeColor;let m,b;for(t.save(),t.font=s.string,e=t,(g=r).translation&&e.translate(g.translation[0],g.translation[1]),P(g.rotation)||e.rotate(g.rotation),g.color&&(e.fillStyle=g.color),g.textAlign&&(e.textAlign=g.textAlign),g.textBaseline&&(e.textBaseline=g.textBaseline),m=0;m<f.length;++m)b=f[m],r.backdrop&&(d=t,c=r.backdrop,u=void 0,u=d.fillStyle,d.fillStyle=c.color,d.fillRect(c.left,c.top,c.width,c.height),d.fillStyle=u),p&&(r.strokeColor&&(t.strokeStyle=r.strokeColor),P(r.strokeWidth)||(t.lineWidth=r.strokeWidth),t.strokeText(b,i,a,r.maxWidth)),t.fillText(b,i,a,r.maxWidth),c=t,d=i,u=a,n=b,h=l=void 0,((o=r).strikethrough||o.underline)&&(l=d-(n=c.measureText(n)).actualBoundingBoxLeft,d=d+n.actualBoundingBoxRight,h=u-n.actualBoundingBoxAscent,u=u+n.actualBoundingBoxDescent,n=o.strikethrough?(h+u)/2:u,c.strokeStyle=c.fillStyle,c.beginPath(),c.lineWidth=o.decorationWidth||2,c.moveTo(l,n),c.lineTo(d,n),c.stroke()),a+=Number(s.lineHeight);t.restore()}function je(t,e){var{x:e,y:i,w:a,h:s,radius:r}=e;t.arc(e+r.topLeft,i+r.topLeft,r.topLeft,-D,S,!0),t.lineTo(e,i+s-r.bottomLeft),t.arc(e+r.bottomLeft,i+s-r.bottomLeft,r.bottomLeft,S,D,!0),t.lineTo(e+a-r.bottomRight,i+s),t.arc(e+a-r.bottomRight,i+s-r.bottomRight,r.bottomRight,D,0,!0),t.lineTo(e+a,i+r.topRight),t.arc(e+a-r.topRight,i+r.topRight,r.topRight,0,-D,!0),t.lineTo(e+r.topLeft,i)}function Ye(o,l=[""],t,e,s=()=>o[0]){let i=t||o;void 0===e&&(e=ti("_fallback",o));t={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:o,_rootScopes:i,_fallback:e,_getTarget:s,override:t=>Ye([t,...o],l,i,e)};return new Proxy(t,{deleteProperty:(t,e)=>(delete t[e],delete t._keys,delete o[0][e],!0),get:(r,n)=>Ke(r,n,()=>{var t,e,i=n,a=o,s=r;for(e of l)if(t=ti(Xe(e,i),a),void 0!==t)return qe(i,t)?Je(a,s,i,t):t}),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(o[0]),has:(t,e)=>ei(t).includes(e),ownKeys:t=>ei(t),set(t,e,i){var a=t._storage||(t._storage=s());return t[e]=a[e]=i,delete t._keys,!0}})}function $e(a,e,i,s){var t={_cacheable:!1,_proxy:a,_context:e,_subProxy:i,_stack:new Set,_descriptors:Ue(a,s),setContext:t=>$e(a,t,i,s),override:t=>$e(a.override(t),e,i,s)};return new Proxy(t,{deleteProperty:(t,e)=>(delete t[e],delete a[e],!0),get:(o,h,d)=>Ke(o,h,()=>{{var l=o,e=h,i=d,{_proxy:a,_context:s,_subProxy:r,_descriptors:n}=l;let t=a[e];return O(t=g(t)&&n.isScriptable(e)?function(t,e,i){var{_proxy:a,_context:s,_subProxy:r,_stack:n}=l;if(n.has(t))throw new Error("Recursion detected: "+Array.from(n).join("->")+"->"+t);n.add(t);let o=e(s,r||i);return n.delete(t),o=qe(t,o)?Je(a._scopes,a,t,o):o}(e,t,i):t)&&t.length&&(t=function(s,r,t,e){var{_proxy:n,_context:o,_subProxy:l,_descriptors:h}=t;if(void 0!==o.index&&e(s))return r[o.index%r.length];if(A(r[0])){let i=r,a=n._scopes.filter(t=>t!==i);r=[];for(let e of i){let t=Je(a,n,s,e);r.push($e(t,o,l&&l[s],h))}}return r}(e,t,l,n.isIndexable)),t=qe(e,t)?$e(t,s,r&&r[e],n):t}}),getOwnPropertyDescriptor:(t,e)=>t._descriptors.allKeys?Reflect.has(a,e)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(a,e),getPrototypeOf:()=>Reflect.getPrototypeOf(a),has:(t,e)=>Reflect.has(a,e),ownKeys:()=>Reflect.ownKeys(a),set:(t,e,i)=>(a[e]=i,delete t[e],!0)})}function Ue(t,e={scriptable:!0,indexable:!0}){let{_scriptable:i=e.scriptable,_indexable:a=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:i,indexable:a,isScriptable:g(i)?i:()=>i,isIndexable:g(a)?a:()=>a}}let Xe=(t,e)=>t?t+K(e):e,qe=(t,e)=>A(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Ke(t,e,i){return Object.prototype.hasOwnProperty.call(t,e)?t[e]:(i=i(),t[e]=i)}function Ge(t,e,i){return g(t)?t(e,i):t}let Ze=(t,e)=>!0===t?e:"string"==typeof t?f(e,t):void 0;function Je(t,a,s,r){var e=a._rootScopes,i=Ge(a._fallback,s,r),t=[...t,...e],n=new Set,o=(n.add(r),Qe(n,t,s,i||s,r));return null!==o&&(void 0===i||i===s||null!==(o=Qe(n,t,i,o,r)))&&Ye(Array.from(n),[""],e,i,()=>{return t=s,e=r,i=a._getTarget(),t in i||(i[t]={}),O(i=i[t])&&A(e)?e:i||{};var t,e,i})}function Qe(t,e,i,a,s){for(;i;)i=function(e,t,i,a,s){for(var r of t){let t=Ze(i,r);if(t){e.add(t);r=Ge(t._fallback,i,s);if(void 0!==r&&r!==i&&r!==a)return r}else if(!1===t&&void 0!==a&&i!==a)return null}return!1}(t,e,i,a,s);return i}function ti(e,t){for(var i of t)if(i){let t=i[e];if(void 0!==t)return t}}function ei(t){let e=t._keys;return e=e||(t._keys=function(t){var e,i=new Set;for(e of t)for(let t of Object.keys(e).filter(t=>!t.startsWith("_")))i.add(t);return Array.from(i)}(t._scopes))}function ii(t,e,i,a){var s=t["iScale"],{key:r="r"}=this._parsing,n=new Array(a);let o,l,h,d;for(o=0,l=a;o<l;++o)d=e[h=o+i],n[o]={r:s.parse(f(d,r),h)};return n}let ai=Number.EPSILON||1e-14,si=(t,e)=>e<t.length&&!t[e].skip&&t[e],ri=t=>"x"===t?"y":"x";function ni(t,e,i,a){var t=t.skip?e:t,s=e,e=i.skip?e:i,i=gt(s,t),r=gt(e,s),n=i/(i+r),i=r/(i+r),r=a*(isNaN(n)?0:n),n=a*(isNaN(i)?0:i);return{previous:{x:s.x-r*(e.x-t.x),y:s.y-r*(e.y-t.y)},next:{x:s.x+n*(e.x-t.x),y:s.y+n*(e.y-t.y)}}}function oi(l,e="x"){var i=ri(e),t=l.length,o=Array(t).fill(0),h=Array(t);let a,s,r,n=si(l,0);for(a=0;a<t;++a)if(s=r,r=n,n=si(l,a+1),r){if(n){let t=n[e]-r[e];o[a]=0!=t?(n[i]-r[i])/t:0}h[a]=s?n?_(o[a-1])!==_(o[a])?0:(o[a-1]+o[a])/2:o[a-1]:o[a]}{var d=l,c=o,u=h,g=d.length;let e,i,a,s,r,n=si(d,0);for(let t=0;t<g-1;++t)r=n,n=si(d,t+1),r&&n&&(st(c[t],0,ai)?u[t]=u[t+1]=0:(e=u[t]/c[t],i=u[t+1]/c[t],(s=Math.pow(e,2)+Math.pow(i,2))<=9||(a=3/Math.sqrt(s),u[t]=e*a*c[t],u[t+1]=i*a*c[t])))}{var[f,p,m="x"]=[l,h,e];let a=ri(m),t=f.length,s,r,n,o=si(f,0);for(let i=0;i<t;++i)if(r=n,n=o,o=si(f,i+1),n){let t=n[m],e=n[a];r&&(s=(t-r[m])/3,n["cp1"+m]=t-s,n["cp1"+a]=e-s*p[i]),o&&(s=(o[m]-t)/3,n["cp2"+m]=t+s,n["cp2"+a]=e+s*p[i])}}}function li(t,e,i){return Math.max(Math.min(t,i),e)}function hi(n,e,o,i,t){let a,s,r,l;if(e.spanGaps&&(n=n.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)oi(n,t);else{let t=i?n[n.length-1]:n[0];for(a=0,s=n.length;a<s;++a)r=n[a],l=ni(t,r,n[Math.min(a+1,s-(i?0:1))%s],e.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,t=r}if(e.capBezierPoints){var h=n,d=o;let t,e,i,a,s,r=y(h[0],d);for(t=0,e=h.length;t<e;++t)s=a,a=r,r=t<e-1&&y(h[t+1],d),a&&(i=h[t],s&&(i.cp1x=li(i.cp1x,d.left,d.right),i.cp1y=li(i.cp1y,d.top,d.bottom)),r)&&(i.cp2x=li(i.cp2x,d.left,d.right),i.cp2y=li(i.cp2y,d.top,d.bottom))}}let di=t=>0===t||1===t,ci=(t,e,i)=>-Math.pow(2,10*--t)*Math.sin((t-e)*v/i),ui=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*v/i)+1,gi={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>--t*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-(--t*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>--t*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*D),easeOutSine:t=>Math.sin(t*D),easeInOutSine:t=>-.5*(Math.cos(S*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>di(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>1<=t?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1- --t*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>di(t)?t:ci(t,.075,.3),easeOutElastic:t=>di(t)?t:ui(t,.075,.3),easeInOutElastic(t){return di(t)?t:t<.5?.5*ci(2*t,.1125,.45):.5+.5*ui(2*t-1,.1125,.45)},easeInBack(t){return t*t*(2.70158*t-1.70158)},easeOutBack(t){return--t*t*(2.70158*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-gi.easeOutBounce(1-t),easeOutBounce(t){var e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*gi.easeInBounce(2*t):.5*gi.easeOutBounce(2*t-1)+.5};function fi(t,e,i,a){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function pi(t,e,i,a){return{x:t.x+i*(e.x-t.x),y:("middle"===a?i<.5?t:e:"after"===a?i<1?t:e:0<i?e:t).y}}function mi(t,e,i,a){var s={x:t.cp2x,y:t.cp2y},r={x:e.cp1x,y:e.cp1y},t=fi(t,s,i),s=fi(s,r,i),r=fi(r,e,i),e=fi(t,s,i),t=fi(s,r,i);return fi(e,t,i)}let bi=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,xi=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function vi(t,e){var i=(""+t).match(bi);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}let _i=t=>+t||0;function yi(e,i){var a={},t=A(i),s=t?Object.keys(i):i,r=A(e)?t?t=>T(e[t],e[i[t]]):t=>e[t]:()=>e;for(let t of s)a[t]=_i(r(t));return a}function Mi(t){return yi(t,{top:"y",right:"x",bottom:"y",left:"x"})}function wi(t){return yi(t,["topLeft","topRight","bottomLeft","bottomRight"])}function I(t){t=Mi(t);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function z(t,e){e=e||R.font;let i=T((t=t||{}).size,e.size),a=("string"==typeof i&&(i=parseInt(i,10)),T(t.style,e.style));a&&!(""+a).match(xi)&&(console.warn('Invalid font style specified: "'+a+'"'),a=void 0);t={family:T(t.family,e.family),lineHeight:vi(T(t.lineHeight,e.lineHeight),i),size:i,style:a,weight:T(t.weight,e.weight),string:""};return t.string=Te(t),t}function ki(t,e,i,a){let s,r,n,o=!0;for(s=0,r=t.length;s<r;++s)if(void 0!==(n=t[s])&&(void 0!==e&&"function"==typeof n&&(n=n(e),o=!1),void 0!==i&&O(n)&&(n=n[i%n.length],o=!1),void 0!==n))return a&&!o&&(a.cacheable=!1),n}function Si(t,e,i){var{min:t,max:a}=t,e=B(e,(a-t)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(t,-Math.abs(e)),max:s(a,e)}}function Pi(t,e){return Object.assign(Object.create(t),e)}function Di(t,e,i){return t?(a=e,s=i,{x:t=>a+a+s-t,setWidth(t){s=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t};var a,s}function Ci(t,e){var i,a;"ltr"!==e&&"rtl"!==e||(a=[(i=t.canvas.style).getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=a)}function Oi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Ai(t){return"angle"===t?{between:pt,compare:ft,normalize:x}:{between:d,compare:(t,e)=>t-e,normalize:t=>t}}function Ti({start:t,end:e,count:i,loop:a,style:s}){return{start:t%i,end:e%i,loop:a&&(e-t+1)%i==0,style:s}}function Li(t,i,g){if(!g)return[t];let{property:a,start:s,end:r}=g,n=i.length,{compare:o,between:l,normalize:h}=Ai(a),{start:d,end:c,loop:u,style:f}=function(t,e){var{property:i,start:a,end:s}=g,{between:r,normalize:n}=Ai(i),o=e.length;let l,h,{start:d,end:c,loop:u}=t;if(u){for(d+=o,c+=o,l=0,h=o;l<h&&r(n(e[d%o][i]),a,s);++l)d--,c--;d%=o,c%=o}return c<d&&(c+=o),{start:d,end:c,loop:u,style:t.style}}(t,i),p=[],m,b,x,v,_=null;for(let t=d,e=d;t<=c;++t)(b=i[t%n]).skip||(m=h(b[a]))!==x&&(v=l(m,s,r),null===(_=null===_&&(v||l(s,x,m)&&0!==o(s,x))?0===o(m,s)?t:e:_)||v&&0!==o(r,m)&&!l(r,x,m)||(p.push(Ti({start:_,end:t,loop:u,count:n,style:f})),_=null),e=t,x=m);return null!==_&&p.push(Ti({start:_,end:c,loop:u,count:n,style:f})),p}function Ei(e,i){var a=[],s=e.segments;for(let t=0;t<s.length;t++){var r=Li(s[t],e.points,i);r.length&&a.push(...r)}return a}function Ri(t,e){var i,a,s,r=t.points,n=t.options.spanGaps,o=r.length;return o?({start:a,end:s}=function(t,e,i){let a=0,s=e-1;if(i&&!n)for(;a<e&&!t[a].skip;)a++;for(;a<e&&t[a].skip;)a++;for(a%=e,i&&(s+=a);s>a&&t[s%e].skip;)s--;return s%=e,{start:a,end:s}}(r,o,i=!!t._loop),Ii(t,!0===n?[{start:a,end:s,loop:i}]:function(e,i,t,a){var s=e.length,r=[];let n,o=i,l=e[i];for(n=i+1;n<=t;++n){let t=e[n%s];t.skip||t.stop?l.skip||(a=!1,r.push({start:i%s,end:(n-1)%s,loop:a}),i=o=t.stop?n:null):(o=n,l.skip&&(i=n)),l=t}return null!==o&&r.push({start:i%s,end:o%s,loop:a}),r}(r,a,s<a?s+o:s,!!t._fullLoop&&0===a&&s===o-1),r,e)):[]}function Ii(e,i,a,u){if(u&&u.setContext&&a){var g=e,e=i,f=a,p=u;let s=g._chart.getContext(),t=zi(g.options),{_datasetIndex:r,options:{spanGaps:n}}=g,o=f.length,l=[],h=t,d=e[0].start,c=d;function m(t,e,i,a){var s=n?-1:1;if(t!==e){for(t+=o;f[t%o].skip;)t-=s;for(;f[e%o].skip;)e+=s;t%o!=e%o&&(l.push({start:t%o,end:e%o,loop:i,style:a}),h=a,d=e%o)}}for(let a of e){d=n?d:a.start;let e,i=f[d%o];for(c=d+1;c<=a.end;c++){let t=f[c%o];(function(t,e){if(!e)return;function i(t,e){return re(e)?(a.includes(e)||a.push(e),a.indexOf(e)):e}let a=[];return JSON.stringify(t,i)!==JSON.stringify(e,i)})(e=zi(p.setContext(Pi(s,{type:"segment",p0:i,p1:t,p0DataIndex:(c-1)%o,p1DataIndex:c%o,datasetIndex:r}))),h)&&m(d,c-1,a.loop,h),i=t,h=e}d<c-1&&m(d,c-1,a.loop,h)}return l}return i}function zi(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}var Fi=Object.freeze({__proto__:null,HALF_PI:D,INFINITY:tt,PI:S,PITAU:Q,QUARTER_PI:it,RAD_PER_DEG:et,TAU:v,TWO_THIRDS_PI:at,_addGrace:Si,_alignPixel:Re,_alignStartEnd:E,_angleBetween:pt,_angleDiff:ft,_arrayUnique:wt,_attachContext:$e,_bezierCurveTo:Ne,_bezierInterpolation:mi,_boundSegment:Li,_boundSegments:Ei,_capitalize:K,_computeSegments:Ri,_createResolver:Ye,_decimalPlaces:ct,_deprecated:function(t,e,i,a){void 0!==e&&console.warn(t+': "'+i+'" is deprecated. Please use "'+a+'" instead')},_descriptors:Ue,_elementsEqual:W,_factorize:nt,_filterBetween:vt,_getParentNode:ve,_getStartAndCountOfVisiblePoints:Ot,_int16Range:mt,_isBetween:d,_isClickEvent:J,_isDomSupported:xe,_isPointInArea:y,_limitValue:C,_longestText:Ee,_lookup:bt,_lookupByKey:m,_measureText:Le,_merger:j,_mergerIf:U,_normalizeAngle:x,_parseObjectDataRadialScale:ii,_pointInLine:fi,_readValueToProps:yi,_rlookupByKey:xt,_scaleRangesChanged:At,_setMinAndMaxByKey:ht,_splitKey:q,_steppedInterpolation:pi,_steppedLineTo:We,_textX:Ct,_toLeftRightCenter:Dt,_updateBezierControlPoints:hi,addRoundedRectPath:je,almostEquals:st,almostWhole:lt,callback:c,clearCanvas:Ie,clipArea:Ve,clone:N,color:ne,createContext:Pi,debounce:Pt,defined:G,distanceBetweenPoints:gt,drawPoint:ze,drawPointLegend:Fe,each:k,easingEffects:gi,finiteOrDefault:u,fontString:function(t,e,i){return e+" "+t+"px "+i},formatNumber:ce,getAngleFromPoint:ut,getHoverColor:oe,getMaximumSize:De,getRelativePosition:Se,getRtlAdapter:Di,getStyle:Me,isArray:O,isFinite:p,isFunction:g,isNullOrUndef:P,isNumber:ot,isObject:A,isPatternOrGradient:re,listenArrayEvents:yt,log10:o,merge:Y,mergeIf:$,niceNum:rt,noop:t,overrideTextDirection:Ci,readUsedSize:Ae,renderText:He,requestAnimFrame:kt,resolve:ki,resolveObjectKey:f,restoreTextDirection:Oi,retinaScale:Ce,setsEqual:Z,sign:_,splineCurve:ni,splineCurveMonotone:oi,supportsEventListenerOptions:Oe,throttled:St,toDegrees:dt,toDimension:B,toFont:z,toFontString:Te,toLineHeight:vi,toPadding:I,toPercentage:V,toRadians:L,toTRBL:Mi,toTRBLCorners:wi,uid:F,unclipArea:Be,unlistenArrayEvents:Mt,valueOrDefault:T});function Vi(t,r,e,n,o){var l=t.getSortedVisibleDatasetMetas(),h=e[r];for(let e=0,t=l.length;e<t;++e){let{index:i,data:a}=l[e],{lo:t,hi:s}=function(t,s,r,e){let{controller:i,data:n,_sorted:a}=t,o=i._cachedMeta.iScale;if(o&&s===o.axis&&"r"!==s&&a&&n.length){let a=o._reversePixels?xt:m;if(!e)return a(n,s,r);if(i._sharedOptions){let t=n[0],i="function"==typeof t.getRange&&t.getRange(s);if(i){let t=a(n,s,r-i),e=a(n,s,r+i);return{lo:t.lo,hi:e.hi}}}}return{lo:0,hi:n.length-1}}(l[e],r,h,o);for(let e=t;e<=s;++e){let t=a[e];t.skip||n(t,i,e)}}}function Bi(a,s,t,r,n){let o=[];return(n||a.isPointInArea(s))&&Vi(a,t,s,function(t,e,i){(n||y(t,a.chartArea,0))&&t.inRange(s.x,s.y,r)&&o.push({element:t,datasetIndex:e,index:i})},!0),o}function Wi(t,e,i,a,s,l){{if(l||t.isPointInArea(e)){if("r"!==i||a){var h=t,d=e,c=i,u=a,g=s,f=l;let r=[],n=function(t){let a=-1!==t.indexOf("x"),s=-1!==t.indexOf("y");return function(t,e){var i=a?Math.abs(t.x-e.x):0,t=s?Math.abs(t.y-e.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(t,2))}}(c),o=Number.POSITIVE_INFINITY;return Vi(h,c,d,function(t,e,i){var a,s=t.inRange(d.x,d.y,g);(!u||s)&&(a=t.getCenterPoint(g),f||h.isPointInArea(a)||s)&&((s=n(d,a))<o?(r=[{element:t,datasetIndex:e,index:i}],o=s):s===o&&r.push({element:t,datasetIndex:e,index:i}))}),r}{var o=e,p=s;let n=[];return Vi(t,i,o,function(t,e,i){var{startAngle:a,endAngle:s}=t.getProps(["startAngle","endAngle"],p),r=ut(t,{x:o.x,y:o.y})["angle"];pt(r,a,s)&&n.push({element:t,datasetIndex:e,index:i})}),n}}return[]}}function Ni(t,a,s,e,r){let n=[],o="x"===s?"inXRange":"inYRange",l=!1;return Vi(t,s,a,(t,e,i)=>{t[o](a[s],r)&&(n.push({element:t,datasetIndex:e,index:i}),l=l||t.inRange(a.x,a.y,r))}),e&&!l?[]:n}var Hi={evaluateInteractionItems:Vi,modes:{index(t,e,i,a){let s=Se(e,t),r=i.axis||"x",n=i.includeInvisible||!1,o=i.intersect?Bi(t,s,r,a,n):Wi(t,s,r,!1,a,n),l=[];return o.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{var e=o[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})}),l):[]},dataset(t,e,i,a){var e=Se(e,t),s=i.axis||"xy",r=i.includeInvisible||!1;let n=i.intersect?Bi(t,e,s,a,r):Wi(t,e,s,!1,a,r);if(0<n.length){let e=n[0].datasetIndex,i=t.getDatasetMeta(e).data;n=[];for(let t=0;t<i.length;++t)n.push({element:i[t],datasetIndex:e,index:t})}return n},point:(t,e,i,a)=>Bi(t,Se(e,t),i.axis||"xy",a,i.includeInvisible||!1),nearest(t,e,i,a){var e=Se(e,t),s=i.axis||"xy",r=i.includeInvisible||!1;return Wi(t,e,s,i.intersect,a,r)},x:(t,e,i,a)=>Ni(t,Se(e,t),"x",i.intersect,a),y:(t,e,i,a)=>Ni(t,Se(e,t),"y",i.intersect,a)}};let ji=["left","top","right","bottom"];function Yi(t,e){return t.filter(t=>t.pos===e)}function $i(t,e){return t.filter(t=>-1===ji.indexOf(t.pos)&&t.box.axis===e)}function Ui(t,a){return t.sort((t,e)=>{var i=a?e:t,t=a?t:e;return i.weight===t.weight?i.index-t.index:i.weight-t.weight})}function Xi(t,e,i,a){return Math.max(t[i],e[i])+Math.max(t[a],e[a])}function qi(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Ki(i,a,s,r){var n=[];let o,t,l,h,d,c;for(o=0,t=i.length,d=0;o<t;++o){l=i[o],(h=l.box).update(l.width||a.w,l.height||a.h,function(t,i){let a=i.maxPadding;{let e={left:0,top:0,right:0,bottom:0};return(t=t?["left","right"]:["top","bottom"]).forEach(t=>{e[t]=Math.max(i[t],a[t])}),e}}(l.horizontal,a));let{same:t,other:e}=function(e,t,i,a){var{pos:s,box:r}=i,n=e.maxPadding;if(!A(s)){i.size&&(e[s]-=i.size);let t=a[i.stack]||{size:0,count:1};t.size=Math.max(t.size,i.horizontal?r.height:r.width),i.size=t.size/t.count,e[s]+=i.size}return r.getPadding&&qi(n,r.getPadding()),a=Math.max(0,t.outerWidth-Xi(n,e,"left","right")),s=Math.max(0,t.outerHeight-Xi(n,e,"top","bottom")),r=a!==e.w,t=s!==e.h,e.w=a,e.h=s,i.horizontal?{same:r,other:t}:{same:t,other:r}}(a,s,l,r);d|=t&&n.length,c=c||e,h.fullSize||n.push(l)}return d&&Ki(n,a,s,r)||c}function Gi(t,e,i,a,s){t.top=i,t.left=e,t.right=e+a,t.bottom=i+s,t.width=a,t.height=s}function Zi(t,r,n,e){var o,l=n.padding;let{x:h,y:d}=r;for(o of t){let i=o.box,a=e[o.stack]||{count:1,placed:0,weight:1},s=o.stackWeight/a.weight||1;if(o.horizontal){let t=r.w*s,e=a.size||i.height;G(a.start)&&(d=a.start),i.fullSize?Gi(i,l.left,d,n.outerWidth-l.right-l.left,e):Gi(i,r.left+a.placed,d,t,e),a.start=d,a.placed+=t,d=i.bottom}else{let t=r.h*s,e=a.size||i.width;G(a.start)&&(h=a.start),i.fullSize?Gi(i,h,l.top,e,n.outerHeight-l.bottom-l.top):Gi(i,h,r.top+a.placed,e,t),a.start=h,a.placed+=t,h=i.right}}r.x=h,r.y=d}var s={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){e=t.boxes?t.boxes.indexOf(e):-1;-1!==e&&t.boxes.splice(e,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(i,a,s,r){if(i){var n,o,l=I(i.options.layout.padding),h=Math.max(a-l.width,0),d=Math.max(s-l.height,0),c=(u=function(t){var e=[];let i,a,s,r,n,o;for(i=0,a=(t||[]).length;i<a;++i)({position:r,options:{stack:n,stackWeight:o=1}}=s=t[i]),e.push({index:i,box:s,pos:r,horizontal:s.isHorizontal(),weight:s.weight,stack:n&&r+n,stackWeight:o});return e}(i.boxes),c=Ui(u.filter(t=>t.box.fullSize),!0),g=Ui(Yi(u,"left"),!0),f=Ui(Yi(u,"right")),m=Ui(Yi(u,"top"),!0),n=Ui(Yi(u,"bottom")),o=$i(u,"x"),p=$i(u,"y"),{fullSize:c,leftAndTop:g.concat(m),rightAndBottom:f.concat(p).concat(n).concat(o),chartArea:Yi(u,"chartArea"),vertical:g.concat(f).concat(p),horizontal:m.concat(n).concat(o)}),u=c.vertical,g=c.horizontal,f=(k(i.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}),u.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1),p=Object.freeze({outerWidth:a,outerHeight:s,padding:l,availableWidth:h,availableHeight:d,vBoxMaxWidth:h/2/f,hBoxMaxHeight:d/2}),m=Object.assign({},l);qi(m,I(r));let e=Object.assign({maxPadding:m,w:h,h:d,x:l.left,y:l.top},l),t=function(a,s){var r=function(t){var a,s,r={};for(a of t){let{stack:t,pos:e,stackWeight:i}=a;t&&ji.includes(e)&&((s=r[t]||(r[t]={count:0,placed:0,weight:0,size:0})).count++,s.weight+=i)}return r}(a),{vBoxMaxWidth:n,hBoxMaxHeight:o}=s;let l,t,h;for(l=0,t=a.length;l<t;++l){let t=(h=a[l]).box["fullSize"],e=r[h.stack],i=e&&h.stackWeight/e.weight;h.horizontal?(h.width=i?i*n:t&&s.availableWidth,h.height=o):(h.width=n,h.height=i?i*o:t&&s.availableHeight)}return r}(u.concat(g),p);Ki(c.fullSize,e,p,t),Ki(u,e,p,t),Ki(g,e,p,t)&&Ki(u,e,p,t);{var b=e;let i=b.maxPadding;function x(t){var e=Math.max(i[t]-b[t],0);return b[t]+=e,e}b.y+=x("top"),b.x+=x("left"),x("right"),x("bottom")}Zi(c.leftAndTop,e,p,t),e.x+=e.w,e.y+=e.h,Zi(c.rightAndBottom,e,p,t),i.chartArea={left:e.left,top:e.top,right:e.left+e.w,bottom:e.top+e.h,height:e.h,width:e.w},k(c.chartArea,t=>{t=t.box;Object.assign(t,i.chartArea),t.update(e.w,e.h,{left:0,top:0,right:0,bottom:0})})}}};class Ji{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,a){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,a?Math.floor(e/a):i)}}isAttached(t){return!0}updateConfig(t){}}class Qi extends Ji{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}let ta="$chartjs",ea={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ia=t=>null===t||""===t,aa=!!Oe&&{passive:!0};function sa(t,e){for(var i of t)if(i===e||i.contains(e))return!0}function ra(t,e,a){let s=t.canvas,i=new MutationObserver(e=>{let i=!1;for(let t of e)i=i||sa(t.addedNodes,s),i=i&&!sa(t.removedNodes,s);i&&a()});return i.observe(document,{childList:!0,subtree:!0}),i}function na(t,e,a){let s=t.canvas,i=new MutationObserver(e=>{let i=!1;for(let t of e)i=i||sa(t.removedNodes,s),i=i&&!sa(t.addedNodes,s);i&&a()});return i.observe(document,{childList:!0,subtree:!0}),i}let oa=new Map,la=0;function ha(){let i=window.devicePixelRatio;i!==la&&(la=i,oa.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function da(e,t,a){let i=e.canvas,s=i&&ve(i);if(s){let i=St((t,e)=>{var i=s.clientWidth;a(t,e),i<s.clientWidth&&a()},window),t=new ResizeObserver(t=>{var t=t[0],e=t.contentRect.width,t=t.contentRect.height;0===e&&0===t||i(e,t)});return t.observe(s),e=e,r=i,oa.size||window.addEventListener("resize",ha),oa.set(e,r),t;var r}}function ca(t,e,i){i&&i.disconnect(),"resize"===e&&(i=t,oa.delete(i),oa.size||window.removeEventListener("resize",ha))}function ua(e,t,i){var a=e.canvas,s=St(t=>{null!==e.ctx&&i(function(t,e){var i=ea[t.type]||t.type,{x:a,y:s}=Se(t,e);return{type:i,chart:e,native:t,x:void 0!==a?a:null,y:void 0!==s?s:null}}(t,e))},e);return a.addEventListener(t,s,aa),s}class ga extends Ji{acquireContext(e,t){var i=e&&e.getContext&&e.getContext("2d");{if(i&&i.canvas===e){var a=t,t=e.style,s=e.getAttribute("height"),r=e.getAttribute("width");if(e[ta]={initial:{height:s,width:r,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",ia(r)){let t=Ae(e,"width");void 0!==t&&(e.width=t)}if(ia(s))if(""===e.style.height)e.height=e.width/(a||2);else{let t=Ae(e,"height");void 0!==t&&(e.height=t)}return i}return null}}releaseContext(t){let i=t.canvas;if(!i[ta])return!1;let a=i[ta].initial,e=(["height","width"].forEach(t=>{var e=a[t];P(e)?i.removeAttribute(t):i.setAttribute(t,e)}),a.style||{});return Object.keys(e).forEach(t=>{i.style[t]=e[t]}),i.width=i.width,delete i[ta],!0}addEventListener(t,e,i){this.removeEventListener(t,e);var a=t.$proxies||(t.$proxies={}),s={attach:ra,detach:na,resize:da}[e]||ua;a[e]=s(t,e,i)}removeEventListener(t,e){var i=t.$proxies||(t.$proxies={}),a=i[e];a&&(({attach:ca,detach:ca,resize:ca}[e]||function(t,e,i){t.canvas.removeEventListener(e,i,aa)})(t,e,a),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,a){return De(t,e,i,a)}isAttached(t){t=ve(t);return!(!t||!t.isConnected)}}function fa(t){return!xe()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Qi:ga}let pa=Object.freeze({__proto__:null,BasePlatform:Ji,BasicPlatform:Qi,DomPlatform:ga,_detectPlatform:fa}),ma="transparent",ba={boolean:(t,e,i)=>.5<i?e:t,color(t,e,i){var t=ne(t||ma),a=t.valid&&ne(e||ma);return a&&a.valid?a.mix(t,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class xa{constructor(t,e,i,a){var s=e[i],s=(a=ki([t.to,a,s,t.from]),ki([t.from,s,a]));this._active=!0,this._fn=t.fn||ba[t.type||typeof s],this._easing=gi[t.easing]||gi.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=s,this._to=a,this._promises=void 0}active(){return this._active}update(t,e,i){var a,s,r;this._active&&(this._notify(!1),a=this._target[this._prop],s=i-this._start,r=this._duration-s,this._start=i,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=ki([t.to,e,a,t.from]),this._from=ki([t.from,a,e]))}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){var t=t-this._start,e=this._duration,i=this._prop,a=this._from,s=this._loop,r=this._to;this._active=a!==r&&(s||t<e),this._active?t<0?this._target[i]=a:(t=t/e%2,t=this._easing(Math.min(1,Math.max(0,s&&1<t?2-t:t))),this._target[i]=this._fn(a,r,t)):(this._target[i]=r,this._notify(!0))}wait(){let i=this._promises||(this._promises=[]);return new Promise((t,e)=>{i.push({res:t,rej:e})})}_notify(t){var e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}class va{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(A(t)){let s=Object.keys(R.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{var a=t[i];if(A(a)){let e={};for(let t of s)e[t]=a[t];(O(a.properties)&&a.properties||[i]).forEach(t=>{t!==i&&r.has(t)||r.set(t,e)})}})}}_animateOptions(t,e){let i=e.options,a=function(e,i){if(i){let t=e.options;if(t)return t.$shared&&(e.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t;e.options=i}}(t,i);return a?(e=this._createAnimations(a,i),i.$shared&&function(e,t){var i=[],a=Object.keys(t);for(let t=0;t<a.length;t++){var s=e[a[t]];s&&s.active()&&i.push(s.wait())}return Promise.all(i)}(t.options.$animations,i).then(()=>{t.options=i},()=>{}),e):[]}_createAnimations(e,i){var a=this._properties,s=[],r=e.$animations||(e.$animations={}),t=Object.keys(i),n=Date.now();let o;for(o=t.length-1;0<=o;--o){var l=t[o];if("$"!==l.charAt(0))if("options"===l)s.push(...this._animateOptions(e,i));else{var h=i[l];let t=r[l];var d=a.get(l);if(t){if(d&&t.active()){t.update(d,h,n);continue}t.cancel()}d&&d.duration?(r[l]=t=new xa(d,e,l,h),s.push(t)):e[l]=h}}return s}update(t,e){var i;if(0!==this._properties.size)return(i=this._createAnimations(t,e)).length?(r.add(this._chart,i),!0):void 0;Object.assign(t,e)}}function _a(t,e){var t=t&&t.options||{},i=t.reverse,a=void 0===t.min?e:0,t=void 0===t.max?e:0;return{start:i?t:a,end:i?a:t}}function ya(t,e){var i=[],a=t._getSortedDatasetMetas(e);let s,r;for(s=0,r=a.length;s<r;++s)i.push(a[s].index);return i}function Ma(t,e,i,a={}){var s=t.keys,r="single"===a.mode;let n,o,l,h;if(null!==e){for(n=0,o=s.length;n<o;++n){if((l=+s[n])===i){if(a.all)continue;break}p(h=t.values[l])&&(r||0===e||_(e)===_(h))&&(e+=h)}return e}}function wa(t,e){t=t&&t.options.stacked;return t||void 0===t&&void 0!==e.stack}function ka(e,t,i,a){for(var s of t.getMatchingVisibleMetas(a).reverse()){let t=e[s.index];if(i&&0<t||!i&&t<0)return s.index}return null}function Sa(t,s){let{chart:e,_cachedMeta:r}=t,n=e._stacks||(e._stacks={}),{iScale:i,vScale:o,index:l}=r,h=i.axis,d=o.axis,c=`${i.id}.${o.id}.`+(r.stack||r.type),u=s.length;var g,f,p;for(let a=0;a<u;++a){let t=s[a],{[h]:e,[d]:i}=t;(f=(t._stacks||(t._stacks={}))[d]=(p=e,(g=(g=n)[f=c]||(g[f]={}))[p]||(g[p]={})))[l]=i,f._top=ka(f,o,!0,r.type),f._bottom=ka(f,o,!1,r.type),(f._visualValues||(f._visualValues={}))[l]=i}}function Pa(t,e){let i=t.scales;return Object.keys(i).filter(t=>i[t].axis===e).shift()}function Da(t,i){var a=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){i=i||t._parsed;for(let e of i){let t=e._stacks;if(!t||void 0===t[s]||void 0===t[s][a])return;delete t[s][a],void 0!==t[s]._visualValues&&void 0!==t[s]._visualValues[a]&&delete t[s]._visualValues[a]}}}let Ca=t=>"reset"===t||"none"===t,Oa=(t,e)=>e?t:Object.assign({},t);class Aa{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){var t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=wa(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Da(this._cachedMeta),this.index=t}linkScales(){var t=this.chart,e=this._cachedMeta,i=this.getDataset(),a=(t,e,i,a)=>"x"===t?e:"r"===t?a:i,s=e.xAxisID=T(i.xAxisID,Pa(t,"x")),r=e.yAxisID=T(i.yAxisID,Pa(t,"y")),i=e.rAxisID=T(i.rAxisID,Pa(t,"r")),t=e.indexAxis,n=e.iAxisID=a(t,s,r,i),a=e.vAxisID=a(t,r,s,i);e.xScale=this.getScaleForId(s),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(i),e.iScale=this.getScaleForId(n),e.vScale=this.getScaleForId(a)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){var e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){var t=this._cachedMeta;this._data&&Mt(this._data,this),t._stacked&&Da(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(A(e))this._data=function(t){var e=Object.keys(t),i=new Array(e.length);let a,s,r;for(a=0,s=e.length;a<s;++a)r=e[a],i[a]={x:r,y:t[r]};return i}(e);else if(i!==e){if(i){Mt(i,this);let t=this._cachedMeta;Da(t),t._parsed=[]}e&&Object.isExtensible(e)&&yt(e,this),this._syncList=[],this._data=e}}addElements(){var t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){var e=this._cachedMeta,i=this.getDataset();let a=!1;this._dataCheck();var s=e._stacked;e._stacked=wa(e.vScale,e),e.stack!==i.stack&&(a=!0,Da(e),e.stack=i.stack),this._resyncElements(t),!a&&s===e._stacked||Sa(this,e._parsed)}configure(){var t=this.chart.config,e=t.datasetScopeKeys(this._type),e=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(e,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,i){let{_cachedMeta:a,_data:s}=this,{iScale:t,_stacked:r}=a,n=t.axis,o,l,h,d=0===e&&i===s.length||a._sorted,c=0<e&&a._parsed[e-1];if(!1===this._parsing)a._parsed=s,a._sorted=!0,h=s;else{h=O(s[e])?this.parseArrayData(a,s,e,i):A(s[e])?this.parseObjectData(a,s,e,i):this.parsePrimitiveData(a,s,e,i);let t=()=>null===l[n]||c&&l[n]<c[n];for(o=0;o<i;++o)a._parsed[o+e]=l=h[o],d&&(t()&&(d=!1),c=l);a._sorted=d}r&&Sa(this,h)}parsePrimitiveData(t,e,i,a){var{iScale:s,vScale:r}=t,n=s.axis,o=r.axis,l=s.getLabels(),h=s===r,d=new Array(a);let c,u,g;for(c=0,u=a;c<u;++c)g=c+i,d[c]={[n]:h||s.parse(l[g],g),[o]:r.parse(e[g],g)};return d}parseArrayData(t,e,i,a){var{xScale:s,yScale:r}=t,n=new Array(a);let o,l,h,d;for(o=0,l=a;o<l;++o)d=e[h=o+i],n[o]={x:s.parse(d[0],h),y:r.parse(d[1],h)};return n}parseObjectData(t,e,i,a){var{xScale:s,yScale:r}=t,{xAxisKey:n="x",yAxisKey:o="y"}=this._parsing,l=new Array(a);let h,d,c,u;for(h=0,d=a;h<d;++h)u=e[c=h+i],l[h]={x:s.parse(f(u,n),c),y:r.parse(f(u,o),c)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){var a=this.chart,s=this._cachedMeta,r=e[t.axis];return Ma({keys:ya(a,!0),values:e._stacks[t.axis]._visualValues},r,s.index,{mode:i})}updateRangeFromParsed(t,e,i,a){var s=i[e.axis];let r=null===s?NaN:s;i=a&&i._stacks[e.axis];a&&i&&(a.values=i,r=Ma(a,s,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(e,t){let i=this._cachedMeta,a=i._parsed,s=i._sorted&&e===i.iScale,r=a.length,n=this._getOtherScale(e),o=(c=this.chart,t&&!i.hidden&&i._stacked&&{keys:ya(c,!0),values:null}),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=function(){var{min:t,max:e,minDefined:i,maxDefined:a}=n.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:a?e:Number.POSITIVE_INFINITY}}();var c;let u,g;function f(){var t=(g=a[u])[n.axis];return!p(g[e.axis])||h>t||d<t}for(u=0;u<r&&(f()||(this.updateRangeFromParsed(l,e,g,o),!s));++u);if(s)for(u=r-1;0<=u;--u)if(!f()){this.updateRangeFromParsed(l,e,g,o);break}return l}getAllParsedValues(t){var e=this._cachedMeta._parsed,i=[];let a,s,r;for(a=0,s=e.length;a<s;++a)p(r=e[a][t.axis])&&i.push(r);return i}getMaxOverflow(){return!1}getLabelAndValue(t){var e=this._cachedMeta,i=e.iScale,e=e.vScale,t=this.getParsed(t);return{label:i?""+i.getLabelForValue(t[i.axis]):"",value:e?""+e.getLabelForValue(t[e.axis]):""}}_update(t){var e,i=this._cachedMeta;this.update(t||"default"),i._clip=function(t){let e,i,a,s;return A(t)?(e=t.top,i=t.right,a=t.bottom,s=t.left):e=i=a=s=t,{top:e,right:i,bottom:a,left:s,disabled:!1===t}}(T(this.options.clip,(t=i.xScale,i=i.yScale,!1!==(e=this.getMaxOverflow())&&(t=_a(t,e),{top:(i=_a(i,e)).end,right:t.end,bottom:i.start,left:t.start}))))}update(t){}draw(){let e=this._ctx,t=this.chart,i=this._cachedMeta,a=i.data||[],s=t.chartArea,r=[],n=this._drawStart||0,o=this._drawCount||a.length-n,l=this.options.drawActiveElementsOnTop,h;for(i.dataset&&i.dataset.draw(e,s,n,o),h=n;h<n+o;++h){let t=a[h];t.hidden||(t.active&&l?r.push(t):t.draw(e,s))}for(h=0;h<r.length;++h)r[h].draw(e,s)}getStyle(t,e){e=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(e):this.resolveDataElementOptions(t||0,e)}getContext(e,t,i){var a,s=this.getDataset();let r;if(0<=e&&e<this._cachedMeta.data.length){let t=this._cachedMeta.data[e];(r=t.$context||(t.$context=Pi(this.getContext(),{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"}))).parsed=this.getParsed(e),r.raw=s.data[e],r.index=r.dataIndex=e}else(r=this.$context||(this.$context=(e=this.chart.getContext(),a=this.index,Pi(e,{active:!1,dataset:void 0,datasetIndex:a,index:a,mode:"default",type:"dataset"})))).dataset=s,r.index=r.datasetIndex=this.index;return r.active=!!t,r.mode=i,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){let a="active"===e,s=this._cachedDataOpts,r=t+"-"+e,n=s[r],o=this.enableOptionSharing&&G(i);var l,h,d;return n?Oa(n,o):(h=(d=this.chart.config).datasetElementScopeKeys(this._type,t),l=a?[t+"Hover","hover",t,""]:[t,""],h=d.getOptionScopes(this.getDataset(),h),t=Object.keys(R.elements[t]),(d=d.resolveNamedOptions(h,t,()=>this.getContext(i,a,e),l)).$shared&&(d.$shared=o,s[r]=Object.freeze(Oa(d,o))),d)}_resolveAnimations(a,s,r){let t=this.chart,e=this._cachedDataOpts,i="animation-"+s,n=e[i];if(n)return n;let o;if(!1!==t.options.animation){let t=this.chart.config,e=t.datasetAnimationScopeKeys(this._type,s),i=t.getOptionScopes(this.getDataset(),e);o=t.createResolver(i,this.getContext(a,r,s))}a=new va(t,o&&o.animations);return o&&o._cacheable&&(e[i]=Object.freeze(a)),a}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Ca(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){var t=this.resolveDataElementOptions(t,e),i=this._sharedOptions,a=this.getSharedOptions(t),i=this.includeOptions(e,a)||a!==i;return this.updateSharedOptions(a,e,t),{sharedOptions:a,includeOptions:i}}updateElement(t,e,i,a){Ca(a)?Object.assign(t,i):this._resolveAnimations(e,a).update(t,i)}updateSharedOptions(t,e,i){t&&!Ca(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,a){t.active=a;var s=this.getStyle(e,a);this._resolveAnimations(e,i,a).update(t,{options:!a&&this.getSharedOptions(s)||s})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,i=this._cachedMeta.data;for(let[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];var a=i.length,s=e.length,r=Math.min(s,a);r&&this.parse(0,r),a<s?this._insertElements(a,s-a,t):s<a&&this._removeElements(s,a-s)}_insertElements(t,e,i=!0){let a=this._cachedMeta,s=a.data,r=t+e,n;var o=t=>{for(t.length+=e,n=t.length-1;n>=r;n--)t[n]=t[n-e]};for(o(s),n=t;n<r;++n)s[n]=new this.dataElementType;this._parsing&&o(a._parsed),this.parse(t,e),i&&this.updateElements(s,t,e,"reset")}updateElements(t,e,i,a){}_removeElements(t,e){var i,a=this._cachedMeta;this._parsing&&(i=a._parsed.splice(t,e),a._stacked)&&Da(a,i),a.data.splice(t,e)}_sync(t){var e,i,a;this._parsing?this._syncList.push(t):([e,i,a]=t,this[e](i,a)),this.chart._dataChanges.push([this.index,...t])}_onDataPush(){var t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);e=arguments.length-2;e&&this._sync(["_insertElements",t,e])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}class e{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){var{x:t,y:e}=this.getProps(["x","y"],t);return{x:t,y:e}}hasValue(){return ot(this.x)&&ot(this.y)}getProps(t,e){let i=this.$animations;if(!e||!i)return this;let a={};return t.forEach(t=>{a[t]=i[t]&&i[t].active()?i[t]._to:this[t]}),a}}function Ta(t,e,i,a,s){var r=T(a,0),n=Math.min(T(s,t.length),t.length);let o,l,h,d=0;for(i=Math.ceil(i),s&&(i=(o=s-a)/Math.floor(o/i)),h=r;h<0;)d++,h=Math.round(r+d*i);for(l=Math.max(r,0);l<n;l++)l===h&&(e.push(t[l]),d++,h=Math.round(r+d*i))}let La=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,Ea=(t,e)=>Math.min(e||t,t);function Ra(t,e){var i=[],a=t.length/e,s=t.length;let r=0;for(;r<s;r+=a)i.push(t[Math.floor(r)]);return i}function Ia(t){return t.drawTicks?t.tickLength:0}function za(t,e){var i;return t.display?(e=z(t.font,e),i=I(t.padding),(O(t.text)?t.text.length:1)*e.lineHeight+i.height):0}class Fa extends e{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){var{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:a}=this,t=u(t,Number.POSITIVE_INFINITY),e=u(e,Number.NEGATIVE_INFINITY),i=u(i,Number.POSITIVE_INFINITY),a=u(a,Number.NEGATIVE_INFINITY);return{min:u(t,i),max:u(e,a),minDefined:p(t),maxDefined:p(e)}}getMinMax(i){let a,{min:s,max:r,minDefined:n,maxDefined:o}=this.getUserBounds();if(n&&o)return{min:s,max:r};var l=this.getMatchingVisibleMetas();for(let t=0,e=l.length;t<e;++t)a=l[t].controller.getMinMax(this,i),n||(s=Math.min(s,a.min)),o||(r=Math.max(r,a.max));return s=o&&s>r?r:s,r=n&&s>r?s:r,{min:u(s,u(r,s)),max:u(r,u(s,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){c(this.options.beforeUpdate,[this])}update(t,e,i){var{beginAtZero:a,grace:s,ticks:r}=this.options,n=r.sampleSize,t=(this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Si(this,s,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks(),n<this.ticks.length);this._convertTicksToLabels(t?Ra(this.ticks,n):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||"auto"===r.source)&&(this.ticks=function(t,a){let e=t.options.ticks,i=(d=(t=t).options.offset,c=t._tickSize(),d=t._length/c+(d?0:1),t=t._maxLength/c,Math.floor(Math.min(d,t))),s=Math.min(e.maxTicksLimit||i,i),r=e.major.enabled?function(t){var e=[];let i,a;for(i=0,a=t.length;i<a;i++)t[i].major&&e.push(i);return e}(a):[],n=r.length,o=r[0],l=r[n-1],h=[];var d,c;if(s<n){var u=a;var g=h;var f=r;var p=n/s;let t,e=0,i=f[0];for(p=Math.ceil(p),t=0;t<u.length;t++)t===i&&(g.push(u[t]),e++,i=f[e*p])}else{var m=function(t,e,i){var t=function(t){var e=t.length;let i,a;if(e<2)return!1;for(a=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==a)return!1;return a}(t),a=e.length/i;if(t){var s=nt(t);for(let e=0,t=s.length-1;e<t;e++){let t=s[e];if(t>a)return t}}return Math.max(a,1)}(r,a,s);if(0<n){let t,e,i=1<n?Math.round((l-o)/(n-1)):null;for(Ta(a,h,m,P(i)?0:o-i,o),t=0,e=n-1;t<e;t++)Ta(a,h,m,r[t],r[t+1]);Ta(a,h,m,l,P(i)?a.length:l+i)}else Ta(a,h,m)}return h}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),t&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){c(this.options.afterUpdate,[this])}beforeSetDimensions(){c(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){c(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),c(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){c(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){var e=this.options.ticks;let i,a,s;for(i=0,a=t.length;i<a;i++)(s=t[i]).label=c(e.callback,[s.value,i,t],this)}afterTickToLabelConversion(){c(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){c(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){var t,e,i,a,s=this.options,r=s.ticks,n=Ea(this.ticks.length,s.ticks.maxTicksLimit),o=r.minRotation||0,l=r.maxRotation;let h,d,c,u=o;!this._isVisible()||!r.display||l<=o||n<=1||!this.isHorizontal()?this.labelRotation=o:(e=(t=this._getLabelSizes()).widest.width,i=t.highest.height,a=C(this.chart.width-e,0,this.maxWidth),(s.offset?this.maxWidth/n:a/(n-1))<e+6&&(h=a/(n-(s.offset?.5:1)),d=this.maxHeight-Ia(s.grid)-r.padding-za(s.title,this.chart.options.font),c=Math.sqrt(e*e+i*i),u=dt(Math.min(Math.asin(C((t.highest.height+6)/h,-1,1)),Math.asin(C(d/c,-1,1))-Math.asin(C(i/c,-1,1)))),u=Math.max(o,Math.min(l,u))),this.labelRotation=u)}afterCalculateLabelRotation(){c(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){c(this.options.beforeFit,[this])}fit(){let l={width:0,height:0},{chart:e,options:{ticks:h,title:i,grid:a}}=this,t=this._isVisible(),d=this.isHorizontal();if(t){let t=za(i,e.options.font);if(d?(l.width=this.maxWidth,l.height=Ia(a)+t):(l.height=this.maxHeight,l.width=Ia(a)+t),h.display&&this.ticks.length){let{first:t,last:e,widest:i,highest:a}=this._getLabelSizes(),s=2*h.padding,r=L(this.labelRotation),n=Math.cos(r),o=Math.sin(r);if(d){let t=h.mirror?0:o*i.width+n*a.height;l.height=Math.min(this.maxHeight,l.height+t+s)}else{let t=h.mirror?0:n*i.width+o*a.height;l.width=Math.min(this.maxWidth,l.width+t+s)}this._calculatePadding(t,e,o,n)}}this._handleMargins(),d?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=l.height):(this.width=l.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(s,r,n,o){let{ticks:{align:l,padding:h},position:t}=this.options,d=0!==this.labelRotation,c="top"!==t&&"x"===this.axis;if(this.isHorizontal()){let t=this.getPixelForTick(0)-this.left,e=this.right-this.getPixelForTick(this.ticks.length-1),i=0,a=0;d?a=c?(i=o*s.width,n*r.height):(i=n*s.height,o*r.width):"start"===l?a=r.width:"end"===l?i=s.width:"inner"!==l&&(i=s.width/2,a=r.width/2),this.paddingLeft=Math.max((i-t+h)*this.width/(this.width-t),0),this.paddingRight=Math.max((a-e+h)*this.width/(this.width-e),0)}else{let t=r.height/2,e=s.height/2;"start"===l?(t=0,e=s.height):"end"===l&&(t=r.height,e=0),this.paddingTop=t+h,this.paddingBottom=e+h}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){c(this.options.afterFit,[this])}isHorizontal(){var{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)P(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){var i=this.options.ticks.sampleSize;let t=this.ticks;i<t.length&&(t=Ra(t,i)),this._labelSizes=e=this._computeLabelSizes(t,t.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(t,e,i){let{ctx:a,_longestTextCache:s}=this,r=[],n=[],o=Math.floor(e/Ea(e,i)),l,h,d,c,u,g,f,p,m,b,x,v=0,_=0;for(l=0;l<e;l+=o){if(c=t[l].label,u=this._resolveTickFontOptions(l),a.font=g=u.string,f=s[g]=s[g]||{data:{},gc:[]},p=u.lineHeight,m=b=0,P(c)||O(c)){if(O(c))for(h=0,d=c.length;h<d;++h)P(x=c[h])||O(x)||(m=Le(a,f.data,f.gc,m,x),b+=p)}else m=Le(a,f.data,f.gc,m,c),b=p;r.push(m),n.push(b),v=Math.max(m,v),_=Math.max(b,_)}y=e,k(s,t=>{var e=t.gc,i=e.length/2;let a;if(y<i){for(a=0;a<i;++a)delete t.data[e[a]];e.splice(0,i)}});var y,i=r.indexOf(v),M=n.indexOf(_),w=t=>({width:r[t]||0,height:n[t]||0});return{first:w(0),last:w(e-1),widest:w(i),highest:w(M),widths:r,heights:n}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);t=this._startPixel+t*this._length;return mt(this._alignToPixels?Re(this.chart,t,0):t)}getDecimalForPixel(t){t=(t-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){var{min:t,max:e}=this;return t<0&&e<0?e:0<t&&0<e?t:0}getContext(t){var e=this.ticks||[];return 0<=t&&t<e.length?(e=e[t]).$context||(e.$context=Pi(this.getContext(),{tick:e,index:t,type:"tick"})):this.$context||(this.$context=Pi(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){var t=this.options.ticks,e=L(this.labelRotation),i=Math.abs(Math.cos(e)),e=Math.abs(Math.sin(e)),a=this._getLabelSizes(),t=t.autoSkipPadding||0,s=a?a.widest.width+t:0,a=a?a.highest.height+t:0;return this.isHorizontal()?s*e<a*i?s/i:a/e:a*e<s*i?a/i:s/e}_isVisible(){var t=this.options.display;return"auto"!==t?!!t:0<this.getMatchingVisibleMetas().length}_computeGridLineItems(t){function i(t){return Re(c,t,l)}let e=this.axis,c=this.chart,a=this.options,{grid:u,position:s,border:g}=a,f=u.offset,p=this.isHorizontal(),r=this.ticks.length+(f?1:0),n=Ia(u),m=[],o=g.setContext(this.getContext()),l=o.display?o.width:0,h=l/2,d,b,x,v,_,y,M,w,k,S,P,D;if("top"===s)d=i(this.bottom),y=this.bottom-n,w=d-h,S=i(t.top)+h,D=t.bottom;else if("bottom"===s)d=i(this.top),S=t.top,D=i(t.bottom)-h,y=d+h,w=this.top+n;else if("left"===s)d=i(this.right),_=this.right-n,M=d-h,k=i(t.left)+h,P=t.right;else if("right"===s)d=i(this.left),k=t.left,P=i(t.right)-h,_=d+h,M=this.left+n;else if("x"===e){if("center"===s)d=i((t.top+t.bottom)/2+.5);else if(A(s)){let t=Object.keys(s)[0],e=s[t];d=i(this.chart.scales[t].getPixelForValue(e))}S=t.top,D=t.bottom,y=d+h,w=y+n}else if("y"===e){if("center"===s)d=i((t.left+t.right)/2);else if(A(s)){let t=Object.keys(s)[0],e=s[t];d=i(this.chart.scales[t].getPixelForValue(e))}_=d-h,M=_-n,k=t.left,P=t.right}var t=T(a.ticks.maxTicksLimit,r),C=Math.max(1,Math.ceil(r/t));for(b=0;b<r;b+=C){let t=this.getContext(b),e=u.setContext(t),i=g.setContext(t),a=e.lineWidth,s=e.color,r=i.dash||[],n=i.dashOffset,o=e.tickWidth,l=e.tickColor,h=e.tickBorderDash||[],d=e.tickBorderDashOffset;void 0!==(x=function(t,e,i){var a=t.ticks.length,s=Math.min(e,a-1),r=t._startPixel,n=t._endPixel;let o,l=t.getPixelForTick(s);if(!(i&&(o=1===a?Math.max(l-r,n-l):0===e?(t.getPixelForTick(1)-l)/2:(l-t.getPixelForTick(s-1))/2,(l+=s<e?o:-o)<r-1e-6||l>n+1e-6)))return l}(this,b,f))&&(v=Re(c,x,a),p?_=M=k=P=v:y=w=S=D=v,m.push({tx1:_,ty1:y,tx2:M,ty2:w,x1:k,y1:S,x2:P,y2:D,width:a,color:s,borderDash:r,borderDashOffset:n,tickWidth:o,tickColor:l,tickBorderDash:h,tickBorderDashOffset:d}))}return this._ticksLength=r,this._borderValue=d,m}_computeLabelItems(t){let e=this.axis,i=this.options,{position:o,ticks:l}=i,h=this.isHorizontal(),d=this.ticks,{align:a,crossAlign:c,padding:s,mirror:u}=l,r=Ia(i.grid),n=r+s,g=u?-s:n,f=-L(this.labelRotation),p=[],m,b,x,v,_,y,M,w,k,S,P,D="middle";if("top"===o)_=this.bottom-g,y=this._getXAxisLabelAlignment();else if("bottom"===o)_=this.top+g,y=this._getXAxisLabelAlignment();else if("left"===o){let t=this._getYAxisLabelAlignment(r);y=t.textAlign,v=t.x}else if("right"===o){let t=this._getYAxisLabelAlignment(r);y=t.textAlign,v=t.x}else if("x"===e){if("center"===o)_=(t.top+t.bottom)/2+n;else if(A(o)){let t=Object.keys(o)[0],e=o[t];_=this.chart.scales[t].getPixelForValue(e)+n}y=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===o)v=(t.left+t.right)/2-n;else if(A(o)){let t=Object.keys(o)[0],e=o[t];v=this.chart.scales[t].getPixelForValue(e)}y=this._getYAxisLabelAlignment(r).textAlign}"y"===e&&("start"===a?D="top":"end"===a&&(D="bottom"));var C=this._getLabelSizes();for(m=0,b=d.length;m<b;++m){x=d[m].label;let r=l.setContext(this.getContext(m)),t=(M=this.getPixelForTick(m)+l.labelOffset,k=(w=this._resolveTickFontOptions(m)).lineHeight,(S=O(x)?x.length:1)/2),e=r.color,i=r.textStrokeColor,a=r.textStrokeWidth,n,s=y;if(h?(v=M,"inner"===y&&(s=m===b-1?this.options.reverse?"left":"right":0===m?this.options.reverse?"right":"left":"center"),P="top"===o?"near"===c||0!=f?-S*k+k/2:"center"===c?-C.highest.height/2-t*k+k:-C.highest.height+k/2:"near"===c||0!=f?k/2:"center"===c?C.highest.height/2-t*k:C.highest.height-S*k,u&&(P*=-1),0==f||r.showLabelBackdrop||(v+=k/2*Math.sin(f))):(_=M,P=(1-S)*k/2),r.showLabelBackdrop){let t=I(r.backdropPadding),e=C.heights[m],i=C.widths[m],a=P-t.top,s=0-t.left;switch(D){case"middle":a-=e/2;break;case"bottom":a-=e}switch(y){case"center":s-=i/2;break;case"right":s-=i}n={left:s,top:a,width:i+t.width,height:e+t.height,color:r.backdropColor}}p.push({label:x,font:w,textOffset:P,options:{rotation:f,color:e,strokeColor:i,strokeWidth:a,textAlign:s,textBaseline:D,translation:[v,_],backdrop:n}})}return p}_getXAxisLabelAlignment(){var{position:t,ticks:e}=this.options;if(-L(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){var{position:e,ticks:{crossAlign:i,mirror:a,padding:s}}=this.options,t=t+s,r=this._getLabelSizes().widest.width;let n,o;return"left"===e?a?(o=this.right+s,"near"===i?n="left":"center"===i?(n="center",o+=r/2):(n="right",o+=r)):(o=this.right-t,"near"===i?n="right":"center"===i?(n="center",o-=r/2):(n="left",o=this.left)):"right"===e?a?(o=this.left+s,"near"===i?n="right":"center"===i?(n="center",o-=r/2):(n="left",o-=r)):(o=this.left+t,"near"===i?n="left":"center"===i?(n="center",o+=r/2):(n="right",o=this.right)):n="right",{textAlign:n,x:o}}_computeLabelArea(){var t,e;if(!this.options.ticks.mirror)return t=this.chart,"left"===(e=this.options.position)||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){var{ctx:t,options:{backgroundColor:e},left:i,top:a,width:s,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,a,s,r),t.restore())}getLineWidthForValue(e){var t,i=this.options.grid;return this._isVisible()&&i.display&&0<=(t=this.ticks.findIndex(t=>t.value===e))?i.setContext(this.getContext(t)).lineWidth:0}drawGrid(t){let e=this.options.grid,a=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),s,r;var n=(t,e,i)=>{i.width&&i.color&&(a.save(),a.lineWidth=i.width,a.strokeStyle=i.color,a.setLineDash(i.borderDash||[]),a.lineDashOffset=i.borderDashOffset,a.beginPath(),a.moveTo(t.x,t.y),a.lineTo(e.x,e.y),a.stroke(),a.restore())};if(e.display)for(s=0,r=i.length;s<r;++s){let t=i[s];e.drawOnChartArea&&n({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&n({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){var{chart:s,ctx:r,options:{border:n,grid:o}}=this,l=n.setContext(this.getContext()),n=n.display?l.width:0;if(n){var o=o.setContext(this.getContext(0)).lineWidth,h=this._borderValue;let t,e,i,a;this.isHorizontal()?(t=Re(s,this.left,n)-n/2,e=Re(s,this.right,o)+o/2,i=a=h):(i=Re(s,this.top,n)-n/2,a=Re(s,this.bottom,o)+o/2,t=e=h),r.save(),r.lineWidth=l.width,r.strokeStyle=l.color,r.beginPath(),r.moveTo(t,i),r.lineTo(e,a),r.stroke(),r.restore()}}drawLabels(i){if(this.options.ticks.display){let a=this.ctx,t=this._computeLabelArea(),e=(t&&Ve(a,t),this.getLabelItems(i));for(let i of e){let t=i.options,e=i.font;He(a,i.label,0,i.textOffset,e,t)}t&&Be(a)}}drawTitle(){var{ctx:e,options:{position:i,title:a,reverse:s}}=this;if(a.display){var r=z(a.font),n=I(a.padding),o=a.align;let t=r.lineHeight/2;"bottom"===i||"center"===i||A(i)?(t+=n.bottom,O(a.text)&&(t+=r.lineHeight*(a.text.length-1))):t+=n.top;var{titleX:n,titleY:l,maxWidth:h,rotation:d}=function(t,i,a,e){var{top:s,left:r,bottom:n,right:o,chart:l}=t,{chartArea:l,scales:h}=l;let d,c,u,g=0;var f=n-s,p=o-r;if(t.isHorizontal()){if(c=E(e,r,o),A(a)){let t=Object.keys(a)[0],e=a[t];u=h[t].getPixelForValue(e)+f-i}else u="center"===a?(l.bottom+l.top)/2+f-i:La(t,a,i);d=o-r}else{if(A(a)){let t=Object.keys(a)[0],e=a[t];c=h[t].getPixelForValue(e)-p+i}else c="center"===a?(l.left+l.right)/2-p+i:La(t,a,i);u=E(e,n,s),g="left"===a?-D:D}return{titleX:c,titleY:u,maxWidth:d,rotation:g}}(this,t,i,o);He(e,a.text,0,0,r,{color:a.color,maxWidth:h,rotation:d,textAlign:function(t,e,i){let a=Dt(t);return a=i&&"right"!==e||!i&&"right"===e?"left"===(t=a)?"right":"right"===t?"left":t:a}(o,i,s),textBaseline:"middle",translation:[n,l]})}}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){var t=this.options,e=t.ticks&&t.ticks.z||0,i=T(t.grid&&t.grid.z,-1),t=T(t.border&&t.border.z,0);return this._isVisible()&&this.draw===Fa.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:t,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(e){var i=this.chart.getSortedVisibleDatasetMetas(),a=this.axis+"AxisID",s=[];let r,t;for(r=0,t=i.length;r<t;++r){let t=i[r];t[a]!==this.id||e&&t.type!==e||s.push(t)}return s}_resolveTickFontOptions(t){return z(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){var t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Va{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){var e=Object.getPrototypeOf(t);let i;"id"in(n=e)&&"defaults"in n&&(i=this.register(e));var a,s,r,n=this.items,e=t.id,o=this.scope+"."+e;if(e)return e in n||(n[e]=t,n=t,e=o,a=i,a=Y(Object.create(null),[a?R.get(a):{},R.get(e),n.defaults]),R.set(e,a),n.defaultRoutes&&(s=e,r=n.defaultRoutes,Object.keys(r).forEach(t=>{var e=t.split("."),i=e.pop(),e=[s].concat(e).join("."),t=r[t].split("."),a=t.pop(),t=t.join(".");R.route(e,i,t,a)})),n.descriptors&&R.describe(e,n.descriptors),this.override&&R.override(t.id,t.overrides)),o;throw new Error("class does not have id: "+t)}get(t){return this.items[t]}unregister(t){var e=this.items,t=t.id,i=this.scope;t in e&&delete e[t],i&&t in R[i]&&(delete R[i][t],this.override)&&delete fe[t]}}var M=new class{constructor(){this.controllers=new Va(Aa,"datasets",!0),this.elements=new Va(e,"elements"),this.plugins=new Va(Object,"plugins"),this.scales=new Va(Fa,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(i,t,a){[...t].forEach(t=>{var e=a||this._getRegistryForType(t);a||e.isForType(t)||e===this.plugins&&t.id?this._exec(i,e,t):k(t,t=>{var e=a||this._getRegistryForType(t);this._exec(i,e,t)})})}_exec(t,e,i){var a=K(t);c(i["before"+a],[],i),e[t](i),c(i["after"+a],[],i)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){var i=this._typedRegistries[t];if(i.isForType(e))return i}return this.plugins}_get(t,e,i){e=e.get(t);if(void 0===e)throw new Error('"'+t+'" is not a registered '+i+".");return e}};class Ba{constructor(){this._init=[]}notify(t,e,i,a){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));a=a?this._descriptors(t).filter(a):this._descriptors(t),i=this._notify(a,t,e,i);return"afterDestroy"===e&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),i}_notify(t,e,i,a){a=a||{};for(var s of t){let t=s.plugin;if(!1===c(t[i],[e,a,s.options],t)&&a.cancelable)return!1}return!0}invalidate(){P(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){var e;return this._cache||(e=this._cache=this._createDescriptors(t),this._notifyStateChanges(t),e)}_createDescriptors(t,e){var i=t&&t.config,a=T(i.options&&i.options.plugins,{}),i=function(t){let i={},a=[],e=Object.keys(M.plugins.items);for(let t=0;t<e.length;t++)a.push(M.getPlugin(e[t]));var s=t.plugins||[];for(let e=0;e<s.length;e++){let t=s[e];-1===a.indexOf(t)&&(a.push(t),i[t.id]=!0)}return{plugins:a,localIds:i}}(i);if(!1!==a||e){var s,r,n,o,l,h,d,[c,{plugins:u,localIds:g},f,p]=[t,i,a,e],m=[],b=c.getContext();for(s of u){let t=s.id,e=(d=f[t],p||!1!==d?!0===d?{}:d:null);null!==e&&m.push({plugin:s,options:([d,{plugin:r,local:n},o,l]=[c.config,{plugin:s,local:g[t]},e,b],h=void 0,h=d.pluginScopeKeys(r),o=d.getOptionScopes(o,h),n&&r.defaults&&o.push(r.defaults),d.createResolver(o,l,[""],{scriptable:!1,indexable:!1,allKeys:!0}))})}return m}return[]}_notifyStateChanges(t){var e=this._oldCache||[],i=this._cache,a=(t,i)=>t.filter(e=>!i.some(t=>e.plugin.id===t.plugin.id));this._notify(a(e,i),t,"stop"),this._notify(a(i,e),t,"start")}}function Wa(t,e){var i=R.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Na(t){if("x"===t||"y"===t||"r"===t)return t}function Ha(e,...t){if(Na(e))return e;for(var i of t){let t=i.axis||("top"===(i=i.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||1<e.length&&Na(e[0].toLowerCase());if(t)return t}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function ja(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function Ya(t){var e=t.options||(t.options={});e.plugins=T(e.plugins,{}),e.scales=function(n,e){let r=fe[n.type]||{scales:{}},o=e.scales||{},l=Wa(n.type,e),h=Object.create(null);return Object.keys(o).forEach(t=>{var e=o[t];if(!A(e))return console.error("Invalid scale configuration for scale: "+t);if(e._proxy)return console.warn("Ignoring resolver passed as options for scale: "+t);let i=Ha(t,e,function(e,t){if(t.data&&t.data.datasets){t=t.data.datasets.filter(t=>t.xAxisID===e||t.yAxisID===e);if(t.length)return ja(e,"x",t[0])||ja(e,"y",t[0])}return{}}(t,n),R.scales[e.type]),a=i===l?"_index_":"_value_",s=r.scales||{};h[t]=$(Object.create(null),[{axis:i},e,s[i],s[a]])}),n.data.datasets.forEach(a=>{let t=a.type||n.type,s=a.indexAxis||Wa(t,e),r=(fe[t]||{}).scales||{};Object.keys(r).forEach(t=>{var e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,s),i=a[e+"AxisID"]||e;h[i]=h[i]||Object.create(null),$(h[i],[{axis:e},o[i],r[t]])})}),Object.keys(h).forEach(t=>{t=h[t];$(t,[R.scales[t.type],R.scale])}),h}(t,e)}function $a(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}let Ua=new Map,Xa=new Set;function qa(t,e){let i=Ua.get(t);return i||(i=e(),Ua.set(t,i),Xa.add(i)),i}let Ka=(t,e,i)=>{e=f(e,i);void 0!==e&&t.add(e)};class Ga{constructor(t){this._config=((t=(t=t)||{}).data=$a(t.data),Ya(t),t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=$a(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){var t=this._config;this.clearCache(),Ya(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return qa(t,()=>[["datasets."+t,""]])}datasetAnimationScopeKeys(t,e){return qa(t+".transition."+e,()=>[[`datasets.${t}.transitions.`+e,"transitions."+e],["datasets."+t,""]])}datasetElementScopeKeys(t,e){return qa(t+"-"+e,()=>[[`datasets.${t}.elements.`+e,"datasets."+t,"elements."+e,""]])}pluginScopeKeys(t){let e=t.id;return qa(this.type+"-plugin-"+e,()=>[["plugins."+e,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){var i=this._scopeCache;let a=i.get(t);return a&&!e||(a=new Map,i.set(t,a)),a}getOptionScopes(e,t,i){let{options:a,type:s}=this,r=this._cachedScopes(e,i),n=r.get(t);if(n)return n;let o=new Set;t.forEach(t=>{e&&(o.add(e),t.forEach(t=>Ka(o,e,t))),t.forEach(t=>Ka(o,a,t)),t.forEach(t=>Ka(o,fe[s]||{},t)),t.forEach(t=>Ka(o,R,t)),t.forEach(t=>Ka(o,pe,t))});i=Array.from(o);return 0===i.length&&i.push(Object.create(null)),Xa.has(t)&&r.set(t,i),i}chartOptionScopes(){var{options:t,type:e}=this;return[t,fe[e]||{},R.datasets[e]||{},{type:e},R,pe]}resolveNamedOptions(t,e,i,a=[""]){var s={$shared:!0},{resolver:a,subPrefixes:r}=Za(this._resolverCache,t,a);let n=a;!function(a,t){var s,{isScriptable:r,isIndexable:n}=Ue(a);for(s of t){let t=r(s),e=n(s),i=(e||t)&&a[s];if(t&&(g(i)||Ja(i))||e&&O(i))return 1}}(a,e)||(s.$shared=!1,n=$e(a,i=g(i)?i():i,this.createResolver(t,i,r)));for(let t of e)s[t]=n[t];return s}createResolver(t,e,i=[""],a){t=Za(this._resolverCache,t,i).resolver;return A(e)?$e(t,e,void 0,a):t}}function Za(t,e,i){let a=t.get(e);a||(a=new Map,t.set(e,a));t=i.join();let s=a.get(t);return s||(s={resolver:Ye(e,i),subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},a.set(t,s)),s}let Ja=i=>A(i)&&Object.getOwnPropertyNames(i).reduce((t,e)=>t||g(i[e]),!1),Qa=["top","bottom","left","right","chartArea"];function ts(t,e){return"top"===t||"bottom"===t||-1===Qa.indexOf(t)&&"x"===e}function es(i,a){return function(t,e){return t[i]===e[i]?t[a]-e[a]:t[i]-e[i]}}function is(t){var e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),c(i&&i.onComplete,[t],e)}function as(t){var e=t.chart,i=e.options.animation;c(i&&i.onProgress,[t],e)}function ss(t){return xe()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t=t&&t.canvas?t.canvas:t}let rs={},ns=t=>{let e=ss(t);return Object.values(rs).filter(t=>t.canvas===e).pop()};class i{static defaults=R;static instances=rs;static overrides=fe;static registry=M;static version="4.3.3";static getChart=ns;static register(...t){M.add(...t),os()}static unregister(...t){M.remove(...t),os()}constructor(t,e){var e=this.config=new Ga(e),t=ss(t),i=ns(t);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");var i=e.createResolver(e.chartOptionScopes(),this.getContext()),e=(this.platform=new(e.platform||fa(t)),this.platform.updateConfig(e),this.platform.acquireContext(t,i.aspectRatio)),t=e&&e.canvas,a=t&&t.height,s=t&&t.width;this.id=F(),this.ctx=e,this.canvas=t,this.width=s,this.height=a,this._options=i,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Ba,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Pt(t=>this.update(t),i.resizeDelay||0),this._dataChanges=[],rs[this.id]=this,e&&t?(r.listen(this,"complete",is),r.listen(this,"progress",as),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){var{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:a,_aspectRatio:s}=this;return P(t)?e&&s?s:a?i/a:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return M}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ce(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ie(this.canvas,this.ctx),this}stop(){return r.stop(this),this}resize(t,e){r.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){var i=this.options,a=this.canvas,s=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(a,t,e,s),t=i.devicePixelRatio||this.platform.getDevicePixelRatio(),e=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Ce(this,t,!0)&&(this.notifyPlugins("resize",{size:a}),c(i.onResize,[this,a],this),this.attached)&&this._doResize(e)&&this.render()}ensureScalesHaveIDs(){k(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){let n=this.options,a=n.scales,o=this.scales,l=Object.keys(o).reduce((t,e)=>(t[e]=!1,t),{}),t=[];k(t=a?t.concat(Object.keys(a).map(t=>{var e=a[t],t=Ha(t,e),i="r"===t,t="x"===t;return{options:e,dposition:i?"chartArea":t?"bottom":"left",dtype:i?"radialLinear":t?"category":"linear"}})):t,t=>{var e=t.options,i=e.id,a=Ha(i,e),s=T(e.type,t.dtype);void 0!==e.position&&ts(e.position,a)===ts(t.dposition)||(e.position=t.dposition),l[i]=!0;let r=null;i in o&&o[i].type===s?r=o[i]:(r=new(M.getScale(s))({id:i,type:s,ctx:this.ctx,chart:this}),o[r.id]=r),r.init(e,n)}),k(l,(t,e)=>{t||delete o[e]}),k(o,t=>{s.configure(this,t,t.options),s.addBox(this,t)})}_updateMetasets(){var t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),e<i){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(es("order","index"))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:i}}=this;t.length>i.length&&delete this._stacks,t.forEach((e,t)=>{0===i.filter(t=>t===e._dataset).length&&this._destroyDatasetMeta(t)})}buildOrUpdateControllers(){let s=[],e=this.data.datasets,r,t;for(this._removeUnreferencedMetasets(),r=0,t=e.length;r<t;r++){let t=e[r],a=this.getDatasetMeta(r);var n=t.type||this.config.type;if(a.type&&a.type!==n&&(this._destroyDatasetMeta(r),a=this.getDatasetMeta(r)),a.type=n,a.indexAxis=t.indexAxis||Wa(n,this.options),a.order=t.order||0,a.index=r,a.label=""+t.label,a.visible=this.isDatasetVisible(r),a.controller)a.controller.updateIndex(r),a.controller.linkScales();else{let t=M.getController(n),{datasetElementType:e,dataElementType:i}=R.datasets[n];Object.assign(t,{dataElementType:M.getElement(i),datasetElementType:e&&M.getElement(e)}),a.controller=new t(this,r),s.push(a.controller)}}return this._updateMetasets(),s}_resetElements(){k(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config,i=(e.update(),this._options=e.createResolver(e.chartOptionScopes(),this.getContext())),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1!==this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})){var r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let i=0,t=this.data.datasets.length;i<t;i++){let t=this.getDatasetMeta(i)["controller"],e=!s&&-1===r.indexOf(t);t.buildOrUpdateElements(e),a=Math.max(+t.getMaxOverflow(),a)}a=this._minPadding=i.layout.autoPadding?a:0,this._updateLayout(a),s||k(r,t=>{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(es("z","_idx"));var{_active:t,_lastEvent:n}=this;n?this._eventHandler(n,!0):t.length&&this._updateHoverStyles(t,t,!0),this.render()}}_updateScales(){k(this.scales,t=>{s.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){var t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);Z(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){var e,i,a,s,r=this["_hiddenIndices"];for({method:e,start:i,count:a}of this._getUniformDataChanges()||[]){n=void 0;o=void 0;l=void 0;s=void 0;h=void 0;var n=r;var o=i;var l="_removeElements"===e?-a:a;let t=Object.keys(n);for(var h of t){let t=+h;t>=o&&(s=n[h],delete n[h],0<l||t>o)&&(n[t+l]=s)}}}_getUniformDataChanges(){let t=this._dataChanges;if(t&&t.length){this._dataChanges=[];var e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),a=i(0);for(let t=1;t<e;t++)if(!Z(a,i(t)))return;return Array.from(a).map(t=>t.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}}_updateLayout(i){if(!1!==this.notifyPlugins("beforeLayout",{cancelable:!0})){s.update(this,this.width,this.height,i);let t=this.chartArea,e=t.width<=0||t.height<=0;this._layers=[],k(this.boxes,t=>{e&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}}_updateDatasets(i){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:i,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let t=0,e=this.data.datasets.length;t<e;++t)this._updateDataset(t,g(i)?i({datasetIndex:t}):i);this.notifyPlugins("afterDatasetsUpdate",{mode:i})}}_updateDataset(t,e){var i=this.getDatasetMeta(t),t={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",t)&&(i.controller._update(e),t.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",t))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(r.has(this)?this.attached&&!r.running(this)&&r.start(this):(this.draw(),is({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){let{width:t,height:e}=this._resizeBeforeDraw;this._resize(t,e),this._resizeBeforeDraw=null}if(this.clear(),!(this.width<=0||this.height<=0)&&!1!==this.notifyPlugins("beforeDraw",{cancelable:!0})){let t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}}_getSortedDatasetMetas(e){var i=this._sortedMetasets,a=[];let s,t;for(s=0,t=i.length;s<t;++s){let t=i[s];e&&!t.visible||a.push(t)}return a}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1!==this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})){var e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;0<=t;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}}_drawDataset(i){var t=this.ctx,e=i._clip,a=!e.disabled,s=function(){var{xScale:t,yScale:e}=i;if(t&&e)return{left:t.left,right:t.right,top:e.top,bottom:e.bottom}}()||this.chartArea,r={meta:i,index:i.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",r)&&(a&&Ve(t,{left:!1===e.left?0:s.left-e.left,right:!1===e.right?this.width:s.right+e.right,top:!1===e.top?0:s.top-e.top,bottom:!1===e.bottom?this.height:s.bottom+e.bottom}),i.controller.draw(),a&&Be(t),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return y(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,a){e=Hi.modes[e];return"function"==typeof e?e(this,t,i,a):[]}getDatasetMeta(t){let e=this.data.datasets[t],i=this._metasets,a=i.filter(t=>t&&t._dataset===e).pop();return a||(a={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(a)),a}getContext(){return this.$context||(this.$context=Pi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){var e=this.data.datasets[t];return!!e&&("boolean"==typeof(t=this.getDatasetMeta(t)).hidden?!t.hidden:!e.hidden)}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(e,t,i){let a=i?"show":"hide",s=this.getDatasetMeta(e),r=s.controller._resolveAnimations(void 0,a);G(t)?(s.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),r.update(s,{visible:i}),this.update(t=>t.datasetIndex===e?a:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){var e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),r.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");var{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Ie(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete rs[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let i=this._listeners,a=this.platform,e=(t,e)=>{a.addEventListener(this,t,e),i[t]=e},s=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};k(this.options.events,t=>e(t,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let i=this._responsiveListeners,a=this.platform,t=(t,e)=>{a.addEventListener(this,t,e),i[t]=e},e=(t,e)=>{i[t]&&(a.removeEventListener(this,t,e),delete i[t])},s=(t,e)=>{this.canvas&&this.resize(t,e)},r,n=()=>{e("attach",n),this.attached=!0,this.resize(),t("resize",s),t("detach",r)};r=()=>{this.attached=!1,e("resize",s),this._stop(),this._resize(0,0),t("attach",n)},(a.isAttached(this.canvas)?n:r)()}unbindEvents(){k(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},k(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,i){var a=i?"set":"remove";let s,r,n;for("dataset"===t&&this.getDatasetMeta(e[0].datasetIndex).controller["_"+a+"DatasetHoverStyle"](),r=0,n=e.length;r<n;++r){let t=(s=e[r])&&this.getDatasetMeta(s.datasetIndex).controller;t&&t[a+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){var e=this._active||[],t=t.map(({datasetIndex:t,index:e})=>{var i=this.getDatasetMeta(t);if(i)return{datasetIndex:t,element:i.data[e],index:e};throw new Error("No dataset found at index "+t)});W(t,e)||(this._active=t,this._lastEvent=null,this._updateHoverStyles(t,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(e){return 1===this._plugins._cache.filter(t=>t.plugin.id===e).length}_updateHoverStyles(t,e,i){var a=this.options.hover,s=(t,i)=>t.filter(e=>!i.some(t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)),r=s(e,t),i=i?t:s(t,e);r.length&&this.updateHoverStyle(r,a.mode,!1),i.length&&a.mode&&this.updateHoverStyle(i,a.mode,!0)}_eventHandler(e,t){var i={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},a=t=>(t.options.events||this.options.events).includes(e.native.type);if(!1!==this.notifyPlugins("beforeEvent",i,a))return t=this._handleEvent(e,t,i.inChartArea),i.cancelable=!1,this.notifyPlugins("afterEvent",i,a),(t||i.changed)&&this.render(),this}_handleEvent(t,e,i){let{_active:a=[],options:s}=this,r=e,n=this._getActiveElements(t,a,i,r),o=J(t),l=(h=t,d=this._lastEvent,i&&"mouseout"!==h.type?o?d:h:null);i&&(this._lastEvent=null,c(s.onHover,[t,n,this],this),o)&&c(s.onClick,[t,n,this],this);var h,d=!W(n,a);return(d||e)&&(this._active=n,this._updateHoverStyles(n,a,e)),this._lastEvent=l,d}_getActiveElements(t,e,i,a){return"mouseout"===t.type?[]:i?(i=this.options.hover,this.getElementsAtEventForMode(t,i.mode,i,a)):e}}function os(){k(i.instances,t=>t._plugins.invalidate())}function ls(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var hs={_date:class $r{static override(t){Object.assign($r.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return ls()}parse(){return ls()}format(){return ls()}add(){return ls()}diff(){return ls()}startOf(){return ls()}endOf(){return ls()}}};function ds(i,a,s,r){if(O(i)){var n=i,o=a,l=s,h=r,d=l.parse(n[0],h),n=l.parse(n[1],h),h=Math.min(d,n),c=Math.max(d,n);let t=h,e=c;Math.abs(h)>Math.abs(c)&&(t=c,e=h),o[l.axis]=e,o._custom={barStart:t,barEnd:e,start:d,end:n,min:h,max:c}}else a[s.axis]=s.parse(i,r);return a}function cs(t,e,i,a){var s=t.iScale,r=t.vScale,n=s.getLabels(),o=s===r,l=[];let h,d,c,u;for(d=(h=i)+a;h<d;++h)u=e[h],(c={})[s.axis]=o||s.parse(n[h],h),l.push(ds(u,c,r,h));return l}function us(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function gs(t,e,i,a){return t=a?fs(t=t===e?i:t===i?e:t,i,e):fs(t,e,i)}function fs(t,e,i){return"start"===t?e:"end"===t?i:t}class ps extends Aa{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(r){var t=r.data;if(t.labels.length&&t.datasets.length){let{pointStyle:a,color:s}=r.legend.options["labels"];return t.labels.map((t,e)=>{var i=r.getDatasetMeta(0).controller.getStyle(e);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,fontColor:s,lineWidth:i.borderWidth,pointStyle:a,hidden:!r.getDataVisibility(e),index:e}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(a,s){let r=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=r;else{let t,e,i=t=>+r[t];if(A(r[a])){let{key:e="value"}=this._parsing;i=t=>+f(r[t],e)}for(e=(t=a)+s;t<e;++t)n._parsed[t]=i(t)}}_getRotation(){return L(this.options.rotation-90)}_getCircumference(){return L(this.options.circumference)}_getRotationExtents(){let e=v,i=-v;for(let t=0;t<this.chart.data.datasets.length;++t){var a,s;this.chart.isDatasetVisible(t)&&this.chart.getDatasetMeta(t).type===this._type&&(a=(s=this.chart.getDatasetMeta(t).controller)._getRotation(),s=s._getCircumference(),e=Math.min(e,a),i=Math.max(i,a+s))}return{rotation:e,circumference:i-e}}update(t){var e=this.chart["chartArea"],i=this._cachedMeta,a=i.data,s=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,r=Math.max((Math.min(e.width,e.height)-s)/2,0),r=Math.min(V(this.options.cutout,r),1),n=this._getRingWeight(this.index),{circumference:o,rotation:l}=this._getRotationExtents(),{ratioX:l,ratioY:o,offsetX:h,offsetY:d}=function(u,g,f){let p=1,m=1,b=0,x=0;if(g<v){let a=u,s=a+g,t=Math.cos(a),e=Math.sin(a),i=Math.cos(s),r=Math.sin(s),n=(t,e,i)=>pt(t,a,s,!0)?1:Math.max(e,e*f,i,i*f),o=(t,e,i)=>pt(t,a,s,!0)?-1:Math.min(e,e*f,i,i*f),l=n(0,t,i),h=n(D,e,r),d=o(S,t,i),c=o(S+D,e,r);p=(l-d)/2,m=(h-c)/2,b=-(l+d)/2,x=-(h+c)/2}return{ratioX:p,ratioY:m,offsetX:b,offsetY:x}}(l,o,r),l=(e.width-s)/l,e=(e.height-s)/o,s=Math.max(Math.min(l,e)/2,0),o=B(this.options.radius,s),l=(o-Math.max(o*r,0))/this._getVisibleDatasetWeightTotal();this.offsetX=h*o,this.offsetY=d*o,i.total=this.calculateTotal(),this.outerRadius=o-l*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-l*n,0),this.updateElements(a,0,a.length,t)}_circumference(t,e){var i=this.options,a=this._cachedMeta,s=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===a._parsed[t]||a.data[t].hidden?0:this.calculateCircumference(a._parsed[t]*s/v)}updateElements(a,t,e,s){let r="reset"===s,i=this.chart,n=i.chartArea,o=i.options.animation,l=(n.left+n.right)/2,h=(n.top+n.bottom)/2,d=r&&o.animateScale,c=d?0:this.innerRadius,u=d?0:this.outerRadius,{sharedOptions:g,includeOptions:f}=this._getSharedOptions(t,s),p,m=this._getRotation();for(p=0;p<t;++p)m+=this._circumference(p,r);for(p=t;p<t+e;++p){let t=this._circumference(p,r),e=a[p],i={x:l+this.offsetX,y:h+this.offsetY,startAngle:m,endAngle:m+t,circumference:t,outerRadius:u,innerRadius:c};f&&(i.options=g||this.resolveDataElementOptions(p,e.active?"active":s)),m+=t,this.updateElement(e,p,i,s)}}calculateTotal(){var t=this._cachedMeta,e=t.data;let i,a=0;for(i=0;i<e.length;i++){var s=t._parsed[i];null===s||isNaN(s)||!this.chart.getDataVisibility(i)||e[i].hidden||(a+=Math.abs(s))}return a}calculateCircumference(t){var e=this._cachedMeta.total;return 0<e&&!isNaN(t)?v*(Math.abs(t)/e):0}getLabelAndValue(t){var e=this._cachedMeta,i=this.chart,a=i.data.labels||[],e=ce(e._parsed[t],i.options.locale);return{label:a[t]||"",value:e}}getMaxBorderWidth(t){let e=0;var i=this.chart;let a,s,r,n,o;if(!t)for(a=0,s=i.data.datasets.length;a<s;++a)if(i.isDatasetVisible(a)){t=(r=i.getDatasetMeta(a)).data,n=r.controller;break}if(!t)return 0;for(a=0,s=t.length;a<s;++a)"inner"!==(o=n.resolveDataElementOptions(a)).borderAlign&&(e=Math.max(e,o.borderWidth||0,o.hoverBorderWidth||0));return e}getMaxOffset(i){let a=0;for(let e=0,t=i.length;e<t;++e){let t=this.resolveDataElementOptions(e);a=Math.max(a,t.offset||0,t.hoverOffset||0)}return a}_getRingWeightOffset(e){let i=0;for(let t=0;t<e;++t)this.chart.isDatasetVisible(t)&&(i+=this._getRingWeight(t));return i}_getRingWeight(t){return Math.max(T(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class ms extends Aa{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(r){var t=r.data;if(t.labels.length&&t.datasets.length){let{pointStyle:a,color:s}=r.legend.options["labels"];return t.labels.map((t,e)=>{var i=r.getDatasetMeta(0).controller.getStyle(e);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,fontColor:s,lineWidth:i.borderWidth,pointStyle:a,hidden:!r.getDataVisibility(e),index:e}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){var e=this._cachedMeta,i=this.chart,a=i.data.labels||[],e=ce(e._parsed[t].r,i.options.locale);return{label:a[t]||"",value:e}}parseObjectData(t,e,i,a){return ii.bind(this)(t,e,i,a)}update(t){var e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,a={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((t,e)=>{var i=this.getParsed(e).r;!isNaN(i)&&this.chart.getDataVisibility(e)&&(i<a.min&&(a.min=i),i>a.max)&&(a.max=i)}),a}_updateRadius(){var t=this.chart,e=t.chartArea,i=t.options,e=Math.min(e.right-e.left,e.bottom-e.top),e=Math.max(e/2,0),i=(e-Math.max(i.cutoutPercentage?e/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=e-i*this.index,this.innerRadius=this.outerRadius-i}updateElements(s,t,e,r){var n="reset"===r,o=this.chart,l=o.options.animation,h=this._cachedMeta.rScale,d=h.xCenter,c=h.yCenter,u=h.getIndexAngle(0)-.5*S;let g,f=u;var p=360/this.countVisibleElements();for(g=0;g<t;++g)f+=this._computeAngle(g,r,p);for(g=t;g<t+e;g++){let t=s[g],e=f,i=f+this._computeAngle(g,r,p),a=o.getDataVisibility(g)?h.getDistanceFromCenterForValue(this.getParsed(g).r):0;f=i,n&&(l.animateScale&&(a=0),l.animateRotate)&&(e=i=u);var m={x:d,y:c,innerRadius:0,outerRadius:a,startAngle:e,endAngle:i,options:this.resolveDataElementOptions(g,t.active?"active":r)};this.updateElement(t,g,m,r)}}countVisibleElements(){var t=this._cachedMeta;let i=0;return t.data.forEach((t,e)=>{!isNaN(this.getParsed(e).r)&&this.chart.getDataVisibility(e)&&i++}),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?L(this.resolveDataElementOptions(t,e).angle||i):0}}Oe=Object.freeze({__proto__:null,BarController:class extends Aa{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,i,a){return cs(t,e,i,a)}parseArrayData(t,e,i,a){return cs(t,e,i,a)}parseObjectData(t,e,i,a){var{iScale:s,vScale:r}=t,{xAxisKey:t="x",yAxisKey:n="y"}=this._parsing,o="x"===s.axis?t:n,l="x"===r.axis?t:n,h=[];let d,c,u,g;for(c=(d=i)+a;d<c;++d)g=e[d],(u={})[s.axis]=s.parse(f(g,o),d),h.push(ds(f(g,l),u,r,d));return h}updateRangeFromParsed(t,e,i,a){super.updateRangeFromParsed(t,e,i,a);a=i._custom;a&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){var{iScale:e,vScale:i}=this._cachedMeta,t=this.getParsed(t),a=t._custom,a=us(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(t[i.axis]);return{label:""+e.getLabelForValue(t[e.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){var e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(n,t,e,o){var l="reset"===o,{index:h,_cachedMeta:{vScale:d}}=this,c=d.getBasePixel(),u=d.isHorizontal(),g=this._getRuler(),{sharedOptions:f,includeOptions:p}=this._getSharedOptions(t,o);for(let r=t;r<t+e;r++){let t=this.getParsed(r),e=l||P(t[d.axis])?{base:c,head:c}:this._calculateBarValuePixels(r),i=this._calculateBarIndexPixels(r,g),a=(t._stacks||{})[d.axis],s={horizontal:u,base:e.base,enableBorderRadius:!a||us(t._custom)||h===a._top||h===a._bottom,x:u?e.head:i.center,y:u?i.center:e.head,height:u?i.size:Math.abs(e.size),width:u?Math.abs(e.size):i.size};p&&(s.options=f||this.resolveDataElementOptions(r,n[r].active?"active":o));var m=s.options||n[r].options;{b=void 0;x=void 0;v=void 0;_=void 0;y=void 0;M=void 0;w=void 0;k=void 0;S=void 0;var b=s;var x=m;var v=a;var _=h;let t=x.borderSkipped;var y,M,w,k,S,x={};t?!0===t?b.borderSkipped={top:!0,right:!0,bottom:!0,left:!0}:({start:y,end:M,reverse:w,top:k,bottom:S}=function(){let t,e,i,a,s;return i=b.horizontal?(t=b.base>b.x,e="left","right"):(t=b.base<b.y,e="bottom","top"),s=t?(a="end","start"):(a="start","end"),{start:e,end:i,reverse:t,top:a,bottom:s}}(),"middle"===t&&v&&(b.enableBorderRadius=!0,t=(v._top||0)===_?k:(v._bottom||0)===_?S:(x[gs(S,y,M,w)]=!0,k)),x[gs(t,y,M,w)]=!0,b.borderSkipped=x):b.borderSkipped=x}[v,_,S]=[s,m["inflateAmount"],g.ratio],v.inflateAmount="auto"===_?1===S?.33:0:_,this.updateElement(n[r],r,s,o)}}_getStacks(e,i){let t=this._cachedMeta["iScale"],a=t.getMatchingVisibleMetas(this._type).filter(t=>t.controller.options.grouped),s=t.options.stacked,r=[];for(let t of a)if((void 0===i||!(t=>{var e=t.controller.getParsed(i),e=e&&e[t.vScale.axis];if(P(e)||isNaN(e))return!0})(t))&&((!1===s||-1===r.indexOf(t.stack)||void 0===s&&void 0===t.stack)&&r.push(t.stack),t.index===e))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){t=this._getStacks(t,i),i=void 0!==e?t.indexOf(e):-1;return-1===i?t.length-1:i}_getRuler(){var t=this.options,e=this._cachedMeta,i=e.iScale,a=[];let s,r;for(s=0,r=e.data.length;s<r;++s)a.push(i.getPixelForValue(this.getParsed(s)[i.axis],s));var n=t.barThickness;return{min:n||function(t){var e=t.iScale,i=function(a,t){if(!a._cache.$bar){var s=a.getMatchingVisibleMetas(t);let i=[];for(let t=0,e=s.length;t<e;t++)i=i.concat(s[t].controller.getAllParsedValues(a));a._cache.$bar=wt(i.sort((t,e)=>t-e))}return a._cache.$bar}(e,t.type);let a,s,r,n,o=e._length;var l=()=>{32767!==r&&-32768!==r&&(G(n)&&(o=Math.min(o,Math.abs(r-n)||o)),n=r)};for(a=0,s=i.length;a<s;++a)r=e.getPixelForValue(i[a]),l();for(n=void 0,a=0,s=e.ticks.length;a<s;++a)r=e.getPixelForTick(a),l();return o}(e),pixels:a,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:n?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){let{_cachedMeta:{vScale:s,_stacked:r,index:n},options:{base:e,minBarLength:o}}=this,l=e||0,h=this.getParsed(t),i=h._custom,d=us(i),c,u,g=h[s.axis],a=0,f=r?this.applyStack(s,h,r):g;f!==g&&(a=f-g,f=g),d&&(g=i.barStart,f=i.barEnd-i.barStart,0!==g&&_(g)!==_(i.barEnd)&&(a=0),a+=g);var p,m,b=P(e)||d?a:e;let x=s.getPixelForValue(b);if(c=this.chart.getDataVisibility(t)?s.getPixelForValue(a+f):x,u=c-x,Math.abs(u)<o){u=(b=u,p=s,m=l,(0!==b?_(b):(p.isHorizontal()?1:-1)*(p.min>=m?1:-1))*o),g===l&&(x-=u/2);let t=s.getPixelForDecimal(0),e=s.getPixelForDecimal(1),i=Math.min(t,e),a=Math.max(t,e);x=Math.max(Math.min(x,a),i),c=x+u,r&&!d&&(h._stacks[s.axis]._visualValues[n]=s.getValueForPixel(c)-s.getValueForPixel(x))}if(x===s.getPixelForValue(l)){let t=_(u)*s.getLineWidthForValue(l)/2;x+=t,u-=t}return{size:u,base:x,head:c,center:c+u/2}}_calculateBarIndexPixels(a,s){let t=s.scale,r=this.options,n=r.skipNull,o=T(r.maxBarThickness,1/0),l,h;if(s.grouped){let t=n?this._getStackCount(a):s.stackCount,e=("flex"===r.barThickness?function(t,e,i,a){var s=e.pixels,r=s[t];let n=0<t?s[t-1]:null,o=t<s.length-1?s[t+1]:null;s=i.categoryPercentage,null===n&&(n=r-(null===o?e.end-e.start:o-r)),null===o&&(o=r+r-n),t=r-(r-Math.min(n,o))/2*s;return{chunk:Math.abs(o-n)/2*s/a,ratio:i.barPercentage,start:t}}:function(t,e,i,a){var s=i.barThickness;let r,n;return n=P(s)?(r=e.min*i.categoryPercentage,i.barPercentage):(r=s*a,1),{chunk:r/a,ratio:n,start:e.pixels[t]-r/2}})(a,s,r,t),i=this._getStackIndex(this.index,this._cachedMeta.stack,n?a:void 0);l=e.start+e.chunk*i+e.chunk/2,h=Math.min(o,e.chunk*e.ratio)}else l=t.getPixelForValue(this.getParsed(a)[t.axis],a),h=Math.min(o,s.min*s.ratio);return{base:l-h/2,head:l+h/2,center:l,size:h}}draw(){var t=this._cachedMeta,e=t.vScale,i=t.data,a=i.length;let s=0;for(;s<a;++s)null!==this.getParsed(s)[e.axis]&&i[s].draw(this._ctx)}},BubbleController:class extends Aa{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,a){var s=super.parsePrimitiveData(t,e,i,a);for(let t=0;t<s.length;t++)s[t]._custom=this.resolveDataElementOptions(t+i).radius;return s}parseArrayData(t,i,a,e){var s=super.parseArrayData(t,i,a,e);for(let e=0;e<s.length;e++){let t=i[a+e];s[e]._custom=T(t[2],this.resolveDataElementOptions(e+a).radius)}return s}parseObjectData(t,i,a,e){var s=super.parseObjectData(t,i,a,e);for(let e=0;e<s.length;e++){let t=i[a+e];s[e]._custom=T(t&&t.r&&+t.r,this.resolveDataElementOptions(e+a).radius)}return s}getMaxOverflow(){var e=this._cachedMeta.data;let i=0;for(let t=e.length-1;0<=t;--t)i=Math.max(i,e[t].size(this.resolveDataElementOptions(t))/2);return 0<i&&i}getLabelAndValue(t){var e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:e,yScale:a}=e,s=this.getParsed(t),e=e.getLabelForValue(s.x),a=a.getLabelForValue(s.y),s=s._custom;return{label:i[t]||"",value:"("+e+", "+a+(s?", "+s:"")+")"}}update(t){var e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(n,t,e,o){var l="reset"===o,{iScale:h,vScale:d}=this._cachedMeta,{sharedOptions:c,includeOptions:u}=this._getSharedOptions(t,o),g=h.axis,f=d.axis;for(let r=t;r<t+e;r++){let t=n[r],e=!l&&this.getParsed(r),i={},a=i[g]=l?h.getPixelForDecimal(.5):h.getPixelForValue(e[g]),s=i[f]=l?d.getBasePixel():d.getPixelForValue(e[f]);i.skip=isNaN(a)||isNaN(s),u&&(i.options=c||this.resolveDataElementOptions(r,t.active?"active":o),l)&&(i.options.radius=0),this.updateElement(t,r,i,o)}}resolveDataElementOptions(t,e){var i=this.getParsed(t);let a=super.resolveDataElementOptions(t,e);t=(a=a.$shared?Object.assign({},a,{$shared:!1}):a).radius;return"active"!==e&&(a.radius=0),a.radius+=T(i&&i._custom,t),a}},DoughnutController:ps,LineController:class extends Aa{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){var e=this._cachedMeta,{dataset:i,data:a=[],_dataset:s}=e,r=this.chart._animationsDisabled;let{start:n,count:o}=Ot(e,a,r);this._drawStart=n,this._drawCount=o,At(e)&&(n=0,o=a.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!s._decimated,i.points=a;e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0),e.segment=this.options.segment,this.updateElement(i,void 0,{animated:!r,options:e},t),this.updateElements(a,n,o,t)}updateElements(a,s,t,r){let n="reset"===r,{iScale:o,vScale:l,_stacked:h,_dataset:d}=this._cachedMeta,{sharedOptions:c,includeOptions:u}=this._getSharedOptions(s,r),g=o.axis,f=l.axis,{spanGaps:e,segment:p}=this.options,m=ot(e)?e:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||n||"none"===r,x=s+t,v=a.length,_=0<s&&this.getParsed(s-1);for(let i=0;i<v;++i){let t=a[i],e=b?t:{};var y,M,w,k;i<s||i>=x?e.skip=!0:(M=P((y=this.getParsed(i))[f]),w=e[g]=o.getPixelForValue(y[g],i),k=e[f]=n||M?l.getBasePixel():l.getPixelForValue(h?this.applyStack(l,y,h):y[f],i),e.skip=isNaN(w)||isNaN(k)||M,e.stop=0<i&&Math.abs(y[g]-_[g])>m,p&&(e.parsed=y,e.raw=d.data[i]),u&&(e.options=c||this.resolveDataElementOptions(i,t.active?"active":r)),b||this.updateElement(t,i,e,r),_=y)}}getMaxOverflow(){var t,e=this._cachedMeta,i=e.dataset,i=i.options&&i.options.borderWidth||0,e=e.data||[];return e.length?(t=e[0].size(this.resolveDataElementOptions(0)),e=e[e.length-1].size(this.resolveDataElementOptions(e.length-1)),Math.max(i,t,e)/2):i}draw(){var t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},PieController:class extends ps{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},PolarAreaController:ms,RadarController:class extends Aa{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){var e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,a){return ii.bind(this)(t,e,i,a)}update(e){let t=this._cachedMeta,i=t.dataset,a=t.data||[],s=t.iScale.getLabels();if(i.points=a,"resize"!==e){let t=this.resolveDatasetElementOptions(e);this.options.showLine||(t.borderWidth=0);var r={_loop:!0,_fullLoop:s.length===a.length,options:t};this.updateElement(i,void 0,r,e)}this.updateElements(a,0,a.length,e)}updateElements(o,t,e,l){var h=this._cachedMeta.rScale,d="reset"===l;for(let n=t;n<t+e;n++){let t=o[n],e=this.resolveDataElementOptions(n,t.active?"active":l),i=h.getPointPositionForValue(n,this.getParsed(n).r),a=d?h.xCenter:i.x,s=d?h.yCenter:i.y,r={x:a,y:s,angle:i.angle,skip:isNaN(a)||isNaN(s),options:e};this.updateElement(t,n,r,l)}}},ScatterController:class extends Aa{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){var e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:e,yScale:a}=e,s=this.getParsed(t),e=e.getLabelForValue(s.x),a=a.getLabelForValue(s.y);return{label:i[t]||"",value:"("+e+", "+a+")"}}update(i){var a=this._cachedMeta,{data:s=[]}=a,r=this.chart._animationsDisabled;let{start:t,count:e}=Ot(a,s,r);if(this._drawStart=t,this._drawCount=e,At(a)&&(t=0,e=s.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:t,_dataset:e}=a;t._chart=this.chart,t._datasetIndex=this.index,t._decimated=!!e._decimated,t.points=s;var n=this.resolveDatasetElementOptions(i);n.segment=this.options.segment,this.updateElement(t,void 0,{animated:!r,options:n},i)}else this.datasetElementType&&(delete a.dataset,this.datasetElementType=!1);this.updateElements(s,t,e,i)}addElements(){var t=this.options["showLine"];!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(o,t,e,l){let h="reset"===l,{iScale:d,vScale:c,_stacked:u,_dataset:g}=this._cachedMeta,i=this.resolveDataElementOptions(t,l),f=this.getSharedOptions(i),p=this.includeOptions(l,f),m=d.axis,b=c.axis,{spanGaps:a,segment:x}=this.options,v=ot(a)?a:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||h||"none"===l,y=0<t&&this.getParsed(t-1);for(let n=t;n<t+e;++n){let t=o[n],e=this.getParsed(n),i=_?t:{},a=P(e[b]),s=i[m]=d.getPixelForValue(e[m],n),r=i[b]=h||a?c.getBasePixel():c.getPixelForValue(u?this.applyStack(c,e,u):e[b],n);i.skip=isNaN(s)||isNaN(r)||a,i.stop=0<n&&Math.abs(e[m]-y[m])>v,x&&(i.parsed=e,i.raw=g.data[n]),p&&(i.options=f||this.resolveDataElementOptions(n,t.active?"active":l)),_||this.updateElement(t,n,i,l),y=e}this.updateSharedOptions(f,l,i)}getMaxOverflow(){var t,e,i=this._cachedMeta,a=i.data||[];if(this.options.showLine)return i=(i=i.dataset).options&&i.options.borderWidth||0,a.length?(t=a[0].size(this.resolveDataElementOptions(0)),e=a[a.length-1].size(this.resolveDataElementOptions(a.length-1)),Math.max(i,t,e)/2):i;{let e=0;for(let t=a.length-1;0<=t;--t)e=Math.max(e,a[t].size(this.resolveDataElementOptions(t))/2);return 0<e&&e}}}});function bs(t,e,i,a){return{x:i+t*Math.cos(e),y:a+t*Math.sin(e)}}function xs(s,t,e,i,a,r){var{x:n,y:o,startAngle:l,pixelMargin:h,innerRadius:d}=t,c=Math.max(t.outerRadius+i+e-h,0),h=0<d?d+i+e+h:0;let u=0;var g=a-l;if(i){let t=((0<d?d-i:0)+(0<c?c-i:0))/2;u=(g-(0!=t?g*t/(t+i):g))/2}var d=(g-Math.max(.001,g*c-e/S)/c)/2,g=l+d+u,l=a-d-u,{outerStart:d,outerEnd:f,innerStart:p,innerEnd:m}=function(t,e,i,a){t=yi(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);let s=(i-e)/2,r=Math.min(s,a*e/2),n=t=>{var e=(i-Math.min(s,t))*a/2;return C(t,0,Math.min(s,e))};return{outerStart:n(t.outerStart),outerEnd:n(t.outerEnd),innerStart:C(t.innerStart,0,r),innerEnd:C(t.innerEnd,0,r)}}(t,h,c,l-g),b=c-d,x=c-f,v=g+d/b,_=l-f/x,y=h+p,M=h+m,w=g+p/y,k=l-m/M;if(s.beginPath(),r){let t=(v+_)/2;if(s.arc(n,o,c,v,t),s.arc(n,o,c,t,_),0<f){let t=bs(x,_,n,o);s.arc(t.x,t.y,f,_,l+D)}let e=bs(M,l,n,o);if(s.lineTo(e.x,e.y),0<m){let t=bs(M,k,n,o);s.arc(t.x,t.y,m,l+D,k+Math.PI)}let i=(l-m/h+(g+p/h))/2;if(s.arc(n,o,h,l-m/h,i,!0),s.arc(n,o,h,i,g+p/h,!0),0<p){let t=bs(y,w,n,o);s.arc(t.x,t.y,p,w+Math.PI,g-D)}let a=bs(b,g,n,o);if(s.lineTo(a.x,a.y),0<d){let t=bs(b,v,n,o);s.arc(t.x,t.y,d,g-D,v)}}else{s.moveTo(n,o);let t=Math.cos(v)*c+n,e=Math.sin(v)*c+o,i=(s.lineTo(t,e),Math.cos(_)*c+n),a=Math.sin(_)*c+o;s.lineTo(i,a)}s.closePath()}function vs(t,e,i=e){t.lineCap=T(i.borderCapStyle,e.borderCapStyle),t.setLineDash(T(i.borderDash,e.borderDash)),t.lineDashOffset=T(i.borderDashOffset,e.borderDashOffset),t.lineJoin=T(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=T(i.borderWidth,e.borderWidth),t.strokeStyle=T(i.borderColor,e.borderColor)}function _s(t,e,i){t.lineTo(i.x,i.y)}function ys(t,e,i={}){var t=t.length,{start:i=0,end:a=t-1}=i,{start:s,end:r}=e,n=Math.max(i,s),o=Math.min(a,r);return{count:t,start:n,loop:e.loop,ilen:o<n&&!(i<s&&a<s||r<i&&r<a)?t+o-n:o-n}}function Ms(t,e,i,a){let{points:s,options:r}=e,{count:n,start:o,loop:l,ilen:h}=ys(s,i,a),d=r.stepped?We:r.tension||"monotone"===r.cubicInterpolationMode?Ne:_s,c,u,g,{move:f=!0,reverse:p}=a||{};for(c=0;c<=h;++c)(u=s[(o+(p?h-c:c))%n]).skip||(f?(t.moveTo(u.x,u.y),f=!1):d(t,g,u,p,r.stepped),g=u);return l&&(u=s[(o+(p?h:0))%n],d(t,g,u,p,r.stepped)),!!l}function ws(a,t,e,i){let s=t.points,{count:r,start:n,ilen:o}=ys(s,e,i),{move:l=!0,reverse:h}=i||{},d,c,u,g,f,p,m=0,b=0;var x=t=>(n+(h?o-t:t))%r,v=()=>{g!==f&&(a.lineTo(m,f),a.lineTo(m,g),a.lineTo(m,p))};for(l&&(c=s[x(0)],a.moveTo(c.x,c.y)),d=0;d<=o;++d)if(!(c=s[x(d)]).skip){let t=c.x,e=c.y,i=0|t;i===u?(e<g?g=e:e>f&&(f=e),m=(b*m+t)/++b):(v(),a.lineTo(t,e),u=i,b=0,g=f=e),p=e}v()}function ks(t){var e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?Ms:ws}let Ss="function"==typeof Path2D;class Ps extends e{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){var i,a=this.options;!a.tension&&"monotone"!==a.cubicInterpolationMode||a.stepped||this._pointsUpdated||(i=a.spanGaps?this._loop:this._fullLoop,hi(this._points,a,t,i,e),this._pointsUpdated=!0)}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Ri(this,this.options.segment))}first(){var t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){var t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(r,n){var o=this.options,l=r[n],h=this.points,d=Ei(this,{property:n,start:l,end:l});if(d.length){var c,u=[],g=o.stepped?pi:o.tension||"monotone"===o.cubicInterpolationMode?mi:fi;let s,t;for(s=0,t=d.length;s<t;++s){let{start:t,end:e}=d[s],i=h[t],a=h[e];i===a?u.push(i):((c=g(i,a,Math.abs((l-i[n])/(a[n]-i[n])),o.stepped))[n]=r[n],u.push(c))}return 1===u.length?u[0]:u}}pathSegment(t,e,i){return ks(this)(t,this,e,i)}path(t,e,i){var a,s=this.segments,r=ks(this);let n=this._loop;e=e||0,i=i||this.points.length-e;for(a of s)n&=r(t,this,a,{start:e,end:e+i-1});return!!n}draw(t,e,i,a){var s,r=this.options||{};(this.points||[]).length&&r.borderWidth&&(t.save(),r=t,s=this,i=i,a=a,(Ss&&!s.options.segment?function(t,e,i,a){let s=e._path;s||(s=e._path=new Path2D,e.path(s,i,a)&&s.closePath()),vs(t,e.options),t.stroke(s)}:function(t,e,i,a){var s,{segments:r,options:n}=e,o=ks(e);for(s of r)vs(t,n,s.style),t.beginPath(),o(t,e,s,{start:i,end:i+a-1})&&t.closePath(),t.stroke()})(r,s,i,a),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Ds(t,e,i,a){var s=t.options,{[i]:t}=t.getProps([i],a);return Math.abs(e-t)<s.radius+s.hitRadius}function Cs(t,e){var{x:e,y:i,base:a,width:s,height:r}=t.getProps(["x","y","base","width","height"],e);let n,o,l,h,d;return h=t.horizontal?(d=r/2,n=Math.min(e,a),o=Math.max(e,a),l=i-d,i+d):(d=s/2,n=e-d,o=e+d,l=Math.min(i,a),Math.max(i,a)),{left:n,top:l,right:o,bottom:h}}function Os(t,e,i,a){return t?0:C(e,i,a)}function As(t,e,i,a){var s=null===e,r=null===i,t=t&&!(s&&r)&&Cs(t,a);return t&&(s||d(e,t.left,t.right))&&(r||d(i,t.top,t.bottom))}function Ts(t,e){t.rect(e.x,e.y,e.w,e.h)}function Ls(t,e,i={}){var a=t.x!==i.x?-e:0,s=t.y!==i.y?-e:0,r=(t.x+t.w!==i.x+i.w?e:0)-a,i=(t.y+t.h!==i.y+i.h?e:0)-s;return{x:t.x+a,y:t.y+s,w:t.w+r,h:t.h+i,radius:t.radius}}var Es=Object.freeze({__proto__:null,ArcElement:class extends e{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){var{angle:t,distance:e}=ut(this.getProps(["x","y"],i),{x:t,y:e}),{startAngle:i,endAngle:a,innerRadius:s,outerRadius:r,circumference:n}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),o=(this.options.spacing+this.options.borderWidth)/2,n=T(n,a-i)>=v||pt(t,i,a),t=d(e,s+o,r+o);return n&&t}getCenterPoint(t){var{x:t,y:e,startAngle:i,endAngle:a,innerRadius:s,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:n,spacing:o}=this.options,i=(i+a)/2,a=(s+r+o+n)/2;return{x:t+Math.cos(i)*a,y:e+Math.sin(i)*a}}tooltipPosition(t){return this.getCenterPoint(t)}draw(e){var{options:i,circumference:a}=this,s=(i.offset||0)/4,r=(i.spacing||0)/2,n=i.circular;if(this.pixelMargin="inner"===i.borderAlign?.33:0,this.fullCircles=a>v?Math.floor(a/v):0,!(0===a||this.innerRadius<0||this.outerRadius<0)){e.save();var o=(this.startAngle+this.endAngle)/2,o=(e.translate(Math.cos(o)*s,Math.sin(o)*s),s*(1-Math.sin(Math.min(S,a||0))));e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor;{var l=e;s=this;a=o;i=r;var h=n;var{fullCircles:d,startAngle:c,circumference:u}=s;let t=s.endAngle;if(d){xs(l,s,a,i,t,h);for(let t=0;t<d;++t)l.fill();isNaN(u)||(t=c+(u%v||v))}xs(l,s,a,i,t,h),l.fill()}var g=e,c=this,u=o,s=r,a=n,{fullCircles:f,startAngle:i,circumference:h,options:o}=c,{borderWidth:r,borderJoinStyle:n,borderDash:p,borderDashOffset:m}=o,o="inner"===o.borderAlign;if(r){g.setLineDash(p||[]),g.lineDashOffset=m,o?(g.lineWidth=2*r,g.lineJoin=n||"round"):(g.lineWidth=r,g.lineJoin=n||"bevel");let t=c.endAngle;if(f){xs(g,c,u,s,t,a);for(let t=0;t<f;++t)g.stroke();isNaN(h)||(t=i+(h%v||v))}if(o){p=g;m=c;r=t;var{startAngle:m,pixelMargin:n,x:i,y:h,outerRadius:o,innerRadius:b}=m,x=n/o;p.beginPath(),p.arc(i,h,o,m-x,r+x),n<b?p.arc(i,h,b,r+(x=n/b),m-x,!0):p.arc(i,h,n,r+D,m-D),p.closePath(),p.clip()}f||(xs(g,c,u,s,t,a),g.stroke())}e.restore()}}},BarElement:class extends e{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){var e,i,a,s,r,n,o,{inflateAmount:l,options:{borderColor:h,backgroundColor:d}}=this,{inner:c,outer:u}=(a=Cs(e=this),s=a.right-a.left,r=a.bottom-a.top,u=s/2,n=r/2,o=(i=e).options.borderWidth,i=i.borderSkipped,o=Mi(o),n={t:Os(i.top,o.top,0,n),r:Os(i.right,o.right,0,u),b:Os(i.bottom,o.bottom,0,n),l:Os(i.left,o.left,0,u)},i=s/2,o=r/2,e=(u=e).getProps(["enableBorderRadius"]).enableBorderRadius,c=u.options.borderRadius,g=wi(c),i=Math.min(i,o),o=u.borderSkipped,e={topLeft:Os(!(u=e||A(c))||o.top||o.left,g.topLeft,0,i),topRight:Os(!u||o.top||o.right,g.topRight,0,i),bottomLeft:Os(!u||o.bottom||o.left,g.bottomLeft,0,i),bottomRight:Os(!u||o.bottom||o.right,g.bottomRight,0,i)},{outer:{x:a.left,y:a.top,w:s,h:r,radius:e},inner:{x:a.left+n.l,y:a.top+n.t,w:s-n.l-n.r,h:r-n.t-n.b,radius:{topLeft:Math.max(0,e.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,e.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,e.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,e.bottomRight-Math.max(n.b,n.r))}}}),g=(o=u.radius).topLeft||o.topRight||o.bottomLeft||o.bottomRight?je:Ts;t.save(),u.w===c.w&&u.h===c.h||(t.beginPath(),g(t,Ls(u,l,c)),t.clip(),g(t,Ls(c,-l,u)),t.fillStyle=h,t.fill("evenodd")),t.beginPath(),g(t,Ls(c,l)),t.fillStyle=d,t.fill(),t.restore()}inRange(t,e,i){return As(this,t,e,i)}inXRange(t,e){return As(this,t,null,e)}inYRange(t,e){return As(this,null,t,e)}getCenterPoint(t){var{x:t,y:e,base:i,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(t+i)/2:t,y:a?e:(e+i)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}},LineElement:Ps,PointElement:class extends e{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){var a=this.options,{x:i,y:s}=this.getProps(["x","y"],i);return Math.pow(t-i,2)+Math.pow(e-s,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(t,e){return Ds(this,t,"x",e)}inYRange(t,e){return Ds(this,t,"y",e)}getCenterPoint(t){var{x:t,y:e}=this.getProps(["x","y"],t);return{x:t,y:e}}size(t){var e=(t=t||this.options||{}).radius||0;return 2*((e=Math.max(e,e&&t.hoverRadius||0))+(e&&t.borderWidth||0))}draw(t,e){var i=this.options;this.skip||i.radius<.1||!y(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,ze(t,i,this.x,this.y))}getRange(){var t=this.options||{};return t.radius+t.hitRadius}}});function Rs(t){var e=this.getLabels();return 0<=t&&t<e.length?e[t]:t}function Is(t,e,{horizontal:i,minRotation:a}){a=L(a),i=(i?Math.sin(a):Math.cos(a))||.001;return Math.min(e/i,.75*e*(""+t).length)}class zs extends Fa{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return P(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){let t=this.options["beginAtZero"],{minDefined:e,maxDefined:i}=this.getUserBounds(),{min:a,max:s}=this;var r,n=t=>a=e?a:t,o=t=>s=i?s:t;if(t){let t=_(a),e=_(s);t<0&&e<0?o(0):0<t&&0<e&&n(0)}a===s&&(r=0===s?1:Math.abs(.05*s),o(s+r),t||n(a-r)),this.min=a,this.max=s}getTickLimit(){let t,{maxTicksLimit:e,stepSize:i}=this.options.ticks;return i?1e3<(t=Math.ceil(this.max/i)-Math.floor(this.min/i)+1)&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3):(t=this.computeTickLimit(),e=e||11),t=e?Math.min(e,t):t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){var t=this.options,e=t.ticks,i=this.getTickLimit(),i=function(t,e){var i=[],{bounds:a,step:s,min:r,max:n,precision:o,count:l,maxTicks:h,maxDigits:d,includeBounds:c}=t,u=s||1,g=h-1,{min:e,max:f}=e,p=!P(r),m=!P(n),b=!P(l),d=(f-e)/(d+1);let x,v,_,y,M=rt((f-e)/g/u)*u;if(M<1e-14&&!p&&!m)return[{value:e},{value:f}];(y=Math.ceil(f/M)-Math.floor(e/M))>g&&(M=rt(y*M/g/u)*u),P(o)||(x=Math.pow(10,o),M=Math.ceil(M*x)/x),_="ticks"===a?(v=Math.floor(e/M)*M,Math.ceil(f/M)*M):(v=e,f),p&&m&&s&<((n-r)/s,M/1e3)?(y=Math.round(Math.min((n-r)/M,h)),M=(n-r)/y,v=r,_=n):b?(v=p?r:v,_=m?n:_,y=l-1,M=(_-v)/y):y=st(y=(_-v)/M,Math.round(y),M/1e3)?Math.round(y):Math.ceil(y);g=Math.max(ct(M),ct(v));x=Math.pow(10,P(o)?g:o),v=Math.round(v*x)/x,_=Math.round(_*x)/x;let w=0;for(p&&(c&&v!==r?(i.push({value:r}),v<r&&w++,st(Math.round((v+w*M)*x)/x,r,Is(r,d,t))&&w++):v<r&&w++);w<y;++w){let t=Math.round((v+w*M)*x)/x;if(m&&t>n)break;i.push({value:t})}return m&&c&&_!==n?i.length&&st(i[i.length-1].value,n,Is(n,d,t))?i[i.length-1].value=n:i.push({value:n}):m&&_!==n||i.push({value:_}),i}({maxTicks:Math.max(2,i),bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&ht(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){var t=this.ticks;let e=this.min,i=this.max;super.configure(),this.options.offset&&t.length&&(t=(i-e)/Math.max(t.length-1,1)/2,e-=t,i+=t),this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return ce(t,this.chart.options.locale,this.options.ticks.format)}}class Fs extends zs{static id="linear";static defaults={ticks:{callback:ge.formatters.numeric}};determineDataLimits(){var{min:t,max:e}=this.getMinMax(!0);this.min=p(t)?t:0,this.max=p(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){var t=this.isHorizontal(),e=t?this.width:this.height,i=L(this.options.ticks.minRotation),t=(t?Math.sin(i):Math.cos(i))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,i.lineHeight/t))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}let Vs=t=>Math.floor(o(t)),Bs=(t,e)=>Math.pow(10,Vs(t)+e);function Ws(t){return 1==t/Math.pow(10,Vs(t))}function Ns(t,e,i){i=Math.pow(10,i),t=Math.floor(t/i);return Math.ceil(e/i)-t}class Hs extends Fa{static id="logarithmic";static defaults={ticks:{callback:ge.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){t=zs.prototype.parse.apply(this,[t,e]);if(0!==t)return p(t)&&0<t?t:null;this._zero=!0}determineDataLimits(){var{min:t,max:e}=this.getMinMax(!0);this.min=p(t)?Math.max(0,t):null,this.max=p(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!p(this._userMin)&&(this.min=t===Bs(this.min,0)?Bs(this.min,-1):Bs(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:e,maxDefined:i}=this.getUserBounds(),a=this.min,s=this.max;var t=t=>a=e?a:t,r=t=>s=i?s:t;a===s&&(a<=0?(t(1),r(10)):(t(Bs(a,-1)),r(Bs(s,1)))),a<=0&&t(Bs(s,-1)),s<=0&&r(Bs(a,1)),this.min=a,this.max=s}buildTicks(){var t=this.options,e=function(t,{min:e,max:i}){e=u(t.min,e);var a=[],s=Vs(e);let r=function(t,e){let i=Vs(e-t);for(;10<Ns(t,e,i);)i++;for(;Ns(t,e,i)<10;)i--;return Math.min(i,Vs(t))}(e,i),n=r<0?Math.pow(10,Math.abs(r)):1;var o=Math.pow(10,r),l=s>r?Math.pow(10,s):0,s=Math.round((e-l)*n)/n,h=Math.floor((e-l)/o/10)*o*10;let d=Math.floor((s-h)/Math.pow(10,r)),c=u(t.min,Math.round((l+h+d*Math.pow(10,r))*n)/n);for(;c<i;)a.push({value:c,major:Ws(c),significand:d}),10<=d?d=d<15?15:20:d++,20<=d&&(r++,d=2,n=0<=r?1:n),c=Math.round((l+h+d*Math.pow(10,r))*n)/n;return e=u(t.max,c),a.push({value:e,major:Ws(e),significand:d}),a}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&ht(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":ce(t,this.chart.options.locale,this.options.ticks.format)}configure(){var t=this.min;super.configure(),this._startValue=o(t),this._valueRange=o(this.max)-o(t)}getPixelForValue(t){return null===(t=void 0!==t&&0!==t?t:this.min)||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(o(t)-this._startValue)/this._valueRange)}getValueForPixel(t){t=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+t*this._valueRange)}}function js(t){var e=t.ticks;if(e.display&&t.display){let t=I(e.backdropPadding);return T(e.font&&e.font.size,R.font.size)+t.height}return 0}function Ys(t,e,i,a,s){return t===a||t===s?{start:e-i/2,end:e+i/2}:t<a||s<t?{start:e-i,end:e}:{start:e,end:e+i}}function $s(i){let s={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},r=Object.assign({},s),a=[],n=[],t=i._pointLabels.length,o=i.options.pointLabels,l=o.centerPointLabels?S/t:0;for(let e=0;e<t;e++){let t=o.setContext(i.getPointLabelContext(e));n[e]=t.padding;var h=i.getPointPosition(e,i.drawingArea+n[e],l),d=z(t.font),c=(c=i.ctx,d=d,u=O(u=i._pointLabels[e])?u:[u],{w:Ee(c,d.string,u),h:u.length*d.lineHeight}),u=(a[e]=c,x(i.getIndexAngle(e)+l)),d=Math.round(dt(u));{g=void 0;f=void 0;p=void 0;m=void 0;b=void 0;var g=r;var f=s;var p=u;var m=Ys(d,h.x,c.w,0,180);var b=Ys(d,h.y,c.h,90,270);let t=Math.abs(Math.sin(p)),e=Math.abs(Math.cos(p)),i=0,a=0;m.start<f.l?(i=(f.l-m.start)/t,g.l=Math.min(g.l,f.l-i)):m.end>f.r&&(i=(m.end-f.r)/t,g.r=Math.max(g.r,f.r+i)),b.start<f.t?(a=(f.t-b.start)/e,g.t=Math.min(g.t,f.t-a)):b.end>f.b&&(a=(b.end-f.b)/e,g.b=Math.max(g.b,f.b+a))}}var c,u;i.setCenterPoint(s.l-r.l,r.r-s.r,s.t-r.t,r.b-s.b),i._pointLabelItems=function(i,a,s){let r=[],t=i._pointLabels.length,e=i.options,{centerPointLabels:n,display:o}=e.pointLabels,l={extra:js(e)/2,additionalAngle:n?S/t:0},h;for(let e=0;e<t;e++){l.padding=s[e],l.size=a[e];let t=function(t,e,i){let a=t.drawingArea,{extra:s,additionalAngle:r,padding:n,size:o}=i,l=t.getPointPosition(e,a+s+n,r),h=Math.round(dt(x(l.angle+D))),d=function(t,e){return 90===h||270===h?t-=e/2:(270<h||h<90)&&(t-=e),t}(l.y,o.h),c=function(t){return 0===t||180===t?"center":t<180?"left":"right"}(h),u=function(t,e){return"right"===c?t-=e:"center"===c&&(t-=e/2),t}(l.x,o.w);return{visible:!0,x:l.x,y:d,textAlign:c,left:u,top:d,right:u+o.w,bottom:d+o.h}}(i,e,l);r.push(t),"auto"===o&&(t.visible=function(t,e){if(!e)return!0;var{left:t,top:i,right:a,bottom:s}=t;return!(y({x:t,y:i},e)||y({x:t,y:s},e)||y({x:a,y:i},e)||y({x:a,y:s},e))}(t,h),t.visible)&&(h=t)}return r}(i,a,n)}function Us(e,i,t,a){var s=e["ctx"];if(t)s.arc(e.xCenter,e.yCenter,i,0,v);else{var r=e.getPointPosition(0,i);s.moveTo(r.x,r.y);for(let t=1;t<a;t++)r=e.getPointPosition(t,i),s.lineTo(r.x,r.y)}}class Xs extends zs{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ge.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){var t=this._padding=I(js(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){var{min:t,max:e}=this.getMinMax(!1);this.min=p(t)&&!isNaN(t)?t:0,this.max=p(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/js(this.options))}generateTickLabels(t){zs.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((t,e)=>{t=c(this.options.pointLabels.callback,[t,e],this);return t||0===t?t:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){var t=this.options;t.display&&t.pointLabels.display?$s(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,a){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-a)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,a))}getIndexAngle(t){return x(t*(v/(this._pointLabels.length||1))+L(this.options.startAngle||0))}getDistanceFromCenterForValue(t){var e;return P(t)?NaN:(e=this.drawingArea/(this.max-this.min),this.options.reverse?(this.max-t)*e:(t-this.min)*e)}getValueForDistanceFromCenter(t){return P(t)?NaN:(t=t/(this.drawingArea/(this.max-this.min)),this.options.reverse?this.max-t:this.min+t)}getPointLabelContext(t){var e=this._pointLabels||[];if(0<=t&&t<e.length)return e=e[t],Pi(this.getContext(),{label:e,index:t,type:"pointLabel"})}getPointPosition(t,e,i=0){t=this.getIndexAngle(t)-D+i;return{x:Math.cos(t)*e+this.xCenter,y:Math.sin(t)*e+this.yCenter,angle:t}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){var{left:t,top:e,right:i,bottom:a}=this._pointLabelItems[t];return{left:t,top:e,right:i,bottom:a}}drawBackground(){var t,{backgroundColor:e,grid:{circular:i}}=this.options;e&&((t=this.ctx).save(),t.beginPath(),Us(this,this.getDistanceFromCenterForValue(this._endValue),i,this._pointLabels.length),t.closePath(),t.fillStyle=e,t.fill(),t.restore())}drawGrid(){let a=this.ctx,s=this.options,{angleLines:r,grid:l,border:h}=s,d=this._pointLabels.length,n,c,o;if(s.pointLabels.display){var i=this,t=d,{ctx:u,options:{pointLabels:g}}=i;for(let e=t-1;0<=e;e--){let t=i._pointLabelItems[e];if(t.visible){var f,p=g.setContext(i.getPointLabelContext(e)),m=(f=M=y=_=v=x=b=m=void 0,u),b=p,x=t,{left:v,top:_,right:y,bottom:M}=x;if(!P(f=b["backdropColor"])){let t=wi(b.borderRadius),e=I(b.backdropPadding);m.fillStyle=f;b=v-e.left,f=_-e.top,y=y-v+e.width,v=M-_+e.height;Object.values(t).some(t=>0!==t)?(m.beginPath(),je(m,{x:b,y:f,w:y,h:v,radius:t}),m.fill()):m.fillRect(b,f,y,v)}var x=z(p.font),{x:M,y:_,textAlign:m}=t;He(u,i._pointLabels[e],M,_+x.lineHeight/2,x,{color:p.color,textAlign:m,textBaseline:"middle"})}}}if(l.display&&this.ticks.forEach((t,e)=>{var i,a,s,r,n,o;0!==e&&(c=this.getDistanceFromCenterForValue(t.value),t=this.getContext(e),e=l.setContext(t),t=h.setContext(t),i=this,e=e,a=c,s=d,t=t,r=i.ctx,n=e.circular,{color:e,lineWidth:o}=e,!n&&!s||!e||!o||a<0||(r.save(),r.strokeStyle=e,r.lineWidth=o,r.setLineDash(t.dash),r.lineDashOffset=t.dashOffset,r.beginPath(),Us(i,a,n,s),r.closePath(),r.stroke(),r.restore()))}),r.display){for(a.save(),n=d-1;0<=n;n--){let t=r.setContext(this.getPointLabelContext(n)),{color:e,lineWidth:i}=t;i&&e&&(a.lineWidth=i,a.strokeStyle=e,a.setLineDash(t.borderDash),a.lineDashOffset=t.borderDashOffset,c=this.getDistanceFromCenterForValue(s.ticks.reverse?this.min:this.max),o=this.getPointPosition(n,c),a.beginPath(),a.moveTo(this.xCenter,this.yCenter),a.lineTo(o.x,o.y),a.stroke())}a.restore()}}drawBorder(){}drawLabels(){let n=this.ctx,o=this.options,l=o.ticks;if(l.display){var t=this.getIndexAngle(0);let s,r;n.save(),n.translate(this.xCenter,this.yCenter),n.rotate(t),n.textAlign="center",n.textBaseline="middle",this.ticks.forEach((e,t)=>{if(0!==t||o.reverse){var i=l.setContext(this.getContext(t)),a=z(i.font);if(s=this.getDistanceFromCenterForValue(this.ticks[t].value),i.showLabelBackdrop){n.font=a.string,r=n.measureText(e.label).width,n.fillStyle=i.backdropColor;let t=I(i.backdropPadding);n.fillRect(-r/2-t.left,-s-a.size/2-t.top,r+t.width,a.size+t.height)}He(n,e.label,0,-s,a,{color:i.color,strokeColor:i.textStrokeColor,strokeWidth:i.textStrokeWidth})}}),n.restore()}}drawTitle(){}}let qs={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},h=Object.keys(qs);function Ks(t,e){return t-e}function Gs(t,e){if(P(e))return null;var i=t._adapter,{parser:t,round:a,isoWeekday:s}=t._parseOpts;let r=e;return null===(r=p(r="function"==typeof t?t(r):r)?r:"string"==typeof t?i.parse(r,t):i.parse(r))?null:+(r=a?"week"!==a||!ot(s)&&!0!==s?i.startOf(r,a):i.startOf(r,"isoWeek",s):r)}function Zs(t,a,s,r){let e=h.length;for(let i=h.indexOf(t);i<e-1;++i){let t=qs[h[i]],e=t.steps||Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((s-a)/(e*t.size))<=r)return h[i]}return h[e-1]}function Js(t,e,i){var a,s;i?i.length&&({lo:a,hi:s}=bt(i,e),t[i[a]>=e?i[a]:i[s]]=!0):t[e]=!0}function Qs(i,t,a){var s=[],r={},e=t.length;let n,o;for(n=0;n<e;++n)r[o=t[n]]=n,s.push({value:o,major:!1});if(0!==e&&a){var l=s,h=r,d=a,c=i._adapter,a=+c.startOf(l[0].value,d),u=l[l.length-1].value;let t,e;for(t=a;t<=u;t=+c.add(t,1,d))0<=(e=h[t])&&(l[e].major=!0);return l}return s}class tr extends Fa{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){var i=t.time||(t.time={}),a=this._adapter=new hs._date(t.adapters.date);a.init(e),$(i.displayFormats,a.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Gs(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){var t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:a,max:s,minDefined:r,maxDefined:n}=this.getUserBounds();function o(t){r||isNaN(t.min)||(a=Math.min(a,t.min)),n||isNaN(t.max)||(s=Math.max(s,t.max))}r&&n||(o(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source)||o(this.getMinMax(!1)),a=p(a)&&!isNaN(a)?a:+e.startOf(Date.now(),i),s=p(s)&&!isNaN(s)?s:+e.endOf(Date.now(),i)+1,this.min=Math.min(a,s-1),this.max=Math.max(a+1,s)}_getLabelBounds(){var t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){var t=this.options,e=t.time,i=t.ticks,a="labels"===i.source?this.getLabelTimestamps():this._generate(),s=("ticks"===t.bounds&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]),this.min),r=vt(a,s,this.max);return this._unit=e.unit||(i.autoSkip?Zs(e.minUnit,this.min,this.max,this._getLabelCapacity(s)):function(i,a,t,s,r){for(let e=h.length-1;e>=h.indexOf(t);e--){let t=h[e];if(qs[t].common&&i._adapter.diff(r,s,t)>=a-1)return t}return h[t?h.indexOf(t):0]}(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(i){for(let t=h.indexOf(i)+1,e=h.length;t<e;++t)if(qs[h[t]].common)return h[t]}(this._unit):void 0,this.initOffsets(a),t.reverse&&r.reverse(),Qs(this,r,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e,i,a=0,s=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),a=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),s=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);t=t.length<3?.5:.25;a=C(a,0,t),s=C(s,0,t),this._offsets={start:a,end:s,factor:1/(a+1+s)}}_generate(){var t=this._adapter,e=this.min,i=this.max,a=this.options,s=a.time,r=s.unit||Zs(s.minUnit,e,i,this._getLabelCapacity(e)),n=T(a.ticks.stepSize,1),s="week"===r&&s.isoWeekday,o=ot(s)||!0===s,l={};let h,d,c=e;if(o&&(c=+t.startOf(c,"isoWeek",s)),c=+t.startOf(c,o?"day":r),t.diff(i,e,r)>1e5*n)throw new Error(e+" and "+i+" are too far apart with stepSize of "+n+" "+r);var u="data"===a.ticks.source&&this.getDataTimestamps();for(h=c,d=0;h<i;h=+t.add(h,n,r),d++)Js(l,h,u);return h!==i&&"ticks"!==a.bounds&&1!==d||Js(l,h,u),Object.keys(l).sort(Ks).map(t=>+t)}getLabelForValue(t){var e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){var i=this.options.time.displayFormats,a=this._unit,e=e||i[a];return this._adapter.format(t,e)}_tickFormatFunction(t,e,i,a){var s,r=this.options,n=r.ticks.callback;return n?c(n,[t,e,i],this):(n=r.time.displayFormats,r=this._unit,s=this._majorUnit,r=r&&n[r],n=s&&n[s],i=i[e],e=s&&n&&i&&i.major,this._adapter.format(t,a||(e?n:r)))}generateTickLabels(t){let e,i,a;for(e=0,i=t.length;e<i;++e)(a=t[e]).label=this._tickFormatFunction(a.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){var e=this._offsets,t=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+t)*e.factor)}getValueForPixel(t){var e=this._offsets,t=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+t*(this.max-this.min)}_getLabelSize(t){var e=this.options.ticks,t=this.ctx.measureText(t).width,e=L(this.isHorizontal()?e.maxRotation:e.minRotation),i=Math.cos(e),e=Math.sin(e),a=this._resolveTickFontOptions(0).size;return{w:t*i+a*e,h:t*e+a*i}}_getLabelCapacity(t){var e=this.options.time,i=e.displayFormats,e=i[e.unit]||i.millisecond,i=this._tickFormatFunction(t,0,Qs(this,[t],this._majorUnit),e),t=this._getLabelSize(i),e=Math.floor(this.isHorizontal()?this.width/t.w:this.height/t.h)-1;return 0<e?e:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;var a=this.getMatchingVisibleMetas();if(this._normalized&&a.length)return this._cache.data=a[0].controller.getAllParsedValues(this);for(t=0,e=a.length;t<e;++t)i=i.concat(a[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){var t=this._cache.labels||[];let e,i;if(t.length)return t;var a=this.getLabels();for(e=0,i=a.length;e<i;++e)t.push(Gs(this,a[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return wt(t.sort(Ks))}}function er(t,e,i){let a,s,r,n,o=0,l=t.length-1;i?(e>=t[o].pos&&e<=t[l].pos&&({lo:o,hi:l}=m(t,"pos",e)),{pos:a,time:r}=t[o],{pos:s,time:n}=t[l]):(e>=t[o].time&&e<=t[l].time&&({lo:o,hi:l}=m(t,"time",e)),{time:a,pos:r}=t[o],{time:s,pos:n}=t[l]);i=s-a;return i?r+(n-r)*(e-a)/i:r}let ir=Object.freeze({__proto__:null,CategoryScale:class extends Fa{static id="category";static defaults={ticks:{callback:Rs}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){var e=this._addedLabels;if(e.length){let t=this.getLabels();for(var{index:i,label:a}of e)t[i]===a&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){var i,a,s,r,n,o,l;return P(t)||(i=this.getLabels(),r=e=isFinite(e)&&i[e]===t?e:(a=i,s=T(e,t=t),r=this._addedLabels,-1===(l=a.indexOf(t))?(o=s,r=r,"string"==typeof(n=t)?(o=a.push(n)-1,r.unshift({index:o,label:n})):isNaN(n)&&(o=null),o):l!==a.lastIndexOf(t)?s:l),n=i.length-1,null===r)?null:C(Math.round(r),0,n)}determineDataLimits(){var{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:a}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(a=this.getLabels().length-1)),this.min=i,this.max=a}buildTicks(){var e=this.min,i=this.max,t=this.options.offset,a=[];let s=this.getLabels();s=0===e&&i===s.length-1?s:s.slice(e,i+1),this._valueRange=Math.max(s.length-(t?0:1),1),this._startValue=this.min-(t?.5:0);for(let t=e;t<=i;t++)a.push({value:t});return a}getLabelForValue(t){return Rs.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return null===(t="number"!=typeof t?this.parse(t):t)?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}},LinearScale:Fs,LogarithmicScale:Hs,RadialLinearScale:Xs,TimeScale:tr,TimeSeriesScale:class extends tr{static id="timeseries";static defaults=tr.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){var t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=er(e,this.min),this._tableRange=er(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){var{min:e,max:i}=this,a=[],s=[];let r,n,o,l,h;for(r=0,n=t.length;r<n;++r)(l=t[r])>=e&&l<=i&&a.push(l);if(a.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(r=0,n=a.length;r<n;++r)h=a[r+1],o=a[r-1],l=a[r],Math.round((h+o)/2)!==l&&s.push({time:l,pos:r/(n-1)});return s}_generate(){var t=this.min,e=this.max,i=super.getDataTimestamps();return i.includes(t)&&i.length||i.splice(0,0,t),i.includes(e)&&1!==i.length||i.push(e),i.sort((t,e)=>t-e)}_getTimestampsForTable(){var t,e,i=this._cache.all||[];return i.length||(t=this.getDataTimestamps(),e=this.getLabelTimestamps(),i=t.length&&e.length?this.normalize(t.concat(e)):t.length?t:e,i=this._cache.all=i),i}getDecimalForValue(t){return(er(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){var e=this._offsets,t=this.getDecimalForPixel(t)/e.factor-e.end;return er(this._table,t*this._tableRange+this._minPos,!0)}}}),ar=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],sr=ar.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function rr(t){return ar[t%ar.length]}function nr(t){return sr[t%sr.length]}function or(r){let n=0;return(t,e)=>{var i,a,s,e=r.getDatasetMeta(e).controller;e instanceof ps?n=(a=t,s=n,a.backgroundColor=a.data.map(()=>rr(s++)),s):e instanceof ms?n=(a=t,i=n,a.backgroundColor=a.data.map(()=>nr(i++)),i):e&&(n=(e=t,t=n,e.borderColor=rr(t),e.backgroundColor=nr(t),++t))}}function lr(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return 1}var hr={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){var a,s,r;i.enabled&&({data:{datasets:a},options:s}=t.config,r=s["elements"],!i.forceOverride&&(lr(a)||s&&(s.borderColor||s.backgroundColor)||r&&lr(r))||(i=or(t),a.forEach(i)))}};function dr(t){var e;t._decimated&&(e=t._data,delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e}))}function cr(t){t.data.datasets.forEach(t=>{dr(t)})}var ur={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(l,t,M)=>{if(M.enabled){let o=l.width;l.data.datasets.forEach((e,t)=>{var{_data:i,indexAxis:a}=e,h=l.getDatasetMeta(t),s=i||e.data;if("y"!==ki([a,l.options.indexAxis])&&h.controller.supportsDecimation){t=l.scales[h.xAxisID];if(("linear"===t.type||"time"===t.type)&&!l.options.parsing){var{start:r,count:n}=function(t){var e=t.length;let i,a=0;var s=h["iScale"],{min:r,max:n,minDefined:o,maxDefined:l}=s.getUserBounds();return o&&(a=C(m(t,s.axis,r).lo,0,e-1)),i=l?C(m(t,s.axis,n).hi+1,a,e)-a:e-a,{start:a,count:i}}(s);if(n<=(M.threshold||4*o))dr(e);else{let t;switch(P(i)&&(e._data=s,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),M.algorithm){case"lttb":t=function(n,o,l,t){var e=M.samples||t;if(l<=e)return n.slice(o,o+l);var h=[],d=(l-2)/(e-2);let c=0,i=o+l-1,u,g,f,p,m,b=o;for(h[c++]=n[b],u=0;u<e-2;u++){let t,e=0,i=0,a=Math.floor((u+1)*d)+1+o,s=Math.min(Math.floor((u+2)*d)+1,l)+o,r=s-a;for(t=a;t<s;t++)e+=n[t].x,i+=n[t].y;e/=r,i/=r;var x=Math.floor(u*d)+1+o,v=Math.min(Math.floor((u+1)*d)+1,l)+o,{x:_,y}=n[b];for(f=-1,t=x;t<v;t++)(p=.5*Math.abs((_-e)*(n[t].y-y)-(_-n[t].x)*(i-y)))>f&&(f=p,g=n[t],m=t);h[c++]=g,b=m}return h[c++]=n[i],h}(s,r,n,o);break;case"min-max":t=function(a,t,e,i){let s,r,n,o,l,h,d,c,u,g,f=0,p=0;var m=[],b=a[t].x,x=a[t+e-1].x-b;for(s=t;s<t+e;++s){n=((r=a[s]).x-b)/x*i,o=r.y;let t=0|n;if(t===l)o<u?(u=o,h=s):o>g&&(g=o,d=s),f=(p*f+r.x)/++p;else{let i=s-1;if(!P(h)&&!P(d)){let t=Math.min(h,d),e=Math.max(h,d);t!==c&&t!==i&&m.push({...a[t],x:f}),e!==c&&e!==i&&m.push({...a[e],x:f})}0<s&&i!==c&&m.push(a[i]),m.push(r),l=t,p=0,u=g=o,h=d=c=s}}return m}(s,r,n,o);break;default:throw new Error(`Unsupported decimation algorithm '${M.algorithm}'`)}e._decimated=t}}}})}else cr(l)},destroy(t){cr(t)}};function gr(i,a,s,t){if(!t){let t=a[i],e=s[i];return"angle"===i&&(t=x(t),e=x(e)),{property:i,start:t,end:e}}}function fr(t,e,i){for(;t<e;e--){let t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function pr(t,e,i,a){return t&&e?a(t[i],e[i]):t?t[i]:e?e[i]:0}function mr(e,t){let i=[],a=!1;return(i=O(e)?(a=!0,e):function(t){let{x:i=null,y:a=null}=e||{},s=t.points,r=[];return t.segments.forEach(({start:t,end:e})=>{e=fr(t,e,s);t=s[t],e=s[e];null!==a?(r.push({x:t.x,y:a}),r.push({x:e.x,y:a})):null!==i&&(r.push({x:i,y:t.y}),r.push({x:i,y:e.y}))}),r}(t)).length?new Ps({points:i,options:{tension:0},_loop:a,_fullLoop:a}):null}function br(t){return t&&!1!==t.fill}function xr(e,i,a){var s=[];for(let t=0;t<a.length;t++){var{first:r,last:n,point:o}=function(t,e,s){let i=t.interpolate(e,s);if(!i)return{};let r=i[s],n=t.segments,o=t.points,l=!1,h=!1;for(let a=0;a<n.length;a++){let t=n[a],e=o[t.start][s],i=o[t.end][s];if(d(r,e,i)){l=r===e,h=r===i;break}}return{first:l,last:h,point:i}}(a[t],i,"x");if(!(!o||r&&n))if(r)s.unshift(o);else if(e.push(o),!n)break}e.push(...s)}class vr{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){var{x:a,y:s,radius:r}=this;return e=e||{start:0,end:v},t.arc(a,s,r,e.end,e.start,!0),!i.bounds}interpolate(t){var{x:e,y:i,radius:a}=this,t=t.angle;return{x:e+Math.cos(t)*a,y:i+Math.sin(t)*a,angle:t}}}function _r(o){var t,e,{chart:i,fill:a,line:s}=o;if(p(a))return t=a,(e=(i=i).getDatasetMeta(t))&&i.isDatasetVisible(t)?e.dataset:null;if("stack"!==a)return"shape"===a||((i=function(o){if((o.scale||{}).getPointPositionForValue){var l=o;let{scale:e,fill:t}=l,i=e.options,a=e.getLabels().length,s=i.reverse?e.max:e.min,r=(l=t,h=e,"start"===l?s:"end"===l?h.options.reverse?h.min:h.max:A(l)?l.value:h.getBaseValue()),n=[];if(i.grid.circular){let t=e.getPointPositionForValue(0,s);return new vr({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(r)})}for(let t=0;t<a;++t)n.push(e.getPointPositionForValue(t,r));return n}var t=o,{scale:l={},fill:t}=t,h=function(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:A(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}(t,l);if(p(h)){let t=l.isHorizontal();return{x:t?h:null,y:t?null:h}}return null}(o))instanceof vr?i:mr(i,s));{let{scale:t,index:e,line:i}=o,a=[],s=i.segments,r=i.points,n=function(t,e){var i=[],a=t.getMatchingVisibleMetas("line");for(let t=0;t<a.length;t++){var s=a[t];if(s.index===e)break;s.hidden||i.unshift(s.dataset)}return i}(t,e);n.push(mr({x:null,y:t.bottom},i));for(let t=0;t<s.length;t++){let e=s[t];for(let t=e.start;t<=e.end;t++)xr(a,r[t],n)}return new Ps({points:a,options:{}})}}function yr(t,e,i){var a,s=_r(e),{line:e,scale:r,axis:n}=e,o=e.options,l=o.fill,o=o.backgroundColor,{above:l=o,below:o=o}=l||{};s&&e.points.length&&(Ve(t,i),a=t,{line:s,target:l,above:o,below:i,area:r,scale:n}=e={line:e,target:s,above:l,below:o,area:i,scale:r,axis:n},e=s._loop?"angle":e.axis,a.save(),"x"===e&&i!==o&&(Mr(a,l,r.top),wr(a,{line:s,target:l,color:o,scale:n,property:e}),a.restore(),a.save(),Mr(a,l,r.bottom)),wr(a,{line:s,target:l,color:i,scale:n,property:e}),a.restore(),Be(t))}function Mr(s,r,n){let{segments:t,points:o}=r,l=!0,h=!1;s.beginPath();for(var d of t){let{start:t,end:e}=d,i=o[t],a=o[fr(t,e,o)];l?(s.moveTo(i.x,i.y),l=!1):(s.lineTo(i.x,n),s.lineTo(i.x,i.y)),(h=!!r.pathSegment(s,d,{move:h}))?s.closePath():s.lineTo(a.x,n)}s.lineTo(r.first().x,n),s.closePath(),s.clip()}function wr(o,t){let{line:l,target:h,property:d,color:c,scale:u}=t,e=function(t,e,s){let i=t.segments,r=t.points,n=e.points,o=[];for(let t of i){var{start:a,end:l}=t,l=fr(a,l,r),h=gr(s,r[a],r[l],t.loop);if(e.segments){var d=Ei(e,h);for(let a of d){let e=gr(s,n[a.start],n[a.end],a.loop),i=Li(t,r,e);for(let t of i)o.push({source:t,target:a,start:{[s]:pr(h,e,"start",Math.max)},end:{[s]:pr(h,e,"end",Math.min)}})}}else o.push({source:t,target:h,start:r[a],end:r[l]})}return o}(l,h,d);for(let{source:a,target:s,start:r,end:n}of e){let{style:{backgroundColor:t=c}={}}=a,e=!0!==h;o.save(),o.fillStyle=t,x=b=m=p=f=g=void 0;var g=o,f=u,p=e&&gr(d,r,n),{top:f,bottom:m}=f.chart.chartArea,{property:p,start:b,end:x}=p||{},p=("x"===p&&(g.beginPath(),g.rect(b,f,x-b,m-f),g.clip()),o.beginPath(),!!l.pathSegment(o,a));let i;if(e){p?o.closePath():kr(o,h,n,d);let t=!!h.pathSegment(o,s,{move:p,reverse:!0});(i=p&&t)||kr(o,h,r,d)}o.closePath(),o.fill(i?"evenodd":"nonzero"),o.restore()}}function kr(t,e,i,a){e=e.interpolate(i,a);e&&t.lineTo(e.x,e.y)}var Sr={id:"filler",afterDatasetsUpdate(t,e,i){var a,s,r,n,o,l,h=(t.data.datasets||[]).length,d=[];let c,u,g,f;for(u=0;u<h;++u)g=(c=t.getDatasetMeta(u)).dataset,f=null,g&&g.options&&g instanceof Ps&&(f={visible:t.isDatasetVisible(u),index:u,fill:(a=g,s=u,r=h,l=o=n=void 0,A(l=function(){var t=a.options,e=t.fill;let i=T(e&&e.target,e);return!1!==(i=void 0===i?!!t.backgroundColor:i)&&null!==i&&(!0===i?"origin":i)}())?!isNaN(l.value)&&l:p(o=parseFloat(l))&&Math.floor(o)===o?(n=l[0],o=o,!((o="-"!==n&&"+"!==n?o:s+o)===s||o<0||r<=o)&&o):0<=["origin","start","end","stack","shape"].indexOf(l)&&l),chart:t,axis:c.controller.options.indexAxis,scale:c.vScale,line:g}),c.$filler=f,d.push(f);for(u=0;u<h;++u)(f=d[u])&&!1!==f.fill&&(f.fill=function(t,e,i){let a=t[e].fill;var s,r=[e];if(!i)return a;for(;!1!==a&&-1===r.indexOf(a);){if(!p(a))return a;if(!(s=t[a]))return!1;if(s.visible)return a;r.push(a),a=s.fill}return!1}(d,u,i.propagate))},beforeDraw(i,t,e){var a="beforeDraw"===e.drawTime,s=i.getSortedVisibleDatasetMetas(),r=i.chartArea;for(let e=s.length-1;0<=e;--e){let t=s[e].$filler;t&&(t.line.updateControlPoints(r,t.axis),a)&&t.fill&&yr(i.ctx,t,r)}},beforeDatasetsDraw(i,t,e){if("beforeDatasetsDraw"===e.drawTime){var a=i.getSortedVisibleDatasetMetas();for(let e=a.length-1;0<=e;--e){let t=a[e].$filler;br(t)&&yr(i.ctx,t,i.chartArea)}}},beforeDatasetDraw(t,e,i){e=e.meta.$filler;br(e)&&"beforeDatasetDraw"===i.drawTime&&yr(t.ctx,e,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};let Pr=(t,e)=>{let{boxHeight:i=e,boxWidth:a=e}=t;return t.usePointStyle&&(i=Math.min(i,e),a=t.pointStyleWidth||Math.min(a,e)),{boxWidth:a,boxHeight:i,itemHeight:Math.max(e,i)}};class Dr extends e{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let i=this.options.labels||{},t=c(i.generateLabels,[this.chart],this)||[];i.filter&&(t=t.filter(t=>i.filter(t,this.chart.data))),i.sort&&(t=t.sort((t,e)=>i.sort(t,e,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){var{options:i,ctx:a}=this;if(i.display){var s=i.labels,r=z(s.font),n=r.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=Pr(s,n);let t,e;a.font=r.string,this.isHorizontal()?(t=this.maxWidth,e=this._fitRows(o,n,s,l)+10):(e=this.maxHeight,t=this._fitCols(o,r,s,l)+10),this.width=Math.min(t,i.maxWidth||this.maxWidth),this.height=Math.min(e,i.maxHeight||this.maxHeight)}else this.width=this.height=0}_fitRows(t,i,a,s){let{ctx:r,maxWidth:n,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],h=this.lineWidths=[0],d=s+o,c=t,u=(r.textAlign="left",r.textBaseline="middle",-1),g=-d;return this.legendItems.forEach((t,e)=>{t=a+i/2+r.measureText(t.text).width;(0===e||h[h.length-1]+t+2*o>n)&&(c+=d,h[h.length-(0<e?0:1)]=0,g+=d,u++),l[e]={left:0,top:g,row:u,width:t,height:s},h[h.length-1]+=t+o}),c}_fitCols(t,o,l,h){let{ctx:d,maxHeight:e,options:{labels:{padding:c}}}=this,u=this.legendHitBoxes=[],g=this.columnSizes=[],f=e-t,p=c,m=0,b=0,x=0,v=0;return this.legendItems.forEach((t,e)=>{n=l,i=o,a=d,s=t,r=h;var i,a,s,r,{itemWidth:t,itemHeight:n}={itemWidth:function(t,e,i){let a=s.text;return a&&"string"!=typeof a&&(a=a.reduce((t,e)=>t.length>e.length?t:e)),t+e.size/2+i.measureText(a).width}(n,i,a),itemHeight:function(t){let e=r;return e="string"!=typeof s.text?Cr(s,t):e}(i.lineHeight)};0<e&&b+n+2*c>f&&(p+=m+c,g.push({width:m,height:b}),x+=m+c,v++,m=b=0),u[e]={left:x,top:b,col:v,width:t,height:n},m=Math.max(m,t),b+=n+c}),p+=m,g.push({width:m,height:b}),p}adjustHitBoxes(){if(this.options.display){var i=this._computeTitleHeight(),{legendHitBoxes:a,options:{align:s,labels:{padding:r},rtl:t}}=this,n=Di(t,this.left,this.width);if(this.isHorizontal()){let t=0,e=E(s,this.left+r,this.right-this.lineWidths[t]);for(var o of a)t!==o.row&&(t=o.row,e=E(s,this.left+r,this.right-this.lineWidths[t])),o.top+=this.top+i+r,o.left=n.leftForLtr(n.x(e),o.width),e+=o.width+r}else{let t=0,e=E(s,this.top+i+r,this.bottom-this.columnSizes[t].height);for(var l of a)l.col!==t&&(t=l.col,e=E(s,this.top+i+r,this.bottom-this.columnSizes[t].height)),l.top=e,l.left+=this.left+r,l.left=n.leftForLtr(n.x(l.left),l.width),e+=l.height+r}}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){var t;this.options.display&&(Ve(t=this.ctx,this),this._draw(),Be(t))}_draw(){let{options:h,columnSizes:d,lineWidths:c,ctx:u}=this,{align:g,labels:f}=h,p=R.color,m=Di(h.rtl,this.left,this.width),b=z(f.font),x=f["padding"],v=b.size,_=v/2,y,{boxWidth:M,boxHeight:w,itemHeight:k}=(this.drawTitle(),u.textAlign=m.textAlign("left"),u.textBaseline="middle",u.lineWidth=.5,u.font=b.string,Pr(f,v)),S=this.isHorizontal(),P=this._computeTitleHeight(),D=(y=S?{x:E(g,this.left+x,this.right-c[0]),y:this.top+x+P,line:0}:{x:this.left+x,y:E(g,this.top+P+x,this.bottom-d[0].height),line:0},Ci(this.ctx,h.textDirection),k+x);this.legendItems.forEach((e,a)=>{u.strokeStyle=e.fontColor,u.fillStyle=e.fontColor;var t=u.measureText(e.text).width,i=m.textAlign(e.textAlign||(e.textAlign=f.textAlign)),t=M+_+t;let s=y.x,r=y.y;m.setWidth(this.width),S?0<a&&s+t+x>this.right&&(r=y.y+=D,y.line++,s=y.x=E(g,this.left+x,this.right-c[y.line])):0<a&&r+D>this.bottom&&(s=y.x=s+d[y.line].width+x,y.line++,r=y.y=E(g,this.top+P+x,this.bottom-d[y.line].height));var a=m.x(s),n=r,o=e;if(!(isNaN(M)||M<=0||isNaN(w)||w<0)){u.save();var l=T(o.lineWidth,1);if(u.fillStyle=T(o.fillStyle,p),u.lineCap=T(o.lineCap,"butt"),u.lineDashOffset=T(o.lineDashOffset,0),u.lineJoin=T(o.lineJoin,"miter"),u.lineWidth=l,u.strokeStyle=T(o.strokeStyle,p),u.setLineDash(T(o.lineDash,[])),f.usePointStyle){let t={radius:w*Math.SQRT2/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:l},e=m.xPlus(a,M/2);Fe(u,t,e,n+_,f.pointStyleWidth&&M)}else{let t=n+Math.max((v-w)/2,0),e=m.leftForLtr(a,M),i=wi(o.borderRadius);u.beginPath(),Object.values(i).some(t=>0!==t)?je(u,{x:e,y:t,w:M,h:w,radius:i}):u.rect(e,t,M,w),u.fill(),0!==l&&u.stroke()}u.restore()}if(s=Ct(i,s+M+_,S?s+t:this.right,h.rtl),n=m.x(s),a=r,o=e,He(u,o.text,n,a+k/2,b,{strikethrough:o.hidden,textAlign:m.textAlign(o.textAlign)}),S)y.x+=t+x;else if("string"!=typeof e.text){let t=b.lineHeight;y.y+=Cr(e,t)+x}else y.y+=D}),Oi(this.ctx,h.textDirection)}drawTitle(){let a=this.options,s=a.title,r=z(s.font),n=I(s.padding);if(s.display){var o=Di(a.rtl,this.left,this.width),l=this.ctx,h=s.position,d=r.size/2,d=n.top+d;let e,t=this.left,i=this.width;if(this.isHorizontal())i=Math.max(...this.lineWidths),e=this.top+d,t=E(a.align,t,this.right-i);else{let t=this.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);e=d+E(a.align,this.top,this.bottom-t-a.labels.padding-this._computeTitleHeight())}d=E(h,t,t+i);l.textAlign=o.textAlign(Dt(h)),l.textBaseline="middle",l.strokeStyle=s.color,l.fillStyle=s.color,l.font=r.string,He(l,s.text,d,e,r)}}_computeTitleHeight(){var t=this.options.title,e=z(t.font),i=I(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,a,s;if(d(t,this.left,this.right)&&d(e,this.top,this.bottom))for(s=this.legendHitBoxes,i=0;i<s.length;++i)if(d(t,(a=s[i]).left,a.left+a.width)&&d(e,a.top,a.top+a.height))return this.legendItems[i];return null}handleEvent(t){var e,i,a,s=this.options;("mousemove"!==(e=t.type)&&"mouseout"!==e||!s.onHover&&!s.onLeave)&&(!s.onClick||"click"!==e&&"mouseup"!==e)||(e=this._getLegendItemAt(t.x,t.y),"mousemove"===t.type||"mouseout"===t.type?(a=null!==(i=this._hoveredItem)&&null!==e&&i.datasetIndex===e.datasetIndex&&i.index===e.index,i&&!a&&c(s.onLeave,[t,i,this],this),(this._hoveredItem=e)&&!a&&c(s.onHover,[t,e,this],this)):e&&c(s.onClick,[t,e,this],this))}}function Cr(t,e){return e*(t.text?t.text.length:0)}var Or={id:"legend",_element:Dr,start(t,e,i){var a=t.legend=new Dr({ctx:t.ctx,options:i,chart:t});s.configure(t,a,i),s.addBox(t,a)},stop(t){s.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){var a=t.legend;s.configure(t,a,i),a.options=i},afterUpdate(t){t=t.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){var a=e.datasetIndex,i=i.chart;i.isDatasetVisible(a)?(i.hide(a),e.hidden=!0):(i.show(a),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){let a=t.data.datasets,{usePointStyle:s,pointStyle:r,textAlign:n,color:o,useBorderRadius:l,borderRadius:h}=t.legend.options["labels"];return t._getSortedDatasetMetas().map(t=>{var e=t.controller.getStyle(s?0:void 0),i=I(e.borderWidth);return{text:a[t.index].label,fillStyle:e.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:(i.width+i.height)/4,strokeStyle:e.borderColor,pointStyle:r||e.pointStyle,rotation:e.rotation,textAlign:n||e.textAlign,borderRadius:l&&(h||e.borderRadius),datasetIndex:t.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Ar extends e{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){var i=this.options;this.left=0,this.top=0,i.display?(this.width=this.right=t,this.height=this.bottom=e,t=O(i.text)?i.text.length:1,this._padding=I(i.padding),e=t*z(i.font).lineHeight+this._padding.height,this.isHorizontal()?this.height=e:this.width=e):this.width=this.height=this.right=this.bottom=0}isHorizontal(){var t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){var{top:e,left:i,bottom:a,right:s,options:r}=this,n=r.align;let o,l,h,d=0;return o=this.isHorizontal()?(l=E(n,i,s),h=e+t,s-i):(d="left"===r.position?(l=i+t,h=E(n,a,e),-.5*S):(l=s-t,h=E(n,e,a),.5*S),a-e),{titleX:l,titleY:h,maxWidth:o,rotation:d}}draw(){var t,e,i,a,s,r=this.ctx,n=this.options;n.display&&(e=(t=z(n.font)).lineHeight/2+this._padding.top,{titleX:e,titleY:i,maxWidth:a,rotation:s}=this._drawArgs(e),He(r,n.text,0,0,t,{color:n.color,maxWidth:a,rotation:s,textAlign:Dt(n.align),textBaseline:"middle",translation:[e,i]}))}}var Tr={id:"title",_element:Ar,start(t,e,i){var a;t=t,i=i,a=new Ar({ctx:t.ctx,options:i,chart:t}),s.configure(t,a,i),s.addBox(t,a),t.titleBlock=a},stop(t){var e=t.titleBlock;s.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){var a=t.titleBlock;s.configure(t,a,i),a.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};let Lr=new WeakMap;var Er={id:"subtitle",start(t,e,i){var a=new Ar({ctx:t.ctx,options:i,chart:t});s.configure(t,a,i),s.addBox(t,a),Lr.set(t,a)},stop(t){s.removeBox(t,Lr.get(t)),Lr.delete(t)},beforeUpdate(t,e,i){var a=Lr.get(t);s.configure(t,a,i),a.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};let Rr={average(t){if(!t.length)return!1;let i,e,a=0,s=0,r=0;for(i=0,e=t.length;i<e;++i){let e=t[i].element;if(e&&e.hasValue()){let t=e.tooltipPosition();a+=t.x,s+=t.y,++r}}return{x:a/r,y:s/r}},nearest(t,i){if(!t.length)return!1;let a,e,s,r=i.x,n=i.y,o=Number.POSITIVE_INFINITY;for(a=0,e=t.length;a<e;++a){let e=t[a].element;if(e&&e.hasValue()){let t=gt(i,e.getCenterPoint());t<o&&(o=t,s=e)}}if(s){let t=s.tooltipPosition();r=t.x,n=t.y}return{x:r,y:n}}};function b(t,e){return e&&(O(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ir(t){return("string"==typeof t||t instanceof String)&&-1<t.indexOf("\n")?t.split("\n"):t}function zr(t,e){function i(t){b=Math.max(b,a.measureText(t).width+v)}let a=t.chart.ctx,{body:s,footer:r,title:n}=t,{boxWidth:o,boxHeight:l}=e,h=z(e.bodyFont),d=z(e.titleFont),c=z(e.footerFont),u=n.length,g=r.length,f=s.length,p=I(e.padding),m=p.height,b=0,x=s.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0),v=(x+=t.beforeBody.length+t.afterBody.length,u&&(m+=u*d.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),x&&(m+=f*(e.displayColors?Math.max(l,h.lineHeight):h.lineHeight)+(x-f)*h.lineHeight+(x-1)*e.bodySpacing),g&&(m+=e.footerMarginTop+g*c.lineHeight+(g-1)*e.footerSpacing),0);return a.save(),a.font=d.string,k(t.title,i),a.font=h.string,k(t.beforeBody.concat(t.afterBody),i),v=e.displayColors?o+2+e.boxPadding:0,k(s,t=>{k(t.before,i),k(t.lines,i),k(t.after,i)}),v=0,a.font=c.string,k(t.footer,i),a.restore(),{width:b+=p.width,height:m}}function Fr(i,t,a){var e=a.yAlign||t.yAlign||function(){var{y:t,height:e}=a;return t<e/2?"top":t>i.height-e/2?"bottom":"center"}();return{xAlign:a.xAlign||t.xAlign||function(s,r,n,t){var{x:e,width:i}=n,{width:a,chartArea:{left:o,right:l}}=s;let h="center";return"center"===t?h=e<=(o+l)/2?"left":"right":e<=i/2?h="left":a-i/2<=e&&(h="right"),h=function(t){var{x:e,width:i}=n,a=r.caretSize+r.caretPadding;return"left"===t&&e+i+a>s.width||"right"===t&&e-i-a<0}(h)?"center":h}(i,t,a,e),yAlign:e}}function Vr(t,i,e,a){var{caretSize:t,caretPadding:s,cornerRadius:r}=t,{xAlign:n,yAlign:o}=e,l=t+s,{topLeft:e,topRight:s,bottomLeft:r,bottomRight:h}=wi(r);let d=function(){let{x:t,width:e}=i;return"right"===n?t-=e:"center"===n&&(t-=e/2),t}();var c=function(){let{y:t,height:e}=i;return"top"===o?t+=l:t-="bottom"===o?e+l:e/2,t}();return"center"===o?"left"===n?d+=l:"right"===n&&(d-=l):"left"===n?d-=Math.max(e,r)+t:"right"===n&&(d+=Math.max(s,h)+t),{x:C(d,0,a.width-i.width),y:C(c,0,a.height-i.height)}}function Br(t,e,i){i=I(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-i.right:t.x+i.left}function Wr(t){return b([],Ir(t))}function Nr(t,e){e=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return e?t.override(e):t}let Hr={beforeTitle:t,title(t){if(0<t.length){var t=t[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(0<i&&t.dataIndex<i)return e[t.dataIndex]}return""},afterTitle:t,beforeBody:t,beforeLabel:t,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");t=t.formattedValue;return P(t)||(e+=t),e},labelColor(t){t=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){t=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:t,afterBody:t,beforeFooter:t,footer:t,afterFooter:t};function w(t,e,i,a){t=t[e].call(i,a);return void 0===t?Hr[e].call(i,a):t}class jr extends e{static positioners=Rr;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){var t,e=this._cachedAnimations;return e||(e=this.chart,e=(t=this.options.setContext(this.getContext())).enabled&&e.options.animation&&t.animations,t=new va(this.chart,e),e._cacheable&&(this._cachedAnimations=Object.freeze(t)),t)}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),Pi(t,{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"})));var t}getTitle(t,e){var e=e["callbacks"],i=w(e,"beforeTitle",this,t),a=w(e,"title",this,t),e=w(e,"afterTitle",this,t),t=b([],Ir(i));return t=b(t,Ir(a)),b(t,Ir(e))}getBeforeBody(t,e){return Wr(w(e.callbacks,"beforeBody",this,t))}getBody(t,e){let a=e["callbacks"],s=[];return k(t,t=>{var e={before:[],lines:[],after:[]},i=Nr(a,t);b(e.before,Ir(w(i,"beforeLabel",this,t))),b(e.lines,w(i,"label",this,t)),b(e.after,Ir(w(i,"afterLabel",this,t))),s.push(e)}),s}getAfterBody(t,e){return Wr(w(e.callbacks,"afterBody",this,t))}getFooter(t,e){var e=e["callbacks"],i=w(e,"beforeFooter",this,t),a=w(e,"footer",this,t),e=w(e,"afterFooter",this,t),t=b([],Ir(i));return t=b(t,Ir(a)),b(t,Ir(e))}_createItems(a){let t=this._active,s=this.chart.data,i=[],r=[],n=[],e,o,l=[];for(e=0,o=t.length;e<o;++e)l.push(function(t,e){var{element:e,datasetIndex:i,index:a}=e,s=t.getDatasetMeta(i).controller,{label:r,value:n}=s.getLabelAndValue(a);return{chart:t,label:r,parsed:s.getParsed(a),raw:t.data.datasets[i].data[a],formattedValue:n,dataset:s.getDataset(),dataIndex:a,datasetIndex:i,element:e}}(this.chart,t[e]));return a.filter&&(l=l.filter((t,e,i)=>a.filter(t,e,i,s))),k(l=a.itemSort?l.sort((t,e)=>a.itemSort(t,e,s)):l,t=>{var e=Nr(a.callbacks,t);i.push(w(e,"labelColor",this,t)),r.push(w(e,"labelPointStyle",this,t)),n.push(w(e,"labelTextColor",this,t))}),this.labelColors=i,this.labelPointStyles=r,this.labelTextColors=n,this.dataPoints=l}update(t,e){var r=this.options.setContext(this.getContext()),n=this._active;let o,l=[];if(n.length){let t=Rr[r.position].call(this,n,this._eventPosition),e=(l=this._createItems(r),this.title=this.getTitle(l,r),this.beforeBody=this.getBeforeBody(l,r),this.body=this.getBody(l,r),this.afterBody=this.getAfterBody(l,r),this.footer=this.getFooter(l,r),this._size=zr(this,r)),i=Object.assign({},t,e),a=Fr(this.chart,r,i),s=Vr(r,i,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,o={opacity:1,x:s.x,y:s.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(o={opacity:0});this._tooltipItems=l,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,a){t=this.getCaretPosition(t,i,a);e.lineTo(t.x1,t.y1),e.lineTo(t.x2,t.y2),e.lineTo(t.x3,t.y3)}getCaretPosition(t,e,i){var{xAlign:a,yAlign:s}=this,{caretSize:i,cornerRadius:r}=i,{topLeft:r,topRight:n,bottomLeft:o,bottomRight:l}=wi(r),{x:t,y:h}=t,{width:e,height:d}=e;let c,u,g,f,p,m;return"center"===s?(p=h+d/2,m="left"===a?(c=t,u=c-i,f=p+i,p-i):(c=t+e,u=c+i,f=p-i,p+i),g=c):(u="left"===a?t+Math.max(r,o)+i:"right"===a?t+e-Math.max(n,l)-i:this.caretX,g="top"===s?(f=h,p=f-i,c=u-i,u+i):(f=h+d,p=f+i,c=u+i,u-i),m=f),{x1:c,x2:u,x3:g,y1:f,y2:p,y3:m}}drawTitle(t,e,i){var a=this.title,s=a.length;let r,n,o;if(s){var l=Di(i.rtl,this.x,this.width);for(t.x=Br(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",r=z(i.titleFont),n=i.titleSpacing,e.fillStyle=i.titleColor,e.font=r.string,o=0;o<s;++o)e.fillText(a[o],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+n,o+1===s&&(t.y+=i.titleMarginBottom-n)}}_drawColorBox(a,t,e,s,r){let n=this.labelColors[e],o=this.labelPointStyles[e],{boxHeight:l,boxWidth:h}=r,i=z(r.bodyFont),d=Br(this,"left",r),c=s.x(d),u=l<i.lineHeight?(i.lineHeight-l)/2:0,g=t.y+u;if(r.usePointStyle){let t={radius:Math.min(h,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},e=s.leftForLtr(c,h)+h/2,i=g+l/2;a.strokeStyle=r.multiKeyBackground,a.fillStyle=r.multiKeyBackground,ze(a,t,e,i),a.strokeStyle=n.borderColor,a.fillStyle=n.backgroundColor,ze(a,t,e,i)}else{a.lineWidth=A(n.borderWidth)?Math.max(...Object.values(n.borderWidth)):n.borderWidth||1,a.strokeStyle=n.borderColor,a.setLineDash(n.borderDash||[]),a.lineDashOffset=n.borderDashOffset||0;let t=s.leftForLtr(c,h),e=s.leftForLtr(s.xPlus(c,1),h-2),i=wi(n.borderRadius);Object.values(i).some(t=>0!==t)?(a.beginPath(),a.fillStyle=r.multiKeyBackground,je(a,{x:t,y:g,w:h,h:l,radius:i}),a.fill(),a.stroke(),a.fillStyle=n.backgroundColor,a.beginPath(),je(a,{x:e,y:g+1,w:h-2,h:l-2,radius:i}),a.fill()):(a.fillStyle=r.multiKeyBackground,a.fillRect(t,g,h,l),a.strokeRect(t,g,h,l),a.fillStyle=n.backgroundColor,a.fillRect(e,g+1,h-2,l-2))}a.fillStyle=this.labelTextColors[e]}drawBody(e,i,t){function a(t){i.fillText(t,f.x(e.x+g),e.y+u/2),e.y+=u+r}let s=this["body"],{bodySpacing:r,bodyAlign:n,displayColors:o,boxHeight:l,boxWidth:h,boxPadding:d}=t,c=z(t.bodyFont),u=c.lineHeight,g=0,f=Di(t.rtl,this.x,this.width),p=f.textAlign(n),m,b,x,v,_,y,M;for(i.textAlign=n,i.textBaseline="middle",i.font=c.string,e.x=Br(this,p,t),i.fillStyle=t.bodyColor,k(this.beforeBody,a),g=o&&"right"!==p?"center"===n?h/2+d:h+2+d:0,v=0,y=s.length;v<y;++v){for(m=s[v],b=this.labelTextColors[v],i.fillStyle=b,k(m.before,a),x=m.lines,o&&x.length&&(this._drawColorBox(i,e,v,f,t),u=Math.max(c.lineHeight,l)),_=0,M=x.length;_<M;++_)a(x[_]),u=c.lineHeight;k(m.after,a)}g=0,u=c.lineHeight,k(this.afterBody,a),e.y-=r}drawFooter(t,e,i){var a=this.footer,s=a.length;let r,n;if(s){var o=Di(i.rtl,this.x,this.width);for(t.x=Br(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=o.textAlign(i.footerAlign),e.textBaseline="middle",r=z(i.footerFont),e.fillStyle=i.footerColor,e.font=r.string,n=0;n<s;++n)e.fillText(a[n],o.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+i.footerSpacing}}drawBackground(t,e,i,a){var{xAlign:s,yAlign:r}=this,{x:n,y:o}=t,{width:l,height:h}=i,{topLeft:d,topRight:c,bottomLeft:u,bottomRight:g}=wi(a.cornerRadius);e.fillStyle=a.backgroundColor,e.strokeStyle=a.borderColor,e.lineWidth=a.borderWidth,e.beginPath(),e.moveTo(n+d,o),"top"===r&&this.drawCaret(t,e,i,a),e.lineTo(n+l-c,o),e.quadraticCurveTo(n+l,o,n+l,o+c),"center"===r&&"right"===s&&this.drawCaret(t,e,i,a),e.lineTo(n+l,o+h-g),e.quadraticCurveTo(n+l,o+h,n+l-g,o+h),"bottom"===r&&this.drawCaret(t,e,i,a),e.lineTo(n+u,o+h),e.quadraticCurveTo(n,o+h,n,o+h-u),"center"===r&&"left"===s&&this.drawCaret(t,e,i,a),e.lineTo(n,o+d),e.quadraticCurveTo(n,o,n+d,o),e.closePath(),e.fill(),0<a.borderWidth&&e.stroke()}_updateAnimationTarget(e){let i=this.chart,t=this.$animations,a=t&&t.x,s=t&&t.y;if(a||s){let t=Rr[e.position].call(this,this._active,this._eventPosition);var r,n;t&&(r=this._size=zr(this,e),n=Vr(e,n=Object.assign({},t,this._size),e=Fr(i,e,n),i),a._to===n.x&&s._to===n.y||(this.xAlign=e.xAlign,this.yAlign=e.yAlign,this.width=r.width,this.height=r.height,this.caretX=t.x,this.caretY=t.y,this._resolveAnimations().update(this,n)))}}_willRender(){return!!this.opacity}draw(t){var e,i,a,s,r=this.options.setContext(this.getContext()),n=this.opacity;n&&(this._updateAnimationTarget(r),e={width:this.width,height:this.height},i={x:this.x,y:this.y},n=Math.abs(n)<.001?0:n,a=I(r.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length,r.enabled)&&s&&(t.save(),t.globalAlpha=n,this.drawBackground(i,t,e,r),Ci(t,r.textDirection),i.y+=a.top,this.drawTitle(i,t,r),this.drawBody(i,t,r),this.drawFooter(i,t,r),Oi(t,r.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){var i=this._active,t=t.map(({datasetIndex:t,index:e})=>{var i=this.chart.getDatasetMeta(t);if(i)return{datasetIndex:t,element:i.data[e],index:e};throw new Error("Cannot find a dataset at index "+t)}),i=!W(i,t),a=this._positionChanged(t,e);(i||a)&&(this._active=t,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;var a=this.options,s=this._active||[],i=this._getActiveElements(t,s,e,i),r=this._positionChanged(i,t),s=e||!W(i,s)||r;return s&&(this._active=i,a.enabled||a.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e)),s}_getActiveElements(t,e,i,a){var s=this.options;return"mouseout"===t.type?[]:a?(a=this.chart.getElementsAtEventForMode(t,s.mode,s,i),s.reverse&&a.reverse(),a):e}_positionChanged(t,e){var{caretX:i,caretY:a,options:s}=this,s=Rr[s.position].call(this,t,e);return!1!==s&&(i!==s.x||a!==s.y)}}var Yr={id:"tooltip",_element:jr,positioners:Rr,afterInit(t,e,i){i&&(t.tooltip=new jr({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){var e,i=t.tooltip;i&&i._willRender()&&!(e={tooltip:i})!==t.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})&&(i.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",e))},afterEvent(t,e){var i;t.tooltip&&(i=e.replay,t.tooltip.handleEvent(e.event,i,e.inChartArea))&&(e.changed=!0)},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Hr},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};return i.register(Oe,ir,Es,a),i.helpers={...Fi},i._adapters=hs,i.Animation=xa,i.Animations=va,i.animator=r,i.controllers=M.controllers.items,i.DatasetController=Aa,i.Element=e,i.elements=Es,i.Interaction=Hi,i.layouts=s,i.platforms=pa,i.Scale=Fa,i.Ticks=ge,Object.assign(i,Oe,ir,Es,a,pa),i.Chart=i,"undefined"!=typeof window&&(window.Chart=i),i})
\ No newline at end of file
1
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Chart=e()}(this,function(){"use strict";var s=Object.freeze({__proto__:null,get Colors(){return cn},get Decimation(){return gn},get Filler(){return Pn},get Legend(){return An},get SubTitle(){return Rn},get Title(){return Ln},get Tooltip(){return $n}});function t(){}const F=(()=>{let t=0;return()=>t++})();function P(t){return null==t}function O(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function A(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function p(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function g(t,e){return p(t)?t:e}function T(t,e){return void 0===t?e:t}const V=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:+t/e,B=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function d(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function k(t,e,i,s){let a,n,o;if(O(t))if(n=t.length,s)for(a=n-1;0<=a;a--)e.call(i,t[a],a);else for(a=0;a<n;a++)e.call(i,t[a],a);else if(A(t))for(o=Object.keys(t),n=o.length,a=0;a<n;a++)e.call(i,t[o[a]],o[a])}function W(t,e){let i,s,a,n;if(!t||!e||t.length!==e.length)return!1;for(i=0,s=t.length;i<s;++i)if(a=t[i],n=e[i],a.datasetIndex!==n.datasetIndex||a.index!==n.index)return!1;return!0}function N(e){if(O(e))return e.map(N);if(A(e)){const i=Object.create(null),s=Object.keys(e),a=s.length;let t=0;for(;t<a;++t)i[s[t]]=N(e[s[t]]);return i}return e}function H(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function j(t,e,i,s){var a;H(t)&&(a=e[t],i=i[t],A(a)&&A(i)?Y(a,i,s):e[t]=N(i))}function Y(i,t,s){var a,e=O(t)?t:[t],n=e.length;if(!A(i))return i;const o=(s=s||{}).merger||j;for(let t=0;t<n;++t)if(A(a=e[t])){const O=Object.keys(a);for(let t=0,e=O.length;t<e;++t)o(O[t],i,a,s)}return i}function $(t,e){return Y(t,e,{merger:U})}function U(t,e,i){var s;H(t)&&(s=e[t],i=i[t],A(s)&&A(i)?$(s,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=N(i)))}const X={"":t=>t,x:t=>t.x,y:t=>t.y};function q(t){const e=t.split("."),i=[];let s="";for(const t of e)s+=t,s=s.endsWith("\\")?s.slice(0,-1)+".":(i.push(s),"");return i}function m(t,e){const i=X[e]||(X[e]=function(){const i=q(e);return t=>{for(const e of i){if(""===e)break;t=t&&t[e]}return t}}());return i(t)}function K(t){return t.charAt(0).toUpperCase()+t.slice(1)}const G=t=>void 0!==t,u=t=>"function"==typeof t,Z=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};function J(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}const S=Math.PI,_=2*S,Q=_+S,tt=Number.POSITIVE_INFINITY,et=S/180,D=S/2,it=S/4,st=2*S/3,r=Math.log10,y=Math.sign;function at(t,e,i){return Math.abs(t-e)<i}function nt(t){var e=Math.round(t),e=(t=at(t,e,t/1e3)?e:t,Math.pow(10,Math.floor(r(t)))),t=t/e;return(t<=1?1:t<=2?2:t<=5?5:10)*e}function ot(t){const e=[],i=Math.sqrt(t);let s;for(s=1;s<i;s++)t%s==0&&(e.push(s),e.push(t/s));return i===(0|i)&&e.push(i),e.sort((t,e)=>t-e).pop(),e}function rt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function lt(t,e){var i=Math.round(t);return i-e<=t&&t<=i+e}function ht(t,e,i){let s,a,n;for(s=0,a=t.length;s<a;s++)n=t[s][i],isNaN(n)||(e.min=Math.min(e.min,n),e.max=Math.max(e.max,n))}function L(t){return t*(S/180)}function ct(t){return t*(180/S)}function dt(i){if(p(i)){let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}}function ut(t,e){var i=e.x-t.x,e=e.y-t.y,t=Math.sqrt(i*i+e*e);let s=Math.atan2(e,i);return s<-.5*S&&(s+=_),{angle:s,distance:t}}function gt(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ft(t,e){return(t-e+Q)%_-S}function v(t){return(t%_+_)%_}function pt(t,e,i,s){var t=v(t),e=v(e),i=v(i),a=v(e-t),n=v(i-t),o=v(t-e),r=v(t-i);return t===e||t===i||s&&e===i||n<a&&o<r}function C(t,e,i){return Math.max(e,Math.min(i,t))}function mt(t){return C(t,-32768,32767)}function c(t,e,i,s=1e-6){return t>=Math.min(e,i)-s&&t<=Math.max(e,i)+s}function bt(e,i,t){t=t||(t=>e[t]<i);let s,a=e.length-1,n=0;for(;1<a-n;)t(s=n+a>>1)?n=s:a=s;return{lo:n,hi:a}}const f=(i,s,a,t)=>bt(i,a,t?t=>{var e=i[t][s];return e<a||e===a&&i[t+1][s]===a}:t=>i[t][s]<a),xt=(e,i,s)=>bt(e,s,t=>e[t][i]>=s);function vt(t,e,i){let s=0,a=t.length;for(;s<a&&t[s]<e;)s++;for(;a>s&&t[a-1]>i;)a--;return 0<s||a<t.length?t.slice(s,a):t}const _t=["push","pop","shift","splice","unshift"];function yt(a,t){a._chartjs?a._chartjs.listeners.push(t):(Object.defineProperty(a,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),_t.forEach(t=>{const i="_onData"+K(t),s=a[t];Object.defineProperty(a,t,{configurable:!0,enumerable:!1,value(...e){var t=s.apply(this,e);return a._chartjs.listeners.forEach(t=>{"function"==typeof t[i]&&t[i](...e)}),t}})}))}function Mt(e,t){var i=e._chartjs;if(i){const s=i.listeners,a=s.indexOf(t);-1!==a&&s.splice(a,1),0<s.length||(_t.forEach(t=>{delete e[t]}),delete e._chartjs)}}function wt(t){var e=new Set(t);return e.size===t.length?t:Array.from(e)}const kt="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function St(e,i){let s,a=!1;return function(...t){s=t,a||(a=!0,kt.call(window,()=>{a=!1,e.apply(i,s)}))}}function Pt(e,i){let s;return function(...t){return i?(clearTimeout(s),s=setTimeout(e,i,t)):e.apply(this,t),i}}const Dt=t=>"start"===t?"left":"end"===t?"right":"center",E=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,Ct=(t,e,i,s)=>t===(s?"left":"right")?i:"center"===t?(e+i)/2:e;function Ot(t,e,i){var s=e.length;let a=0,n=s;if(t._sorted){const{iScale:o,_parsed:r}=t,l=o.axis,{min:h,max:c,minDefined:d,maxDefined:u}=o.getUserBounds();d&&(a=C(Math.min(f(r,l,h).lo,i?s:f(e,l,o.getPixelForValue(h)).lo),0,s-1)),n=u?C(Math.max(f(r,o.axis,c,!0).hi+1,i?0:f(e,l,o.getPixelForValue(c),!0).hi+1),a,s)-a:s-a}return{start:a,count:n}}function At(t){var{xScale:e,yScale:i,_scaleRanges:s}=t,a={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!s)return t._scaleRanges=a,!0;t=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==i.min||s.ymax!==i.max;return Object.assign(s,a),t}var l=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,i,s,t){const a=i.listeners[t],n=i.duration;a.forEach(t=>t({chart:e,initial:i.initial,numSteps:n,currentStep:Math.min(s-i.start,n)}))}_refresh(){this._request||(this._running=!0,this._request=kt.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(o=Date.now()){let r=0;this._charts.forEach((s,a)=>{if(s.running&&s.items.length){const n=s.items;let t,e=n.length-1,i=!1;for(;0<=e;--e)(t=n[e])._active?(t._total>s.duration&&(s.duration=t._total),t.tick(o),i=!0):(n[e]=n[n.length-1],n.pop());i&&(a.draw(),this._notify(a,s,o,"progress")),n.length||(s.running=!1,this._notify(a,s,o,"complete"),s.initial=!1),r+=n.length}}),this._lastDate=o,0===r&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return 0<this._getAnims(t).items.length}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;t=this._charts.get(t);return!!(t&&t.running&&t.items.length)}stop(e){const i=this._charts.get(e);if(i&&i.items.length){const s=i.items;let t=s.length-1;for(;0<=t;--t)s[t].cancel();i.items=[],this._notify(e,i,Date.now(),"complete")}}remove(t){return this._charts.delete(t)}};function Tt(t){return t+.5|0}const Lt=(t,e,i)=>Math.max(Math.min(t,i),e);function Et(t){return Lt(Tt(2.55*t),0,255)}function Rt(t){return Lt(Tt(255*t),0,255)}function o(t){return Lt(Tt(t/2.55)/100,0,1)}function It(t){return Lt(Tt(100*t),0,100)}const n={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},zt=[..."0123456789ABCDEF"],Ft=t=>zt[15&t],Vt=t=>zt[(240&t)>>4]+zt[15&t],Bt=t=>(240&t)>>4==(15&t);const Wt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Nt(i,t,s){const a=t*Math.min(s,1-s),e=(t,e=(t+i/30)%12)=>s-a*Math.max(Math.min(e-3,9-e,1),-1);return[e(0),e(8),e(4)]}function Ht(i,s,a){i=(t,e=(t+i/60)%6)=>a-a*s*Math.max(Math.min(e,4-e,1),0);return[i(5),i(3),i(1)]}function jt(t,e,i){const s=Nt(t,1,.5);let a;for(1<e+i&&(e*=a=1/(e+i),i*=a),a=0;a<3;a++)s[a]*=1-e-i,s[a]+=e;return s}function Yt(t){var e=t.r/255,i=t.g/255,t=t.b/255,s=Math.max(e,i,t),a=Math.min(e,i,t),n=(s+a)/2;let o,r,l;return s!==a&&(l=s-a,r=.5<n?l/(2-s-a):l/(s+a),o=60*(o=(a=i,i=t,(t=e)===s?(a-i)/l+(a<i?6:0):a===s?(i-t)/l+2:(t-a)/l+4))+.5),[0|o,r||0,n]}function $t(t,e,i,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,s)).map(Rt)}function Ut(t,e,i){return $t(Nt,t,e,i)}function Xt(t){return(t%360+360)%360}const qt={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Kt={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let Gt;const Zt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,Jt=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Qt=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function te(e,i,s){if(e){let t=Yt(e);t[i]=Math.max(0,Math.min(t[i]+t[i]*s,0===i?360:1)),t=Ut(t),e.r=t[0],e.g=t[1],e.b=t[2]}}function ee(t,e){return t&&Object.assign(e||{},t)}function ie(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?3<=t.length&&(e={r:t[0],g:t[1],b:t[2],a:255},3<t.length&&(e.a=Rt(t[3]))):(e=ee(t,{r:0,g:0,b:0,a:1})).a=Rt(e.a),e}function se(t){return("r"===t.charAt(0)?function(t){var e=Zt.exec(t);let i,s,a,n=255;if(e){if(e[7]!==i){const t=+e[7];n=e[8]?Et(t):Lt(255*t,0,255)}return i=+e[1],s=+e[3],a=+e[5],i=255&(e[2]?Et(i):Lt(i,0,255)),s=255&(e[4]?Et(s):Lt(s,0,255)),a=255&(e[6]?Et(a):Lt(a,0,255)),{r:i,g:s,b:a,a:n}}}:function(t){var e,i,s,t=Wt.exec(t);let a,n=255;if(t)return void 0!==t[5]&&(n=(t[6]?Et:Rt)(+t[5])),e=Xt(+t[2]),i=+t[3]/100,s=+t[4]/100,{r:(a="hwb"===t[1]?$t(jt,e,i,s):"hsv"===t[1]?$t(Ht,e,i,s):Ut(e,i,s))[0],g:a[1],b:a[2],a:n}})(t)}class ae{constructor(t){if(t instanceof ae)return t;var e,i,s=typeof t;let a;"object"==s?a=ie(t):"string"==s&&(i=(s=t).length,"#"===s[0]&&(4===i||5===i?e={r:255&17*n[s[1]],g:255&17*n[s[2]],b:255&17*n[s[3]],a:5===i?17*n[s[4]]:255}:7!==i&&9!==i||(e={r:n[s[1]]<<4|n[s[2]],g:n[s[3]]<<4|n[s[4]],b:n[s[5]]<<4|n[s[6]],a:9===i?n[s[7]]<<4|n[s[8]]:255})),a=e||(i=t,Gt||((Gt=function(){const t={},e=Object.keys(Kt),i=Object.keys(qt);let s,a,n,o,r;for(s=0;s<e.length;s++){for(o=r=e[s],a=0;a<i.length;a++)n=i[a],r=r.replace(n,qt[n]);n=parseInt(Kt[o],16),t[r]=[n>>16&255,n>>8&255,255&n]}return t}()).transparent=[0,0,0,0]),(i=Gt[i.toLowerCase()])&&{r:i[0],g:i[1],b:i[2],a:4===i.length?i[3]:255})||se(t)),this._rgb=a,this._valid=!!a}get valid(){return this._valid}get rgb(){var t=ee(this._rgb);return t&&(t.a=o(t.a)),t}set rgb(t){this._rgb=ie(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${o(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?(t=this._rgb,e=t,e=Bt(e.r)&&Bt(e.g)&&Bt(e.b)&&Bt(e.a)?Ft:Vt,t?"#"+e(t.r)+e(t.g)+e(t.b)+((t=t.a)<255?e(t):""):void 0):void 0;var t,e}hslString(){if(this._valid){var t,e,i,s=this._rgb;if(s)return i=Yt(s),t=i[0],e=It(i[1]),i=It(i[2]),s.a<255?`hsla(${t}, ${e}%, ${i}%, ${o(s.a)})`:`hsl(${t}, ${e}%, ${i}%)`}}mix(t,e){if(t){const s=this.rgb,a=t.rgb;var t=void 0===e?.5:e,e=2*t-1,i=s.a-a.a,e=(1+(e*i==-1?e:(e+i)/(1+e*i)))/2,i=1-e;s.r=255&e*s.r+i*a.r+.5,s.g=255&e*s.g+i*a.g+.5,s.b=255&e*s.b+i*a.b+.5,s.a=t*s.a+(1-t)*a.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=(i=this._rgb,t=t._rgb,e=e,s=Qt(o(i.r)),a=Qt(o(i.g)),n=Qt(o(i.b)),{r:Rt(Jt(s+e*(Qt(o(t.r))-s))),g:Rt(Jt(a+e*(Qt(o(t.g))-a))),b:Rt(Jt(n+e*(Qt(o(t.b))-n))),a:i.a+e*(t.a-i.a)})),this;var i,s,a,n}clone(){return new ae(this.rgb)}alpha(t){return this._rgb.a=Rt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=Tt(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return te(this._rgb,2,t),this}darken(t){return te(this._rgb,2,-t),this}saturate(t){return te(this._rgb,1,t),this}desaturate(t){return te(this._rgb,1,-t),this}rotate(t){return e=this._rgb,t=t,(i=Yt(e))[0]=Xt(i[0]+t),i=Ut(i),e.r=i[0],e.g=i[1],e.b=i[2],this;var e,i}}function ne(t){return!(!t||"object"!=typeof t)&&("[object CanvasPattern]"===(t=t.toString())||"[object CanvasGradient]"===t)}function oe(t){return ne(t)?t:new ae(t)}function re(t){return ne(t)?t:new ae(t).saturate(.5).darken(.1).hexString()}const le=["x","y","borderWidth","radius","tension"],he=["color","borderColor","backgroundColor"],ce=new Map;function de(t,e,a){return function(t,e){e=a||{};var i=t+JSON.stringify(e);let s=ce.get(i);return s||(s=new Intl.NumberFormat(t,e),ce.set(i,s)),s}(e).format(t)}const ue={values:t=>O(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";var s=this.chart.options.locale;let a,n=t;if(1<i.length){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||1e15<e)&&(a="scientific"),n=function(t){let e=3<i.length?i[2].value-i[1].value:i[1].value-i[0].value;return e=1<=Math.abs(e)&&t!==Math.floor(t)?t-Math.floor(t):e}(t)}var o=r(Math.abs(n)),o=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),o={notation:a,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(o,this.options.ticks.format),de(t,s,o)},logarithmic(t,e,i){if(0===t)return"0";var s=i[e].significand||t/Math.pow(10,Math.floor(r(t)));return[1,2,3,5,10,15].includes(s)||e>.8*i.length?ue.numeric.call(this,t,e,i):""}};var ge={formatters:ue};const fe=Object.create(null),pe=Object.create(null);function me(i,t){if(!t)return i;var s=t.split(".");for(let t=0,e=s.length;t<e;++t){var a=s[t];i=i[a]||(i[a]=Object.create(null))}return i}function be(t,e,i){return"string"==typeof e?Y(me(t,e),i):Y(me(t,""),e)}var R=new class{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>re(e.backgroundColor),this.hoverBorderColor=(t,e)=>re(e.borderColor),this.hoverColor=(t,e)=>re(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return be(this,t,e)}get(t){return me(this,t)}describe(t,e){return be(pe,t,e)}override(t,e){return be(fe,t,e)}route(t,e,i,s){const a=me(this,t),n=me(this,i),o="_"+e;Object.defineProperties(a,{[o]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){var t=this[o],e=n[s];return A(t)?Object.assign({},e,t):T(t,e)},set(t){this[o]=t}}})}apply(t){t.forEach(t=>t(this))}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:he},numbers:{type:"number",properties:le}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:ge.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function xe(){return"undefined"!=typeof window&&"undefined"!=typeof document}function ve(t){let e=t.parentNode;return e=e&&"[object ShadowRoot]"===e.toString()?e.host:e}function _e(t,e,i){let s;return"string"==typeof t?(s=parseInt(t,10),-1!==t.indexOf("%")&&(s=s/100*e.parentNode[i])):s=t,s}const ye=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function Me(t,e){return ye(t).getPropertyValue(e)}const we=["top","right","bottom","left"];function ke(e,i,s){const a={};s=s?"-"+s:"";for(let t=0;t<4;t++){var n=we[t];a[n]=parseFloat(e[i+"-"+n+s])||0}return a.width=a.left+a.right,a.height=a.top+a.bottom,a}function Se(t,e){if("native"in t)return t;var{canvas:i,currentDevicePixelRatio:s}=e,a=ye(i),n="border-box"===a.boxSizing,o=ke(a,"padding"),a=ke(a,"border","width"),{x:t,y:r,box:l}=function(t,e){var i,s=t.touches,s=s&&s.length?s[0]:t,{offsetX:a,offsetY:n}=s;let o,r,l=!1;if(i=n,t=t.target,!(0<a||0<i)||t&&t.shadowRoot){const t=e.getBoundingClientRect();o=s.clientX-t.left,r=s.clientY-t.top,l=!0}else o=a,r=n;return{x:o,y:r,box:l}}(t,i),h=o.left+(l&&a.left),l=o.top+(l&&a.top);let{width:c,height:d}=e;return n&&(c-=o.width+a.width,d-=o.height+a.height),{x:Math.round((t-h)/c*i.width/s),y:Math.round((r-l)/d*i.height/s)}}const Pe=t=>Math.round(10*t)/10;function De(t,e,i,s){var a=ye(t),n=ke(a,"margin"),o=_e(a.maxWidth,t,"clientWidth")||tt,r=_e(a.maxHeight,t,"clientHeight")||tt,t=function(t,e,i){let s,a;if(void 0===e||void 0===i){const n=ve(t);if(n){const t=n.getBoundingClientRect(),o=ye(n),r=ke(o,"border","width"),l=ke(o,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,s=_e(o.maxWidth,n,"clientWidth"),a=_e(o.maxHeight,n,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:s||tt,maxHeight:a||tt}}(t,e,i);let{width:l,height:h}=t;if("content-box"===a.boxSizing){const t=ke(a,"border","width"),e=ke(a,"padding");l-=e.width+t.width,h-=e.height+t.height}return l=Math.max(0,l-n.width),h=Math.max(0,s?l/s:h-n.height),l=Pe(Math.min(l,o,t.maxWidth)),h=Pe(Math.min(h,r,t.maxHeight)),l&&!h&&(h=Pe(l/2)),(void 0!==e||void 0!==i)&&s&&t.height&&h>t.height&&(h=t.height,l=Pe(Math.floor(h*s))),{width:l,height:h}}function Ce(t,e,i){var e=e||1,s=Math.floor(t.height*e),a=Math.floor(t.width*e);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const n=t.canvas;return n.style&&(i||!n.style.height&&!n.style.width)&&(n.style.height=t.height+"px",n.style.width=t.width+"px"),(t.currentDevicePixelRatio!==e||n.height!==s||n.width!==a)&&(t.currentDevicePixelRatio=e,n.height=s,n.width=a,t.ctx.setTransform(e,0,0,e,0,0),!0)}var Oe=function(){let t=!1;try{var e={get passive(){return!(t=!0)}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function Ae(t,e){const i=Me(t,e),s=i&&i.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function Te(t){return!t||P(t.size)||P(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Le(t,e,i,s,a){let n=e[a];return n||(n=e[a]=t.measureText(a).width,i.push(a)),s=n>s?n:s}function Ee(t,e,i,s){let a=(s=s||{}).data=s.data||{},n=s.garbageCollect=s.garbageCollect||[],o=(s.font!==e&&(a=s.data={},n=s.garbageCollect=[],s.font=e),t.save(),t.font=e,0);var r=i.length;let l,h,c,d,u;for(l=0;l<r;l++)if(null==(d=i[l])||O(d)){if(O(d))for(h=0,c=d.length;h<c;h++)null==(u=d[h])||O(u)||(o=Le(t,a,n,o,u))}else o=Le(t,a,n,o,d);t.restore();var g=n.length/2;if(g>i.length){for(l=0;l<g;l++)delete a[n[l]];n.splice(0,g)}return o}function Re(t,e,i){t=t.currentDevicePixelRatio,i=0!==i?Math.max(i/2,.5):0;return Math.round((e-i)*t)/t+i}function Ie(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function ze(t,e,i,s){Fe(t,e,i,s,null)}function Fe(t,e,i,s,a){let n,o,r,l,h,c,d,u;const g=e.pointStyle,f=e.rotation,p=e.radius;let m=(f||0)*et;if(g&&"object"==typeof g&&("[object HTMLImageElement]"===(n=g.toString())||"[object HTMLCanvasElement]"===n))return t.save(),t.translate(i,s),t.rotate(m),t.drawImage(g,-g.width/2,-g.height/2,g.width,g.height),void t.restore();if(!(isNaN(p)||p<=0)){switch(t.beginPath(),g){default:a?t.ellipse(i,s,a/2,p,0,0,_):t.arc(i,s,p,0,_),t.closePath();break;case"triangle":c=a?a/2:p,t.moveTo(i+Math.sin(m)*c,s-Math.cos(m)*p),m+=st,t.lineTo(i+Math.sin(m)*c,s-Math.cos(m)*p),m+=st,t.lineTo(i+Math.sin(m)*c,s-Math.cos(m)*p),t.closePath();break;case"rectRounded":h=.516*p,l=p-h,o=Math.cos(m+it)*l,d=Math.cos(m+it)*(a?a/2-h:l),r=Math.sin(m+it)*l,u=Math.sin(m+it)*(a?a/2-h:l),t.arc(i-d,s-r,h,m-S,m-D),t.arc(i+u,s-o,h,m-D,m),t.arc(i+d,s+r,h,m,m+D),t.arc(i-u,s+o,h,m+D,m+S),t.closePath();break;case"rect":if(!f){l=Math.SQRT1_2*p,c=a?a/2:l,t.rect(i-c,s-l,2*c,2*l);break}m+=it;case"rectRot":d=Math.cos(m)*(a?a/2:p),o=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(a?a/2:p),t.moveTo(i-d,s-r),t.lineTo(i+u,s-o),t.lineTo(i+d,s+r),t.lineTo(i-u,s+o),t.closePath();break;case"crossRot":m+=it;case"cross":d=Math.cos(m)*(a?a/2:p),o=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(a?a/2:p),t.moveTo(i-d,s-r),t.lineTo(i+d,s+r),t.moveTo(i+u,s-o),t.lineTo(i-u,s+o);break;case"star":d=Math.cos(m)*(a?a/2:p),o=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(a?a/2:p),t.moveTo(i-d,s-r),t.lineTo(i+d,s+r),t.moveTo(i+u,s-o),t.lineTo(i-u,s+o),m+=it,d=Math.cos(m)*(a?a/2:p),o=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(a?a/2:p),t.moveTo(i-d,s-r),t.lineTo(i+d,s+r),t.moveTo(i+u,s-o),t.lineTo(i-u,s+o);break;case"line":o=a?a/2:Math.cos(m)*p,r=Math.sin(m)*p,t.moveTo(i-o,s-r),t.lineTo(i+o,s+r);break;case"dash":t.moveTo(i,s),t.lineTo(i+Math.cos(m)*(a?a/2:p),s+Math.sin(m)*p);break;case!1:t.closePath()}t.fill(),0<e.borderWidth&&t.stroke()}}function M(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function Ve(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Be(t){t.restore()}function We(t,e,i,s,a){if(!e)return t.lineTo(i.x,i.y);if("middle"===a){const s=(e.x+i.x)/2;t.lineTo(s,e.y),t.lineTo(s,i.y)}else"after"===a!=!!s?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Ne(t,e,i,s){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(s?e.cp1x:e.cp2x,s?e.cp1y:e.cp2y,s?i.cp2x:i.cp1x,s?i.cp2y:i.cp1y,i.x,i.y)}function He(t,e,i,s,a,n={}){var o,r,l,h,c,d,u,g,f=O(e)?e:[e],p=0<n.strokeWidth&&""!==n.strokeColor;let m,b;for(t.save(),t.font=a.string,e=t,(g=n).translation&&e.translate(g.translation[0],g.translation[1]),P(g.rotation)||e.rotate(g.rotation),g.color&&(e.fillStyle=g.color),g.textAlign&&(e.textAlign=g.textAlign),g.textBaseline&&(e.textBaseline=g.textBaseline),m=0;m<f.length;++m)b=f[m],n.backdrop&&(c=t,d=n.backdrop,u=void 0,u=c.fillStyle,c.fillStyle=d.color,c.fillRect(d.left,d.top,d.width,d.height),c.fillStyle=u),p&&(n.strokeColor&&(t.strokeStyle=n.strokeColor),P(n.strokeWidth)||(t.lineWidth=n.strokeWidth),t.strokeText(b,i,s,n.maxWidth)),t.fillText(b,i,s,n.maxWidth),d=t,c=i,u=s,o=b,h=l=void 0,((r=n).strikethrough||r.underline)&&(l=c-(o=d.measureText(o)).actualBoundingBoxLeft,c=c+o.actualBoundingBoxRight,h=u-o.actualBoundingBoxAscent,u=u+o.actualBoundingBoxDescent,o=r.strikethrough?(h+u)/2:u,d.strokeStyle=d.fillStyle,d.beginPath(),d.lineWidth=r.decorationWidth||2,d.moveTo(l,o),d.lineTo(c,o),d.stroke()),s+=Number(a.lineHeight);t.restore()}function je(t,e){var{x:e,y:i,w:s,h:a,radius:n}=e;t.arc(e+n.topLeft,i+n.topLeft,n.topLeft,-D,S,!0),t.lineTo(e,i+a-n.bottomLeft),t.arc(e+n.bottomLeft,i+a-n.bottomLeft,n.bottomLeft,S,D,!0),t.lineTo(e+s-n.bottomRight,i+a),t.arc(e+s-n.bottomRight,i+a-n.bottomRight,n.bottomRight,D,0,!0),t.lineTo(e+s,i+n.topRight),t.arc(e+s-n.topRight,i+n.topRight,n.topRight,0,-D,!0),t.lineTo(e+n.topLeft,i)}function Ye(r,l=[""],t,e,a=()=>r[0]){const i=t||r;void 0===e&&(e=ti("_fallback",r));t={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:r,_rootScopes:i,_fallback:e,_getTarget:a,override:t=>Ye([t,...r],l,i,e)};return new Proxy(t,{deleteProperty:(t,e)=>(delete t[e],delete t._keys,delete r[0][e],!0),get:(n,o)=>Ke(n,o,()=>{var t,e=o,i=r,s=n;for(const a of l)if(t=ti(Xe(a,e),i),void 0!==t)return qe(e,t)?Je(i,s,e,t):t}),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(r[0]),has:(t,e)=>ei(t).includes(e),ownKeys:t=>ei(t),set(t,e,i){const s=t._storage||(t._storage=a());return t[e]=s[e]=i,delete t._keys,!0}})}function $e(s,e,i,a){var t={_cacheable:!1,_proxy:s,_context:e,_subProxy:i,_stack:new Set,_descriptors:Ue(s,a),setContext:t=>$e(s,t,i,a),override:t=>$e(s.override(t),e,i,a)};return new Proxy(t,{deleteProperty:(t,e)=>(delete t[e],delete s[e],!0),get:(r,h,c)=>Ke(r,h,()=>{{var l=r,e=h,i=c;const{_proxy:s,_context:a,_subProxy:n,_descriptors:o}=l;let t=s[e];return O(t=u(t)&&o.isScriptable(e)?function(t,e,i){const{_proxy:s,_context:a,_subProxy:n,_stack:o}=l;if(o.has(t))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+t);o.add(t);let r=e(a,n||i);return o.delete(t),r=qe(t,r)?Je(s._scopes,s,t,r):r}(e,t,i):t)&&t.length&&(t=function(t,e,i,s){const{_proxy:a,_context:n,_subProxy:o,_descriptors:r}=i;if(void 0!==n.index&&s(t))return e[n.index%e.length];if(A(e[0])){const i=e,s=a._scopes.filter(t=>t!==i);e=[];for(const A of i){const i=Je(s,a,t,A);e.push($e(i,n,o&&o[t],r))}}return e}(e,t,l,o.isIndexable)),t=qe(e,t)?$e(t,a,n&&n[e],o):t}}),getOwnPropertyDescriptor:(t,e)=>t._descriptors.allKeys?Reflect.has(s,e)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(s,e),getPrototypeOf:()=>Reflect.getPrototypeOf(s),has:(t,e)=>Reflect.has(s,e),ownKeys:()=>Reflect.ownKeys(s),set:(t,e,i)=>(s[e]=i,delete t[e],!0)})}function Ue(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:s=e.indexable,_allKeys:a=e.allKeys}=t;return{allKeys:a,scriptable:i,indexable:s,isScriptable:u(i)?i:()=>i,isIndexable:u(s)?s:()=>s}}const Xe=(t,e)=>t?t+K(e):e,qe=(t,e)=>A(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Ke(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];i=i();return t[e]=i}function Ge(t,e,i){return u(t)?t(e,i):t}function Ze(t,e,i,s,a){for(const r of e){n=i,o=r;const e=!0===n?o:"string"==typeof n?m(o,n):void 0;if(e){t.add(e);o=Ge(e._fallback,i,a);if(void 0!==o&&o!==i&&o!==s)return o}else if(!1===e&&void 0!==s&&i!==s)return null}var n,o;return!1}function Je(t,s,a,n){const e=s._rootScopes,i=Ge(s._fallback,a,n),o=[...t,...e],r=new Set;r.add(n);t=Qe(r,o,a,i||a,n);return null!==t&&(void 0===i||i===a||null!==Qe(r,o,i,t,n))&&Ye(Array.from(r),[""],e,i,()=>{{var t=a,e=n;const i=s._getTarget();return t in i||(i[t]={}),O(t=i[t])&&A(e)?e:t||{}}})}function Qe(t,e,i,s,a){for(;i;)i=Ze(t,e,i,s,a);return i}function ti(t,e){for(const i of e)if(i){const e=i[t];if(void 0!==e)return e}}function ei(t){let e=t._keys;return e=e||(t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes))}function ii(t,e,i,s){const a=t["iScale"],{key:n="r"}=this._parsing,o=new Array(s);let r,l,h,c;for(r=0,l=s;r<l;++r)c=e[h=r+i],o[r]={r:a.parse(m(c,n),h)};return o}const si=Number.EPSILON||1e-14,ai=(t,e)=>e<t.length&&!t[e].skip&&t[e],ni=t=>"x"===t?"y":"x";function oi(t,e,i,s){var t=t.skip?e:t,a=e,e=i.skip?e:i,i=gt(a,t),n=gt(e,a);let o=i/(i+n),r=n/(i+n);o=isNaN(o)?0:o,r=isNaN(r)?0:r;i=s*o,n=s*r;return{previous:{x:a.x-i*(e.x-t.x),y:a.y-i*(e.y-t.y)},next:{x:a.x+n*(e.x-t.x),y:a.y+n*(e.y-t.y)}}}function ri(t,n="x"){const e=ni(n),i=t.length,r=Array(i).fill(0),l=Array(i);let s,a,o,h=ai(t,0);for(s=0;s<i;++s)if(a=o,o=h,h=ai(t,s+1),o){if(h){const t=h[n]-o[n];r[s]=0!=t?(h[e]-o[e])/t:0}l[s]=a?h?y(r[s-1])!==y(r[s])?0:(r[s-1]+r[s])/2:r[s-1]:r[s]}{var c=t,d=r,u=l,g=c.length;let e,i,s,a,n,o=ai(c,0);for(let t=0;t<g-1;++t)n=o,o=ai(c,t+1),n&&o&&(at(d[t],0,si)?u[t]=u[t+1]=0:(e=u[t]/d[t],i=u[t+1]/d[t],(a=Math.pow(e,2)+Math.pow(i,2))<=9||(s=3/Math.sqrt(a),u[t]=e*s*d[t],u[t+1]=i*s*d[t])))}{var[f,p,m="x"]=[t,l,n];const b=ni(m),x=f.length;let e,i,s,a=ai(f,0);for(let t=0;t<x;++t)if(i=s,s=a,a=ai(f,t+1),s){const x=s[m],v=s[b];i&&(e=(x-i[m])/3,s["cp1"+m]=x-e,s["cp1"+b]=v-e*p[t]),a&&(e=(a[m]-x)/3,s["cp2"+m]=x+e,s["cp2"+b]=v+e*p[t])}return}}function li(t,e,i){return Math.max(Math.min(t,i),e)}function hi(o,e,r,i,t){let s,a,n,l;if(e.spanGaps&&(o=o.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)ri(o,t);else{let t=i?o[o.length-1]:o[0];for(s=0,a=o.length;s<a;++s)n=o[s],l=oi(t,n,o[Math.min(s+1,a-(i?0:1))%a],e.tension),n.cp1x=l.previous.x,n.cp1y=l.previous.y,n.cp2x=l.next.x,n.cp2y=l.next.y,t=n}if(e.capBezierPoints){var h=o,c=r;let t,e,i,s,a,n=M(h[0],c);for(t=0,e=h.length;t<e;++t)a=s,s=n,n=t<e-1&&M(h[t+1],c),s&&(i=h[t],a&&(i.cp1x=li(i.cp1x,c.left,c.right),i.cp1y=li(i.cp1y,c.top,c.bottom)),n&&(i.cp2x=li(i.cp2x,c.left,c.right),i.cp2y=li(i.cp2y,c.top,c.bottom)))}}const ci=t=>0===t||1===t,di=(t,e,i)=>-Math.pow(2,10*--t)*Math.sin((t-e)*_/i),ui=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*_/i)+1,gi={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>--t*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-(--t*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>--t*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*D),easeOutSine:t=>Math.sin(t*D),easeInOutSine:t=>-.5*(Math.cos(S*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ci(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>1<=t?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1- --t*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ci(t)?t:di(t,.075,.3),easeOutElastic:t=>ci(t)?t:ui(t,.075,.3),easeInOutElastic(t){return ci(t)?t:t<.5?.5*di(2*t,.1125,.45):.5+.5*ui(2*t-1,.1125,.45)},easeInBack(t){return t*t*(2.70158*t-1.70158)},easeOutBack(t){return--t*t*(2.70158*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-gi.easeOutBounce(1-t),easeOutBounce(t){var e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*gi.easeInBounce(2*t):.5*gi.easeOutBounce(2*t-1)+.5};function fi(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function pi(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:("middle"===s?i<.5?t:e:"after"===s?i<1?t:e:0<i?e:t).y}}function mi(t,e,i,s){var a={x:t.cp2x,y:t.cp2y},n={x:e.cp1x,y:e.cp1y},t=fi(t,a,i),a=fi(a,n,i),n=fi(n,e,i),e=fi(t,a,i),t=fi(a,n,i);return fi(e,t,i)}const bi=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,xi=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function vi(t,e){var i=(""+t).match(bi);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}const _i=t=>+t||0;function yi(e,i){const t={},s=A(i),a=s?Object.keys(i):i,n=A(e)?s?t=>T(e[t],e[i[t]]):t=>e[t]:()=>e;for(const e of a)t[e]=_i(n(e));return t}function Mi(t){return yi(t,{top:"y",right:"x",bottom:"y",left:"x"})}function wi(t){return yi(t,["topLeft","topRight","bottomLeft","bottomRight"])}function I(t){const e=Mi(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function z(t,e){e=e||R.font;let i=T((t=t||{}).size,e.size),s=("string"==typeof i&&(i=parseInt(i,10)),T(t.style,e.style));s&&!(""+s).match(xi)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const a={family:T(t.family,e.family),lineHeight:vi(T(t.lineHeight,e.lineHeight),i),size:i,style:s,weight:T(t.weight,e.weight),string:""};return a.string=Te(a),a}function ki(t,e,i,s){let a,n,o,r=!0;for(a=0,n=t.length;a<n;++a)if(void 0!==(o=t[a])&&(void 0!==e&&"function"==typeof o&&(o=o(e),r=!1),void 0!==i&&O(o)&&(o=o[i%o.length],r=!1),void 0!==o))return s&&!r&&(s.cacheable=!1),o}function Si(t,e,i){var{min:t,max:s}=t,e=B(e,(s-t)/2),a=(t,e)=>i&&0===t?0:t+e;return{min:a(t,-Math.abs(e)),max:a(s,e)}}function Pi(t,e){return Object.assign(Object.create(t),e)}function Di(t,e,i){return t?(s=e,a=i,{x:t=>s+s+a-t,setWidth(t){a=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t};var s,a}function Ci(t,e){let i,s;"ltr"!==e&&"rtl"!==e||(s=[(i=t.canvas.style).getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=s)}function Oi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Ai(t){return"angle"===t?{between:pt,compare:ft,normalize:v}:{between:c,compare:(t,e)=>t-e,normalize:t=>t}}function Ti({start:t,end:e,count:i,loop:s,style:a}){return{start:t%i,end:e%i,loop:s&&(e-t+1)%i==0,style:a}}function Li(t,i,g){if(!g)return[t];const{property:s,start:a,end:n}=g,o=i.length,{compare:r,between:l,normalize:h}=Ai(s),{start:c,end:d,loop:u,style:f}=function(t,e){const{property:i,start:s,end:a}=g,{between:n,normalize:o}=Ai(i),r=e.length;let l,h,{start:c,end:d,loop:u}=t;if(u){for(c+=r,d+=r,l=0,h=r;l<h&&n(o(e[c%r][i]),s,a);++l)c--,d--;c%=r,d%=r}return d<c&&(d+=r),{start:c,end:d,loop:u,style:t.style}}(t,i),p=[];let m,b,x,v,_=null;for(let t=c,e=c;t<=d;++t)(b=i[t%o]).skip||(m=h(b[s]))!==x&&(v=l(m,a,n),null===(_=null===_&&(v||l(a,x,m)&&0!==r(a,x))?0===r(m,a)?t:e:_)||v&&0!==r(n,m)&&!l(n,x,m)||(p.push(Ti({start:_,end:t,loop:u,count:o,style:f})),_=null),e=t,x=m);return null!==_&&p.push(Ti({start:_,end:d,loop:u,count:o,style:f})),p}function Ei(e,i){const s=[],a=e.segments;for(let t=0;t<a.length;t++){var n=Li(a[t],e.points,i);n.length&&s.push(...n)}return s}function Ri(t,e){var i=t.points,n=t.options.spanGaps,s=i.length;if(!s)return[];var a=!!t._loop,{start:o,end:r}=function(t,e,i){let s=0,a=e-1;if(i&&!n)for(;s<e&&!t[s].skip;)s++;for(;s<e&&t[s].skip;)s++;for(s%=e,i&&(a+=s);a>s&&t[a%e].skip;)a--;return a%=e,{start:s,end:a}}(i,s,a);return Ii(t,!0===n?[{start:o,end:r,loop:a}]:function(t,e,i,s){const a=t.length,n=[];let o,r=e,l=t[e];for(o=e+1;o<=i;++o){const i=t[o%a];i.skip||i.stop?l.skip||(s=!1,n.push({start:e%a,end:(o-1)%a,loop:s}),e=r=i.stop?o:null):(r=o,l.skip&&(e=o)),l=i}return null!==r&&n.push({start:e%a,end:r%a,loop:s}),n}(i,o,r<o?r+s:r,!!t._fullLoop&&0===o&&r===s-1),i,e)}function Ii(t,e,s,a){if(a&&a.setContext&&s){var r=t,t=e,l=s,h=a;const d=r._chart.getContext(),u=zi(r.options),{_datasetIndex:g,options:{spanGaps:f}}=r,p=l.length,m=[];let n=u,o=t[0].start,i=o;function c(t,e,i,s){var a=f?-1:1;if(t!==e){for(t+=p;l[t%p].skip;)t-=a;for(;l[e%p].skip;)e+=a;t%p!=e%p&&(m.push({start:t%p,end:e%p,loop:i,style:s}),n=s,o=e%p)}}for(const r of t){o=f?o:r.start;let t,e=l[o%p];for(i=o+1;i<=r.end;i++){const f=l[i%p];(function(t,e){if(!e)return;function i(t,e){return ne(e)?(s.includes(e)||s.push(e),s.indexOf(e)):e}const s=[];return JSON.stringify(t,i)!==JSON.stringify(e,i)})(t=zi(h.setContext(Pi(d,{type:"segment",p0:e,p1:f,p0DataIndex:(i-1)%p,p1DataIndex:i%p,datasetIndex:g}))),n)&&c(o,i-1,r.loop,n),e=f,n=t}o<i-1&&c(o,i-1,r.loop,n)}return m}return e}function zi(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}var Fi=Object.freeze({__proto__:null,HALF_PI:D,INFINITY:tt,PI:S,PITAU:Q,QUARTER_PI:it,RAD_PER_DEG:et,TAU:_,TWO_THIRDS_PI:st,_addGrace:Si,_alignPixel:Re,_alignStartEnd:E,_angleBetween:pt,_angleDiff:ft,_arrayUnique:wt,_attachContext:$e,_bezierCurveTo:Ne,_bezierInterpolation:mi,_boundSegment:Li,_boundSegments:Ei,_capitalize:K,_computeSegments:Ri,_createResolver:Ye,_decimalPlaces:dt,_deprecated:function(t,e,i,s){void 0!==e&&console.warn(t+': "'+i+'" is deprecated. Please use "'+s+'" instead')},_descriptors:Ue,_elementsEqual:W,_factorize:ot,_filterBetween:vt,_getParentNode:ve,_getStartAndCountOfVisiblePoints:Ot,_int16Range:mt,_isBetween:c,_isClickEvent:J,_isDomSupported:xe,_isPointInArea:M,_limitValue:C,_longestText:Ee,_lookup:bt,_lookupByKey:f,_measureText:Le,_merger:j,_mergerIf:U,_normalizeAngle:v,_parseObjectDataRadialScale:ii,_pointInLine:fi,_readValueToProps:yi,_rlookupByKey:xt,_scaleRangesChanged:At,_setMinAndMaxByKey:ht,_splitKey:q,_steppedInterpolation:pi,_steppedLineTo:We,_textX:Ct,_toLeftRightCenter:Dt,_updateBezierControlPoints:hi,addRoundedRectPath:je,almostEquals:at,almostWhole:lt,callback:d,clearCanvas:Ie,clipArea:Ve,clone:N,color:oe,createContext:Pi,debounce:Pt,defined:G,distanceBetweenPoints:gt,drawPoint:ze,drawPointLegend:Fe,each:k,easingEffects:gi,finiteOrDefault:g,fontString:function(t,e,i){return e+" "+t+"px "+i},formatNumber:de,getAngleFromPoint:ut,getHoverColor:re,getMaximumSize:De,getRelativePosition:Se,getRtlAdapter:Di,getStyle:Me,isArray:O,isFinite:p,isFunction:u,isNullOrUndef:P,isNumber:rt,isObject:A,isPatternOrGradient:ne,listenArrayEvents:yt,log10:r,merge:Y,mergeIf:$,niceNum:nt,noop:t,overrideTextDirection:Ci,readUsedSize:Ae,renderText:He,requestAnimFrame:kt,resolve:ki,resolveObjectKey:m,restoreTextDirection:Oi,retinaScale:Ce,setsEqual:Z,sign:y,splineCurve:oi,splineCurveMonotone:ri,supportsEventListenerOptions:Oe,throttled:St,toDegrees:ct,toDimension:B,toFont:z,toFontString:Te,toLineHeight:vi,toPadding:I,toPercentage:V,toRadians:L,toTRBL:Mi,toTRBLCorners:wi,uid:F,unclipArea:Be,unlistenArrayEvents:Mt,valueOrDefault:T});function Vi(t,i,s,a,n){var o=t.getSortedVisibleDatasetMetas(),r=s[i];for(let t=0,e=o.length;t<e;++t){const{index:s,data:l}=o[t],{lo:h,hi:c}=function(t,e,i,s){const{controller:a,data:n,_sorted:o}=t,r=a._cachedMeta.iScale;if(r&&e===r.axis&&"r"!==e&&o&&n.length){const t=r._reversePixels?xt:f;if(!s)return t(n,e,i);if(a._sharedOptions){const s=n[0],a="function"==typeof s.getRange&&s.getRange(e);if(a){const s=t(n,e,i-a),o=t(n,e,i+a);return{lo:s.lo,hi:o.hi}}}}return{lo:0,hi:n.length-1}}(o[t],i,r,n);for(let t=h;t<=c;++t){const i=l[t];i.skip||a(i,s,t)}}}function Bi(s,a,t,n,o){const r=[];return(o||s.isPointInArea(a))&&Vi(s,t,a,function(t,e,i){(o||M(t,s.chartArea,0))&&t.inRange(a.x,a.y,n)&&r.push({element:t,datasetIndex:e,index:i})},!0),r}function Wi(t,e,i,s,a,r){{if(r||t.isPointInArea(e)){if("r"!==i||s){var l=t,h=e,c=i,d=s,u=a,g=r;let n=[];const m=function(t){const s=-1!==t.indexOf("x"),a=-1!==t.indexOf("y");return function(t,e){var i=s?Math.abs(t.x-e.x):0,t=a?Math.abs(t.y-e.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(t,2))}}(c);let o=Number.POSITIVE_INFINITY;return Vi(l,c,h,function(t,e,i){var s,a=t.inRange(h.x,h.y,u);d&&!a||(s=t.getCenterPoint(u),(g||l.isPointInArea(s)||a)&&((a=m(h,s))<o?(n=[{element:t,datasetIndex:e,index:i}],o=a):a===o&&n.push({element:t,datasetIndex:e,index:i})))}),n}{var f=e,p=a;let o=[];return Vi(t,i,f,function(t,e,i){var{startAngle:s,endAngle:a}=t.getProps(["startAngle","endAngle"],p),n=ut(t,{x:f.x,y:f.y})["angle"];pt(n,s,a)&&o.push({element:t,datasetIndex:e,index:i})}),o}}return[]}}function Ni(t,s,a,e,n){const o=[],r="x"===a?"inXRange":"inYRange";let l=!1;return Vi(t,a,s,(t,e,i)=>{t[r](s[a],n)&&(o.push({element:t,datasetIndex:e,index:i}),l=l||t.inRange(s.x,s.y,n))}),e&&!l?[]:o}var Hi={evaluateInteractionItems:Vi,modes:{index(t,e,i,s){const a=Se(e,t),n=i.axis||"x",o=i.includeInvisible||!1,r=i.intersect?Bi(t,a,n,s,o):Wi(t,a,n,!1,s,o),l=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{var e=r[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})}),l):[]},dataset(t,e,i,s){var e=Se(e,t),a=i.axis||"xy",n=i.includeInvisible||!1;let o=i.intersect?Bi(t,e,a,s,n):Wi(t,e,a,!1,s,n);if(0<o.length){const e=o[0].datasetIndex,i=t.getDatasetMeta(e).data;o=[];for(let t=0;t<i.length;++t)o.push({element:i[t],datasetIndex:e,index:t})}return o},point:(t,e,i,s)=>Bi(t,Se(e,t),i.axis||"xy",s,i.includeInvisible||!1),nearest(t,e,i,s){var e=Se(e,t),a=i.axis||"xy",n=i.includeInvisible||!1;return Wi(t,e,a,i.intersect,s,n)},x:(t,e,i,s)=>Ni(t,Se(e,t),"x",i.intersect,s),y:(t,e,i,s)=>Ni(t,Se(e,t),"y",i.intersect,s)}};const ji=["left","top","right","bottom"];function Yi(t,e){return t.filter(t=>t.pos===e)}function $i(t,e){return t.filter(t=>-1===ji.indexOf(t.pos)&&t.box.axis===e)}function Ui(t,s){return t.sort((t,e)=>{var i=s?e:t,t=s?t:e;return i.weight===t.weight?i.index-t.index:i.weight-t.weight})}function Xi(t,e,i,s){return Math.max(t[i],e[i])+Math.max(t[s],e[s])}function qi(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Ki(t,e,i,s){const a=[];let n,o,r,l,h,c;for(n=0,o=t.length,h=0;n<o;++n){r=t[n],(l=r.box).update(r.width||e.w,r.height||e.h,function(t,e){const i=e.maxPadding;{const s={left:0,top:0,right:0,bottom:0};return(t=t?["left","right"]:["top","bottom"]).forEach(t=>{s[t]=Math.max(e[t],i[t])}),s}}(r.horizontal,e));const{same:o,other:d}=function(t,e,i,s){const{pos:a,box:n}=i,o=t.maxPadding;if(!A(a)){i.size&&(t[a]-=i.size);const e=s[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?n.height:n.width),i.size=e.size/e.count,t[a]+=i.size}n.getPadding&&qi(o,n.getPadding());var s=Math.max(0,e.outerWidth-Xi(o,t,"left","right")),e=Math.max(0,e.outerHeight-Xi(o,t,"top","bottom")),r=s!==t.w,l=e!==t.h;return t.w=s,t.h=e,i.horizontal?{same:r,other:l}:{same:l,other:r}}(e,i,r,s);h|=o&&a.length,c=c||d,l.fullSize||a.push(r)}return h&&Ki(a,e,i,s)||c}function Gi(t,e,i,s,a){t.top=i,t.left=e,t.right=e+s,t.bottom=i+a,t.width=s,t.height=a}function Zi(t,e,i,s){var a=i.padding;let{x:n,y:o}=e;for(const r of t){const t=r.box,l=s[r.stack]||{count:1,placed:0,weight:1},h=r.stackWeight/l.weight||1;if(r.horizontal){const s=e.w*h,n=l.size||t.height;G(l.start)&&(o=l.start),t.fullSize?Gi(t,a.left,o,i.outerWidth-a.right-a.left,n):Gi(t,e.left+l.placed,o,s,n),l.start=o,l.placed+=s,o=t.bottom}else{const s=e.h*h,o=l.size||t.width;G(l.start)&&(n=l.start),t.fullSize?Gi(t,n,a.top,o,i.outerHeight-a.bottom-a.top):Gi(t,n,e.top+l.placed,o,s),l.start=n,l.placed+=s,n=t.right}}e.x=n,e.y=o}var a={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){e=t.boxes?t.boxes.indexOf(e):-1;-1!==e&&t.boxes.splice(e,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(l,t,e,i){if(l){const o=I(l.options.layout.padding),r=Math.max(t-o.width,0),h=Math.max(e-o.height,0),c=function(){const t=function(t){const e=[];let i,s,a,n,o,r;for(i=0,s=(t||[]).length;i<s;++i)({position:n,options:{stack:o,stackWeight:r=1}}=a=t[i]),e.push({index:i,box:a,pos:n,horizontal:a.isHorizontal(),weight:a.weight,stack:o&&n+o,stackWeight:r});return e}(l.boxes),e=Ui(t.filter(t=>t.box.fullSize),!0),i=Ui(Yi(t,"left"),!0),s=Ui(Yi(t,"right")),a=Ui(Yi(t,"top"),!0),n=Ui(Yi(t,"bottom")),o=$i(t,"x"),r=$i(t,"y");return{fullSize:e,leftAndTop:i.concat(a),rightAndBottom:s.concat(r).concat(n).concat(o),chartArea:Yi(t,"chartArea"),vertical:i.concat(s).concat(r),horizontal:a.concat(n).concat(o)}}(),d=c.vertical,u=c.horizontal;k(l.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});var s=d.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,t=Object.freeze({outerWidth:t,outerHeight:e,padding:o,availableWidth:r,availableHeight:h,vBoxMaxWidth:r/2/s,hBoxMaxHeight:h/2}),e=Object.assign({},o);qi(e,I(i));const g=Object.assign({maxPadding:e,w:r,h:h,x:o.left,y:o.top},o),f=function(t,e){var i=function(t){const e={};for(const i of t){const{stack:t,pos:s,stackWeight:a}=i;if(t&&ji.includes(s)){const n=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});n.count++,n.weight+=a}}return e}(t),{vBoxMaxWidth:s,hBoxMaxHeight:a}=e;let n,o,r;for(n=0,o=t.length;n<o;++n){const o=(r=t[n]).box["fullSize"],l=i[r.stack],h=l&&r.stackWeight/l.weight;r.horizontal?(r.width=h?h*s:o&&e.availableWidth,r.height=a):(r.width=s,r.height=h?h*a:o&&e.availableHeight)}return i}(d.concat(u),t);Ki(c.fullSize,g,t,f),Ki(d,g,t,f),Ki(u,g,t,f)&&Ki(d,g,t,f);{var a=g;const p=a.maxPadding;function n(t){var e=Math.max(p[t]-a[t],0);return a[t]+=e,e}a.y+=n("top"),a.x+=n("left"),n("right"),n("bottom")}Zi(c.leftAndTop,g,t,f),g.x+=g.w,g.y+=g.h,Zi(c.rightAndBottom,g,t,f),l.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},k(c.chartArea,t=>{const e=t.box;Object.assign(e,l.chartArea),e.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})})}}};class Ji{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class Qi extends Ji{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ts="$chartjs",es={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},is=t=>null===t||""===t,ss=!!Oe&&{passive:!0};function as(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function ns(t,e,i){const s=t.canvas,a=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||as(i.addedNodes,s),e=e&&!as(i.removedNodes,s);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}function os(t,e,i){const s=t.canvas,a=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||as(i.removedNodes,s),e=e&&!as(i.addedNodes,s);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}const rs=new Map;let ls=0;function hs(){const i=window.devicePixelRatio;i!==ls&&(ls=i,rs.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function cs(t,e,s){const i=t.canvas,a=i&&ve(i);if(a){const o=St((t,e)=>{var i=a.clientWidth;s(t,e),i<a.clientWidth&&s()},window),r=new ResizeObserver(t=>{var t=t[0],e=t.contentRect.width,t=t.contentRect.height;0===e&&0===t||o(e,t)});return r.observe(a),t=t,n=o,rs.size||window.addEventListener("resize",hs),rs.set(t,n),r;var n}}function ds(t,e,i){i&&i.disconnect(),"resize"===e&&(i=t,rs.delete(i),rs.size||window.removeEventListener("resize",hs))}function us(e,t,i){var s=e.canvas,a=St(t=>{null!==e.ctx&&i(function(t,e){var i=es[t.type]||t.type,{x:s,y:a}=Se(t,e);return{type:i,chart:e,native:t,x:void 0!==s?s:null,y:void 0!==a?a:null}}(t,e))},e);return s.addEventListener(t,a,ss),a}class gs extends Ji{acquireContext(t,e){var i=t&&t.getContext&&t.getContext("2d");{if(i&&i.canvas===t){{var s=e;const a=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t[ts]={initial:{height:n,width:o,style:{display:a.display,height:a.height,width:a.width}}},a.display=a.display||"block",a.boxSizing=a.boxSizing||"border-box",is(o)){const s=Ae(t,"width");void 0!==s&&(t.width=s)}if(is(n))if(""===t.style.height)t.height=t.width/(s||2);else{const s=Ae(t,"height");void 0!==s&&(t.height=s)}}return i}return null}}releaseContext(t){const i=t.canvas;if(!i[ts])return!1;const s=i[ts].initial,e=(["height","width"].forEach(t=>{var e=s[t];P(e)?i.removeAttribute(t):i.setAttribute(t,e)}),s.style||{});return Object.keys(e).forEach(t=>{i.style[t]=e[t]}),i.width=i.width,delete i[ts],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),a={attach:ns,detach:os,resize:cs}[e]||us;s[e]=a(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),s=i[e];s&&(({attach:ds,detach:ds,resize:ds}[e]||function(t,e,i){t.canvas.removeEventListener(e,i,ss)})(t,e,s),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return De(t,e,i,s)}isAttached(t){t=ve(t);return!(!t||!t.isConnected)}}function fs(t){return!xe()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Qi:gs}Oe=Object.freeze({__proto__:null,BasePlatform:Ji,BasicPlatform:Qi,DomPlatform:gs,_detectPlatform:fs});const ps="transparent",ms={boolean:(t,e,i)=>.5<i?e:t,color(t,e,i){const s=oe(t||ps),a=s.valid&&oe(e||ps);return a&&a.valid?a.mix(s,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class bs{constructor(t,e,i,s){var a=e[i],a=(s=ki([t.to,s,a,t.from]),ki([t.from,a,s]));this._active=!0,this._fn=t.fn||ms[t.type||typeof a],this._easing=gi[t.easing]||gi.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=a,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){var s,a,n;this._active&&(this._notify(!1),s=this._target[this._prop],a=i-this._start,n=this._duration-a,this._start=i,this._duration=Math.floor(Math.max(n,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=ki([t.to,e,s,t.from]),this._from=ki([t.from,s,e]))}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){var t=t-this._start,e=this._duration,i=this._prop,s=this._from,a=this._loop,n=this._to;let o;if(this._active=s!==n&&(a||t<e),!this._active)return this._target[i]=n,void this._notify(!0);t<0?this._target[i]=s:(o=t/e%2,o=a&&1<o?2-o:o,o=this._easing(Math.min(1,Math.max(0,o))),this._target[i]=this._fn(s,n,o))}wait(){const i=this._promises||(this._promises=[]);return new Promise((t,e)=>{i.push({res:t,rej:e})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}class xs{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(s){if(A(s)){const a=Object.keys(R.animation),n=this._properties;Object.getOwnPropertyNames(s).forEach(e=>{const t=s[e];if(A(t)){const i={};for(const s of a)i[s]=t[s];(O(t.properties)&&t.properties||[e]).forEach(t=>{t!==e&&n.has(t)||n.set(t,i)})}})}}_animateOptions(t,e){const i=e.options,s=function(e,i){if(i){let t=e.options;if(t)return t.$shared&&(e.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t;e.options=i}}(t,i);if(!s)return[];e=this._createAnimations(s,i);return i.$shared&&function(e,t){const i=[],s=Object.keys(t);for(let t=0;t<s.length;t++){const a=e[s[t]];a&&a.active()&&i.push(a.wait())}return Promise.all(i)}(t.options.$animations,i).then(()=>{t.options=i},()=>{}),e}_createAnimations(e,i){const s=this._properties,a=[],n=e.$animations||(e.$animations={}),t=Object.keys(i),o=Date.now();let r;for(r=t.length-1;0<=r;--r){const c=t[r];if("$"!==c.charAt(0))if("options"===c)a.push(...this._animateOptions(e,i));else{var l=i[c];let t=n[c];var h=s.get(c);if(t){if(h&&t.active()){t.update(h,l,o);continue}t.cancel()}h&&h.duration?(n[c]=t=new bs(h,e,c,l),a.push(t)):e[c]=l}}return a}update(t,e){{if(0!==this._properties.size)return(t=this._createAnimations(t,e)).length?(l.add(this._chart,t),!0):void 0;Object.assign(t,e)}}}function vs(t,e){var t=t&&t.options||{},i=t.reverse,s=void 0===t.min?e:0,t=void 0===t.max?e:0;return{start:i?t:s,end:i?s:t}}function _s(t,e){const i=[],s=t._getSortedDatasetMetas(e);let a,n;for(a=0,n=s.length;a<n;++a)i.push(s[a].index);return i}function ys(t,e,i,s={}){var a=t.keys,n="single"===s.mode;let o,r,l,h;if(null!==e){for(o=0,r=a.length;o<r;++o){if((l=+a[o])===i){if(s.all)continue;break}p(h=t.values[l])&&(n||0===e||y(e)===y(h))&&(e+=h)}return e}}function Ms(t,e){t=t&&t.options.stacked;return t||void 0===t&&void 0!==e.stack}function ws(t,e,i,s){for(const a of e.getMatchingVisibleMetas(s).reverse()){const e=t[a.index];if(i&&0<e||!i&&e<0)return a.index}return null}function ks(t,e){const{chart:i,_cachedMeta:s}=t,a=i._stacks||(i._stacks={}),{iScale:n,vScale:o,index:r}=s,l=n.axis,h=o.axis,c=`${n.id}.${o.id}.`+(s.stack||s.type),d=e.length;let u;for(let t=0;t<d;++t){const i=e[t],{[l]:n,[h]:d}=i;(u=(i._stacks||(i._stacks={}))[h]=function(t,e,i){const s=t[e]||(t[e]={});return s[i]||(s[i]={})}(a,c,n))[r]=d,u._top=ws(u,o,!0,s.type),u._bottom=ws(u,o,!1,s.type),(u._visualValues||(u._visualValues={}))[r]=d}}function Ss(t,e){const i=t.scales;return Object.keys(i).filter(t=>i[t].axis===e).shift()}function Ps(t,e){var i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[s]||void 0===e[s][i])return;delete e[s][i],void 0!==e[s]._visualValues&&void 0!==e[s]._visualValues[i]&&delete e[s]._visualValues[i]}}}const Ds=t=>"reset"===t||"none"===t,Cs=(t,e)=>e?t:Object.assign({},t);class Os{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ms(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Ps(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(t,e,i,s)=>"x"===t?e:"r"===t?s:i,a=e.xAxisID=T(i.xAxisID,Ss(t,"x")),n=e.yAxisID=T(i.yAxisID,Ss(t,"y")),o=e.rAxisID=T(i.rAxisID,Ss(t,"r")),r=e.indexAxis,l=e.iAxisID=s(r,a,n,o),h=e.vAxisID=s(r,n,a,o);e.xScale=this.getScaleForId(a),e.yScale=this.getScaleForId(n),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){var e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){var t=this._cachedMeta;this._data&&Mt(this._data,this),t._stacked&&Ps(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(A(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let s,a,n;for(s=0,a=e.length;s<a;++s)n=e[s],i[s]={x:n,y:t[n]};return i}(e);else if(i!==e){if(i){Mt(i,this);const t=this._cachedMeta;Ps(t),t._parsed=[]}e&&Object.isExtensible(e)&&yt(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();var a=e._stacked;e._stacked=Ms(e.vScale,e),e.stack!==i.stack&&(s=!0,Ps(e),e.stack=i.stack),this._resyncElements(t),!s&&a===e._stacked||ks(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:s}=this,{iScale:a,_stacked:n}=i,o=a.axis;let r,l,h,c=0===t&&e===s.length||i._sorted,d=0<t&&i._parsed[t-1];if(!1===this._parsing)i._parsed=s,i._sorted=!0,h=s;else{h=O(s[t])?this.parseArrayData(i,s,t,e):A(s[t])?this.parseObjectData(i,s,t,e):this.parsePrimitiveData(i,s,t,e);const a=()=>null===l[o]||d&&l[o]<d[o];for(r=0;r<e;++r)i._parsed[r+t]=l=h[r],c&&(a()&&(c=!1),d=l);i._sorted=c}n&&ks(this,h)}parsePrimitiveData(t,e,i,s){const{iScale:a,vScale:n}=t,o=a.axis,r=n.axis,l=a.getLabels(),h=a===n,c=new Array(s);let d,u,g;for(d=0,u=s;d<u;++d)g=d+i,c[d]={[o]:h||a.parse(l[g],g),[r]:n.parse(e[g],g)};return c}parseArrayData(t,e,i,s){const{xScale:a,yScale:n}=t,o=new Array(s);let r,l,h,c;for(r=0,l=s;r<l;++r)c=e[h=r+i],o[r]={x:a.parse(c[0],h),y:n.parse(c[1],h)};return o}parseObjectData(t,e,i,s){const{xScale:a,yScale:n}=t,{xAxisKey:o="x",yAxisKey:r="y"}=this._parsing,l=new Array(s);let h,c,d,u;for(h=0,c=s;h<c;++h)u=e[d=h+i],l[h]={x:a.parse(m(u,o),d),y:n.parse(m(u,r),d)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){var s=this.chart,a=this._cachedMeta,n=e[t.axis];return ys({keys:_s(s,!0),values:e._stacks[t.axis]._visualValues},n,a.index,{mode:i})}updateRangeFromParsed(t,e,i,s){var a=i[e.axis];let n=null===a?NaN:a;i=s&&i._stacks[e.axis];s&&i&&(s.values=i,n=ys(s,a,this._cachedMeta.index)),t.min=Math.min(t.min,n),t.max=Math.max(t.max,n)}getMinMax(e,t){const i=this._cachedMeta,s=i._parsed,a=i._sorted&&e===i.iScale,n=s.length,o=this._getOtherScale(e),r=(d=this.chart,t&&!i.hidden&&i._stacked&&{keys:_s(d,!0),values:null}),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:c}=function(){var{min:t,max:e,minDefined:i,maxDefined:s}=o.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:s?e:Number.POSITIVE_INFINITY}}();var d;let u,g;function f(){var t=(g=s[u])[o.axis];return!p(g[e.axis])||h>t||c<t}for(u=0;u<n&&(f()||(this.updateRangeFromParsed(l,e,g,r),!a));++u);if(a)for(u=n-1;0<=u;--u)if(!f()){this.updateRangeFromParsed(l,e,g,r);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,a,n;for(s=0,a=e.length;s<a;++s)p(n=e[s][t.axis])&&i.push(n);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,s=e.vScale,a=this.getParsed(t);return{label:i?""+i.getLabelForValue(a[i.axis]):"",value:s?""+s.getLabelForValue(a[s.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,s,a;return A(t)?(e=t.top,i=t.right,s=t.bottom,a=t.left):e=i=s=a=t,{top:e,right:i,bottom:s,left:a,disabled:!1===t}}(T(this.options.clip,function(t,e,i){if(!1===i)return!1;t=vs(t,i),e=vs(e,i);return{top:e.end,right:t.end,bottom:e.start,left:t.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,s=i.data||[],a=e.chartArea,n=[],o=this._drawStart||0,r=this._drawCount||s.length-o,l=this.options.drawActiveElementsOnTop;let h;for(i.dataset&&i.dataset.draw(t,a,o,r),h=o;h<o+r;++h){const e=s[h];e.hidden||(e.active&&l?n.push(e):e.draw(t,a))}for(h=0;h<n.length;++h)n[h].draw(t,a)}getStyle(t,e){e=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(e):this.resolveDataElementOptions(t||0,e)}getContext(t,e,i){var s,a=this.getDataset();let n;if(0<=t&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];(n=e.$context||(e.$context=Pi(this.getContext(),{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"}))).parsed=this.getParsed(t),n.raw=a.data[t],n.index=n.dataIndex=t}else(n=this.$context||(this.$context=(t=this.chart.getContext(),s=this.index,Pi(t,{active:!1,dataset:void 0,datasetIndex:s,index:s,mode:"default",type:"dataset"})))).dataset=a,n.index=n.datasetIndex=this.index;return n.active=!!e,n.mode=i,n}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const s="active"===e,a=this._cachedDataOpts,n=t+"-"+e,o=a[n],r=this.enableOptionSharing&&G(i);if(o)return Cs(o,r);const l=this.chart.config,h=l.datasetElementScopeKeys(this._type,t),c=s?[t+"Hover","hover",t,""]:[t,""],d=l.getOptionScopes(this.getDataset(),h),u=Object.keys(R.elements[t]),g=l.resolveNamedOptions(d,u,()=>this.getContext(i,s,e),c);return g.$shared&&(g.$shared=r,a[n]=Object.freeze(Cs(g,r))),g}_resolveAnimations(t,e,i){const s=this.chart,a=this._cachedDataOpts,n="animation-"+e,o=a[n];if(o)return o;let r;if(!1!==s.options.animation){const s=this.chart.config,a=s.datasetAnimationScopeKeys(this._type,e),n=s.getOptionScopes(this.getDataset(),a);r=s.createResolver(n,this.getContext(t,i,e))}t=new xs(s,r&&r.animations);return r&&r._cacheable&&(a[n]=Object.freeze(t)),t}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Ds(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){var t=this.resolveDataElementOptions(t,e),i=this._sharedOptions,s=this.getSharedOptions(t),i=this.includeOptions(e,s)||s!==i;return this.updateSharedOptions(s,e,t),{sharedOptions:s,includeOptions:i}}updateElement(t,e,i,s){Ds(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!Ds(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;var a=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];var s=i.length,a=e.length,n=Math.min(a,s);n&&this.parse(0,n),s<a?this._insertElements(s,a-s,t):a<s&&this._removeElements(a,s-a)}_insertElements(t,e,i=!0){const s=this._cachedMeta,a=s.data,n=t+e;let o;var r=t=>{for(t.length+=e,o=t.length-1;o>=n;o--)t[o]=t[o-e]};for(r(a),o=t;o<n;++o)a[o]=new this.dataElementType;this._parsing&&r(s._parsed),this.parse(t,e),i&&this.updateElements(a,t,e,"reset")}updateElements(t,e,i,s){}_removeElements(t,e){const i=this._cachedMeta;var s;this._parsing&&(s=i._parsed.splice(t,e),i._stacked&&Ps(i,s)),i.data.splice(t,e)}_sync(t){var e,i,s;this._parsing?this._syncList.push(t):([e,i,s]=t,this[e](i,s)),this.chart._dataChanges.push([this.index,...t])}_onDataPush(){var t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);e=arguments.length-2;e&&this._sync(["_insertElements",t,e])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}class e{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){var{x:t,y:e}=this.getProps(["x","y"],t);return{x:t,y:e}}hasValue(){return rt(this.x)&&rt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const s={};return t.forEach(t=>{s[t]=i[t]&&i[t].active()?i[t]._to:this[t]}),s}}function As(t,e,i,s,a){var n=T(s,0),o=Math.min(T(a,t.length),t.length);let r,l,h,c=0;for(i=Math.ceil(i),a&&(i=(r=a-s)/Math.floor(r/i)),h=n;h<0;)c++,h=Math.round(n+c*i);for(l=Math.max(n,0);l<o;l++)l===h&&(e.push(t[l]),c++,h=Math.round(n+c*i))}const Ts=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,Ls=(t,e)=>Math.min(e||t,t);function Es(t,e){const i=[],s=t.length/e,a=t.length;let n=0;for(;n<a;n+=s)i.push(t[Math.floor(n)]);return i}function Rs(t){return t.drawTicks?t.tickLength:0}function Is(t,e){if(!t.display)return 0;var e=z(t.font,e),i=I(t.padding);return(O(t.text)?t.text.length:1)*e.lineHeight+i.height}class zs extends e{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){var{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this,t=g(t,Number.POSITIVE_INFINITY),e=g(e,Number.NEGATIVE_INFINITY),i=g(i,Number.POSITIVE_INFINITY),s=g(s,Number.NEGATIVE_INFINITY);return{min:g(t,i),max:g(e,s),minDefined:p(t),maxDefined:p(e)}}getMinMax(i){let s,{min:a,max:n,minDefined:o,maxDefined:r}=this.getUserBounds();if(o&&r)return{min:a,max:n};const l=this.getMatchingVisibleMetas();for(let t=0,e=l.length;t<e;++t)s=l[t].controller.getMinMax(this,i),o||(a=Math.min(a,s.min)),r||(n=Math.max(n,s.max));return a=r&&a>n?n:a,n=o&&a>n?a:n,{min:g(a,g(n,a)),max:g(n,g(a,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){d(this.options.beforeUpdate,[this])}update(t,e,i){var{beginAtZero:s,grace:a,ticks:n}=this.options,o=n.sampleSize,t=(this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Si(this,a,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks(),o<this.ticks.length);this._convertTicksToLabels(t?Es(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),n.display&&(n.autoSkip||"auto"===n.source)&&(this.ticks=function(t,s){const e=t.options.ticks,i=(c=(t=t).options.offset,d=t._tickSize(),c=t._length/d+(c?0:1),t=t._maxLength/d,Math.floor(Math.min(c,t))),a=Math.min(e.maxTicksLimit||i,i),n=e.major.enabled?function(t){const e=[];let i,s;for(i=0,s=t.length;i<s;i++)t[i].major&&e.push(i);return e}(s):[],o=n.length,r=n[0],l=n[o-1],h=[];var c,d;if(a<o){{var u=s;var g=h;var f=n;var p=o/a;let t,e=0,i=f[0];for(p=Math.ceil(p),t=0;t<u.length;t++)t===i&&(g.push(u[t]),e++,i=f[e*p])}return h}var m=function(t,i,e){var t=function(t){var e=t.length;let i,s;if(e<2)return!1;for(s=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==s)return!1;return s}(t),s=i.length/e;if(!t)return Math.max(s,1);var a=ot(t);for(let t=0,e=a.length-1;t<e;t++){const i=a[t];if(i>s)return i}return Math.max(s,1)}(n,s,a);if(0<o){let t,e;const i=1<o?Math.round((l-r)/(o-1)):null;for(As(s,h,m,P(i)?0:r-i,r),t=0,e=o-1;t<e;t++)As(s,h,m,n[t],n[t+1]);return As(s,h,m,l,P(i)?s.length:l+i),h}return As(s,h,m),h}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),t&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){d(this.options.afterUpdate,[this])}beforeSetDimensions(){d(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){d(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),d(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){d(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){var e=this.options.ticks;let i,s,a;for(i=0,s=t.length;i<s;i++)(a=t[i]).label=d(e.callback,[a.value,i,t],this)}afterTickToLabelConversion(){d(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){d(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){var t,e,i,s,a=this.options,n=a.ticks,o=Ls(this.ticks.length,a.ticks.maxTicksLimit),r=n.minRotation||0,l=n.maxRotation;let h,c,d,u=r;!this._isVisible()||!n.display||l<=r||o<=1||!this.isHorizontal()?this.labelRotation=r:(e=(t=this._getLabelSizes()).widest.width,i=t.highest.height,s=C(this.chart.width-e,0,this.maxWidth),(a.offset?this.maxWidth/o:s/(o-1))<e+6&&(h=s/(o-(a.offset?.5:1)),c=this.maxHeight-Rs(a.grid)-n.padding-Is(a.title,this.chart.options.font),d=Math.sqrt(e*e+i*i),u=ct(Math.min(Math.asin(C((t.highest.height+6)/h,-1,1)),Math.asin(C(c/d,-1,1))-Math.asin(C(i/d,-1,1)))),u=Math.max(r,Math.min(l,u))),this.labelRotation=u)}afterCalculateLabelRotation(){d(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){d(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:a}}=this,n=this._isVisible(),o=this.isHorizontal();if(n){const n=Is(s,e.options.font);if(o?(t.width=this.maxWidth,t.height=Rs(a)+n):(t.height=this.maxHeight,t.width=Rs(a)+n),i.display&&this.ticks.length){const{first:e,last:s,widest:a,highest:n}=this._getLabelSizes(),r=2*i.padding,l=L(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(o){const e=i.mirror?0:c*a.width+h*n.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=i.mirror?0:h*a.width+c*n.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,s,c,h)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(i,s,a,n){const{ticks:{align:o,padding:r},position:l}=this.options,h=0!==this.labelRotation,c="top"!==l&&"x"===this.axis;if(this.isHorizontal()){const l=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let t=0,e=0;h?e=c?(t=n*i.width,a*s.height):(t=a*i.height,n*s.width):"start"===o?e=s.width:"end"===o?t=i.width:"inner"!==o&&(t=i.width/2,e=s.width/2),this.paddingLeft=Math.max((t-l+r)*this.width/(this.width-l),0),this.paddingRight=Math.max((e-d+r)*this.width/(this.width-d),0)}else{let t=s.height/2,e=i.height/2;"start"===o?(t=0,e=i.height):"end"===o&&(t=s.height,e=0),this.paddingTop=t+r,this.paddingBottom=e+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){d(this.options.afterFit,[this])}isHorizontal(){var{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)P(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){var i=this.options.ticks.sampleSize;let t=this.ticks;i<t.length&&(t=Es(t,i)),this._labelSizes=e=this._computeLabelSizes(t,t.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(t,e,i){const{ctx:s,_longestTextCache:a}=this,n=[],o=[],r=Math.floor(e/Ls(e,i));let l,h,c,d,u,g,f,p,m,b,x,v=0,_=0;for(l=0;l<e;l+=r){if(d=t[l].label,u=this._resolveTickFontOptions(l),s.font=g=u.string,f=a[g]=a[g]||{data:{},gc:[]},p=u.lineHeight,m=b=0,P(d)||O(d)){if(O(d))for(h=0,c=d.length;h<c;++h)P(x=d[h])||O(x)||(m=Le(s,f.data,f.gc,m,x),b+=p)}else m=Le(s,f.data,f.gc,m,d),b=p;n.push(m),o.push(b),v=Math.max(m,v),_=Math.max(b,_)}i=a,y=e,k(i,t=>{const e=t.gc,i=e.length/2;let s;if(y<i){for(s=0;s<i;++s)delete t.data[e[s]];e.splice(0,i)}});var y,i=n.indexOf(v),M=o.indexOf(_),w=t=>({width:n[t]||0,height:o[t]||0});return{first:w(0),last:w(e-1),widest:w(i),highest:w(M),widths:n,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);t=this._startPixel+t*this._length;return mt(this._alignToPixels?Re(this.chart,t,0):t)}getDecimalForPixel(t){t=(t-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){var{min:t,max:e}=this;return t<0&&e<0?e:0<t&&0<e?t:0}getContext(t){var e=this.ticks||[];if(0<=t&&t<e.length){const i=e[t];return i.$context||(i.$context=Pi(this.getContext(),{tick:i,index:t,type:"tick"}))}return this.$context||(this.$context=Pi(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){var t=this.options.ticks,e=L(this.labelRotation),i=Math.abs(Math.cos(e)),e=Math.abs(Math.sin(e)),s=this._getLabelSizes(),t=t.autoSkipPadding||0,a=s?s.widest.width+t:0,s=s?s.highest.height+t:0;return this.isHorizontal()?a*e<s*i?a/i:s/e:s*e<a*i?s/i:a/e}_isVisible(){var t=this.options.display;return"auto"!==t?!!t:0<this.getMatchingVisibleMetas().length}_computeGridLineItems(t){function e(t){return Re(s,t,f)}const i=this.axis,s=this.chart,a=this.options,{grid:n,position:o,border:r}=a,l=n.offset,h=this.isHorizontal(),c=this.ticks.length+(l?1:0),d=Rs(n),u=[],g=r.setContext(this.getContext()),f=g.display?g.width:0,p=f/2;let m,b,x,v,_,y,M,w,k,S,P,D;if("top"===o)m=e(this.bottom),y=this.bottom-d,w=m-p,S=e(t.top)+p,D=t.bottom;else if("bottom"===o)m=e(this.top),S=t.top,D=e(t.bottom)-p,y=m+p,w=this.top+d;else if("left"===o)m=e(this.right),_=this.right-d,M=m-p,k=e(t.left)+p,P=t.right;else if("right"===o)m=e(this.left),k=t.left,P=e(t.right)-p,_=m+p,M=this.left+d;else if("x"===i){if("center"===o)m=e((t.top+t.bottom)/2+.5);else if(A(o)){const t=Object.keys(o)[0],i=o[t];m=e(this.chart.scales[t].getPixelForValue(i))}S=t.top,D=t.bottom,y=m+p,w=y+d}else if("y"===i){if("center"===o)m=e((t.left+t.right)/2);else if(A(o)){const t=Object.keys(o)[0],i=o[t];m=e(this.chart.scales[t].getPixelForValue(i))}_=m-p,M=_-d,k=t.left,P=t.right}var t=T(a.ticks.maxTicksLimit,c),C=Math.max(1,Math.ceil(c/t));for(b=0;b<c;b+=C){const t=this.getContext(b),i=n.setContext(t),a=r.setContext(t),A=i.lineWidth,o=i.color,T=a.dash||[],c=a.dashOffset,d=i.tickWidth,g=i.tickColor,f=i.tickBorderDash||[],p=i.tickBorderDashOffset;void 0!==(x=function(t,e,i){var s=t.ticks.length,a=Math.min(e,s-1),n=t._startPixel,o=t._endPixel;let r,l=t.getPixelForTick(a);if(!(i&&(r=1===s?Math.max(l-n,o-l):0===e?(t.getPixelForTick(1)-l)/2:(l-t.getPixelForTick(a-1))/2,(l+=a<e?r:-r)<n-1e-6||l>o+1e-6)))return l}(this,b,l))&&(v=Re(s,x,A),h?_=M=k=P=v:y=w=S=D=v,u.push({tx1:_,ty1:y,tx2:M,ty2:w,x1:k,y1:S,x2:P,y2:D,width:A,color:o,borderDash:T,borderDashOffset:c,tickWidth:d,tickColor:g,tickBorderDash:f,tickBorderDashOffset:p}))}return this._ticksLength=c,this._borderValue=m,u}_computeLabelItems(s){const a=this.axis,n=this.options,{position:o,ticks:e}=n,r=this.isHorizontal(),l=this.ticks,{align:h,crossAlign:c,padding:t,mirror:d}=e,i=Rs(n.grid),u=i+t,g=d?-t:u,f=-L(this.labelRotation),p=[];let m,b,x,v,_,y,M,w,k,S,P,D="middle";if("top"===o)_=this.bottom-g,y=this._getXAxisLabelAlignment();else if("bottom"===o)_=this.top+g,y=this._getXAxisLabelAlignment();else if("left"===o){const s=this._getYAxisLabelAlignment(i);y=s.textAlign,v=s.x}else if("right"===o){const s=this._getYAxisLabelAlignment(i);y=s.textAlign,v=s.x}else if("x"===a){if("center"===o)_=(s.top+s.bottom)/2+u;else if(A(o)){const s=Object.keys(o)[0],a=o[s];_=this.chart.scales[s].getPixelForValue(a)+u}y=this._getXAxisLabelAlignment()}else if("y"===a){if("center"===o)v=(s.left+s.right)/2-u;else if(A(o)){const s=Object.keys(o)[0],a=o[s];v=this.chart.scales[s].getPixelForValue(a)}y=this._getYAxisLabelAlignment(i).textAlign}"y"===a&&("start"===h?D="top":"end"===h&&(D="bottom"));var C=this._getLabelSizes();for(m=0,b=l.length;m<b;++m){x=l[m].label;const s=e.setContext(this.getContext(m)),a=(M=this.getPixelForTick(m)+e.labelOffset,k=(w=this._resolveTickFontOptions(m)).lineHeight,(S=O(x)?x.length:1)/2),n=s.color,A=s.textStrokeColor,h=s.textStrokeWidth;let i,t=y;if(r?(v=M,"inner"===y&&(t=m===b-1?this.options.reverse?"left":"right":0===m?this.options.reverse?"right":"left":"center"),P="top"===o?"near"===c||0!=f?-S*k+k/2:"center"===c?-C.highest.height/2-a*k+k:-C.highest.height+k/2:"near"===c||0!=f?k/2:"center"===c?C.highest.height/2-a*k:C.highest.height-S*k,d&&(P*=-1),0==f||s.showLabelBackdrop||(v+=k/2*Math.sin(f))):(_=M,P=(1-S)*k/2),s.showLabelBackdrop){const a=I(s.backdropPadding),n=C.heights[m],o=C.widths[m];let t=P-a.top,e=0-a.left;switch(D){case"middle":t-=n/2;break;case"bottom":t-=n}switch(y){case"center":e-=o/2;break;case"right":e-=o}i={left:e,top:t,width:o+a.width,height:n+a.height,color:s.backdropColor}}p.push({label:x,font:w,textOffset:P,options:{rotation:f,color:n,strokeColor:A,strokeWidth:h,textAlign:t,textBaseline:D,translation:[v,_],backdrop:i}})}return p}_getXAxisLabelAlignment(){var{position:t,ticks:e}=this.options;if(-L(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){var{position:e,ticks:{crossAlign:i,mirror:s,padding:a}}=this.options,t=t+a,n=this._getLabelSizes().widest.width;let o,r;return"left"===e?s?(r=this.right+a,"near"===i?o="left":"center"===i?(o="center",r+=n/2):(o="right",r+=n)):(r=this.right-t,"near"===i?o="right":"center"===i?(o="center",r-=n/2):(o="left",r=this.left)):"right"===e?s?(r=this.left+a,"near"===i?o="right":"center"===i?(o="center",r-=n/2):(o="left",r-=n)):(r=this.left+t,"near"===i?o="left":"center"===i?(o="center",r+=n/2):(o="right",r=this.right)):o="right",{textAlign:o,x:r}}_computeLabelArea(){var t,e;if(!this.options.ticks.mirror)return t=this.chart,e=this.options.position,"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:s,width:a,height:n}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,a,n),t.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;var i=this.ticks.findIndex(t=>t.value===e);return 0<=i?t.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,s=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,n;var o=(t,e,i)=>{i.width&&i.color&&(s.save(),s.lineWidth=i.width,s.strokeStyle=i.color,s.setLineDash(i.borderDash||[]),s.lineDashOffset=i.borderDashOffset,s.beginPath(),s.moveTo(t.x,t.y),s.lineTo(e.x,e.y),s.stroke(),s.restore())};if(e.display)for(a=0,n=i.length;a<n;++a){const t=i[a];e.drawOnChartArea&&o({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&o({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:a,ctx:n,options:{border:t,grid:o}}=this,r=t.setContext(this.getContext()),l=t.display?r.width:0;if(l){var h=o.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let t,e,i,s;this.isHorizontal()?(t=Re(a,this.left,l)-l/2,e=Re(a,this.right,h)+h/2,i=s=c):(i=Re(a,this.top,l)-l/2,s=Re(a,this.bottom,h)+h/2,t=e=c),n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.beginPath(),n.moveTo(t,i),n.lineTo(e,s),n.stroke(),n.restore()}}drawLabels(t){if(this.options.ticks.display){const e=this.ctx,i=this._computeLabelArea(),s=(i&&Ve(e,i),this.getLabelItems(t));for(const t of s){const i=t.options,s=t.font;He(e,t.label,0,t.textOffset,s,i)}i&&Be(e)}}drawTitle(){var{ctx:e,options:{position:i,title:s,reverse:a}}=this;if(s.display){var n=z(s.font),o=I(s.padding),r=s.align;let t=n.lineHeight/2;"bottom"===i||"center"===i||A(i)?(t+=o.bottom,O(s.text)&&(t+=n.lineHeight*(s.text.length-1))):t+=o.top;var{titleX:o,titleY:l,maxWidth:h,rotation:c}=function(t,e,i,s){const{top:a,left:n,bottom:o,right:r,chart:l}=t,{chartArea:h,scales:c}=l;let d,u,g,f=0;var p=o-a,m=r-n;if(t.isHorizontal()){if(u=E(s,n,r),A(i)){const t=Object.keys(i)[0],s=i[t];g=c[t].getPixelForValue(s)+p-e}else g="center"===i?(h.bottom+h.top)/2+p-e:Ts(t,i,e);d=r-n}else{if(A(i)){const t=Object.keys(i)[0],s=i[t];u=c[t].getPixelForValue(s)-m+e}else u="center"===i?(h.left+h.right)/2-m+e:Ts(t,i,e);g=E(s,o,a),f="left"===i?-D:D}return{titleX:u,titleY:g,maxWidth:d,rotation:f}}(this,t,i,r);He(e,s.text,0,0,n,{color:s.color,maxWidth:h,rotation:c,textAlign:function(t,e,i){let s=Dt(t);return s=i&&"right"!==e||!i&&"right"===e?"left"===(t=s)?"right":"right"===t?"left":t:s}(r,i,a),textBaseline:"middle",translation:[o,l]})}}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){var t=this.options,e=t.ticks&&t.ticks.z||0,i=T(t.grid&&t.grid.z,-1),t=T(t.border&&t.border.z,0);return this._isVisible()&&this.draw===zs.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:t,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let a,n;for(a=0,n=e.length;a<n;++a){const n=e[a];n[i]!==this.id||t&&n.type!==t||s.push(n)}return s}_resolveTickFontOptions(t){return z(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){var t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Fs{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){var e,i,r,l,s=Object.getPrototypeOf(t);let a;"id"in(e=s)&&"defaults"in e&&(a=this.register(s));const n=this.items,o=t.id,h=this.scope+"."+o;if(o)return o in n||(n[o]=t,e=t,s=h,i=a,i=Y(Object.create(null),[i?R.get(i):{},R.get(s),e.defaults]),R.set(s,i),e.defaultRoutes&&(r=s,l=e.defaultRoutes,Object.keys(l).forEach(t=>{const e=t.split("."),i=e.pop(),s=[r].concat(e).join("."),a=l[t].split("."),n=a.pop(),o=a.join(".");R.route(s,i,o,n)})),e.descriptors&&R.describe(s,e.descriptors),this.override&&R.override(t.id,t.overrides)),h;throw new Error("class does not have id: "+t)}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in R[s]&&(delete R[s][i],this.override&&delete fe[i])}}var b=new class{constructor(){this.controllers=new Fs(Os,"datasets",!0),this.elements=new Fs(e,"elements"),this.plugins=new Fs(Object,"plugins"),this.scales=new Fs(zs,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(i,t,s){[...t].forEach(t=>{const e=s||this._getRegistryForType(t);s||e.isForType(t)||e===this.plugins&&t.id?this._exec(i,e,t):k(t,t=>{var e=s||this._getRegistryForType(t);this._exec(i,e,t)})})}_exec(t,e,i){var s=K(t);d(i["before"+s],[],i),e[t](i),d(i["after"+s],[],i)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const i=this._typedRegistries[t];if(i.isForType(e))return i}return this.plugins}_get(t,e,i){e=e.get(t);if(void 0===e)throw new Error('"'+t+'" is not a registered '+i+".");return e}};class Vs{constructor(){this._init=[]}notify(t,e,i,s){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));s=s?this._descriptors(t).filter(s):this._descriptors(t),i=this._notify(s,t,e,i);return"afterDestroy"===e&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall")),i}_notify(t,e,i,s){s=s||{};for(const a of t){const t=a.plugin;if(!1===d(t[i],[e,s,a.options],t)&&s.cancelable)return!1}return!0}invalidate(){P(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;var e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){var i,s=t&&t.config,a=T(s.options&&s.options.plugins,{}),s=function(t){const e={},i=[],s=Object.keys(b.plugins.items);for(let t=0;t<s.length;t++)i.push(b.getPlugin(s[t]));var a=t.plugins||[];for(let t=0;t<a.length;t++){const s=a[t];-1===i.indexOf(s)&&(i.push(s),e[s.id]=!0)}return{plugins:i,localIds:e}}(s);if(!1!==a||e){var[n,{plugins:o,localIds:r},l,h]=[t,s,a,e];const c=[],d=n.getContext();for(const u of o){const o=u.id,g=(i=l[o],h||!1!==i?!0===i?{}:i:null);null!==g&&c.push({plugin:u,options:function(t,{plugin:e,local:i},s,a){const n=t.pluginScopeKeys(e),o=t.getOptionScopes(s,n);return i&&e.defaults&&o.push(e.defaults),t.createResolver(o,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}(n.config,{plugin:u,local:r[o]},g,d)})}return c}return[]}_notifyStateChanges(t){var e=this._oldCache||[],i=this._cache,s=(t,i)=>t.filter(e=>!i.some(t=>e.plugin.id===t.plugin.id));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function Bs(t,e){var i=R.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Ws(t){if("x"===t||"y"===t||"r"===t)return t}function Ns(t,...e){if(Ws(t))return t;for(const s of e){const e=s.axis||("top"===(i=s.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||1<t.length&&Ws(t[0].toLowerCase());if(e)return e}var i;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Hs(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function js(t){const e=t.options||(t.options={});e.plugins=T(e.plugins,{}),e.scales=function(o,e){const n=fe[o.type]||{scales:{}},r=e.scales||{},l=Bs(o.type,e),h=Object.create(null);return Object.keys(r).forEach(t=>{var e=r[t];if(!A(e))return console.error("Invalid scale configuration for scale: "+t);if(e._proxy)return console.warn("Ignoring resolver passed as options for scale: "+t);const i=Ns(t,e,function(e,t){if(t.data&&t.data.datasets){t=t.data.datasets.filter(t=>t.xAxisID===e||t.yAxisID===e);if(t.length)return Hs(e,"x",t[0])||Hs(e,"y",t[0])}return{}}(t,o),R.scales[e.type]),s=i===l?"_index_":"_value_",a=n.scales||{};h[t]=$(Object.create(null),[{axis:i},e,a[i],a[s]])}),o.data.datasets.forEach(s=>{const t=s.type||o.type,a=s.indexAxis||Bs(t,e),n=(fe[t]||{}).scales||{};Object.keys(n).forEach(t=>{var e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),i=s[e+"AxisID"]||e;h[i]=h[i]||Object.create(null),$(h[i],[{axis:e},r[i],n[t]])})}),Object.keys(h).forEach(t=>{t=h[t];$(t,[R.scales[t.type],R.scale])}),h}(t,e)}function Ys(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const $s=new Map,Us=new Set;function Xs(t,e){let i=$s.get(t);return i||(i=e(),$s.set(t,i),Us.add(i)),i}const qs=(t,e,i)=>{e=m(e,i);void 0!==e&&t.add(e)};class Ks{constructor(t){this._config=((t=(t=t)||{}).data=Ys(t.data),js(t),t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Ys(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){var t=this._config;this.clearCache(),js(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Xs(t,()=>[["datasets."+t,""]])}datasetAnimationScopeKeys(t,e){return Xs(t+".transition."+e,()=>[[`datasets.${t}.transitions.`+e,"transitions."+e],["datasets."+t,""]])}datasetElementScopeKeys(t,e){return Xs(t+"-"+e,()=>[[`datasets.${t}.elements.`+e,"datasets."+t,"elements."+e,""]])}pluginScopeKeys(t){const e=t.id;return Xs(this.type+"-plugin-"+e,()=>[["plugins."+e,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let s=i.get(t);return s&&!e||(s=new Map,i.set(t,s)),s}getOptionScopes(e,t,i){const{options:s,type:a}=this,n=this._cachedScopes(e,i),o=n.get(t);if(o)return o;const r=new Set,l=(t.forEach(t=>{e&&(r.add(e),t.forEach(t=>qs(r,e,t))),t.forEach(t=>qs(r,s,t)),t.forEach(t=>qs(r,fe[a]||{},t)),t.forEach(t=>qs(r,R,t)),t.forEach(t=>qs(r,pe,t))}),Array.from(r));return 0===l.length&&l.push(Object.create(null)),Us.has(t)&&n.set(t,l),l}chartOptionScopes(){var{options:t,type:e}=this;return[t,fe[e]||{},R.datasets[e]||{},{type:e},R,pe]}resolveNamedOptions(t,e,i,s=[""]){const a={$shared:!0},{resolver:n,subPrefixes:o}=Gs(this._resolverCache,t,s);let r=n;!function(t,e){const{isScriptable:i,isIndexable:s}=Ue(t);for(const a of e){const e=i(a),n=s(a),o=(n||e)&&t[a];if(e&&(u(o)||Zs(o))||n&&O(o))return 1}}(n,e)||(a.$shared=!1,r=$e(n,i=u(i)?i():i,this.createResolver(t,i,o)));for(const t of e)a[t]=r[t];return a}createResolver(t,e,i=[""],s){t=Gs(this._resolverCache,t,i).resolver;return A(e)?$e(t,e,void 0,s):t}}function Gs(t,e,i){let s=t.get(e);s||(s=new Map,t.set(e,s));t=i.join();let a=s.get(t);return a||(a={resolver:Ye(e,i),subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},s.set(t,a)),a}const Zs=i=>A(i)&&Object.getOwnPropertyNames(i).reduce((t,e)=>t||u(i[e]),!1),Js=["top","bottom","left","right","chartArea"];function Qs(t,e){return"top"===t||"bottom"===t||-1===Js.indexOf(t)&&"x"===e}function ta(i,s){return function(t,e){return t[i]===e[i]?t[s]-e[s]:t[i]-e[i]}}function ea(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),d(i&&i.onComplete,[t],e)}function ia(t){var e=t.chart,i=e.options.animation;d(i&&i.onProgress,[t],e)}function sa(t){return xe()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t=t&&t.canvas?t.canvas:t}const aa={},na=t=>{const e=sa(t);return Object.values(aa).filter(t=>t.canvas===e).pop()};class i{static defaults=R;static instances=aa;static overrides=fe;static registry=b;static version="4.3.3";static getChart=na;static register(...t){b.add(...t),oa()}static unregister(...t){b.remove(...t),oa()}constructor(t,e){const i=this.config=new Ks(e),s=sa(t),a=na(s);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");var e=i.createResolver(i.chartOptionScopes(),this.getContext()),t=(this.platform=new(i.platform||fs(s)),this.platform.updateConfig(i),this.platform.acquireContext(s,e.aspectRatio)),n=t&&t.canvas,o=n&&n.height,r=n&&n.width;this.id=F(),this.ctx=t,this.canvas=n,this.width=r,this.height=o,this._options=e,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Vs,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Pt(t=>this.update(t),e.resizeDelay||0),this._dataChanges=[],aa[this.id]=this,t&&n?(l.listen(this,"complete",ea),l.listen(this,"progress",ia),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){var{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:a}=this;return P(t)?e&&a?a:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return b}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ce(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ie(this.canvas,this.ctx),this}stop(){return l.stop(this),this}resize(t,e){l.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){var i=this.options,s=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(s,t,e,a),t=i.devicePixelRatio||this.platform.getDevicePixelRatio(),e=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Ce(this,t,!0)&&(this.notifyPlugins("resize",{size:s}),d(i.onResize,[this,s],this),this.attached&&this._doResize(e)&&this.render())}ensureScalesHaveIDs(){k(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const o=this.options,s=o.scales,r=this.scales,l=Object.keys(r).reduce((t,e)=>(t[e]=!1,t),{});let t=[];k(t=s?t.concat(Object.keys(s).map(t=>{var e=s[t],t=Ns(t,e),i="r"===t,t="x"===t;return{options:e,dposition:i?"chartArea":t?"bottom":"left",dtype:i?"radialLinear":t?"category":"linear"}})):t,t=>{const e=t.options,i=e.id,s=Ns(i,e),a=T(e.type,t.dtype);void 0!==e.position&&Qs(e.position,s)===Qs(t.dposition)||(e.position=t.dposition),l[i]=!0;let n=null;i in r&&r[i].type===a?n=r[i]:(n=new(b.getScale(a))({id:i,type:a,ctx:this.ctx,chart:this}),r[n.id]=n),n.init(e,o)}),k(l,(t,e)=>{t||delete r[e]}),k(r,t=>{a.configure(this,t,t.options),a.addBox(this,t)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),e<i){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(ta("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:i}}=this;t.length>i.length&&delete this._stacks,t.forEach((e,t)=>{0===i.filter(t=>t===e._dataset).length&&this._destroyDatasetMeta(t)})}buildOrUpdateControllers(){const e=[],i=this.data.datasets;let s,a;for(this._removeUnreferencedMetasets(),s=0,a=i.length;s<a;s++){const a=i[s];let t=this.getDatasetMeta(s);var n=a.type||this.config.type;if(t.type&&t.type!==n&&(this._destroyDatasetMeta(s),t=this.getDatasetMeta(s)),t.type=n,t.indexAxis=a.indexAxis||Bs(n,this.options),t.order=a.order||0,t.index=s,t.label=""+a.label,t.visible=this.isDatasetVisible(s),t.controller)t.controller.updateIndex(s),t.controller.linkScales();else{const i=b.getController(n),{datasetElementType:a,dataElementType:o}=R.datasets[n];Object.assign(i,{dataElementType:b.getElement(o),datasetElementType:a&&b.getElement(a)}),t.controller=new i(this,s),e.push(t.controller)}}return this._updateMetasets(),e}_resetElements(){k(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const s=this.config,a=(s.update(),this._options=s.createResolver(s.chartOptionScopes(),this.getContext())),n=this._animationsDisabled=!a.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1!==this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})){const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let i=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const s=this.getDatasetMeta(t)["controller"],a=!n&&-1===o.indexOf(s);s.buildOrUpdateElements(a),i=Math.max(+s.getMaxOverflow(),i)}i=this._minPadding=a.layout.autoPadding?i:0,this._updateLayout(i),n||k(o,t=>{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ta("z","_idx"));var{_active:t,_lastEvent:e}=this;e?this._eventHandler(e,!0):t.length&&this._updateHoverStyles(t,t,!0),this.render()}}_updateScales(){k(this.scales,t=>{a.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){var t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);Z(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){var t,e,i,s,a=this["_hiddenIndices"];for({method:t,start:e,count:i}of this._getUniformDataChanges()||[]){n=void 0;o=void 0;r=void 0;s=void 0;var n=a;var o=e;var r="_removeElements"===t?-i:i;const l=Object.keys(n);for(const h of l){const l=+h;l>=o&&(s=n[h],delete n[h],(0<r||l>o)&&(n[l+r]=s))}}}_getUniformDataChanges(){const t=this._dataChanges;if(t&&t.length){this._dataChanges=[];var e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),s=i(0);for(let t=1;t<e;t++)if(!Z(s,i(t)))return;return Array.from(s).map(t=>t.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}}_updateLayout(t){if(!1!==this.notifyPlugins("beforeLayout",{cancelable:!0})){a.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],k(this.boxes,t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}}_updateDatasets(i){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:i,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let t=0,e=this.data.datasets.length;t<e;++t)this._updateDataset(t,u(i)?i({datasetIndex:t}):i);this.notifyPlugins("afterDatasetsUpdate",{mode:i})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),s={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",s)&&(i.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(l.has(this)?this.attached&&!l.running(this)&&l.start(this):(this.draw(),ea({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resize(t,e),this._resizeBeforeDraw=null}if(this.clear(),!(this.width<=0||this.height<=0)&&!1!==this.notifyPlugins("beforeDraw",{cancelable:!0})){const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let s,a;for(s=0,a=e.length;s<a;++s){const a=e[s];t&&!a.visible||i.push(a)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1!==this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})){var e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;0<=t;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}}_drawDataset(i){const t=this.ctx,e=i._clip,s=!e.disabled,a=function(){var{xScale:t,yScale:e}=i;if(t&&e)return{left:t.left,right:t.right,top:e.top,bottom:e.bottom}}()||this.chartArea,n={meta:i,index:i.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",n)&&(s&&Ve(t,{left:!1===e.left?0:a.left-e.left,right:!1===e.right?this.width:a.right+e.right,top:!1===e.top?0:a.top-e.top,bottom:!1===e.bottom?this.height:a.bottom+e.bottom}),i.controller.draw(),s&&Be(t),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return M(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){const a=Hi.modes[e];return"function"==typeof a?a(this,t,i,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let s=i.filter(t=>t&&t._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Pi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){var e=this.data.datasets[t];if(!e)return!1;t=this.getDatasetMeta(t);return"boolean"==typeof t.hidden?!t.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(e,t,i){const s=i?"show":"hide",a=this.getDatasetMeta(e),n=a.controller._resolveAnimations(void 0,s);G(t)?(a.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),n.update(a,{visible:i}),this.update(t=>t.datasetIndex===e?s:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),l.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");var{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Ie(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete aa[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const i=this._listeners,s=this.platform,e=(t,e)=>{s.addEventListener(this,t,e),i[t]=e},a=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};k(this.options.events,t=>e(t,a))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const i=this._responsiveListeners,s=this.platform,t=(t,e)=>{s.addEventListener(this,t,e),i[t]=e},e=(t,e)=>{i[t]&&(s.removeEventListener(this,t,e),delete i[t])},a=(t,e)=>{this.canvas&&this.resize(t,e)};let n;const o=()=>{e("attach",o),this.attached=!0,this.resize(),t("resize",a),t("detach",n)};n=()=>{this.attached=!1,e("resize",a),this._stop(),this._resize(0,0),t("attach",o)},(s.isAttached(this.canvas)?o:n)()}unbindEvents(){k(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},k(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){var s=i?"set":"remove";let a,n,o,r;for("dataset"===e&&(a=this.getDatasetMeta(t[0].datasetIndex)).controller["_"+s+"DatasetHoverStyle"](),o=0,r=t.length;o<r;++o){const e=(n=t[o])&&this.getDatasetMeta(n.datasetIndex).controller;e&&e[s+"HoverStyle"](n.element,n.datasetIndex,n.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){var e=this._active||[],t=t.map(({datasetIndex:t,index:e})=>{var i=this.getDatasetMeta(t);if(i)return{datasetIndex:t,element:i.data[e],index:e};throw new Error("No dataset found at index "+t)});W(t,e)||(this._active=t,this._lastEvent=null,this._updateHoverStyles(t,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(e){return 1===this._plugins._cache.filter(t=>t.plugin.id===e).length}_updateHoverStyles(t,e,i){var s=this.options.hover,a=(t,i)=>t.filter(e=>!i.some(t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)),n=a(e,t),i=i?t:a(t,e);n.length&&this.updateHoverStyle(n,s.mode,!1),i.length&&s.mode&&this.updateHoverStyle(i,s.mode,!0)}_eventHandler(e,t){const i={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},s=t=>(t.options.events||this.options.events).includes(e.native.type);if(!1!==this.notifyPlugins("beforeEvent",i,s))return t=this._handleEvent(e,t,i.inChartArea),i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(t||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:a}=this,n=e,o=this._getActiveElements(t,s,i,n),r=J(t),l=(h=t,c=this._lastEvent,i&&"mouseout"!==h.type?r?c:h:null);i&&(this._lastEvent=null,d(a.onHover,[t,o,this],this),r&&d(a.onClick,[t,o,this],this));var h,c=!W(o,s);return(c||e)&&(this._active=o,this._updateHoverStyles(o,s,e)),this._lastEvent=l,c}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;i=this.options.hover;return this.getElementsAtEventForMode(t,i.mode,i,s)}}function oa(){k(i.instances,t=>t._plugins.invalidate())}function ra(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var la={_date:class Un{static override(t){Object.assign(Un.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return ra()}parse(){return ra()}format(){return ra()}add(){return ra()}diff(){return ra()}startOf(){return ra()}endOf(){return ra()}}};function ha(i,s,a,n){if(O(i)){var o=i,r=s,l=a,h=n,c=l.parse(o[0],h),o=l.parse(o[1],h),h=Math.min(c,o),d=Math.max(c,o);let t=h,e=d;Math.abs(h)>Math.abs(d)&&(t=d,e=h),r[l.axis]=e,r._custom={barStart:t,barEnd:e,start:c,end:o,min:h,max:d}}else s[a.axis]=a.parse(i,n);return s}function ca(t,e,i,s){const a=t.iScale,n=t.vScale,o=a.getLabels(),r=a===n,l=[];let h,c,d,u;for(c=(h=i)+s;h<c;++h)u=e[h],(d={})[a.axis]=r||a.parse(o[h],h),l.push(ha(u,d,n,h));return l}function da(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function ua(t,e,i,s){return t=s?ga(t=t===e?i:t===i?e:t,i,e):ga(t,e,i)}function ga(t,e,i){return"start"===t?e:"end"===t?i:t}class fa extends Os{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(s){const t=s.data;if(t.labels.length&&t.datasets.length){const{pointStyle:a,color:n}=s.legend.options["labels"];return t.labels.map((t,e)=>{var i=s.getDatasetMeta(0).controller.getStyle(e);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,fontColor:n,lineWidth:i.borderWidth,pointStyle:a,hidden:!s.getDataVisibility(e),index:e}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(s,a){const n=this.getDataset().data,o=this._cachedMeta;if(!1===this._parsing)o._parsed=n;else{let t,e,i=t=>+n[t];if(A(n[s])){const{key:s="value"}=this._parsing;i=t=>+m(n[t],s)}for(e=(t=s)+a;t<e;++t)o._parsed[t]=i(t)}}_getRotation(){return L(this.options.rotation-90)}_getCircumference(){return L(this.options.circumference)}_getRotationExtents(){let e=_,i=-_;for(let t=0;t<this.chart.data.datasets.length;++t)if(this.chart.isDatasetVisible(t)&&this.chart.getDatasetMeta(t).type===this._type){const s=this.chart.getDatasetMeta(t).controller,a=s._getRotation(),n=s._getCircumference();e=Math.min(e,a),i=Math.max(i,a+n)}return{rotation:e,circumference:i-e}}update(t){const e=this.chart,i=e["chartArea"],s=this._cachedMeta,a=s.data,n=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,o=Math.max((Math.min(i.width,i.height)-n)/2,0),r=Math.min(V(this.options.cutout,o),1),l=this._getRingWeight(this.index),{circumference:h,rotation:c}=this._getRotationExtents(),{ratioX:d,ratioY:u,offsetX:g,offsetY:f}=function(t,e,s){let i=1,a=1,n=0,o=0;if(e<_){const r=t,l=r+e,h=Math.cos(r),c=Math.sin(r),d=Math.cos(l),u=Math.sin(l),g=(t,e,i)=>pt(t,r,l,!0)?1:Math.max(e,e*s,i,i*s),f=(t,e,i)=>pt(t,r,l,!0)?-1:Math.min(e,e*s,i,i*s),p=g(0,h,d),m=g(D,c,u),b=f(S,h,d),x=f(S+D,c,u);i=(p-b)/2,a=(m-x)/2,n=-(p+b)/2,o=-(m+x)/2}return{ratioX:i,ratioY:a,offsetX:n,offsetY:o}}(c,h,r),p=(i.width-n)/d,m=(i.height-n)/u,b=Math.max(Math.min(p,m)/2,0),x=B(this.options.radius,b),v=(x-Math.max(x*r,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=f*x,s.total=this.calculateTotal(),this.outerRadius=x-v*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-v*l,0),this.updateElements(a,0,a.length,t)}_circumference(t,e){var i=this.options,s=this._cachedMeta,a=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*a/_)}updateElements(t,e,i,s){const a="reset"===s,n=this.chart,o=n.chartArea,r=n.options.animation,l=(o.left+o.right)/2,h=(o.top+o.bottom)/2,c=a&&r.animateScale,d=c?0:this.innerRadius,u=c?0:this.outerRadius,{sharedOptions:g,includeOptions:f}=this._getSharedOptions(e,s);let p,m=this._getRotation();for(p=0;p<e;++p)m+=this._circumference(p,a);for(p=e;p<e+i;++p){const e=this._circumference(p,a),i=t[p],n={x:l+this.offsetX,y:h+this.offsetY,startAngle:m,endAngle:m+e,circumference:e,outerRadius:u,innerRadius:d};f&&(n.options=g||this.resolveDataElementOptions(p,i.active?"active":s)),m+=e,this.updateElement(i,p,n,s)}}calculateTotal(){var t=this._cachedMeta,e=t.data;let i,s=0;for(i=0;i<e.length;i++){var a=t._parsed[i];null===a||isNaN(a)||!this.chart.getDataVisibility(i)||e[i].hidden||(s+=Math.abs(a))}return s}calculateCircumference(t){var e=this._cachedMeta.total;return 0<e&&!isNaN(t)?_*(Math.abs(t)/e):0}getLabelAndValue(t){var e=this._cachedMeta,i=this.chart,s=i.data.labels||[],e=de(e._parsed[t],i.options.locale);return{label:s[t]||"",value:e}}getMaxBorderWidth(t){let e=0;const i=this.chart;let s,a,n,o,r;if(!t)for(s=0,a=i.data.datasets.length;s<a;++s)if(i.isDatasetVisible(s)){t=(n=i.getDatasetMeta(s)).data,o=n.controller;break}if(!t)return 0;for(s=0,a=t.length;s<a;++s)"inner"!==(r=o.resolveDataElementOptions(s)).borderAlign&&(e=Math.max(e,r.borderWidth||0,r.hoverBorderWidth||0));return e}getMaxOffset(i){let s=0;for(let t=0,e=i.length;t<e;++t){const i=this.resolveDataElementOptions(t);s=Math.max(s,i.offset||0,i.hoverOffset||0)}return s}_getRingWeightOffset(e){let i=0;for(let t=0;t<e;++t)this.chart.isDatasetVisible(t)&&(i+=this._getRingWeight(t));return i}_getRingWeight(t){return Math.max(T(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class pa extends Os{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(s){const t=s.data;if(t.labels.length&&t.datasets.length){const{pointStyle:a,color:n}=s.legend.options["labels"];return t.labels.map((t,e)=>{var i=s.getDatasetMeta(0).controller.getStyle(e);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,fontColor:n,lineWidth:i.borderWidth,pointStyle:a,hidden:!s.getDataVisibility(e),index:e}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){var e=this._cachedMeta,i=this.chart,s=i.data.labels||[],e=de(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:e}}parseObjectData(t,e,i,s){return ii.bind(this)(t,e,i,s)}update(t){var e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,s={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((t,e)=>{var i=this.getParsed(e).r;!isNaN(i)&&this.chart.getDataVisibility(e)&&(i<s.min&&(s.min=i),i>s.max&&(s.max=i))}),s}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(s/2,0),n=(a-Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=a-n*this.index,this.innerRadius=this.outerRadius-n}updateElements(s,a,t,n){const o="reset"===n,r=this.chart,l=r.options.animation,h=this._cachedMeta.rScale,c=h.xCenter,d=h.yCenter,u=h.getIndexAngle(0)-.5*S;let g,f=u;var p=360/this.countVisibleElements();for(g=0;g<a;++g)f+=this._computeAngle(g,n,p);for(g=a;g<a+t;g++){const a=s[g];let t=f,e=f+this._computeAngle(g,n,p),i=r.getDataVisibility(g)?h.getDistanceFromCenterForValue(this.getParsed(g).r):0;f=e,o&&(l.animateScale&&(i=0),l.animateRotate&&(t=e=u));var m={x:c,y:d,innerRadius:0,outerRadius:i,startAngle:t,endAngle:e,options:this.resolveDataElementOptions(g,a.active?"active":n)};this.updateElement(a,g,m,n)}}countVisibleElements(){const t=this._cachedMeta;let i=0;return t.data.forEach((t,e)=>{!isNaN(this.getParsed(e).r)&&this.chart.getDataVisibility(e)&&i++}),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?L(this.resolveDataElementOptions(t,e).angle||i):0}}var ma=Object.freeze({__proto__:null,BarController:class extends Os{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,i,s){return ca(t,e,i,s)}parseArrayData(t,e,i,s){return ca(t,e,i,s)}parseObjectData(t,e,i,s){const{iScale:a,vScale:n}=t,{xAxisKey:o="x",yAxisKey:r="y"}=this._parsing,l="x"===a.axis?o:r,h="x"===n.axis?o:r,c=[];let d,u,g,f;for(u=(d=i)+s;d<u;++d)f=e[d],(g={})[a.axis]=a.parse(m(f,l),d),c.push(ha(m(f,h),g,n,d));return c}updateRangeFromParsed(t,e,i,s){super.updateRangeFromParsed(t,e,i,s);s=i._custom;s&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:s}=e,a=this.getParsed(t),n=a._custom,o=da(n)?"["+n.start+", "+n.end+"]":""+s.getLabelForValue(a[s.axis]);return{label:""+i.getLabelForValue(a[i.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){var e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(e,i,s,a){const n="reset"===a,{index:o,_cachedMeta:{vScale:r}}=this,l=r.getBasePixel(),h=r.isHorizontal(),c=this._getRuler(),{sharedOptions:d,includeOptions:u}=this._getSharedOptions(i,a);for(let t=i;t<i+s;t++){const i=this.getParsed(t),s=n||P(i[r.axis])?{base:l,head:l}:this._calculateBarValuePixels(t),m=this._calculateBarIndexPixels(t,c),b=(i._stacks||{})[r.axis],x={horizontal:h,base:s.base,enableBorderRadius:!b||da(i._custom)||o===b._top||o===b._bottom,x:h?s.head:m.center,y:h?m.center:s.head,height:h?m.size:Math.abs(s.size),width:h?Math.abs(s.size):m.size};u&&(x.options=d||this.resolveDataElementOptions(t,e[t].active?"active":a));var g=x.options||e[t].options;(function(n,t,e,i){let s=t.borderSkipped;const a={};if(!s)return n.borderSkipped=a;if(!0===s)return n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};var{start:t,end:o,reverse:r,top:l,bottom:h}=function(){let t,e,i,s,a;return i=n.horizontal?(t=n.base>n.x,e="left","right"):(t=n.base<n.y,e="bottom","top"),a=t?(s="end","start"):(s="start","end"),{start:e,end:i,reverse:t,top:s,bottom:a}}();"middle"===s&&e&&(n.enableBorderRadius=!0,s=(e._top||0)===i?l:(e._bottom||0)===i?h:(a[ua(h,t,o,r)]=!0,l)),a[ua(s,t,o,r)]=!0,n.borderSkipped=a})(x,g,b,o),[g,f,p]=[x,g["inflateAmount"],c.ratio],g.inflateAmount="auto"===f?1===p?.33:0:f,this.updateElement(e[t],t,x,a)}var f,p}_getStacks(t,i){const e=this._cachedMeta["iScale"],s=e.getMatchingVisibleMetas(this._type).filter(t=>t.controller.options.grouped),a=e.options.stacked,n=[];for(const e of s)if((void 0===i||!(t=>{var e=t.controller.getParsed(i),e=e&&e[t.vScale.axis];if(P(e)||isNaN(e))return!0})(e))&&((!1===a||-1===n.indexOf(e.stack)||void 0===a&&void 0===e.stack)&&n.push(e.stack),e.index===t))break;return n.length||n.push(void 0),n}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const s=this._getStacks(t,i),a=void 0!==e?s.indexOf(e):-1;return-1===a?s.length-1:a}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,s=[];let a,n;for(a=0,n=e.data.length;a<n;++a)s.push(i.getPixelForValue(this.getParsed(a)[i.axis],a));var o=t.barThickness;return{min:o||function(t){const e=t.iScale,i=function(s,t){if(!s._cache.$bar){const a=s.getMatchingVisibleMetas(t);let i=[];for(let t=0,e=a.length;t<e;t++)i=i.concat(a[t].controller.getAllParsedValues(s));s._cache.$bar=wt(i.sort((t,e)=>t-e))}return s._cache.$bar}(e,t.type);let s,a,n,o,r=e._length;var l=()=>{32767!==n&&-32768!==n&&(G(o)&&(r=Math.min(r,Math.abs(n-o)||r)),o=n)};for(s=0,a=i.length;s<a;++s)n=e.getPixelForValue(i[s]),l();for(o=void 0,s=0,a=e.ticks.length;s<a;++s)n=e.getPixelForTick(s),l();return r}(e),pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:s},options:{base:a,minBarLength:n}}=this,o=a||0,r=this.getParsed(t),l=r._custom,h=da(l);let c,d,u=r[e.axis],g=0,f=i?this.applyStack(e,r,i):u;f!==u&&(g=f-u,f=u),h&&(u=l.barStart,f=l.barEnd-l.barStart,0!==u&&y(u)!==y(l.barEnd)&&(g=0),g+=u);var p,m,b=P(a)||h?g:a;let x=e.getPixelForValue(b);if(c=this.chart.getDataVisibility(t)?e.getPixelForValue(g+f):x,d=c-x,Math.abs(d)<n){d=(b=d,p=e,m=o,(0!==b?y(b):(p.isHorizontal()?1:-1)*(p.min>=m?1:-1))*n),u===o&&(x-=d/2);const t=e.getPixelForDecimal(0),P=e.getPixelForDecimal(1),a=Math.min(t,P),l=Math.max(t,P);x=Math.max(Math.min(x,l),a),c=x+d,i&&!h&&(r._stacks[e.axis]._visualValues[s]=e.getValueForPixel(c)-e.getValueForPixel(x))}if(x===e.getPixelForValue(o)){const t=y(d)*e.getLineWidthForValue(o)/2;x+=t,d-=t}return{size:d,base:x,head:c,center:c+d/2}}_calculateBarIndexPixels(t,e){const i=e.scale,s=this.options,a=s.skipNull,n=T(s.maxBarThickness,1/0);let o,r;if(e.grouped){const i=a?this._getStackCount(t):e.stackCount,T=("flex"===s.barThickness?function(t,e,i,s){var a=e.pixels,n=a[t];let o=0<t?a[t-1]:null,r=t<a.length-1?a[t+1]:null;a=i.categoryPercentage,null===o&&(o=n-(null===r?e.end-e.start:r-n)),null===r&&(r=n+n-o),t=n-(n-Math.min(o,r))/2*a;return{chunk:Math.abs(r-o)/2*a/s,ratio:i.barPercentage,start:t}}:function(t,e,i,s){var a=i.barThickness;let n,o;return o=P(a)?(n=e.min*i.categoryPercentage,i.barPercentage):(n=a*s,1),{chunk:n/s,ratio:o,start:e.pixels[t]-n/2}})(t,e,s,i),l=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0);o=T.start+T.chunk*l+T.chunk/2,r=Math.min(n,T.chunk*T.ratio)}else o=i.getPixelForValue(this.getParsed(t)[i.axis],t),r=Math.min(n,e.min*e.ratio);return{base:o-r/2,head:o+r/2,center:o,size:r}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,s=i.length;let a=0;for(;a<s;++a)null!==this.getParsed(a)[e.axis]&&i[a].draw(this._ctx)}},BubbleController:class extends Os{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,s){const a=super.parsePrimitiveData(t,e,i,s);for(let t=0;t<a.length;t++)a[t]._custom=this.resolveDataElementOptions(t+i).radius;return a}parseArrayData(t,e,i,s){const a=super.parseArrayData(t,e,i,s);for(let t=0;t<a.length;t++){const s=e[i+t];a[t]._custom=T(s[2],this.resolveDataElementOptions(t+i).radius)}return a}parseObjectData(t,e,i,s){const a=super.parseObjectData(t,e,i,s);for(let t=0;t<a.length;t++){const s=e[i+t];a[t]._custom=T(s&&s.r&&+s.r,this.resolveDataElementOptions(t+i).radius)}return a}getMaxOverflow(){const e=this._cachedMeta.data;let i=0;for(let t=e.length-1;0<=t;--t)i=Math.max(i,e[t].size(this.resolveDataElementOptions(t))/2);return 0<i&&i}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:a}=e,n=this.getParsed(t),o=s.getLabelForValue(n.x),r=a.getLabelForValue(n.y),l=n._custom;return{label:i[t]||"",value:"("+o+", "+r+(l?", "+l:"")+")"}}update(t){var e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(e,i,s,a){const n="reset"===a,{iScale:o,vScale:r}=this._cachedMeta,{sharedOptions:l,includeOptions:h}=this._getSharedOptions(i,a),c=o.axis,d=r.axis;for(let t=i;t<i+s;t++){const i=e[t],s=!n&&this.getParsed(t),u={},g=u[c]=n?o.getPixelForDecimal(.5):o.getPixelForValue(s[c]),f=u[d]=n?r.getBasePixel():r.getPixelForValue(s[d]);u.skip=isNaN(g)||isNaN(f),h&&(u.options=l||this.resolveDataElementOptions(t,i.active?"active":a),n&&(u.options.radius=0)),this.updateElement(i,t,u,a)}}resolveDataElementOptions(t,e){var i=this.getParsed(t);let s=super.resolveDataElementOptions(t,e);t=(s=s.$shared?Object.assign({},s,{$shared:!1}):s).radius;return"active"!==e&&(s.radius=0),s.radius+=T(i&&i._custom,t),s}},DoughnutController:fa,LineController:class extends Os{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:s=[],_dataset:a}=e,n=this.chart._animationsDisabled;let{start:o,count:r}=Ot(e,s,n);this._drawStart=o,this._drawCount=r,At(e)&&(o=0,r=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!a._decimated,i.points=s;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!n,options:l},t),this.updateElements(s,o,r,t)}updateElements(e,i,t,s){const a="reset"===s,{iScale:n,vScale:o,_stacked:r,_dataset:l}=this._cachedMeta,{sharedOptions:h,includeOptions:c}=this._getSharedOptions(i,s),d=n.axis,u=o.axis,{spanGaps:g,segment:f}=this.options,p=rt(g)?g:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||a||"none"===s,b=i+t,x=e.length;let v=0<i&&this.getParsed(i-1);for(let t=0;t<x;++t){const g=e[t],x=m?g:{};var _,y,M,w;t<i||t>=b?x.skip=!0:(y=P((_=this.getParsed(t))[u]),M=x[d]=n.getPixelForValue(_[d],t),w=x[u]=a||y?o.getBasePixel():o.getPixelForValue(r?this.applyStack(o,_,r):_[u],t),x.skip=isNaN(M)||isNaN(w)||y,x.stop=0<t&&Math.abs(_[d]-v[d])>p,f&&(x.parsed=_,x.raw=l.data[t]),c&&(x.options=h||this.resolveDataElementOptions(t,g.active?"active":s)),m||this.updateElement(g,t,x,s),v=_)}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;var a=s[0].size(this.resolveDataElementOptions(0)),n=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,a,n)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},PieController:class extends fa{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},PolarAreaController:pa,RadarController:class extends Os{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,s){return ii.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta,i=e.dataset,s=e.data||[],a=e.iScale.getLabels();if(i.points=s,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);var n={_loop:!0,_fullLoop:a.length===s.length,options:e};this.updateElement(i,void 0,n,t)}this.updateElements(s,0,s.length,t)}updateElements(e,i,s,a){const n=this._cachedMeta.rScale,o="reset"===a;for(let t=i;t<i+s;t++){const i=e[t],s=this.resolveDataElementOptions(t,i.active?"active":a),r=n.getPointPositionForValue(t,this.getParsed(t).r),l=o?n.xCenter:r.x,h=o?n.yCenter:r.y,c={x:l,y:h,angle:r.angle,skip:isNaN(l)||isNaN(h),options:s};this.updateElement(i,t,c,a)}}},ScatterController:class extends Os{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:a}=e,n=this.getParsed(t),o=s.getLabelForValue(n.x),r=a.getLabelForValue(n.y);return{label:i[t]||"",value:"("+o+", "+r+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,s=this.chart._animationsDisabled;let{start:a,count:n}=Ot(e,i,s);if(this._drawStart=a,this._drawCount=n,At(e)&&(a=0,n=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:n}=e,o=(a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!n._decimated,a.points=i,this.resolveDatasetElementOptions(t));o.segment=this.options.segment,this.updateElement(a,void 0,{animated:!s,options:o},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,a,n,t)}addElements(){var t=this.options["showLine"];!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,i,s,a){const n="reset"===a,{iScale:o,vScale:r,_stacked:l,_dataset:h}=this._cachedMeta,t=this.resolveDataElementOptions(i,a),c=this.getSharedOptions(t),d=this.includeOptions(a,c),u=o.axis,g=r.axis,{spanGaps:f,segment:p}=this.options,m=rt(f)?f:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||n||"none"===a;let x=0<i&&this.getParsed(i-1);for(let t=i;t<i+s;++t){const i=e[t],s=this.getParsed(t),f=b?i:{},v=P(s[g]),_=f[u]=o.getPixelForValue(s[u],t),y=f[g]=n||v?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,s,l):s[g],t);f.skip=isNaN(_)||isNaN(y)||v,f.stop=0<t&&Math.abs(s[u]-x[u])>m,p&&(f.parsed=s,f.raw=h.data[t]),d&&(f.options=c||this.resolveDataElementOptions(t,i.active?"active":a)),b||this.updateElement(i,t,f,a),x=s}this.updateSharedOptions(c,a,t)}getMaxOverflow(){const t=this._cachedMeta,i=t.data||[];if(!this.options.showLine){let e=0;for(let t=i.length-1;0<=t;--t)e=Math.max(e,i[t].size(this.resolveDataElementOptions(t))/2);return 0<e&&e}var e=t.dataset,e=e.options&&e.options.borderWidth||0;if(!i.length)return e;var s=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(e,s,a)/2}}});function ba(t,e,i,s){return{x:i+t*Math.cos(e),y:s+t*Math.sin(e)}}function xa(t,e,i,s,a,n){var{x:o,y:r,startAngle:l,pixelMargin:h,innerRadius:c}=e,d=Math.max(e.outerRadius+s+i-h,0),h=0<c?c+s+i+h:0;let u=0;var g=a-l;if(s){const t=((0<c?c-s:0)+(0<d?d-s:0))/2;u=(g-(0!=t?g*t/(t+s):g))/2}var c=(g-Math.max(.001,g*d-i/S)/d)/2,g=l+c+u,l=a-c-u,{outerStart:c,outerEnd:f,innerStart:p,innerEnd:m}=function(t,e,i,s){t=yi(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const a=(i-e)/2,n=Math.min(a,s*e/2),o=t=>{var e=(i-Math.min(a,t))*s/2;return C(t,0,Math.min(a,e))};return{outerStart:o(t.outerStart),outerEnd:o(t.outerEnd),innerStart:C(t.innerStart,0,n),innerEnd:C(t.innerEnd,0,n)}}(e,h,d,l-g),b=d-c,x=d-f,v=g+c/b,_=l-f/x,y=h+p,M=h+m,w=g+p/y,k=l-m/M;if(t.beginPath(),n){const e=(v+_)/2;if(t.arc(o,r,d,v,e),t.arc(o,r,d,e,_),0<f){const e=ba(x,_,o,r);t.arc(e.x,e.y,f,_,l+D)}const i=ba(M,l,o,r);if(t.lineTo(i.x,i.y),0<m){const e=ba(M,k,o,r);t.arc(e.x,e.y,m,l+D,k+Math.PI)}const s=(l-m/h+(g+p/h))/2;if(t.arc(o,r,h,l-m/h,s,!0),t.arc(o,r,h,s,g+p/h,!0),0<p){const e=ba(y,w,o,r);t.arc(e.x,e.y,p,w+Math.PI,g-D)}const a=ba(b,g,o,r);if(t.lineTo(a.x,a.y),0<c){const e=ba(b,v,o,r);t.arc(e.x,e.y,c,g-D,v)}}else{t.moveTo(o,r);const e=Math.cos(v)*d+o,i=Math.sin(v)*d+r,s=(t.lineTo(e,i),Math.cos(_)*d+o),a=Math.sin(_)*d+r;t.lineTo(s,a)}t.closePath()}function va(t,e,i=e){t.lineCap=T(i.borderCapStyle,e.borderCapStyle),t.setLineDash(T(i.borderDash,e.borderDash)),t.lineDashOffset=T(i.borderDashOffset,e.borderDashOffset),t.lineJoin=T(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=T(i.borderWidth,e.borderWidth),t.strokeStyle=T(i.borderColor,e.borderColor)}function _a(t,e,i){t.lineTo(i.x,i.y)}function ya(t,e,i={}){var t=t.length,{start:i=0,end:s=t-1}=i,{start:a,end:n}=e,o=Math.max(i,a),r=Math.min(s,n);return{count:t,start:o,loop:e.loop,ilen:r<o&&!(i<a&&s<a||n<i&&n<s)?t+r-o:r-o}}function Ma(t,e,i,s){const{points:a,options:n}=e,{count:o,start:r,loop:l,ilen:h}=ya(a,i,s),c=n.stepped?We:n.tension||"monotone"===n.cubicInterpolationMode?Ne:_a;let d,u,g,{move:f=!0,reverse:p}=s||{};for(d=0;d<=h;++d)(u=a[(r+(p?h-d:d))%o]).skip||(f?(t.moveTo(u.x,u.y),f=!1):c(t,g,u,p,n.stepped),g=u);return l&&(u=a[(r+(p?h:0))%o],c(t,g,u,p,n.stepped)),!!l}function wa(t,e,i,s){const a=e.points,{count:n,start:o,ilen:r}=ya(a,i,s),{move:l=!0,reverse:h}=s||{};let c,d,u,g,f,p,m=0,b=0;var x=t=>(o+(h?r-t:t))%n,v=()=>{g!==f&&(t.lineTo(m,f),t.lineTo(m,g),t.lineTo(m,p))};for(l&&(d=a[x(0)],t.moveTo(d.x,d.y)),c=0;c<=r;++c)if(!(d=a[x(c)]).skip){const e=d.x,i=d.y,s=0|e;s===u?(i<g?g=i:i>f&&(f=i),m=(b*m+e)/++b):(v(),t.lineTo(e,i),u=s,b=0,g=f=i),p=i}v()}function ka(t){var e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?Ma:wa}const Sa="function"==typeof Path2D;class Pa extends e{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){var i,s=this.options;!s.tension&&"monotone"!==s.cubicInterpolationMode||s.stepped||this._pointsUpdated||(i=s.spanGaps?this._loop:this._fullLoop,hi(this._points,s,t,i,e),this._pointsUpdated=!0)}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Ri(this,this.options.segment))}first(){var t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){var t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(i,s){var a=this.options,n=i[s],o=this.points,r=Ei(this,{property:s,start:n,end:n});if(r.length){const l=[],h=a.stepped?pi:a.tension||"monotone"===a.cubicInterpolationMode?mi:fi;let e,t;for(e=0,t=r.length;e<t;++e){const{start:t,end:c}=r[e],d=o[t],u=o[c];if(d===u)l.push(d);else{const g=h(d,u,Math.abs((n-d[s])/(u[s]-d[s])),a.stepped);g[s]=i[s],l.push(g)}}return 1===l.length?l[0]:l}}pathSegment(t,e,i){return ka(this)(t,this,e,i)}path(t,e,i){const s=this.segments,a=ka(this);let n=this._loop;e=e||0,i=i||this.points.length-e;for(const o of s)n&=a(t,this,o,{start:e,end:e+i-1});return!!n}draw(t,e,i,s){var a,n=this.options||{};(this.points||[]).length&&n.borderWidth&&(t.save(),n=t,a=this,i=i,s=s,(Sa&&!a.options.segment?function(t,e,i,s){let a=e._path;a||(a=e._path=new Path2D,e.path(a,i,s)&&a.closePath()),va(t,e.options),t.stroke(a)}:function(t,e,i,s){const{segments:a,options:n}=e,o=ka(e);for(const r of a)va(t,n,r.style),t.beginPath(),o(t,e,r,{start:i,end:i+s-1})&&t.closePath(),t.stroke()})(n,a,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Da(t,e,i,s){var a=t.options,{[i]:t}=t.getProps([i],s);return Math.abs(e-t)<a.radius+a.hitRadius}function Ca(t,e){var{x:e,y:i,base:s,width:a,height:n}=t.getProps(["x","y","base","width","height"],e);let o,r,l,h,c;return h=t.horizontal?(c=n/2,o=Math.min(e,s),r=Math.max(e,s),l=i-c,i+c):(c=a/2,o=e-c,r=e+c,l=Math.min(i,s),Math.max(i,s)),{left:o,top:l,right:r,bottom:h}}function Oa(t,e,i,s){return t?0:C(e,i,s)}function Aa(t,e,i,s){var a=null===e,n=null===i,t=t&&!(a&&n)&&Ca(t,s);return t&&(a||c(e,t.left,t.right))&&(n||c(i,t.top,t.bottom))}function Ta(t,e){t.rect(e.x,e.y,e.w,e.h)}function La(t,e,i={}){var s=t.x!==i.x?-e:0,a=t.y!==i.y?-e:0,n=(t.x+t.w!==i.x+i.w?e:0)-s,i=(t.y+t.h!==i.y+i.h?e:0)-a;return{x:t.x+s,y:t.y+a,w:t.w+n,h:t.h+i,radius:t.radius}}var Ea=Object.freeze({__proto__:null,ArcElement:class extends e{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){var{angle:t,distance:e}=ut(this.getProps(["x","y"],i),{x:t,y:e}),{startAngle:i,endAngle:s,innerRadius:a,outerRadius:n,circumference:o}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),r=(this.options.spacing+this.options.borderWidth)/2,o=T(o,s-i)>=_||pt(t,i,s),t=c(e,a+r,n+r);return o&&t}getCenterPoint(t){var{x:t,y:e,startAngle:i,endAngle:s,innerRadius:a,outerRadius:n}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:o,spacing:r}=this.options,i=(i+s)/2,s=(a+n+r+o)/2;return{x:t+Math.cos(i)*s,y:e+Math.sin(i)*s}}tooltipPosition(t){return this.getCenterPoint(t)}draw(e){var{options:i,circumference:s}=this,a=(i.offset||0)/4,n=(i.spacing||0)/2,o=i.circular;if(this.pixelMargin="inner"===i.borderAlign?.33:0,this.fullCircles=s>_?Math.floor(s/_):0,!(0===s||this.innerRadius<0||this.outerRadius<0)){e.save();var r=(this.startAngle+this.endAngle)/2,r=(e.translate(Math.cos(r)*a,Math.sin(r)*a),a*(1-Math.sin(Math.min(S,s||0))));e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor;{var l=e;a=this;s=r;i=n;var h=o;var{fullCircles:c,startAngle:d,circumference:u}=a;let t=a.endAngle;if(c){xa(l,a,s,i,t,h);for(let t=0;t<c;++t)l.fill();isNaN(u)||(t=d+(u%_||_))}xa(l,a,s,i,t,h),l.fill()}var g=e,d=this,u=r,a=n,s=o,{fullCircles:f,startAngle:i,circumference:h,options:r}=d,{borderWidth:n,borderJoinStyle:o,borderDash:p,borderDashOffset:m}=r,r="inner"===r.borderAlign;if(n){g.setLineDash(p||[]),g.lineDashOffset=m,r?(g.lineWidth=2*n,g.lineJoin=o||"round"):(g.lineWidth=n,g.lineJoin=o||"bevel");let t=d.endAngle;if(f){xa(g,d,u,a,t,s);for(let t=0;t<f;++t)g.stroke();isNaN(h)||(t=i+(h%_||_))}if(r){p=g;m=d;n=t;var{startAngle:m,pixelMargin:o,x:i,y:h,outerRadius:r,innerRadius:b}=m,x=o/r;p.beginPath(),p.arc(i,h,r,m-x,n+x),o<b?p.arc(i,h,b,n+(x=o/b),m-x,!0):p.arc(i,h,o,n+D,m-D),p.closePath(),p.clip()}f||(xa(g,d,u,a,t,s),g.stroke())}e.restore()}}},BarElement:class extends e{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:s}}=this,{inner:a,outer:n}=(u=Ca(r=this),g=u.right-u.left,f=u.bottom-u.top,c=g/2,p=f/2,d=(h=r).options.borderWidth,h=h.borderSkipped,d=Mi(d),p={t:Oa(h.top,d.top,0,p),r:Oa(h.right,d.right,0,c),b:Oa(h.bottom,d.bottom,0,p),l:Oa(h.left,d.left,0,c)},h=g/2,d=f/2,r=(c=r).getProps(["enableBorderRadius"]).enableBorderRadius,m=c.options.borderRadius,l=wi(m),h=Math.min(h,d),d=c.borderSkipped,r={topLeft:Oa(!(c=r||A(m))||d.top||d.left,l.topLeft,0,h),topRight:Oa(!c||d.top||d.right,l.topRight,0,h),bottomLeft:Oa(!c||d.bottom||d.left,l.bottomLeft,0,h),bottomRight:Oa(!c||d.bottom||d.right,l.bottomRight,0,h)},{outer:{x:u.left,y:u.top,w:g,h:f,radius:r},inner:{x:u.left+p.l,y:u.top+p.t,w:g-p.l-p.r,h:f-p.t-p.b,radius:{topLeft:Math.max(0,r.topLeft-Math.max(p.t,p.l)),topRight:Math.max(0,r.topRight-Math.max(p.t,p.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(p.b,p.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(p.b,p.r))}}}),o=(m=n.radius).topLeft||m.topRight||m.bottomLeft||m.bottomRight?je:Ta;var r,l,h,c,d,u,g,f,p,m;t.save(),n.w===a.w&&n.h===a.h||(t.beginPath(),o(t,La(n,e,a)),t.clip(),o(t,La(a,-e,n)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),o(t,La(a,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,i){return Aa(this,t,e,i)}inXRange(t,e){return Aa(this,t,null,e)}inYRange(t,e){return Aa(this,null,t,e)}getCenterPoint(t){var{x:t,y:e,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(t+i)/2:t,y:s?e:(e+i)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}},LineElement:Pa,PointElement:class extends e{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){var s=this.options,{x:i,y:a}=this.getProps(["x","y"],i);return Math.pow(t-i,2)+Math.pow(e-a,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(t,e){return Da(this,t,"x",e)}inYRange(t,e){return Da(this,t,"y",e)}getCenterPoint(t){var{x:t,y:e}=this.getProps(["x","y"],t);return{x:t,y:e}}size(t){var e=(t=t||this.options||{}).radius||0;return 2*((e=Math.max(e,e&&t.hoverRadius||0))+(e&&t.borderWidth||0))}draw(t,e){var i=this.options;this.skip||i.radius<.1||!M(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,ze(t,i,this.x,this.y))}getRange(){var t=this.options||{};return t.radius+t.hitRadius}}});function Ra(t){var e=this.getLabels();return 0<=t&&t<e.length?e[t]:t}function Ia(t,e,{horizontal:i,minRotation:s}){s=L(s),i=(i?Math.sin(s):Math.cos(s))||.001;return Math.min(e/i,.75*e*(""+t).length)}class za extends zs{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return P(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const t=this.options["beginAtZero"],{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:s,max:a}=this;var n,o=t=>s=e?s:t,r=t=>a=i?a:t;if(t){const t=y(s),e=y(a);t<0&&e<0?r(0):0<t&&0<e&&o(0)}s===a&&(n=0===a?1:Math.abs(.05*a),r(a+n),t||o(s-n)),this.min=s,this.max=a}getTickLimit(){let t,{maxTicksLimit:e,stepSize:i}=this.options.ticks;return i?1e3<(t=Math.ceil(this.max/i)-Math.floor(this.min/i)+1)&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3):(t=this.computeTickLimit(),e=e||11),t=e?Math.min(e,t):t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){var t=this.options,e=t.ticks,i=this.getTickLimit();const s=function(t,e){const i=[],{bounds:s,step:a,min:n,max:o,precision:r,count:l,maxTicks:h,maxDigits:c,includeBounds:d}=t,u=a||1,g=h-1,{min:f,max:p}=e,m=!P(n),b=!P(o),x=!P(l),v=(p-f)/(c+1);let _,y,M,w,k=nt((p-f)/g/u)*u;if(k<1e-14&&!m&&!b)return[{value:f},{value:p}];(w=Math.ceil(p/k)-Math.floor(f/k))>g&&(k=nt(w*k/g/u)*u),P(r)||(_=Math.pow(10,r),k=Math.ceil(k*_)/_),M="ticks"===s?(y=Math.floor(f/k)*k,Math.ceil(p/k)*k):(y=f,p),m&&b&&a&<((o-n)/a,k/1e3)?(w=Math.round(Math.min((o-n)/k,h)),k=(o-n)/w,y=n,M=o):x?(y=m?n:y,M=b?o:M,w=l-1,k=(M-y)/w):w=at(w=(M-y)/k,Math.round(w),k/1e3)?Math.round(w):Math.ceil(w);e=Math.max(dt(k),dt(y));_=Math.pow(10,P(r)?e:r),y=Math.round(y*_)/_,M=Math.round(M*_)/_;let S=0;for(m&&(d&&y!==n?(i.push({value:n}),y<n&&S++,at(Math.round((y+S*k)*_)/_,n,Ia(n,v,t))&&S++):y<n&&S++);S<w;++S){const t=Math.round((y+S*k)*_)/_;if(b&&t>o)break;i.push({value:t})}return b&&d&&M!==o?i.length&&at(i[i.length-1].value,o,Ia(o,v,t))?i[i.length-1].value=o:i.push({value:o}):b&&M!==o||i.push({value:M}),i}({maxTicks:Math.max(2,i),bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&ht(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){var t=this.ticks;let e=this.min,i=this.max;super.configure(),this.options.offset&&t.length&&(t=(i-e)/Math.max(t.length-1,1)/2,e-=t,i+=t),this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return de(t,this.chart.options.locale,this.options.ticks.format)}}class Fa extends za{static id="linear";static defaults={ticks:{callback:ge.formatters.numeric}};determineDataLimits(){var{min:t,max:e}=this.getMinMax(!0);this.min=p(t)?t:0,this.max=p(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){var t=this.isHorizontal(),e=t?this.width:this.height,i=L(this.options.ticks.minRotation),t=(t?Math.sin(i):Math.cos(i))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,i.lineHeight/t))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const Va=t=>Math.floor(r(t)),Ba=(t,e)=>Math.pow(10,Va(t)+e);function Wa(t){return 1==t/Math.pow(10,Va(t))}function Na(t,e,i){i=Math.pow(10,i),t=Math.floor(t/i);return Math.ceil(e/i)-t}class Ha extends zs{static id="logarithmic";static defaults={ticks:{callback:ge.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){t=za.prototype.parse.apply(this,[t,e]);if(0!==t)return p(t)&&0<t?t:null;this._zero=!0}determineDataLimits(){var{min:t,max:e}=this.getMinMax(!0);this.min=p(t)?Math.max(0,t):null,this.max=p(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!p(this._userMin)&&(this.min=t===Ba(this.min,0)?Ba(this.min,-1):Ba(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:i}=this.getUserBounds();let s=this.min,a=this.max;var t=t=>s=e?s:t,n=t=>a=i?a:t;s===a&&(s<=0?(t(1),n(10)):(t(Ba(s,-1)),n(Ba(a,1)))),s<=0&&t(Ba(a,-1)),a<=0&&n(Ba(s,1)),this.min=s,this.max=a}buildTicks(){const t=this.options,e=function(t,{min:e,max:i}){e=g(t.min,e);const s=[],a=Va(e);let n=function(t,e){let i=Va(e-t);for(;10<Na(t,e,i);)i++;for(;Na(t,e,i)<10;)i--;return Math.min(i,Va(t))}(e,i),o=n<0?Math.pow(10,Math.abs(n)):1;var r=Math.pow(10,n),l=a>n?Math.pow(10,a):0,h=Math.round((e-l)*o)/o,c=Math.floor((e-l)/r/10)*r*10;let d=Math.floor((h-c)/Math.pow(10,n)),u=g(t.min,Math.round((l+c+d*Math.pow(10,n))*o)/o);for(;u<i;)s.push({value:u,major:Wa(u),significand:d}),10<=d?d=d<15?15:20:d++,20<=d&&(n++,d=2,o=0<=n?1:o),u=Math.round((l+c+d*Math.pow(10,n))*o)/o;return e=g(t.max,u),s.push({value:e,major:Wa(e),significand:d}),s}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&ht(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":de(t,this.chart.options.locale,this.options.ticks.format)}configure(){var t=this.min;super.configure(),this._startValue=r(t),this._valueRange=r(this.max)-r(t)}getPixelForValue(t){return null===(t=void 0!==t&&0!==t?t:this.min)||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(r(t)-this._startValue)/this._valueRange)}getValueForPixel(t){t=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+t*this._valueRange)}}function ja(t){var e=t.ticks;if(e.display&&t.display){const t=I(e.backdropPadding);return T(e.font&&e.font.size,R.font.size)+t.height}return 0}function Ya(t,e,i,s,a){return t===s||t===a?{start:e-i/2,end:e+i/2}:t<s||a<t?{start:e-i,end:e}:{start:e,end:e+i}}function $a(e){const i={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},s=Object.assign({},i),a=[],n=[],o=e._pointLabels.length,r=e.options.pointLabels,l=r.centerPointLabels?S/o:0;for(let t=0;t<o;t++){const o=r.setContext(e.getPointLabelContext(t));n[t]=o.padding;var h=e.getPointPosition(t,e.drawingArea+n[t],l),c=z(o.font),d=(d=e.ctx,c=c,u=O(u=e._pointLabels[t])?u:[u],{w:Ee(d,c.string,u),h:u.length*c.lineHeight}),u=(a[t]=d,v(e.getIndexAngle(t)+l)),c=Math.round(ct(u));{g=void 0;f=void 0;p=void 0;m=void 0;b=void 0;x=void 0;p=void 0;var g=s;var f=i;var p=u;var m=Ya(c,h.x,d.w,0,180);var b=Ya(c,h.y,d.h,90,270);var x=Math.abs(Math.sin(p)),p=Math.abs(Math.cos(p));let t=0,e=0;m.start<f.l?(t=(f.l-m.start)/x,g.l=Math.min(g.l,f.l-t)):m.end>f.r&&(t=(m.end-f.r)/x,g.r=Math.max(g.r,f.r+t)),b.start<f.t?(e=(f.t-b.start)/p,g.t=Math.min(g.t,f.t-e)):b.end>f.b&&(e=(b.end-f.b)/p,g.b=Math.max(g.b,f.b+e))}}var d,u;e.setCenterPoint(i.l-s.l,s.r-i.r,i.t-s.t,s.b-i.b),e._pointLabelItems=function(e,i,s){const a=[],n=e._pointLabels.length,t=e.options,{centerPointLabels:o,display:r}=t.pointLabels,l={extra:ja(t)/2,additionalAngle:o?S/n:0};let h;for(let t=0;t<n;t++){l.padding=s[t],l.size=i[t];const n=function(t,e,i){const s=t.drawingArea,{extra:a,additionalAngle:n,padding:o,size:r}=i,l=t.getPointPosition(e,s+a+o,n),h=Math.round(ct(v(l.angle+D))),c=function(t,e){return 90===h||270===h?t-=e/2:(270<h||h<90)&&(t-=e),t}(l.y,r.h),d=function(t){return 0===t||180===t?"center":t<180?"left":"right"}(h),u=function(t,e){return"right"===d?t-=e:"center"===d&&(t-=e/2),t}(l.x,r.w);return{visible:!0,x:l.x,y:c,textAlign:d,left:u,top:c,right:u+r.w,bottom:c+r.h}}(e,t,l);a.push(n),"auto"===r&&(n.visible=function(t,e){if(!e)return!0;var{left:t,top:i,right:s,bottom:a}=t;return!(M({x:t,y:i},e)||M({x:t,y:a},e)||M({x:s,y:i},e)||M({x:s,y:a},e))}(n,h),n.visible&&(h=n))}return a}(e,a,n)}function Ua(e,i,t,s){const a=e["ctx"];if(t)a.arc(e.xCenter,e.yCenter,i,0,_);else{var n=e.getPointPosition(0,i);a.moveTo(n.x,n.y);for(let t=1;t<s;t++)n=e.getPointPosition(t,i),a.lineTo(n.x,n.y)}}class Xa extends za{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ge.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){var t=this._padding=I(ja(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){var{min:t,max:e}=this.getMinMax(!1);this.min=p(t)&&!isNaN(t)?t:0,this.max=p(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/ja(this.options))}generateTickLabels(t){za.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((t,e)=>{t=d(this.options.pointLabels.callback,[t,e],this);return t||0===t?t:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){var t=this.options;t.display&&t.pointLabels.display?$a(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){return v(t*(_/(this._pointLabels.length||1))+L(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(P(t))return NaN;var e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(P(t))return NaN;t/=this.drawingArea/(this.max-this.min);return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(t){var e=this._pointLabels||[];if(0<=t&&t<e.length)return e=e[t],Pi(this.getContext(),{label:e,index:t,type:"pointLabel"})}getPointPosition(t,e,i=0){t=this.getIndexAngle(t)-D+i;return{x:Math.cos(t)*e+this.xCenter,y:Math.sin(t)*e+this.yCenter,angle:t}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){var{left:t,top:e,right:i,bottom:s}=this._pointLabelItems[t];return{left:t,top:e,right:i,bottom:s}}drawBackground(){var{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),Ua(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:h,border:c}=e,d=this._pointLabels.length;let s,u,a;if(e.pointLabels.display){var n=this,o=d;const{ctx:_,options:{pointLabels:y}}=n;for(let t=o-1;0<=t;t--){const o=n._pointLabelItems[t];if(o.visible){var r,l=y.setContext(n.getPointLabelContext(t)),g=(m=x=r=f=r=v=x=b=m=p=f=g=void 0,_),f=l,p=o,{left:m,top:b,right:x,bottom:v}=p;if(!P(r=f["backdropColor"])){const p=wi(f.borderRadius),P=I(f.backdropPadding);g.fillStyle=r;f=m-P.left,r=b-P.top,x=x-m+P.width,m=v-b+P.height;Object.values(p).some(t=>0!==t)?(g.beginPath(),je(g,{x:f,y:r,w:x,h:m,radius:p}),g.fill()):g.fillRect(f,r,x,m)}var p=z(l.font),{x:v,y:b,textAlign:g}=o;He(_,n._pointLabels[t],v,b+p.lineHeight/2,p,{color:l.color,textAlign:g,textBaseline:"middle"})}}}if(h.display&&this.ticks.forEach((t,e)=>{if(0!==e){u=this.getDistanceFromCenterForValue(t.value);t=this.getContext(e),e=h.setContext(t),t=c.setContext(t);{var i=this,s=u,a=d;const n=i.ctx,o=e.circular,{color:r,lineWidth:l}=e;!o&&!a||!r||!l||s<0||(n.save(),n.strokeStyle=r,n.lineWidth=l,n.setLineDash(t.dash),n.lineDashOffset=t.dashOffset,n.beginPath(),Ua(i,s,o,a),n.closePath(),n.stroke(),n.restore())}}}),i.display){for(t.save(),s=d-1;0<=s;s--){const h=i.setContext(this.getPointLabelContext(s)),{color:c,lineWidth:d}=h;d&&c&&(t.lineWidth=d,t.strokeStyle=c,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,u=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(s,u),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const o=this.ctx,r=this.options,l=r.ticks;if(l.display){var t=this.getIndexAngle(0);let a,n;o.save(),o.translate(this.xCenter,this.yCenter),o.rotate(t),o.textAlign="center",o.textBaseline="middle",this.ticks.forEach((t,e)=>{if(0!==e||r.reverse){var i=l.setContext(this.getContext(e)),s=z(i.font);if(a=this.getDistanceFromCenterForValue(this.ticks[e].value),i.showLabelBackdrop){o.font=s.string,n=o.measureText(t.label).width,o.fillStyle=i.backdropColor;const r=I(i.backdropPadding);o.fillRect(-n/2-r.left,-a-s.size/2-r.top,n+r.width,s.size+r.height)}He(o,t.label,0,-a,s,{color:i.color,strokeColor:i.textStrokeColor,strokeWidth:i.textStrokeWidth})}}),o.restore()}}drawTitle(){}}const qa={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},h=Object.keys(qa);function Ka(t,e){return t-e}function Ga(t,e){if(P(e))return null;const i=t._adapter,{parser:s,round:a,isoWeekday:n}=t._parseOpts;let o=e;return null===(o=p(o="function"==typeof s?s(o):o)?o:"string"==typeof s?i.parse(o,s):i.parse(o))?null:+(o=a?"week"!==a||!rt(n)&&!0!==n?i.startOf(o,a):i.startOf(o,"isoWeek",n):o)}function Za(e,i,s,a){const n=h.length;for(let t=h.indexOf(e);t<n-1;++t){const e=qa[h[t]],n=e.steps||Number.MAX_SAFE_INTEGER;if(e.common&&Math.ceil((s-i)/(n*e.size))<=a)return h[t]}return h[n-1]}function Ja(t,e,i){var s,a;i?i.length&&({lo:s,hi:a}=bt(i,e),t[i[s]>=e?i[s]:i[a]]=!0):t[e]=!0}function Qa(i,t,s){const a=[],n={},e=t.length;let o,r;for(o=0;o<e;++o)r=t[o],n[r]=o,a.push({value:r,major:!1});if(0!==e&&s){var l=a,h=n,c=s;const d=i._adapter,u=+d.startOf(l[0].value,c),g=l[l.length-1].value;let t,e;for(t=u;t<=g;t=+d.add(t,1,c))0<=(e=h[t])&&(l[e].major=!0);return l}return a}class tn extends zs{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const i=t.time||(t.time={}),s=this._adapter=new la._date(t.adapters.date);s.init(e),$(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Ga(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:s,max:a,minDefined:n,maxDefined:o}=this.getUserBounds();function r(t){n||isNaN(t.min)||(s=Math.min(s,t.min)),o||isNaN(t.max)||(a=Math.max(a,t.max))}n&&o||(r(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||r(this.getMinMax(!1))),s=p(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),a=p(a)&&!isNaN(a)?a:+e.endOf(Date.now(),i)+1,this.min=Math.min(s,a-1),this.max=Math.max(s+1,a)}_getLabelBounds(){var t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){var t=this.options,e=t.time,i=t.ticks,s="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const a=this.min,n=vt(s,a,this.max);return this._unit=e.unit||(i.autoSkip?Za(e.minUnit,this.min,this.max,this._getLabelCapacity(a)):function(e,i,s,a,n){for(let t=h.length-1;t>=h.indexOf(s);t--){const s=h[t];if(qa[s].common&&e._adapter.diff(n,a,s)>=i-1)return s}return h[s?h.indexOf(s):0]}(this,n.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(i){for(let t=h.indexOf(i)+1,e=h.length;t<e;++t)if(qa[h[t]].common)return h[t]}(this._unit):void 0,this.initOffsets(s),t.reverse&&n.reverse(),Qa(this,n,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e,i,s=0,a=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),s=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),a=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);t=t.length<3?.5:.25;s=C(s,0,t),a=C(a,0,t),this._offsets={start:s,end:a,factor:1/(s+1+a)}}_generate(){const t=this._adapter,e=this.min,i=this.max,s=this.options,a=s.time,n=a.unit||Za(a.minUnit,e,i,this._getLabelCapacity(e)),o=T(s.ticks.stepSize,1),r="week"===n&&a.isoWeekday,l=rt(r)||!0===r,h={};let c,d,u=e;if(l&&(u=+t.startOf(u,"isoWeek",r)),u=+t.startOf(u,l?"day":n),t.diff(i,e,n)>1e5*o)throw new Error(e+" and "+i+" are too far apart with stepSize of "+o+" "+n);var g="data"===s.ticks.source&&this.getDataTimestamps();for(c=u,d=0;c<i;c=+t.add(c,o,n),d++)Ja(h,c,g);return c!==i&&"ticks"!==s.bounds&&1!==d||Ja(h,c,g),Object.keys(h).sort(Ka).map(t=>+t)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){var i=this.options.time.displayFormats,s=this._unit,e=e||i[s];return this._adapter.format(t,e)}_tickFormatFunction(t,e,i,s){var a=this.options,n=a.ticks.callback;if(n)return d(n,[t,e,i],this);var n=a.time.displayFormats,a=this._unit,o=this._majorUnit,a=a&&n[a],n=o&&n[o],i=i[e],e=o&&n&&i&&i.major;return this._adapter.format(t,s||(e?n:a))}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e<i;++e)(s=t[e]).label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){var e=this._offsets,t=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+t)*e.factor)}getValueForPixel(t){var e=this._offsets,t=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+t*(this.max-this.min)}_getLabelSize(t){var e=this.options.ticks,t=this.ctx.measureText(t).width,e=L(this.isHorizontal()?e.maxRotation:e.minRotation),i=Math.cos(e),e=Math.sin(e),s=this._resolveTickFontOptions(0).size;return{w:t*i+s*e,h:t*e+s*i}}_getLabelCapacity(t){var e=this.options.time,i=e.displayFormats,e=i[e.unit]||i.millisecond,i=this._tickFormatFunction(t,0,Qa(this,[t],this._majorUnit),e),t=this._getLabelSize(i),e=Math.floor(this.isHorizontal()?this.width/t.w:this.height/t.h)-1;return 0<e?e:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,e=s.length;t<e;++t)i=i.concat(s[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;var s=this.getLabels();for(e=0,i=s.length;e<i;++e)t.push(Ga(this,s[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return wt(t.sort(Ka))}}function en(t,e,i){let s,a,n,o,r=0,l=t.length-1;i?(e>=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=f(t,"pos",e)),{pos:s,time:n}=t[r],{pos:a,time:o}=t[l]):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=f(t,"time",e)),{time:s,pos:n}=t[r],{time:a,pos:o}=t[l]);i=a-s;return i?n+(o-n)*(e-s)/i:n}var sn=Object.freeze({__proto__:null,CategoryScale:class extends zs{static id="category";static defaults={ticks:{callback:Ra}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){var e=this._addedLabels;if(e.length){const t=this.getLabels();for(var{index:i,label:s}of e)t[i]===s&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(P(t))return null;var i,s,a,n,o,r,l=this.getLabels();return a=e=isFinite(e)&&l[e]===t?e:(i=l,s=T(e,t=t),a=this._addedLabels,-1===(r=i.indexOf(t))?(o=s,a=a,"string"==typeof(n=t)?(o=i.push(n)-1,a.unshift({index:o,label:n})):isNaN(n)&&(o=null),o):r!==i.lastIndexOf(t)?s:r),n=l.length-1,null===a?null:C(Math.round(a),0,n)}determineDataLimits(){var{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const e=this.min,i=this.max,t=this.options.offset,s=[];let a=this.getLabels();a=0===e&&i===a.length-1?a:a.slice(e,i+1),this._valueRange=Math.max(a.length-(t?0:1),1),this._startValue=this.min-(t?.5:0);for(let t=e;t<=i;t++)s.push({value:t});return s}getLabelForValue(t){return Ra.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return null===(t="number"!=typeof t?this.parse(t):t)?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}},LinearScale:Fa,LogarithmicScale:Ha,RadialLinearScale:Xa,TimeScale:tn,TimeSeriesScale:class extends tn{static id="timeseries";static defaults=tn.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){var t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=en(e,this.min),this._tableRange=en(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,s=[],a=[];let n,o,r,l,h;for(n=0,o=t.length;n<o;++n)(l=t[n])>=e&&l<=i&&s.push(l);if(s.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(n=0,o=s.length;n<o;++n)h=s[n+1],r=s[n-1],l=s[n],Math.round((h+r)/2)!==l&&a.push({time:l,pos:n/(o-1)});return a}_generate(){var t=this.min,e=this.max;let i=super.getDataTimestamps();return i.includes(t)&&i.length||i.splice(0,0,t),i.includes(e)&&1!==i.length||i.push(e),i.sort((t,e)=>t-e)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t}getDecimalForValue(t){return(en(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){var e=this._offsets,t=this.getDecimalForPixel(t)/e.factor-e.end;return en(this._table,t*this._tableRange+this._minPos,!0)}}});const an=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],nn=an.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function on(t){return an[t%an.length]}function rn(t){return nn[t%nn.length]}function ln(n){let o=0;return(t,e)=>{var i,s,a,e=n.getDatasetMeta(e).controller;e instanceof fa?o=(s=t,a=o,s.backgroundColor=s.data.map(()=>on(a++)),a):e instanceof pa?o=(s=t,i=o,s.backgroundColor=s.data.map(()=>rn(i++)),i):e&&(o=(e=t,t=o,e.borderColor=on(t),e.backgroundColor=rn(t),++t))}}function hn(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return 1}var cn={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){if(i.enabled){const{data:{datasets:s},options:a}=t.config,n=a["elements"];!i.forceOverride&&(hn(s)||a&&(a.borderColor||a.backgroundColor)||n&&hn(n))||(i=ln(t),s.forEach(i))}}};function dn(t){var e;t._decimated&&(e=t._data,delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e}))}function un(t){t.data.datasets.forEach(t=>{dn(t)})}var gn={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(r,t,M)=>{if(M.enabled){const l=r.width;r.data.datasets.forEach((e,t)=>{var{_data:i,indexAxis:s}=e,h=r.getDatasetMeta(t),a=i||e.data;if("y"!==ki([s,r.options.indexAxis])&&h.controller.supportsDecimation){t=r.scales[h.xAxisID];if(("linear"===t.type||"time"===t.type)&&!r.options.parsing){var{start:n,count:o}=function(t){var e=t.length;let i,s=0;const a=h["iScale"],{min:n,max:o,minDefined:r,maxDefined:l}=a.getUserBounds();return r&&(s=C(f(t,a.axis,n).lo,0,e-1)),i=l?C(f(t,a.axis,o).hi+1,s,e)-s:e-s,{start:s,count:i}}(a);if(o<=(M.threshold||4*l))dn(e);else{let t;switch(P(i)&&(e._data=a,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),M.algorithm){case"lttb":t=function(s,a,n,t){var e=M.samples||t;if(n<=e)return s.slice(a,a+n);const o=[],r=(n-2)/(e-2);let l=0;const h=a+n-1;let c,d,u,g,f,p=a;for(o[l++]=s[p],c=0;c<e-2;c++){let t,e=0,i=0;const h=Math.floor((c+1)*r)+1+a,_=Math.min(Math.floor((c+2)*r)+1,n)+a,y=_-h;for(t=h;t<_;t++)e+=s[t].x,i+=s[t].y;e/=y,i/=y;var m=Math.floor(c*r)+1+a,b=Math.min(Math.floor((c+1)*r)+1,n)+a,{x,y:v}=s[p];for(u=-1,t=m;t<b;t++)(g=.5*Math.abs((x-e)*(s[t].y-v)-(x-s[t].x)*(i-v)))>u&&(u=g,d=s[t],f=t);o[l++]=d,p=f}return o[l++]=s[h],o}(a,n,o,l);break;case"min-max":t=function(t,e,i,s){let a,n,o,r,l,h,c,d,u,g,f=0,p=0;const m=[],b=e+i-1,x=t[e].x,v=t[b].x-x;for(a=e;a<e+i;++a){o=((n=t[a]).x-x)/v*s,r=n.y;const e=0|o;if(e===l)r<u?(u=r,h=a):r>g&&(g=r,c=a),f=(p*f+n.x)/++p;else{const i=a-1;if(!P(h)&&!P(c)){const e=Math.min(h,c),P=Math.max(h,c);e!==d&&e!==i&&m.push({...t[e],x:f}),P!==d&&P!==i&&m.push({...t[P],x:f})}0<a&&i!==d&&m.push(t[i]),m.push(n),l=e,p=0,u=g=r,h=c=d=a}}return m}(a,n,o,l);break;default:throw new Error(`Unsupported decimation algorithm '${M.algorithm}'`)}e._decimated=t}}}})}else un(r)},destroy(t){un(t)}};function fn(i,s,a,t){if(!t){let t=s[i],e=a[i];return"angle"===i&&(t=v(t),e=v(e)),{property:i,start:t,end:e}}}function pn(t,e,i){for(;t<e;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function mn(t,e,i,s){return t&&e?s(t[i],e[i]):t?t[i]:e?e[i]:0}function bn(e,t){let i=[],s=!1;return(i=O(e)?(s=!0,e):function(t){const{x:i=null,y:s=null}=e||{},a=t.points,n=[];return t.segments.forEach(({start:t,end:e})=>{e=pn(t,e,a);t=a[t],e=a[e];null!==s?(n.push({x:t.x,y:s}),n.push({x:e.x,y:s})):null!==i&&(n.push({x:i,y:t.y}),n.push({x:i,y:e.y}))}),n}(t)).length?new Pa({points:i,options:{tension:0},_loop:s,_fullLoop:s}):null}function xn(t){return t&&!1!==t.fill}function vn(e,i,s){const a=[];for(let t=0;t<s.length;t++){var{first:n,last:o,point:r}=function(t,e,i){const s=t.interpolate(e,i);if(!s)return{};var a=s[i],n=t.segments,o=t.points;let r=!1,l=!1;for(let t=0;t<n.length;t++){const e=n[t],s=o[e.start][i],h=o[e.end][i];if(c(a,s,h)){r=a===s,l=a===h;break}}return{first:r,last:l,point:s}}(s[t],i,"x");if(!(!r||n&&o))if(n)a.unshift(r);else if(e.push(r),!o)break}e.push(...a)}class _n{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){var{x:s,y:a,radius:n}=this;return e=e||{start:0,end:_},t.arc(s,a,n,e.end,e.start,!0),!i.bounds}interpolate(t){var{x:e,y:i,radius:s}=this,t=t.angle;return{x:e+Math.cos(t)*s,y:i+Math.sin(t)*s,angle:t}}}function yn(t){var e,i,{chart:s,fill:a,line:n}=t;if(p(a))return e=a,(i=(s=s).getDatasetMeta(e))&&s.isDatasetVisible(e)?i.dataset:null;if("stack"===a){const{scale:o,index:r,line:l}=t,h=[],c=l.segments,d=l.points,u=function(t,e){const i=[],s=t.getMatchingVisibleMetas("line");for(let t=0;t<s.length;t++){var a=s[t];if(a.index===e)break;a.hidden||i.unshift(a.dataset)}return i}(o,r);u.push(bn({x:null,y:o.bottom},l));for(let t=0;t<c.length;t++){const o=c[t];for(let t=o.start;t<=o.end;t++)vn(h,d[t],u)}return new Pa({points:h,options:{}})}if("shape"===a)return!0;s=function(t){var e=t.scale||{};if(e.getPointPositionForValue){var i=t;const{scale:a,fill:n}=i,o=a.options,r=a.getLabels().length,l=o.reverse?a.max:a.min,h=(i=n,e=a,"start"===i?l:"end"===i?e.options.reverse?e.min:e.max:A(i)?i.value:e.getBaseValue()),c=[];if(o.grid.circular){const i=a.getPointPositionForValue(0,l);return new _n({x:i.x,y:i.y,radius:a.getDistanceFromCenterForValue(h)})}for(let t=0;t<r;++t)c.push(a.getPointPositionForValue(t,h));return c}{var s=t;const{scale:d={},fill:u}=s,g=function(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:A(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}(u,d);if(p(g)){const s=d.isHorizontal();return{x:s?g:null,y:s?null:g}}return null}}(t);return s instanceof _n?s:bn(s,n)}function Mn(t,e,i){var s,a=yn(e),{line:e,scale:n,axis:o}=e,r=e.options,l=r.fill,r=r.backgroundColor,{above:l=r,below:r=r}=l||{};a&&e.points.length&&(Ve(t,i),s=t,{line:a,target:l,above:r,below:i,area:n,scale:o}=e={line:e,target:a,above:l,below:r,area:i,scale:n,axis:o},e=a._loop?"angle":e.axis,s.save(),"x"===e&&i!==r&&(wn(s,l,n.top),kn(s,{line:a,target:l,color:r,scale:o,property:e}),s.restore(),s.save(),wn(s,l,n.bottom)),kn(s,{line:a,target:l,color:i,scale:o,property:e}),s.restore(),Be(t))}function wn(t,e,i){const{segments:s,points:a}=e;let n=!0,o=!1;t.beginPath();for(const r of s){const{start:s,end:l}=r,h=a[s],c=a[pn(s,l,a)];n?(t.moveTo(h.x,h.y),n=!1):(t.lineTo(h.x,i),t.lineTo(h.x,h.y)),(o=!!e.pathSegment(t,r,{move:o}))?t.closePath():t.lineTo(c.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function kn(e,i){const{line:s,target:a,property:n,color:o,scale:r}=i,l=function(t,e,i){const s=t.segments,a=t.points,n=e.points,o=[];for(const t of s){var{start:r,end:l}=t,l=pn(r,l,a),h=fn(i,a[r],a[l],t.loop);if(e.segments){var c=Ei(e,h);for(const e of c){const s=fn(i,n[e.start],n[e.end],e.loop),d=Li(t,a,s);for(const t of d)o.push({source:t,target:e,start:{[i]:mn(h,s,"start",Math.max)},end:{[i]:mn(h,s,"end",Math.min)}})}}else o.push({source:t,target:h,start:a[r],end:a[l]})}return o}(s,a,n);for(const{source:i,target:p,start:m,end:b}of l){const{style:{backgroundColor:l=o}={}}=i,x=!0!==a;e.save(),e.fillStyle=l,f=g=d=u=c=d=c=h=void 0;var h=e,c=r,d=x&&fn(n,m,b),{top:c,bottom:u}=c.chart.chartArea,{property:d,start:g,end:f}=d||{},d=("x"===d&&(h.beginPath(),h.rect(g,c,f-g,u-c),h.clip()),e.beginPath(),!!s.pathSegment(e,i));let t;if(x){d?e.closePath():Sn(e,a,b,n);const i=!!a.pathSegment(e,p,{move:d,reverse:!0});(t=d&&i)||Sn(e,a,m,n)}e.closePath(),e.fill(t?"evenodd":"nonzero"),e.restore()}}function Sn(t,e,i,s){e=e.interpolate(i,s);e&&t.lineTo(e.x,e.y)}var Pn={id:"filler",afterDatasetsUpdate(t,e,i){const s=(t.data.datasets||[]).length,a=[];let n,o,r,l;for(o=0;o<s;++o)r=(n=t.getDatasetMeta(o)).dataset,l=null,r&&r.options&&r instanceof Pa&&(l={visible:t.isDatasetVisible(o),index:o,fill:function(s,t,e){var i=function(){var t=s.options,e=t.fill;let i=T(e&&e.target,e);return!1!==(i=void 0===i?!!t.backgroundColor:i)&&null!==i&&(!0===i?"origin":i)}();if(A(i))return!isNaN(i.value)&&i;var a,n=parseFloat(i);return p(n)&&Math.floor(n)===n?(a=i[0],n=n,!((n="-"!==a&&"+"!==a?n:t+n)===t||n<0||e<=n)&&n):0<=["origin","start","end","stack","shape"].indexOf(i)&&i}(r,o,s),chart:t,axis:n.controller.options.indexAxis,scale:n.vScale,line:r}),n.$filler=l,a.push(l);for(o=0;o<s;++o)(l=a[o])&&!1!==l.fill&&(l.fill=function(t,e,i){let s=t[e].fill;const a=[e];var n;if(!i)return s;for(;!1!==s&&-1===a.indexOf(s);){if(!p(s))return s;if(!(n=t[s]))return!1;if(n.visible)return s;a.push(s),s=n.fill}return!1}(a,o,i.propagate))},beforeDraw(e,t,i){var s="beforeDraw"===i.drawTime,a=e.getSortedVisibleDatasetMetas(),n=e.chartArea;for(let t=a.length-1;0<=t;--t){const i=a[t].$filler;i&&(i.line.updateControlPoints(n,i.axis),s&&i.fill&&Mn(e.ctx,i,n))}},beforeDatasetsDraw(e,t,i){if("beforeDatasetsDraw"===i.drawTime){var s=e.getSortedVisibleDatasetMetas();for(let t=s.length-1;0<=t;--t){const i=s[t].$filler;xn(i)&&Mn(e.ctx,i,e.chartArea)}}},beforeDatasetDraw(t,e,i){e=e.meta.$filler;xn(e)&&"beforeDatasetDraw"===i.drawTime&&Mn(t.ctx,e,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Dn=(t,e)=>{let{boxHeight:i=e,boxWidth:s=e}=t;return t.usePointStyle&&(i=Math.min(i,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:i,itemHeight:Math.max(e,i)}};class Cn extends e{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const i=this.options.labels||{};let t=d(i.generateLabels,[this.chart],this)||[];i.filter&&(t=t.filter(t=>i.filter(t,this.chart.data))),i.sort&&(t=t.sort((t,e)=>i.sort(t,e,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:i,ctx:s}=this;if(i.display){var a=i.labels,n=z(a.font),o=n.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Dn(a,o);let t,e;s.font=n.string,this.isHorizontal()?(t=this.maxWidth,e=this._fitRows(r,o,a,l)+10):(e=this.maxHeight,t=this._fitCols(r,n,a,l)+10),this.width=Math.min(t,i.maxWidth||this.maxWidth),this.height=Math.min(e,i.maxHeight||this.maxHeight)}else this.width=this.height=0}_fitRows(t,i,s,a){const{ctx:n,maxWidth:o,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],h=this.lineWidths=[0],c=a+r;let d=t,u=(n.textAlign="left",n.textBaseline="middle",-1),g=-c;return this.legendItems.forEach((t,e)=>{t=s+i/2+n.measureText(t.text).width;(0===e||h[h.length-1]+t+2*r>o)&&(d+=c,h[h.length-(0<e?0:1)]=0,g+=c,u++),l[e]={left:0,top:g,row:u,width:t,height:a},h[h.length-1]+=t+r}),d}_fitCols(t,r,l,h){const{ctx:c,maxHeight:e,options:{labels:{padding:d}}}=this,u=this.legendHitBoxes=[],g=this.columnSizes=[],f=e-t;let p=d,m=0,b=0,x=0,v=0;return this.legendItems.forEach((t,e)=>{o=l,i=r,s=c,a=t,n=h;var i,s,a,n,{itemWidth:t,itemHeight:o}={itemWidth:function(t,e,i){let s=a.text;return s&&"string"!=typeof s&&(s=s.reduce((t,e)=>t.length>e.length?t:e)),t+e.size/2+i.measureText(s).width}(o,i,s),itemHeight:function(t){let e=n;return e="string"!=typeof a.text?On(a,t):e}(i.lineHeight)};0<e&&b+o+2*d>f&&(p+=m+d,g.push({width:m,height:b}),x+=m+d,v++,m=b=0),u[e]={left:x,top:b,col:v,width:t,height:o},m=Math.max(m,t),b+=o+d}),p+=m,g.push({width:m,height:b}),p}adjustHitBoxes(){if(this.options.display){const i=this._computeTitleHeight(),{legendHitBoxes:s,options:{align:a,labels:{padding:n},rtl:t}}=this,o=Di(t,this.left,this.width);if(this.isHorizontal()){let t=0,e=E(a,this.left+n,this.right-this.lineWidths[t]);for(const r of s)t!==r.row&&(t=r.row,e=E(a,this.left+n,this.right-this.lineWidths[t])),r.top+=this.top+i+n,r.left=o.leftForLtr(o.x(e),r.width),e+=r.width+n}else{let t=0,e=E(a,this.top+i+n,this.bottom-this.columnSizes[t].height);for(const l of s)l.col!==t&&(t=l.col,e=E(a,this.top+i+n,this.bottom-this.columnSizes[t].height)),l.top=e,l.left+=this.left+n,l.left=o.leftForLtr(o.x(l.left),l.width),e+=l.height+n}}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){var t;this.options.display&&(Ve(t=this.ctx,this),this._draw(),Be(t))}_draw(){const{options:h,columnSizes:c,lineWidths:d,ctx:u}=this,{align:g,labels:f}=h,p=R.color,m=Di(h.rtl,this.left,this.width),b=z(f.font),x=f["padding"],v=b.size,_=v/2;let y;this.drawTitle(),u.textAlign=m.textAlign("left"),u.textBaseline="middle",u.lineWidth=.5,u.font=b.string;const{boxWidth:M,boxHeight:w,itemHeight:k}=Dn(f,v),S=this.isHorizontal(),P=this._computeTitleHeight(),D=(y=S?{x:E(g,this.left+x,this.right-d[0]),y:this.top+x+P,line:0}:{x:this.left+x,y:E(g,this.top+P+x,this.bottom-c[0].height),line:0},Ci(this.ctx,h.textDirection),k+x);this.legendItems.forEach((t,e)=>{u.strokeStyle=t.fontColor,u.fillStyle=t.fontColor;var i=u.measureText(t.text).width,s=m.textAlign(t.textAlign||(t.textAlign=f.textAlign)),i=M+_+i;let a=y.x,n=y.y;m.setWidth(this.width),S?0<e&&a+i+x>this.right&&(n=y.y+=D,y.line++,a=y.x=E(g,this.left+x,this.right-d[y.line])):0<e&&n+D>this.bottom&&(a=y.x=a+c[y.line].width+x,y.line++,n=y.y=E(g,this.top+P+x,this.bottom-c[y.line].height));var e=m.x(a),o=n,r=t;if(!(isNaN(M)||M<=0||isNaN(w)||w<0)){u.save();var l=T(r.lineWidth,1);if(u.fillStyle=T(r.fillStyle,p),u.lineCap=T(r.lineCap,"butt"),u.lineDashOffset=T(r.lineDashOffset,0),u.lineJoin=T(r.lineJoin,"miter"),u.lineWidth=l,u.strokeStyle=T(r.strokeStyle,p),u.setLineDash(T(r.lineDash,[])),f.usePointStyle){const p={radius:w*Math.SQRT2/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:l},T=m.xPlus(e,M/2);Fe(u,p,T,o+_,f.pointStyleWidth&&M)}else{const f=o+Math.max((v-w)/2,0),p=m.leftForLtr(e,M),T=wi(r.borderRadius);u.beginPath(),Object.values(T).some(t=>0!==t)?je(u,{x:p,y:f,w:M,h:w,radius:T}):u.rect(p,f,M,w),u.fill(),0!==l&&u.stroke()}u.restore()}if(a=Ct(s,a+M+_,S?a+i:this.right,h.rtl),o=m.x(a),e=n,r=t,He(u,r.text,o,e+k/2,b,{strikethrough:r.hidden,textAlign:m.textAlign(r.textAlign)}),S)y.x+=i+x;else if("string"!=typeof t.text){const h=b.lineHeight;y.y+=On(t,h)+x}else y.y+=D}),Oi(this.ctx,h.textDirection)}drawTitle(){const s=this.options,a=s.title,n=z(a.font),o=I(a.padding);if(a.display){const l=Di(s.rtl,this.left,this.width),h=this.ctx,c=a.position,d=n.size/2,u=o.top+d;let t,e=this.left,i=this.width;if(this.isHorizontal())i=Math.max(...this.lineWidths),t=this.top+u,e=E(s.align,e,this.right-i);else{const a=this.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);t=u+E(s.align,this.top,this.bottom-a-s.labels.padding-this._computeTitleHeight())}var r=E(c,e,e+i);h.textAlign=l.textAlign(Dt(c)),h.textBaseline="middle",h.strokeStyle=a.color,h.fillStyle=a.color,h.font=n.string,He(h,a.text,r,t,n)}}_computeTitleHeight(){var t=this.options.title,e=z(t.font),i=I(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,a;if(c(t,this.left,this.right)&&c(e,this.top,this.bottom))for(a=this.legendHitBoxes,i=0;i<a.length;++i)if(c(t,(s=a[i]).left,s.left+s.width)&&c(e,s.top,s.top+s.height))return this.legendItems[i];return null}handleEvent(t){var e,i,s,a=this.options;("mousemove"!==(e=t.type)&&"mouseout"!==e||!a.onHover&&!a.onLeave)&&(!a.onClick||"click"!==e&&"mouseup"!==e)||(e=this._getLegendItemAt(t.x,t.y),"mousemove"===t.type||"mouseout"===t.type?(s=null!==(i=this._hoveredItem)&&null!==e&&i.datasetIndex===e.datasetIndex&&i.index===e.index,i&&!s&&d(a.onLeave,[t,i,this],this),(this._hoveredItem=e)&&!s&&d(a.onHover,[t,e,this],this)):e&&d(a.onClick,[t,e,this],this))}}function On(t,e){return e*(t.text?t.text.length:0)}var An={id:"legend",_element:Cn,start(t,e,i){var s=t.legend=new Cn({ctx:t.ctx,options:i,chart:t});a.configure(t,s,i),a.addBox(t,s)},stop(t){a.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const s=t.legend;a.configure(t,s,i),s.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const s=e.datasetIndex,a=i.chart;a.isDatasetVisible(s)?(a.hide(s),e.hidden=!0):(a.show(s),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const s=t.data.datasets,{usePointStyle:a,pointStyle:n,textAlign:o,color:r,useBorderRadius:l,borderRadius:h}=t.legend.options["labels"];return t._getSortedDatasetMetas().map(t=>{var e=t.controller.getStyle(a?0:void 0),i=I(e.borderWidth);return{text:s[t.index].label,fillStyle:e.backgroundColor,fontColor:r,hidden:!t.visible,lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:(i.width+i.height)/4,strokeStyle:e.borderColor,pointStyle:n||e.pointStyle,rotation:e.rotation,textAlign:o||e.textAlign,borderRadius:l&&(h||e.borderRadius),datasetIndex:t.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Tn extends e{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){var i=this.options;this.left=0,this.top=0,i.display?(this.width=this.right=t,this.height=this.bottom=e,t=O(i.text)?i.text.length:1,this._padding=I(i.padding),e=t*z(i.font).lineHeight+this._padding.height,this.isHorizontal()?this.height=e:this.width=e):this.width=this.height=this.right=this.bottom=0}isHorizontal(){var t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){var{top:e,left:i,bottom:s,right:a,options:n}=this,o=n.align;let r,l,h,c=0;return r=this.isHorizontal()?(l=E(o,i,a),h=e+t,a-i):(c="left"===n.position?(l=i+t,h=E(o,s,e),-.5*S):(l=a-t,h=E(o,e,s),.5*S),s-e),{titleX:l,titleY:h,maxWidth:r,rotation:c}}draw(){var t,e,i,s,a,n=this.ctx,o=this.options;o.display&&(e=(t=z(o.font)).lineHeight/2+this._padding.top,{titleX:e,titleY:i,maxWidth:s,rotation:a}=this._drawArgs(e),He(n,o.text,0,0,t,{color:o.color,maxWidth:s,rotation:a,textAlign:Dt(o.align),textBaseline:"middle",translation:[e,i]}))}}var Ln={id:"title",_element:Tn,start(t,e,i){var s;t=t,i=i,s=new Tn({ctx:t.ctx,options:i,chart:t}),a.configure(t,s,i),a.addBox(t,s),t.titleBlock=s},stop(t){var e=t.titleBlock;a.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const s=t.titleBlock;a.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const En=new WeakMap;var Rn={id:"subtitle",start(t,e,i){var s=new Tn({ctx:t.ctx,options:i,chart:t});a.configure(t,s,i),a.addBox(t,s),En.set(t,s)},stop(t){a.removeBox(t,En.get(t)),En.delete(t)},beforeUpdate(t,e,i){const s=En.get(t);a.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const In={average(t){if(!t.length)return!1;let e,i,s=0,a=0,n=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();s+=t.x,a+=t.y,++n}}return{x:s/n,y:a/n}},nearest(t,e){if(!t.length)return!1;let i,s,a,n=e.x,o=e.y,r=Number.POSITIVE_INFINITY;for(i=0,s=t.length;i<s;++i){const s=t[i].element;if(s&&s.hasValue()){const t=gt(e,s.getCenterPoint());t<r&&(r=t,a=s)}}if(a){const t=a.tooltipPosition();n=t.x,o=t.y}return{x:n,y:o}}};function x(t,e){return e&&(O(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function zn(t){return("string"==typeof t||t instanceof String)&&-1<t.indexOf("\n")?t.split("\n"):t}function Fn(t,e){const i=t.chart.ctx,{body:s,footer:a,title:n}=t,{boxWidth:o,boxHeight:r}=e,l=z(e.bodyFont),h=z(e.titleFont),c=z(e.footerFont),d=n.length,u=a.length,g=s.length,f=I(e.padding);let p=f.height,m=0,b=s.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0),x=(b+=t.beforeBody.length+t.afterBody.length,d&&(p+=d*h.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),b&&(p+=g*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(b-g)*l.lineHeight+(b-1)*e.bodySpacing),u&&(p+=e.footerMarginTop+u*c.lineHeight+(u-1)*e.footerSpacing),0);function v(t){m=Math.max(m,i.measureText(t).width+x)}return i.save(),i.font=h.string,k(t.title,v),i.font=l.string,k(t.beforeBody.concat(t.afterBody),v),x=e.displayColors?o+2+e.boxPadding:0,k(s,t=>{k(t.before,v),k(t.lines,v),k(t.after,v)}),x=0,i.font=c.string,k(t.footer,v),i.restore(),{width:m+=f.width,height:p}}function Vn(i,t,s){var e=s.yAlign||t.yAlign||function(){var{y:t,height:e}=s;return t<e/2?"top":t>i.height-e/2?"bottom":"center"}();return{xAlign:s.xAlign||t.xAlign||function(a,n,o,t){var{x:e,width:i}=o,{width:s,chartArea:{left:r,right:l}}=a;let h="center";return"center"===t?h=e<=(r+l)/2?"left":"right":e<=i/2?h="left":s-i/2<=e&&(h="right"),h=function(t){var{x:e,width:i}=o,s=n.caretSize+n.caretPadding;return"left"===t&&e+i+s>a.width||"right"===t&&e-i-s<0}(h)?"center":h}(i,t,s,e),yAlign:e}}function Bn(t,i,e,s){var{caretSize:t,caretPadding:a,cornerRadius:n}=t,{xAlign:o,yAlign:r}=e,l=t+a,{topLeft:e,topRight:a,bottomLeft:n,bottomRight:h}=wi(n);let c=function(){let{x:t,width:e}=i;return"right"===o?t-=e:"center"===o&&(t-=e/2),t}();var d=function(){let{y:t,height:e}=i;return"top"===r?t+=l:t-="bottom"===r?e+l:e/2,t}();return"center"===r?"left"===o?c+=l:"right"===o&&(c-=l):"left"===o?c-=Math.max(e,n)+t:"right"===o&&(c+=Math.max(a,h)+t),{x:C(c,0,s.width-i.width),y:C(d,0,s.height-i.height)}}function Wn(t,e,i){i=I(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-i.right:t.x+i.left}function Nn(t){return x([],zn(t))}function Hn(t,e){e=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return e?t.override(e):t}const jn={beforeTitle:t,title(t){if(0<t.length){var t=t[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(0<i&&t.dataIndex<i)return e[t.dataIndex]}return""},afterTitle:t,beforeBody:t,beforeLabel:t,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");t=t.formattedValue;return P(t)||(e+=t),e},labelColor(t){t=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){t=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:t,afterBody:t,beforeFooter:t,footer:t,afterFooter:t};function w(t,e,i,s){t=t[e].call(i,s);return void 0===t?jn[e].call(i,s):t}class Yn extends e{static positioners=In;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){var t=this._cachedAnimations;if(t)return t;var t=this.chart,e=this.options.setContext(this.getContext()),t=e.enabled&&t.options.animation&&e.animations,e=new xs(this.chart,t);return t._cacheable&&(this._cachedAnimations=Object.freeze(e)),e}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),Pi(t,{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"})));var t}getTitle(t,e){var e=e["callbacks"],i=w(e,"beforeTitle",this,t),s=w(e,"title",this,t),e=w(e,"afterTitle",this,t),t=x([],zn(i));return t=x(t,zn(s)),x(t,zn(e))}getBeforeBody(t,e){return Nn(w(e.callbacks,"beforeBody",this,t))}getBody(t,e){const s=e["callbacks"],a=[];return k(t,t=>{var e={before:[],lines:[],after:[]},i=Hn(s,t);x(e.before,zn(w(i,"beforeLabel",this,t))),x(e.lines,w(i,"label",this,t)),x(e.after,zn(w(i,"afterLabel",this,t))),a.push(e)}),a}getAfterBody(t,e){return Nn(w(e.callbacks,"afterBody",this,t))}getFooter(t,e){var e=e["callbacks"],i=w(e,"beforeFooter",this,t),s=w(e,"footer",this,t),e=w(e,"afterFooter",this,t),t=x([],zn(i));return t=x(t,zn(s)),x(t,zn(e))}_createItems(s){const t=this._active,a=this.chart.data,i=[],n=[],o=[];let e,r,l=[];for(e=0,r=t.length;e<r;++e)l.push(function(t,e){const{element:i,datasetIndex:s,index:a}=e,n=t.getDatasetMeta(s).controller,{label:o,value:r}=n.getLabelAndValue(a);return{chart:t,label:o,parsed:n.getParsed(a),raw:t.data.datasets[s].data[a],formattedValue:r,dataset:n.getDataset(),dataIndex:a,datasetIndex:s,element:i}}(this.chart,t[e]));return s.filter&&(l=l.filter((t,e,i)=>s.filter(t,e,i,a))),k(l=s.itemSort?l.sort((t,e)=>s.itemSort(t,e,a)):l,t=>{var e=Hn(s.callbacks,t);i.push(w(e,"labelColor",this,t)),n.push(w(e,"labelPointStyle",this,t)),o.push(w(e,"labelTextColor",this,t))}),this.labelColors=i,this.labelPointStyles=n,this.labelTextColors=o,this.dataPoints=l}update(t,e){const i=this.options.setContext(this.getContext()),s=this._active;let a,n=[];if(s.length){const t=In[i.position].call(this,s,this._eventPosition),e=(n=this._createItems(i),this.title=this.getTitle(n,i),this.beforeBody=this.getBeforeBody(n,i),this.body=this.getBody(n,i),this.afterBody=this.getAfterBody(n,i),this.footer=this.getFooter(n,i),this._size=Fn(this,i)),o=Object.assign({},t,e),r=Vn(this.chart,i,o),l=Bn(i,o,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,a={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(a={opacity:0});this._tooltipItems=n,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){t=this.getCaretPosition(t,i,s);e.lineTo(t.x1,t.y1),e.lineTo(t.x2,t.y2),e.lineTo(t.x3,t.y3)}getCaretPosition(t,e,i){var{xAlign:s,yAlign:a}=this,{caretSize:i,cornerRadius:n}=i,{topLeft:n,topRight:o,bottomLeft:r,bottomRight:l}=wi(n),{x:t,y:h}=t,{width:e,height:c}=e;let d,u,g,f,p,m;return"center"===a?(p=h+c/2,m="left"===s?(d=t,u=d-i,f=p+i,p-i):(d=t+e,u=d+i,f=p-i,p+i),g=d):(u="left"===s?t+Math.max(n,r)+i:"right"===s?t+e-Math.max(o,l)-i:this.caretX,g="top"===a?(f=h,p=f-i,d=u-i,u+i):(f=h+c,p=f+i,d=u+i,u-i),m=f),{x1:d,x2:u,x3:g,y1:f,y2:p,y3:m}}drawTitle(t,e,i){var s=this.title,a=s.length;let n,o,r;if(a){const l=Di(i.rtl,this.x,this.width);for(t.x=Wn(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",n=z(i.titleFont),o=i.titleSpacing,e.fillStyle=i.titleColor,e.font=n.string,r=0;r<a;++r)e.fillText(s[r],l.x(t.x),t.y+n.lineHeight/2),t.y+=n.lineHeight+o,r+1===a&&(t.y+=i.titleMarginBottom-o)}}_drawColorBox(t,e,i,s,a){const n=this.labelColors[i],o=this.labelPointStyles[i],{boxHeight:r,boxWidth:l}=a,h=z(a.bodyFont),c=Wn(this,"left",a),d=s.x(c),u=r<h.lineHeight?(h.lineHeight-r)/2:0,g=e.y+u;if(a.usePointStyle){const e={radius:Math.min(l,r)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},i=s.leftForLtr(d,l)+l/2,A=g+r/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,ze(t,e,i,A),t.strokeStyle=n.borderColor,t.fillStyle=n.backgroundColor,ze(t,e,i,A)}else{t.lineWidth=A(n.borderWidth)?Math.max(...Object.values(n.borderWidth)):n.borderWidth||1,t.strokeStyle=n.borderColor,t.setLineDash(n.borderDash||[]),t.lineDashOffset=n.borderDashOffset||0;const e=s.leftForLtr(d,l),i=s.leftForLtr(s.xPlus(d,1),l-2),o=wi(n.borderRadius);Object.values(o).some(t=>0!==t)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,je(t,{x:e,y:g,w:l,h:r,radius:o}),t.fill(),t.stroke(),t.fillStyle=n.backgroundColor,t.beginPath(),je(t,{x:i,y:g+1,w:l-2,h:r-2,radius:o}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(e,g,l,r),t.strokeRect(e,g,l,r),t.fillStyle=n.backgroundColor,t.fillRect(i,g+1,l-2,r-2))}t.fillStyle=this.labelTextColors[i]}drawBody(e,i,t){const s=this["body"],{bodySpacing:a,bodyAlign:n,displayColors:o,boxHeight:r,boxWidth:l,boxPadding:h}=t,c=z(t.bodyFont);let d=c.lineHeight,u=0;function g(t){i.fillText(t,f.x(e.x+u),e.y+d/2),e.y+=d+a}const f=Di(t.rtl,this.x,this.width),p=f.textAlign(n);let m,b,x,v,_,y,M;for(i.textAlign=n,i.textBaseline="middle",i.font=c.string,e.x=Wn(this,p,t),i.fillStyle=t.bodyColor,k(this.beforeBody,g),u=o&&"right"!==p?"center"===n?l/2+h:l+2+h:0,v=0,y=s.length;v<y;++v){for(m=s[v],b=this.labelTextColors[v],i.fillStyle=b,k(m.before,g),x=m.lines,o&&x.length&&(this._drawColorBox(i,e,v,f,t),d=Math.max(c.lineHeight,r)),_=0,M=x.length;_<M;++_)g(x[_]),d=c.lineHeight;k(m.after,g)}u=0,d=c.lineHeight,k(this.afterBody,g),e.y-=a}drawFooter(t,e,i){var s=this.footer,a=s.length;let n,o;if(a){const r=Di(i.rtl,this.x,this.width);for(t.x=Wn(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=r.textAlign(i.footerAlign),e.textBaseline="middle",n=z(i.footerFont),e.fillStyle=i.footerColor,e.font=n.string,o=0;o<a;++o)e.fillText(s[o],r.x(t.x),t.y+n.lineHeight/2),t.y+=n.lineHeight+i.footerSpacing}}drawBackground(t,e,i,s){var{xAlign:a,yAlign:n}=this,{x:o,y:r}=t,{width:l,height:h}=i,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:g}=wi(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(o+c,r),"top"===n&&this.drawCaret(t,e,i,s),e.lineTo(o+l-d,r),e.quadraticCurveTo(o+l,r,o+l,r+d),"center"===n&&"right"===a&&this.drawCaret(t,e,i,s),e.lineTo(o+l,r+h-g),e.quadraticCurveTo(o+l,r+h,o+l-g,r+h),"bottom"===n&&this.drawCaret(t,e,i,s),e.lineTo(o+u,r+h),e.quadraticCurveTo(o,r+h,o,r+h-u),"center"===n&&"left"===a&&this.drawCaret(t,e,i,s),e.lineTo(o,r+c),e.quadraticCurveTo(o,r,o+c,r),e.closePath(),e.fill(),0<s.borderWidth&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,s=i&&i.x,a=i&&i.y;if(s||a){const i=In[t.position].call(this,this._active,this._eventPosition);var n,o;i&&(n=this._size=Fn(this,t),o=Bn(t,o=Object.assign({},i,this._size),t=Vn(e,t,o),e),s._to===o.x&&a._to===o.y||(this.xAlign=t.xAlign,this.yAlign=t.yAlign,this.width=n.width,this.height=n.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,o)))}}_willRender(){return!!this.opacity}draw(t){var e=this.options.setContext(this.getContext());let i=this.opacity;if(i){this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;var s=I(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,n,e),Ci(t,e.textDirection),o.y+=s.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Oi(t,e.textDirection),t.restore())}}getActiveElements(){return this._active||[]}setActiveElements(t,e){var i=this._active,t=t.map(({datasetIndex:t,index:e})=>{var i=this.chart.getDatasetMeta(t);if(i)return{datasetIndex:t,element:i.data[e],index:e};throw new Error("Cannot find a dataset at index "+t)}),i=!W(i,t),s=this._positionChanged(t,e);(i||s)&&(this._active=t,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;var s=this.options,a=this._active||[],i=this._getActiveElements(t,a,e,i),n=this._positionChanged(i,t),a=e||!W(i,a)||n;return a&&(this._active=i,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),a}_getActiveElements(t,e,i,s){var a=this.options;if("mouseout"===t.type)return[];if(!s)return e;const n=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&n.reverse(),n}_positionChanged(t,e){var{caretX:i,caretY:s,options:a}=this,a=In[a.position].call(this,t,e);return!1!==a&&(i!==a.x||s!==a.y)}}var $n={id:"tooltip",_element:Yn,positioners:In,afterInit(t,e,i){i&&(t.tooltip=new Yn({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;var i;e&&e._willRender()&&(!(i={tooltip:e})!==t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0})&&(e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)))},afterEvent(t,e){var i;t.tooltip&&(i=e.replay,t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0))},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:jn},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};return i.register(ma,sn,Ea,s),i.helpers={...Fi},i._adapters=la,i.Animation=bs,i.Animations=xs,i.animator=l,i.controllers=b.controllers.items,i.DatasetController=Os,i.Element=e,i.elements=Ea,i.Interaction=Hi,i.layouts=a,i.platforms=Oe,i.Scale=zs,i.Ticks=ge,Object.assign(i,ma,sn,Ea,s,Oe),i.Chart=i,"undefined"!=typeof window&&(window.Chart=i),i});
\ No newline at end of file
public/scripts/ol-min.js
+1039
-1
@@ -1 +1,1039 @@
1
-!function(t,e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define([],e):t.ol=e()}(this,function(){var F={},k=this;function t(t,e){var o,i=F;(t=t.split("."))[0]in(i=i||k)||!i.execScript||i.execScript("var "+t[0]);for(;t.length&&(o=t.shift());)t.length||void 0===e?i=i[o]&&i[o]!==Object.prototype[o]?i[o]:i[o]={}:i[o]=e}function G(t,e){return e<t?1:t<e?-1:0}function D(t,e){return 0<=t.indexOf(e)}function B(t,e,o){var i=t.length;if(t[0]<=e)return 0;if(!(e<=t[i-1]))if(0<o){for(o=1;o<i;++o)if(t[o]<e)return o-1}else if(o<0){for(o=1;o<i;++o)if(t[o]<=e)return o}else for(o=1;o<i;++o){if(t[o]==e)return o;if(t[o]<e)return t[o-1]-e<e-t[o]?o-1:o}return i-1}function X(t,e){var o=Array.isArray(e)?e:[e],i=o.length;for(e=0;e<i;e++)t[t.length]=o[e]}function V(t,e){-1<(e=t.indexOf(e))&&t.splice(e,1)}function W(t,e){for(var o,i=t.length>>>0,r=0;r<i;r++)if(e(o=t[r],r,t))return o;return null}function Z(t,e){var o=t.length;if(o===e.length){for(var i=0;i<o;i++)if(t[i]!==e[i])return;return 1}}function K(t){for(var o=ks,e=t.length,i=Array(t.length),r=0;r<e;r++)i[r]={index:r,value:t[r]};for(i.sort(function(t,e){return o(t.value,e.value)||t.index-e.index}),r=0;r<t.length;r++)t[r]=i[r].value}function z(o,i){var r;return o.every(function(t,e){return!i(t,r=e,o)})?-1:r}function e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t}function Y(){}function U(t){return t.Vo||(t.Vo=++H)}var H=0;function q(t){this.message="Assertion failed. See https://openlayers.org/en/v4.2.0/doc/errors/#"+t+" for details.",this.code=t,this.name="AssertionError"}function O(t,e){if(!t)throw new q(e)}function J(t,e,o,i){this.ca=t,this.$=e,this.da=o,this.ia=i}function _(t,e,o){return t.ca<=e&&e<=t.$&&t.da<=o&&o<=t.ia}function $(t,e){return t.ca<=e.$&&t.$>=e.ca&&t.da<=e.ia&&t.ia>=e.da}function Q(t,e,o){return Math.min(Math.max(t,e),o)}e(q,Error);var tt="cosh"in Math?Math.cosh:function(t){return((t=Math.exp(t))+1/t)/2};function et(t,e,o,i,r,n){var s,a=r-o,p=n-i;return(a||p)&&(1<(s=((t-o)*a+(e-i)*p)/(a*a+p*p))?(o=r,i=n):0<s&&(o+=a*s,i+=p*s)),ot(t,e,o,i)}function ot(t,e,o,i){return(t=o-t)*t+(e=i-e)*e}function it(t){return t*Math.PI/180}function rt(t,e){return(t%=e)*e<0?t+e:t}function nt(t,e,o){return t+o*(e-t)}function st(t,e,o){return(o=void 0===o?[0,0]:o)[0]=t[0]+2*e,o[1]=t[1]+2*e,o}function at(t,e,o){return(o=void 0===o?[0,0]:o)[0]=t[0]*e+.5|0,o[1]=t[1]*e+.5|0,o}function pt(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:e[0]=e[1]=t,e)}function ht(t){for(var e=vt(),o=0,i=t.length;o<i;++o)Pt(e,t[o]);return e}function lt(t,e,o){return o?(o[0]=t[0]-e,o[1]=t[1]-e,o[2]=t[2]+e,o[3]=t[3]+e,o):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function ut(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function ct(t,e,o){return(e=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*e+(t=o<t[1]?t[1]-o:t[3]<o?o-t[3]:0)*t}function ft(t,e){return gt(t,e[0],e[1])}function yt(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function gt(t,e,o){return t[0]<=e&&e<=t[2]&&t[1]<=o&&o<=t[3]}function dt(t,e){var o=t[1],i=t[2],r=t[3],n=e[0],s=(e=e[1],0);return n<t[0]?s|=16:i<n&&(s|=4),e<o?s|=8:r<e&&(s|=2),s=s||1}function vt(){return[1/0,1/0,-1/0,-1/0]}function bt(t,e,o,i,r){return r?(r[0]=t,r[1]=e,r[2]=o,r[3]=i,r):[t,e,o,i]}function mt(t){return bt(1/0,1/0,-1/0,-1/0,t)}function wt(t,e){var o=t[0];return bt(o,t=t[1],o,t,e)}function xt(t,e,o,i,r){return At(r=mt(r),t,e,o,i)}function St(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function Mt(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function Pt(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function At(t,e,o,i,r){for(;o<i;o+=r){var n=t,s=e[o],a=e[o+1];n[0]=Math.min(n[0],s),n[1]=Math.min(n[1],a),n[2]=Math.max(n[2],s),n[3]=Math.max(n[3],a)}return t}function Et(t,e,o){return e.call(o,jt(t))||e.call(o,Ct(t))||e.call(o,kt(t))||e.call(o,Ft(t))||!1}function Tt(t){var e=0;return e=Ut(t)?e:Dt(t)*It(t)}function jt(t){return[t[0],t[1]]}function Ct(t){return[t[2],t[1]]}function Lt(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function Rt(t,e,o,i,r){var n=e*i[0]/2,s=(i=e*i[1]/2,e=Math.cos(o),Math.sin(o)),a=(o=n*e,n*=s,e*=i,i*s),p=t[0],h=t[1],a=(t=p-o+a,i=p-o-a,s=p+o-a,o=p+o+a,h-n-e),p=h-n+e,l=h+n+e,n=h+n-e;return bt(Math.min(t,i,s,o),Math.min(a,p,l,n),Math.max(t,i,s,o),Math.max(a,p,l,n),r)}function It(t){return t[3]-t[1]}function Nt(t,e,o){return o=o||vt(),Ot(t,e)&&(o[0]=(t[0]>e[0]?t:e)[0],o[1]=(t[1]>e[1]?t:e)[1],o[2]=(t[2]<e[2]?t:e)[2],o[3]=(t[3]<e[3]?t:e)[3]),o}function Ft(t){return[t[0],t[3]]}function kt(t){return[t[2],t[3]]}function Dt(t){return t[2]-t[0]}function Ot(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function Ut(t){return t[2]<t[0]||t[3]<t[1]}function Gt(t,e){var o=(t[2]-t[0])/2*(e-1);e=(t[3]-t[1])/2*(e-1),t[0]-=o,t[2]+=o,t[1]-=e,t[3]+=e}function Bt(t,e,o){e(t=[t[0],t[1],t[0],t[3],t[2],t[1],t[2],t[3]],t,2);var i=[t[0],t[2],t[4],t[6]],r=[t[1],t[3],t[5],t[7]];return bt(e=Math.min.apply(null,i),t=Math.min.apply(null,r),Math.max.apply(null,i),Math.max.apply(null,r),o)}var Xt="function"==typeof Object.assign?Object.assign:function(t,e){if(!t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(t),i=1,r=arguments.length;i<r;++i){var n=arguments[i];if(null!=n)for(var s in n)n.hasOwnProperty(s)&&(o[s]=n[s])}return o};function Vt(t){for(var e in t)delete t[e]}function Wt(t){var e,o=[];for(e in t)o.push(t[e]);return o}function Zt(t){for(var e in t)return!1;return!e}function Kt(t){this.radius=t}Kt.prototype.a=function(t){for(var e=0,o=t.length,i=t[o-1][0],r=t[o-1][1],n=0;n<o;n++)var s=t[n][0],a=t[n][1],e=e+it(s-i)*(2+Math.sin(it(r))+Math.sin(it(a))),i=s,r=a;return e*this.radius*this.radius/2},Kt.prototype.b=function(t,e){var o=it(t[1]),i=it(e[1]),r=(i-o)/2;return t=it(e[0]-t[0])/2,o=Math.sin(r)*Math.sin(r)+Math.sin(t)*Math.sin(t)*Math.cos(o)*Math.cos(i),2*this.radius*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))},Kt.prototype.offset=function(t,e,o){var i=it(t[1]),r=(e/=this.radius,Math.asin(Math.sin(i)*Math.cos(e)+Math.cos(i)*Math.sin(e)*Math.cos(o)));return[180*(it(t[0])+Math.atan2(Math.sin(o)*Math.sin(e)*Math.cos(i),Math.cos(e)-Math.sin(i)*Math.sin(r)))/Math.PI,180*r/Math.PI]};var zt=new Kt(6370997),Yt={},Ht=(Yt.degrees=2*Math.PI*zt.radius/360,Yt.ft=.3048,Yt.m=1,Yt["us-ft"]=1200/3937,null);function qt(t){this.mb=t.code,this.a=t.units,this.f=void 0!==t.extent?t.extent:null,this.g=void 0!==t.worldExtent?t.worldExtent:null,this.b=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.c=void 0!==t.global&&t.global,this.i=!(!this.c||!this.f),this.o=t.getPointResolution,this.j=null,this.l=t.metersPerUnit;var e=t.code,o=Ht||window.proj4;"function"==typeof o&&void 0!==(e=o.defs(e))&&(void 0!==e.axis&&void 0===t.axisOrientation&&(this.b=e.axis),void 0===t.metersPerUnit&&(this.l=e.to_meter),void 0===t.units)&&(this.a=e.units)}function Jt(t){qt.call(this,{code:t,units:"m",extent:$t,global:!0,worldExtent:Qt,getPointResolution:function(t,e){return t/tt(e[1]/6378137)}})}(r=qt.prototype).Jk=function(){return this.mb},r.G=function(){return this.f},r.Un=function(){return this.a},r.sc=function(){return this.l||Yt[this.a]},r.tl=function(){return this.g},r.dm=function(){return this.c},r.$p=function(t){this.c=t,this.i=!(!t||!this.f)},r.Vn=function(t){this.f=t,this.i=!(!this.c||!t)},r.kq=function(t){this.g=t},r.Zp=function(t){this.o=t},e(Jt,qt);var _t=6378137*Math.PI,$t=[-_t,-_t,_t,_t],Qt=[-180,-85,180,85],te="EPSG:3857 EPSG:102100 EPSG:102113 EPSG:900913 urn:ogc:def:crs:EPSG:6.18:3:3857 urn:ogc:def:crs:EPSG::3857 http://www.opengis.net/gml/srs/epsg.xml#3857".split(" ").map(function(t){return new Jt(t)});function ee(t,e,o){var i=t.length;o=1<o?o:2,void 0===e&&(e=2<o?t.slice():Array(i));for(var r=0;r<i;r+=o){e[r]=_t*t[r]/180;var n=6378137*Math.log(Math.tan(Math.PI*(t[r+1]+90)/360));_t<n?n=_t:n<-_t&&(n=-_t),e[r+1]=n}return e}function oe(t,e,o){var i=t.length;o=1<o?o:2,void 0===e&&(e=2<o?t.slice():Array(i));for(var r=0;r<i;r+=o)e[r]=180*t[r]/_t,e[r+1]=360*Math.atan(Math.exp(t[r+1]/6378137))/Math.PI-90;return e}var ie=new Kt(6378137);function re(t,e){qt.call(this,{code:t,units:"degrees",extent:ne,axisOrientation:e,global:!0,metersPerUnit:se,worldExtent:ne})}e(re,qt);var ne=[-180,-90,180,90],se=Math.PI*ie.radius/180,ae=[new re("CRS:84"),new re("EPSG:4326","neu"),new re("urn:ogc:def:crs:EPSG::4326","neu"),new re("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new re("urn:ogc:def:crs:OGC:1.3:CRS84"),new re("urn:ogc:def:crs:OGC:2:84"),new re("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new re("urn:x-ogc:def:crs:EPSG:4326","neu")],pe={},he={};function le(t,e,o){t=t.mb,e=e.mb,t in he||(he[t]={}),he[t][e]=o}function ue(t,e){var o;return o=t in he&&e in he[t]?he[t][e]:o}function ce(t,e,o){var i=(t=v(t)).o;return i?e=i(e,o):"degrees"!=t.a&&(e=(i=we(t,v("EPSG:4326")))(e=[o[0]-e/2,o[1],o[0]+e/2,o[1],o[0],o[1]-e/2,o[0],o[1]+e/2],e,2),e=(zt.b(e.slice(0,2),e.slice(2,4))+zt.b(e.slice(4,6),e.slice(6,8)))/2,void 0!==(t=t.sc()))&&(e/=t),e}function fe(t){t.forEach(ye),t.forEach(function(e){t.forEach(function(t){e!==t&&le(e,t,Se)})})}function ye(t){le(pe[t.mb]=t,t,Se)}function ge(t){return t?"string"==typeof t?v(t):t:v("EPSG:3857")}function de(t,e,o,i){le(t=v(t),e=v(e),ve(o)),le(e,t,ve(i))}function ve(s){return function(t,e,o){var i,r=t.length;for(o=void 0!==o?o:2,e=void 0!==e?e:Array(r),i=0;i<r;i+=o){var n=s([t[i],t[i+1]]);for(e[i]=n[0],e[i+1]=n[1],n=o-1;2<=n;--n)e[i+n]=t[i+n]}return e}}function v(t){var e,o=null;return t instanceof qt?o=t:"string"==typeof t&&(o=pe[t]||null,e=Ht||window.proj4,o||"function"!=typeof e||void 0===e.defs(t)||ye(o=new qt({code:t}))),o}function be(t,e){var o;return t===e||(o=t.a===e.a,(t.mb===e.mb||we(t,e)===Se)&&o)}function me(t,e){return we(t=v(t),e=v(e))}function we(t,e){var o,i,r,n=t.mb,s=e.mb,a=ue(n,s);return a||"function"==typeof(o=Ht||window.proj4)&&(i=o.defs(n),r=o.defs(s),void 0!==i)&&void 0!==r&&(i===r?fe([e,t]):de(e,t,(a=o(s,n)).forward,a.inverse),a=ue(n,s)),a=a||xe}function xe(t,e){if(void 0!==e&&t!==e){for(var o=0,i=t.length;o<i;++o)e[o]=t[o];t=e}return t}function Se(t,e){if(void 0!==e){for(var o=0,i=t.length;o<i;++o)e[o]=t[o];t=e}else t=t.slice();return t}function Me(t,e,o){return me(e,o)(t,void 0,t.length)}function Pe(t,e,o){return Bt(t,e=me(e,o))}function Ae(){fe(te),fe(ae),ae.forEach(function(e){te.forEach(function(t){le(e,t,ee),le(t,e,oe)})})}function Ee(t,e,o,i){return void 0!==i?(i[0]=t,i[1]=e,i[2]=o,i):[t,e,o]}function Te(t){this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.b=t.resolutions,O((o=this.b,i=function(t,e){return e-t}||G,o.every(function(t,e){return!e||!(0<(t=i(o[e-1],t))||0===t)})),17),this.maxZoom=this.b.length-1,this.i=void 0!==t.origin?t.origin:null,this.c=null,void 0!==t.origins&&(this.c=t.origins,O(this.c.length==this.b.length,20));var o,i,e=t.extent;if(void 0===e||this.i||this.c||(this.i=Ft(e)),O(!this.i&&this.c||this.i&&!this.c,18),this.f=null,void 0!==t.tileSizes&&(this.f=t.tileSizes,O(this.f.length==this.b.length,19)),this.g=void 0!==t.tileSize?t.tileSize:this.f?null:256,O(!this.g&&this.f||this.g&&!this.f,22),this.v=void 0!==e?e:null,this.a=null,this.j=[0,0],void 0!==t.sizes)this.a=t.sizes.map(function(t){return new J(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1))},this);else if(e){for(var r=this,n=e,s=r.b.length,a=Array(s),p=r.minZoom;p<s;++p)a[p]=Ie(r,n,p);r.a=a}}Ae();var je=[0,0,0];function Ce(t,e,o,i,r){for(r=t.Aa(e,r),e=e[0]-1;e>=t.minZoom;){if(o.call(null,e,Ie(t,r,e,i)))return!0;--e}return!1}function Le(t,e,o,i){return e[0]<t.maxZoom?(i=t.Aa(e,i),Ie(t,i,e[0]+1,o)):null}function Re(t,e,o,i){Fe(t,e[0],e[1],o,!1,je);var r=je[1],n=je[2];return Fe(t,e[2],e[3],o,!0,je),t=je[1],e=je[2],void 0!==i?(i.ca=r,i.$=t,i.da=n,i.ia=e):i=new J(r,t,n,e),i}function Ie(t,e,o,i){return Re(t,e,t.Da(o),i)}function Ne(t,e){var o=t.Pc(e[0]),i=t.Da(e[0]);return t=pt(t.gb(e[0]),t.j),[o[0]+(e[1]+.5)*t[0]*i,o[1]+(e[2]+.5)*t[1]*i]}function Fe(t,e,o,i,r,n){var s=t.tc(i),a=i/t.Da(s),p=t.Pc(s);return t=pt(t.gb(s),t.j),e=a*Math.floor((e-p[0])/i+(r?.5:0))/t[0],o=a*Math.floor((o-p[1])/i+(r?0:.5))/t[1],o=r?(e=Math.ceil(e)-1,Math.ceil(o)-1):(e=Math.floor(e),Math.floor(o)),Ee(s,e,o,n)}function ke(t){var e=t.j;return e||(e=Ue(t),t.j=e),e}function De(t){var e={};return Xt(e,t||{}),void 0===e.extent&&(e.extent=v("EPSG:3857").G()),e.resolutions=Oe(e.extent,e.maxZoom,e.tileSize),delete e.maxZoom,new Te(e)}function Oe(t,e,o){e=void 0!==e?e:42;var i=It(t);for(t=Dt(t),o=pt(void 0!==o?o:256),o=Math.max(t/o[0],i/o[1]),e+=1,i=Array(e),t=0;t<e;++t)i[t]=o/Math.pow(2,t);return i}function Ue(t,e,o){return e=Oe(t=Ge(t),e,o),new Te({extent:t,origin:Ft(t),resolutions:e,tileSize:o})}function Ge(t){var e=(t=v(t)).G();return e=e?e:bt(-(t=180*Yt.degrees/t.sc()),-t,t,t)}function Be(t){this.b=t.html,this.a=t.tileRanges||null}function Xe(t){return t}function Ve(i){return i.mh=function(t){var e=i.listener,o=i.lh||i.target;return i.nh&&qe(i),e.call(o,t)}}function We(t,e,o,i){for(var r,n=0,s=t.length;n<s;++n)if((r=t[n]).listener===e&&r.lh===o)return i&&(r.deleteIndex=n),r}function Ze(t,e){return(t=t.fb)?t[e]:void 0}function Ke(t){return t.fb||(t.fb={})}function ze(t,e){var o=Ze(t,e);if(o){for(var i=0,r=o.length;i<r;++i)t.removeEventListener(e,o[i].mh),Vt(o[i]);o.length=0,(o=t.fb)&&(delete o[e],Object.keys(o).length||delete t.fb)}}function d(t,e,o,i,r){var n=Ke(t),s=n[e];return(n=We(s=s||(n[e]=[]),o,i,!1))?r||(n.nh=!1):(t.addEventListener(e,Ve(n={lh:i,nh:!!r,listener:o,target:t,type:e})),s.push(n)),n}function Ye(t,e,o,i){return d(t,e,o,i,!0)}function He(t,e,o,i){(t=Ze(t,e))&&(o=We(t,o,i,!0))&&qe(o)}function qe(t){var e,o;t&&t.target&&(t.target.removeEventListener(t.type,t.mh),(e=Ze(t.target,t.type))&&(-1!==(o="deleteIndex"in t?t.deleteIndex:e.indexOf(t))&&e.splice(o,1),e.length||ze(t.target,t.type)),Vt(t))}function Je(t){for(var e in Ke(t))ze(t,e)}function _e(){}function $e(t){t.Jb||(t.Jb=!0,t.ka())}function Qe(t){this.type=t,this.target=null}function to(t){t.stopPropagation()}function eo(){this.Ua={},this.ra={},this.oa={}}function oo(t,e){return e?e in t.oa:0<Object.keys(t.oa).length}function io(){eo.call(this),this.i=0}function ro(t){io.call(this),U(this),this.S={},void 0!==t&&this.H(t)}(r=Te.prototype).Rf=function(t,e,o){for(var i=(t=Ie(this,t,e)).ca,r=t.$;i<=r;++i)for(var n=t.da,s=t.ia;n<=s;++n)o([e,i,n])},r.G=function(){return this.v},r.Ti=function(){return this.maxZoom},r.Ui=function(){return this.minZoom},r.Pc=function(t){return this.i||this.c[t]},r.Da=function(t){return this.b[t]},r.Vi=function(){return this.b},r.Aa=function(t,e){var o=this.Pc(t[0]),i=this.Da(t[0]),r=pt(this.gb(t[0]),this.j),n=o[0]+t[1]*r[0]*i;return bt(n,t=o[1]+t[2]*r[1]*i,n+r[0]*i,t+r[1]*i,e)},r.Be=function(t,e,o){return Fe(this,t[0],t[1],e,!1,o)},r.bg=function(t,e,o){return Fe(this,t[0],t[1],this.Da(e),!1,o)},r.gb=function(t){return this.g||this.f[t]},r.tc=function(t,e){return Q(B(this.b,t,e||0),this.minZoom,this.maxZoom)},_e.prototype.Jb=!(Be.prototype.i=function(){return this.b}),_e.prototype.ka=Y,Qe.prototype.preventDefault=Qe.prototype.stopPropagation=function(){this.qp=!0},e(eo,_e),eo.prototype.addEventListener=function(t,e){var o=this.oa[t];-1===(o=o||(this.oa[t]=[])).indexOf(e)&&o.push(e)},eo.prototype.b=function(t){var e="string"==typeof t?new Qe(t):t,o=(t=e.type,(e.target=this).oa[t]);if(o){t in this.ra||(this.ra[t]=0,this.Ua[t]=0),++this.ra[t];for(var i=0,r=o.length;i<r;++i)if(!1===o[i].call(this,e)||e.qp){var n=!1;break}if(--this.ra[t],!this.ra[t]){for(e=this.Ua[t],delete this.Ua[t];e--;)this.removeEventListener(t,Y);delete this.ra[t]}return n}},eo.prototype.ka=function(){Je(this)},eo.prototype.removeEventListener=function(t,e){var o=this.oa[t];o&&(e=o.indexOf(e),t in this.Ua?(o[e]=Y,++this.Ua[t]):(o.splice(e,1),o.length||delete this.oa[t]))},e(io,eo),(r=io.prototype).s=function(){++this.i,this.b("change")},r.L=function(){return this.i},r.J=function(t,e,o){if(Array.isArray(t)){for(var i=t.length,r=Array(i),n=0;n<i;++n)r[n]=d(this,t[n],e,o);return r}return d(this,t,e,o)},r.once=function(t,e,o){if(Array.isArray(t)){for(var i=t.length,r=Array(i),n=0;n<i;++n)r[n]=Ye(this,t[n],e,o);return r}return Ye(this,t,e,o)},r.K=function(t,e,o){if(Array.isArray(t))for(var i=0,r=t.length;i<r;++i)He(this,t[i],e,o);else He(this,t,e,o)},e(ro,io);var no={};function so(t){return no.hasOwnProperty(t)?no[t]:no[t]="change:"+t}function ao(t,e,o){var i=so(e);t.b(new po(i,e,o)),t.b(new po("propertychange",e,o))}function po(t,e,o){Qe.call(this,t),this.key=e,this.oldValue=o}function ho(t,e){if(ro.call(this),this.c=!!(e||{}).unique,this.a=t||[],this.c)for(t=0,e=this.a.length;t<e;++t)uo(this,this.a[t],t);lo(this)}function lo(t){t.set(co,t.a.length)}function uo(t,e,o){for(var i=0,r=t.a.length;i<r;++i)if(t.a[i]===e&&i!==o)throw new q(58)}(r=ro.prototype).get=function(t){var e;return e=this.S.hasOwnProperty(t)?this.S[t]:e},r.O=function(){return Object.keys(this.S)},r.N=function(){return Xt({},this.S)},r.set=function(t,e,o){o?this.S[t]=e:(o=this.S[t])!==(this.S[t]=e)&&ao(this,t,o)},r.H=function(t,e){for(var o in t)this.set(o,t[o],e)},r.P=function(t,e){var o;t in this.S&&(o=this.S[t],delete this.S[t],e||ao(this,t,o))},e(po,Qe),e(ho,ro),(r=ho.prototype).clear=function(){for(;0<this.dc();)this.pop()},r.fg=function(t){for(var e=0,o=t.length;e<o;++e)this.push(t[e]);return this},r.forEach=function(t,e){this.a.forEach(t,e)},r.tm=function(){return this.a},r.item=function(t){return this.a[t]},r.dc=function(){return this.get(co)},r.He=function(t,e){this.c&&uo(this,e),this.a.splice(t,0,e),lo(this),this.b(new fo("add",e))},r.pop=function(){return this.Hg(this.dc()-1)},r.push=function(t){this.c&&uo(this,t);var e=this.dc();return this.He(e,t),this.dc()},r.remove=function(t){for(var e=this.a,o=0,i=e.length;o<i;++o)if(e[o]===t)return this.Hg(o)},r.Hg=function(t){var e=this.a[t];return this.a.splice(t,1),lo(this),this.b(new fo("remove",e)),e},r.Wp=function(t,e){var o=this.dc();if(t<o)this.c&&uo(this,e,t),o=this.a[t],this.a[t]=e,this.b(new fo("remove",o)),this.b(new fo("add",e));else{for(;o<t;++o)this.He(o,void 0);this.He(t,e)}};var co="length";function fo(t,e){Qe.call(this,t),this.element=e}e(fo,Qe);var yo=/^#(?:[0-9a-f]{3}){1,2}$/i,go=/^([a-z]*)$/i;function vo(t){return Array.isArray(t)?t:xo(t)}function bo(t){var e;return t="string"!=typeof t?"rgba("+(e=(e=t[0])!=(0|e)?e+.5|0:e)+","+(e=(e=t[1])!=(0|e)?e+.5|0:e)+","+(e=(e=t[2])!=(0|e)?e+.5|0:e)+","+(void 0===t[3]?1:t[3])+")":t}mo={},wo=0;var mo,wo,xo=function(t){if(mo.hasOwnProperty(t))var e=mo[t];else{if(1024<=wo)for(var o in e=0,mo)3&e++||(delete mo[o],--wo);var i,r;go.exec(e=t)&&((o=document.createElement("div")).style.color=e,document.body.appendChild(o),e=getComputedStyle(o).color,document.body.removeChild(o)),yo.exec(e)?(O(3==(r=e.length-1)||6==r,54),i=3==r?1:2,r=parseInt(e.substr(1+0*i,i),16),o=parseInt(e.substr(1+i,i),16),e=parseInt(e.substr(1+2*i,i),16),1==i&&(r=(r<<4)+r,o=(o<<4)+o,e=(e<<4)+e),r=[r,o,e,1]):e.indexOf("rgba(")?e.indexOf("rgb(")?O(!1,14):((e=e.slice(4,-1).split(",").map(Number)).push(1),r=So(e)):r=So(e=e.slice(5,-1).split(",").map(Number)),e=r,mo[t]=e,++wo}return e};function So(t){var e=[];return e[0]=Q(t[0]+.5|0,0,255),e[1]=Q(t[1]+.5|0,0,255),e[2]=Q(t[2]+.5|0,0,255),e[3]=Q(t[3],0,1),e}function Mo(t){return"string"==typeof t||t instanceof CanvasPattern||t instanceof CanvasGradient?t:bo(t)}function Po(t,e){var o=document.createElement("CANVAS");return t&&(o.width=t),e&&(o.height=e),o.getContext("2d")}function Ao(t,e){var o=e.parentNode;o&&o.replaceChild(t,e)}function Eo(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function To(t){ro.call(this),this.element=t.element||null,this.a=this.R=null,this.v=[],this.render=t.render||Y,t.target&&this.f(t.target)}function jo(t){t=t||{},this.I=document.createElement("UL"),this.u=document.createElement("LI"),this.I.appendChild(this.u),this.u.style.display="none",this.c=void 0===t.collapsed||t.collapsed,this.o=void 0===t.collapsible||t.collapsible,this.o||(this.c=!1);var e=void 0!==t.className?t.className:"ol-attribution",o=void 0!==t.tipLabel?t.tipLabel:"Attributions",i=void 0!==t.collapseLabel?t.collapseLabel:"»",r=("string"==typeof i?(this.D=document.createElement("span"),this.D.textContent=i):this.D=i,"string"==typeof(i=void 0!==t.label?t.label:"i")?(this.C=document.createElement("span"),this.C.textContent=i):this.C=i,this.o&&!this.c?this.D:this.C);(i=document.createElement("button")).setAttribute("type","button"),i.title=o,i.appendChild(r),d(i,"click",this.Vm,this),(o=document.createElement("div")).className=e+" ol-unselectable ol-control"+(this.c&&this.o?" ol-collapsed":"")+(this.o?"":" ol-uncollapsible"),o.appendChild(this.I),o.appendChild(i),To.call(this,{element:o,render:t.render||Co,target:t.target}),this.B=!0,this.l={},this.j={},this.T={}}function Co(t){if(t=t.frameState){var e,o,i,r,n,s,a,p=t.layerStatesArray,h=Xt({},t.attributions),l={},u={},c=t.viewState.projection,f=0;for(a=p.length;f<a;f++)if(o=p[f].layer.ha()){var y=U(o).toString();if(i=o.j)for(var g=0,d=i.length;g<d;g++){var v=i[g],b=U(v).toString();if(!(b in h)){if(e=t.usedTiles[y])t:{var m=void 0,w=v,x=M=o.Ta(c),S=c;if(w.a){for(m in e)if(m in w.a)for(var M=e[m],P=0,A=w.a[m].length;P<A;++P){var E=w.a[m][P];if($(E,M)){m=!0;break t}var T=Ie(x,Ge(S),parseInt(m,10)),j=T.$-T.ca+1;if((M.ca<T.ca||M.$>T.$)&&($(E,new J(rt(M.ca,j),rt(M.$,j),M.da,M.ia))||M.$-M.ca+1>j&&$(E,T))){m=!0;break t}}m=!1}else m=!0}else m=!1;m?(b in l&&delete l[b],(m=v.b)in u||(u[m]=!0,h[b]=v)):l[b]=v}}}for(r in f=(a=[h,l])[0],a=a[1],this.l)r in f?(this.j[r]||(this.l[r].style.display="",this.j[r]=!0),delete f[r]):r in a?(this.j[r]&&(this.l[r].style.display="none",delete this.j[r]),delete a[r]):(Eo(this.l[r]),delete this.l[r],delete this.j[r]);for(r in f)g=document.createElement("LI"),g.innerHTML=f[r].b,this.I.appendChild(g),this.l[r]=g,this.j[r]=!0;for(r in a)g=document.createElement("LI"),g.innerHTML=a[r].b,g.style.display="none",this.I.appendChild(g),this.l[r]=g;for(s in r=!Zt(this.j)||!Zt(t.logos),this.B!=r&&(this.element.style.display=r?"":"none",this.B=r),r&&Zt(this.j)?this.element.classList.add("ol-logo-only"):this.element.classList.remove("ol-logo-only"),t=t.logos,r=this.T)s in t||(Eo(r[s]),delete r[s]);for(n in t)(a=t[n])instanceof HTMLElement&&(this.u.appendChild(a),r[n]=a),n in r||((s=new Image).src=n,""===a?f=s:((f=document.createElement("a")).href=a,f.appendChild(s)),this.u.appendChild(f),r[n]=f);this.u.style.display=Zt(t)?"none":""}else this.B&&(this.element.style.display="none",this.B=!1)}function Lo(t){t.element.classList.toggle("ol-collapsed"),t.c?Ao(t.D,t.C):Ao(t.C,t.D),t.c=!t.c}function Ro(t){return Math.pow(t,3)}function Io(t){return 1-Ro(1-t)}function No(t){return 3*t*t-2*t*t*t}function Fo(t){return t}function ko(t){var e=void 0!==(t=t||{}).className?t.className:"ol-rotate",o=void 0!==t.label?t.label:"⇧",i=(this.c=null,"string"==typeof o?(this.c=document.createElement("span"),this.c.className="ol-compass",this.c.textContent=o):(this.c=o,this.c.classList.add("ol-compass")),t.tipLabel||"Reset rotation");(o=document.createElement("button")).className=e+"-reset",o.setAttribute("type","button"),o.title=i,o.appendChild(this.c),d(o,"click",ko.prototype.D,this),(i=document.createElement("div")).className=e+" ol-unselectable ol-control",i.appendChild(o),e=t.render||Do,this.o=t.resetNorth||void 0,To.call(this,{element:i,render:e,target:t.target}),this.l=void 0!==t.duration?t.duration:250,this.j=void 0===t.autoHide||t.autoHide,this.u=void 0,this.j&&this.element.classList.add("ol-hidden")}function Do(t){var e,o;(t=t.frameState)&&((t=t.viewState.rotation)!=this.u&&(e="rotate("+t+"rad)",this.j&&((o=this.element.classList.contains("ol-hidden"))||t?o&&t&&this.element.classList.remove("ol-hidden"):this.element.classList.add("ol-hidden")),this.c.style.msTransform=e,this.c.style.webkitTransform=e,this.c.style.transform=e),this.u=t)}function Oo(t){var e=void 0!==(t=t||{}).className?t.className:"ol-zoom",o=void 0!==t.delta?t.delta:1,i=void 0!==t.zoomInLabel?t.zoomInLabel:"+",r=void 0!==t.zoomOutLabel?t.zoomOutLabel:"−",n=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",s=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",a=document.createElement("button");a.className=e+"-in",a.setAttribute("type","button"),a.title=n,a.appendChild("string"==typeof i?document.createTextNode(i):i),d(a,"click",Oo.prototype.j.bind(this,o)),(i=document.createElement("button")).className=e+"-out",i.setAttribute("type","button"),i.title=s,i.appendChild("string"==typeof r?document.createTextNode(r):r),d(i,"click",Oo.prototype.j.bind(this,-o)),(o=document.createElement("div")).className=e+" ol-unselectable ol-control",o.appendChild(a),o.appendChild(i),To.call(this,{element:o,target:t.target}),this.c=void 0!==t.duration?t.duration:250}function Uo(t){t=t||{};var e=new ho;return void 0!==t.zoom&&!t.zoom||e.push(new Oo(t.zoomOptions)),void 0!==t.rotate&&!t.rotate||e.push(new ko(t.rotateOptions)),void 0!==t.attribution&&!t.attribution||e.push(new jo(t.attributionOptions)),e}function Go(t){this.c=void 0!==(t=t||{}).className?t.className:"ol-full-screen";var e=void 0!==t.label?t.label:"⤢",o=(this.o="string"==typeof e?document.createTextNode(e):e,e=void 0!==t.labelActive?t.labelActive:"×",this.l="string"==typeof e?document.createTextNode(e):e,t.tipLabel||"Toggle full-screen");(e=document.createElement("button")).className=this.c+"-"+Xo(),e.setAttribute("type","button"),e.title=o,e.appendChild(this.o),d(e,"click",this.C,this),(o=document.createElement("div")).className=this.c+" ol-unselectable ol-control "+(Bo()?"":"ol-unsupported"),o.appendChild(e),To.call(this,{element:o,target:t.target}),this.D=void 0!==t.keys&&t.keys,this.j=t.source}function Bo(){var t=document.body;return t.webkitRequestFullscreen||t.mozRequestFullScreen&&document.mozFullScreenEnabled||t.msRequestFullscreen&&document.msFullscreenEnabled||t.requestFullscreen&&document.fullscreenEnabled}function Xo(){return!!(document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||document.fullscreenElement)}function Vo(t){t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}e(To,ro),To.prototype.ka=function(){Eo(this.element),ro.prototype.ka.call(this)},To.prototype.g=function(){return this.a},To.prototype.setMap=function(t){this.a&&Eo(this.element);for(var e=0,o=this.v.length;e<o;++e)qe(this.v[e]);this.v.length=0,(this.a=t)&&((this.R||t.D).appendChild(this.element),this.render!==Y&&this.v.push(d(t,"postrender",this.render,this)),t.render())},To.prototype.f=function(t){this.R="string"==typeof t?document.getElementById(t):t},e(jo,To),(r=jo.prototype).Vm=function(t){t.preventDefault(),Lo(this)},r.Um=function(){return this.o},r.Xm=function(t){this.o!==t&&(this.o=t,this.element.classList.toggle("ol-uncollapsible"),!t)&&this.c&&Lo(this)},r.Wm=function(t){this.o&&this.c!==t&&Lo(this)},r.Tm=function(){return this.c},e(ko,To),ko.prototype.D=function(t){t.preventDefault(),this.o?this.o():(t=this.a.Z())&&void 0!==t.Qa()&&(0<this.l?t.animate({rotation:0,duration:this.l,easing:Io}):t.Oe(0))},e(Oo,To),Oo.prototype.j=function(t,e){var o;e.preventDefault(),(e=this.a.Z())&&(o=e.Pa())&&(t=e.constrainResolution(o,t),0<this.c?(e.Ic()&&e.ed(),e.animate({resolution:t,duration:this.c,easing:Io})):e.Vc(t))},e(Go,To),Go.prototype.C=function(t){t.preventDefault(),Bo()&&(t=this.a)&&(Xo()?document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():(t=this.j?"string"==typeof this.j?document.getElementById(this.j):this.j:t.jd(),this.D?t.mozRequestFullScreenWithKeys?t.mozRequestFullScreenWithKeys():t.webkitRequestFullscreen?t.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):Vo(t):Vo(t)))},Go.prototype.u=function(){var t=this.element.firstElementChild,e=this.a;Xo()?(t.className=this.c+"-true",Ao(this.l,this.o)):(t.className=this.c+"-false",Ao(this.o,this.l)),e&&e.Ad()},Go.prototype.setMap=function(t){To.prototype.setMap.call(this,t),t&&this.v.push(d(document,Zo(),this.u,this))};var Wo,Zo=function(){var t;return Wo||((t=document.body).webkitRequestFullscreen?Wo="webkitfullscreenchange":t.mozRequestFullScreen?Wo="mozfullscreenchange":t.msRequestFullscreen?Wo="MSFullscreenChange":t.requestFullscreen&&(Wo="fullscreenchange")),Wo};function Ko(t){t=t||{};var e=document.createElement("DIV");e.className=void 0!==t.className?t.className:"ol-mouse-position",To.call(this,{element:e,render:t.render||zo,target:t.target}),d(this,so(Ho),this.Ym,this),t.coordinateFormat&&this.kj(t.coordinateFormat),t.projection&&this.$h(t.projection),this.u=void 0!==t.undefinedHTML?t.undefinedHTML:"",this.l=e.innerHTML,this.o=this.j=this.c=null}function zo(t){(t=t.frameState)?this.c!=t.viewState.projection&&(this.c=t.viewState.projection,this.j=null):this.c=null,Yo(this,this.o)}function Yo(t,e){var o,i=t.u;e&&t.c&&(t.j||(o=t.Zh(),t.j=o?we(t.c,o):xe),e=t.a.Wa(e))&&(t.j(e,e),i=(i=t.xh())?i(e):e.toString()),t.l&&i==t.l||(t.element.innerHTML=i,t.l=i)}e(Ko,To),(r=Ko.prototype).Ym=function(){this.j=null},r.xh=function(){return this.get(qo)},r.Zh=function(){return this.get(Ho)},r.Ll=function(t){this.o=this.a.xe(t),Yo(this,this.o)},r.Ml=function(){Yo(this,null),this.o=null},r.setMap=function(t){To.prototype.setMap.call(this,t),t&&(t=t.a,this.v.push(d(t,"mousemove",this.Ll,this),d(t,"mouseout",this.Ml,this)))},r.kj=function(t){this.set(qo,t)},r.$h=function(t){this.set(Ho,v(t))};var Ho="projection",qo="coordinateFormat";function Jo(t,e,o){Qe.call(this,t),this.map=e,this.frameState=void 0!==o?o:null}function _o(t,e,o,i,r){Jo.call(this,t,e,r),this.originalEvent=o,this.pixel=e.xe(o),this.coordinate=e.Wa(this.pixel),this.dragging=void 0!==i&&i}e(Jo,Qe),e(_o,Jo),_o.prototype.preventDefault=function(){Jo.prototype.preventDefault.call(this),this.originalEvent.preventDefault()},_o.prototype.stopPropagation=function(){Jo.prototype.stopPropagation.call(this),this.originalEvent.stopPropagation()};var $o=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function Qo(t,e){for(var o,i=$o.length,r=0;r<i;++r)try{if(o=t.getContext($o[r],e))return o}catch(t){}return null}var ti="undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"",ei=-1!==ti.indexOf("firefox"),oi=-1!==ti.indexOf("safari")&&-1==ti.indexOf("chrom"),ii=-1!==ti.indexOf("webkit")&&-1==ti.indexOf("edge"),ri=-1!==ti.indexOf("macintosh"),ni=window.devicePixelRatio||1,si=!1,ai=function(){if(!("HTMLCanvasElement"in window))return!1;try{var t=document.createElement("CANVAS").getContext("2d");return!!t&&(void 0!==t.setLineDash&&(si=!0),!0)}catch(t){return!1}}(),pi="DeviceOrientationEvent"in window,hi="geolocation"in navigator,li="ontouchstart"in window,ui="PointerEvent"in window,ci=!!navigator.msPointerEnabled,ti=!1,fi=[];if("WebGLRenderingContext"in window)try{var yi=Qo(document.createElement("CANVAS"),{failIfMajorPerformanceCaveat:!0});yi&&(ti=!0,By=yi.getParameter(yi.MAX_TEXTURE_SIZE),fi=yi.getSupportedExtensions())}catch(t){}var gi=ti,di=fi,vi=By,bi={Iq:"singleclick",xq:"click",yq:"dblclick",Bq:"pointerdrag",Eq:"pointermove",Aq:"pointerdown",Hq:"pointerup",Gq:"pointerover",Fq:"pointerout",Cq:"pointerenter",Dq:"pointerleave",zq:"pointercancel"};function mi(t,e,o,i,r){_o.call(this,t,e,o.b,i,r),this.b=o}function wi(t,e){this.b=t,this.f=e}function xi(t){wi.call(this,t,{mousedown:this.fm,mousemove:this.gm,mouseup:this.jm,mouseover:this.im,mouseout:this.hm}),this.a=t.i,this.i=[]}function Si(t,e){t=t.i;var o=e.clientX;e=e.clientY;for(var i,r=0,n=t.length;r<n&&(i=t[r]);r++){var s=Math.abs(e-i[1]);if(Math.abs(o-i[0])<=25&&s<=25)return 1}}function Mi(t){var e=Fi(t,t),o=e.preventDefault;return e.preventDefault=function(){t.preventDefault(),o()},e.pointerId=1,e.isPrimary=!0,e.pointerType="mouse",e}function Pi(t){wi.call(this,t,{MSPointerDown:this.om,MSPointerMove:this.pm,MSPointerUp:this.sm,MSPointerOut:this.qm,MSPointerOver:this.rm,MSPointerCancel:this.nm,MSGotPointerCapture:this.lm,MSLostPointerCapture:this.mm}),this.a=t.i,this.i=["","unavailable","touch","pen","mouse"]}function Ai(t,e){var o=e;return"number"==typeof e.pointerType&&((o=Fi(e,e)).pointerType=t.i[e.pointerType]),o}function Ei(t){wi.call(this,t,{pointerdown:this.ip,pointermove:this.jp,pointerup:this.mp,pointerout:this.kp,pointerover:this.lp,pointercancel:this.hp,gotpointercapture:this.ul,lostpointercapture:this.em})}function Ti(t,e,o){var i;Qe.call(this,t),this.b=e,this.buttons=function(t){if(t.buttons||ji)t=t.buttons;else switch(t.which){case 1:t=1;break;case 2:t=4;break;case 3:t=2;break;default:t=0}return t}(t=o||{}),this.pressure=(o=t,i=this.buttons,o.pressure||(i?.5:0)),this.bubbles="bubbles"in t&&t.bubbles,this.cancelable="cancelable"in t&&t.cancelable,this.view="view"in t?t.view:null,this.detail="detail"in t?t.detail:null,this.screenX="screenX"in t?t.screenX:0,this.screenY="screenY"in t?t.screenY:0,this.clientX="clientX"in t?t.clientX:0,this.clientY="clientY"in t?t.clientY:0,this.ctrlKey="ctrlKey"in t&&t.ctrlKey,this.altKey="altKey"in t&&t.altKey,this.shiftKey="shiftKey"in t&&t.shiftKey,this.metaKey="metaKey"in t&&t.metaKey,this.button="button"in t?t.button:0,this.relatedTarget="relatedTarget"in t?t.relatedTarget:null,this.pointerId="pointerId"in t?t.pointerId:0,this.width="width"in t?t.width:0,this.height="height"in t?t.height:0,this.tiltX="tiltX"in t?t.tiltX:0,this.tiltY="tiltY"in t?t.tiltY:0,this.pointerType="pointerType"in t?t.pointerType:"",this.isPrimary="isPrimary"in t&&t.isPrimary,e.preventDefault&&(this.preventDefault=function(){e.preventDefault()})}e(mi,_o),e(xi,wi),(r=xi.prototype).fm=function(t){var e;Si(this,t)||(1..toString()in this.a&&this.cancel(t),e=Mi(t),this.a[1..toString()]=t,Ui(this.b,"pointerdown",e,t))},r.gm=function(t){var e;Si(this,t)||(e=Mi(t),Ui(this.b,"pointermove",e,t))},r.jm=function(t){var e;Si(this,t)||(e=this.a[1..toString()])&&e.button===t.button&&(e=Mi(t),Ui(this.b,"pointerup",e,t),delete this.a[1..toString()])},r.im=function(t){var e;Si(this,t)||(e=Mi(t),Oi(this.b,e,t))},r.hm=function(t){var e;Si(this,t)||(e=Mi(t),Di(this.b,e,t))},r.cancel=function(t){var e=Mi(t);this.b.cancel(e,t),delete this.a[1..toString()]},e(Pi,wi),(r=Pi.prototype).om=function(t){this.a[t.pointerId.toString()]=t;var e=Ai(this,t);Ui(this.b,"pointerdown",e,t)},r.pm=function(t){var e=Ai(this,t);Ui(this.b,"pointermove",e,t)},r.sm=function(t){var e=Ai(this,t);Ui(this.b,"pointerup",e,t),delete this.a[t.pointerId.toString()]},r.qm=function(t){var e=Ai(this,t);Di(this.b,e,t)},r.rm=function(t){var e=Ai(this,t);Oi(this.b,e,t)},r.nm=function(t){var e=Ai(this,t);this.b.cancel(e,t),delete this.a[t.pointerId.toString()]},r.mm=function(t){this.b.b(new Ti("lostpointercapture",t,t))},r.lm=function(t){this.b.b(new Ti("gotpointercapture",t,t))},e(Ei,wi),(r=Ei.prototype).ip=function(t){Gi(this.b,t)},r.jp=function(t){Gi(this.b,t)},r.mp=function(t){Gi(this.b,t)},r.kp=function(t){Gi(this.b,t)},r.lp=function(t){Gi(this.b,t)},r.hp=function(t){Gi(this.b,t)},r.em=function(t){Gi(this.b,t)},r.ul=function(t){Gi(this.b,t)},e(Ti,Qe);var ji=!1;try{ji=1===new MouseEvent("click",{buttons:1}).buttons}catch(t){}function Ci(t,e){wi.call(this,t,{touchstart:this.rq,touchmove:this.qq,touchend:this.pq,touchcancel:this.oq}),this.a=t.i,this.j=e,this.i=void 0,this.g=0,this.c=void 0}function Li(t,e,o){function i(){e.preventDefault()}for(var r,n,s=Array.prototype.slice.call(e.changedTouches),a=s.length,p=0;p<a;++p){h=t,r=e,n=s[p],(r=Fi(r,n)).pointerId=n.identifier+2,r.bubbles=!0,r.cancelable=!0,r.detail=h.g,r.button=0,r.buttons=1,r.width=n.webkitRadiusX||n.radiusX||0,r.height=n.webkitRadiusY||n.radiusY||0,r.pressure=n.webkitForce||n.force||.5,r.isPrimary=h.i===n.identifier,r.pointerType="touch",r.clientX=n.clientX,r.clientY=n.clientY,r.screenX=n.screenX,r.screenY=n.screenY;var h=r;h.preventDefault=i,o.call(t,e,h)}}function Ri(t,e){var o,i=t.j.i;e=e.changedTouches[0],t.i===e.identifier&&(o=[e.clientX,e.clientY],i.push(o),setTimeout(function(){V(i,o)},2500))}function Ii(t){eo.call(this),this.g=t,this.i={},this.f={},this.a=[],ui?Ni(this,new Ei(this)):ci?Ni(this,new Pi(this)):(Ni(this,t=new xi(this)),li&&Ni(this,new Ci(this,t))),t=this.a.length;for(var e,o,i=0;i<t;i++)e=this.a[i],o=this,Object.keys(e.f).forEach(function(t){d(this.g,t,this.c,this)},o)}function Ni(t,o){var e=Object.keys(o.f);e&&(e.forEach(function(t){var e=o.f[t];e&&(this.f[t]=e.bind(o))},t),t.a.push(o))}function Fi(t,e){for(var o,i={},r=0,n=Bi.length;r<n;r++)i[o=Bi[r][0]]=t[o]||e[o]||Bi[r][1];return i}function ki(t,e,o){e.bubbles=!1,Ui(t,"pointerleave",e,o)}function Di(t,e,o){t.out(e,o);var i=e.target,r=e.relatedTarget;i&&r&&i.contains(r)||ki(t,e,o)}function Oi(t,e,o){e.bubbles=!0,Ui(t,"pointerover",e,o);var i=e.target,r=e.relatedTarget;i&&r&&i.contains(r)||(e.bubbles=!1,Ui(t,"pointerenter",e,o))}function Ui(t,e,o,i){t.b(new Ti(e,i,o))}function Gi(t,e){t.b(new Ti(e.type,e,e))}e(Ci,wi),(r=Ci.prototype).ij=function(){this.g=0,this.c=void 0},r.rq=function(t){var e=t.touches,o=Object.keys(this.a),i=o.length;if(i>=e.length){for(var r=[],n=0;n<i;++n){var s,a=o[n],p=this.a[a];if(!(s=1==a))t:{for(var h=e.length,l=0;l<h;l++)if((s=e[l]).identifier===a-2){s=!0;break t}s=!1}s||r.push(p.out)}for(n=0;n<r.length;++n)this.Kf(t,r[n])}e=t.changedTouches[0],(!(o=Object.keys(this.a).length)||1===o&&1..toString()in this.a)&&(this.i=e.identifier,void 0!==this.c)&&clearTimeout(this.c),Ri(this,t),this.g++,Li(this,t,this.cp)},r.cp=function(t,e){this.a[e.pointerId]={target:e.target,out:e,Wi:e.target};var o=this.b;e.bubbles=!0,Ui(o,"pointerover",e,t),o=this.b,e.bubbles=!1,Ui(o,"pointerenter",e,t),Ui(this.b,"pointerdown",e,t)},r.qq=function(t){t.preventDefault(),Li(this,t,this.km)},r.km=function(t,e){var o,i,r=this.a[e.pointerId];r&&(o=r.out,i=r.Wi,Ui(this.b,"pointermove",e,t),o&&i!==e.target&&(o.relatedTarget=e.target,e.relatedTarget=i,o.target=i,e.target?(Di(this.b,o,t),Oi(this.b,e,t)):(e.target=i,e.relatedTarget=null,this.Kf(t,e))),r.out=e,r.Wi=e.target)},r.pq=function(t){Ri(this,t),Li(this,t,this.sq)},r.sq=function(t,e){Ui(this.b,"pointerup",e,t),this.b.out(e,t),ki(this.b,e,t),delete this.a[e.pointerId],e.isPrimary&&(this.i=void 0,this.c=setTimeout(this.ij.bind(this),200))},r.oq=function(t){Li(this,t,this.Kf)},r.Kf=function(t,e){this.b.cancel(e,t),this.b.out(e,t),ki(this.b,e,t),delete this.a[e.pointerId],e.isPrimary&&(this.i=void 0,this.c=setTimeout(this.ij.bind(this),200))},e(Ii,eo),Ii.prototype.c=function(t){var e=this.f[t.type];e&&e(t)},Ii.prototype.out=function(t,e){t.bubbles=!0,Ui(this,"pointerout",t,e)},Ii.prototype.cancel=function(t,e){Ui(this,"pointercancel",t,e)};var Bi=[["bubbles",!(Ii.prototype.ka=function(){for(var t,e,o=this.a.length,i=0;i<o;i++)t=this.a[i],e=this,Object.keys(t.f).forEach(function(t){He(this.g,t,this.c,this)},e);eo.prototype.ka.call(this)})],["cancelable",!1],["view",null],["detail",null],["screenX",0],["screenY",0],["clientX",0],["clientY",0],["ctrlKey",!1],["altKey",!1],["shiftKey",!1],["metaKey",!1],["button",0],["relatedTarget",null],["buttons",0],["pointerId",0],["width",0],["height",0],["pressure",0],["tiltX",0],["tiltY",0],["pointerType",""],["hwTimestamp",0],["isPrimary",!1],["type",""],["target",null],["currentTarget",null],["which",0]];function Xi(t,e){eo.call(this),this.i=t,this.j=0,this.o=!1,this.f=[],this.D=e?e*ni:ni,this.c=null,t=this.i.a,this.S=0,this.u={},this.g=new Ii(t),this.a=null,this.l=d(this.g,"pointerdown",this.Ol,this),this.v=d(this.g,"pointermove",this.Lp,this)}function Vi(t,e){"pointerup"==e.type||"pointercancel"==e.type?delete t.u[e.pointerId]:"pointerdown"==e.type&&(t.u[e.pointerId]=!0),t.S=Object.keys(t.u).length}function Wi(t,e){return Math.abs(e.clientX-t.c.clientX)>t.D||Math.abs(e.clientY-t.c.clientY)>t.D}function Zi(t,e){this.l=t,this.c=e,this.b=[],this.i=[],this.a={}}function Ki(t){var e=t.b,o=t.i,i=e[0];return 1==e.length?(e.length=0,o.length=0):(e[0]=e.pop(),o[0]=o.pop(),zi(t,0)),e=t.c(i),delete t.a[e],i}function zi(t,e){for(var o=t.b,i=t.i,r=o.length,n=o[e],s=i[e],a=e;e<r>>1;){var p=2*e+1,h=2*e+2,p=h<r&&i[h]<i[p]?h:p;o[e]=o[p],i[e]=i[p],e=p}o[e]=n,i[e]=s,Yi(t,a,e)}function Yi(t,e,o){var i=t.b;t=t.i;for(var r=i[o],n=t[o];e<o;){var s=o-1>>1;if(!(t[s]>n))break;i[o]=i[s],t[o]=t[s],o=s}i[o]=r,t[o]=n}function Hi(t){for(var e=t.l,o=t.b,i=t.i,r=0,n=o.length,s=0;s<n;++s){var a=o[s],p=e(a);1/0==p?delete t.a[t.c(a)]:(i[r]=p,o[r++]=a)}for(o.length=r,i.length=r,e=(t.b.length>>1)-1;0<=e;e--)zi(t,e)}function qi(e,t){Zi.call(this,function(t){return e.apply(null,t)},function(t){return t[0].bb()}),this.v=t,this.j=0,this.g={}}function Ji(t,e,o){for(var i,r,n=0;t.j<e&&n<o&&0<t.b.length;)r=(i=Ki(t)[0]).bb(),0!==i.getState()||r in t.g||(t.g[r]=!0,++t.j,++n,i.load())}function _i(t){if(void 0!==t)return 0}function $i(t,e){if(void 0!==t)return t+e}function Qi(t,e){return 2<(e=-1===(e=(t=void 0!==e?t.toFixed(e):""+t).indexOf("."))?t.length:e)?t:Array(3-e).join("0")+t}function tr(t){t=(""+t).split(".");for(var e=["1","3"],o=0;o<Math.max(t.length,e.length);o++){var i=parseInt(t[o]||"0",10),r=parseInt(e[o]||"0",10);if(r<i)return 1;if(i<r)return-1}return 0}function er(t,e){return t[0]+=e[0],t[1]+=e[1],t}function or(t,e){var o=t[0],i=(t=t[1],e[0]),r=e[1],i=(e=i[0],i[1]),n=r[0],s=n-e,a=(r=r[1])-i;return o=(o=s||a?(s*(o-e)+a*(t-i))/(s*s+a*a||0):0)<=0?(t=e,i):1<=o?(t=n,r):(t=e+o*s,i+o*a),[t,o]}function ir(t,e,o){e=rt(e+180,360)-180;var i=Math.abs(3600*e),r=(o=o||0,Math.pow(10,o)),n=Math.floor(i/3600),s=Math.floor((i-3600*n)/60);return 60<=(i=Math.ceil((i-3600*n-60*s)*r)/r)&&(i=0,s+=1),60<=s&&(s=0,n+=1),n+"° "+Qi(s)+"′ "+Qi(i,o)+"″"+(e?" "+t.charAt(e<0?1:0):"")}function rr(t,e,o){return t?e.replace("{x}",t[0].toFixed(o)).replace("{y}",t[1].toFixed(o)):""}function nr(t,e){for(var o=!0,i=t.length-1;0<=i;--i)if(t[i]!=e[i]){o=!1;break}return o}function sr(t,e){var o=Math.cos(e),i=(e=Math.sin(e),t[1]*o+t[0]*e);return t[0]=t[0]*o-t[1]*e,t[1]=i,t}function ar(t,e){t[0]*=e,t[1]*=e}function pr(t,e){var o=t[0]-e[0];return o*o+(t=t[1]-e[1])*t}function hr(t,e){return Math.sqrt(pr(t,e))}function lr(t,e){return pr(t,or(t,e))}function ur(t,e){return rr(t,"{x}, {y}",e)}function cr(){return!0}function fr(){return!1}function yr(){ro.call(this),this.l=vt(),this.v=-1,this.f={},this.o=this.g=0}function gr(t,e,o,i,r,n){for(var s=n||[],a=0;e<o;e+=i){var p=t[e],h=t[e+1];s[a++]=r[0]*p+r[2]*h+r[4],s[a++]=r[1]*p+r[3]*h+r[5]}return n&&s.length!=a&&(s.length=a),s}function dr(t,e,o,i,r,n,s){for(var a,p=s||[],h=0;e<o;e+=i)for(p[h++]=t[e]+r,p[h++]=t[e+1]+n,a=e+2;a<e+i;++a)p[h++]=t[a];return s&&p.length!=h&&(p.length=h),p}function b(){yr.call(this),this.ja="XY",this.a=2,this.A=null}function vr(t){var e;return"XY"==t?e=2:"XYZ"==t||"XYM"==t?e=3:"XYZM"==t&&(e=4),e}function br(t,e,o){t.a=vr(e),t.ja=e,t.A=o}function mr(t,e,o,i){if(e)o=vr(e);else{for(e=0;e<i;++e){if(!o.length)return t.ja="XY",void(t.a=2);o=o[0]}var r;2==(o=o.length)?r="XY":3==o?r="XYZ":4==o&&(r="XYZM"),e=r}t.ja=e,t.a=o}function wr(t,e,o,i){for(var r=0,n=t[o-i],s=t[o-i+1];e<o;e+=i)var a=t[e],p=t[e+1],r=r+(s*a-n*p),n=a,s=p;return r/2}function xr(t,e,o,i){for(var r=0,n=0,s=o.length;n<s;++n){var a=o[n],r=r+wr(t,e,a,i);e=a}return r}function Sr(t,e,o,i,r,n,s){var a=t[e],p=t[e+1],h=t[o]-a,l=t[o+1]-p;if(h||l)if(1<(n=((r-a)*h+(n-p)*l)/(h*h+l*l)))e=o;else if(0<n){for(r=0;r<i;++r)s[r]=nt(t[e+r],t[o+r],n);return void(s.length=i)}for(r=0;r<i;++r)s[r]=t[e+r];s.length=i}function Mr(t,e,o,i,r){var n=t[e],s=t[e+1];for(e+=i;e<o;e+=i){var a=t[e],p=t[e+1];r<(n=ot(n,s,a,p))&&(r=n),n=a,s=p}return r}function Pr(t,e,o,i,r){for(var n=0,s=o.length;n<s;++n){var a=o[n];r=Mr(t,e,a,i,r),e=a}return r}function Ar(t,e,o,i,r,n,s,a,p,h,l){if(e!=o)if(r){for(var u=l||[NaN,NaN],c=e+i;c<o;)if(Sr(t,c-i,c,i,s,a,u),(f=ot(s,a,u[0],u[1]))<h){for(h=f,l=0;l<i;++l)p[l]=u[l];c+=p.length=i}else c+=i*Math.max((Math.sqrt(f)-Math.sqrt(h))/r|0,1);if(n&&(Sr(t,o-i,e,i,s,a,u),(f=ot(s,a,u[0],u[1]))<h)){for(h=f,l=0;l<i;++l)p[l]=u[l];p.length=i}}else{var f=ot(s,a,t[e],t[e+1]);if(f<h){for(l=0;l<i;++l)p[l]=t[e+l];return p.length=i,f}}return h}function Er(t,e,o,i,r,n,s,a,p,h,l){l=l||[NaN,NaN];for(var u=0,c=o.length;u<c;++u){var f=o[u];h=Ar(t,e,f,i,r,n,s,a,p,h,l),e=f}return h}function Tr(t,e){for(var o=0,i=0,r=e.length;i<r;++i)t[o++]=e[i];return o}function jr(t,e,o,i){for(var r=0,n=o.length;r<n;++r)for(var s=o[r],a=0;a<i;++a)t[e++]=s[a];return e}function Cr(t,e,o,i,r){r=r||[];for(var n=0,s=0,a=o.length;s<a;++s)e=jr(t,e,o[s],i),r[n++]=e;return r.length=n,r}function Lr(t,e,o,i,r){r=void 0!==r?r:[];for(var n=0;e<o;e+=i)r[n++]=t.slice(e,e+i);return r.length=n,r}function Rr(t,e,o,i,r){r=void 0!==r?r:[];for(var n=0,s=0,a=o.length;s<a;++s){var p=o[s];r[n++]=Lr(t,e,p,i,r[n]),e=p}return r.length=n,r}function Ir(t,e,o,i,r,n,s){var a=(o-e)/i;if(a<3)for(;e<o;e+=i)n[s++]=t[e],n[s++]=t[e+1];else{var p=Array(a);p[0]=1,p[a-1]=1,o=[e,o-i];for(var h=0;0<o.length;){for(var l=o.pop(),u=o.pop(),c=0,f=t[u],y=t[u+1],g=t[l],d=t[l+1],v=u+i;v<l;v+=i){var b=et(t[v],t[v+1],f,y,g,d);c<b&&(h=v,c=b)}r<c&&(p[(h-e)/i]=1,u+i<h&&o.push(u,h),h+i<l)&&o.push(h,l)}for(v=0;v<a;++v)p[v]&&(n[s++]=t[e+v*i],n[s++]=t[e+v*i+1])}return s}function Nr(t,e,o,i,r,n,s,a){for(var p=0,h=o.length;p<h;++p){var l=o[p];t:{var u=t,c=l,f=i,y=r,g=n,d=s;if(e!=c){var v=y*Math.round(u[e]/y),b=y*Math.round(u[e+1]/y);e+=f,g[d++]=v,g[d++]=b;do{var m=y*Math.round(u[e]/y);if(s=y*Math.round(u[e+1]/y),(e+=f)==c){g[d++]=m,g[d++]=s,s=d;break t}}while(m==v&&s==b);for(;e<c;){var w,x,S,M,P=y*Math.round(u[e]/y),A=y*Math.round(u[e+1]/y);e+=f,P==m&&A==s||((w=m-v)*(M=A-b)==(x=s-b)*(S=P-v)&&(w<0&&S<w||w==S||0<w&&w<S)&&(x<0&&M<x||x==M||0<x&&x<M)||(v=g[d++]=m,b=g[d++]=s),m=P,s=A)}g[d++]=m,g[d++]=s}s=d}a.push(s),e=l}return s}function Fr(t,e){b.call(this),this.c=this.j=-1,this.ma(t,e)}function kr(t,e,o){br(t,e,o),t.s()}function m(t,e){b.call(this),this.ma(t,e)}function Dr(t,e,o,i,r,n){for(var s=0,a=t[o-i],p=t[o-i+1];e<o;e+=i){var h=t[e],l=t[e+1];p<=n?n<l&&0<(h-a)*(n-p)-(r-a)*(l-p)&&s++:l<=n&&(h-a)*(n-p)-(r-a)*(l-p)<0&&s--,a=h,p=l}return s}function Or(t,e,o,i,r,n){if(!o.length||!Dr(t,e,o[0],i,r,n))return!1;var s;for(e=1,s=o.length;e<s;++e)if(Dr(t,o[e-1],o[e],i,r,n))return!1;return!0}function Ur(t,e,o,i,r,n,s){for(var a=r[n+1],p=[],h=o[0],l=t[h-i],u=t[h-i+1],c=e;c<h;c+=i){var f=t[c],y=t[c+1];(a<=u&&y<=a||u<=a&&a<=y)&&p.push(l=(a-u)/(y-u)*(f-l)+l),l=f,u=y}for(h=NaN,u=-1/0,p.sort(G),l=p[0],c=1,y=p.length;c<y;++c){var f=p[c],g=Math.abs(f-l);u<g&&Or(t,e,o,i,l=(l+f)/2,a)&&(h=l,u=g),l=f}return isNaN(h)&&(h=r[n]),s?(s.push(h,a),s):[h,a]}function Gr(t,e,o,i,r,n){for(var s,a=[t[e],t[e+1]],p=[];e+i<o;e+=i){if(p[0]=t[e+i],p[1]=t[e+i+1],s=r.call(n,a,p))return s;a[0]=p[0],a[1]=p[1]}return!1}function Br(t,e,o,i,l){var r=At(vt(),t,e,o,i);return!!Ot(l,r)&&(!!(yt(l,r)||r[0]>=l[0]&&r[2]<=l[2]||r[1]>=l[1]&&r[3]<=l[3])||Gr(t,e,o,i,function(t,e){var o,i,r,n,s,a=!1,p=dt(l,t),h=dt(l,e);return 1===p||1===h?a=!0:(o=l[0],i=l[1],r=l[2],n=l[3],s=e[0],t=((e=e[1])-t[1])/(s-t[0]),(a=(a=(a=2&h&&!(2&p)?o<=(a=s-(e-n)/t)&&a<=r:a)||!(4&h)||4&p?a:i<=(a=e-(s-r)*t)&&a<=n)||!(8&h)||8&p?a:o<=(a=s-(e-i)/t)&&a<=r)||!(16&h)||16&p||(a=i<=(a=e-(s-o)*t)&&a<=n)),a}))}function Xr(t,e,o,i,r){var n=o[0];if(!(Br(t,e,n,i,r)||Dr(t,e,n,i,r[0],r[1])||Dr(t,e,n,i,r[0],r[3])||Dr(t,e,n,i,r[2],r[1])||Dr(t,e,n,i,r[2],r[3])))return!1;if(1!==o.length)for(e=1,n=o.length;e<n;++e)if(function(e,o,i,r,t){return!Et(t,function(t){return!Dr(e,o,i,r,t[0],t[1])})}(t,o[e-1],o[e],i,r))return!1;return!0}function Vr(t,e,o,i){for(var r=0,n=t[o-i],s=t[o-i+1];e<o;e+=i)var a=t[e],p=t[e+1],r=r+(a-n)*(p+s),n=a,s=p;return 0<r}function Wr(t,e,o,i){for(var r=0,n=(i=void 0!==i&&i,0),s=e.length;n<s;++n){var a=e[n],r=Vr(t,r,a,o);if(n){if(i&&!r||!i&&r)return}else if(i&&r||!i&&!r)return;r=a}return 1}function Zr(t,e,o,i,r){r=void 0!==r&&r;for(var n=0,s=o.length;n<s;++n){var a=o[n],p=Vr(t,e,a,i);if(n?r&&!p||!r&&p:r&&p||!r&&!p)for(var p=t,h=a,l=i;e<h-l;){for(var u=0;u<l;++u){var c=p[e+u];p[e+u]=p[h-l+u],p[h-l+u]=c}e+=l,h-=l}e=a}return e}function Kr(t,e,o,i){for(var r=0,n=0,s=e.length;n<s;++n)r=Zr(t,r,e[n],o,i);return r}function w(t,e){b.call(this),this.c=[],this.u=-1,this.D=null,this.I=this.C=this.B=-1,this.j=null,this.ma(t,e)}function zr(t){var e;return t.u!=t.i&&(e=Lt(t.G()),t.D=Ur(t.ec(),0,t.c,t.a,e,0),t.u=t.i),t.D}function Yr(t,e,o,i){var r,n=i||32;for(i=[],r=0;r<n;++r)X(i,t.offset(e,o,2*Math.PI*r/n));return i.push(i[0],i[1]),(t=new w(null)).ba("XY",i,[i.length]),t}function Hr(t){var e=t[0],o=t[1],i=t[2],e=[e,o,e,t=t[3],i,t,i,o,e,o];return(o=new w(null)).ba("XY",e,[e.length]),o}function qr(t,e,o){for(var i=e||32,r=t.qa(),n=new w(null,e=t.ja),i=r*(i+1),r=Array(i),s=0;s<i;s++)r[s]=0;return n.ba(e,r,[r.length]),Jr(n,t.wa(),t.pd(),o),n}function Jr(t,e,o,i){var r=t.ga(),n=t.ja,s=t.qa(),a=t.Bb(),p=r.length/s-1;i=i||0;for(var h,l,u=0;u<=p;++u)l=u*s,h=i+2*rt(u,p)*Math.PI/p,r[l]=e[0]+o*Math.cos(h),r[1+l]=e[1]+o*Math.sin(h);t.ba(n,r,a)}function h(t){ro.call(this),t=Xt({},t),this.o=[0,0],this.c=[],this.wf=this.wf.bind(this),this.v=ge(t.projection),_r(this,t)}function _r(t,e){var o,i,r,n,s,a,p,h,l,u,c,f={},y=(f.center=void 0!==e.center?e.center:null,void 0!==e.minZoom?e.minZoom:0),g=void 0!==e.maxZoom?e.maxZoom:28,d=void 0!==e.zoomFactor?e.zoomFactor:2;g=void 0!==e.resolutions?(o=(g=e.resolutions)[0],i=g[g.length-1],p=g,function(t,e,o){if(void 0!==t)return(t=Q((t=B(p,t,o))+e,0,p.length-1))!=(e=Math.floor(t))&&e<p.length-1?p[e]/Math.pow(p[e]/p[e+1],t-e):p[e]}):(r=(h=((i=(o=ge(e.projection)).G())?Math.max(Dt(i),It(i)):360*Yt.degrees/o.sc())/256/Math.pow(2,0))/Math.pow(2,28),void 0!==(o=e.maxResolution)?y=0:o=h/Math.pow(d,y),void 0===(i=e.minResolution)&&(i=void 0!==e.maxZoom?void 0!==e.maxResolution?o/Math.pow(d,g):h/Math.pow(d,g):r),g=y+Math.floor(Math.log(o/i)/Math.log(d)),i=o/Math.pow(d,g-y),n=d,s=o,a=g-y,function(t,e,o){if(void 0!==t)return t=Math.max(Math.floor(Math.log(s/t)/Math.log(n)+(-o/2+.5))+e,0),void 0!==a&&(t=Math.min(t,a)),s/Math.pow(n,t)}),t.a=o,t.f=i,t.C=d,t.j=e.resolutions,t.l=y,y=void 0===e.enableRotation||e.enableRotation?void 0===(y=e.constrainRotation)||!0===y?(u=it(5),function(t,e){if(void 0!==t)return Math.abs(t+e)<=u?0:t+e}):!1!==y&&"number"==typeof y?(h=y,l=2*Math.PI/h,function(t,e){if(void 0!==t)return Math.floor((t+e)/l+.5)*l}):$i:_i,t.g={center:void 0!==e.extent?(c=e.extent,function(t){if(t)return[Q(t[0],c[0],c[2]),Q(t[1],c[1],c[3])]}):Xe,resolution:g,rotation:y},void 0!==e.resolution?f.resolution=e.resolution:void 0!==e.zoom&&(f.resolution=t.constrainResolution(t.a,e.zoom-t.l)),f.rotation=void 0!==e.rotation?e.rotation:0,t.H(f),t.D=e}function $r(t,e){var o=Xt({},t.D);return void 0!==o.resolution?o.resolution=t.Pa():o.zoom=t.Hh(),o.center=t.wa(),o.rotation=t.Qa(),Xt({},o,e)}function Qr(t,e,o){var i,r=t.wa();return void 0!==r&&(sr(i=[r[0]-o[0],r[1]-o[1]],e-t.Qa()),er(i,o)),i}function tn(t,e,o){var i,r=t.wa();return t=t.Pa(),i=void 0!==r&&void 0!==t?[o[0]-e*(o[0]-r[0])/t,o[1]-e*(o[1]-r[1])/t]:i}function en(t){var e=[100,100];return t='.ol-viewport[data-view="'+U(t)+'"]',(t=document.querySelector(t))&&(t=getComputedStyle(t),e[0]=parseInt(t.width,10),e[1]=parseInt(t.height,10)),e}function on(t,e){return void 0!==e?(e[0]=t.o[0],e[1]=t.o[1],e):t.o.slice()}function rn(t){return t.wa()&&void 0!==t.Pa()}function nn(t,e,o){t.o[e]+=o,t.s()}function sn(t,e,o){this.f=t,this.c=e,this.g=o,this.b=[],this.a=this.i=0}function an(t){t.b.length=0,t.i=0,t.a=0}function pn(t){ro.call(this),this.v=null,this.Ha(!0),this.handleEvent=t.handleEvent}function hn(t,e,o,i){var r,n;void 0!==e&&(r=t.Qa(),n=t.wa(),void 0!==r&&n&&0<i?t.animate({rotation:e,anchor:o,duration:i,easing:Io}):t.rotate(e,o))}function ln(t,e,o,i){var r,n=t.Pa();e=t.constrainResolution(n,e,0),o&&void 0!==e&&e!==n&&(r=t.wa(),o=tn(t,e,o),o=t.Ec(o),o=[(e*r[0]-n*o[0])/(e-n),(e*r[1]-n*o[1])/(e-n)]),un(t,e,o,i)}function un(t,e,o,i){var r,n;e&&(r=t.Pa(),n=t.wa(),void 0!==r&&n&&e!==r&&i?t.animate({resolution:e,anchor:o,duration:i,easing:Io}):(o&&(o=tn(t,e,o),t.ob(o)),t.Vc(e)))}function cn(t){this.a=(t=t||{}).delta||1,pn.call(this,{handleEvent:fn}),this.g=void 0!==t.duration?t.duration:250}function fn(t){var e=!1,o=t.originalEvent;return"dblclick"==t.type&&(e=t.coordinate,o=o.shiftKey?-this.a:this.a,ln(t.map.Z(),o,e,this.g),t.preventDefault(),e=!0),!e}function yn(t){return(t=t.originalEvent).altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey}function gn(t){return!((t=t.originalEvent).button||ii&&ri&&t.ctrlKey)}function dn(t){return"pointermove"==t.type}function vn(t){return"singleclick"==t.type}function bn(t){return!(t=t.originalEvent).altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey}function mn(t){return!(t=t.originalEvent).altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey}function wn(t){return"INPUT"!==(t=t.originalEvent.target.tagName)&&"SELECT"!==t&&"TEXTAREA"!==t}function xn(t){return O(t.b,56),"mouse"==t.b.pointerType}function Sn(t){return(t=t.b).isPrimary&&0===t.button}function Mn(t){pn.call(this,{handleEvent:(t=t||{}).handleEvent||An}),this.yf=t.handleDownEvent||fr,this.If=t.handleDragEvent||Y,this.Jf=t.handleMoveEvent||Y,this.sk=t.handleUpEvent||fr,this.D=!1,this.na={},this.o=[]}function Pn(t){for(var e=t.length,o=0,i=0,r=0;r<e;r++)o+=t[r].clientX,i+=t[r].clientY;return[o/e,i/e]}function An(t){var e,o;return!(t instanceof mi&&(e=!1,"pointerdown"!==(o=t.type)&&"pointerdrag"!==o&&"pointerup"!==o||(o=t.b,"pointerup"==t.type?delete this.na[o.pointerId]:("pointerdown"==t.type||o.pointerId in this.na)&&(this.na[o.pointerId]=o),this.o=Wt(this.na)),this.D?"pointerdrag"==t.type?this.If(t):"pointerup"==t.type&&(this.D=this.sk(t)&&0<this.o.length):"pointerdown"==t.type?(this.D=t=this.yf(t),e=this.Xc(t)):"pointermove"==t.type&&this.Jf(t),e))}function En(t){Mn.call(this,{handleDownEvent:Cn,handleDragEvent:Tn,handleUpEvent:jn}),this.a=(t=t||{}).kinetic,this.g=null,this.u=t.condition||bn,this.j=!1}function Tn(t){var e,o,i=this.o,r=Pn(i);i.length==this.l?(this.a&&this.a.b.push(r[0],r[1],Date.now()),this.g&&(ar(o=[o=this.g[0]-r[0],r[1]-this.g[1]],(e=(t=t.map.Z()).getState()).resolution),sr(o,e.rotation),er(o,e.center),o=t.Ec(o),t.ob(o))):this.a&&an(this.a),this.g=r,this.l=i.length}function jn(t){var e,o,i,r=t.map;return t=r.Z(),this.o.length?(this.a&&an(this.a),!(this.g=null)):(!this.j&&this.a&&function(t){if(!(t.b.length<6)){var e=Date.now()-t.g,o=t.b.length-3;if(!(t.b[2+o]<e)){for(var i,r=o-3;0<r&&t.b[r+2]>e;)r-=3;if(!((e=t.b[2+o]-t.b[r+2])<1e3/60))return i=t.b[o]-t.b[r],o=t.b[1+o]-t.b[r+1],t.i=Math.atan2(o,i),t.a=Math.sqrt(i*i+o*o)/e,t.a>t.c}}}(this.a)&&(e=((e=this.a).c-e.a)/e.f,o=this.a.i,i=t.wa(),i=r.Ja(i),r=r.Wa([i[0]-e*Math.cos(o),i[1]-e*Math.sin(o)]),t.animate({center:t.Ec(r),duration:500,easing:Io})),nn(t,1,-1),!1)}function Cn(t){var e;return!!(0<this.o.length&&this.u(t))&&(e=t.map.Z(),this.g=null,this.D||nn(e,1,1),on(e)[0]&&e.ob(t.frameState.viewState.center),this.a&&an(this.a),this.j=1<this.o.length,!0)}function Ln(t){t=t||{},Mn.call(this,{handleDownEvent:Nn,handleDragEvent:Rn,handleUpEvent:In}),this.g=t.condition||yn,this.a=void 0,this.j=void 0!==t.duration?t.duration:250}function Rn(t){var e,o,i;xn(t)&&(e=(o=t.map).Z()).g.rotation!==_i&&(o=o.Ob(),t=t.pixel,t=Math.atan2(o[1]/2-t[1],t[0]-o[0]/2),void 0!==this.a&&(o=t-this.a,i=e.Qa(),hn(e,i-o)),this.a=t)}function In(t){if(!xn(t))return!0;nn(t=t.map.Z(),1,-1);var e=t.Qa(),o=this.j,e=t.constrainRotation(e,0);return hn(t,e,void 0,o),!1}function Nn(t){return!!(xn(t)&&gn(t)&&this.g(t))&&(nn(t.map.Z(),1,1),!(this.a=void 0))}function Fn(t){this.Gc=null,this.a=document.createElement("div"),this.a.style.position="absolute",this.a.className="ol-box "+t,this.i=this.c=this.b=null}function kn(t){var e=t.c,o=t.i;(t=t.a.style).left=Math.min(e[0],o[0])+"px",t.top=Math.min(e[1],o[1])+"px",t.width=Math.abs(o[0]-e[0])+"px",t.height=Math.abs(o[1]-e[1])+"px"}function Dn(t){var e=t.c,o=t.i;(e=[e,[e[0],o[1]],o,[o[0],e[1]]].map(t.b.Wa,t.b))[4]=e[0].slice(),t.Gc?t.Gc.ma([e]):t.Gc=new w([e])}function On(t){Mn.call(this,{handleDownEvent:Xn,handleDragEvent:Gn,handleUpEvent:Bn}),this.a=new Fn((t=t||{}).className||"ol-dragbox"),this.u=void 0!==t.minArea?t.minArea:64,this.g=null,this.C=t.condition||cr,this.l=t.boxEndCondition||Un}function Un(t,e,o){return(t=o[0]-e[0])*t+(e=o[1]-e[1])*e>=this.u}function Gn(t){var e,o;xn(t)&&(e=this.a,o=t.pixel,e.c=this.g,e.i=o,Dn(e),kn(e),this.b(new Kn(Wn,t.coordinate,t)))}function Bn(t){return!xn(t)||(this.a.setMap(null),this.l(t,this.g,t.pixel)&&(this.j(t),this.b(new Kn(Zn,t.coordinate,t))),!1)}function Xn(t){var e,o;return!!(xn(t)&&gn(t)&&this.C(t))&&(this.g=t.pixel,this.a.setMap(t.map),e=this.a,o=this.g,e.c=this.g,e.i=o,Dn(e),kn(e),this.b(new Kn(Vn,t.coordinate,t)),!0)}e(Xi,eo),(r=Xi.prototype).Jh=function(t){Vi(this,t);var e,o=new mi("pointerup",this.i,t);this.b(o),this.o||t.button||(e=(o=this).c,t=new mi("click",o.i,e),o.b(t),o.j?(clearTimeout(o.j),o.j=0,t=new mi("dblclick",o.i,e),o.b(t)):o.j=setTimeout(function(){this.j=0;var t=new mi("singleclick",this.i,e);this.b(t)}.bind(o),250)),this.S||(this.f.forEach(qe),this.f.length=0,this.o=!1,this.c=null,$e(this.a),this.a=null)},r.Ol=function(t){Vi(this,t);var e=new mi("pointerdown",this.i,t);this.b(e),this.c=t,this.f.length||(this.a=new Ii(document),this.f.push(d(this.a,"pointermove",this.Hm,this),d(this.a,"pointerup",this.Jh,this),d(this.g,"pointercancel",this.Jh,this)))},r.Hm=function(t){var e;Wi(this,t)&&(this.o=!0,e=new mi("pointerdrag",this.i,t,this.o),this.b(e)),t.preventDefault()},r.Lp=function(t){this.b(new mi(t.type,this.i,t,!(!this.c||!Wi(this,t))))},r.ka=function(){this.v&&(qe(this.v),this.v=null),this.l&&(qe(this.l),this.l=null),this.f.forEach(qe),this.f.length=0,this.a&&($e(this.a),this.a=null),this.g&&($e(this.g),this.g=null),eo.prototype.ka.call(this)},Zi.prototype.clear=function(){this.b.length=0,this.i.length=0,Vt(this.a)},Zi.prototype.f=function(t){O(!(this.c(t)in this.a),31);var e=this.l(t);return 1/0!=e&&(this.b.push(t),this.i.push(e),this.a[this.c(t)]=!0,Yi(this,0,this.b.length-1),!0)},e(qi,Zi),qi.prototype.f=function(t){var e=Zi.prototype.f.call(this,t);return e&&d(t[0],"change",this.o,this),e},qi.prototype.o=function(t){var e=(t=t.target).getState();2!==e&&3!==e&&4!==e&&5!==e||(He(t,"change",this.o,this),(t=t.bb())in this.g&&(delete this.g[t],--this.j),this.v())},e(yr,ro),(r=yr.prototype).Ab=function(t,e){return this.Kb(t[0],t[1],e=e||[NaN,NaN],1/0),e},r.sb=function(t){return this.Mc(t[0],t[1])},r.Mc=fr,r.G=function(t){this.v!=this.i&&(this.l=this.se(this.l),this.v=this.i);var e=this.l;return t?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3]):t=e,t},r.Rb=function(t){return this.Vd(t*t)},r.tb=function(t,e){return this.Dc(me(t,e)),this},e(b,yr),(r=b.prototype).Mc=fr,r.se=function(t){return xt(this.A,0,this.A.length,this.a,t)},r.ac=function(){return this.A.slice(0,this.a)},r.ga=function(){return this.A},r.bc=function(){return this.A.slice(this.A.length-this.a)},r.cc=function(){return this.ja},r.Vd=function(t){if(this.o!=this.i&&(Vt(this.f),this.g=0,this.o=this.i),!(t<0||this.g&&t<=this.g)){var e=t.toString();if(this.f.hasOwnProperty(e))return this.f[e];var o=this.hd(t);if(o.ga().length<this.A.length)return this.f[e]=o;this.g=t}return this},r.hd=function(){return this},r.qa=function(){return this.a},r.Dc=function(t){this.A&&(t(this.A,this.A,this.a),this.s())},r.rotate=function(t,e){var o=this.ga();if(o){var i=o.length,r=this.qa(),n=o||[],s=Math.cos(t),a=(t=Math.sin(t),e[0]);e=e[1];for(var p=0,h=0;h<i;h+=r){var l=o[h]-a,u=o[h+1]-e;for(n[p++]=a+l*s-u*t,n[p++]=e+l*t+u*s,l=h+2;l<h+r;++l)n[p++]=o[l]}o&&n.length!=p&&(n.length=p),this.s()}},r.scale=function(t,e,o){var i=void 0===e?t:e;if(a=(a=o)||Lt(this.G()),o=this.ga()){e=o.length;for(var r=this.qa(),n=o||[],s=a[0],a=a[1],p=0,h=0;h<e;h+=r){var l=o[h]-s,u=o[h+1]-a;for(n[p++]=s+t*l,n[p++]=a+i*u,l=h+2;l<h+r;++l)n[p++]=o[l]}o&&n.length!=p&&(n.length=p),this.s()}},r.translate=function(t,e){var o=this.ga();o&&(dr(o,0,o.length,this.qa(),t,e,o),this.s())},e(Fr,b),(r=Fr.prototype).clone=function(){var t=new Fr(null);return kr(t,this.ja,this.A.slice()),t},r.Kb=function(t,e,o,i){return i<ct(this.G(),t,e)?i:(this.c!=this.i&&(this.j=Math.sqrt(Mr(this.A,0,this.A.length,this.a,0)),this.c=this.i),Ar(this.A,0,this.A.length,this.a,this.j,!0,t,e,o,i))},r.qn=function(){return wr(this.A,0,this.A.length,this.a)},r.X=function(){return Lr(this.A,0,this.A.length,this.a)},r.hd=function(t){var e=[];return e.length=Ir(this.A,0,this.A.length,this.a,t,e,0),kr(t=new Fr(null),"XY",e),t},r.U=function(){return"LinearRing"},r.Xa=function(){},r.ma=function(t,e){t?(mr(this,e,t,1),this.A||(this.A=[]),this.A.length=jr(this.A,0,t,this.a),this.s()):kr(this,"XY",null)},e(m,b),(r=m.prototype).clone=function(){var t=new m(null);return t.ba(this.ja,this.A.slice()),t},r.Kb=function(t,e,o,i){var r=this.A;if((t=ot(t,e,r[0],r[1]))<i){for(i=this.a,e=0;e<i;++e)o[e]=r[e];return o.length=i,t}return i},r.X=function(){return this.A?this.A.slice():[]},r.se=function(t){return wt(this.A,t)},r.U=function(){return"Point"},r.Xa=function(t){return gt(t,this.A[0],this.A[1])},r.ma=function(t,e){t?(mr(this,e,t,0),this.A||(this.A=[]),this.A.length=Tr(this.A,t),this.s()):this.ba("XY",null)},r.ba=function(t,e){br(this,t,e),this.s()},e(w,b),(r=w.prototype).pk=function(t){this.A?X(this.A,t.ga()):this.A=t.ga().slice(),this.c.push(this.A.length),this.s()},r.clone=function(){var t=new w(null);return t.ba(this.ja,this.A.slice(),this.c.slice()),t},r.Kb=function(t,e,o,i){return i<ct(this.G(),t,e)?i:(this.C!=this.i&&(this.B=Math.sqrt(Pr(this.A,0,this.c,this.a,0)),this.C=this.i),Er(this.A,0,this.c,this.a,this.B,!0,t,e,o,i))},r.Mc=function(t,e){return Or(this.ec(),0,this.c,this.a,t,e)},r.tn=function(){return xr(this.ec(),0,this.c,this.a)},r.X=function(t){var e;return void 0!==t?Zr(e=this.ec().slice(),0,this.c,this.a,t):e=this.A,Rr(e,0,this.c,this.a)},r.Bb=function(){return this.c},r.Tk=function(){return new m(zr(this))},r.Zk=function(){return this.c.length},r.Ch=function(t){var e;return t<0||this.c.length<=t?null:(kr(e=new Fr(null),this.ja,this.A.slice(t?this.c[t-1]:0,this.c[t])),e)},r.Sd=function(){for(var t=this.ja,e=this.A,o=this.c,i=[],r=0,n=0,s=o.length;n<s;++n){var a=o[n],p=new Fr(null);kr(p,t,e.slice(r,a)),i.push(p),r=a}return i},r.ec=function(){var t;return this.I!=this.i&&(Wr(t=this.A,this.c,this.a)?this.j=t:(this.j=t.slice(),this.j.length=Zr(this.j,0,this.c,this.a)),this.I=this.i),this.j},r.hd=function(t){var e=[],o=[];return e.length=Nr(this.A,0,this.c,this.a,Math.sqrt(t),e,0,o),(t=new w(null)).ba("XY",e,o),t},r.U=function(){return"Polygon"},r.Xa=function(t){return Xr(this.ec(),0,this.c,this.a,t)},r.ma=function(t,e){t?(mr(this,e,t,2),this.A||(this.A=[]),t=Cr(this.A,0,t,this.a,this.c),this.A.length=t.length?t[t.length-1]:0,this.s()):this.ba("XY",null,this.c)},r.ba=function(t,e,o){br(this,t,e),this.c=o,this.s()},e(h,ro),(r=h.prototype).animate=function(t){var e,o=Date.now(),i=this.wa().slice(),r=this.Pa(),n=this.Qa(),s=arguments.length;1<s&&"function"==typeof arguments[s-1]&&(e=arguments[s-1],--s);for(var a=[],p=0;p<s;++p){var h=arguments[p],l={start:o,complete:!1,anchor:h.anchor,duration:void 0!==h.duration?h.duration:1e3,easing:h.easing||No};h.center&&(l.Rg=i,l.Tg=h.center,i=l.Tg),void 0!==h.zoom?(l.tf=r,l.zd=this.constrainResolution(this.a,h.zoom-this.l,0),r=l.zd):h.resolution&&(l.tf=r,l.zd=h.resolution,r=l.zd),void 0!==h.rotation&&(l.Sg=n,l.uf=h.rotation,n=l.uf),l.callback=e,o+=l.duration,a.push(l)}this.c.push(a),nn(this,0,1),this.wf()},r.Ic=function(){return 0<on(this)[0]},r.Rk=function(){return 0<on(this)[1]},r.ed=function(){nn(this,0,-on(this)[0]);for(var t=0,e=this.c.length;t<e;++t){var o=this.c[t];o[0].callback&&o[0].callback(!1)}this.c.length=0},r.wf=function(){if(void 0!==this.u&&(cancelAnimationFrame(this.u),this.u=void 0),this.Ic()){for(var t=Date.now(),e=!1,o=this.c.length-1;0<=o;--o){for(var i=this.c[o],r=!0,n=0,s=i.length;n<s;++n){var a=i[n];if(!a.complete){var p,h,e=t-a.start;if(1<=(e=0<a.duration?e/a.duration:1)?(a.complete=!0,e=1):r=!1,e=a.easing(e),a.Rg&&(p=a.Rg[0],h=a.Rg[1],this.set("center",[p+e*(a.Tg[0]-p),h+e*(a.Tg[1]-h)])),a.tf&&a.zd&&(p=1===e?a.zd:a.tf+e*(a.zd-a.tf),a.anchor&&this.set("center",tn(this,p,a.anchor)),this.set("resolution",p)),void 0!==a.Sg&&void 0!==a.uf&&(e=1===e?a.uf:a.Sg+e*(a.uf-a.Sg),a.anchor&&this.set("center",Qr(this,e,a.anchor)),this.set("rotation",e)),e=!0,!a.complete)break}}r&&(this.c[o]=null,nn(this,0,-1),i=i[0].callback)&&i(!0)}this.c=this.c.filter(Boolean),e&&void 0===this.u&&(this.u=requestAnimationFrame(this.wf))}},r.Ec=function(t){return this.g.center(t)},r.constrainResolution=function(t,e,o){return this.g.resolution(t,e||0,o||0)},r.constrainRotation=function(t,e){return this.g.rotation(t,e||0)},r.wa=function(){return this.get("center")},r.dd=function(t){t=t||en(this);var e=this.wa(),o=(O(e,1),this.Pa()),i=(O(void 0!==o,2),this.Qa());return O(void 0!==i,3),Rt(e,o,i,t)},r.Nm=function(){return this.a},r.Pm=function(){return this.f},r.Om=function(){return this.Ce(this.f)},r.eq=function(t){_r(this,$r(this,{maxZoom:t}))},r.Qm=function(){return this.Ce(this.a)},r.fq=function(t){_r(this,$r(this,{minZoom:t}))},r.Rm=function(){return this.v},r.Pa=function(){return this.get("resolution")},r.Sm=function(){return this.j},r.ze=function(t,e){return e=e||en(this),Math.max(Dt(t)/e[0],It(t)/e[1])},r.Qa=function(){return this.get("rotation")},r.getState=function(){var t=this.wa(),e=this.v,o=this.Pa(),i=this.Qa();return{center:t.slice(),projection:void 0!==e?e:null,resolution:o,rotation:i}},r.Hh=function(){var t,e=this.Pa();return t=void 0!==e?this.Ce(e):t},r.Ce=function(t){if(t>=this.f&&t<=this.a){var e=this.l||0;if(this.j){if(e+=i=B(this.j,t,1),i==this.j.length-1)return e;var o=this.j[i],i=o/this.j[i+1]}else o=this.a,i=this.C;e+=Math.log(o/t)/Math.log(i)}return e},r.Qf=function(t,e){var o=(o=(e=e||{}).size)||en(this);t instanceof b?"Circle"===t.U()?(f=Hr(t=t.G())).rotate(this.Qa(),Lt(t)):f=t:(O(Array.isArray(t),24),O(!Ut(t),25),f=Hr(t));for(var i=e.padding||[0,0,0,0],r=void 0===e.constrainResolution||e.constrainResolution,n=void 0!==e.nearest&&e.nearest,s=void 0!==e.minResolution?e.minResolution:void 0!==e.maxZoom?this.constrainResolution(this.a,e.maxZoom-this.l,0):0,a=f.ga(),p=this.Qa(),p=(t=Math.cos(-p),Math.sin(-p)),h=1/0,l=1/0,u=-1/0,c=-1/0,f=f.qa(),y=0,g=a.length;y<g;y+=f)var d=a[y]*t-a[y+1]*p,v=a[y]*p+a[y+1]*t,h=Math.min(h,d),l=Math.min(l,v),u=Math.max(u,d),c=Math.max(c,v);o=this.ze([h,l,u,c],[o[0]-i[1]-i[3],o[1]-i[0]-i[2]]),o=isNaN(o)?s:Math.max(o,s),r&&(s=this.constrainResolution(o,0,0),o=s=!n&&s<o?this.constrainResolution(s,-1,0):s),t=[(s=(h+u)/2+(i[1]-i[3])/2*o)*t-(i=(l+c)/2+(i[0]-i[2])/2*o)*(p=-p),i*t+s*p],i=e.callback||Y,void 0!==e.duration?this.animate({resolution:o,center:t,duration:e.duration,easing:e.easing},i):(this.Vc(o),this.ob(t),setTimeout(i.bind(void 0,!0),0))},r.uk=function(t,e,o){var i=this.Qa(),r=Math.cos(-i),i=Math.sin(-i),n=t[0]*r-t[1]*i,s=(t=t[1]*r+t[0]*i,this.Pa()),n=n+(e[0]/2-o[0])*s;t+=(o[1]-e[1]/2)*s,this.ob([n*r-t*(i=-i),t*r+n*i])},r.rotate=function(t,e){void 0!==e&&(e=Qr(this,t,e),this.ob(e)),this.Oe(t)},r.ob=function(t){this.set("center",t),this.Ic()&&this.ed()},r.Vc=function(t){this.set("resolution",t),this.Ic()&&this.ed()},r.Oe=function(t){this.set("rotation",t),this.Ic()&&this.ed()},r.lq=function(t){t=this.constrainResolution(this.a,t-this.l,0),this.Vc(t)},e(pn,ro),pn.prototype.c=function(){return this.get("active")},pn.prototype.f=function(){return this.v},pn.prototype.Ha=function(t){this.set("active",t)},pn.prototype.setMap=function(t){this.v=t},e(cn,pn),e(Mn,pn),Mn.prototype.Xc=function(t){return t},e(En,Mn),En.prototype.Xc=fr,e(Ln,Mn),Ln.prototype.Xc=fr,e(Fn,_e),Fn.prototype.ka=function(){this.setMap(null)},Fn.prototype.setMap=function(t){var e;this.b&&(this.b.C.removeChild(this.a),(e=this.a.style).left=e.top=e.width=e.height="inherit"),(this.b=t)&&this.b.C.appendChild(this.a)},Fn.prototype.V=function(){return this.Gc},e(On,Mn),On.prototype.V=function(){return this.a.V()},On.prototype.j=Y;var Vn="boxstart",Wn="boxdrag",Zn="boxend";function Kn(t,e,o){Qe.call(this,t),this.coordinate=e,this.mapBrowserEvent=o}function zn(t){var e=(t=t||{}).condition||mn;this.B=void 0!==t.duration?t.duration:200,this.I=void 0!==t.out&&t.out,On.call(this,{condition:e,className:t.className||"ol-dragzoom"})}function Yn(t){pn.call(this,{handleEvent:Hn}),t=t||{},this.a=function(t){return bn(t)&&wn(t)},this.g=t.condition||this.a,this.j=void 0!==t.duration?t.duration:100,this.o=void 0!==t.pixelDelta?t.pixelDelta:128}function Hn(t){var e,o,i,r,n=!1;return"keydown"==t.type&&(e=t.originalEvent.keyCode,!this.g(t)||40!=e&&37!=e&&39!=e&&38!=e||(o=(n=t.map.Z()).Pa()*this.o,r=i=0,40==e?r=-o:37==e?i=-o:39==e?i=o:r=o,sr(o=[i,r],n.Qa()),e=this.j,(i=n.wa())&&(o=n.Ec([i[0]+o[0],i[1]+o[1]]),e?n.animate({duration:e,easing:Fo,center:o}):n.ob(o)),t.preventDefault(),n=!0)),!n}function qn(t){pn.call(this,{handleEvent:Jn}),this.g=(t=t||{}).condition||wn,this.a=t.delta||1,this.j=void 0!==t.duration?t.duration:100}function Jn(t){var e,o=!1;return"keydown"!=t.type&&"keypress"!=t.type||(e=t.originalEvent.charCode,!this.g(t))||43!=e&&45!=e||(o=43==e?this.a:-this.a,ln(e=t.map.Z(),o,void 0,this.j),t.preventDefault(),o=!0),!o}function _n(t){pn.call(this,{handleEvent:$n}),t=t||{},this.j=0,this.D=void 0!==t.duration?t.duration:250,this.na=void 0!==t.timeout?t.timeout:80,this.C=void 0===t.useAnchor||t.useAnchor,this.R=t.constrainResolution||!1,this.a=null,this.l=this.o=this.u=this.g=void 0}function $n(t){if("wheel"!==(s=t.type)&&"mousewheel"!==s)return!0;t.preventDefault();var e,o,i,r,n,s=t.map,a=t.originalEvent;return this.C&&(this.a=t.coordinate),"wheel"==t.type?(e=a.deltaY,ei&&a.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=ni),a.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)):"mousewheel"==t.type&&(e=-a.wheelDeltaY,oi)&&(e/=3),0!==e&&(t=Date.now(),void 0===this.g&&(this.g=t),(!this.o||400<t-this.g)&&(this.o=Math.abs(e)<4?Qn:ts),this.o===Qn?(s=s.Z(),this.l?clearTimeout(this.l):nn(s,1,1),this.l=setTimeout(this.B.bind(this),400),a=s.Pa()*Math.pow(2,e/300),o=s.f,i=s.a,r=0,a<o?(a=Math.max(a,o/1.5),r=1):i<a&&(a=Math.min(a,1.5*i),r=-1),this.a&&(n=tn(s,a,this.a),s.ob(s.Ec(n))),s.Vc(a),!r&&this.R&&s.animate({resolution:s.constrainResolution(a,0<e?-1:1),easing:Io,anchor:this.a,duration:this.D}),0<r?s.animate({resolution:o,easing:Io,anchor:this.a,duration:500}):r<0&&s.animate({resolution:i,easing:Io,anchor:this.a,duration:500}),this.g=t):(this.j+=e,e=Math.max(this.na-(t-this.g),0),clearTimeout(this.u),this.u=setTimeout(this.I.bind(this,s),e))),!1}e(Kn,Qe),e(zn,On),zn.prototype.j=function(){var t=(r=this.v).Z(),e=r.Ob(),o=this.V().G();if(this.I){for(var i=t.dd(e),o=[r.Ja(jt(o)),r.Ja(kt(o))],r=mt(void 0),n=0,s=o.length;n<s;++n)Pt(r,o[n]);Gt(i,1/(o=t.ze(r,e))),o=i}e=t.constrainResolution(t.ze(o,e)),i=Lt(o),i=t.Ec(i),t.animate({resolution:e,center:i,duration:this.B,easing:Io})},e(Yn,pn),e(qn,pn),e(_n,pn),_n.prototype.B=function(){this.l=void 0,nn(this.v.Z(),1,-1)},_n.prototype.I=function(t){(t=t.Z()).Ic()&&t.ed(),ln(t,-Q(this.j,-1,1),this.a,this.D),this.o=void 0,this.j=0,this.a=null,this.u=this.g=void 0},_n.prototype.T=function(t){(this.C=t)||(this.a=null)};var Qn="trackpad",ts="wheel";function es(t){Mn.call(this,{handleDownEvent:rs,handleDragEvent:os,handleUpEvent:is}),t=t||{},this.g=null,this.j=void 0,this.a=!1,this.l=0,this.C=void 0!==t.threshold?t.threshold:.3,this.u=void 0!==t.duration?t.duration:250}function os(t){var e,o=0,i=this.o[0],r=this.o[1],i=Math.atan2(r.clientY-i.clientY,r.clientX-i.clientX);void 0!==this.j&&(o=i-this.j,this.l+=o,!this.a)&&Math.abs(this.l)>this.C&&(this.a=!0),this.j=i,(i=(t=t.map).Z()).g.rotation!==_i&&(r=t.a.getBoundingClientRect(),(e=Pn(this.o))[0]-=r.left,e[1]-=r.top,this.g=t.Wa(e),this.a)&&(r=i.Qa(),t.render(),hn(i,r+o,this.g))}function is(t){var e,o,i;return!(this.o.length<2&&(nn(t=t.map.Z(),1,-1),this.a&&(i=t.Qa(),e=this.g,o=this.u,i=t.constrainRotation(i,0),hn(t,i,e,o)),1))}function rs(t){return 2<=this.o.length&&(t=t.map,this.g=null,this.j=void 0,this.a=!1,this.l=0,this.D||nn(t.Z(),1,1),!0)}function ns(t){Mn.call(this,{handleDownEvent:ps,handleDragEvent:ss,handleUpEvent:as}),this.l=(t=t||{}).constrainResolution||!1,this.g=null,this.u=void 0!==t.duration?t.duration:400,this.a=void 0,this.j=1}function ss(t){var e=1,o=this.o[0],i=this.o[1],r=o.clientX-i.clientX,o=o.clientY-i.clientY,r=Math.sqrt(r*r+o*o);void 0!==this.a&&(e=this.a/r),this.a=r;var i=(r=(t=t.map).Z()).Pa(),n=r.a,s=r.f;n<(o=i*e)?(e=n/i,o=n):o<s&&(e=s/i,o=s),1!=e&&(this.j=e),e=t.a.getBoundingClientRect(),(i=Pn(this.o))[0]-=e.left,i[1]-=e.top,this.g=t.Wa(i),t.render(),un(r,o,this.g)}function as(t){var e,o,i;return!(this.o.length<2&&(nn(t=t.map.Z(),1,-1),i=t.Pa(),(this.l||i<t.f||i>t.a)&&(e=this.g,o=this.u,i=t.constrainResolution(i,0,this.j-1),un(t,i,e,o)),1))}function ps(t){return 2<=this.o.length&&(t=t.map,this.g=null,this.a=void 0,this.j=1,this.D||nn(t.Z(),1,1),!0)}function hs(t){t=t||{};var e=new ho,o=new sn(-.005,.05,100);return void 0!==t.altShiftDragRotate&&!t.altShiftDragRotate||e.push(new Ln),void 0!==t.doubleClickZoom&&!t.doubleClickZoom||e.push(new cn({delta:t.zoomDelta,duration:t.zoomDuration})),void 0!==t.dragPan&&!t.dragPan||e.push(new En({kinetic:o})),void 0!==t.pinchRotate&&!t.pinchRotate||e.push(new es),void 0!==t.pinchZoom&&!t.pinchZoom||e.push(new ns({constrainResolution:t.constrainResolution,duration:t.zoomDuration})),void 0!==t.keyboard&&!t.keyboard||(e.push(new Yn),e.push(new qn({delta:t.zoomDelta,duration:t.zoomDuration}))),void 0!==t.mouseWheelZoom&&!t.mouseWheelZoom||e.push(new _n({constrainResolution:t.constrainResolution,duration:t.zoomDuration})),void 0!==t.shiftDragZoom&&!t.shiftDragZoom||e.push(new zn({duration:t.zoomDuration})),e}function ls(t){ro.call(this);var e=Xt({},t);e.opacity=void 0!==t.opacity?t.opacity:1,e.visible=void 0===t.visible||t.visible,e.zIndex=void 0!==t.zIndex?t.zIndex:0,e.maxResolution=void 0!==t.maxResolution?t.maxResolution:1/0,e.minResolution=void 0!==t.minResolution?t.minResolution:0,this.H(e),this.a={layer:this,Je:!0}}function us(t){return t.a.opacity=Q(t.hc(),0,1),t.a.yj=t.$f(),t.a.visible=t.Mb(),t.a.extent=t.G(),t.a.zIndex=t.Ba(),t.a.maxResolution=t.fc(),t.a.minResolution=Math.max(t.gc(),0),t.a}function cs(t){var e=t||{};delete(t=Xt({},e)).layers,e=e.layers,ls.call(this,t),this.f=[],this.c={},d(this,so(fs),this.Hl,this),e?Array.isArray(e)?e=new ho(e.slice(),{unique:!0}):O(e instanceof ho,43):e=new ho(void 0,{unique:!0}),this.xi(e)}e(es,Mn),es.prototype.Xc=fr,e(ns,Mn),ns.prototype.Xc=fr,e(ls,ro),(r=ls.prototype).G=function(){return this.get("extent")},r.fc=function(){return this.get("maxResolution")},r.gc=function(){return this.get("minResolution")},r.hc=function(){return this.get("opacity")},r.Mb=function(){return this.get("visible")},r.Ba=function(){return this.get("zIndex")},r.vc=function(t){this.set("extent",t)},r.Ac=function(t){this.set("maxResolution",t)},r.Bc=function(t){this.set("minResolution",t)},r.wc=function(t){this.set("opacity",t)},r.xc=function(t){this.set("visible",t)},r.Vb=function(t){this.set("zIndex",t)},e(cs,ls),(r=cs.prototype).Fd=function(){},r.Fe=function(){this.Mb()&&this.s()},r.Hl=function(){this.f.forEach(qe),this.f.length=0;var t=this.qd();for(e in this.f.push(d(t,"add",this.Gl,this),d(t,"remove",this.Il,this)),this.c)this.c[e].forEach(qe);Vt(this.c);for(var e=0,o=(t=t.a).length;e<o;e++){var i=t[e];this.c[U(i).toString()]=[d(i,"propertychange",this.Fe,this),d(i,"change",this.Fe,this)]}this.s()},r.Gl=function(t){var e=U(t=t.element).toString();this.c[e]=[d(t,"propertychange",this.Fe,this),d(t,"change",this.Fe,this)],this.s()},r.Il=function(t){t=U(t.element).toString(),this.c[t].forEach(qe),delete this.c[t],this.s()},r.qd=function(){return this.get(fs)},r.xi=function(t){this.set(fs,t)},r.Yf=function(t){var e,o=void 0!==t?t:[],i=o.length;for(this.qd().forEach(function(t){t.Yf(o)}),t=us(this),e=o.length;i<e;i++){var r=o[i];r.opacity*=t.opacity,r.visible=r.visible&&t.visible,r.maxResolution=Math.min(r.maxResolution,t.maxResolution),r.minResolution=Math.max(r.minResolution,t.minResolution),void 0!==t.extent&&(r.extent=void 0!==r.extent?Nt(r.extent,t.extent):t.extent)}return o},r.$f=function(){return"ready"};var fs="layers";function ys(t){var e=Xt({},t);delete e.source,ls.call(this,e),this.v=this.l=this.o=null,t.map&&this.setMap(t.map),d(this,so("source"),this.Ul,this),this.Wc(t.source||null)}function gs(t,e){return t.visible&&e>=t.minResolution&&e<t.maxResolution}function ds(){this.b={},this.a=0}e(ys,ls),(r=ys.prototype).Yf=function(t){return(t=t||[]).push(us(this)),t},r.ha=function(){return this.get("source")||null},r.$f=function(){var t=this.ha();return t?t.getState():"undefined"},r.Tn=function(){this.s()},r.Ul=function(){this.v&&(qe(this.v),this.v=null);var t=this.ha();t&&(this.v=d(t,"change",this.Tn,this)),this.s()},r.setMap=function(t){this.o&&(qe(this.o),this.o=null),t||this.s(),this.l&&(qe(this.l),this.l=null),t&&(this.o=d(t,"precompose",function(t){var e=us(this);e.Je=!1,e.zIndex=1/0,t.frameState.layerStatesArray.push(e),t.frameState.layerStates[U(this)]=e},this),this.l=d(this,"change",t.render,t),this.s())},r.Wc=function(t){this.set("source",t)},ds.prototype.clear=function(){this.b={},this.a=0},ds.prototype.get=function(t,e,o){return(t=e+":"+t+":"+(o?bo(o):"null"))in this.b?this.b[t]:null},ds.prototype.set=function(t,e,o,i){this.b[e+":"+t+":"+(o?bo(o):"null")]=i,++this.a};var vs=new ds,bs=Array(6);function ms(){return[1,0,0,1,0,0]}function ws(t){return Ss(t,1,0,0,1,0,0)}function xs(t,e){var o=t[0],i=t[1],r=t[2],n=t[3],s=t[4],a=t[5],p=e[0],h=e[1],l=e[2],u=e[3],c=e[4];return e=e[5],t[0]=o*p+r*h,t[1]=i*p+n*h,t[2]=o*l+r*u,t[3]=i*l+n*u,t[4]=o*c+r*e+s,t[5]=i*c+n*e+a,t}function Ss(t,e,o,i,r,n,s){return t[0]=e,t[1]=o,t[2]=i,t[3]=r,t[4]=n,t[5]=s,t}function Ms(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Ps(t,e){var o=e[0],i=e[1];return e[0]=t[0]*o+t[2]*i+t[4],e[1]=t[1]*o+t[3]*i+t[5],e}function As(t,e){var o=Math.cos(e);e=Math.sin(e),xs(t,Ss(bs,o,e,-e,o,0,0))}function Es(t,e,o){return xs(t,Ss(bs,e,0,0,o,0,0))}function Ts(t,e,o){xs(t,Ss(bs,1,0,0,1,e,o))}function js(t,e,o,i,r,n,s,a){var p=Math.sin(n);return n=Math.cos(n),t[0]=i*n,t[1]=r*p,t[2]=-i*p,t[3]=r*n,t[4]=s*i*n-a*i*p+e,t[5]=s*r*p+a*r*n+o,t}function Cs(t){var e=t[0]*t[3]-t[1]*t[2],o=(O(!!e,32),t[0]),i=t[1],r=t[2],n=t[3],s=t[4],a=t[5];return t[0]=n/e,t[1]=-i/e,t[2]=-r/e,t[3]=o/e,t[4]=(r*a-n*s)/e,t[5]=-(o*a-i*s)/e,t}function Ls(t,e){this.o=e,this.c={},this.v={}}function Rs(t){var e=t.viewState,o=t.coordinateToPixelTransform,i=t.pixelToCoordinateTransform;js(o,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Cs(Ms(i,o))}function Is(){if(32<vs.a){var t,e=0;for(t in vs.b){var o=vs.b[t];3&e++||oo(o)||(delete vs.b[t],--vs.a)}}}function Ns(t,e){var o=U(e).toString();return o in t.c?t.c[o]:(e=e.Fd(t),t.c[o]=e,t.v[o]=d(e,"change",t.Fl,t),e)}function Fs(t,e){for(var o in t.c)if(!(o in e.layerStates)){e.postRenderFunctions.push(t.Rp.bind(t));break}}function ks(t,e){return t.zIndex-e.zIndex}function Ds(t,e,o,i,r){Qe.call(this,t),this.vectorContext=e,this.frameState=o,this.context=i,this.glContext=r}e(Ls,_e),(r=Ls.prototype).ka=function(){for(var t in this.c)$e(this.c[t])},r.Ea=function(t,r,e,n,s,o,i){function a(t,e){var o=U(t).toString(),i=r.layerStates[U(e)].Je;if(!(o in r.skippedFeatureUids)||i)return n.call(s,t,i?e:null)}var p,h,l=(c=r.viewState).resolution,u=c.projection,c=t;for(u.i&&(h=Dt(u=u.G()),(y=t[0])<u[0]||y>u[2])&&(c=[y+h*Math.ceil((u[0]-y)/h),t[1]]),h=(u=r.layerStatesArray).length-1;0<=h;--h){var f=u[h],y=f.layer;if(gs(f,l)&&o.call(i,y)&&(f=Ns(this,y),p=y.ha()?f.Ea(y.ha().u?c:t,r,e,a,s):p))return p}},r.Ei=function(t,e,o,i,r){return void 0!==this.Ea(t,e,o,cr,this,i,r)},r.Fl=function(){this.o.render()},r.Jg=Y,r.Rp=function(t,e){for(var o in this.c)e&&o in e.layerStates||(t=o,o=this.c[t],delete this.c[t],qe(this.v[t]),delete this.v[t],$e(o))},e(Ds,Qe);var Os=[0,0,0,1],Us=[],Gs=[0,0,0,1];function Bs(t,e,o,i){e&&(t.translate(o,i),t.rotate(e),t.translate(-o,-i))}function Xs(){}function Vs(t,e,o,i,r){this.i=t,this.u=e,this.c=o,this.S=i,this.Yb=r,this.M=this.b=this.a=this.Ua=this.R=this.I=null,this.na=this.T=this.l=this.B=this.C=this.D=0,this.fa=!1,this.f=this.fb=0,this.pa=!1,this.oa=0,this.Ia="",this.va=this.Jb=0,this.Sa=!1,this.j=this.$a=0,this.ra=this.o=this.g=null,this.v=[],this.xb=ms()}function Ws(t,e,o){if(t.M){e=gr(e,0,o,2,t.S,t.v),o=t.i;for(var i=t.xb,r=o.globalAlpha,n=(1!=t.l&&(o.globalAlpha=r*t.l),t.fb),s=(t.fa&&(n+=t.Yb),0),a=e.length;s<a;s+=2){var p,h,l=e[s]-t.D,u=e[s+1]-t.C;t.pa&&(l=Math.round(l),u=Math.round(u)),!n&&1==t.f||(js(i,p=l+t.D,h=u+t.C,t.f,t.f,n,-p,-h),o.setTransform.apply(o,i)),o.drawImage(t.M,t.T,t.na,t.oa,t.B,l,u,t.oa,t.B)}!n&&1==t.f||o.setTransform(1,0,0,1,0,0),1!=t.l&&(o.globalAlpha=r)}}function Zs(t,e,o,i){var r=0;if(t.ra&&""!==t.Ia){t.g&&Ys(t,t.g),t.o&&Hs(t,t.o);var n=t.ra,s=t.i;for((p=t.Ua)?(p.font!=n.font&&(p.font=s.font=n.font),p.textAlign!=n.textAlign&&(p.textAlign=s.textAlign=n.textAlign),p.textBaseline!=n.textBaseline&&(p.textBaseline=s.textBaseline=n.textBaseline)):(s.font=n.font,s.textAlign=n.textAlign,s.textBaseline=n.textBaseline,t.Ua={font:n.font,textAlign:n.textAlign,textBaseline:n.textBaseline}),e=gr(e,r,o,i,t.S,t.v),n=t.i,s=t.$a,t.Sa&&(s+=t.Yb);r<o;r+=i){var a,p=e[r]+t.Jb,h=e[r+1]+t.va;!s&&1==t.j||(a=js(t.xb,p,h,t.j,t.j,s,-p,-h),n.setTransform.apply(n,a)),t.o&&n.strokeText(t.Ia,p,h),t.g&&n.fillText(t.Ia,p,h)}!s&&1==t.j||n.setTransform(1,0,0,1,0,0)}}function Ks(t,e,o,i,r,n){var s=t.i;for(t=gr(e,o,i,r,t.S,t.v),s.moveTo(t[0],t[1]),e=t.length,n&&(e-=2),o=2;o<e;o+=2)s.lineTo(t[o],t[o+1]);return n&&s.closePath(),i}function zs(t,e,o,i,r){for(var n=0,s=i.length;n<s;++n)o=Ks(t,e,o,i[n],r,!0);return o}function Ys(t,e){var o=t.i,i=t.I;i?i.fillStyle!=e.fillStyle&&(i.fillStyle=o.fillStyle=e.fillStyle):(o.fillStyle=e.fillStyle,t.I={fillStyle:e.fillStyle})}function Hs(t,e){var o=t.i,i=t.R;i?(i.lineCap!=e.lineCap&&(i.lineCap=o.lineCap=e.lineCap),si&&!Z(i.lineDash,e.lineDash)&&o.setLineDash(i.lineDash=e.lineDash),i.lineJoin!=e.lineJoin&&(i.lineJoin=o.lineJoin=e.lineJoin),i.lineWidth!=e.lineWidth&&(i.lineWidth=o.lineWidth=e.lineWidth),i.miterLimit!=e.miterLimit&&(i.miterLimit=o.miterLimit=e.miterLimit),i.strokeStyle!=e.strokeStyle&&(i.strokeStyle=o.strokeStyle=e.strokeStyle)):(o.lineCap=e.lineCap,si&&o.setLineDash(e.lineDash),o.lineJoin=e.lineJoin,o.lineWidth=e.lineWidth,o.miterLimit=e.miterLimit,o.strokeStyle=e.strokeStyle,t.R={lineCap:e.lineCap,lineDash:e.lineDash,lineJoin:e.lineJoin,lineWidth:e.lineWidth,miterLimit:e.miterLimit,strokeStyle:e.strokeStyle})}function qs(t,e){Ls.call(this,0,e),this.i=Po(),this.b=this.i.canvas,this.b.style.width="100%",this.b.style.height="100%",this.b.style.display="block",this.b.className="ol-unselectable",t.insertBefore(this.b,t.childNodes[0]||null),this.a=!0,this.f=ms()}function Js(t,e,o){var i,r,n,s,a,p=t.o,h=t.i;oo(p,e)&&(i=o.extent,r=o.pixelRatio,n=o.viewState.rotation,s=o.viewState,a=o.pixelRatio/s.resolution,t=js(t.f,t.b.width/2,t.b.height/2,a,-a,-s.rotation,-s.center[0],-s.center[1]),p.b(new Ds(e,new Vs(h,r,i,t,n),o,h,null)))}(r=Xs.prototype).zb=function(){},r.rd=function(){},r.Zb=function(){},r.te=function(){},r.ue=function(){},r.mc=function(){},r.nc=function(){},r.oc=function(){},r.pc=function(){},r.qc=function(){},r.rc=function(){},r.yc=function(){},r.Ma=function(){},r.Ub=function(){},r.Cb=function(){},e(Vs,Xs),(r=Vs.prototype).Zb=function(t){var e,o,i;Ot(this.c,t.G())&&((this.a||this.b)&&(this.a&&Ys(this,this.a),this.b&&Hs(this,this.b),e=this.S,o=this.v,o=(e=(i=t.ga())?gr(i,0,i.length,t.qa(),e,o):null)[2]-e[0],i=e[3]-e[1],o=Math.sqrt(o*o+i*i),(i=this.i).beginPath(),i.arc(e[0],e[1],o,0,2*Math.PI),this.a&&i.fill(),this.b)&&i.stroke(),""!==this.Ia)&&Zs(this,t.wa(),2,2)},r.rd=function(t){this.Ma(t.Fa(),t.Ga()),this.Ub(t.Y()),this.Cb(t.Na())},r.zb=function(t){switch(t.U()){case"Point":this.qc(t);break;case"LineString":this.mc(t);break;case"Polygon":this.rc(t);break;case"MultiPoint":this.oc(t);break;case"MultiLineString":this.nc(t);break;case"MultiPolygon":this.pc(t);break;case"GeometryCollection":this.ue(t);break;case"Circle":this.Zb(t)}},r.te=function(t,e){(t=(0,e.Za)(t))&&Ot(this.c,t.G())&&(this.rd(e),this.zb(t))},r.ue=function(t){for(var e=0,o=(t=t.a).length;e<o;++e)this.zb(t[e])},r.qc=function(t){var e=t.ga();t=t.qa(),this.M&&Ws(this,e,e.length),""!==this.Ia&&Zs(this,e,e.length,t)},r.oc=function(t){var e=t.ga();t=t.qa(),this.M&&Ws(this,e,e.length),""!==this.Ia&&Zs(this,e,e.length,t)},r.mc=function(t){var e,o;Ot(this.c,t.G())&&(this.b&&(Hs(this,this.b),e=this.i,o=t.ga(),e.beginPath(),Ks(this,o,0,o.length,t.qa(),!1),e.stroke()),""!==this.Ia)&&Zs(this,t=jl(t),2,2)},r.nc=function(t){var e=t.G();if(Ot(this.c,e)){if(this.b){Hs(this,this.b);for(var e=this.i,o=t.ga(),i=0,r=t.Bb(),n=t.qa(),s=(e.beginPath(),0),a=r.length;s<a;++s)i=Ks(this,o,i,r[s],n,!1);e.stroke()}""!==this.Ia&&Zs(this,t=Cl(t),t.length,2)}},r.rc=function(t){var e;Ot(this.c,t.G())&&((this.b||this.a)&&(this.a&&Ys(this,this.a),this.b&&Hs(this,this.b),(e=this.i).beginPath(),zs(this,t.ec(),0,t.Bb(),t.qa()),this.a&&e.fill(),this.b)&&e.stroke(),""!==this.Ia)&&Zs(this,t=zr(t),2,2)},r.pc=function(t){if(Ot(this.c,t.G())){if(this.b||this.a){this.a&&Ys(this,this.a),this.b&&Hs(this,this.b);for(var e=this.i,o=Il(t),i=0,r=t.c,n=t.qa(),s=(e.beginPath(),0),a=r.length;s<a;++s)i=zs(this,o,i,r[s],n);this.a&&e.fill(),this.b&&e.stroke()}""!==this.Ia&&Zs(this,t=Rl(t),t.length,2)}},r.Ma=function(t,e){var o,i,r,n,s;t?(t=t.b,this.a={fillStyle:Mo(t||Os)}):this.a=null,e?(t=e.a,o=e.f,i=e.i,r=e.g,n=e.j,s=e.c,e=e.o,this.b={lineCap:void 0!==o?o:"round",lineDash:i||Us,lineDashOffset:r||0,lineJoin:void 0!==n?n:"round",lineWidth:this.u*(void 0!==s?s:1),miterLimit:void 0!==e?e:10,strokeStyle:Mo(t||Gs)}):this.b=null},r.Ub=function(t){var e,o,i,r;t?(e=t.Hc(),o=t.Y(1),i=t.Oc(),r=t.ic(),this.D=e[0],this.C=e[1],this.B=r[1],this.M=o,this.l=t.f,this.T=i[0],this.na=i[1],this.fa=t.l,this.fb=t.g,this.f=t.a,this.pa=t.v,this.oa=r[0]):this.M=null},r.Cb=function(t){var e,o,i,r,n,s,a,p;t?((e=t.Fa())?(e=e.b,this.g={fillStyle:Mo(e||Os)}):this.g=null,(a=t.Ga())?(e=a.a,o=a.f,i=a.i,r=a.g,n=a.j,s=a.c,a=a.o,this.o={lineCap:void 0!==o?o:"round",lineDash:i||Us,lineDashOffset:r||0,lineJoin:void 0!==n?n:"round",lineWidth:void 0!==s?s:1,miterLimit:void 0!==a?a:10,strokeStyle:Mo(e||Gs)}):this.o=null,e=t.a,o=t.i,i=t.c,r=t.o,n=t.f,s=t.b,a=t.Na(),p=t.g,t=t.j,this.ra={font:void 0!==e?e:"10px sans-serif",textAlign:void 0!==p?p:"center",textBaseline:void 0!==t?t:"middle"},this.Ia=void 0!==a?a:"",this.Jb=void 0!==o?this.u*o:0,this.va=void 0!==i?this.u*i:0,this.Sa=void 0!==r&&r,this.$a=void 0!==n?n:0,this.j=this.u*(void 0!==s?s:1)):this.Ia=""},e(qs,Ls),qs.prototype.U=function(){return"canvas"},qs.prototype.Jg=function(t){if(t){for(var e=this.i,o=t.pixelRatio,i=Math.round(t.size[0]*o),r=Math.round(t.size[1]*o),n=(this.b.width!=i||this.b.height!=r?(this.b.width=i,this.b.height=r):e.clearRect(0,0,i,r),o=t.viewState.rotation,Rs(t),Js(this,"precompose",t),t.layerStatesArray),i=(K(n),o&&(e.save(),Bs(e,o,i/2,r/2)),t.viewState.resolution),r=0,s=n.length;r<s;++r){var a=n[r],p=Ns(this,p=a.layer);gs(a,i)&&"ready"==a.yj&&p.sd(t,a)&&p.S(t,a,e)}o&&e.restore(),Js(this,"postcompose",t),this.a||(this.b.style.display="",this.a=!0),Fs(this,t),t.postRenderFunctions.push(Is)}else this.a&&(this.b.style.display="none",this.a=!1)},qs.prototype.Di=function(t,e,o,i,r,n){var s=e.viewState.resolution,a=e.layerStatesArray,p=a.length;for(t=Ps(e.pixelToCoordinateTransform,t.slice()),--p;0<=p;--p){var h=a[p],l=h.layer;if(gs(h,s)&&r.call(n,l)&&(h=Ns(this,l).u(t,e,o,i)))return h}};var _s=["Polygon","Circle","LineString","Image","Text"];function $s(){}function Qs(t){this.b=t}function ta(t){this.b=t}function ea(t){this.b=t}function oa(){this.b="precision mediump float;varying vec2 a;varying vec2 b;varying float c;varying float d;uniform float m;uniform vec4 n;uniform vec4 o;uniform vec2 p;void main(void){vec2 windowCenter=vec2((a.x+1.0)/2.0*p.x*d,(a.y+1.0)/2.0*p.y*d);vec2 windowOffset=vec2((b.x+1.0)/2.0*p.x*d,(b.y+1.0)/2.0*p.y*d);float radius=length(windowCenter-windowOffset);float dist=length(windowCenter-gl_FragCoord.xy);if(dist>radius+c){if(o.a==0.0){gl_FragColor=n;}else{gl_FragColor=o;}gl_FragColor.a=gl_FragColor.a-(dist-(radius+c));}else if(n.a==0.0){gl_FragColor=o;if(dist<radius-c){gl_FragColor.a=gl_FragColor.a-(radius-c-dist);}} else{gl_FragColor=n;float strokeDist=radius-c;float antialias=2.0*d;if(dist>strokeDist){gl_FragColor=o;}else if(dist>=strokeDist-antialias){float step=smoothstep(strokeDist-antialias,strokeDist,dist);gl_FragColor=mix(n,o,step);}} gl_FragColor.a=gl_FragColor.a*m;if(gl_FragColor.a<=0.0){discard;}}"}e(ta,Qs),ta.prototype.U=function(){return 35632},e(ea,Qs),ea.prototype.U=function(){return 35633},e(oa,ta);var ia=new oa;function ra(){this.b="varying vec2 a;varying vec2 b;varying float c;varying float d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;void main(void){mat4 offsetMatrix=i*j;a=vec4(h*vec4(e,0.0,1.0)).xy;d=l;float lineWidth=k*l;c=lineWidth/2.0;if(lineWidth==0.0){lineWidth=2.0*l;}vec2 offset;float radius=g+3.0*l;if(f==0.0){offset=vec2(-1.0,1.0);}else if(f==1.0){offset=vec2(-1.0,-1.0);}else if(f==2.0){offset=vec2(1.0,-1.0);}else{offset=vec2(1.0,1.0);}gl_Position=h*vec4(e+offset*radius,0.0,1.0)+offsetMatrix*vec4(offset*lineWidth,0.0,0.0);b=vec4(h*vec4(e.x+g,e.y,0.0,1.0)).xy;if(distance(a,b)>20000.0){gl_Position=vec4(a,0.0,1.0);}}"}e(ra,ea);var na=new ra;function sa(t,e){this.B=t.getUniformLocation(e,"n"),this.oa=t.getUniformLocation(e,"k"),this.c=t.getUniformLocation(e,"j"),this.f=t.getUniformLocation(e,"i"),this.a=t.getUniformLocation(e,"m"),this.ra=t.getUniformLocation(e,"l"),this.i=t.getUniformLocation(e,"h"),this.I=t.getUniformLocation(e,"p"),this.R=t.getUniformLocation(e,"o"),this.j=t.getAttribLocation(e,"f"),this.b=t.getAttribLocation(e,"e"),this.S=t.getAttribLocation(e,"g")}function aa(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function pa(t,e){return t[0]=e[0],t[1]=e[1],t[4]=e[2],t[5]=e[3],t[12]=e[4],t[13]=e[5],t}function ha(t,e){this.origin=Lt(e),this.xb=ms(),this.Sa=ms(),this.$a=ms(),this.Jb=aa(),this.b=[],this.o=null,this.i=[],this.f=[],this.a=[],this.l=null,this.g=void 0}function la(t,e,o,i){t.drawElements(4,i-o,e.g?5125:5123,o*(e.g?4:2))}e(ha,Xs),ha.prototype.La=function(t,e,o,i,r,n,s,a,p,h,l){var u,c,f,y,g,d,v,b,m,w=t.b,x=(this.g&&(u=w.isEnabled(w.STENCIL_TEST),c=w.getParameter(w.STENCIL_FUNC),f=w.getParameter(w.STENCIL_VALUE_MASK),y=w.getParameter(w.STENCIL_REF),g=w.getParameter(w.STENCIL_WRITEMASK),d=w.getParameter(w.STENCIL_FAIL),v=w.getParameter(w.STENCIL_PASS_DEPTH_PASS),b=w.getParameter(w.STENCIL_PASS_DEPTH_FAIL),w.enable(w.STENCIL_TEST),w.clear(w.STENCIL_BUFFER_BIT),w.stencilMask(255),w.stencilFunc(w.ALWAYS,1,255),w.stencilOp(w.KEEP,w.KEEP,w.REPLACE),this.g.La(t,e,o,i,r,n,s,a,p,h,l),w.stencilMask(0),w.stencilFunc(w.NOTEQUAL,1,255)),Ea(t,34962,this.l),Ea(t,34963,this.o),n=this.rf(w,t,r,n),ws(this.xb));return Es(x,2/(o*r[0]),2/(o*r[1])),As(x,-i),Ts(x,-(e[0]-this.origin[0]),-(e[1]-this.origin[1])),Es(e=ws(this.$a),2/r[0],2/r[1]),r=ws(this.Sa),i&&As(r,-i),w.uniformMatrix4fv(n.i,!1,pa(this.Jb,x)),w.uniformMatrix4fv(n.f,!1,pa(this.Jb,e)),w.uniformMatrix4fv(n.c,!1,pa(this.Jb,r)),w.uniform1f(n.a,s),p?m=t=h?this.ve(w,t,a,p,l):(w.clear(w.COLOR_BUFFER_BIT|w.DEPTH_BUFFER_BIT),this.Od(w,t,a,!0),(t=p(null))||void 0):this.Od(w,t,a,!1),this.sf(w,n),this.g&&(u||w.disable(w.STENCIL_TEST),w.clear(w.STENCIL_BUFFER_BIT),w.stencilFunc(c,y,f),w.stencilMask(g),w.stencilOp(d,b,v)),m};var ua=[0,0,0,1],ca=[],fa=[0,0,0,1];function ya(t,e,o,i,r,n){return(t=(o-t)*(n-e)-(r-t)*(i-e))<=ga&&-ga<=t?void 0:0<t}var ga=Number.EPSILON||2220446049250313e-31;function da(t){this.b=void 0!==t?t:[],this.a=va}var va=35044;function ba(t,e){ha.call(this,0,e),this.v=null,this.j=[],this.u=[],this.S=0,this.c={fillColor:null,strokeColor:null,lineDash:null,lineDashOffset:void 0,lineWidth:void 0,s:!1}}function ma(t,e,o,i){e.uniform4fv(t.v.R,o),e.uniform1f(t.v.oa,i)}function wa(){this.b="precision mediump float;varying vec2 a;varying float b;uniform float k;uniform sampler2D l;void main(void){vec4 texColor=texture2D(l,a);gl_FragColor.rgb=texColor.rgb;float alpha=texColor.a*b*k;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"}e(ba,ha),(r=ba.prototype).Zb=function(t,e){var o=t.pd(),i=t.qa();if(o){this.i.push(this.b.length),this.f.push(e),this.c.s&&(this.u.push(this.b.length),this.c.s=!1),this.S=o,t=dr(t=t.ga(),0,2,i,-this.origin[0],-this.origin[1]),e=this.a.length;for(var o=this.b.length,r=e/4,n=0;n<2;n+=i)this.a[e++]=t[n],this.a[e++]=t[n+1],this.a[e++]=0,this.a[e++]=this.S,this.a[e++]=t[n],this.a[e++]=t[n+1],this.a[e++]=1,this.a[e++]=this.S,this.a[e++]=t[n],this.a[e++]=t[n+1],this.a[e++]=2,this.a[e++]=this.S,this.a[e++]=t[n],this.a[e++]=t[n+1],this.a[e++]=3,this.a[e++]=this.S,this.b[o++]=r,this.b[o++]=r+1,this.b[o++]=r+2,this.b[o++]=r+2,this.b[o++]=r+3,this.b[o++]=r,r+=4}else this.c.s&&(this.j.pop(),this.j.length)&&(i=this.j[this.j.length-1],this.c.fillColor=i[0],this.c.strokeColor=i[1],this.c.lineWidth=i[2],this.c.s=!1)},r.Db=function(){this.l=new da(this.a),this.o=new da(this.b),this.i.push(this.b.length),!this.u.length&&0<this.j.length&&(this.j=[]),this.b=this.a=null},r.Eb=function(t){var e=this.l,o=this.o;return function(){Ta(t,e),Ta(t,o)}},r.rf=function(t,e,o,i){var r,n=La(e,ia,na);return this.v?r=this.v:this.v=r=new sa(t,n),e.Qc(n),t.enableVertexAttribArray(r.b),t.vertexAttribPointer(r.b,2,5126,!1,16,0),t.enableVertexAttribArray(r.j),t.vertexAttribPointer(r.j,1,5126,!1,16,8),t.enableVertexAttribArray(r.S),t.vertexAttribPointer(r.S,1,5126,!1,16,12),t.uniform2fv(r.I,o),t.uniform1f(r.ra,i),r},r.sf=function(t,e){t.disableVertexAttribArray(e.b),t.disableVertexAttribArray(e.j),t.disableVertexAttribArray(e.S)},r.Od=function(t,e,o){if(Zt(o)){var i=this.i[this.i.length-1];for(o=this.u.length-1;0<=o;--o){var r=this.u[o],n=this.j[o];t.uniform4fv(this.v.B,n[0]),ma(this,t,n[1],n[2]),la(t,e,r,i),i=r}}else for(var s=this.i.length-2,n=i=this.i[s+1],r=this.u.length-1;0<=r;--r){var a=this.j[r];for(t.uniform4fv(this.v.B,a[0]),ma(this,t,a[1],a[2]),a=this.u[r];0<=s&&this.i[s]>=a;){var p=this.i[s];o[U(this.f[s]).toString()]&&(i!==n&&la(t,e,i,n),n=p),s--,i=p}i!==n&&la(t,e,i,n),i=n=a}},r.ve=function(t,e,o,i,r){for(var n,s=this.i.length-2,a=this.i[s+1],p=this.u.length-1;0<=p;--p){var h=this.j[p];for(t.uniform4fv(this.v.B,h[0]),ma(this,t,h[1],h[2]),n=this.u[p];0<=s&&this.i[s]>=n;){var h=this.i[s],l=this.f[s];if(void 0===o[U(l).toString()]&&l.V()&&(void 0===r||Ot(r,l.V().G()))&&(t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),la(t,e,h,a),a=i(l)))return a;s--,a=h}}},r.Ma=function(t,e){var o;e=e?(o=e.i,this.c.lineDash=o||ca,o=e.g,this.c.lineDashOffset=o||0,o=!((o=e.a)instanceof CanvasGradient||o instanceof CanvasPattern)&&vo(o).map(function(t,e){return 3!=e?t/255:t})||fa,void 0!==(e=e.c)?e:1):(o=[0,0,0,0],0),t=!((t=t?t.b:[0,0,0,0])instanceof CanvasGradient||t instanceof CanvasPattern)&&vo(t).map(function(t,e){return 3!=e?t/255:t})||ua,this.c.strokeColor&&Z(this.c.strokeColor,o)&&this.c.fillColor&&Z(this.c.fillColor,t)&&this.c.lineWidth===e||(this.c.s=!0,this.c.fillColor=t,this.c.strokeColor=o,this.c.lineWidth=e,this.j.push([t,o,e]))},e(wa,ta);var xa=new wa;function Sa(){this.b="varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.0,0.0);gl_Position=h*vec4(c,0.0,1.0)+offsets;a=d;b=f;}"}e(Sa,ea);var Ma=new Sa;function Pa(t,e){this.c=t.getUniformLocation(e,"j"),this.f=t.getUniformLocation(e,"i"),this.a=t.getUniformLocation(e,"k"),this.i=t.getUniformLocation(e,"h"),this.v=t.getAttribLocation(e,"e"),this.u=t.getAttribLocation(e,"f"),this.b=t.getAttribLocation(e,"c"),this.D=t.getAttribLocation(e,"g"),this.C=t.getAttribLocation(e,"d")}function Aa(t,e){this.j=t,this.b=e,this.a={},this.c={},this.i={},this.l=this.v=this.f=this.o=null,(this.g=D(di,"OES_element_index_uint"))&&e.getExtension("OES_element_index_uint"),d(this.j,"webglcontextlost",this.Xo,this),d(this.j,"webglcontextrestored",this.Yo,this)}function Ea(t,e,o){var i,r,n=t.b,s=o.b,a=String(U(o));a in t.a?n.bindBuffer(e,t.a[a].buffer):(i=n.createBuffer(),n.bindBuffer(e,i),34962==e?r=new Float32Array(s):34963==e&&(r=new(t.g?Uint32Array:Uint16Array)(s)),n.bufferData(e,r,o.a),t.a[a]={lc:o,buffer:i})}function Ta(t,e){var o=t.b,i=(e=String(U(e)),t.a[e]);o.isContextLost()||o.deleteBuffer(i.buffer),delete t.a[e]}function ja(t){var e,o,i,r;return t.f||(o=(e=t.b).createFramebuffer(),e.bindFramebuffer(e.FRAMEBUFFER,o),i=Ia(e,1,1),r=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,r),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,1,1),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,i,0),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,r),e.bindTexture(e.TEXTURE_2D,null),e.bindRenderbuffer(e.RENDERBUFFER,null),e.bindFramebuffer(e.FRAMEBUFFER,null),t.f=o,t.v=i,t.l=r),t.f}function Ca(t,e){var o,i,r=String(U(e));return r in t.c?t.c[r]:(i=(o=t.b).createShader(e.U()),o.shaderSource(i,e.b),o.compileShader(i),t.c[r]=i)}function La(t,e,o){var i,r,n=U(e)+"/"+U(o);return n in t.i?t.i[n]:(r=(i=t.b).createProgram(),i.attachShader(r,Ca(t,e)),i.attachShader(r,Ca(t,o)),i.linkProgram(r),t.i[n]=r)}function Ra(t,e,o){var i=t.createTexture();return t.bindTexture(t.TEXTURE_2D,i),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),void 0!==e&&t.texParameteri(3553,10242,e),void 0!==o&&t.texParameteri(3553,10243,o),i}function Ia(t,e,o){var i=Ra(t,void 0,void 0);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e,o,0,t.RGBA,t.UNSIGNED_BYTE,null),i}function Na(t,e){var o=Ra(t,33071,33071);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),o}function Fa(t,e){ha.call(this,0,e),this.C=this.D=void 0,this.S=[],this.v=[],this.oa=void 0,this.j=[],this.c=[],this.I=this.ra=void 0,this.B=null,this.fb=this.fa=this.na=this.T=this.Ua=this.R=void 0,this.va=[],this.u=[],this.pa=void 0}function ka(t,e,o,i){for(var r=t.D,n=t.C,s=t.oa,a=t.ra,p=t.I,h=t.R,l=t.Ua,u=t.T,c=t.na?1:0,f=-t.fa,y=t.fb,g=t.pa,d=Math.cos(f),f=Math.sin(f),v=t.b.length,b=t.a.length,m=0;m<o;m+=i){var w=e[m]-t.origin[0],x=e[m+1]-t.origin[1],S=b/8,M=-y*r,P=-y*(s-n);t.a[b++]=w,t.a[b++]=x,t.a[b++]=M*d-P*f,t.a[b++]=M*f+P*d,t.a[b++]=l/p,t.a[b++]=(u+s)/a,t.a[b++]=h,t.a[b++]=c,M=y*(g-r),P=-y*(s-n),t.a[b++]=w,t.a[b++]=x,t.a[b++]=M*d-P*f,t.a[b++]=M*f+P*d,t.a[b++]=(l+g)/p,t.a[b++]=(u+s)/a,t.a[b++]=h,t.a[b++]=c,M=y*(g-r),P=y*n,t.a[b++]=w,t.a[b++]=x,t.a[b++]=M*d-P*f,t.a[b++]=M*f+P*d,t.a[b++]=(l+g)/p,t.a[b++]=u/a,t.a[b++]=h,t.a[b++]=c,M=-y*r,P=y*n,t.a[b++]=w,t.a[b++]=x,t.a[b++]=M*d-P*f,t.a[b++]=M*f+P*d,t.a[b++]=l/p,t.a[b++]=u/a,t.a[b++]=h,t.a[b++]=c,t.b[v++]=S,t.b[v++]=1+S,t.b[v++]=2+S,t.b[v++]=S,t.b[v++]=2+S,t.b[v++]=3+S}}function Da(t,e,o,i){for(var r=e.length,n=0;n<r;++n){var s=e[n],a=U(s).toString();a in o?s=o[a]:(s=Na(i,s),o[a]=s),t[n]=s}}function Oa(t,e,o){var i=e-o;return t[0]===t[i]&&t[1]===t[1+i]&&3<+e/o&&!!wr(t,0,e,o)}function Ua(){this.b="precision mediump float;varying float a;varying vec2 b;varying float c;uniform float m;uniform vec4 n;uniform vec2 o;uniform float p;void main(void){if(a>0.0){vec2 windowCoords=vec2((b.x+1.0)/2.0*o.x*p,(b.y+1.0)/2.0*o.y*p);if(length(windowCoords-gl_FragCoord.xy)>c*p){discard;}} gl_FragColor=n;float alpha=n.a*m;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"}e(Aa,_e),(r=Aa.prototype).ka=function(){Je(this.j);var t=this.b;if(!t.isContextLost()){for(var e in this.a)t.deleteBuffer(this.a[e].buffer);for(e in this.i)t.deleteProgram(this.i[e]);for(e in this.c)t.deleteShader(this.c[e]);t.deleteFramebuffer(this.f),t.deleteRenderbuffer(this.l),t.deleteTexture(this.v)}},r.Wo=function(){return this.b},r.Xo=function(){Vt(this.a),Vt(this.c),Vt(this.i),this.l=this.v=this.f=this.o=null},r.Yo=function(){},r.Qc=function(t){return t!=this.o&&(this.b.useProgram(t),this.o=t,!0)},e(Fa,ha),(r=Fa.prototype).Eb=function(o){var i=this.l,r=this.o,n=this.va,s=this.u,a=o.b;return function(){if(!a.isContextLost()){for(var t=0,e=n.length;t<e;++t)a.deleteTexture(n[t]);for(t=0,e=s.length;t<e;++t)a.deleteTexture(s[t])}Ta(o,i),Ta(o,r)}},r.oc=function(t,e){this.i.push(this.b.length),this.f.push(e),ka(this,e=t.ga(),e.length,t.qa())},r.qc=function(t,e){this.i.push(this.b.length),this.f.push(e),ka(this,e=t.ga(),e.length,t.qa())},r.Db=function(t){t=t.b,this.S.push(this.b.length),this.v.push(this.b.length),this.l=new da(this.a),this.o=new da(this.b);var e={};Da(this.va,this.j,e,t),Da(this.u,this.c,e,t),this.oa=this.C=this.D=void 0,this.c=this.j=null,this.I=this.ra=void 0,this.b=null,this.fb=this.fa=this.na=this.T=this.Ua=this.R=void 0,this.a=null,this.pa=void 0},r.rf=function(t,e){var o,i=La(e,xa,Ma);return this.B?o=this.B:this.B=o=new Pa(t,i),e.Qc(i),t.enableVertexAttribArray(o.b),t.vertexAttribPointer(o.b,2,5126,!1,32,0),t.enableVertexAttribArray(o.v),t.vertexAttribPointer(o.v,2,5126,!1,32,8),t.enableVertexAttribArray(o.C),t.vertexAttribPointer(o.C,2,5126,!1,32,16),t.enableVertexAttribArray(o.u),t.vertexAttribPointer(o.u,1,5126,!1,32,24),t.enableVertexAttribArray(o.D),t.vertexAttribPointer(o.D,1,5126,!1,32,28),o},r.sf=function(t,e){t.disableVertexAttribArray(e.b),t.disableVertexAttribArray(e.v),t.disableVertexAttribArray(e.C),t.disableVertexAttribArray(e.u),t.disableVertexAttribArray(e.D)},r.Od=function(t,e,o,i){var r=i?this.u:this.va;if(i=i?this.v:this.S,Zt(o))for(var n=r.length,s=o=0;o<n;++o){t.bindTexture(3553,r[o]);var a=i[o];la(t,e,s,a),s=a}else for(s=n=0,a=r.length;s<a;++s){t.bindTexture(3553,r[s]);for(var p=0<s?i[s-1]:0,h=i[s],l=p;n<this.i.length&&this.i[n]<=h;){p=void 0!==o[U(this.f[n]).toString()]?(l!==p&&la(t,e,l,p),l=n===this.i.length-1?h:this.i[n+1]):n===this.i.length-1?h:this.i[n+1];n++}l!==p&&la(t,e,l,p)}},r.ve=function(t,e,o,i,r){for(var n=this.i.length-1,s=this.u.length-1;0<=s;--s){t.bindTexture(3553,this.u[s]);for(var a=0<s?this.v[s-1]:0,p=this.v[s];0<=n&&this.i[n]>=a;){var h=this.i[n],l=this.f[n];if(void 0===o[U(l).toString()]&&l.V()&&(void 0===r||Ot(r,l.V().G()))&&(t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),la(t,e,h,p),p=i(l)))return p;p=h,n--}}},r.Ub=function(t){var e=t.Hc(),o=t.Y(1),i=t.ye(),r=t.qg(1),n=t.f,s=t.Oc(),a=t.l,p=t.g,h=t.ic();t=t.a,this.j.length?U(this.j[this.j.length-1])!=U(o)&&(this.S.push(this.b.length),this.j.push(o)):this.j.push(o),this.c.length?U(this.c[this.c.length-1])!=U(r)&&(this.v.push(this.b.length),this.c.push(r)):this.c.push(r),this.D=e[0],this.C=e[1],this.oa=h[1],this.ra=i[1],this.I=i[0],this.R=n,this.Ua=s[0],this.T=s[1],this.fa=p,this.na=a,this.fb=t,this.pa=h[0]},e(Ua,ta);var Ga=new Ua;function Ba(){this.b="varying float a;varying vec2 b;varying float c;attribute vec2 d;attribute vec2 e;attribute vec2 f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;bool nearlyEquals(in float value,in float ref){float epsilon=0.000000000001;return value>=ref-epsilon&&value<=ref+epsilon;}void alongNormal(out vec2 offset,in vec2 nextP,in float turnDir,in float direction){vec2 dirVect=nextP-e;vec2 normal=normalize(vec2(-turnDir*dirVect.y,turnDir*dirVect.x));offset=k/2.0*normal*direction;}void miterUp(out vec2 offset,out float round,in bool isRound,in float direction){float halfWidth=k/2.0;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=f-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;round=0.0;if(isRound){round=1.0;}else if(miterLength>l+k){offset=halfWidth*tmpNormal*direction;}} bool miterDown(out vec2 offset,in vec4 projPos,in mat4 offsetMatrix,in float direction){bool degenerate=false;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=d-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));vec2 longOffset,shortOffset,longVertex;vec4 shortProjVertex;float halfWidth=k/2.0;if(length(f-e)>length(d-e)){longOffset=tmpNormal*direction*halfWidth;shortOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=f;shortProjVertex=h*vec4(d,0.0,1.0);}else{shortOffset=tmpNormal*direction*halfWidth;longOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=d;shortProjVertex=h*vec4(f,0.0,1.0);}vec4 p1=h*vec4(longVertex,0.0,1.0)+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p2=projPos+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p3=shortProjVertex+offsetMatrix*vec4(-shortOffset,0.0,0.0);vec4 p4=shortProjVertex+offsetMatrix*vec4(shortOffset,0.0,0.0);float denom=(p4.y-p3.y)*(p2.x-p1.x)-(p4.x-p3.x)*(p2.y-p1.y);float firstU=((p4.x-p3.x)*(p1.y-p3.y)-(p4.y-p3.y)*(p1.x-p3.x))/denom;float secondU=((p2.x-p1.x)*(p1.y-p3.y)-(p2.y-p1.y)*(p1.x-p3.x))/denom;float epsilon=0.000000000001;if(firstU>epsilon&&firstU<1.0-epsilon&&secondU>epsilon&&secondU<1.0-epsilon){shortProjVertex.x=p1.x+firstU*(p2.x-p1.x);shortProjVertex.y=p1.y+firstU*(p2.y-p1.y);offset=shortProjVertex.xy;degenerate=true;}else{float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;}return degenerate;}void squareCap(out vec2 offset,out float round,in bool isRound,in vec2 nextP,in float turnDir,in float direction){round=0.0;vec2 dirVect=e-nextP;vec2 firstNormal=normalize(dirVect);vec2 secondNormal=vec2(turnDir*firstNormal.y*direction,-turnDir*firstNormal.x*direction);vec2 hypotenuse=normalize(firstNormal-secondNormal);vec2 normal=vec2(turnDir*hypotenuse.y*direction,-turnDir*hypotenuse.x*direction);float length=sqrt(c*c*2.0);offset=normal*length;if(isRound){round=1.0;}} void main(void){bool degenerate=false;float direction=float(sign(g));mat4 offsetMatrix=i*j;vec2 offset;vec4 projPos=h*vec4(e,0.0,1.0);bool round=nearlyEquals(mod(g,2.0),0.0);a=0.0;c=k/2.0;b=projPos.xy;if(nearlyEquals(mod(g,3.0),0.0)||nearlyEquals(mod(g,17.0),0.0)){alongNormal(offset,f,1.0,direction);}else if(nearlyEquals(mod(g,5.0),0.0)||nearlyEquals(mod(g,13.0),0.0)){alongNormal(offset,d,-1.0,direction);}else if(nearlyEquals(mod(g,23.0),0.0)){miterUp(offset,a,round,direction);}else if(nearlyEquals(mod(g,19.0),0.0)){degenerate=miterDown(offset,projPos,offsetMatrix,direction);}else if(nearlyEquals(mod(g,7.0),0.0)){squareCap(offset,a,round,f,1.0,direction);}else if(nearlyEquals(mod(g,11.0),0.0)){squareCap(offset,a,round,d,-1.0,direction);}if(!degenerate){vec4 offsets=offsetMatrix*vec4(offset,0.0,0.0);gl_Position=projPos+offsets;}else{gl_Position=vec4(offset,0.0,1.0);}}"}e(Ba,ea);var Xa=new Ba;function Va(t,e){this.B=t.getUniformLocation(e,"n"),this.oa=t.getUniformLocation(e,"k"),this.R=t.getUniformLocation(e,"l"),this.c=t.getUniformLocation(e,"j"),this.f=t.getUniformLocation(e,"i"),this.a=t.getUniformLocation(e,"m"),this.ra=t.getUniformLocation(e,"p"),this.i=t.getUniformLocation(e,"h"),this.I=t.getUniformLocation(e,"o"),this.g=t.getAttribLocation(e,"g"),this.o=t.getAttribLocation(e,"d"),this.l=t.getAttribLocation(e,"f"),this.b=t.getAttribLocation(e,"e")}function Wa(t,e){ha.call(this,0,e),this.v=null,this.u=[],this.j=[],this.c={strokeColor:null,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0,s:!1}}function Za(t,e,o,i){for(var r=t.a.length,n=t.b.length,s="bevel"===t.c.lineJoin?0:"miter"===t.c.lineJoin?1:2,a="butt"===t.c.lineCap?0:"square"===t.c.lineCap?1:2,p=Oa(e,o,i),h=n,l=1,u=0;u<o;u+=i){var c,f=r/7,y=g,g=c||[e[u],e[u+1]];if(u){if(u===o-i){p?c=d:(r=Ka(t,y=y||[0,0],g,[0,0],l*_a*(a||1),r),r=Ka(t,y,g,[0,0],-l*_a*(a||1),r),t.b[n++]=f,t.b[n++]=h-1,t.b[n++]=h,t.b[n++]=h,t.b[n++]=f+1,t.b[n++]=f,a&&(r=Ka(t,y,g,[0,0],l*Qa*a,r),r=Ka(t,y,g,[0,0],-l*Qa*a,r),t.b[n++]=f+2,t.b[n++]=f,t.b[n++]=f+1,t.b[n++]=f+1,t.b[n++]=f+3,t.b[n++]=f+2));break}c=[e[u+i],e[u+i+1]]}else{if(c=[e[u+i],e[u+i+1]],+o==2*i&&Z(g,c))break;if(!p){a&&(r=Ka(t,[0,0],g,c,l*$a*a,r),r=Ka(t,[0,0],g,c,-l*$a*a,r),t.b[n++]=f+2,t.b[n++]=f,t.b[n++]=f+1,t.b[n++]=f+1,t.b[n++]=f+3,t.b[n++]=f+2),r=Ka(t,[0,0],g,c,l*Ja*(a||1),r),h=(r=Ka(t,[0,0],g,c,-l*Ja*(a||1),r))/7-1;continue}var y=[e[o-2*i],e[o-2*i+1]],d=c}var v=ya(y[0],y[1],g[0],g[1],c[0],c[1])?-1:1,r=Ka(t,y,g,c,v*tp*(s||1),r);r=Ka(t,y,g,c,v*ep*(s||1),r),r=Ka(t,y,g,c,-v*op*(s||1),r),0<u&&(t.b[n++]=f,t.b[n++]=h-1,t.b[n++]=h,t.b[n++]=f+2,t.b[n++]=f,t.b[n++]=0<l*v?h:h-1),t.b[n++]=f,t.b[n++]=f+2,t.b[n++]=f+1,h=f+2,l=v,s&&(r=Ka(t,y,g,c,v*ip*s,r),t.b[n++]=f+1,t.b[n++]=f+3,t.b[n++]=f)}p&&(f=f||r/7,r=Ka(t,y,g,c,(v=Vr([y[0],y[1],g[0],g[1],c[0],c[1]],0,6,2)?1:-1)*tp*(s||1),r),Ka(t,y,g,c,-v*op*(s||1),r),t.b[n++]=f,t.b[n++]=h-1,t.b[n++]=h,t.b[n++]=f+1,t.b[n++]=f,t.b[n++]=0<l*v?h:h-1)}function Ka(t,e,o,i,r,n){return t.a[n++]=e[0],t.a[n++]=e[1],t.a[n++]=o[0],t.a[n++]=o[1],t.a[n++]=i[0],t.a[n++]=i[1],t.a[n++]=r,n}function za(t,e,o,i){return!((o-=e)<2*i||o===2*i&&Z([t[e],t[e+1]],[t[e+i],t[e+i+1]]))}function Ya(t,e,o,i){var r;if(Oa(e,e.length,i)||(e.push(e[0]),e.push(e[1])),Za(t,e,e.length,i),o.length)for(e=0,r=o.length;e<r;++e)Oa(o[e],o[e].length,i)||(o[e].push(o[e][0]),o[e].push(o[e][1])),Za(t,o[e],o[e].length,i)}function Ha(t,e,o){o=void 0===o?t.b.length:o,t.i.push(o),t.f.push(e),t.c.s&&(t.j.push(o),t.c.s=!1)}function qa(t,e,o,i,r){e.uniform4fv(t.v.B,o),e.uniform1f(t.v.oa,i),e.uniform1f(t.v.R,r)}e(Wa,ha),(r=Wa.prototype).mc=function(t,e){var o=t.ga();t=t.qa(),za(o,0,o.length,t)&&(o=dr(o,0,o.length,t,-this.origin[0],-this.origin[1]),this.c.s&&(this.j.push(this.b.length),this.c.s=!1),this.i.push(this.b.length),this.f.push(e),Za(this,o,o.length,t))},r.nc=function(t,e){var o=this.b.length,i=t.Bb(),r=(i.unshift(0),t.ga());if(t=t.qa(),1<i.length)for(var n,s=1,a=i.length;s<a;++s)za(r,i[s-1],i[s],t)&&Za(this,n=dr(r,i[s-1],i[s],t,-this.origin[0],-this.origin[1]),n.length,t);this.b.length>o&&(this.i.push(o),this.f.push(e),this.c.s)&&(this.j.push(o),this.c.s=!1)},r.Db=function(){this.l=new da(this.a),this.o=new da(this.b),this.i.push(this.b.length),!this.j.length&&0<this.u.length&&(this.u=[]),this.b=this.a=null},r.Eb=function(t){var e=this.l,o=this.o;return function(){Ta(t,e),Ta(t,o)}},r.rf=function(t,e,o,i){var r,n=La(e,Ga,Xa);return this.v?r=this.v:this.v=r=new Va(t,n),e.Qc(n),t.enableVertexAttribArray(r.o),t.vertexAttribPointer(r.o,2,5126,!1,28,0),t.enableVertexAttribArray(r.b),t.vertexAttribPointer(r.b,2,5126,!1,28,8),t.enableVertexAttribArray(r.l),t.vertexAttribPointer(r.l,2,5126,!1,28,16),t.enableVertexAttribArray(r.g),t.vertexAttribPointer(r.g,1,5126,!1,28,24),t.uniform2fv(r.I,o),t.uniform1f(r.ra,i),r},r.sf=function(t,e){t.disableVertexAttribArray(e.o),t.disableVertexAttribArray(e.b),t.disableVertexAttribArray(e.l),t.disableVertexAttribArray(e.g)},r.Od=function(t,e,o,i){var r=t.getParameter(t.DEPTH_FUNC),n=t.getParameter(t.DEPTH_WRITEMASK);if(i||(t.enable(t.DEPTH_TEST),t.depthMask(!0),t.depthFunc(t.NOTEQUAL)),Zt(o)){var s=this.i[this.i.length-1];for(o=this.j.length-1;0<=o;--o){var a=this.j[o],p=this.u[o];qa(this,t,p[0],p[1],p[2]),la(t,e,a,s),t.clear(t.DEPTH_BUFFER_BIT),s=a}}else for(var h=this.i.length-2,p=s=this.i[h+1],a=this.j.length-1;0<=a;--a){var l=this.u[a];for(qa(this,t,l[0],l[1],l[2]),l=this.j[a];0<=h&&this.i[h]>=l;){var u=this.i[h];o[U(this.f[h]).toString()]&&(s!==p&&(la(t,e,s,p),t.clear(t.DEPTH_BUFFER_BIT)),p=u),h--,s=u}s!==p&&(la(t,e,s,p),t.clear(t.DEPTH_BUFFER_BIT)),s=p=l}i||(t.disable(t.DEPTH_TEST),t.clear(t.DEPTH_BUFFER_BIT),t.depthMask(n),t.depthFunc(r))},r.ve=function(t,e,o,i,r){for(var n,s=this.i.length-2,a=this.i[s+1],p=this.j.length-1;0<=p;--p)for(qa(this,t,(h=this.u[p])[0],h[1],h[2]),n=this.j[p];0<=s&&this.i[s]>=n;){var h=this.i[s],l=this.f[s];if(void 0===o[U(l).toString()]&&l.V()&&(void 0===r||Ot(r,l.V().G()))&&(t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),la(t,e,h,a),a=i(l)))return a;s--,a=h}},r.Ma=function(t,e){t=e.f,this.c.lineCap=void 0!==t?t:"round",t=e.i,this.c.lineDash=t||ca,t=e.g,this.c.lineDashOffset=t||0,t=e.j,this.c.lineJoin=void 0!==t?t:"round",t=!((t=e.a)instanceof CanvasGradient||t instanceof CanvasPattern)&&vo(t).map(function(t,e){return 3!=e?t/255:t})||fa;var o=void 0!==(o=e.c)?o:1;e=void 0!==(e=e.o)?e:10,this.c.strokeColor&&Z(this.c.strokeColor,t)&&this.c.lineWidth===o&&this.c.miterLimit===e||(this.c.s=!0,this.c.strokeColor=t,this.c.lineWidth=o,this.c.miterLimit=e,this.u.push([t,o,e]))};var Ja=3,_a=5,$a=7,Qa=11,tp=13,ep=17,op=19,ip=23;function rp(){this.b="precision mediump float;uniform vec4 e;uniform float f;void main(void){gl_FragColor=e;float alpha=e.a*f;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"}e(rp,ta);var np=new rp;function sp(){this.b="attribute vec2 a;uniform mat4 b;uniform mat4 c;uniform mat4 d;void main(void){gl_Position=b*vec4(a,0.0,1.0);}"}e(sp,ea);var ap=new sp;function pp(t,e){this.B=t.getUniformLocation(e,"e"),this.c=t.getUniformLocation(e,"d"),this.f=t.getUniformLocation(e,"c"),this.a=t.getUniformLocation(e,"f"),this.i=t.getUniformLocation(e,"b"),this.b=t.getAttribLocation(e,"a")}function hp(t){this.a=void 0!==(t=t||{}).color?t.color:null,this.f=t.lineCap,this.i=void 0!==t.lineDash?t.lineDash:null,this.g=t.lineDashOffset,this.j=t.lineJoin,this.o=t.miterLimit,this.c=t.width,this.b=void 0}function lp(t){this.b=this.a=this.i=void 0,this.f=void 0===t||t,this.c=0}function up(t){var e,o,i=t.b;i&&(e=i.next,o=i.ub,e&&(e.ub=o),o&&(o.next=e),t.b=e||o,t.i===t.a?(t.b=void 0,t.i=void 0,t.a=void 0):t.i===i?t.i=t.b:t.a===i&&(t.a=o?t.b.ub:t.b),t.c--)}function cp(t){if(t.b=t.i,t.b)return t.b.data}function fp(t){if(t.b&&t.b.next)return t.b=t.b.next,t.b.data}function yp(t){if(t.b&&t.b.next)return t.b.next.data}function gp(t){if(t.b&&t.b.ub)return t.b=t.b.ub,t.b.data}function dp(t){if(t.b&&t.b.ub)return t.b.ub.data}function vp(t){if(t.b)return t.b.data}(r=hp.prototype).clone=function(){var t=this.a;return new hp({color:t&&t.slice?t.slice():t||void 0,lineCap:this.f,lineDash:this.i?this.i.slice():void 0,lineDashOffset:this.g,lineJoin:this.j,miterLimit:this.o,width:this.c})},r.No=function(){return this.a},r.Vk=function(){return this.f},r.Oo=function(){return this.i},r.Wk=function(){return this.g},r.Xk=function(){return this.j},r.bl=function(){return this.o},r.Po=function(){return this.c},r.Qo=function(t){this.a=t,this.b=void 0},r.aq=function(t){this.f=t,this.b=void 0},r.setLineDash=function(t){this.i=t,this.b=void 0},r.bq=function(t){this.g=t,this.b=void 0},r.cq=function(t){this.j=t,this.b=void 0},r.gq=function(t){this.o=t,this.b=void 0},r.jq=function(t){this.c=t,this.b=void 0},lp.prototype.concat=function(t){var e;t.b&&(this.b?(e=this.b.next,this.b.next=t.i,t.i.ub=this.b,e.ub=t.a,t.a.next=e,this.c+=t.c):(this.b=t.b,this.i=t.i,this.a=t.a,this.c=t.c),t.b=void 0,t.i=void 0,t.a=void 0,t.c=0)};var bp,mp={$d:function(){}};function wp(t,e,o){var i=t[e];t[e]=t[o],t[o]=i}function xp(t,e){return t<e?-1:e<t?1:0}function Sp(t,e){if(!(this instanceof Sp))return new Sp(t,e);this.Hf=Math.max(4,t||9),this.fh=Math.max(2,Math.ceil(.4*this.Hf)),e&&this.ek(e),this.clear()}function Mp(t,e){Pp(t,0,t.children.length,e,t)}function Pp(t,e,o,i,r){(r=r||Ip(null)).ca=1/0,r.da=1/0,r.$=-1/0,r.ia=-1/0;for(var n;e<o;e++)n=t.children[e],Ap(r,t.ib?i(n):n);return r}function Ap(t,e){t.ca=Math.min(t.ca,e.ca),t.da=Math.min(t.da,e.da),t.$=Math.max(t.$,e.$),t.ia=Math.max(t.ia,e.ia)}function Ep(t,e){return t.ca-e.ca}function Tp(t,e){return t.da-e.da}function jp(t){return(t.$-t.ca)*(t.ia-t.da)}function Cp(t){return t.$-t.ca+(t.ia-t.da)}function Lp(t,e){return t.ca<=e.ca&&t.da<=e.da&&e.$<=t.$&&e.ia<=t.ia}function Rp(t,e){return e.ca<=t.$&&e.da<=t.ia&&e.$>=t.ca&&e.ia>=t.da}function Ip(t){return{children:t,height:1,ib:!0,ca:1/0,da:1/0,$:-1/0,ia:-1/0}}function Np(t,e,o,i,r){for(var n,s=[e,o];s.length;)(o=s.pop())-(e=s.pop())<=i||(n=e+Math.ceil((o-e)/i/2)*i,bp(t,n,e,o,r),s.push(e,n,n,o))}function Fp(t){this.a=mp.$d(t),this.b={}}function kp(t,e,o){var i=t.b[U(o)];St([i.ca,i.da,i.$,i.ia],e)||(t.remove(o),t.Ca(e,o))}function Dp(t){return t.a.all().map(function(t){return t.value})}function Op(t,e){return t.a.search({ca:e[0],da:e[1],$:e[2],ia:e[3]}).map(function(t){return t.value})}function Up(t,e,o,i){return Gp(Op(t,e),o,i)}function Gp(t,e,o){for(var i,r=0,n=t.length;r<n&&!(i=e.call(o,t[r]));r++);return i}function Bp(t,e){ha.call(this,0,e),this.g=new Wa(0,e),this.v=null,this.u=[],this.c=[],this.j={fillColor:null,s:!1}}function Xp(t,e,o,i){var r=new lp,n=new Fp;if(e=Vp(t,e,i,r,n,!0),o.length){for(var s=[],a=0,p=o.length;a<p;++a){var h={list:new lp,$:void 0,Mg:new Fp};s.push(h),h.$=Vp(t,o[a],i,h.list,h.Mg,!1)}for(s.sort(function(t,e){return e.$[0]===t.$[0]?t.$[1]-e.$[1]:e.$[0]-t.$[0]}),a=0;a<s.length;++a){p=i=cp(o=s[a].list);do{if(_p(p,n).length){var l=!0;break}}while(i!==(p=fp(o)));l||(Wp(o,s[a].Mg,!0),function(t,e,o,i,r){for(var n=cp(t);n.W.x!==e;)n=fp(t);e=n.W,i={x:i,y:e.y,hb:-1};var s,a=1/0,p=_p({aa:e,W:i},r,!0),h=0;for(s=p.length;h<s;++h){var l,u=p[h],c=$p(e,i,u.aa,u.W,!0),f=Math.abs(e.x-c[0]);f<a&&void 0!==ya(e.x,e.y,u.aa.x,u.aa.y,u.W.x,u.W.y)&&(a=f,l={x:c[0],y:c[1],hb:-1},n=u)}if(1/0===a)return;if(p=n.W,0<a&&(n=Jp(e,l,n.W,r)).length)for(l=1/0,h=0,s=n.length;h<s;++h)a=n[h],((u=Math.atan2(e.y-a.y,i.x-a.x))<l||u===l&&a.x<p.x)&&(l=u,p=a);for(n=cp(o);n.W.x!==p.x||n.W.y!==p.y;)n=fp(o);return i={x:e.x,y:e.y,hb:e.hb,Fb:void 0},h={x:n.W.x,y:n.W.y,hb:n.W.hb,Fb:void 0},yp(t).aa=i,Hp(e,n.W,t,r),Hp(h,i,t,r),n.W=h,t.f&&t.b&&(t.i=t.b,t.a=t.b.ub),o.concat(t),1}(o,s[a].$[0],r,e[0],n)&&(n.concat(s[a].Mg),Wp(r,n,!1)))}}else Wp(r,n,!1);!function t(e,o,i){for(var r=!1,n=zp(o,i);3<o.c;)if(n){if(!Zp(e,o,i,n,r)&&!Wp(o,i,r)&&!Kp(e,o,i,!0))break}else if(!Zp(e,o,i,n,r)&&!Wp(o,i,r)&&!Kp(e,o,i)){if(!(n=zp(o,i))){n=e,s=a=cp(r=o);do{if((p=_p(s,i)).length){for(a=p[0],p=$p(s.aa,s.W,a.aa,a.W),p=Yp(n,p[0],p[1],n.a.length/2),h=new lp,l=new Fp,Hp(p,s.W,h,l),s.W=p,kp(i,[Math.min(s.aa.x,p.x),Math.min(s.aa.y,p.y),Math.max(s.aa.x,p.x),Math.max(s.aa.y,p.y)],s),s=fp(r);s!==a;)Hp(s.aa,s.W,h,l),i.remove(s),up(r),s=vp(r);Hp(a.aa,p,h,l),a.aa=p,kp(i,[Math.min(a.W.x,p.x),Math.min(a.W.y,p.y),Math.max(a.W.x,p.x),Math.max(a.W.y,p.y)],a),Wp(r,i,!1),t(n,r,i),Wp(h,l,!1),t(n,h,l);break}}while((s=fp(r))!==a);break}for(var s=2*(r=o).c,a=Array(s),p=cp(r),h=p,l=0;a[l++]=h.aa.x,a[l++]=h.aa.y,(h=fp(r))!==p;);r=!Vr(a,0,s,2),Wp(o,i,r)}3===o.c&&(n=e.b.length,e.b[n++]=dp(o).aa.hb,e.b[n++]=vp(o).aa.hb,e.b[n++]=yp(o).aa.hb)}(t,r,n)}function Vp(t,e,o,i,r,n){var s,a=t.a.length/2,p=[],h=[];if(n===Vr(e,0,e.length,o))for(var l=s=Yp(t,e[0],e[1],a++),u=(n=e[0],e[1]),c=o,f=e.length;c<f;c+=o){var y=Yp(t,e[c],e[c+1],a++);h.push(Hp(l,y,i)),p.push([Math.min(l.x,y.x),Math.min(l.y,y.y),Math.max(l.x,y.x),Math.max(l.y,y.y)]),e[c]>n&&(n=e[c],u=e[c+1]),l=y}else for(l=s=Yp(t,e[c=e.length-o],e[c+1],a++),n=e[c],u=e[c+1],c-=o,f=0;f<=c;c-=o)y=Yp(t,e[c],e[c+1],a++),h.push(Hp(l,y,i)),p.push([Math.min(l.x,y.x),Math.min(l.y,y.y),Math.max(l.x,y.x),Math.max(l.y,y.y)]),e[c]>n&&(n=e[c],u=e[c+1]),l=y;return h.push(Hp(y,s,i)),p.push([Math.min(l.x,y.x),Math.min(l.y,y.y),Math.max(l.x,y.x),Math.max(l.y,y.y)]),r.load(p,h),[n,u]}function Wp(t,e,o){var i=cp(t),r=i,n=fp(t),s=!1;do{var a=o?ya(n.W.x,n.W.y,r.W.x,r.W.y,r.aa.x,r.aa.y):ya(r.aa.x,r.aa.y,r.W.x,r.W.y,n.W.x,n.W.y)}while(void 0===a?(qp(r,n,t,e),s=!0,n===i&&(i=yp(t)),n=r,gp(t)):r.W.Fb!==a&&(r.W.Fb=a,s=!0),r=n,n=fp(t),r!==i);return s}function Zp(t,e,o,i,r){var n=t.b.length,s=cp(e),a=dp(e),p=s,h=fp(e),l=yp(e),u=!1;do{var c,f=p.aa,y=p.W,g=h.W}while(!1===y.Fb&&(c=r?Qp(l.W,g,y,f,a.aa):Qp(a.aa,f,y,g,l.W),!i&&_p({aa:f,W:g},o).length||!c||Jp(f,y,g,o,!0).length||!i&&!1!==f.Fb&&!1!==g.Fb&&Vr([a.aa.x,a.aa.y,f.x,f.y,y.x,y.y,g.x,g.y,l.W.x,l.W.y],0,10,2)!==!r||(t.b[n++]=f.hb,t.b[n++]=y.hb,t.b[n++]=g.hb,qp(p,h,e,o),h===s&&(s=l),u=!0)),a=dp(e),p=vp(e),h=fp(e),l=yp(e),p!==s&&3<e.c);return u}function Kp(t,e,o,i){var r=cp(e),n=(fp(e),r),s=fp(e),a=!1;do{var p=$p(n.aa,n.W,s.aa,s.W,i);if(p){var a=t.b.length,h=t.a.length/2,l=gp(e),u=(up(e),o.remove(l),l===r);if(i?(u=p[0]===n.aa.x&&p[1]===n.aa.y?(gp(e),p=n.aa,s.aa=p,o.remove(n),u||n===r):(p=s.W,n.W=p,o.remove(s),u||s===r),up(e)):(p=Yp(t,p[0],p[1],h),n.W=p,s.aa=p,kp(o,[Math.min(n.aa.x,n.W.x),Math.min(n.aa.y,n.W.y),Math.max(n.aa.x,n.W.x),Math.max(n.aa.y,n.W.y)],n),kp(o,[Math.min(s.aa.x,s.W.x),Math.min(s.aa.y,s.W.y),Math.max(s.aa.x,s.W.x),Math.max(s.aa.y,s.W.y)],s)),t.b[a++]=l.aa.hb,t.b[a++]=l.W.hb,t.b[a++]=p.hb,a=!0,u)break}}while(n=dp(e),s=fp(e),n!==r);return a}function zp(t,e){var o=cp(t),i=o;do{if(_p(i,e).length)return!1}while((i=fp(t))!==o);return!0}function Yp(t,e,o,i){var r=t.a.length;return{x:t.a[r++]=e,y:t.a[+r]=o,hb:i,Fb:void 0}}function Hp(t,e,o,i){var r,n={aa:t,W:e},s={ub:void 0,next:void 0,data:n},a=o.b;return a?(r=a.next,s.ub=a,s.next=r,a.next=s,r&&(r.ub=s),a===o.a&&(o.a=s)):(o.i=s,o.a=s,o.f&&((s.next=s).ub=s)),o.b=s,o.c++,i&&i.Ca([Math.min(t.x,e.x),Math.min(t.y,e.y),Math.max(t.x,e.x),Math.max(t.y,e.y)],n),n}function qp(t,e,o,i){vp(o)===e&&(up(o),t.W=e.W,i.remove(e),kp(i,[Math.min(t.aa.x,t.W.x),Math.min(t.aa.y,t.W.y),Math.max(t.aa.x,t.W.x),Math.max(t.aa.y,t.W.y)],t))}function Jp(t,e,o,i,r){var n,s,a=[],p=Op(i,[Math.min(t.x,e.x,o.x),Math.min(t.y,e.y,o.y),Math.max(t.x,e.x,o.x),Math.max(t.y,e.y,o.y)]);for(i=0,n=p.length;i<n;++i)for(s in p[i]){var h=p[i][s];"object"!=typeof h||r&&!h.Fb||h.x===t.x&&h.y===t.y||h.x===e.x&&h.y===e.y||h.x===o.x&&h.y===o.y||-1!==a.indexOf(h)||!Dr([t.x,t.y,e.x,e.y,o.x,o.y],0,6,2,h.x,h.y)||a.push(h)}return a}function _p(t,e,o){for(var i=t.aa,r=t.W,n=[],s=0,a=(e=Op(e,[Math.min(i.x,r.x),Math.min(i.y,r.y),Math.max(i.x,r.x),Math.max(i.y,r.y)])).length;s<a;++s){var p=e[s];t!==p&&(o||p.aa!==r||p.W!==i)&&$p(i,r,p.aa,p.W,o)&&n.push(p)}return n}function $p(t,e,o,i,r){var n=(i.y-o.y)*(e.x-t.x)-(i.x-o.x)*(e.y-t.y);if(n&&(i=((i.x-o.x)*(t.y-o.y)-(i.y-o.y)*(t.x-o.x))/n,o=((e.x-t.x)*(t.y-o.y)-(e.y-t.y)*(t.x-o.x))/n,!r&&ga<i&&i<1-ga&&ga<o&&o<1-ga||r&&0<=i&&i<=1&&0<=o&&o<=1))return[t.x+i*(e.x-t.x),t.y+i*(e.y-t.y)]}function Qp(t,e,o,i,r){var n;return void 0!==e.Fb&&void 0!==i.Fb&&(n=(o.x-i.x)*(e.y-i.y)>(o.y-i.y)*(e.x-i.x),r=(r.x-i.x)*(e.y-i.y)<(r.y-i.y)*(e.x-i.x),t=(t.x-e.x)*(i.y-e.y)>(t.y-e.y)*(i.x-e.x),o=(o.x-e.x)*(i.y-e.y)<(o.y-e.y)*(i.x-e.x),e=e.Fb?o||t:o&&t,i.Fb?r||n:r&&n)&&e}function th(){}function eh(t,e,o){this.f=e,this.g=t,this.c=o,this.a={}}function oh(t,e){var o,i=[];for(o in t.a){var r,n=t.a[o];for(r in n)i.push(n[r].Eb(e))}return function(){for(var t,e=i.length,o=0;o<e;o++)t=i[o].apply(this,arguments);return t}}function ih(t,e,o,i,r,n,s,a,p,h,l){for(var u=rh,c=Object.keys(t.a).map(Number),f=(c.sort(function(t,e){return e-t}),0),y=c.length;f<y;++f)for(var g=t.a[c[f].toString()],d=_s.length-1;0<=d;--d){var v=g[_s[d]];if(void 0!==v&&(v=v.La(e,o,i,r,u,n,s,a,p,h,l)))return v}}yi=mp.$d=mp.$d||{},bp=function t(e,o,i,r,n){for(i=i||0,r=r||e.length-1,n=n||xp;i<r;){var s,a,p,h;for(600<r-i&&(s=r-i+1,a=o-i+1,h=Math.log(s),p=.5*Math.exp(2*h/3),h=.5*Math.sqrt(h*p*(s-p)/s)*(a-s/2<0?-1:1),t(e,o,Math.max(i,Math.floor(o-a*p/s+h)),Math.min(r,Math.floor(o+(s-a)*p/s+h)),n)),s=e[o],p=r,wp(e,a=i,o),0<n(e[r],s)&&wp(e,i,r);a<p;){for(wp(e,a,p),a++,p--;n(e[a],s)<0;)a++;for(;0<n(e[p],s);)p--}0===n(e[i],s)?wp(e,i,p):wp(e,++p,r),p<=o&&(i=p+1),o<=p&&(r=p-1)}},Sp.prototype={all:function(){return this.$g(this.data,[])},search:function(t){var e=this.data,o=[],i=this.wb;if(Rp(t,e))for(var r,n,s,a,p=[];e;){for(r=0,n=e.children.length;r<n;r++)s=e.children[r],Rp(t,a=e.ib?i(s):s)&&(e.ib?o.push(s):Lp(t,a)?this.$g(s,o):p.push(s));e=p.pop()}return o},load:function(t){if(t&&t.length)if(t.length<this.fh)for(var e=0,o=t.length;e<o;e++)this.Ca(t[e]);else t=this.bh(t.slice(),0,t.length-1,0),this.data.children.length?this.data.height===t.height?this.hh(this.data,t):(this.data.height<t.height&&(e=this.data,this.data=t,t=e),this.eh(t,this.data.height-t.height-1,!0)):this.data=t;return this},Ca:function(t){return t&&this.eh(t,this.data.height-1),this},clear:function(){return this.data=Ip([]),this},remove:function(t,e){if(t)for(var o,i,r,n=this.data,s=this.wb(t),a=[],p=[];n||a.length;){if(n||(n=a.pop(),i=a[a.length-1],o=p.pop(),r=!0),n.ib){t:{var h=t,l=n.children,u=e;if(u){for(var c=0;c<l.length;c++)if(u(h,l[c])){h=c;break t}h=-1}else h=l.indexOf(h)}if(-1!==h){n.children.splice(h,1),a.push(n),this.ck(a);break}}r||n.ib||!Lp(n,s)?i?(o++,n=i.children[o],r=!1):n=null:(a.push(n),p.push(o),n=(i=n).children[o=0])}return this},wb:function(t){return t},Lf:Ep,Mf:Tp,toJSON:function(){return this.data},$g:function(t,e){for(var o=[];t;)t.ib?e.push.apply(e,t.children):o.push.apply(o,t.children),t=o.pop();return e},bh:function(t,e,o,i){var r,n,s=o-e+1,a=this.Hf;if(s<=a)Mp(r=Ip(t.slice(e,o+1)),this.wb);else{for(i||(i=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,i-1))),(r=Ip([])).ib=!1,r.height=i,Np(t,e,o,a=(s=Math.ceil(s/a))*Math.ceil(Math.sqrt(a)),this.Lf);e<=o;e+=a){var p=Math.min(e+a-1,o);for(Np(t,e,p,s,this.Mf),n=e;n<=p;n+=s){var h=Math.min(n+s-1,p);r.children.push(this.bh(t,n,h,i-1))}}Mp(r,this.wb)}return r},bk:function(t,e,o,i){for(var r,n,s,a,p,h,l,u;i.push(e),!e.ib&&i.length-1!==o;){for(l=u=1/0,r=0,n=e.children.length;r<n;r++)p=jp(s=e.children[r]),(h=(Math.max(s.$,t.$)-Math.min(s.ca,t.ca))*(Math.max(s.ia,t.ia)-Math.min(s.da,t.da))-p)<u?(u=h,l=p<l?p:l,a=s):h===u&&p<l&&(l=p,a=s);e=a||e.children[0]}return e},eh:function(t,e,o){var i=this.wb,i=(o=o?t:i(t),[]),r=this.bk(o,this.data,e,i);for(r.children.push(t),Ap(r,o);0<=e&&i[e].children.length>this.Hf;)this.jk(i,e),e--;this.Zj(o,i,e)},jk:function(t,e){var o=t[e],i=o.children.length,r=this.fh;this.$j(o,r,i),i=this.ak(o,r,i),(i=Ip(o.children.splice(i,o.children.length-i))).height=o.height,i.ib=o.ib,Mp(o,this.wb),Mp(i,this.wb),e?t[e-1].children.push(i):this.hh(o,i)},hh:function(t,e){this.data=Ip([t,e]),this.data.height=t.height+1,this.data.ib=!1,Mp(this.data,this.wb)},ak:function(t,e,o){for(var i=s=1/0,r=e;r<=o-e;r++){var n,s,a=Pp(t,0,r,this.wb),p=Pp(t,r,o,this.wb),h=Math.max(0,Math.min(a.$,p.$)-Math.max(a.ca,p.ca))*Math.max(0,Math.min(a.ia,p.ia)-Math.max(a.da,p.da)),a=jp(a)+jp(p);h<i?(i=h,n=r,s=a<s?a:s):h===i&&a<s&&(s=a,n=r)}return n},$j:function(t,e,o){var i=t.ib?this.Lf:Ep,r=t.ib?this.Mf:Tp;this.ah(t,e,o,i)<(e=this.ah(t,e,o,r))&&t.children.sort(i)},ah:function(t,e,o,i){t.children.sort(i);for(var r=Pp(t,0,e,i=this.wb),n=Pp(t,o-e,o,i),s=Cp(r)+Cp(n),a=e;a<o-e;a++){var p=t.children[a];Ap(r,t.ib?i(p):p),s+=Cp(r)}for(a=o-e-1;e<=a;a--)p=t.children[a],Ap(n,t.ib?i(p):p),s+=Cp(n);return s},Zj:function(t,e,o){for(;0<=o;o--)Ap(e[o],t)},ck:function(t){for(var e,o=t.length-1;0<=o;o--)0===t[o].children.length?0<o?(e=t[o-1].children).splice(e.indexOf(t[o]),1):this.clear():Mp(t[o],this.wb)},ek:function(t){var e=["return a"," - b",";"];this.Lf=new Function("a","b",e.join(t[0])),this.Mf=new Function("a","b",e.join(t[1])),this.wb=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}},yi.default=Sp,mp.$d=mp.$d.default,(r=Fp.prototype).Ca=function(t,e){t={ca:t[0],da:t[1],$:t[2],ia:t[3],value:e},this.a.Ca(t),this.b[U(e)]=t},r.load=function(t,e){for(var o=Array(e.length),i=0,r=e.length;i<r;i++){var n=t[i],s=e[i],n={ca:n[0],da:n[1],$:n[2],ia:n[3],value:s};o[i]=n,this.b[U(s)]=n}this.a.load(o)},r.remove=function(t){t=U(t);var e=this.b[t];return delete this.b[t],null!==this.a.remove(e)},r.forEach=function(t,e){return Gp(Dp(this),t,e)},r.clear=function(){this.a.clear(),this.b={}},r.G=function(t){var e=this.a.data;return bt(e.ca,e.da,e.$,e.ia,t)},r.concat=function(t){for(var e in this.a.load(t.a.all()),t.b)this.b[0|e]=t.b[0|e]},e(Bp,ha),(r=Bp.prototype).pc=function(t,e){for(var o=t.c,i=t.qa(),r=this.b.length,n=this.g.b.length,s=(t=t.ga(),c=0),a=o.length;s<a;++s){var p=o[s];if(0<p.length){var h=dr(t,c,p[0],i,-this.origin[0],-this.origin[1]);if(h.length){for(var l,u=[],c=1,f=p.length;c<f;++c)p[c]!==p[c-1]&&(l=dr(t,p[c-1],p[c],i,-this.origin[0],-this.origin[1]),u.push(l));Ya(this.g,h,u,i),Xp(this,h,u,i)}}c=p[p.length-1]}this.b.length>r&&(this.i.push(r),this.f.push(e),this.j.s)&&(this.c.push(r),this.j.s=!1),this.g.b.length>n&&Ha(this.g,e,n)},r.rc=function(t,e){var o=t.Bb(),i=t.qa();if(0<o.length){var r=dr(t=t.ga().map(Number),0,o[0],i,-this.origin[0],-this.origin[1]);if(r.length){for(var n,s=[],a=1,p=o.length;a<p;++a)o[a]!==o[a-1]&&(n=dr(t,o[a-1],o[a],i,-this.origin[0],-this.origin[1]),s.push(n));this.i.push(this.b.length),this.f.push(e),this.j.s&&(this.c.push(this.b.length),this.j.s=!1),Ha(this.g,e),Ya(this.g,r,s,i),Xp(this,r,s,i)}}},r.Db=function(t){this.l=new da(this.a),this.o=new da(this.b),this.i.push(this.b.length),this.g.Db(t),!this.c.length&&0<this.u.length&&(this.u=[]),this.b=this.a=null},r.Eb=function(t){var e=this.l,o=this.o,i=this.g.Eb(t);return function(){Ta(t,e),Ta(t,o),i()}},r.rf=function(t,e){var o,i=La(e,np,ap);return this.v?o=this.v:this.v=o=new pp(t,i),e.Qc(i),t.enableVertexAttribArray(o.b),t.vertexAttribPointer(o.b,2,5126,!1,8,0),o},r.sf=function(t,e){t.disableVertexAttribArray(e.b)},r.Od=function(t,e,o,i){var r=t.getParameter(t.DEPTH_FUNC),n=t.getParameter(t.DEPTH_WRITEMASK);if(i||(t.enable(t.DEPTH_TEST),t.depthMask(!0),t.depthFunc(t.NOTEQUAL)),Zt(o)){var s=this.i[this.i.length-1];for(o=this.c.length-1;0<=o;--o){var a=this.c[o],p=this.u[o];t.uniform4fv(this.v.B,p),la(t,e,a,s),s=a}}else for(var h=this.i.length-2,p=s=this.i[h+1],a=this.c.length-1;0<=a;--a){var l=this.u[a];for(t.uniform4fv(this.v.B,l),l=this.c[a];0<=h&&this.i[h]>=l;){var u=this.i[h];o[U(this.f[h]).toString()]&&(s!==p&&(la(t,e,s,p),t.clear(t.DEPTH_BUFFER_BIT)),p=u),h--,s=u}s!==p&&(la(t,e,s,p),t.clear(t.DEPTH_BUFFER_BIT)),s=p=l}i||(t.disable(t.DEPTH_TEST),t.clear(t.DEPTH_BUFFER_BIT),t.depthMask(n),t.depthFunc(r))},r.ve=function(t,e,o,i,r){for(var n,s=this.i.length-2,a=this.i[s+1],p=this.c.length-1;0<=p;--p){var h=this.u[p];for(t.uniform4fv(this.v.B,h),n=this.c[p];0<=s&&this.i[s]>=n;){var h=this.i[s],l=this.f[s];if(void 0===o[U(l).toString()]&&l.V()&&(void 0===r||Ot(r,l.V().G()))&&(t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),la(t,e,h,a),a=i(l)))return a;s--,a=h}}},r.Ma=function(t,e){t=!((t=t?t.b:[0,0,0,0])instanceof CanvasGradient||t instanceof CanvasPattern)&&vo(t).map(function(t,e){return 3!=e?t/255:t})||ua,this.j.fillColor&&Z(t,this.j.fillColor)||(this.j.fillColor=t,this.j.s=!0,this.u.push(t)),e?this.g.Ma(null,e):this.g.Ma(null,new hp({color:[0,0,0,0],lineWidth:0}))},th.prototype.La=function(){},e(eh,$s),eh.prototype.b=function(t,e){var o=void 0!==t?t.toString():"0";return void 0===(t=this.a[o])&&(this.a[o]=t={}),void 0===(o=t[e])&&(o=new nh[e](this.g,this.f),t[e]=o),o},eh.prototype.i=function(){return Zt(this.a)},eh.prototype.La=function(t,e,o,i,r,n,s,a){for(var p=Object.keys(this.a).map(Number),h=(p.sort(G),0),l=p.length;h<l;++h)for(var u=this.a[p[h].toString()],c=0,f=_s.length;c<f;++c){var y=u[_s[c]];void 0!==y&&y.La(t,e,o,i,r,n,s,a,void 0,!1)}},eh.prototype.Ea=function(t,e,o,i,r,n,s,a,p,h){var l,u=e.b;return u.bindFramebuffer(u.FRAMEBUFFER,ja(e)),ih(this,e,t,i,r,s,a,p,function(t){var e=new Uint8Array(4);if(u.readPixels(0,0,1,1,u.RGBA,u.UNSIGNED_BYTE,e),0<e[3]&&(t=h(t)))return t},!0,l=void 0!==this.c?lt(wt(t),i*this.c):l)};var rh=[1,1],nh={Circle:ba,Image:Fa,LineString:Wa,Polygon:Bp,Text:th};function sh(t,e,o,i,r,n,s){this.b=t,this.i=e,this.a=n,this.c=s,this.j=r,this.g=i,this.f=o,this.o=this.l=this.v=null}function ah(){this.c=0,this.b={},this.i=this.a=null}function ph(t,e){Ls.call(this,0,e),this.b=document.createElement("CANVAS"),this.b.style.width="100%",this.b.style.height="100%",this.b.style.display="block",this.b.className="ol-unselectable",t.insertBefore(this.b,t.childNodes[0]||null),this.S=this.D=0,this.C=Po(),this.l=!0,this.i=Qo(this.b,{antialias:!0,depth:!0,failIfMajorPerformanceCaveat:!0,preserveDrawingBuffer:!1,stencil:!0}),this.f=new Aa(this.b,this.i),d(this.b,"webglcontextlost",this.Yn,this),d(this.b,"webglcontextrestored",this.Zn,this),this.a=new ah,this.u=null,this.j=new Zi(function(t){var e=t[1],o=(t=t[2],e[0]-this.u[0]),e=e[1]-this.u[1];return 65536*Math.log(t)+Math.sqrt(o*o+e*e)/t}.bind(this),function(t){return t[0].bb()}),this.B=function(){var t;return this.j.b.length&&(Hi(this.j),hh(this,(t=Ki(this.j))[0],t[3],t[4])),!1}.bind(this),this.g=0,uh(this)}function hh(t,e,o,i){var r,n,s,a=t.i,p=e.bb();t.a.b.hasOwnProperty(p)?(t=t.a.get(p),a.bindTexture(3553,t.Ib),9729!=t.Ph&&(a.texParameteri(3553,10240,9729),t.Ph=9729),9729!=t.Rh&&(a.texParameteri(3553,10241,9729),t.Rh=9729)):(r=a.createTexture(),a.bindTexture(3553,r),0<i?(n=t.C.canvas,s=t.C,t.D!==o[0]||t.S!==o[1]?(n.width=o[0],n.height=o[1],t.D=o[0],t.S=o[1]):s.clearRect(0,0,o[0],o[1]),s.drawImage(e.Y(),i,i,o[0],o[1],0,0,o[0],o[1]),a.texImage2D(3553,0,6408,6408,5121,n)):a.texImage2D(3553,0,6408,6408,5121,e.Y()),a.texParameteri(3553,10240,9729),a.texParameteri(3553,10241,9729),a.texParameteri(3553,10242,33071),a.texParameteri(3553,10243,33071),t.a.set(p,{Ib:r,Ph:9729,Rh:9729}))}function lh(t,e,o){var i,r=t.o;oo(r,e)&&(t=t.f,i=o.viewState,r.b(new Ds(e,new sh(t,i.center,i.resolution,i.rotation,o.size,o.extent,o.pixelRatio),o,null,t)))}function uh(t){(t=t.i).activeTexture(33984),t.blendFuncSeparate(770,771,1,771),t.disable(2884),t.disable(2929),t.disable(3089),t.disable(2960)}e(sh,Xs),(r=sh.prototype).rd=function(t){this.Ma(t.Fa(),t.Ga()),this.Ub(t.Y())},r.zb=function(t){switch(t.U()){case"Point":this.qc(t,null);break;case"LineString":this.mc(t,null);break;case"Polygon":this.rc(t,null);break;case"MultiPoint":this.oc(t,null);break;case"MultiLineString":this.nc(t,null);break;case"MultiPolygon":this.pc(t,null);break;case"GeometryCollection":this.ue(t,null);break;case"Circle":this.Zb(t,null)}},r.te=function(t,e){(t=(0,e.Za)(t))&&Ot(this.a,t.G())&&(this.rd(e),this.zb(t))},r.ue=function(t){for(var e=0,o=(t=t.a).length;e<o;++e)this.zb(t[e])},r.qc=function(t,e){var o=this.b,i=new eh(1,this.a).b(0,"Image");i.Ub(this.v),i.qc(t,e),i.Db(o),i.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1),i.Eb(o)()},r.oc=function(t,e){var o=this.b,i=new eh(1,this.a).b(0,"Image");i.Ub(this.v),i.oc(t,e),i.Db(o),i.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1),i.Eb(o)()},r.mc=function(t,e){var o=this.b,i=new eh(1,this.a).b(0,"LineString");i.Ma(null,this.o),i.mc(t,e),i.Db(o),i.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1),i.Eb(o)()},r.nc=function(t,e){var o=this.b,i=new eh(1,this.a).b(0,"LineString");i.Ma(null,this.o),i.nc(t,e),i.Db(o),i.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1),i.Eb(o)()},r.rc=function(t,e){var o=this.b,i=new eh(1,this.a).b(0,"Polygon");i.Ma(this.l,this.o),i.rc(t,e),i.Db(o),i.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1),i.Eb(o)()},r.pc=function(t,e){var o=this.b,i=new eh(1,this.a).b(0,"Polygon");i.Ma(this.l,this.o),i.pc(t,e),i.Db(o),i.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1),i.Eb(o)()},r.Zb=function(t,e){var o=this.b,i=new eh(1,this.a).b(0,"Circle");i.Ma(this.l,this.o),i.Zb(t,e),i.Db(o),i.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1),i.Eb(o)()},r.Ub=function(t){this.v=t},r.Ma=function(t,e){this.l=t,this.o=e},(r=ah.prototype).clear=function(){this.c=0,this.b={},this.i=this.a=null},r.forEach=function(t,e){for(var o=this.a;o;)t.call(e,o.Yc,o.uc,this),o=o.Nb},r.get=function(t){return O(!!(t=this.b[t]),15),t!==this.i&&(t===this.a?(this.a=this.a.Nb,this.a.vd=null):(t.Nb.vd=t.vd,t.vd.Nb=t.Nb),t.Nb=null,t.vd=this.i,this.i=this.i.Nb=t),t.Yc},r.pop=function(){var t=this.a;return delete this.b[t.uc],t.Nb&&(t.Nb.vd=null),this.a=t.Nb,this.a||(this.i=null),--this.c,t.Yc},r.replace=function(t,e){this.get(t),this.b[t].Yc=e},r.set=function(t,e){O(!(t in this.b),16),e={uc:t,Nb:null,vd:this.i,Yc:e},this.i?this.i.Nb=e:this.a=e,this.i=e,this.b[t]=e,++this.c},e(ph,Ls),(r=ph.prototype).ka=function(){var e=this.i;e.isContextLost()||this.a.forEach(function(t){t&&e.deleteTexture(t.Ib)}),$e(this.f),Ls.prototype.ka.call(this)},r.xk=function(t,e){t=this.i;for(var o;1024<this.a.c-this.g;){if(o=this.a.a.Yc)t.deleteTexture(o.Ib);else{if(+this.a.a.uc==e.index)break;--this.g}this.a.pop()}},r.U=function(){return"webgl"},r.Yn=function(t){for(var e in t.preventDefault(),this.a.clear(),this.g=0,t=this.c)t[e].mg()},r.Zn=function(){uh(this),this.o.render()},r.Jg=function(t){var e=this.f,o=this.i;if(o.isContextLost())return!1;if(!t)return this.l&&(this.b.style.display="none",this.l=!1),!1;this.u=t.focus,this.a.set((-t.index).toString(),null),++this.g,lh(this,"precompose",t);for(var i=[],r=t.layerStatesArray,n=(K(r),t.viewState.resolution),s=0,a=r.length;s<a;++s){var p=r[s];gs(p,n)&&"ready"==p.yj&&Ns(this,p.layer).ng(t,p,e)&&i.push(p)}for(r=t.size[0]*t.pixelRatio,n=t.size[1]*t.pixelRatio,this.b.width==r&&this.b.height==n||(this.b.width=r,this.b.height=n),o.bindFramebuffer(36160,null),o.clearColor(0,0,0,0),o.clear(16384),o.enable(3042),o.viewport(0,0,this.b.width,this.b.height),s=0,a=i.length;s<a;++s)Ns(this,(p=i[s]).layer).Gi(t,p,e);this.l||(this.b.style.display="",this.l=!0),Rs(t),1024<this.a.c-this.g&&t.postRenderFunctions.push(this.xk.bind(this)),this.j.b.length&&(t.postRenderFunctions.push(this.B),t.animate=!0),lh(this,"postcompose",t),Fs(this,t),t.postRenderFunctions.push(Is)},r.Ea=function(t,e,o,i,r,n,s){if(this.i.isContextLost())return!1;for(var a=e.viewState,p=e.layerStatesArray,h=p.length-1;0<=h;--h){var l=p[h],u=l.layer;if(gs(l,a.resolution)&&n.call(s,u)&&(l=Ns(this,u).Ea(t,e,o,i,r)))return l}},r.Ei=function(t,e,o,i,r){if(o=!1,this.i.isContextLost())return!1;for(var n=e.viewState,s=e.layerStatesArray,a=s.length-1;0<=a;--a){var p=s[a],h=p.layer;if(gs(p,n.resolution)&&i.call(r,h)&&(o=Ns(this,h).Ue(t,e)))return!0}return o},r.Di=function(t,e,o,i,r){if(this.i.isContextLost())return!1;for(var n=e.viewState,s=e.layerStatesArray,a=s.length-1;0<=a;--a){var p=s[a],h=p.layer;if(gs(p,n.resolution)&&r.call(i,h)&&(p=Ns(this,h).lg(t,e,o,i)))return p}};var ch=["canvas","webgl"];function u(t){ro.call(this);var e=function(t){var e=null,o=(void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget),{}),i={};void 0===t.logo||"boolean"==typeof t.logo&&t.logo?i["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAHGAAABxgEXwfpGAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAhNQTFRF////AP//AICAgP//AFVVQECA////K1VVSbbbYL/fJ05idsTYJFtbbcjbJllmZszWWMTOIFhoHlNiZszTa9DdUcHNHlNlV8XRIVdiasrUHlZjIVZjaMnVH1RlIFRkH1RkH1ZlasvYasvXVsPQH1VkacnVa8vWIVZjIFRjVMPQa8rXIVVkXsXRsNveIFVkIFZlIVVj3eDeh6GmbMvXH1ZkIFRka8rWbMvXIFVkIFVjIFVkbMvWH1VjbMvWIFVlbcvWIFVla8vVIFVkbMvWbMvVH1VkbMvWIFVlbcvWIFVkbcvVbMvWjNPbIFVkU8LPwMzNIFVkbczWIFVkbsvWbMvXIFVkRnB8bcvW2+TkW8XRIFVkIlZlJVloJlpoKlxrLl9tMmJwOWd0Omh1RXF8TneCT3iDUHiDU8LPVMLPVcLPVcPQVsPPVsPQV8PQWMTQWsTQW8TQXMXSXsXRX4SNX8bSYMfTYcfTYsfTY8jUZcfSZsnUaIqTacrVasrVa8jTa8rWbI2VbMvWbcvWdJObdcvUdszUd8vVeJaee87Yfc3WgJyjhqGnitDYjaarldPZnrK2oNbborW5o9bbo9fbpLa6q9ndrL3ArtndscDDutzfu8fJwN7gwt7gxc/QyuHhy+HizeHi0NfX0+Pj19zb1+Tj2uXk29/e3uLg3+Lh3+bl4uXj4ufl4+fl5Ofl5ufl5ujm5+jmySDnBAAAAFp0Uk5TAAECAgMEBAYHCA0NDg4UGRogIiMmKSssLzU7PkJJT1JTVFliY2hrdHZ3foSFhYeJjY2QkpugqbG1tre5w8zQ09XY3uXn6+zx8vT09vf4+Pj5+fr6/P39/f3+gz7SsAAAAVVJREFUOMtjYKA7EBDnwCPLrObS1BRiLoJLnte6CQy8FLHLCzs2QUG4FjZ5GbcmBDDjxJBXDWxCBrb8aM4zbkIDzpLYnAcE9VXlJSWlZRU13koIeW57mGx5XjoMZEUqwxWYQaQbSzLSkYGfKFSe0QMsX5WbjgY0YS4MBplemI4BdGBW+DQ11eZiymfqQuXZIjqwyadPNoSZ4L+0FVM6e+oGI6g8a9iKNT3o8kVzNkzRg5lgl7p4wyRUL9Yt2jAxVh6mQCogae6GmflI8p0r13VFWTHBQ0rWPW7ahgWVcPm+9cuLoyy4kCJDzCm6d8PSFoh0zvQNC5OjDJhQopPPJqph1doJBUD5tnkbZiUEqaCnB3bTqLTFG1bPn71kw4b+GFdpLElKIzRxxgYgWNYc5SCENVHKeUaltHdXx0dZ8uBI1hJ2UUDgq82CM2MwKeibqAvSO7MCABq0wXEPiqWEAAAAAElFTkSuQmCC"]="https://openlayers.org/":"string"==typeof(s=t.logo)?i[s]="":s instanceof HTMLElement?i[U(s).toString()]=s:s&&(O("string"==typeof s.href,44),O("string"==typeof s.src,45),i[s.src]=s.href);s=t.layers instanceof cs?t.layers:new cs({layers:t.layers}),o.layergroup=s,o.target=t.target,o.view=void 0!==t.view?t.view:new h;var r,n,s=Ls,a=(void 0!==t.renderer?(Array.isArray(t.renderer)?r=t.renderer:"string"==typeof t.renderer?r=[t.renderer]:O(!1,46),0<=r.indexOf("dom")&&(r=r.concat(ch))):r=ch,0);for(n=r.length;a<n;++a){var p=r[a];if("canvas"==p){if(ai){s=qs;break}}else if("webgl"==p&&gi){s=ph;break}}return r=void 0!==t.controls?Array.isArray(t.controls)?new ho(t.controls.slice()):(O(t.controls instanceof ho,47),t.controls):Uo(),a=void 0!==t.interactions?Array.isArray(t.interactions)?new ho(t.interactions.slice()):(O(t.interactions instanceof ho,48),t.interactions):hs(),t=void 0!==t.overlays?Array.isArray(t.overlays)?new ho(t.overlays.slice()):(O(t.overlays instanceof ho,49),t.overlays):new ho,{controls:r,interactions:a,keyboardEventTarget:e,logos:i,overlays:t,Up:s,values:o}}(t);this.Cf=void 0!==t.loadTilesWhileAnimating&&t.loadTilesWhileAnimating,this.Df=void 0!==t.loadTilesWhileInteracting&&t.loadTilesWhileInteracting,this.If=void 0!==t.pixelRatio?t.pixelRatio:ni,this.yf=e.logos,this.pa=function(){this.j=void 0,this.Sp.call(this,Date.now())}.bind(this),this.Yb=ms(),this.Jf=ms(),this.ad=0,this.I=this.R=this.T=this.g=this.c=null,this.a=document.createElement("DIV"),this.a.className="ol-viewport"+(li?" ol-touch":""),this.a.style.position="relative",this.a.style.overflow="hidden",this.a.style.width="100%",this.a.style.height="100%",this.a.style.msTouchAction="none",this.a.style.touchAction="none",this.C=document.createElement("DIV"),this.C.className="ol-overlaycontainer",this.a.appendChild(this.C),this.D=document.createElement("DIV"),this.D.className="ol-overlaycontainer-stopevent";for(var o,i="click dblclick mousedown touchstart MSPointerDown pointerdown mousewheel wheel".split(" "),r=0,n=i.length;r<n;++r)d(this.D,i[r],to);for(o in this.a.appendChild(this.D),this.Sa=new Xi(this,t.moveTolerance),bi)d(this.Sa,bi[o],this.Ih,this);this.va=e.keyboardEventTarget,this.u=null,d(this.a,"wheel",this.ld,this),d(this.a,"mousewheel",this.ld,this),this.l=e.controls,this.o=e.interactions,this.v=e.overlays,this.rg={},this.B=new e.Up(this.a,this),this.na=null,this.xb=[],this.$a=new qi(this.ql.bind(this),this.Wl.bind(this)),this.fa={},d(this,so("layergroup"),this.El,this),d(this,so("view"),this.Xl,this),d(this,so("size"),this.Tl,this),d(this,so("target"),this.Vl,this),this.H(e.values),this.l.forEach(function(t){t.setMap(this)},this),d(this.l,"add",function(t){t.element.setMap(this)},this),d(this.l,"remove",function(t){t.element.setMap(null)},this),this.o.forEach(function(t){t.setMap(this)},this),d(this.o,"add",function(t){t.element.setMap(this)},this),d(this.o,"remove",function(t){t.element.setMap(null)},this),this.v.forEach(this.kh,this),d(this.v,"add",function(t){this.kh(t.element)},this),d(this.v,"remove",function(t){var e=t.element.g;void 0!==e&&delete this.rg[e.toString()],t.element.setMap(null)},this)}function fh(t){ro.call(this),this.g=t.id,this.l=void 0===t.insertFirst||t.insertFirst,this.v=void 0===t.stopEvent||t.stopEvent,this.c=document.createElement("DIV"),this.c.className="ol-overlay-container ol-selectable",this.c.style.position="absolute",this.autoPan=void 0!==t.autoPan&&t.autoPan,this.j=t.autoPanAnimation||{},this.o=void 0!==t.autoPanMargin?t.autoPanMargin:20,this.a={re:"",Ie:"",nf:"",vf:"",visible:!0},this.f=null,d(this,so(vh),this.zl,this),d(this,so(bh),this.Jl,this),d(this,so(mh),this.Nl,this),d(this,so(wh),this.Pl,this),d(this,so(xh),this.Ql,this),void 0!==t.element&&this.lj(t.element),this.rj(void 0!==t.offset?t.offset:[0,0]),this.uj(void 0!==t.positioning?t.positioning:"top-left"),void 0!==t.position&&this.Ne(t.position)}function yh(t,e){var o=t.getBoundingClientRect();return[t=o.left+window.pageXOffset,o=o.top+window.pageYOffset,t+e[0],o+e[1]]}function gh(t,e){t.a.visible!==e&&(t.c.style.display=e?"":"none",t.a.visible=e)}function dh(t){var e,o,i,r,n=t.Me(),s=t.Yh();n&&n.c&&s?(s=n.Ja(s),e=n.Ob(),n=t.c.style,r=t.Dh(),o=t.Eh(),gh(t,!0),i=r[0],r=r[1],"bottom-right"==o||"center-right"==o||"top-right"==o?(""!==t.a.Ie&&(t.a.Ie=n.left=""),i=Math.round(e[0]-s[0]-i)+"px",t.a.nf!=i&&(t.a.nf=n.right=i)):(""!==t.a.nf&&(t.a.nf=n.right=""),"bottom-center"!=o&&"center-center"!=o&&"top-center"!=o||(i-=t.c.offsetWidth/2),i=Math.round(s[0]+i)+"px",t.a.Ie!=i&&(t.a.Ie=n.left=i)),"bottom-left"==o||"bottom-center"==o||"bottom-right"==o?(""!==t.a.vf&&(t.a.vf=n.top=""),s=Math.round(e[1]-s[1]-r)+"px",t.a.re!=s&&(t.a.re=n.bottom=s)):(""!==t.a.re&&(t.a.re=n.bottom=""),"center-left"!=o&&"center-center"!=o&&"center-right"!=o||(r-=t.c.offsetHeight/2),s=Math.round(s[1]+r)+"px",t.a.vf!=s&&(t.a.vf=n.top=s))):gh(t,!1)}e(u,ro),(r=u.prototype).kk=function(t){this.l.push(t)},r.lk=function(t){this.o.push(t)},r.ih=function(t){this.Kc().qd().push(t)},r.jh=function(t){this.v.push(t)},r.kh=function(t){var e=t.g;void 0!==e&&(this.rg[e.toString()]=t),t.setMap(this)},r.ka=function(){$e(this.Sa),$e(this.B),He(this.a,"wheel",this.ld,this),He(this.a,"mousewheel",this.ld,this),this.f&&(window.removeEventListener("resize",this.f,!1),this.f=void 0),this.j&&(cancelAnimationFrame(this.j),this.j=void 0),this.Le(null),ro.prototype.ka.call(this)},r.we=function(t,e,o){if(this.c)return t=this.Wa(t),this.B.Ea(t,this.c,void 0!==(o=o||{}).hitTolerance?o.hitTolerance*this.c.pixelRatio:0,e,null,o.layerFilter||cr,null)},r.Im=function(t,e,o,i,r){if(this.c)return this.B.Di(t,this.c,e,void 0!==o?o:null,i||cr,void 0!==r?r:null)},r.Yl=function(t,e){return!!this.c&&(t=this.Wa(t),this.B.Ei(t,this.c,void 0!==(e=e||{}).hitTolerance?e.hitTolerance*this.c.pixelRatio:0,e.layerFilter||cr,null))},r.Tf=function(t){return this.Wa(this.xe(t))},r.xe=function(t){var e=this.a.getBoundingClientRect();return[(t=t.changedTouches?t.changedTouches[0]:t).clientX-e.left,t.clientY-e.top]},r.ag=function(){return this.get("target")},r.jd=function(){var t=this.ag();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},r.Wa=function(t){var e=this.c;return e?Ps(e.pixelToCoordinateTransform,t.slice()):null},r.Lk=function(){return this.l},r.fl=function(){return this.v},r.el=function(t){return void 0!==(t=this.rg[t.toString()])?t:null},r.Sk=function(){return this.o},r.Kc=function(){return this.get("layergroup")},r.Xh=function(){return this.Kc().qd()},r.Ja=function(t){var e=this.c;return e?Ps(e.coordinateToPixelTransform,t.slice(0,2)):null},r.Ob=function(){return this.get("size")},r.Z=function(){return this.get("view")},r.sl=function(){return this.a},r.ql=function(t,e,o,i){var r=this.c;return r&&e in r.wantedTiles&&r.wantedTiles[e][t.bb()]?(t=o[0]-r.focus[0],o=o[1]-r.focus[1],65536*Math.log(i)+Math.sqrt(t*t+o*o)/i):1/0},r.ld=function(t,e){t=new _o(e||t.type,this,t),this.Ih(t)},r.Ih=function(t){if(this.c){this.na=t.coordinate,t.frameState=this.c;var e,o=this.o.a;if(!1!==this.b(t))for(e=o.length-1;0<=e;e--){var i=o[e];if(i.c()&&!i.handleEvent(t))break}}},r.Rl=function(){var t,e,o,i=this.c,r=this.$a;for(r.b.length&&(e=t=16,i&&((o=i.viewHints)[0]&&(t=this.Cf?8:0,e=2),o[1])&&(t=this.Df?8:0,e=2),r.j<t)&&(Hi(r),Ji(r,t,e)),t=0,e=(r=this.xb).length;t<e;++t)r[t](this,i);r.length=0},r.Tl=function(){this.render()},r.Vl=function(){var t;if(this.ag()&&(t=this.jd()),this.u){for(var e=0,o=this.u.length;e<o;++e)qe(this.u[e]);this.u=null}t?(t.appendChild(this.a),t=this.va||t,this.u=[d(t,"keydown",this.ld,this),d(t,"keypress",this.ld,this)],this.f||(this.f=this.Ad.bind(this),window.addEventListener("resize",this.f,!1))):(Eo(this.a),this.f&&(window.removeEventListener("resize",this.f,!1),this.f=void 0)),this.Ad()},r.Wl=function(){this.render()},r.Lh=function(){this.render()},r.Xl=function(){this.T&&(qe(this.T),this.T=null),this.R&&(qe(this.R),this.R=null);var t=this.Z();t&&(this.a.setAttribute("data-view",U(t)),this.T=d(t,"propertychange",this.Lh,this),this.R=d(t,"change",this.Lh,this)),this.render()},r.El=function(){this.I&&(this.I.forEach(qe),this.I=null);var t=this.Kc();t&&(this.I=[d(t,"propertychange",this.render,this),d(t,"change",this.render,this)]),this.render()},r.Tp=function(){this.j&&cancelAnimationFrame(this.j),this.pa()},r.render=function(){void 0===this.j&&(this.j=requestAnimationFrame(this.pa))},r.Mp=function(t){return this.l.remove(t)},r.Np=function(t){return this.o.remove(t)},r.Pp=function(t){return this.Kc().qd().remove(t)},r.Qp=function(t){return this.v.remove(t)},r.Sp=function(t){var e=this.Ob(),o=this.Z(),i=vt(),r=this.c,n=null;if(void 0!==e&&0<e[0]&&0<e[1]&&o&&rn(o)){for(var n=on(o,this.c?this.c.viewHints:void 0),s=this.Kc().Yf(),a={},p=0,h=s.length;p<h;++p)a[U(s[p].layer)]=s[p];p=o.getState(),n={animate:!1,attributions:{},coordinateToPixelTransform:this.Yb,extent:i,focus:this.na||p.center,index:this.ad++,layerStates:a,layerStatesArray:s,logos:Xt({},this.yf),pixelRatio:this.If,pixelToCoordinateTransform:this.Jf,postRenderFunctions:[],size:e,skippedFeatureUids:this.fa,tileQueue:this.$a,time:t,usedTiles:{},viewState:p,viewHints:n,wantedTiles:{}}}n&&(n.extent=Rt(p.center,p.resolution,p.rotation,n.size,i)),this.c=n,this.B.Jg(n),n&&(n.animate&&this.render(),Array.prototype.push.apply(this.xb,n.postRenderFunctions),!r||this.g&&(Ut(this.g)||St(n.extent,this.g))||(this.b(new Jo("movestart",this,r)),this.g=mt(this.g)),!this.g||n.viewHints[0]||n.viewHints[1]||St(n.extent,this.g)||(this.b(new Jo("moveend",this,n)),ut(n.extent,this.g))),this.b(new Jo("postrender",this,n)),setTimeout(this.Rl.bind(this),0)},r.qj=function(t){this.set("layergroup",t)},r.Qg=function(t){this.set("size",t)},r.Le=function(t){this.set("target",t)},r.iq=function(t){this.set("view",t)},r.xj=function(t){t=U(t).toString(),this.fa[t]=!0,this.render()},r.Ad=function(){var t,e=this.jd();e?(t=getComputedStyle(e),this.Qg([e.offsetWidth-parseFloat(t.borderLeftWidth)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)-parseFloat(t.borderRightWidth),e.offsetHeight-parseFloat(t.borderTopWidth)-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)-parseFloat(t.borderBottomWidth)])):this.Qg(void 0)},r.Cj=function(t){t=U(t).toString(),delete this.fa[t],this.render()},e(fh,ro),(r=fh.prototype).Rd=function(){return this.get(vh)},r.Jm=function(){return this.g},r.Me=function(){return this.get(bh)},r.Dh=function(){return this.get(mh)},r.Yh=function(){return this.get(wh)},r.Eh=function(){return this.get(xh)},r.zl=function(){for(var t=this.c;t.lastChild;)t.removeChild(t.lastChild);(t=this.Rd())&&this.c.appendChild(t)},r.Jl=function(){this.f&&(Eo(this.c),qe(this.f),this.f=null);var t=this.Me();t&&(this.f=d(t,"postrender",this.render,this),dh(this),t=this.v?t.D:t.C,this.l?t.insertBefore(this.c,t.childNodes[0]||null):t.appendChild(this.c))},r.render=function(){dh(this)},r.Nl=function(){dh(this)},r.Pl=function(){var t,e,o,i,r,n,s;dh(this),this.get(wh)&&this.autoPan&&(t=this.Me())&&t.jd()&&(e=yh(t.jd(),t.Ob()),o=(s=this.Rd()).offsetWidth,r=getComputedStyle(s),o+=parseInt(r.marginLeft,10)+parseInt(r.marginRight,10),r=s.offsetHeight,i=getComputedStyle(s),n=yh(s,[o,r=r+(parseInt(i.marginTop,10)+parseInt(i.marginBottom,10))]),s=this.o,yt(e,n)||(o=n[0]-e[0],r=e[2]-n[2],i=n[1]-e[1],n=e[3]-n[3],e=[0,0],o<0?e[0]=o-s:r<0&&(e[0]=Math.abs(r)+s),i<0?e[1]=i-s:n<0&&(e[1]=Math.abs(n)+s),0===e[0]&&0===e[1])||(s=t.Z().wa(),e=[(s=t.Ja(s))[0]+e[0],s[1]+e[1]],t.Z().animate({center:t.Wa(e),duration:this.j.duration,easing:this.j.easing})))},r.Ql=function(){dh(this)},r.lj=function(t){this.set(vh,t)},r.setMap=function(t){this.set(bh,t)},r.rj=function(t){this.set(mh,t)},r.Ne=function(t){this.set(wh,t)},r.uj=function(t){this.set(xh,t)};var vh="element",bh="map",mh="offset",wh="position",xh="positioning";function Sh(t){function e(t){t=a.Tf(t),p.a.Z().ob(t),window.removeEventListener("mousemove",o),window.removeEventListener("mouseup",e)}function o(t){t=a.Tf({clientX:t.clientX-l.offsetWidth/2,clientY:t.clientY+l.offsetHeight/2}),h.Ne(t)}this.j=void 0===(t=t||{}).collapsed||t.collapsed,this.o=void 0===t.collapsible||t.collapsible,this.o||(this.j=!1);var i=void 0!==t.className?t.className:"ol-overviewmap",r=void 0!==t.tipLabel?t.tipLabel:"Overview map",n=void 0!==t.collapseLabel?t.collapseLabel:"«",s=("string"==typeof n?(this.u=document.createElement("span"),this.u.textContent=n):this.u=n,"string"==typeof(n=void 0!==t.label?t.label:"»")?(this.D=document.createElement("span"),this.D.textContent=n):this.D=n,this.o&&!this.j?this.u:this.D),a=((n=document.createElement("button")).setAttribute("type","button"),n.title=r,n.appendChild(s),d(n,"click",this.an,this),this.C=document.createElement("DIV"),this.C.className="ol-overviewmap-map",this.c=new u({controls:new ho,interactions:new ho,view:t.view})),p=(t.layers&&t.layers.forEach(function(t){a.ih(t)},this),(r=document.createElement("DIV")).className="ol-overviewmap-box",r.style.boxSizing="border-box",this.l=new fh({position:[0,0],positioning:"bottom-left",element:r}),this.c.jh(this.l),(r=document.createElement("div")).className=i+" ol-unselectable ol-control"+(this.j&&this.o?" ol-collapsed":"")+(this.o?"":" ol-uncollapsible"),r.appendChild(this.C),r.appendChild(n),To.call(this,{element:r,render:t.render||Mh,target:t.target}),this),h=this.l,l=this.l.Rd();l.addEventListener("mousedown",function(){window.addEventListener("mousemove",o),window.addEventListener("mouseup",e)})}function Mh(){var t,e,o,i,r=this.a,n=this.c;r.c&&n.c&&(t=r.Ob(),r=r.Z().dd(t),i=n.Ob(),t=n.Z().dd(i),e=n.Ja(Ft(r)),o=n.Ja(Ct(r)),n=Math.abs(e[0]-o[0]),e=Math.abs(e[1]-o[1]),o=i[0],i=i[1],n<.1*o||e<.1*i||.75*o<n||.75*i<e?Ph(this):yt(t,r)||(r=this.c,t=this.a.Z(),r.Z().ob(t.wa()))),Ah(this)}function Ph(t){var e=t.a,o=(t=t.c,e.Ob()),e=e.Z().dd(o);t=t.Z(),Gt(e,1/(.1*Math.pow(2,Math.log(7.5)/Math.LN2/2))),t.Qf(e)}function Ah(t){var e,o,i,r,n,s,a=t.a,p=t.c;a.c&&p.c&&(i=a.Ob(),r=a.Z(),n=p.Z(),p=r.Qa(),a=t.l,e=t.l.Rd(),o=r.dd(i),i=n.Pa(),r=jt(o),n=kt(o),(t=t.a.Z().wa())&&(sr(s=[r[0]-t[0],r[1]-t[1]],p),er(s,t)),a.Ne(s),e)&&(e.style.width=Math.abs((r[0]-n[0])/i)+"px",e.style.height=Math.abs((n[1]-r[1])/i)+"px")}function Eh(t){t.element.classList.toggle("ol-collapsed"),t.j?Ao(t.u,t.D):Ao(t.D,t.u),t.j=!t.j;var e=t.c;t.j||e.c||(e.Ad(),Ph(t),Ye(e,"postrender",function(){Ah(this)},t))}function Th(t){var e=void 0!==(t=t||{}).className?t.className:"ol-scale-line";this.o=document.createElement("DIV"),this.o.className=e+"-inner",this.c=document.createElement("DIV"),this.c.className=e+" ol-unselectable",this.c.appendChild(this.o),this.u=null,this.l=void 0!==t.minWidth?t.minWidth:64,this.j=!1,this.B=void 0,this.D="",To.call(this,{element:this.c,render:t.render||Ch,target:t.target}),d(this,so(Rh),this.T,this),this.I(t.units||"metric")}e(Sh,To),(r=Sh.prototype).setMap=function(t){var e=this.a;t!==e&&(e&&((e=e.Z())&&He(e,so("rotation"),this.Ge,this),this.c.Le(null)),To.prototype.setMap.call(this,t),t)&&(this.c.Le(this.C),this.v.push(d(t,"propertychange",this.Kl,this)),this.c.Xh().dc()||this.c.qj(t.Kc()),t=t.Z())&&(d(t,so("rotation"),this.Ge,this),rn(t)&&(this.c.Ad(),Ph(this)))},r.Kl=function(t){"view"===t.key&&((t=t.oldValue)&&He(t,so("rotation"),this.Ge,this),d(t=this.a.Z(),so("rotation"),this.Ge,this))},r.Ge=function(){this.c.Z().Oe(this.a.Z().Qa())},r.an=function(t){t.preventDefault(),Eh(this)},r.$m=function(){return this.o},r.cn=function(t){this.o!==t&&(this.o=t,this.element.classList.toggle("ol-uncollapsible"),!t)&&this.j&&Eh(this)},r.bn=function(t){this.o&&this.j!==t&&Eh(this)},r.Zm=function(){return this.j},r.gl=function(){return this.c},e(Th,To);var jh=[1,2,5];function Ch(t){(t=t.frameState)?this.u=t.viewState:this.u=null,Lh(this)}function Lh(t){if(o=t.u){var e=(i=o.projection).sc(),o=ce(i,o.resolution,o.center)*e,e=t.l*o,i="";"degrees"==(n=t.C())?(o/=i=Yt.degrees,e<i/60?(i="″",o*=3600):e<i?(i="′",o*=60):i="°"):"imperial"==n?e<.9144?(i="in",o/=.0254):e<1609.344?(i="ft",o/=.3048):(i="mi",o/=1609.344):"nautical"==n?(o/=1852,i="nm"):"metric"==n?e<.001?(i="μm",o*=1e6):e<1?(i="mm",o*=1e3):e<1e3?i="m":(i="km",o/=1e3):"us"==n?e<.9144?(i="in",o*=39.37):e<1609.344?(i="ft",o/=.30480061):(i="mi",o/=1609.3472):O(!1,33);for(var r,n=3*Math.floor(Math.log(t.l*o)/Math.log(10));;){if(r=jh[(n%3+3)%3]*Math.pow(10,Math.floor(n/3)),e=Math.round(r/o),isNaN(e))return t.c.style.display="none",void(t.j=!1);if(e>=t.l)break;++n}t.D!=(o=r+" "+i)&&(t.o.innerHTML=o,t.D=o),t.B!=e&&(t.o.style.width=e+"px",t.B=e),t.j||(t.c.style.display="",t.j=!0)}else t.j&&(t.c.style.display="none",t.j=!1)}Th.prototype.C=function(){return this.get(Rh)},Th.prototype.T=function(){Lh(this)},Th.prototype.I=function(t){this.set(Rh,t)};var Rh="units";function Ih(t){t=t||{},this.c=void 0,this.j=Nh,this.D=this.l=0,this.I=null,this.na=!1,this.T=void 0!==t.duration?t.duration:200;var e=void 0!==t.className?t.className:"ol-zoomslider",o=document.createElement("button"),i=(o.setAttribute("type","button"),o.className=e+"-thumb ol-unselectable",document.createElement("div"));i.className=e+" ol-unselectable ol-control",i.appendChild(o),this.o=new Ii(i),d(this.o,"pointerdown",this.yl,this),d(this.o,"pointermove",this.wl,this),d(this.o,"pointerup",this.xl,this),d(i,"click",this.vl,this),d(o,"click",to),To.call(this,{element:i,render:t.render||Fh})}e(Ih,To),Ih.prototype.ka=function(){$e(this.o),To.prototype.ka.call(this)};var Nh=0;function Fh(t){var e,o,i,r,n;t.frameState&&(this.na||(e=(r=this.element).offsetWidth,o=r.offsetHeight,n=r.firstElementChild,i=getComputedStyle(n),r=n.offsetWidth+parseFloat(i.marginRight)+parseFloat(i.marginLeft),n=n.offsetHeight+parseFloat(i.marginTop)+parseFloat(i.marginBottom),this.I=[r,n],o<e?(this.j=1,this.D=e-r):(this.j=Nh,this.l=o-n),this.na=!0),(t=t.frameState.viewState.resolution)!==this.c)&&(this.c=t,kh(this,t))}function kh(t,e){e=1-(r=t.a.Z(),o=r.a,i=Math.log(o/r.f)/Math.log(2),function(t){return Math.log(o/t)/Math.log(2)/i}(e));var o,i,r=t.element.firstElementChild;1==t.j?r.style.left=t.D*e+"px":r.style.top=t.l*e+"px"}function Dh(t,e){t=t.a.Z(),o=t.a,t=Math.log(o/t.f)/Math.log(2);var o,e=1-e;return o/Math.pow(2,e*t)}function Oh(t){this.c=(t=t||{}).extent||null;var e=void 0!==t.className?t.className:"ol-zoom-extent",o=void 0!==t.label?t.label:"E",i=void 0!==t.tipLabel?t.tipLabel:"Fit to extent",r=document.createElement("button");r.setAttribute("type","button"),r.title=i,r.appendChild("string"==typeof o?document.createTextNode(o):o),d(r,"click",this.j,this),(o=document.createElement("div")).className=e+" ol-unselectable ol-control",o.appendChild(r),To.call(this,{element:o,target:t.target})}function Uh(t){ro.call(this),t=t||{},this.a=null,d(this,so(Wh),this.vm,this),this.gg(void 0!==t.tracking&&t.tracking)}(r=Ih.prototype).setMap=function(t){To.prototype.setMap.call(this,t),t&&t.render()},r.vl=function(t){var e=this.a.Z();t=Dh(this,Q(1===this.j?(t.offsetX-this.I[0]/2)/this.D:(t.offsetY-this.I[1]/2)/this.l,0,1)),e.animate({resolution:e.constrainResolution(t),duration:this.T,easing:Io})},r.yl=function(t){this.u||t.b.target!==this.element.firstElementChild||(nn(this.a.Z(),1,1),this.C=t.clientX,this.B=t.clientY,this.u=!0)},r.wl=function(t){var e;this.u&&(e=this.element.firstElementChild,this.c=Dh(this,Q(1===this.j?(t.clientX-this.C+parseInt(e.style.left,10))/this.D:(t.clientY-this.B+parseInt(e.style.top,10))/this.l,0,1)),this.a.Z().Vc(this.c),kh(this,this.c),this.C=t.clientX,this.B=t.clientY)},r.xl=function(){var t;this.u&&(nn(t=this.a.Z(),1,-1),t.animate({resolution:t.constrainResolution(this.c),duration:this.T,easing:Io}),this.u=!1,this.B=this.C=void 0)},e(Oh,To),Oh.prototype.j=function(t){t.preventDefault(),t=this.a.Z();var e=this.c||t.v.G();t.Qf(e)},e(Uh,ro),(r=Uh.prototype).ka=function(){this.gg(!1),ro.prototype.ka.call(this)},r.ap=function(t){var e;null!==t.alpha&&(e=it(t.alpha),this.set(Gh,e),"boolean"==typeof t.absolute&&t.absolute?this.set(Vh,e):"number"==typeof t.webkitCompassHeading&&-1!=t.webkitCompassAccuracy&&this.set(Vh,it(t.webkitCompassHeading))),null!==t.beta&&this.set(Bh,it(t.beta)),null!==t.gamma&&this.set(Xh,it(t.gamma)),this.s()},r.Fk=function(){return this.get(Gh)},r.Ik=function(){return this.get(Bh)},r.Ok=function(){return this.get(Xh)},r.um=function(){return this.get(Vh)},r.Th=function(){return this.get(Wh)},r.vm=function(){var t;pi&&((t=this.Th())&&!this.a?this.a=d(window,"deviceorientation",this.ap,this):t||null===this.a||(qe(this.a),this.a=null))},r.gg=function(t){this.set(Wh,t)};var Gh="alpha",Bh="beta",Xh="gamma",Vh="heading",Wh="tracking";function Zh(t){this.f=t.opacity,this.l=t.rotateWithView,this.g=t.rotation,this.a=t.scale,this.v=t.snapToPixel}function Kh(t){this.D=this.u=this.c=null,this.Va=void 0!==t.fill?t.fill:null,this.oa=[0,0],this.o=t.points,this.b=void 0!==t.radius?t.radius:t.radius1,this.i=t.radius2,this.j=void 0!==t.angle?t.angle:0,this.Ya=void 0!==t.stroke?t.stroke:null,this.B=this.ra=this.C=null,this.S=t.atlasManager,zh(this,this.S),Zh.call(this,{opacity:1,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,rotation:void 0!==t.rotation?t.rotation:0,scale:1,snapToPixel:void 0===t.snapToPixel||t.snapToPixel})}function zh(t,e){var o,i,r="",n="",s=0,a=null,p=0,h=(t.Ya&&(o=Mo(o=null===(o=t.Ya.a)?Gs:o),void 0===(p=t.Ya.c)&&(p=1),a=t.Ya.i,si||(a=null),void 0===(n=t.Ya.j)&&(n="round"),void 0===(r=t.Ya.f)&&(r="round"),void 0===(s=t.Ya.o))&&(s=10),2*(t.b+p)+1),r={strokeStyle:o,zj:p,size:h,lineCap:r,lineDash:a,lineJoin:n,miterLimit:s};void 0===e?(i=Po(h,h),t.u=i.canvas,e=h=t.u.width,t.rh(r,i,0,0),t.Va?t.D=t.u:(i=Po(r.size,r.size),t.D=i.canvas,t.qh(r,i,0,0))):(h=Math.round(h),(n=!t.Va)&&(i=t.qh.bind(t,r)),s=t.Ya?(void 0===(s=t.Ya).b&&(s.b="s",s.b=s.a?"string"==typeof s.a?s.b+s.a:s.b+U(s.a).toString():s.b+"-",s.b+=","+(void 0!==s.f?s.f.toString():"-")+","+(s.i?s.i.toString():"-")+","+(void 0!==s.g?s.g:"-")+","+(void 0!==s.j?s.j:"-")+","+(void 0!==s.o?s.o.toString():"-")+","+(void 0!==s.c?s.c.toString():"-")),s.b):"-",a=t.Va?(void 0===(a=t.Va).a&&(a.a=a.b instanceof CanvasPattern||a.b instanceof CanvasGradient?U(a.b).toString():"f"+(a.b?bo(a.b):"-")),a.a):"-",t.c&&s==t.c[1]&&a==t.c[2]&&t.b==t.c[3]&&t.i==t.c[4]&&t.j==t.c[5]&&t.o==t.c[6]||(t.c=["r"+s+a+(void 0!==t.b?t.b.toString():"-")+(void 0!==t.i?t.i.toString():"-")+(void 0!==t.j?t.j.toString():"-")+(void 0!==t.o?t.o.toString():"-"),s,a,t.b,t.i,t.j,t.o]),i=e.add(t.c[0],h,h,t.rh.bind(t,r),i),t.u=i.image,t.oa=[i.offsetX,i.offsetY],e=i.image.width,t.D=n?i.Zl:t.u),t.C=[h/2,h/2],t.ra=[h,h],t.B=[e,e]}function Yh(t){Kh.call(this,{points:1/0,fill:(t=t||{}).fill,radius:t.radius,snapToPixel:t.snapToPixel,stroke:t.stroke,atlasManager:t.atlasManager})}function Hh(t){this.b=void 0!==(t=t||{}).color?t.color:null,this.a=void 0}function qh(t){t=t||{},this.Gc=null,this.Za=tl,void 0!==t.geometry&&this.Ra(t.geometry),this.Va=void 0!==t.fill?t.fill:null,this.M=void 0!==t.image?t.image:null,this.Ya=void 0!==t.stroke?t.stroke:null,this.Ia=void 0!==t.text?t.text:null,this.Fj=t.zIndex}function Jh(t){var e;return"function"!=typeof t&&(e=Array.isArray(t)?t:(O(t instanceof qh,41),[t]),t=function(){return e}),t}(r=Zh.prototype).Ze=function(){return this.f},r.$e=function(){return this.l},r.af=function(){return this.g},r.bf=function(){return this.a},r.Ae=function(){return this.v},r.td=function(t){this.f=t},r.cf=function(t){this.g=t},r.ud=function(t){this.a=t},e(Kh,Zh),(r=Kh.prototype).clone=function(){var t=new Kh({fill:this.Fa()?this.Fa().clone():void 0,points:this.o,radius:this.b,radius2:this.i,angle:this.j,snapToPixel:this.v,stroke:this.Ga()?this.Ga().clone():void 0,rotation:this.g,rotateWithView:this.l,atlasManager:this.S});return t.td(this.f),t.ud(this.a),t},r.Hc=function(){return this.C},r.Pi=function(){return this.j},r.Fa=function(){return this.Va},r.qg=function(){return this.D},r.Y=function(){return this.u},r.ye=function(){return this.B},r.Ye=function(){return 2},r.Oc=function(){return this.oa},r.Qi=function(){return this.o},r.Ri=function(){return this.b},r.Fh=function(){return this.i},r.ic=function(){return this.ra},r.Ga=function(){return this.Ya},r.Nh=function(){},r.load=function(){},r.Bj=function(){},r.rh=function(t,e,o,i){e.setTransform(1,0,0,1,0,0),e.translate(o,i),e.beginPath();var r=this.o;if(1/0===r)e.arc(t.size/2,t.size/2,this.b,0,2*Math.PI,!0);else{var n=void 0!==this.i?this.i:this.b;for(n!==this.b&&(r*=2),o=0;o<=r;o++){i=2*o*Math.PI/r-Math.PI/2+this.j;var s=o%2?n:this.b;e.lineTo(t.size/2+s*Math.cos(i),t.size/2+s*Math.sin(i))}}this.Va&&(o=this.Va.b,e.fillStyle=Mo(o=null===o?Os:o),e.fill()),this.Ya&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.zj,t.lineDash&&e.setLineDash(t.lineDash),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke()),e.closePath()},r.qh=function(t,e,o,i){var r;if(e.setTransform(1,0,0,1,0,0),e.translate(o,i),e.beginPath(),1/0===(o=this.o))e.arc(t.size/2,t.size/2,this.b,0,2*Math.PI,!0);else for((i=void 0!==this.i?this.i:this.b)!==this.b&&(o*=2),r=0;r<=o;r++){var n=2*r*Math.PI/o-Math.PI/2+this.j,s=r%2?i:this.b;e.lineTo(t.size/2+s*Math.cos(n),t.size/2+s*Math.sin(n))}e.fillStyle=Os,e.fill(),this.Ya&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.zj,t.lineDash&&e.setLineDash(t.lineDash),e.stroke()),e.closePath()},e(Yh,Kh),Yh.prototype.clone=function(){var t=new Yh({fill:this.Fa()?this.Fa().clone():void 0,stroke:this.Ga()?this.Ga().clone():void 0,radius:this.b,snapToPixel:this.v,atlasManager:this.S});return t.td(this.f),t.ud(this.a),t},Yh.prototype.Uc=function(t){this.b=t,zh(this,this.S)},Hh.prototype.clone=function(){var t=this.b;return new Hh({color:t&&t.slice?t.slice():t||void 0})},Hh.prototype.i=function(){return this.b},Hh.prototype.c=function(t){this.b=t,this.a=void 0},(r=qh.prototype).clone=function(){var t=this.V();return new qh({geometry:t=t&&t.clone?t.clone():t,fill:this.Fa()?this.Fa().clone():void 0,image:this.Y()?this.Y().clone():void 0,stroke:this.Ga()?this.Ga().clone():void 0,text:this.Na()?this.Na().clone():void 0,zIndex:this.Ba()})},r.V=function(){return this.Gc},r.Pk=function(){return this.Za},r.Fa=function(){return this.Va},r.pf=function(t){this.Va=t},r.Y=function(){return this.M},r.Og=function(t){this.M=t},r.Ga=function(){return this.Ya},r.qf=function(t){this.Ya=t},r.Na=function(){return this.Ia},r.xd=function(t){this.Ia=t},r.Ba=function(){return this.Fj},r.Ra=function(e){this.Za="function"==typeof e?e:"string"==typeof e?function(t){return t.get(e)}:e?function(){return e}:tl,this.Gc=e},r.Vb=function(t){this.Fj=t};var _h=null;function $h(){var t,e;return _h||(t=new Hh({color:"rgba(255,255,255,0.4)"}),e=new hp({color:"#3399CC",width:1.25}),_h=[new qh({image:new Yh({fill:t,stroke:e,radius:5}),fill:t,stroke:e})]),_h}function Qh(){var t={},e=[255,255,255,1],o=[0,153,255,1];return t.Polygon=[new qh({fill:new Hh({color:[255,255,255,.5]})})],t.MultiPolygon=t.Polygon,t.LineString=[new qh({stroke:new hp({color:e,width:5})}),new qh({stroke:new hp({color:o,width:3})})],t.MultiLineString=t.LineString,t.Circle=t.Polygon.concat(t.LineString),t.Point=[new qh({image:new Yh({radius:6,fill:new Hh({color:o}),stroke:new hp({color:e,width:1.5})}),zIndex:1/0})],t.MultiPoint=t.Point,t.GeometryCollection=t.Polygon.concat(t.LineString,t.Point),t}function tl(t){return t.V()}function x(t){ro.call(this),this.a=void 0,this.c="geometry",this.g=null,this.j=void 0,this.f=null,d(this,so(this.c),this.Ee,this),void 0!==t&&(t instanceof yr||!t?this.Ra(t):this.H(t))}e(x,ro),(r=x.prototype).clone=function(){var t=new x(this.N()),e=(t.Tc(this.c),this.V());return e&&t.Ra(e.clone()),(e=this.g)&&t.hg(e),t},r.V=function(){return this.get(this.c)},r.wm=function(){return this.a},r.Qk=function(){return this.c},r.xm=function(){return this.g},r.Lc=function(){return this.j},r.Al=function(){this.s()},r.Ee=function(){this.f&&(qe(this.f),this.f=null);var t=this.V();t&&(this.f=d(t,"change",this.Al,this)),this.s()},r.Ra=function(t){this.set(this.c,t)},r.hg=function(t){this.j=(this.g=t)?function(e){var t;{var o;t="function"==typeof e?2==e.length?function(t){return e(this,t)}:e:(o=Array.isArray(e)?e:(O(e instanceof qh,41),[e]),function(){return o})}return t}(t):void 0,this.s()},r.jc=function(t){this.a=t,this.s()},r.Tc=function(t){He(this,so(this.c),this.Ee,this),this.c=t,d(this,so(this.c),this.Ee,this),this.Ee()};var el=document.implementation.createDocument("","",null);function ol(t,e){return el.createElementNS(t,e)}function il(t,e){return function t(e,o,i){if(e.nodeType==Node.CDATA_SECTION_NODE||e.nodeType==Node.TEXT_NODE)o?i.push(String(e.nodeValue).replace(/(\r\n|\r|\n)/g,"")):i.push(e.nodeValue);else for(e=e.firstChild;e;e=e.nextSibling)t(e,o,i);return i}(t,e,[]).join("")}function rl(t){return t instanceof Document}function nl(t){return t instanceof Node}function sl(t){return(new DOMParser).parseFromString(t,"application/xml")}function al(o,i){return function(t,e){void 0!==(t=o.call(i,t,e))&&X(e[e.length-1],t)}}function pl(o,i){return function(t,e){void 0!==(t=o.call(void 0!==i?i:this,t,e))&&e[e.length-1].push(t)}}function hl(o,i){return function(t,e){void 0!==(t=o.call(void 0!==i?i:this,t,e))&&(e[e.length-1]=t)}}function ll(i){return function(t,e){var o=i.call(this,t,e);void 0!==o&&(e=e[e.length-1],((t=t.localName)in e?e[t]:e[t]=[]).push(o))}}function o(i,r){return function(t,e){var o=i.call(this,t,e);void 0!==o&&(e[e.length-1][void 0!==r?r:t.localName]=o)}}function c(i,r){return function(t,e,o){i.call(void 0!==r?r:this,t,e,o),o[o.length-1].node.appendChild(t)}}function ul(r){var n,s;return function(t,e,o){var i;n||(n={},(i={})[t.localName]=r,n[t.namespaceURI]=i,s=cl(t.localName)),dl(n,s,e,o)}}function cl(i,r){return function(t,e,o){return t=e[e.length-1].node,void 0===(e=i)&&(e=o),ol(o=void 0===(o=r)?t.namespaceURI:r,e)}}var fl=cl();function yl(t,e){for(var o=e.length,i=Array(o),r=0;r<o;++r)i[r]=t[e[r]];return i}function l(t,e,o){o=void 0!==o?o:{};for(var i=0,r=t.length;i<r;++i)o[t[i]]=e;return o}function gl(t,e,o,i){for(e=e.firstElementChild;e;e=e.nextElementSibling){var r=t[e.namespaceURI];void 0!==r&&(r=r[e.localName])&&r.call(i,e,o)}}function g(t,e,o,i,r){return i.push(t),gl(e,o,i,r),i.pop()}function dl(t,e,o,i,r,n){for(var s,a,p=(void 0!==r?r:o).length,h=0;h<p;++h)void 0!==(s=o[h])&&void 0!==(a=e.call(n,s,i,void 0!==r?r[h]:void 0))&&t[a.namespaceURI][a.localName].call(n,a,s,i)}function vl(t,e,o,i,r,n,s){r.push(t),dl(e,o,i,r,n,s),r.pop()}function bl(r,n,s,a){return function(t,e,o){var i=new XMLHttpRequest;i.open("GET","function"==typeof r?r(t,e,o):r,!0),"arraybuffer"==n.U()&&(i.responseType="arraybuffer"),i.onload=function(){var t,e;(!i.status||200<=i.status&&i.status<300)&&("json"==(t=n.U())||"text"==t?e=i.responseText:"xml"==t?e=(e=i.responseXML)||sl(i.responseText):"arraybuffer"==t&&(e=i.response),e)?s.call(this,n.Oa(e,{featureProjection:o}),n.kb(e)):a.call(this)}.bind(this),i.onerror=function(){a.call(this)}.bind(this),i.send()}}function ml(t,e){return bl(t,e,function(t){this.cd(t)},Y)}function wl(){this.f=this.defaultDataProjection=null}function xl(t,e,o){var i;return o&&(i={dataProjection:o.dataProjection||t.kb(e),featureProjection:o.featureProjection}),Sl(t,i)}function Sl(t,e){return Xt({dataProjection:t.defaultDataProjection,featureProjection:t.f},e)}function Ml(t,e,o){var i,r=o?v(o.featureProjection):null,n=o?v(o.dataProjection):null,n=r&&n&&!be(r,n)?t instanceof yr?(e?t.clone():t).tb(e?r:n,e?n:r):Pe(t,n,r):t;return e&&o&&void 0!==o.decimals&&(i=Math.pow(10,o.decimals),(n=n===t?n.clone():n).Dc(function(t){for(var e=0,o=t.length;e<o;++e)t[e]=Math.round(t[e]*i)/i;return t})),n}function Pl(){wl.call(this)}function Al(t){return"string"==typeof t?(t=JSON.parse(t))||null:null!==t?t:null}function El(t,e,o,i,r,n){var s=NaN,a=NaN;if(1===(p=(o-e)/i))s=t[e],a=t[e+1];else if(2==p)s=(1-r)*t[e]+r*t[e+i],a=(1-r)*t[e+1]+r*t[e+i+1];else if(p){for(var a=t[e],p=t[e+1],h=0,s=[0],l=e+i;l<o;l+=i){var u=t[l],c=t[l+1],h=h+Math.sqrt((u-a)*(u-a)+(c-p)*(c-p));s.push(h),a=u,p=c}for(o=r*h,p=0,h=s.length,l=!1;p<h;)(a=+G(s[r=p+(h-p>>1)],o))<0?p=r+1:(h=r,l=!a);a=(r=l?p:~p)<0?(o=(o-s[-r-2])/(s[-r-1]-s[-r-2]),s=nt(t[e+=(-r-2)*i],t[e+i],o),nt(t[e+1],t[e+i+1],o)):(s=t[e+r*i],t[e+r*i+1])}return n?(n[0]=s,n[1]=a,n):[s,a]}function Tl(t,e,o,i,r,n){if(o==e)return null;if(r<t[e+i-1])return n?((o=t.slice(e,e+i))[i-1]=r,o):null;if(t[o-1]<r)return n?((o=t.slice(o-i,o))[i-1]=r,o):null;if(r==t[e+i-1])return t.slice(e,e+i);for(e/=i,o/=i;e<o;)r<t[((n=e+o>>1)+1)*i-1]?o=n:e=n+1;if(r==(o=t[e*i-1]))return t.slice((e-1)*i,(e-1)*i+i);var s;for(n=(r-o)/(t[(e+1)*i-1]-o),o=[],s=0;s<i-1;++s)o.push(nt(t[(e-1)*i+s],t[e*i+s],n));return o.push(r),o}function S(t,e){b.call(this),this.c=null,this.u=this.D=this.j=-1,this.ma(t,e)}function jl(t){return t.j!=t.i&&(t.c=t.wh(.5,t.c),t.j=t.i),t.c}function M(t,e){b.call(this),this.c=[],this.j=this.u=-1,this.ma(t,e)}function Cl(t){for(var e=[],o=t.A,i=0,r=t.c,n=(t=t.a,0),s=r.length;n<s;++n){var a=r[n];X(e,i=El(o,i,a,t,.5)),i=a}return e}function Ll(t,e){for(var o=t.ja,i=[],r=[],n=0,s=e.length;n<s;++n){var a=e[n];n||(o=a.ja),X(i,a.ga()),r.push(i.length)}t.ba(o,i,r)}function P(t,e){b.call(this),this.ma(t,e)}function f(t,e){b.call(this),this.c=[],this.u=-1,this.D=null,this.I=this.C=this.B=-1,this.j=null,this.ma(t,e)}function Rl(t){if(t.u!=t.i){var e=t.A,o=t.c,i=t.a,r=0,n=[],s=0;for(h=o.length;s<h;++s){var a=o[s],r=xt(e,r,a[0],i);n.push((r[0]+r[2])/2,(r[1]+r[3])/2),r=a[a.length-1]}for(e=Il(t),o=t.c,i=t.a,h=[],a=s=0,r=o.length;a<r;++a)var p=o[a],h=Ur(e,s,p,i,n,2*a,h),s=p[p.length-1];t.D=h,t.u=t.i}return t.D}function Il(t){if(t.I!=t.i){var e=t.A;t:{for(var o=t.c,i=0,r=o.length;i<r;++i)if(!Wr(e,o[i],t.a,void 0)){o=!1;break t}o=!0}o?t.j=e:(t.j=e.slice(),t.j.length=Kr(t.j,t.c,t.a)),t.I=t.i}return t.j}function Nl(t,e,o,i){br(t,e,o),t.c=i,t.s()}function Fl(t,e){for(var o=t.ja,i=[],r=[],n=0,s=e.length;n<s;++n){for(var a=e[n],p=(n||(o=a.ja),i.length),h=a.Bb(),l=0,u=h.length;l<u;++l)h[l]+=p;X(i,a.ga()),r.push(h)}Nl(t,o,i,r)}function kl(t){t=t||{},wl.call(this),this.b=t.geometryName}function Dl(t,e){if(!t)return null;if("number"==typeof t.x&&"number"==typeof t.y)var o="Point";else if(t.points)o="MultiPoint";else if(t.paths)o=1===t.paths.length?"LineString":"MultiLineString";else if(t.rings){for(var i=t.rings,r=Ol(t),n=[],s=[],o=[],a=0,p=i.length;a<p;++a)n.length=0,jr(n,0,i[a],r.length),Vr(n,0,n.length,r.length)?s.push([i[a]]):o.push(i[a]);for(;o.length;){for(i=o.shift(),r=!1,a=s.length-1;0<=a;a--)if(yt(new Fr(s[a][0]).G(),new Fr(i).G())){s[a].push(i),r=!0;break}r||s.push([i.reverse()])}t=Xt({},t),1===s.length?(o="Polygon",t.rings=s[0]):(o="MultiPolygon",t.rings=s)}return Ml((0,Gl[o])(t),!1,e)}function Ol(t){var e="XY";return!0===t.hasZ&&!0===t.hasM?e="XYZM":!0===t.hasZ?e="XYZ":!0===t.hasM&&(e="XYM"),e}function Ul(t){return{hasZ:"XYZ"===(t=t.ja)||"XYZM"===t,hasM:"XYM"===t||"XYZM"===t}}e(Pl,wl),(r=Pl.prototype).U=function(){return"json"},r.Tb=function(t,e){return this.Rc(Al(t),xl(this,t,e))},r.Oa=function(t,e){return this.yg(Al(t),xl(this,t,e))},r.Sc=function(t,e){return this.Cg(Al(t),xl(this,t,e))},r.kb=function(t){return this.Fg(Al(t))},r.Bd=function(t,e){return JSON.stringify(this.Zc(t,e))},r.Wb=function(t,e){return JSON.stringify(this.he(t,e))},r.$c=function(t,e){return JSON.stringify(this.je(t,e))},e(S,b),(r=S.prototype).mk=function(t){this.A?X(this.A,t):this.A=t.slice(),this.s()},r.clone=function(){var t=new S(null);return t.ba(this.ja,this.A.slice()),t},r.Kb=function(t,e,o,i){return i<ct(this.G(),t,e)?i:(this.u!=this.i&&(this.D=Math.sqrt(Mr(this.A,0,this.A.length,this.a,0)),this.u=this.i),Ar(this.A,0,this.A.length,this.a,this.D,!1,t,e,o,i))},r.Ck=function(t,e){return Gr(this.A,0,this.A.length,this.a,t,e)},r.nn=function(t,e){return"XYM"!=this.ja&&"XYZM"!=this.ja?null:Tl(this.A,0,this.A.length,this.a,t,void 0!==e&&e)},r.X=function(){return Lr(this.A,0,this.A.length,this.a)},r.wh=function(t,e){return El(this.A,0,this.A.length,this.a,t,e)},r.pn=function(){for(var t=this.A,e=this.a,o=t[0],i=t[1],r=0,n=0+e;n<this.A.length;n+=e)var s=t[n],a=t[n+1],r=r+Math.sqrt((s-o)*(s-o)+(a-i)*(a-i)),o=s,i=a;return r},r.hd=function(t){var e=[];return e.length=Ir(this.A,0,this.A.length,this.a,t,e,0),(t=new S(null)).ba("XY",e),t},r.U=function(){return"LineString"},r.Xa=function(t){return Br(this.A,0,this.A.length,this.a,t)},r.ma=function(t,e){t?(mr(this,e,t,1),this.A||(this.A=[]),this.A.length=jr(this.A,0,t,this.a),this.s()):this.ba("XY",null)},r.ba=function(t,e){br(this,t,e),this.s()},e(M,b),(r=M.prototype).nk=function(t){this.A?X(this.A,t.ga().slice()):this.A=t.ga().slice(),this.c.push(this.A.length),this.s()},r.clone=function(){var t=new M(null);return t.ba(this.ja,this.A.slice(),this.c.slice()),t},r.Kb=function(t,e,o,i){return i<ct(this.G(),t,e)?i:(this.j!=this.i&&(this.u=Math.sqrt(Pr(this.A,0,this.c,this.a,0)),this.j=this.i),Er(this.A,0,this.c,this.a,this.u,!1,t,e,o,i))},r.rn=function(t,e,o){if(("XYM"==this.ja||"XYZM"==this.ja)&&this.A.length){var i=this.A,r=this.c,n=this.a,s=t,a=void 0!==e&&e,p=void 0!==o&&o,h=0;if(p)return Tl(i,h,r[r.length-1],n,s,a);if(s<i[n-1])return a?((i=i.slice(0,n))[n-1]=s,i):null;if(i[i.length-1]<s)return a?((i=i.slice(i.length-n))[n-1]=s,i):null;for(a=0,p=r.length;a<p;++a){var l=r[a];if(h!=l){if(s<i[h+n-1])break;if(s<=i[l-1])return Tl(i,h,l,n,s,!1);h=l}}}return null},r.X=function(){return Rr(this.A,0,this.c,this.a)},r.Bb=function(){return this.c},r.Yk=function(t){var e;return t<0||this.c.length<=t?null:((e=new S(null)).ba(this.ja,this.A.slice(t?this.c[t-1]:0,this.c[t])),e)},r.gd=function(){for(var t=this.A,e=this.c,o=this.ja,i=[],r=0,n=0,s=e.length;n<s;++n){var a=e[n],p=new S(null);p.ba(o,t.slice(r,a)),i.push(p),r=a}return i},r.hd=function(t){for(var e=[],o=[],i=this.A,r=this.c,n=this.a,s=0,a=0,p=0,h=r.length;p<h;++p){var l=r[p],a=Ir(i,s,l,n,t,e,a);o.push(a),s=l}return e.length=a,(t=new M(null)).ba("XY",e,o),t},r.U=function(){return"MultiLineString"},r.Xa=function(t){t:{for(var e=this.A,o=this.c,i=this.a,r=0,n=0,s=o.length;n<s;++n){if(Br(e,r,o[n],i,t)){t=!0;break t}r=o[n]}t=!1}return t},r.ma=function(t,e){t?(mr(this,e,t,2),this.A||(this.A=[]),t=Cr(this.A,0,t,this.a,this.c),this.A.length=t.length?t[t.length-1]:0,this.s()):this.ba("XY",null,this.c)},r.ba=function(t,e,o){br(this,t,e),this.c=o,this.s()},e(P,b),(r=P.prototype).qk=function(t){this.A?X(this.A,t.ga()):this.A=t.ga().slice(),this.s()},r.clone=function(){var t=new P(null);return t.ba(this.ja,this.A.slice()),t},r.Kb=function(t,e,o,i){if(!(i<ct(this.G(),t,e)))for(var r=this.A,n=this.a,s=0,a=r.length;s<a;s+=n){var p=ot(t,e,r[s],r[s+1]);if(p<i){for(i=p,p=0;p<n;++p)o[p]=r[s+p];o.length=n}}return i},r.X=function(){return Lr(this.A,0,this.A.length,this.a)},r.il=function(t){var e=this.A?this.A.length/this.a:0;return t<0||e<=t?null:((e=new m(null)).ba(this.ja,this.A.slice(t*this.a,(t+1)*this.a)),e)},r.Zd=function(){for(var t=this.A,e=this.ja,o=this.a,i=[],r=0,n=t.length;r<n;r+=o){var s=new m(null);s.ba(e,t.slice(r,r+o)),i.push(s)}return i},r.U=function(){return"MultiPoint"},r.Xa=function(t){for(var e=this.A,o=this.a,i=0,r=e.length;i<r;i+=o)if(gt(t,e[i],e[i+1]))return!0;return!1},r.ma=function(t,e){t?(mr(this,e,t,1),this.A||(this.A=[]),this.A.length=jr(this.A,0,t,this.a),this.s()):this.ba("XY",null)},r.ba=function(t,e){br(this,t,e),this.s()},e(f,b),(r=f.prototype).rk=function(t){if(this.A)for(var e=this.A.length,o=(X(this.A,t.ga()),0),i=(t=t.Bb().slice()).length;o<i;++o)t[o]+=e;else this.A=t.ga().slice(),t=t.Bb().slice(),this.c.push();this.c.push(t),this.s()},r.clone=function(){for(var t=new f(null),e=this.c.length,o=Array(e),i=0;i<e;++i)o[i]=this.c[i].slice();return Nl(t,this.ja,this.A.slice(),o),t},r.Kb=function(t,e,o,i){if(!(i<ct(this.G(),t,e))){if(this.C!=this.i){for(var r=this.c,n=0,s=0,a=0,p=r.length;a<p;++a)var h=r[a],s=Pr(this.A,n,h,this.a,s),n=h[h.length-1];this.B=Math.sqrt(s),this.C=this.i}r=Il(this),n=this.c,s=this.a;for(var a=this.B,h=[NaN,NaN],l=p=0,u=n.length;l<u;++l){var c=n[l];i=Er(r,p,c,s,a,!0,t,e,o,i,h),p=c[c.length-1]}}return i},r.Mc=function(t,e){t:{var o=Il(this),i=this.c,r=0;if(i.length)for(var n=0,s=i.length;n<s;++n){var a=i[n];if(Or(o,r,a,this.a,t,e)){t=!0;break t}r=a[a.length-1]}t=!1}return t},r.sn=function(){for(var t=Il(this),e=this.c,o=0,i=0,r=0,n=e.length;r<n;++r)var s=e[r],i=i+xr(t,o,s,this.a),o=s[s.length-1];return i},r.X=function(t){void 0!==t?Kr(e=Il(this).slice(),this.c,this.a,t):e=this.A,t=e,e=this.c;for(var e,o=this.a,i=0,r=[],n=0,s=0,a=e.length;s<a;++s){var p=e[s];r[n++]=Rr(t,i,p,o,r[n]),i=p[p.length-1]}return r.length=n,r},r.Uk=function(){var t=new P(null);return t.ba("XY",Rl(this).slice()),t},r.hd=function(t){for(var e=[],o=[],i=this.A,r=this.c,n=this.a,s=(t=Math.sqrt(t),0),a=0,p=0,h=r.length;p<h;++p){var l=r[p],u=[],a=Nr(i,s,l,n,t,e,a,u);o.push(u),s=l[l.length-1]}return e.length=a,Nl(i=new f(null),"XY",e,o),i},r.jl=function(t){if(t<0||this.c.length<=t)return null;e=t?(e=this.c[t-1])[e.length-1]:0;var e,o=(t=this.c[t].slice())[t.length-1];if(e)for(var i=0,r=t.length;i<r;++i)t[i]-=e;return(i=new w(null)).ba(this.ja,this.A.slice(e,o),t),i},r.Td=function(){for(var t=this.ja,e=this.A,o=this.c,i=[],r=0,n=0,s=o.length;n<s;++n){var a=o[n].slice(),p=a[a.length-1];if(r)for(var h=0,l=a.length;h<l;++h)a[h]-=r;(h=new w(null)).ba(t,e.slice(r,p),a),i.push(h),r=p}return i},r.U=function(){return"MultiPolygon"},r.Xa=function(t){t:{for(var e=Il(this),o=this.c,i=this.a,r=0,n=0,s=o.length;n<s;++n){var a=o[n];if(Xr(e,r,a,i,t)){t=!0;break t}r=a[a.length-1]}t=!1}return t},r.ma=function(t,e){if(t){mr(this,e,t,3),this.A||(this.A=[]),e=this.A;for(var o=this.a,i=0,r=(r=this.c)||[],n=0,s=0,a=t.length;s<a;++s)i=Cr(e,i,t[s],o,r[n]),i=(r[n++]=i)[i.length-1];r.length=n,r.length?(t=r[r.length-1],this.A.length=t.length?t[t.length-1]:0):this.A.length=0,this.s()}else Nl(this,"XY",null,this.c)},e(kl,Pl);var Gl={Point:function(t){return void 0!==t.m&&void 0!==t.z?new m([t.x,t.y,t.z,t.m],"XYZM"):void 0!==t.z?new m([t.x,t.y,t.z],"XYZ"):void 0!==t.m?new m([t.x,t.y,t.m],"XYM"):new m([t.x,t.y])},LineString:function(t){return new S(t.paths[0],Ol(t))},Polygon:function(t){return new w(t.rings,Ol(t))},MultiPoint:function(t){return new P(t.points,Ol(t))},MultiLineString:function(t){return new M(t.paths,Ol(t))},MultiPolygon:function(t){return new f(t.rings,Ol(t))}},Bl={Point:function(t){var e,o=t.X();return"XYZ"===(t=t.ja)?e={x:o[0],y:o[1],z:o[2]}:"XYM"===t?e={x:o[0],y:o[1],m:o[2]}:"XYZM"===t?e={x:o[0],y:o[1],z:o[2],m:o[3]}:"XY"===t?e={x:o[0],y:o[1]}:O(!1,34),e},LineString:function(t){var e=Ul(t);return{hasZ:e.hasZ,hasM:e.hasM,paths:[t.X()]}},Polygon:function(t){var e=Ul(t);return{hasZ:e.hasZ,hasM:e.hasM,rings:t.X(!1)}},MultiPoint:function(t){var e=Ul(t);return{hasZ:e.hasZ,hasM:e.hasM,points:t.X()}},MultiLineString:function(t){var e=Ul(t);return{hasZ:e.hasZ,hasM:e.hasM,paths:t.X()}},MultiPolygon:function(t){var e=Ul(t);t=t.X(!1);for(var o=[],i=0;i<t.length;i++)for(var r=t[i].length-1;0<=r;r--)o.push(t[i][r]);return{hasZ:e.hasZ,hasM:e.hasM,rings:o}}};function Xl(t,e){return(0,Bl[t.U()])(Ml(t,!0,e),e)}function Vl(t){this.kc=t}function Wl(t,e){this.kc=t,this.b=Array.prototype.slice.call(arguments,1),O(2<=this.b.length,57)}function Zl(t){var e=["And"].concat(Array.prototype.slice.call(arguments));Wl.apply(this,e)}function Kl(t,e,o){this.kc="BBOX",this.geometryName=t,this.extent=e,this.srsName=o}function zl(t,e){this.kc=t,this.b=e}function Yl(t,e,o){zl.call(this,"During",t),this.a=e,this.i=o}function Hl(t,e,o,i){zl.call(this,t,e),this.i=o,this.a=i}function ql(t,e,o){Hl.call(this,"PropertyIsEqualTo",t,e,o)}function Jl(t,e){Hl.call(this,"PropertyIsGreaterThan",t,e)}function _l(t,e){Hl.call(this,"PropertyIsGreaterThanOrEqualTo",t,e)}function $l(t,e,o,i){this.kc=t,this.geometryName=e||"the_geom",this.geometry=o,this.srsName=i}function Ql(t,e,o){$l.call(this,"Intersects",t,e,o)}function tu(t,e,o){zl.call(this,"PropertyIsBetween",t),this.a=e,this.i=o}function eu(t,e,o,i,r,n){zl.call(this,"PropertyIsLike",t),this.c=e,this.g=void 0!==o?o:"*",this.f=void 0!==i?i:".",this.i=void 0!==r?r:"!",this.a=n}function ou(t){zl.call(this,"PropertyIsNull",t)}function iu(t,e){Hl.call(this,"PropertyIsLessThan",t,e)}function ru(t,e){Hl.call(this,"PropertyIsLessThanOrEqualTo",t,e)}function nu(t){this.kc="Not",this.condition=t}function su(t,e,o){Hl.call(this,"PropertyIsNotEqualTo",t,e,o)}function au(t){var e=["Or"].concat(Array.prototype.slice.call(arguments));Wl.apply(this,e)}function pu(t,e,o){$l.call(this,"Within",t,e,o)}function hu(t){var e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(Zl,e))}function lu(t,e,o){return new Kl(t,e,o)}function uu(t){yr.call(this),this.a=t||null,yu(this)}function cu(t){for(var e=[],o=0,i=t.length;o<i;++o)e.push(t[o].clone());return e}function fu(t){if(t.a)for(var e=0,o=t.a.length;e<o;++e)He(t.a[e],"change",t.s,t)}function yu(t){if(t.a)for(var e=0,o=t.a.length;e<o;++e)d(t.a[e],"change",t.s,t)}function gu(t){t=t||{},wl.call(this),this.defaultDataProjection=v(t.defaultDataProjection||"EPSG:4326"),t.featureProjection&&(this.f=v(t.featureProjection)),this.b=t.geometryName}function du(t,e){return t?Ml((0,bu[t.type])(t),!1,e):null}function vu(t,e){return(0,mu[t.U()])(Ml(t,!0,e),e)}(r=kl.prototype).Rc=function(t,e){var o=Dl(t.geometry,e),i=new x;return this.b&&i.Tc(this.b),i.Ra(o),e&&e.dg&&t.attributes[e.dg]&&i.jc(t.attributes[e.dg]),t.attributes&&i.H(t.attributes),i},r.yg=function(t,e){if(e=e||{},t.features){var o,i=[],r=t.features;for(e.dg=t.objectIdFieldName,t=0,o=r.length;t<o;++t)i.push(this.Rc(r[t],e));return i}return[this.Rc(t,e)]},r.Cg=Dl,r.Fg=function(t){return t.spatialReference&&t.spatialReference.wkid?v("EPSG:"+t.spatialReference.wkid):null},r.je=function(t,e){return Xl(t,Sl(this,e))},r.Zc=function(t,e){e=Sl(this,e);var o={},i=t.V();return i&&(o.geometry=Xl(i,e)),delete(i=t.N())[t.c],o.attributes=Zt(i)?{}:i,e&&e.featureProjection&&(o.spatialReference={wkid:v(e.featureProjection).mb.split(":").pop()}),o},r.he=function(t,e){e=Sl(this,e);for(var o=[],i=0,r=t.length;i<r;++i)o.push(this.Zc(t[i],e));return{features:o}},e(Wl,Vl),e(Zl,Wl),e(Kl,Vl),e(zl,Vl),e(Yl,zl),e(Hl,zl),e(ql,Hl),e(Jl,Hl),e(_l,Hl),e($l,Vl),e(Ql,$l),e(tu,zl),e(eu,zl),e(ou,zl),e(iu,Hl),e(ru,Hl),e(nu,Vl),e(su,Hl),e(au,Wl),e(pu,$l),e(uu,yr),(r=uu.prototype).clone=function(){var t=new uu(null);return t.oj(this.a),t},r.Kb=function(t,e,o,i){if(!(i<ct(this.G(),t,e)))for(var r=this.a,n=0,s=r.length;n<s;++n)i=r[n].Kb(t,e,o,i);return i},r.Mc=function(t,e){for(var o=this.a,i=0,r=o.length;i<r;++i)if(o[i].Mc(t,e))return!0;return!1},r.se=function(t){mt(t);for(var e=this.a,o=0,i=e.length;o<i;++o)Mt(t,e[o].G());return t},r.Vf=function(){return cu(this.a)},r.Vd=function(t){if(this.o!=this.i&&(Vt(this.f),this.g=0,this.o=this.i),!(t<0||this.g&&t<this.g)){var e=t.toString();if(this.f.hasOwnProperty(e))return this.f[e];for(var o=[],i=this.a,r=!1,n=0,s=i.length;n<s;++n){var a=i[n],p=a.Vd(t);o.push(p),p!==a&&(r=!0)}if(r)return fu(t=new uu(null)),t.a=o,yu(t),t.s(),this.f[e]=t;this.g=t}return this},r.U=function(){return"GeometryCollection"},r.Xa=function(t){for(var e=this.a,o=0,i=e.length;o<i;++o)if(e[o].Xa(t))return!0;return!1},r.rotate=function(t,e){for(var o=this.a,i=0,r=o.length;i<r;++i)o[i].rotate(t,e);this.s()},r.scale=function(t,e,o){o=o||Lt(this.G());for(var i=this.a,r=0,n=i.length;r<n;++r)i[r].scale(t,e,o);this.s()},r.oj=function(t){t=cu(t),fu(this),this.a=t,yu(this),this.s()},r.Dc=function(t){for(var e=this.a,o=0,i=e.length;o<i;++o)e[o].Dc(t);this.s()},r.translate=function(t,e){for(var o=this.a,i=0,r=o.length;i<r;++i)o[i].translate(t,e);this.s()},r.ka=function(){fu(this),yr.prototype.ka.call(this)},e(gu,Pl);var bu={Point:function(t){return new m(t.coordinates)},LineString:function(t){return new S(t.coordinates)},Polygon:function(t){return new w(t.coordinates)},MultiPoint:function(t){return new P(t.coordinates)},MultiLineString:function(t){return new M(t.coordinates)},MultiPolygon:function(t){return new f(t.coordinates)},GeometryCollection:function(t,e){return new uu(t=t.geometries.map(function(t){return du(t,e)}))}},mu={Point:function(t){return{type:"Point",coordinates:t.X()}},LineString:function(t){return{type:"LineString",coordinates:t.X()}},Polygon:function(t,e){var o;return e&&(o=e.rightHanded),{type:"Polygon",coordinates:t.X(o)}},MultiPoint:function(t){return{type:"MultiPoint",coordinates:t.X()}},MultiLineString:function(t){return{type:"MultiLineString",coordinates:t.X()}},MultiPolygon:function(t,e){var o;return e&&(o=e.rightHanded),{type:"MultiPolygon",coordinates:t.X(o)}},GeometryCollection:function(t,o){return{type:"GeometryCollection",geometries:t.a.map(function(t){var e=Xt({},o);return delete e.featureProjection,vu(t,e)})}},Circle:function(){return{type:"GeometryCollection",geometries:[]}}};function wu(){this.i=new XMLSerializer,wl.call(this)}function xu(t,e,o){return 0<(t=Su(t,e,o)).length?t[0]:null}function Su(t,e,o){var i=[];for(e=e.firstChild;e;e=e.nextSibling)e.nodeType==Node.ELEMENT_NODE&&X(i,t.zc(e,o));return i}function Mu(t){this.featureType=(t=t||{}).featureType,this.featureNS=t.featureNS,this.srsName=t.srsName,this.schemaLocation="",this.b={},this.b["http://www.opengis.net/gml"]={featureMember:hl(Mu.prototype.be),featureMembers:hl(Mu.prototype.be)},wu.call(this)}(r=gu.prototype).Rc=function(t,e){e=du((t="Feature"===t.type?t:{type:"Feature",geometry:t}).geometry,e);var o=new x;return this.b&&o.Tc(this.b),o.Ra(e),void 0!==t.id&&o.jc(t.id),t.properties&&o.H(t.properties),o},r.yg=function(t,e){if("FeatureCollection"===t.type)for(var o=[],i=0,r=(t=t.features).length;i<r;++i)o.push(this.Rc(t[i],e));else o=[this.Rc(t,e)];return o},r.Cg=du,r.Fg=function(t){var e;return(t=t.crs)?"name"==t.type?e=v(t.properties.name):"EPSG"==t.type?e=v("EPSG:"+t.properties.code):O(!1,36):e=this.defaultDataProjection,e},r.Zc=function(t,e){e=Sl(this,e);var o={type:"Feature"},i=t.a;return void 0!==i&&(o.id=i),(i=t.V())?o.geometry=vu(i,e):o.geometry=null,delete(e=t.N())[t.c],Zt(e)?o.properties=null:o.properties=e,o},r.he=function(t,e){e=Sl(this,e);for(var o=[],i=0,r=t.length;i<r;++i)o.push(this.Zc(t[i],e));return{type:"FeatureCollection",features:o}},r.je=function(t,e){return vu(t,Sl(this,e))},e(wu,wl),(r=wu.prototype).U=function(){return"xml"},r.Tb=function(t,e){return rl(t)?xu(this,t,e):nl(t)?this.xg(t,e):"string"==typeof t?xu(this,t=sl(t),e):null},r.xg=function(){return null},r.Oa=function(t,e){return rl(t)?Su(this,t,e):nl(t)?this.zc(t,e):"string"==typeof t?Su(this,t=sl(t),e):[]},r.Sc=function(t,e){if(!rl(t)){if(nl(t))return this.aj(t,e);"string"==typeof t&&sl(t)}return null},r.aj=function(){return null},r.kb=function(t){return rl(t)?this.Eg(t):nl(t)?this.kf(t):"string"==typeof t?(t=sl(t),this.Eg(t)):null},r.Eg=function(){return this.defaultDataProjection},r.kf=function(){return this.defaultDataProjection},r.Bd=function(t,e){return this.i.serializeToString(this.Vg(t,e))},r.Vg=function(){return null},r.Wb=function(t,e){return t=this.Xb(t,e),this.i.serializeToString(t)},r.Xb=function(){return null},r.$c=function(t,e){return t=this.ie(t,e),this.i.serializeToString(t)},r.ie=function(){return null},e(Mu,wu);var Pu=/^[\s\xa0]*$/;function Au(t){return Eu(t=il(t,!1))}function Eu(t){if(t=/^\s*(true|1)|(false|0)\s*$/.exec(t))return void 0!==t[1]||!1}function Tu(t){return t=il(t,!1),t=Date.parse(t),isNaN(t)?void 0:t/1e3}function ju(t){return Cu(t=il(t,!1))}function Cu(t){if(t=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(t))return parseFloat(t[1])}function Lu(t){return Ru(t=il(t,!1))}function Ru(t){if(t=/^\s*(\d+)\s*$/.exec(t))return parseInt(t[1],10)}function i(t){return il(t,!1).trim()}function Iu(t,e){ku(t,e?"1":"0")}function Nu(t,e){t.appendChild(el.createTextNode(e.toPrecision()))}function Fu(t,e){t.appendChild(el.createTextNode(e.toString()))}function ku(t,e){t.appendChild(el.createTextNode(e))}function y(t){Mu.call(this,t=t||{}),this.l=void 0!==t.surface&&t.surface,this.c=void 0!==t.curve&&t.curve,this.g=void 0===t.multiCurve||t.multiCurve,this.j=void 0===t.multiSurface||t.multiSurface,this.schemaLocation=t.schemaLocation||"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd"}function Du(t,e,o){o=(i=o[o.length-1]).hasZ;for(var i=i.srsName,r=(e=e.X()).length,n=Array(r),s=0;s<r;++s){var a=e[s],p=s,h=o,l="enu",l="en"===(l=i?v(i).b:l).substr(0,2)?a[0]+" "+a[1]:a[1]+" "+a[0];h&&(l+=" "+(a[2]||0)),n[p]=l}ku(t,n.join(" "))}(r=Mu.prototype).be=function(t,e){var o=t.localName,i=null;if("FeatureCollection"==o)i="http://www.opengis.net/wfs"===t.namespaceURI?g([],this.b,t,e,this):g(null,this.b,t,e,this);else if("featureMembers"==o||"featureMember"==o){var r=(y=e[0]).featureType,n=y.featureNS;if(!r&&t.childNodes){r=[];for(var n={},s=0,a=t.childNodes.length;s<a;++s)if(1===(c=t.childNodes[s]).nodeType){var p=c.nodeName.split(":").pop();if(-1===r.indexOf(p)){var h,l="",u=0,c=c.namespaceURI;for(h in n){if(n[h]===c){l=h;break}++u}l||(n[l="p"+u]=c),r.push(l+":"+p)}}"featureMember"!=o&&(y.featureType=r,y.featureNS=n)}"string"==typeof n&&(s=n,(n={}).p0=s);var f,y={},r=Array.isArray(r)?r:[r];for(f in n){for(p={},s=0,a=r.length;s<a;++s)(-1===r[s].indexOf(":")?"p0":r[s].split(":")[0])===f&&(p[r[s].split(":").pop()]=("featureMembers"==o?pl:hl)(this.wg,this));y[n[f]]=p}i=g("featureMember"==o?void 0:[],y,t,e)}return i=null===i?[]:i},r.gf=function(t,e){var o=e[0];if(o.srsName=t.firstElementChild.getAttribute("srsName"),t=g(null,this.Zg,t,e,this))return Ml(t,!1,o)},r.wg=function(t,e){var o,i=(i=t.getAttribute("fid"))||t.getAttributeNS("http://www.opengis.net/gml","id")||"",r={};for(t=t.firstElementChild;t;t=t.nextElementSibling){var n,s=t.localName;0===t.childNodes.length||1===t.childNodes.length&&(3===t.firstChild.nodeType||4===t.firstChild.nodeType)?(n=il(t,!1),Pu.test(n)&&(n=void 0),r[s]=n):("boundedBy"!==s&&(o=s),r[s]=this.gf(t,e))}return e=new x(r),o&&e.Tc(o),i&&e.jc(i),e},r.fj=function(t,e){if(t=this.ff(t,e))return(e=new m(null)).ba("XYZ",t),e},r.dj=function(t,e){if(t=g([],this.Nj,t,e,this))return new P(t)},r.cj=function(t,e){if(t=g([],this.Mj,t,e,this))return Ll(e=new M(null),t),e},r.ej=function(t,e){if(t=g([],this.Oj,t,e,this))return Fl(e=new f(null),t),e},r.Xi=function(t,e){gl(this.Rj,t,e,this)},r.Mh=function(t,e){gl(this.Kj,t,e,this)},r.Yi=function(t,e){gl(this.Sj,t,e,this)},r.hf=function(t,e){if(t=this.ff(t,e))return(e=new S(null)).ba("XYZ",t),e},r.wp=function(t,e){if(t=g(null,this.ke,t,e,this))return t},r.bj=function(t,e){if(t=this.ff(t,e))return kr(e=new Fr(null),"XYZ",t),e},r.jf=function(t,e){if((t=g([null],this.zf,t,e,this))&&t[0]){e=new w(null);for(var o=t[0],i=[o.length],r=1,n=t.length;r<n;++r)X(o,t[r]),i.push(o.length);return e.ba("XYZ",o,i),e}},r.ff=function(t,e){return g(null,this.ke,t,e,this)},r.Nj={"http://www.opengis.net/gml":{pointMember:pl(Mu.prototype.Xi),pointMembers:pl(Mu.prototype.Xi)}},r.Mj={"http://www.opengis.net/gml":{lineStringMember:pl(Mu.prototype.Mh),lineStringMembers:pl(Mu.prototype.Mh)}},r.Oj={"http://www.opengis.net/gml":{polygonMember:pl(Mu.prototype.Yi),polygonMembers:pl(Mu.prototype.Yi)}},r.Rj={"http://www.opengis.net/gml":{Point:pl(Mu.prototype.ff)}},r.Kj={"http://www.opengis.net/gml":{LineString:pl(Mu.prototype.hf)}},r.Sj={"http://www.opengis.net/gml":{Polygon:pl(Mu.prototype.jf)}},r.le={"http://www.opengis.net/gml":{LinearRing:hl(Mu.prototype.wp)}},r.aj=function(t,e){return(t=this.gf(t,[xl(this,t,e||{})]))||null},r.zc=function(t,e){var o={featureType:this.featureType,featureNS:this.featureNS};return e&&Xt(o,xl(this,t,e)),this.be(t,[o])||[]},r.kf=function(t){return v(this.srsName||t.firstElementChild.getAttribute("srsName"))},e(y,Mu),(r=y.prototype).Ap=function(t,e){if(t=g([],this.Lj,t,e,this))return Ll(e=new M(null),t),e},r.Bp=function(t,e){if(t=g([],this.Pj,t,e,this))return Fl(e=new f(null),t),e},r.ph=function(t,e){gl(this.Hj,t,e,this)},r.Aj=function(t,e){gl(this.Uj,t,e,this)},r.Ep=function(t,e){return g([null],this.Qj,t,e,this)},r.Hp=function(t,e){return g([null],this.Tj,t,e,this)},r.Fp=function(t,e){return g([null],this.zf,t,e,this)},r.zp=function(t,e){return g([null],this.ke,t,e,this)},r.cm=function(t,e){(t=g(void 0,this.le,t,e,this))&&e[e.length-1].push(t)},r.yk=function(t,e){(t=g(void 0,this.le,t,e,this))&&(e[e.length-1][0]=t)},r.gj=function(t,e){if((t=g([null],this.Vj,t,e,this))&&t[0]){e=new w(null);for(var o=t[0],i=[o.length],r=1,n=t.length;r<n;++r)X(o,t[r]),i.push(o.length);return e.ba("XYZ",o,i),e}},r.Zi=function(t,e){if(t=g([null],this.Ij,t,e,this))return(e=new S(null)).ba("XYZ",t),e},r.vp=function(t,e){return bt((t=g([null],this.Jj,t,e,this))[1][0],t[1][1],t[2][0],t[2][1])},r.xp=function(t,e){var o,i=il(t,!1),r=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/;for(t=[];o=r.exec(i);)t.push(parseFloat(o[1])),i=i.substr(o[0].length);if(""===i){if(i="enu","neu"===(i=(e=e[0].srsName)?v(e).b:i))for(e=0,i=t.length;e<i;e+=3)r=t[e],t[e]=t[e+1],t[e+1]=r;if(2==(e=t.length)&&t.push(0),e)return t}},r.Bg=function(t,e){var o=il(t,!1).replace(/^\s*|\s*$/g,""),i=e[0].srsName,r=t.parentNode.getAttribute("srsDimension");e="enu",i&&(e=v(i).b),o=o.split(/\s+/),i=2,t.getAttribute("srsDimension")?i=Ru(t.getAttribute("srsDimension")):t.getAttribute("dimension")?i=Ru(t.getAttribute("dimension")):r&&(i=Ru(r));for(var n,s=[],a=0,p=o.length;a<p;a+=i)t=parseFloat(o[a]),r=parseFloat(o[a+1]),n=3===i?parseFloat(o[a+2]):0,"en"===e.substr(0,2)?s.push(t,r,n):s.push(r,t,n);return s},r.ke={"http://www.opengis.net/gml":{pos:hl(y.prototype.xp),posList:hl(y.prototype.Bg)}},r.zf={"http://www.opengis.net/gml":{interior:y.prototype.cm,exterior:y.prototype.yk}},r.Zg={"http://www.opengis.net/gml":{Point:hl(Mu.prototype.fj),MultiPoint:hl(Mu.prototype.dj),LineString:hl(Mu.prototype.hf),MultiLineString:hl(Mu.prototype.cj),LinearRing:hl(Mu.prototype.bj),Polygon:hl(Mu.prototype.jf),MultiPolygon:hl(Mu.prototype.ej),Surface:hl(y.prototype.gj),MultiSurface:hl(y.prototype.Bp),Curve:hl(y.prototype.Zi),MultiCurve:hl(y.prototype.Ap),Envelope:hl(y.prototype.vp)}},r.Lj={"http://www.opengis.net/gml":{curveMember:pl(y.prototype.ph),curveMembers:pl(y.prototype.ph)}},r.Pj={"http://www.opengis.net/gml":{surfaceMember:pl(y.prototype.Aj),surfaceMembers:pl(y.prototype.Aj)}},r.Hj={"http://www.opengis.net/gml":{LineString:pl(Mu.prototype.hf),Curve:pl(y.prototype.Zi)}},r.Uj={"http://www.opengis.net/gml":{Polygon:pl(Mu.prototype.jf),Surface:pl(y.prototype.gj)}},r.Vj={"http://www.opengis.net/gml":{patches:hl(y.prototype.Ep)}},r.Ij={"http://www.opengis.net/gml":{segments:hl(y.prototype.Hp)}},r.Jj={"http://www.opengis.net/gml":{lowerCorner:pl(y.prototype.Bg),upperCorner:pl(y.prototype.Bg)}},r.Qj={"http://www.opengis.net/gml":{PolygonPatch:hl(y.prototype.Fp)}},r.Tj={"http://www.opengis.net/gml":{LineStringSegment:hl(y.prototype.zp)}},r.ni=function(t,e,o){var i=o[o.length-1].srsName,r=(i&&t.setAttribute("srsName",i),i=ol(t.namespaceURI,"pos"),t.appendChild(i),t=(o=o[o.length-1]).hasZ,o.srsName);o="enu",r&&(o=v(r).b),e=e.X(),o="en"===o.substr(0,2)?e[0]+" "+e[1]:e[1]+" "+e[0],t&&(o+=" "+(e[2]||0)),ku(i,o)};var r,Ou={"http://www.opengis.net/gml":{lowerCorner:c(ku),upperCorner:c(ku)}},Uu=((r=y.prototype).jn=function(t,e,o){var i=o[o.length-1].srsName;i&&t.setAttribute("srsName",i),vl({node:t},Ou,fl,[e[0]+" "+e[1],e[2]+" "+e[3]],o,["lowerCorner","upperCorner"],this)},r.ki=function(t,e,o){var i=o[o.length-1].srsName;i&&t.setAttribute("srsName",i),i=ol(t.namespaceURI,"posList"),t.appendChild(i),Du(i,e,o)},r.hn=function(t,e){e=(t=e[e.length-1]).node;var o=t.exteriorWritten;return void 0===o&&(t.exteriorWritten=!0),ol(e.namespaceURI,void 0!==o?"interior":"exterior")},r.Se=function(t,e,o){var i=(r=o[o.length-1]).hasZ,r=r.srsName;"PolygonPatch"!==t.nodeName&&r&&t.setAttribute("srsName",r),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName?(e=e.Sd(),vl({node:t,hasZ:i,srsName:r},Xu,this.hn,e,o,void 0,this)):"Surface"===t.nodeName&&(i=ol(t.namespaceURI,"patches"),t.appendChild(i),t=ol(i.namespaceURI,"PolygonPatch"),i.appendChild(t),this.Se(t,e,o))},r.Re=function(t,e,o){var i=o[o.length-1].srsName;"LineStringSegment"!==t.nodeName&&i&&t.setAttribute("srsName",i),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName?(i=ol(t.namespaceURI,"posList"),t.appendChild(i),Du(i,e,o)):"Curve"===t.nodeName&&(i=ol(t.namespaceURI,"segments"),t.appendChild(i),t=ol(i.namespaceURI,"LineStringSegment"),i.appendChild(t),this.Re(t,e,o))},r.mi=function(t,e,o){var i=(n=o[o.length-1]).hasZ,r=n.srsName,n=n.surface;r&&t.setAttribute("srsName",r),e=e.Td(),vl({node:t,hasZ:i,srsName:r,surface:n},Uu,this.o,e,o,void 0,this)},r.kn=function(t,e,o){var i=(r=o[o.length-1]).srsName,r=r.hasZ;i&&t.setAttribute("srsName",i),e=e.Zd(),vl({node:t,hasZ:r,srsName:i},Gu,cl("pointMember"),e,o,void 0,this)},r.li=function(t,e,o){var i=(n=o[o.length-1]).hasZ,r=n.srsName,n=n.curve;r&&t.setAttribute("srsName",r),e=e.gd(),vl({node:t,hasZ:i,srsName:r,curve:n},Bu,this.o,e,o,void 0,this)},r.oi=function(t,e,o){var i=ol(t.namespaceURI,"LinearRing");t.appendChild(i),this.ki(i,e,o)},r.pi=function(t,e,o){var i=this.a(e,o);i&&(t.appendChild(i),this.Se(i,e,o))},r.ln=function(t,e,o){var i=ol(t.namespaceURI,"Point");t.appendChild(i),this.ni(i,e,o)},r.ji=function(t,e,o){var i=this.a(e,o);i&&(t.appendChild(i),this.Re(i,e,o))},r.od=function(t,e,o){var i=o[o.length-1],r=Xt({},i);r.node=t,t=Array.isArray(e)?i.dataProjection?Pe(e,i.featureProjection,i.dataProjection):e:Ml(e,!0,i),vl(r,Vu,this.a,[t],o,void 0,this)},r.ii=function(t,e,o){var i=e.a;i&&t.setAttribute("fid",i);var r=(i=o[o.length-1]).featureNS,n=e.c,s=(i.lb||(i.lb={},i.lb[r]={}),e.N()),a=(e=[],[]);for(h in s){var p=s[h];null!==p&&(e.push(h),a.push(p),h==n||p instanceof yr?h in i.lb[r]||(i.lb[r][h]=c(this.od,this)):h in i.lb[r]||(i.lb[r][h]=c(ku)))}var h=Xt({},i);h.node=t,vl(h,i.lb,cl(void 0,r),a,o,e)},{"http://www.opengis.net/gml":{surfaceMember:c(y.prototype.pi),polygonMember:c(y.prototype.pi)}}),Gu={"http://www.opengis.net/gml":{pointMember:c(y.prototype.ln)}},Bu={"http://www.opengis.net/gml":{lineStringMember:c(y.prototype.ji),curveMember:c(y.prototype.ji)}},Xu={"http://www.opengis.net/gml":{exterior:c(y.prototype.oi),interior:c(y.prototype.oi)}},Vu={"http://www.opengis.net/gml":{Curve:c(y.prototype.Re),MultiCurve:c(y.prototype.li),Point:c(y.prototype.ni),MultiPoint:c(y.prototype.kn),LineString:c(y.prototype.Re),MultiLineString:c(y.prototype.li),LinearRing:c(y.prototype.ki),Polygon:c(y.prototype.Se),MultiPolygon:c(y.prototype.mi),Surface:c(y.prototype.Se),MultiSurface:c(y.prototype.mi),Envelope:c(y.prototype.jn)}},Wu={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"};function Zu(t){Mu.call(this,t=t||{}),this.b["http://www.opengis.net/gml"].featureMember=pl(Mu.prototype.be),this.schemaLocation=t.schemaLocation||"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd"}function Ku(t){return(t=ol(t,"coordinates")).setAttribute("decimal","."),t.setAttribute("cs",","),t.setAttribute("ts"," "),t}function zu(t,e,o){o=(r=o[o.length-1]).hasZ;for(var i,r=r.srsName,n=(e=e.X()).length,s=Array(n),a=0;a<n;++a)i=e[a],s[a]=Yu(i,r,o);ku(t,s.join(" "))}function Yu(t,e,o){var i="enu";return e="en"===(i=e?v(e).b:i).substr(0,2)?t[0]+","+t[1]:t[1]+","+t[0],o&&(e+=","+(t[2]||0)),e}y.prototype.o=function(t,e){return ol("http://www.opengis.net/gml",Wu[e[e.length-1].node.nodeName])},y.prototype.a=function(t,e){e=(r=e[e.length-1]).multiSurface;var o=r.surface,i=r.curve,r=r.multiCurve;return Array.isArray(t)?t="Envelope":"MultiPolygon"===(t=t.U())&&!0===e?t="MultiSurface":"Polygon"===t&&!0===o?t="Surface":"LineString"===t&&!0===i?t="Curve":"MultiLineString"===t&&!0===r&&(t="MultiCurve"),ol("http://www.opengis.net/gml",t)},y.prototype.ie=function(t,e){e=Sl(this,e);var o=ol("http://www.opengis.net/gml","geom"),i={node:o,hasZ:this.hasZ,srsName:this.srsName,curve:this.c,surface:this.l,multiSurface:this.j,multiCurve:this.g};return e&&Xt(i,e),this.od(o,t,[i]),o},y.prototype.Xb=function(t,e){e=Sl(this,e);var o=ol("http://www.opengis.net/gml","featureMembers"),i=(o.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",this.schemaLocation),{srsName:this.srsName,hasZ:this.hasZ,curve:this.c,surface:this.l,multiSurface:this.j,multiCurve:this.g,featureNS:this.featureNS,featureType:this.featureType}),r=(e&&Xt(i,e),(e=[i])[e.length-1]),i=r.featureType,n=r.featureNS,s={};return s[n]={},s[n][i]=c(this.ii,this),(r=Xt({},r)).node=o,vl(r,s,cl(i,n),t,e),o},e(Zu,Mu),(r=Zu.prototype).$i=function(t,e){t=il(t,!1).replace(/^\s*|\s*$/g,"");var o=e[0].srsName;e="enu",(o=o&&v(o))&&(e=o.b);for(var i,r,n=[],s=0,a=(t=t.trim().split(/\s+/)).length;s<a;s++)r=t[s].split(/,+/),o=parseFloat(r[0]),i=parseFloat(r[1]),r=3===r.length?parseFloat(r[2]):0,"en"===e.substr(0,2)?n.push(o,i,r):n.push(i,o,r);return n},r.tp=function(t,e){return bt((t=g([null],this.Gj,t,e,this))[1][0],t[1][1],t[1][3],t[1][4])},r.am=function(t,e){(t=g(void 0,this.le,t,e,this))&&e[e.length-1].push(t)},r.bp=function(t,e){(t=g(void 0,this.le,t,e,this))&&(e[e.length-1][0]=t)},r.ke={"http://www.opengis.net/gml":{coordinates:hl(Zu.prototype.$i)}},r.zf={"http://www.opengis.net/gml":{innerBoundaryIs:Zu.prototype.am,outerBoundaryIs:Zu.prototype.bp}},r.Gj={"http://www.opengis.net/gml":{coordinates:pl(Zu.prototype.$i)}},r.Zg={"http://www.opengis.net/gml":{Point:hl(Mu.prototype.fj),MultiPoint:hl(Mu.prototype.dj),LineString:hl(Mu.prototype.hf),MultiLineString:hl(Mu.prototype.cj),LinearRing:hl(Mu.prototype.bj),Polygon:hl(Mu.prototype.jf),MultiPolygon:hl(Mu.prototype.ej),Box:hl(Zu.prototype.tp)}},r.jg=function(t,e){e=(i=e[e.length-1]).multiSurface;var o=i.surface,i=i.multiCurve;return Array.isArray(t)?t="Envelope":"MultiPolygon"===(t=t.U())&&!0===e?t="MultiSurface":"Polygon"===t&&!0===o?t="Surface":"MultiLineString"===t&&!0===i&&(t="MultiCurve"),ol("http://www.opengis.net/gml",t)},r.ai=function(t,e,o){var i=o[o.length-1],r=Xt({},i);r.node=t,t=Array.isArray(e)?i.dataProjection?Pe(e,i.featureProjection,i.dataProjection):e:Ml(e,!0,i),vl(r,Hu,this.jg,[t],o,void 0,this)},r.Pe=function(t,e,o){var i=o[o.length-1].srsName;"LineStringSegment"!==t.nodeName&&i&&t.setAttribute("srsName",i),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName?(i=Ku(t.namespaceURI),t.appendChild(i),zu(i,e,o)):"Curve"===t.nodeName&&(i=ol(t.namespaceURI,"segments"),t.appendChild(i),t=ol(i.namespaceURI,"LineStringSegment"),i.appendChild(t),this.Pe(t,e,o))},r.Qe=function(t,e,o){var i=(r=o[o.length-1]).hasZ,r=r.srsName;"PolygonPatch"!==t.nodeName&&r&&t.setAttribute("srsName",r),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName?(e=e.Sd(),vl({node:t,hasZ:i,srsName:r},qu,this.dn,e,o,void 0,this)):"Surface"===t.nodeName&&(i=ol(t.namespaceURI,"patches"),t.appendChild(i),t=ol(i.namespaceURI,"PolygonPatch"),i.appendChild(t),this.Qe(t,e,o))},r.dn=function(t,e){e=(t=e[e.length-1]).node;var o=t.exteriorWritten;return void 0===o&&(t.exteriorWritten=!0),ol(e.namespaceURI,void 0!==o?"innerBoundaryIs":"outerBoundaryIs")},r.gi=function(t,e,o){var i=ol(t.namespaceURI,"LinearRing");t.appendChild(i),this.ci(i,e,o)},r.di=function(t,e,o){var i=(n=o[o.length-1]).hasZ,r=n.srsName,n=n.curve;r&&t.setAttribute("srsName",r),e=e.gd(),vl({node:t,hasZ:i,srsName:r,curve:n},_u,this.a,e,o,void 0,this)},r.fi=function(t,e,o){var i=o[o.length-1],r=(o=i.hasZ,i.srsName);r&&t.setAttribute("srsName",r),i=Ku(t.namespaceURI),t.appendChild(i),ku(i,t=Yu(t=e.X(),r,o))},r.fn=function(t,e,o){var i=o[o.length-1],r=i.hasZ;(i=i.srsName)&&t.setAttribute("srsName",i),e=e.Zd(),vl({node:t,hasZ:r,srsName:i},Ju,cl("pointMember"),e,o,void 0,this)},r.gn=function(t,e,o){var i=ol(t.namespaceURI,"Point");t.appendChild(i),this.fi(i,e,o)},r.bi=function(t,e,o){var i=this.jg(e,o);i&&(t.appendChild(i),this.Pe(i,e,o))},r.ci=function(t,e,o){var i=o[o.length-1].srsName;i&&t.setAttribute("srsName",i),i=Ku(t.namespaceURI),t.appendChild(i),zu(i,e,o)},r.ei=function(t,e,o){var i=(n=o[o.length-1]).hasZ,r=n.srsName,n=n.surface;r&&t.setAttribute("srsName",r),e=e.Td(),vl({node:t,hasZ:i,srsName:r,surface:n},Qu,this.a,e,o,void 0,this)},r.hi=function(t,e,o){var i=this.jg(e,o);i&&(t.appendChild(i),this.Qe(i,e,o))},r.en=function(t,e,o){var i=o[o.length-1].srsName;i&&t.setAttribute("srsName",i),vl({node:t},tc,fl,[e[0]+" "+e[1],e[2]+" "+e[3]],o,["lowerCorner","upperCorner"],this)};var Hu={"http://www.opengis.net/gml":{Curve:c(Zu.prototype.Pe),MultiCurve:c(Zu.prototype.di),Point:c(Zu.prototype.fi),MultiPoint:c(Zu.prototype.fn),LineString:c(Zu.prototype.Pe),MultiLineString:c(Zu.prototype.di),LinearRing:c(Zu.prototype.ci),Polygon:c(Zu.prototype.Qe),MultiPolygon:c(Zu.prototype.ei),Surface:c(Zu.prototype.Qe),MultiSurface:c(Zu.prototype.ei),Envelope:c(Zu.prototype.en)}},qu={"http://www.opengis.net/gml":{outerBoundaryIs:c(Zu.prototype.gi),innerBoundaryIs:c(Zu.prototype.gi)}},Ju={"http://www.opengis.net/gml":{pointMember:c(Zu.prototype.gn)}},_u={"http://www.opengis.net/gml":{lineStringMember:c(Zu.prototype.bi),curveMember:c(Zu.prototype.bi)}},$u=(Zu.prototype.a=function(t,e){return ol("http://www.opengis.net/gml",$u[e[e.length-1].node.nodeName])},{MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"}),Qu={"http://www.opengis.net/gml":{surfaceMember:c(Zu.prototype.hi),polygonMember:c(Zu.prototype.hi)}},tc={"http://www.opengis.net/gml":{lowerCorner:c(ku),upperCorner:c(ku)}};function ec(t){t=t||{},wu.call(this),this.defaultDataProjection=v("EPSG:4326"),this.b=t.readExtensions}e(ec,wu);var oc=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"];function ic(t,e,o,i){return t.push(parseFloat(o.getAttribute("lon")),parseFloat(o.getAttribute("lat"))),"ele"in i?(t.push(i.ele),delete i.ele,e.hasZ=!0):t.push(0),"time"in i?(t.push(i.time),delete i.time,e.hasM=!0):t.push(0),t}function rc(t,e,o){var i="XY",r=2;if(t.hasZ&&t.hasM?(i="XYZM",r=4):t.hasZ?(i="XYZ",r=3):t.hasM&&(i="XYM",r=3),4!==r){for(var n=0,s=e.length/4;n<s;n++)e[n*r]=e[4*n],e[n*r+1]=e[4*n+1],t.hasZ&&(e[n*r+2]=e[4*n+2]),t.hasM&&(e[n*r+2]=e[4*n+3]);if(e.length=e.length/4*r,o)for(n=0,s=o.length;n<s;n++)o[n]=o[n]/4*r}return i}function nc(t,e){var o=e[e.length-1],i=t.getAttribute("href");null!==i&&(o.link=i),gl(cc,t,e)}function sc(t,e){e[e.length-1].extensionsNode_=t}function ac(t,e){var o,i,r=e[0];if(t=g({flatCoordinates:[],layoutOptions:{}},fc,t,e))return e=t.flatCoordinates,delete t.flatCoordinates,o=t.layoutOptions,delete t.layoutOptions,o=rc(o,e),(i=new S(null)).ba(o,e),Ml(i,!1,r),(r=new x(i)).H(t),r}function pc(t,e){var o,i,r,n=e[0];if(t=g({flatCoordinates:[],ends:[],layoutOptions:{}},gc,t,e))return e=t.flatCoordinates,delete t.flatCoordinates,o=t.ends,delete t.ends,i=t.layoutOptions,delete t.layoutOptions,i=rc(i,e,o),(r=new M(null)).ba(i,e,o),Ml(r,!1,n),(n=new x(r)).H(t),n}function hc(t,e){var o,i=e[0];if(e=g({},bc,t,e))return Ml(t=new m(t=ic([],o={},t,e),o=rc(o,t)),!1,i),(i=new x(t)).H(e),i}var lc={rte:ac,trk:pc,wpt:hc},uc=l(oc,{rte:pl(ac),trk:pl(pc),wpt:pl(hc)}),cc=l(oc,{text:o(i,"linkText"),type:o(i,"linkType")}),fc=l(oc,{name:o(i),cmt:o(i),desc:o(i),src:o(i),link:nc,number:o(Lu),extensions:sc,type:o(i),rtept:function(t,e){var o=g({},yc,t,e);o&&ic((e=e[e.length-1]).flatCoordinates,e.layoutOptions,t,o)}}),yc=l(oc,{ele:o(ju),time:o(Tu)}),gc=l(oc,{name:o(i),cmt:o(i),desc:o(i),src:o(i),link:nc,number:o(Lu),type:o(i),extensions:sc,trkseg:function(t,e){var o=e[e.length-1];gl(dc,t,e),o.ends.push(o.flatCoordinates.length)}}),dc=l(oc,{trkpt:function(t,e){var o=g({},vc,t,e);o&&ic((e=e[e.length-1]).flatCoordinates,e.layoutOptions,t,o)}}),vc=l(oc,{ele:o(ju),time:o(Tu)}),bc=l(oc,{ele:o(ju),time:o(Tu),magvar:o(ju),geoidheight:o(ju),name:o(i),cmt:o(i),desc:o(i),src:o(i),link:nc,sym:o(i),type:o(i),fix:o(i),sat:o(Lu),hdop:o(ju),vdop:o(ju),pdop:o(ju),ageofdgpsdata:o(ju),dgpsid:o(Lu),extensions:sc});function mc(t,e){for(var o=0,i=(e=e||[]).length;o<i;++o){var r,n=e[o];t.b&&(r=n.get("extensionsNode_")||null,t.b(n,r)),n.set("extensionsNode_",void 0)}}function wc(t,e,o){t.setAttribute("href",e),e=o[o.length-1].properties,vl({node:t},Mc,fl,[e.linkText,e.linkType],o,Sc)}function xc(t,e,o){var i=o[o.length-1],r=i.node.namespaceURI,n=i.properties;switch(t.setAttributeNS(null,"lat",e[1]),t.setAttributeNS(null,"lon",e[0]),i.geometryLayout){case"XYZM":e[3]&&(n.time=e[3]);case"XYZ":e[2]&&(n.ele=e[2]);break;case"XYM":e[2]&&(n.time=e[2])}i=yl(n,e=("rtept"==t.nodeName?Ec:Rc)[r]),vl({node:t,properties:n},Ic,fl,i,o,e)}ec.prototype.xg=function(t,e){var o;return D(oc,t.namespaceURI)&&(o=lc[t.localName])&&(t=o(t,[xl(this,t,e)]))?(mc(this,[t]),t):null},ec.prototype.zc=function(t,e){return D(oc,t.namespaceURI)&&"gpx"==t.localName&&(t=g([],uc,t,[xl(this,t,e)]))?(mc(this,t),t):[]};var Sc=["text","type"],Mc=l(oc,{text:c(ku),type:c(ku)}),Pc=l(oc,"name cmt desc src link number type rtept".split(" ")),Ac=l(oc,{name:c(ku),cmt:c(ku),desc:c(ku),src:c(ku),link:c(wc),number:c(Fu),type:c(ku),rtept:ul(c(xc))}),Ec=l(oc,["ele","time"]),Tc=l(oc,"name cmt desc src link number type trkseg".split(" ")),jc=l(oc,{name:c(ku),cmt:c(ku),desc:c(ku),src:c(ku),link:c(wc),number:c(Fu),type:c(ku),trkseg:ul(c(function(t,e,o){vl({node:t,geometryLayout:e.ja,properties:{}},Lc,Cc,e.X(),o)}))}),Cc=cl("trkpt"),Lc=l(oc,{trkpt:c(xc)}),Rc=l(oc,"ele time magvar geoidheight name cmt desc src link sym type fix sat hdop vdop pdop ageofdgpsdata dgpsid".split(" ")),Ic=l(oc,{ele:c(Nu),time:c(function(t,e){e=new Date(1e3*e),t.appendChild(el.createTextNode(e.getUTCFullYear()+"-"+Qi(e.getUTCMonth()+1)+"-"+Qi(e.getUTCDate())+"T"+Qi(e.getUTCHours())+":"+Qi(e.getUTCMinutes())+":"+Qi(e.getUTCSeconds())+"Z"))}),magvar:c(Nu),geoidheight:c(Nu),name:c(ku),cmt:c(ku),desc:c(ku),src:c(ku),link:c(wc),sym:c(ku),type:c(ku),fix:c(ku),sat:c(Fu),hdop:c(Nu),vdop:c(Nu),pdop:c(Nu),ageofdgpsdata:c(Nu),dgpsid:c(Fu)}),Nc={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function Fc(t,e){if(t=(t=t.V())&&Nc[t.U()])return ol(e[e.length-1].node.namespaceURI,t)}var kc=l(oc,{rte:c(function(t,e,o){var i=o[0],r=e.N();t={node:t,properties:r},(e=e.V())&&(e=Ml(e,!0,i),t.geometryLayout=e.ja,r.rtept=e.X()),r=yl(r,i=Pc[o[o.length-1].node.namespaceURI]),vl(t,Ac,fl,r,o,i)}),trk:c(function(t,e,o){var i=o[0],r=e.N();t={node:t,properties:r},(e=e.V())&&(e=Ml(e,!0,i),r.trkseg=e.gd()),r=yl(r,i=Tc[o[o.length-1].node.namespaceURI]),vl(t,jc,fl,r,o,i)}),wpt:c(function(t,e,o){var i=o[0],r=o[o.length-1];r.properties=e.N(),(e=e.V())&&(e=Ml(e,!0,i),r.geometryLayout=e.ja,xc(t,e.X(),o))})});function Dc(){wl.call(this)}function Oc(t){return"string"==typeof t?t:""}function Uc(t){t=t||{},wl.call(this),this.defaultDataProjection=v("EPSG:4326"),this.b=t.altitudeMode||"none"}ec.prototype.Xb=function(t,e){e=Sl(this,e);var o=ol("http://www.topografix.com/GPX/1/1","gpx");return o.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance"),o.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation","http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"),o.setAttribute("version","1.1"),o.setAttribute("creator","OpenLayers"),vl({node:o},kc,Fc,t,[e]),o},e(Dc,wl),(r=Dc.prototype).U=function(){return"text"},r.Tb=function(t,e){return this.ae(Oc(t),Sl(this,e))},r.Oa=function(t,e){return this.zg(Oc(t),Sl(this,e))},r.Sc=function(t,e){return this.wd(Oc(t),Sl(this,e))},r.kb=function(){return this.defaultDataProjection},r.Bd=function(t,e){return this.ge(t,Sl(this,e))},r.Wb=function(t,e){return this.Wg(t,Sl(this,e))},r.$c=function(t,e){return this.Cd(t,Sl(this,e))},e(Uc,Dc);var Gc,Bc,Xc,Vc,Wc,Zc,Kc,zc,Yc,Hc,qc,Jc,_c,$c,Qc,tf=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,ef=/^H.([A-Z]{3}).*?:(.*)/,of=/^HFDTE(\d{2})(\d{2})(\d{2})/,rf=/\r\n|\r|\n/;function nf(t,e,o,i,r,n){eo.call(this),this.j=null,this.M=t||new Image,null!==i&&(this.M.crossOrigin=i),this.c=n?document.createElement("CANVAS"):null,this.g=n,this.f=null,this.i=r,this.a=o,this.o=e,this.l=!1,2==this.i&&sf(this)}function sf(e){var t=Po(1,1);try{t.drawImage(e.M,0,0),t.getImageData(0,0,1,1)}catch(t){e.l=!0}}function af(t){this.o=void 0!==(t=t||{}).anchor?t.anchor:[.5,.5],this.u=null,this.i=void 0!==t.anchorOrigin?t.anchorOrigin:"top-left",this.C=void 0!==t.anchorXUnits?t.anchorXUnits:"fraction",this.B=void 0!==t.anchorYUnits?t.anchorYUnits:"fraction",this.ra=void 0!==t.crossOrigin?t.crossOrigin:null;var e=void 0!==t.img?t.img:null,o=void 0!==t.imgSize?t.imgSize:null,i=t.src,r=(O(!(void 0!==i&&e),4),O(!e||o,5),O(void 0!==(i=void 0!==i&&i.length||!e?i:e.src||U(e).toString())&&0<i.length,6),void 0!==t.src?0:2),n=(this.j=void 0!==t.color?vo(t.color):null,this.ra),s=this.j,a=vs.get(i,n,s);a||(a=new nf(e,i,o,n,r,s),vs.set(i,n,s,a)),this.b=a,this.oa=void 0!==t.offset?t.offset:[0,0],this.c=void 0!==t.offsetOrigin?t.offsetOrigin:"top-left",this.S=null,this.D=void 0!==t.size?t.size:null,Zh.call(this,{opacity:void 0!==t.opacity?t.opacity:1,rotation:void 0!==t.rotation?t.rotation:0,scale:void 0!==t.scale?t.scale:1,snapToPixel:void 0===t.snapToPixel||t.snapToPixel,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView})}function pf(t){this.a=(t=t||{}).font,this.f=t.rotation,this.o=t.rotateWithView,this.b=t.scale,this.Ia=t.text,this.g=t.textAlign,this.j=t.textBaseline,this.Va=void 0!==t.fill?t.fill:new Hh({color:"#333"}),this.Ya=void 0!==t.stroke?t.stroke:null,this.i=void 0!==t.offsetX?t.offsetX:0,this.c=void 0!==t.offsetY?t.offsetY:0}function hf(t){t=t||{},wu.call(this),Gc||(Xc=new Hh({color:Bc=[255,255,255,1]}),Zc=Wc="pixels",Hc=new af({anchor:Vc=[20,2],anchorOrigin:"bottom-left",anchorXUnits:Wc,anchorYUnits:Zc,crossOrigin:"anonymous",rotation:0,scale:Yc=.5,size:Kc=[64,64],src:zc="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png"}),qc="NO_IMAGE",Jc=new hp({color:Bc,width:1}),_c=new hp({color:[51,51,51,1],width:2}),$c=new pf({font:"bold 16px Helvetica",fill:Xc,stroke:_c,scale:.8}),Qc=new qh({fill:Xc,image:Hc,text:$c,stroke:Jc,zIndex:0}),Gc=[Qc]),this.defaultDataProjection=v("EPSG:4326"),this.a=t.defaultStyle||Gc,this.c=void 0===t.extractStyles||t.extractStyles,this.j=void 0===t.writeStyles||t.writeStyles,this.b={},this.g=void 0===t.showPointNames||t.showPointNames}(r=Uc.prototype).ae=function(t,e){for(var o=this.b,i=t.split(rf),r=(t={},[]),n=2e3,s=0,a=1,p=-1,h=0,l=i.length;h<l;++h){var u,c,f,y,g,d=i[h];"B"==d.charAt(0)?(u=tf.exec(d))&&(d=parseInt(u[1],10),c=parseInt(u[2],10),f=parseInt(u[3],10),y=parseInt(u[4],10)+parseInt(u[5],10)/6e4,"S"==u[6]&&(y=-y),g=parseInt(u[7],10)+parseInt(u[8],10)/6e4,"W"==u[9]&&(g=-g),r.push(g,y),"none"!=o&&r.push("gps"==o?parseInt(u[11],10):"barometric"==o?parseInt(u[12],10):0),(u=Date.UTC(n,s,a,d,c,f))<p&&(u=Date.UTC(n,s,a+1,d,c,f)),r.push(u/1e3),p=u):"H"==d.charAt(0)&&((u=of.exec(d))?(a=parseInt(u[1],10),s=parseInt(u[2],10)-1,n=2e3+parseInt(u[3],10)):(u=ef.exec(d))&&(t[u[1]]=u[2].trim()))}return r.length?((i=new S(null)).ba("none"==o?"XYM":"XYZM",r),(e=new x(Ml(i,!1,e))).H(t),e):null},r.zg=function(t,e){return(t=this.ae(t,e))?[t]:[]},r.ge=function(){},r.Wg=function(){},r.Cd=function(){},r.wd=function(){},e(nf,eo),nf.prototype.v=function(){this.i=3,this.f.forEach(qe),this.f=null,this.b("change")},nf.prototype.u=function(){if(this.i=2,this.a&&(this.M.width=this.a[0],this.M.height=this.a[1]),this.a=[this.M.width,this.M.height],this.f.forEach(qe),this.f=null,sf(this),!this.l&&null!==this.g){this.c.width=this.M.width,this.c.height=this.M.height;var t=this.c.getContext("2d");t.drawImage(this.M,0,0);for(var e=t.getImageData(0,0,this.M.width,this.M.height),o=e.data,i=this.g[0]/255,r=this.g[1]/255,n=this.g[2]/255,s=0,a=o.length;s<a;s+=4)o[s]*=i,o[s+1]*=r,o[s+2]*=n;t.putImageData(e,0,0)}this.b("change")},nf.prototype.Y=function(){return this.c||this.M},nf.prototype.load=function(){if(0==this.i){this.i=1,this.f=[Ye(this.M,"error",this.v,this),Ye(this.M,"load",this.u,this)];try{this.M.src=this.o}catch(t){this.v()}}},e(af,Zh),(r=af.prototype).clone=function(){var t,e,o=this.Y(1);return 2===this.b.i&&("IMG"===o.tagName.toUpperCase()?t=o.cloneNode(!0):(e=(t=document.createElement("canvas")).getContext("2d"),t.width=o.width,t.height=o.height,e.drawImage(o,0,0))),new af({anchor:this.o.slice(),anchorOrigin:this.i,anchorXUnits:this.C,anchorYUnits:this.B,crossOrigin:this.ra,color:this.j&&this.j.slice?this.j.slice():this.j||void 0,img:t||void 0,imgSize:t?this.b.a.slice():void 0,src:t?void 0:this.b.o,offset:this.oa.slice(),offsetOrigin:this.c,size:null!==this.D?this.D.slice():void 0,opacity:this.f,scale:this.a,snapToPixel:this.v,rotation:this.g,rotateWithView:this.l})},r.Hc=function(){if(this.u)return this.u;var t=this.o,e=this.ic();if("fraction"==this.C||"fraction"==this.B){if(!e)return null;t=this.o.slice(),"fraction"==this.C&&(t[0]*=e[0]),"fraction"==this.B&&(t[1]*=e[1])}if("top-left"!=this.i){if(!e)return null;t===this.o&&(t=this.o.slice()),"top-right"!=this.i&&"bottom-right"!=this.i||(t[0]=-t[0]+e[0]),"bottom-left"!=this.i&&"bottom-right"!=this.i||(t[1]=-t[1]+e[1])}return this.u=t},r.Lo=function(){return this.j},r.Y=function(t){return this.b.Y(t)},r.ye=function(){return this.b.a},r.Ye=function(){return this.b.i},r.qg=function(){var t,e,o,i=this.b;return i.j||(i.l?((o=Po(t=i.a[0],e=i.a[1])).fillRect(0,0,t,e),i.j=o.canvas):i.j=i.M),i.j},r.Oc=function(){if(this.S)return this.S;var t=this.oa;if("top-left"!=this.c){var e=this.ic(),o=this.b.a;if(!e||!o)return null;t=t.slice(),"top-right"!=this.c&&"bottom-right"!=this.c||(t[0]=o[0]-e[0]-t[0]),"bottom-left"!=this.c&&"bottom-right"!=this.c||(t[1]=o[1]-e[1]-t[1])}return this.S=t},r.Mo=function(){return this.b.o},r.ic=function(){return this.D||this.b.a},r.Nh=function(t,e){return d(this.b,"change",t,e)},r.load=function(){this.b.load()},r.Bj=function(t,e){He(this.b,"change",t,e)},(r=pf.prototype).clone=function(){return new pf({font:this.a,rotation:this.f,rotateWithView:this.o,scale:this.b,text:this.Na(),textAlign:this.g,textBaseline:this.j,fill:this.Fa()?this.Fa().clone():void 0,stroke:this.Ga()?this.Ga().clone():void 0,offsetX:this.i,offsetY:this.c})},r.Nk=function(){return this.a},r.cl=function(){return this.i},r.dl=function(){return this.c},r.Fa=function(){return this.Va},r.Ro=function(){return this.o},r.So=function(){return this.f},r.To=function(){return this.b},r.Ga=function(){return this.Ya},r.Na=function(){return this.Ia},r.nl=function(){return this.g},r.ol=function(){return this.j},r.nj=function(t){this.a=t},r.sj=function(t){this.i=t},r.tj=function(t){this.c=t},r.pf=function(t){this.Va=t},r.Uo=function(t){this.f=t},r.Si=function(t){this.b=t},r.qf=function(t){this.Ya=t},r.xd=function(t){this.Ia=t},r.vj=function(t){this.g=t},r.hq=function(t){this.j=t},e(hf,wu);var lf=["http://www.google.com/kml/ext/2.2"],n=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],uf={fraction:"fraction",pixels:"pixels",insetPixels:"pixels"};function cf(t,e){var o,i=[0,0],r="start";return t.Y()&&2==(o=null===(o=t.Y().ye())?Kc:o).length&&(r=t.Y().a,i[0]=r*o[0]/2,i[1]=-r*o[1]/2,r="left"),null!==t.Na()?((t=(o=t.Na()).clone()).nj(o.a||$c.a),t.Si(o.b||$c.b),t.pf(o.Fa()||$c.Fa()),t.qf(o.Ga()||_c)):t=$c.clone(),t.xd(e),t.sj(i[0]),t.tj(i[1]),t.vj(r),new qh({text:t})}function ff(i,r,n,s,a){return function(){var t,e=a,o="";return(e=e&&this.V()?"Point"===this.V().U():e)&&(o=this.get("name"),e=e&&o),i?e?(e=cf(i[0],o),i.concat(e)):i:r?(t=function t(e,o,i){return Array.isArray(e)?e:"string"==typeof e?(!(e in i)&&"#"+e in i&&(e="#"+e),t(i[e],o,i)):o}(r,n,s),e?(e=cf(t[0],o),t.concat(e)):t):e?(e=cf(n[0],o),n.concat(e)):n}}function yf(t){if(t=il(t,!1),t=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(t))return t=t[1],[parseInt(t.substr(6,2),16),parseInt(t.substr(4,2),16),parseInt(t.substr(2,2),16),parseInt(t.substr(0,2),16)/255]}function gf(t){t=il(t,!1);for(var e,o=[],i=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?))?\s*/i;e=i.exec(t);)o.push(parseFloat(e[1]),parseFloat(e[2]),e[3]?parseFloat(e[3]):0),t=t.substr(e[0].length);if(""===t)return o}function df(t){var e=il(t,!1).trim();return t.baseURI&&"about:blank"!==t.baseURI?new URL(e,t.baseURI).href:e}function vf(t){return ju(t)}function bf(t,e){return g(null,kf,t,e)}function mf(t,e){if(e=g({A:[],Ej:[]},Of,t,e)){t=e.A,e=e.Ej;for(var o=0,i=Math.min(t.length,e.length);o<i;++o)t[4*o+3]=e[o];return(e=new S(null)).ba("XYZM",t),e}}function wf(t,e){var o=g({},Ff,t,e);if(t=g(null,Uf,t,e))return(e=new S(null)).ba("XYZ",t),e.H(o),e}function xf(t,e){var o=g({},Ff,t,e);if(t=g(null,Uf,t,e))return(e=new w(null)).ba("XYZ",t,[t.length]),e.H(o),e}function Sf(t,e){if(!(t=g([],Zf,t,e)))return null;if(!t.length)return new uu(t);var o=!0,i=t[0].U(),r=1;for(s=t.length;r<s;++r)if((e=t[r]).U()!=i){o=!1;break}if(o)if("Point"==i){for(var n=t[0],o=n.ja,i=n.ga(),r=1,s=t.length;r<s;++r)X(i,(e=t[r]).ga());(n=new P(null)).ba(o,i),Ef(n,t)}else"LineString"==i?(Ll(n=new M(null),t),Ef(n,t)):"Polygon"==i?(Fl(n=new f(null),t),Ef(n,t)):"GeometryCollection"==i?n=new uu(t):O(!1,37);else n=new uu(t);return n}function Mf(t,e){var o=g({},Ff,t,e);if(t=g(null,Uf,t,e))return(e=new m(null)).ba("XYZ",t),e.H(o),e}function Pf(t,e){var o=g({},Ff,t,e);if((t=g([null],Df,t,e))&&t[0]){e=new w(null);for(var i=t[0],r=[i.length],n=1,s=t.length;n<s;++n)X(i,t[n]),r.push(i.length);return e.ba("XYZ",i,r),e.H(o),e}}function Af(t,e){if(!(e=g({},Qf,t,e)))return null;t="fillStyle"in e?e.fillStyle:Xc;var o=e.fill,i=(void 0===o||o||(t=null),(o="imageStyle"in e?e.imageStyle:Hc)==qc&&(o=void 0),"textStyle"in e?e.textStyle:$c),r="strokeStyle"in e?e.strokeStyle:Jc;return[new qh({fill:t,image:o,stroke:r=void 0===(e=e.outline)||e?r:null,text:i,zIndex:void 0})]}function Ef(t,e){for(var o,i=e.length,r=Array(e.length),n=Array(e.length),s=o=!1,a=0;a<i;++a){var p=e[a];r[a]=p.get("extrude"),n[a]=p.get("altitudeMode"),s=s||void 0!==r[a],o=o||n[a]}s&&t.set("extrude",r),o&&t.set("altitudeMode",n)}function Tf(t,e){gl(Lf,t,e)}function jf(t,e){gl(Rf,t,e)}var Cf=l(n,{displayName:o(i),value:o(i)}),Lf=l(n,{Data:function(t,e){var o=t.getAttribute("name");gl(Cf,t,e),t=e[e.length-1],null!==o?t[o]=t.value:null!==t.displayName&&(t[t.displayName]=t.value)},SchemaData:function(t,e){gl($f,t,e)}}),Rf=l(n,{LatLonAltBox:function(t,e){(t=g({},If,t,e))&&((e=e[e.length-1]).extent=[parseFloat(t.west),parseFloat(t.south),parseFloat(t.east),parseFloat(t.north)],e.altitudeMode=t.altitudeMode,e.minAltitude=parseFloat(t.minAltitude),e.maxAltitude=parseFloat(t.maxAltitude))},Lod:function(t,e){(t=g({},Nf,t,e))&&((e=e[e.length-1]).minLodPixels=parseFloat(t.minLodPixels),e.maxLodPixels=parseFloat(t.maxLodPixels),e.minFadeExtent=parseFloat(t.minFadeExtent),e.maxFadeExtent=parseFloat(t.maxFadeExtent))}}),If=l(n,{altitudeMode:o(i),minAltitude:o(ju),maxAltitude:o(ju),north:o(ju),south:o(ju),east:o(ju),west:o(ju)}),Nf=l(n,{minLodPixels:o(ju),maxLodPixels:o(ju),minFadeExtent:o(ju),maxFadeExtent:o(ju)}),Ff=l(n,{extrude:o(Au),altitudeMode:o(i)}),kf=l(n,{coordinates:hl(gf)}),Df=l(n,{innerBoundaryIs:function(t,e){(t=g(void 0,Xf,t,e))&&e[e.length-1].push(t)},outerBoundaryIs:function(t,e){(t=g(void 0,Hf,t,e))&&(e[e.length-1][0]=t)}}),Of=l(n,{when:function(t,e){e=e[e.length-1].Ej,t=il(t,!1),t=Date.parse(t),e.push(isNaN(t)?0:t)}},l(lf,{coord:function(t,e){e=e[e.length-1].A,t=il(t,!1),(t=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(t))?e.push(parseFloat(t[1]),parseFloat(t[2]),parseFloat(t[3]),0):e.push(0,0,0,0)}})),Uf=l(n,{coordinates:hl(gf)}),Gf=l(n,{href:o(df)},l(lf,{x:o(ju),y:o(ju),w:o(ju),h:o(ju)})),Bf=l(n,{Icon:o(function(t,e){return(t=g({},Gf,t,e))||null}),heading:o(ju),hotSpot:o(function(t){var e=t.getAttribute("xunits"),o=t.getAttribute("yunits"),i="insetPixels"!==e?"insetPixels"!==o?"bottom-left":"top-left":"insetPixels"!==o?"bottom-right":"top-right";return{x:parseFloat(t.getAttribute("x")),Xg:uf[e],y:parseFloat(t.getAttribute("y")),Yg:uf[o],origin:i}}),scale:o(vf)}),Xf=l(n,{LinearRing:hl(bf)}),Vf=l(n,{color:o(yf),scale:o(vf)}),Wf=l(n,{color:o(yf),width:o(ju)}),Zf=l(n,{LineString:pl(wf),LinearRing:pl(xf),MultiGeometry:pl(Sf),Point:pl(Mf),Polygon:pl(Pf)}),Kf=l(lf,{Track:pl(mf)}),zf=l(n,{ExtendedData:Tf,Region:jf,Link:function(t,e){gl(Yf,t,e)},address:o(i),description:o(i),name:o(i),open:o(Au),phoneNumber:o(i),visibility:o(Au)}),Yf=l(n,{href:o(df)}),Hf=l(n,{LinearRing:hl(bf)}),qf=l(n,{Style:o(Af),key:o(i),styleUrl:o(df)}),Jf=l(n,{ExtendedData:Tf,Region:jf,MultiGeometry:o(Sf,"geometry"),LineString:o(wf,"geometry"),LinearRing:o(xf,"geometry"),Point:o(Mf,"geometry"),Polygon:o(Pf,"geometry"),Style:o(Af),StyleMap:function(t,e){(t=g(void 0,ty,t,e))&&(e=e[e.length-1],Array.isArray(t)?e.Style=t:"string"==typeof t?e.styleUrl=t:O(!1,38))},address:o(i),description:o(i),name:o(i),open:o(Au),phoneNumber:o(i),styleUrl:o(df),visibility:o(Au)},l(lf,{MultiTrack:o(function(t,e){if(t=g([],Kf,t,e))return Ll(e=new M(null),t),e},"geometry"),Track:o(mf,"geometry")})),_f=l(n,{color:o(yf),fill:o(Au),outline:o(Au)}),$f=l(n,{SimpleData:function(t,e){var o=t.getAttribute("name");null!==o&&(t=i(t),e[e.length-1][o]=t)}}),Qf=l(n,{IconStyle:function(t,e){var o,i,r,n,s,a,p,h,l,u,c,f;(t=g({},Bf,t,e))&&(e=e[e.length-1],f="Icon"in t?t.Icon:{},o=!("Icon"in t)||0<Object.keys(f).length,(r=f.href)?i=r:o&&(i=zc),r="bottom-left",(u=t.hotSpot)?(n=[u.x,u.y],s=u.Xg,a=u.Yg,r=u.origin):i===zc?(n=Vc,s=Wc,a=Zc):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(i)&&(n=[.5,0],a=s="fraction"),u=f.x,h=f.y,void 0!==u&&void 0!==h&&(p=[u,h]),u=f.w,f=f.h,void 0!==u&&void 0!==f&&(l=[u,f]),void 0!==(f=t.heading)&&(c=it(f)),t=t.scale,o?(i=new af({anchor:n,anchorOrigin:r,anchorXUnits:s,anchorYUnits:a,crossOrigin:"anonymous",offset:p,offsetOrigin:"bottom-left",rotation:c,scale:t=i==zc&&(l=Kc,void 0===t)?Yc:t,size:l,src:i}),e.imageStyle=i):e.imageStyle=qc)},LabelStyle:function(t,e){(t=g({},Vf,t,e))&&(e[e.length-1].textStyle=new pf({fill:new Hh({color:"color"in t?t.color:Bc}),scale:t.scale}))},LineStyle:function(t,e){(t=g({},Wf,t,e))&&(e[e.length-1].strokeStyle=new hp({color:"color"in t?t.color:Bc,width:"width"in t?t.width:1}))},PolyStyle:function(t,e){var o;(t=g({},_f,t,e))&&((e=e[e.length-1]).fillStyle=new Hh({color:"color"in t?t.color:Bc}),void 0!==(o=t.fill)&&(e.fill=o),void 0!==(t=t.outline))&&(e.outline=t)}}),ty=l(n,{Pair:function(t,e){var o;(t=g({},qf,t,e))&&(o=t.key)&&"normal"==o&&((o=t.styleUrl)&&(e[e.length-1]=o),t=t.Style)&&(e[e.length-1]=t)}});function ey(t,e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE){var o=oy(t,e);if(o)return o}}function oy(t,e){for(var o=e.firstElementChild;o;o=o.nextElementSibling)if(D(n,o.namespaceURI)&&"name"==o.localName)return i(o);for(o=e.firstElementChild;o;o=o.nextElementSibling)if(e=o.localName,D(n,o.namespaceURI)&&("Document"==e||"Folder"==e||"Placemark"==e||"kml"==e)&&(e=oy(t,o)))return e}function iy(t,e){var o=[];for(e=e.firstChild;e;e=e.nextSibling)e.nodeType==Node.ELEMENT_NODE&&X(o,ry(t,e));return o}function ry(t,e){for(var o,i=[],r=e.firstElementChild;r;r=r.nextElementSibling)D(n,r.namespaceURI)&&"NetworkLink"==r.localName&&(o=g({},zf,r,[]),i.push(o));for(r=e.firstElementChild;r;r=r.nextElementSibling)e=r.localName,!D(n,r.namespaceURI)||"Document"!=e&&"Folder"!=e&&"kml"!=e||X(i,ry(t,r));return i}function ny(t,e){var o=[];for(e=e.firstChild;e;e=e.nextSibling)e.nodeType==Node.ELEMENT_NODE&&X(o,t.lf(e));return o}function sy(t,e){var o;for(e=[255*(4==(e=vo(e)).length?e[3]:1),e[2],e[1],e[0]],o=0;o<4;++o){var i=parseInt(e[o],10).toString(16);e[o]=1==i.length?"0"+i:i}ku(t,e.join(""))}function ay(t,e,o){t={node:t};var i,r,n=e.U();"GeometryCollection"==n?(i=e.Vf(),r=Oy):"MultiPoint"==n?(i=e.Zd(),r=zy):"MultiLineString"==n?(i=e.gd(),r=Yy):"MultiPolygon"==n?(i=e.Td(),r=qy):O(!1,39),vl(t,Ty,r,i,o)}function py(t,e,o){vl({node:t},Ey,Hy,[e],o)}function hy(t,e,o){var i,r={node:t},n=(e.a&&t.setAttribute("id",e.a),t=e.N(),{address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1}),s=(n[e.c]=1,Object.keys(t||{}).sort().filter(function(t){return!n[t]}));0<s.length&&(i=yl(t,s),vl(r,Cy,Zy,[{names:s,values:i}],o)),(s=(s=e.Lc())&&s.call(e,0))&&(s=Array.isArray(s)?s[0]:s,this.j&&(t.Style=s),s=s.Na())&&(t.name=s.Na()),t=yl(t,s=jy[o[o.length-1].node.namespaceURI]),vl(r,Cy,fl,t,o,s),t=o[0],e=(e=e.V())&&Ml(e,!0,t),vl(r,Cy,Oy,[e],o)}function ly(t,e,o){var i=e.ga();(t={node:t}).layout=e.ja,t.stride=e.qa(),vl(t,Ly,Vy,[i],o)}function uy(t,e,o){var i=(e=e.Sd()).shift();vl(t={node:t},Ry,Ky,e,o),vl(t,Ry,Jy,[i],o)}function cy(t,e){Nu(t,Math.round(1e6*e)/1e6)}(r=hf.prototype).vg=function(t,e){if(t=g([],l(n,{Document:al(this.vg,this),Folder:al(this.vg,this),Placemark:pl(this.Dg,this),Style:this.Jp.bind(this),StyleMap:this.Ip.bind(this)}),t,e,this))return t},r.Dg=function(t,e){var o,i=g({geometry:null},Jf,t,e);if(i)return o=new x,null!==(t=t.getAttribute("id"))&&o.jc(t),e=e[0],(t=i.geometry)&&Ml(t,!1,e),o.Ra(t),delete i.geometry,this.c&&o.hg(ff(i.Style,i.styleUrl,this.a,this.b,this.g)),delete i.Style,o.H(i),o},r.Jp=function(t,e){var o=t.getAttribute("id");null!==o&&(e=Af(t,e))&&(t=t.baseURI&&"about:blank"!==t.baseURI?new URL("#"+o,t.baseURI).href:"#"+o,this.b[t]=e)},r.Ip=function(t,e){var o=t.getAttribute("id");null!==o&&(e=g(void 0,ty,t,e))&&(t=t.baseURI&&"about:blank"!==t.baseURI?new URL("#"+o,t.baseURI).href:"#"+o,this.b[t]=e)},r.xg=function(t,e){return D(n,t.namespaceURI)&&(t=this.Dg(t,[xl(this,t,e)]))||null},r.zc=function(t,e){if(!D(n,t.namespaceURI))return[];var o=t.localName;if("Document"==o||"Folder"==o)return(o=this.vg(t,[xl(this,t,e)]))||[];if("Placemark"==o)return(e=this.Dg(t,[xl(this,t,e)]))?[e]:[];if("kml"!=o)return[];for(o=[],t=t.firstElementChild;t;t=t.nextElementSibling){var i=this.zc(t,e);i&&X(o,i)}return o},r.Cp=function(t){return rl(t)?ey(this,t):nl(t)?oy(this,t):"string"==typeof t?ey(this,t=sl(t)):void 0},r.Dp=function(t){var e=[];return rl(t)?X(e,iy(this,t)):nl(t)?X(e,ry(this,t)):"string"==typeof t&&X(e,iy(this,t=sl(t))),e},r.Gp=function(t){var e=[];return rl(t)?X(e,ny(this,t)):nl(t)?X(e,this.lf(t)):"string"==typeof t&&X(e,ny(this,t=sl(t))),e},r.lf=function(t){for(var e,o=[],i=t.firstElementChild;i;i=i.nextElementSibling)D(n,i.namespaceURI)&&"Region"==i.localName&&(e=g({},Rf,i,[]),o.push(e));for(i=t.firstElementChild;i;i=i.nextElementSibling)t=i.localName,!D(n,i.namespaceURI)||"Document"!=t&&"Folder"!=t&&"kml"!=t||X(o,this.lf(i));return o};var fy=l(n,["Document","Placemark"]),yy=l(n,{Document:c(function(t,e,o){vl({node:t},gy,Dy,e,o,void 0,this)}),Placemark:c(hy)}),gy=l(n,{Placemark:c(hy)}),dy=l(n,{Data:c(function(t,e,o){t.setAttribute("name",e.name),t={node:t},"object"==typeof(e=e.value)?(null!==e&&e.displayName&&vl(t,dy,fl,[e.displayName],o,["displayName"]),null!==e&&e.value&&vl(t,dy,fl,[e.value],o,["value"])):vl(t,dy,fl,[e],o,["value"])}),value:c(function(t,e){ku(t,e)}),displayName:c(function(t,e){t.appendChild(el.createCDATASection(e))})}),vy={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},by=l(n,["href"],l(lf,["x","y","w","h"])),my=l(n,{href:c(ku)},l(lf,{x:c(Nu),y:c(Nu),w:c(Nu),h:c(Nu)})),wy=l(n,["scale","heading","Icon","hotSpot"]),xy=l(n,{Icon:c(function(t,e,o){t={node:t};var i=by[o[o.length-1].node.namespaceURI],r=yl(e,i);vl(t,my,fl,r,o,i),r=yl(e,i=by[lf[0]]),vl(t,my,ky,r,o,i)}),heading:c(Nu),hotSpot:c(function(t,e){t.setAttribute("x",e.x),t.setAttribute("y",e.y),t.setAttribute("xunits",e.Xg),t.setAttribute("yunits",e.Yg)}),scale:c(cy)}),Sy=l(n,["color","scale"]),My=l(n,{color:c(sy),scale:c(cy)}),Py=l(n,["color","width"]),Ay=l(n,{color:c(sy),width:c(Nu)}),Ey=l(n,{LinearRing:c(ly)}),Ty=l(n,{LineString:c(ly),Point:c(ly),Polygon:c(uy),GeometryCollection:c(ay)}),jy=l(n,"name open visibility address phoneNumber description styleUrl Style".split(" ")),Cy=l(n,{ExtendedData:c(function(t,e,o){t={node:t};var i=e.names;e=e.values;for(var r=i.length,n=0;n<r;n++)vl(t,dy,Wy,[{name:i[n],value:e[n]}],o)}),MultiGeometry:c(ay),LineString:c(ly),LinearRing:c(ly),Point:c(ly),Polygon:c(uy),Style:c(function(t,e,o){t={node:t};var i={},r=e.Fa(),n=e.Ga(),s=e.Y();e=e.Na(),s instanceof af&&(i.IconStyle=s),e&&(i.LabelStyle=e),n&&(i.LineStyle=n),r&&(i.PolyStyle=r),i=yl(i,e=Ny[o[o.length-1].node.namespaceURI]),vl(t,Fy,fl,i,o,e)}),address:c(ku),description:c(ku),name:c(ku),open:c(Iu),phoneNumber:c(ku),styleUrl:c(ku),visibility:c(Iu)}),Ly=l(n,{coordinates:c(function(t,e,o){var i,r=(o=o[o.length-1]).layout;o=o.stride,"XY"==r||"XYM"==r?i=2:"XYZ"==r||"XYZM"==r?i=3:O(!1,34);var n,s=e.length,a="";if(0<s){for(a+=e[0],r=1;r<i;++r)a+=","+e[r];for(n=o;n<s;n+=o)for(a+=" "+e[n],r=1;r<i;++r)a+=","+e[n+r]}ku(t,a)})}),Ry=l(n,{outerBoundaryIs:c(py),innerBoundaryIs:c(py)}),Iy=l(n,{color:c(sy)}),Ny=l(n,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),Fy=l(n,{IconStyle:c(function(t,e,o){t={node:t};var i,r,n={},s=e.ic(),a=e.ye(),p={href:e.b.o};s&&(p.w=s[0],p.h=s[1],i=e.Hc(),(r=e.Oc())&&a&&r[0]&&r[1]!==s[1]&&(p.x=r[0],p.y=a[1]-(r[1]+s[1])),i)&&i[0]&&i[1]!==s[1]&&(n.hotSpot={x:i[0],Xg:"pixels",y:s[1]-i[1],Yg:"pixels"}),n.Icon=p,1!==(s=e.a)&&(n.scale=s),(e=e.g)&&(n.heading=e),n=yl(n,e=wy[o[o.length-1].node.namespaceURI]),vl(t,xy,fl,n,o,e)}),LabelStyle:c(function(t,e,o){t={node:t};var i={},r=e.Fa();r&&(i.color=r.b),(e=e.b)&&1!==e&&(i.scale=e),i=yl(i,e=Sy[o[o.length-1].node.namespaceURI]),vl(t,My,fl,i,o,e)}),LineStyle:c(function(t,e,o){t={node:t};var i=Py[o[o.length-1].node.namespaceURI];e=yl({color:e.a,width:e.c},i),vl(t,Ay,fl,e,o,i)}),PolyStyle:c(function(t,e,o){vl({node:t},Iy,Xy,[e.b],o)})});function ky(t,e,o){return ol(lf[0],"gx:"+o)}function Dy(t,e){return ol(e[e.length-1].node.namespaceURI,"Placemark")}function Oy(t,e){if(t)return ol(e[e.length-1].node.namespaceURI,vy[t.U()])}var Uy,Gy,By,Xy=cl("color"),Vy=cl("coordinates"),Wy=cl("Data"),Zy=cl("ExtendedData"),Ky=cl("innerBoundaryIs"),zy=cl("Point"),Yy=cl("LineString"),Hy=cl("LinearRing"),qy=cl("Polygon"),Jy=cl("outerBoundaryIs");function _y(t){this.lc=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.type=this.ea=0,this.length=this.lc.length}function $y(t,e,o){return o?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function Qy(t,e){this.layers=t.Ag(ng,{},e)}function tg(t,e){this.x=t,this.y=e}function eg(t,e,o,i,r){this.properties={},this.extent=o,this.type=0,this.Cc=t,this.Ef=-1,this.ne=i,this.pe=r,t.Ag(og,this,e)}function og(t,e,o){if(1==t)e.id=o.Ka();else if(2==t)for(t=o.Ka()+o.ea;o.ea<t;){var i=e.ne[o.Ka()],r=e.pe[o.Ka()];e.properties[i]=r}else 3==t?e.type=o.Ka():4==t&&(e.Ef=o.ea)}function ig(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this.Cc=t,this.ne=[],this.pe=[],this.me=[],t.Ag(rg,this,e),this.length=this.me.length}function rg(t,e,o){15===t?e.version=o.Ka():1===t?e.name=o.Gg():5===t?e.extent=o.Ka():2===t?e.me.push(o.ea):3===t?e.ne.push(o.Gg()):4===t&&e.pe.push(function(t){for(var e=null,o=t.Ka()+t.ea;t.ea<o;)e=1==(e=t.Ka()>>3)?t.Gg():2===e?t.yp():3===e?t.up():4===e?t.Kp():5===e?t.Ka():6===e?t.ce():7===e?t.sp():null;return e}(o))}function ng(t,e,o){3===t&&(t=new Gy(o,o.Ka()+o.ea)).length&&(e[t.name]=t)}function sg(t,e,o,i,r){this.g=r,this.i=t,this.b=e,this.f=o,this.c=i}function ag(t){wl.call(this),t=t||{},this.defaultDataProjection=new qt({code:"",units:"tile-pixels"}),this.b=t.featureClass||sg,this.a=t.geometryName,this.i=t.layerName||"layer",this.c=t.layers||null}function pg(t,e,o){for(var i=0,r=0,n=t.length;r<n;++r){for(var s=t[r],a=0,p=s.length;a<p;++a){var h=s[a];e.push(h.x,h.y)}i+=2*a,o.push(i)}}function hg(){wu.call(this),this.defaultDataProjection=v("EPSG:4326")}function lg(t,e){e[e.length-1].fe[t.getAttribute("k")]=t.getAttribute("v")}hf.prototype.Xb=function(t,e){e=Sl(this,e);var o=ol(n[4],"kml"),i=(o.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:gx",lf[0]),o.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance"),o.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd"),{node:o}),r={};return 1<t.length?r.Document=t:1==t.length&&(r.Placemark=t[0]),r=yl(r,t=fy[o.namespaceURI]),vl(i,yy,fl,r,[e],t,this),o},mp.Dd=function(){},ti=mp.Dd=mp.Dd||{},Uy=function(t,e,o,i,r){var n=8*r-i-1,s=(1<<n)-1,a=s>>1,p=-7,h=o?-1:1,l=t[e+(r=o?r-1:0)];for(r+=h,o=l&(1<<-p)-1,l>>=-p,p+=n;0<p;o=256*o+t[e+r],r+=h,p-=8);for(n=o&(1<<-p)-1,o>>=-p,p+=i;0<p;n=256*n+t[e+r],r+=h,p-=8);if(0===o)o=1-a;else{if(o===s)return n?NaN:1/0*(l?-1:1);n+=Math.pow(2,i),o-=a}return(l?-1:1)*n*Math.pow(2,o-i)},_y.c=0,_y.i=1,_y.b=2,_y.a=5,_y.prototype={Ag:function(t,e,o){for(o=o||this.length;this.ea<o;){var i=this.Ka(),r=i>>3,n=this.ea;this.type=7&i,t(r,e,this),this.ea===n&&this.mq(i)}return e},yp:function(){var t=Uy(this.lc,this.ea,!0,23,4);return this.ea+=4,t},up:function(){var t=Uy(this.lc,this.ea,!0,52,8);return this.ea+=8,t},Ka:function(t){var e=this.lc,o=e[this.ea++],i=127&o;if(o<128)return i;if(i|=(127&(o=e[this.ea++]))<<7,o<128)return i;if(i|=(127&(o=e[this.ea++]))<<14,o<128)return i;if(i|=(127&(o=e[this.ea++]))<<21,o<128)return i;var o=i|(15&e[this.ea])<<28,i=t,e=this,t=e.lc,r=t[e.ea++],n=(112&r)>>4;if(r<128)return $y(o,n,i);if(n|=(127&(r=t[e.ea++]))<<3,r<128)return $y(o,n,i);if(n|=(127&(r=t[e.ea++]))<<10,r<128)return $y(o,n,i);if(n|=(127&(r=t[e.ea++]))<<17,r<128)return $y(o,n,i);if(n|=(127&(r=t[e.ea++]))<<24,r<128)return $y(o,n,i);if((r=t[e.ea++])<128)return $y(o,n|(1&r)<<31,i);throw Error("Expected varint not more than 10 bytes")},Kp:function(){return this.Ka(!0)},ce:function(){var t=this.Ka();return 1==t%2?(t+1)/-2:t/2},sp:function(){return!!this.Ka()},Gg:function(){for(var t=this.Ka()+this.ea,e=this.lc,o="",i=this.ea;i<t;){var r,n,s,a=e[i],p=null,h=239<a?4:223<a?3:191<a?2:1;if(t<i+h)break;1===h?a<128&&(p=a):2===h?128==(192&(r=e[i+1]))&&(p=(31&a)<<6|63&r)<=127&&(p=null):3===h?(r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&((p=(15&a)<<12|(63&r)<<6|63&n)<=2047||55296<=p&&p<=57343)&&(p=null)):4===h&&(r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r))&&128==(192&n)&&128==(192&s)&&((p=(15&a)<<18|(63&r)<<12|(63&n)<<6|63&s)<=65535||1114112<=p)&&(p=null),null===p?(p=65533,h=1):65535<p&&(p-=65536,o+=String.fromCharCode(p>>>10&1023|55296),p=56320|1023&p),o+=String.fromCharCode(p),i+=h}return this.ea=t,o},mq:function(t){if((t&=7)===_y.c)for(;127<this.lc[this.ea++];);else if(t===_y.b)this.ea=this.Ka()+this.ea;else if(t===_y.a)this.ea+=4;else{if(t!==_y.i)throw Error("Unimplemented type: "+t);this.ea+=8}}},ti.default=_y,mp.Dd=mp.Dd.default,mp.xf={},mp.xf.Bf=function(){},fi=mp.xf=mp.xf||{},tg.prototype={clone:function(){return new tg(this.x,this.y)},add:function(t){return this.clone().Yj(t)},rotate:function(t){return this.clone().hk(t)},round:function(){return this.clone().ik()},angle:function(){return Math.atan2(this.y,this.x)},Yj:function(t){return this.x+=t.x,this.y+=t.y,this},hk:function(t){var e=Math.cos(t),o=(t=Math.sin(t))*this.x+e*this.y;return this.x=e*this.x-t*this.y,this.y=o,this},ik:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},tg.Kq=function(t){return!(t instanceof tg)&&Array.isArray(t)?new tg(t[0],t[1]):t},eg.b=["Unknown","Point","LineString","Polygon"],eg.prototype.Oh=function(){var t=this.Cc;t.ea=this.Ef;for(var e,o=t.Ka()+t.ea,i=1,r=0,n=0,s=0,a=[];t.ea<o;)if(r||(i=7&(r=t.Ka()),r>>=3),r--,1===i||2===i)n+=t.ce(),s+=t.ce(),1===i&&(e&&a.push(e),e=[]),e.push(new tg(n,s));else{if(7!==i)throw Error("unknown command "+i);e&&e.push(e[0].clone())}return e&&a.push(e),a},eg.prototype.bbox=function(){var t=this.Cc;t.ea=this.Ef;for(var e=t.Ka()+t.ea,o=1,i=0,r=0,n=0,s=1/0,a=-1/0,p=1/0,h=-1/0;t.ea<e;)if(i||(o=7&(i=t.Ka()),i>>=3),i--,1===o||2===o)(r+=t.ce())<s&&(s=r),a<r&&(a=r),(n+=t.ce())<p&&(p=n),h<n&&(h=n);else if(7!==o)throw Error("unknown command "+o);return[s,p,a,h]},(Gy=ig).prototype.feature=function(t){if(t<0||t>=this.me.length)throw Error("feature index out of bounds");return this.Cc.ea=this.me[t],t=this.Cc.Ka()+this.Cc.ea,new eg(this.Cc,t,this.extent,this.ne,this.pe)},By=Gy,fi.default={Bf:Qy,Wj:eg,Xj:By},fi.Bf=Qy,fi.Wj=eg,fi.Xj=By,(r=sg.prototype).get=function(t){return this.c[t]},r.Bb=function(){return this.f},r.G=function(){return this.a||(this.a="Point"===this.i?wt(this.b):xt(this.b,0,this.b.length,2)),this.a},r.Wn=function(){return this.g},r.ec=function(){return this.b},r.ga=sg.prototype.ec,r.V=function(){return this},r.Xn=function(){return this.c},r.Vd=sg.prototype.V,r.qa=function(){return 2},r.Lc=Y,r.U=function(){return this.i},e(ag,wl),(r=ag.prototype).U=function(){return"arraybuffer"},r.Oa=function(t,e){var o,i=this.c,r=(t=new mp.Dd(t),t=new mp.xf.Bf(t),[]),n=this.b;for(o in t.layers)if(!i||-1!=i.indexOf(o))for(var s,a,p,h,l,u,c,f,y,g=t.layers[o],d=0,v=g.length;d<v;++d)n===sg?(s=void 0,p=o,pg(h=(a=g.feature(d)).Oh(),u=[],l=[]),1===(c=a.type)?s=1===h.length?"Point":"MultiPoint":2===c?s=1===h.length?"LineString":"MultiLineString":3===c&&(s="Polygon"),(h=a.properties)[this.i]=p,s=new this.b(s,u,l,h,a.id)):(c=g.feature(d),u=o,l=e,s=new this.b,a=c.id,(p=c.properties)[this.i]=u,this.a&&s.Tc(this.a),u=void 0,0===(h=c.type)?u=null:(f=[],y=[],pg(c=c.Oh(),y,f),1===h?u=new(1===c.length?m:P)(null):2===h?u=new(1===c.length?S:M)(null):3===h&&(u=new w(null)),u.ba("XY",y,f)),l=Ml(u,!1,Sl(this,l)),s.Ra(l),s.jc(a),s.H(p)),r.push(s);return r},r.kb=function(){return this.defaultDataProjection},r.mn=function(t){this.c=t},r.Tb=function(){},r.Sc=function(){},r.Bd=function(){},r.$c=function(){},r.Wb=function(){},e(hg,wu);var ti=[null],ug=l(ti,{nd:function(t,e){e[e.length-1].md.push(t.getAttribute("ref"))},tag:lg}),cg=l(ti,{node:function(t,e){var o=e[0],i=e[e.length-1],r=t.getAttribute("id"),n=[parseFloat(t.getAttribute("lon")),parseFloat(t.getAttribute("lat"))];i.Sh[r]=n,Zt((t=g({fe:{}},fg,t,e)).fe)||(Ml(n=new m(n),!1,o),(o=new x(n)).jc(r),o.H(t.fe),i.features.push(o))},way:function(t,e){var o=e[0],i=t.getAttribute("id");t=g({md:[],fe:{}},ug,t,e),e=e[e.length-1];for(var r=[],n=0,s=t.md.length;n<s;n++)X(r,e.Sh[t.md[n]]);t.md[0]==t.md[t.md.length-1]?(n=new w(null)).ba("XY",r,[r.length]):(n=new S(null)).ba("XY",r),Ml(n,!1,o),(o=new x(n)).jc(i),o.H(t.fe),e.features.push(o)}}),fg=l(ti,{tag:lg});function yg(t){return t.getAttributeNS("http://www.w3.org/1999/xlink","href")}function gg(){}function dg(){}hg.prototype.zc=function(t,e){return e=xl(this,t,e),"osm"==t.localName&&(t=g({Sh:{},features:[]},cg,t,[e])).features?t.features:[]},hg.prototype.Vg=function(){},hg.prototype.Xb=function(){},hg.prototype.ie=function(){},gg.prototype.read=function(t){return rl(t)?this.a(t):nl(t)?this.b(t):"string"==typeof t?(t=sl(t),this.a(t)):null},e(dg,gg),dg.prototype.a=function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType==Node.ELEMENT_NODE)return this.b(t);return null},dg.prototype.b=function(t){return(t=g({},vg,t,[]))||null};var fi=[null,"http://www.opengis.net/ows/1.1"],vg=l(fi,{ServiceIdentification:o(function(t,e){return g({},Cg,t,e)}),ServiceProvider:o(function(t,e){return g({},Lg,t,e)}),OperationsMetadata:o(function(t,e){return g({},Ag,t,e)})}),bg=l(fi,{DeliveryPoint:o(i),City:o(i),AdministrativeArea:o(i),PostalCode:o(i),Country:o(i),ElectronicMailAddress:o(i)}),mg=l(fi,{Value:ll(i)}),wg=l(fi,{AllowedValues:o(function(t,e){return g({},mg,t,e)})}),xg=l(fi,{Phone:o(function(t,e){return g({},Eg,t,e)}),Address:o(function(t,e){return g({},bg,t,e)})}),Sg=l(fi,{HTTP:o(function(t,e){return g({},Mg,t,e)})}),Mg=l(fi,{Get:ll(function(t,e){var o=yg(t);if(o)return g({href:o},Tg,t,e)}),Post:void 0}),Pg=l(fi,{DCP:o(function(t,e){return g({},Sg,t,e)})}),Ag=l(fi,{Operation:function(t,e){var o=t.getAttribute("name");(t=g({},Pg,t,e))&&(e[e.length-1][o]=t)}}),Eg=l(fi,{Voice:o(i),Facsimile:o(i)}),Tg=l(fi,{Constraint:ll(function(t,e){var o=t.getAttribute("name");if(o)return g({name:o},wg,t,e)})}),jg=l(fi,{IndividualName:o(i),PositionName:o(i),ContactInfo:o(function(t,e){return g({},xg,t,e)})}),Cg=l(fi,{Title:o(i),ServiceTypeVersion:o(i),ServiceType:o(i)}),Lg=l(fi,{ProviderName:o(i),ProviderSite:o(yg),ServiceContact:o(function(t,e){return g({},jg,t,e)})});function Rg(t,e,o,i){for(var r=void 0!==i?i:[],n=i=0;n<e;){var s=t[n++];for(r[i++]=t[n++],r[i++]=s,s=2;s<o;++s)r[i++]=t[n++]}r.length=i}function Ig(t){t=t||{},wl.call(this),this.defaultDataProjection=v("EPSG:4326"),this.b=t.factor||1e5,this.a=t.geometryLayout||"XY"}function Ng(t,e,o){for(var i=Array(e),r=0;r<e;++r)i[r]=0;for(var n=0,s=t.length;n<s;)for(r=0;r<e;++r,++n){var a=t[n],p=a-i[r];i[r]=a,t[n]=p}return kg(t,o||1e5)}function Fg(t,e,o){for(var i,r=Array(e),n=0;n<e;++n)r[n]=0;for(t=Dg(t,o||1e5),o=0,i=t.length;o<i;)for(n=0;n<e;++n,++o)r[n]+=t[o],t[o]=r[n];return t}function kg(t,e){e=e||1e5;for(var o=0,i=t.length;o<i;++o)t[o]=Math.round(t[o]*e);for(e=0,o=t.length;e<o;++e)i=t[e],t[e]=i<0?~(i<<1):i<<1;for(e="",o=0,i=t.length;o<i;++o){for(var r=t[o],n="";32<=r;)n+=String.fromCharCode(63+(32|31&r)),r>>=5;e+=n+=String.fromCharCode(r+63)}return e}function Dg(t,e){e=e||1e5;for(var o=[],i=0,r=0,n=0,s=t.length;n<s;++n){var a=t.charCodeAt(n)-63,i=i|(31&a)<<r;a<32?(o.push(i),r=i=0):r+=5}for(t=0,i=o.length;t<i;++t)o[t]=1&(r=o[t])?~(r>>1):r>>1;for(t=0,i=o.length;t<i;++t)o[t]/=e;return o}function Og(t){t=t||{},wl.call(this),this.a=t.layerName,this.b=t.layers||null,this.defaultDataProjection=v(t.defaultDataProjection||"EPSG:4326")}function Ug(t,e){for(var o=[],i=0,r=t.length;i<r;++i){var n=t[i];0<i&&o.pop(),n=0<=n?e[n]:e[~n].slice().reverse(),o.push.apply(o,n)}for(t=0,e=o.length;t<e;++t)o[t]=o[t].slice();return o}function Gg(t,e,o,i,r,n,s){var a=t.type,p=Xg[a];return o="Point"===a||"MultiPoint"===a?p(t,o,i):p(t,e),(e=new x).Ra(Ml(o,!1,s)),void 0!==t.id&&e.jc(t.id),t=t.properties,r&&((t=t||{})[r]=n),t&&e.H(t),e}function Bg(t,e,o){t[0]=t[0]*e[0]+o[0],t[1]=t[1]*e[1]+o[1]}e(Ig,Dc),(r=Ig.prototype).ae=function(t,e){return new x(t=this.wd(t,e))},r.zg=function(t,e){return[this.ae(t,e)]},r.wd=function(t,e){var o=vr(this.a);return Rg(t=Fg(t,o,this.b),t.length,o,t),Ml(new S(Lr(t,0,t.length,o),this.a),!1,Sl(this,e))},r.ge=function(t,e){return(t=t.V())?this.Cd(t,e):(O(!1,40),"")},r.Wg=function(t,e){return this.ge(t[0],e)},r.Cd=function(t,e){return e=(t=Ml(t,!0,Sl(this,e))).ga(),t=t.qa(),Rg(e,e.length,t,e),Ng(e,t,this.b)},e(Og,Pl),Og.prototype.yg=function(t,e){if("Topology"!=t.type)return[];var o=null,i=null,r=(t.transform&&(o=(n=t.transform).scale,i=n.translate),t.arcs);if(n)for(var n=o,s=i,a=0,p=r.length;a<p;++a)for(var h=r[a],l=n,u=s,c=0,f=0,y=0,g=h.length;y<g;++y){var d=h[y];c+=d[0],f+=d[1],d[0]=c,d[1]=f,Bg(d,l,u)}n=[],t=t.objects;var v,s=this.a;for(v in t)this.b&&-1==this.b.indexOf(v)||("GeometryCollection"===t[v].type?(a=t[v],n.push.apply(n,function(t,e,o,i,r,n,s){for(var a=[],p=0,h=(t=t.geometries).length;p<h;++p)a[p]=Gg(t[p],e,o,i,r,n,s);return a}(a,r,o,i,s,v,e))):(a=t[v],n.push(Gg(a,r,o,i,s,v,e))));return n},Og.prototype.Fg=function(){return this.defaultDataProjection};var Xg={Point:function(t,e,o){return t=t.coordinates,e&&o&&Bg(t,e,o),new m(t)},LineString:function(t,e){return new S(t=Ug(t.arcs,e))},Polygon:function(t,e){for(var o=[],i=0,r=t.arcs.length;i<r;++i)o[i]=Ug(t.arcs[i],e);return new w(o)},MultiPoint:function(t,e,o){if(t=t.coordinates,e&&o)for(var i=0,r=t.length;i<r;++i)Bg(t[i],e,o);return new P(t)},MultiLineString:function(t,e){for(var o=[],i=0,r=t.arcs.length;i<r;++i)o[i]=Ug(t.arcs[i],e);return new M(o)},MultiPolygon:function(t,e){for(var o=[],i=0,r=t.arcs.length;i<r;++i){for(var n=t.arcs[i],s=[],a=0,p=n.length;a<p;++a)s[a]=Ug(n[a],e);o[i]=s}return new f(o)}};function Vg(t){this.c=(t=t||{}).featureType,this.a=t.featureNS,this.b=t.gmlFormat||new y,this.o=t.schemaLocation||Wg["1.1.0"],wu.call(this)}(r=Og.prototype).Zc=function(){},r.he=function(){},r.je=function(){},r.Cg=function(){},r.Rc=function(){},e(Vg,wu);var Wg={"1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"};function Zg(t,e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return zg(t,e)}Vg.prototype.zc=function(t,e){var o={featureType:this.c,featureNS:this.a};return Xt(o,xl(this,t,e||{})),e=[o],this.b.b["http://www.opengis.net/gml"].featureMember=pl(Mu.prototype.be),t=(t=g([],this.b.b,t,e,this.b))||[]},Vg.prototype.j=function(t){return rl(t)?_g(t):nl(t)?g({},Jg,t,[]):"string"==typeof t?_g(t=sl(t)):void 0},Vg.prototype.g=function(t){return rl(t)?Zg(this,t):nl(t)?zg(this,t):"string"==typeof t?Zg(this,t=sl(t)):void 0};var Kg={"http://www.opengis.net/gml":{boundedBy:o(Mu.prototype.gf,"bounds")}};function zg(t,e){var o={},i=Ru(e.getAttribute("numberOfFeatures"));return o.numberOfFeatures=i,g(o,Kg,e,[],t.b)}var Yg={"http://www.opengis.net/wfs":{totalInserted:o(Lu),totalUpdated:o(Lu),totalDeleted:o(Lu)}},Hg={"http://www.opengis.net/ogc":{FeatureId:pl(function(t){return t.getAttribute("fid")})}},qg={"http://www.opengis.net/wfs":{Feature:function(t,e){gl(Hg,t,e)}}},Jg={"http://www.opengis.net/wfs":{TransactionSummary:o(function(t,e){return g({},Yg,t,e)},"transactionSummary"),InsertResults:o(function(t,e){return g([],qg,t,e)},"insertIds")}};function _g(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType==Node.ELEMENT_NODE)return g({},Jg,t,[])}var $g={"http://www.opengis.net/wfs":{PropertyName:c(ku)}};function Qg(t,e){var o=ol("http://www.opengis.net/ogc","Filter"),i=ol("http://www.opengis.net/ogc","FeatureId");o.appendChild(i),i.setAttribute("fid",e),t.appendChild(o)}function td(t,e){return e.indexOf(t=(t||"feature")+":")?t+e:e}var ed={"http://www.opengis.net/wfs":{Insert:c(function(t,e,o){var i=(r=o[o.length-1]).gmlVersion,r=ol(r.featureNS,r.featureType);if(t.appendChild(r),2===i){t=Zu.prototype,(i=e.a)&&r.setAttribute("fid",i);var n=(i=o[o.length-1]).featureNS,s=e.c,a=(i.lb||(i.lb={},i.lb[n]={}),e.N()),p=(e=[],[]);for(l in a){var h=a[l];null!==h&&(e.push(l),p.push(h),l==s||h instanceof yr?l in i.lb[n]||(i.lb[n][l]=c(t.ai,t)):l in i.lb[n]||(i.lb[n][l]=c(ku)))}var l=Xt({},i);l.node=r,vl(l,i.lb,cl(void 0,n),p,o,e)}else y.prototype.ii(r,e,o)}),Update:c(function(t,e,o){var i=o[o.length-1],r=(O(void 0!==e.a,27),i.featurePrefix),n=i.featureNS;if(t.setAttribute("typeName",td(r,i.featureType)),t.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+r,n),void 0!==(r=e.a)){for(var s=[],a=0,p=(n=e.O()).length;a<p;a++){var h=e.get(n[a]);void 0!==h&&s.push({name:n[a],value:h})}vl({gmlVersion:i.gmlVersion,node:t,hasZ:i.hasZ,srsName:i.srsName},ed,cl("Property"),s,o),Qg(t,r)}}),Delete:c(function(t,e,o){o=o[o.length-1],O(void 0!==e.a,26);var i=o.featurePrefix,r=o.featureNS;t.setAttribute("typeName",td(i,o.featureType)),t.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+i,r),void 0!==(e=e.a)&&Qg(t,e)}),Property:c(function(t,e,o){var i=ol("http://www.opengis.net/wfs","Name"),r=o[o.length-1].gmlVersion;t.appendChild(i),ku(i,e.name),void 0!==e.value&&null!==e.value&&(i=ol("http://www.opengis.net/wfs","Value"),t.appendChild(i),e.value instanceof yr?2===r?Zu.prototype.ai(i,e.value,o):y.prototype.od(i,e.value,o):ku(i,e.value))}),Native:c(function(t,e){e.vq&&t.setAttribute("vendorId",e.vq),void 0!==e.Vp&&t.setAttribute("safeToIgnore",e.Vp),void 0!==e.value&&ku(t,e.value)})}};function od(t,e,o){var i={node:t};e.b.forEach(function(t){vl(i,pd,cl(t.kc),[t],o)})}function id(t,e){void 0!==e.a&&t.setAttribute("matchCase",e.a.toString()),nd(t,e.b),sd(t,""+e.i)}function rd(t,e,o){ku(t=ol("http://www.opengis.net/ogc",t),o),e.appendChild(t)}function nd(t,e){rd("PropertyName",t,e)}function sd(t,e){rd("Literal",t,e)}function ad(t,e){var o=ol("http://www.opengis.net/gml","TimeInstant");t.appendChild(o),t=ol("http://www.opengis.net/gml","timePosition"),o.appendChild(t),ku(t,e)}var pd={"http://www.opengis.net/wfs":{Query:c(function(t,e,o){var i=o[o.length-1],r=i.featurePrefix,n=i.featureNS,s=i.propertyNames,a=i.srsName;t.setAttribute("typeName",r?td(r,e):e),a&&t.setAttribute("srsName",a),n&&t.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+r,n),(e=Xt({},i)).node=t,vl(e,$g,cl("PropertyName"),s,o),(i=i.filter)&&(s=ol("http://www.opengis.net/ogc","Filter"),t.appendChild(s),vl({node:s},pd,cl(i.kc),[i],o))})},"http://www.opengis.net/ogc":{During:c(function(t,e){var o=ol("http://www.opengis.net/fes","ValueReference");ku(o,e.b),t.appendChild(o),o=ol("http://www.opengis.net/gml","TimePeriod"),t.appendChild(o),t=ol("http://www.opengis.net/gml","begin"),o.appendChild(t),ad(t,e.a),t=ol("http://www.opengis.net/gml","end"),o.appendChild(t),ad(t,e.i)}),And:c(od),Or:c(od),Not:c(function(t,e,o){e=e.condition,vl({node:t},pd,cl(e.kc),[e],o)}),BBOX:c(function(t,e,o){o[o.length-1].srsName=e.srsName,nd(t,e.geometryName),y.prototype.od(t,e.extent,o)}),Intersects:c(function(t,e,o){o[o.length-1].srsName=e.srsName,nd(t,e.geometryName),y.prototype.od(t,e.geometry,o)}),Within:c(function(t,e,o){o[o.length-1].srsName=e.srsName,nd(t,e.geometryName),y.prototype.od(t,e.geometry,o)}),PropertyIsEqualTo:c(id),PropertyIsNotEqualTo:c(id),PropertyIsLessThan:c(id),PropertyIsLessThanOrEqualTo:c(id),PropertyIsGreaterThan:c(id),PropertyIsGreaterThanOrEqualTo:c(id),PropertyIsNull:c(function(t,e){nd(t,e.b)}),PropertyIsBetween:c(function(t,e){nd(t,e.b);var o=ol("http://www.opengis.net/ogc","LowerBoundary");t.appendChild(o),sd(o,""+e.a),o=ol("http://www.opengis.net/ogc","UpperBoundary"),t.appendChild(o),sd(o,""+e.i)}),PropertyIsLike:c(function(t,e){t.setAttribute("wildCard",e.g),t.setAttribute("singleChar",e.f),t.setAttribute("escapeChar",e.i),void 0!==e.a&&t.setAttribute("matchCase",e.a.toString()),nd(t,e.b),sd(t,""+e.c)})}};function hd(t){t=t||{},wl.call(this),this.b=void 0!==t.splitCollection&&t.splitCollection}function ld(t){return(t=t.X()).length?t.join(" "):""}function ud(t){for(var e=[],o=0,i=(t=t.X()).length;o<i;++o)e.push(t[o].join(" "));return e.join(",")}function cd(t){for(var e=[],o=0,i=(t=t.Sd()).length;o<i;++o)e.push("("+ud(t[o])+")");return e.join(",")}function fd(t){var e,o=t.U(),i=(0,yd[o])(t),o=o.toUpperCase();return t instanceof b&&(e="","XYZ"!==(t=t.ja)&&"XYZM"!==t||(e+="Z"),"XYM"!==t&&"XYZM"!==t||(e+="M"),0<(t=e).length)&&(o+=" "+t),i.length?o+"("+i+")":o+" EMPTY"}Vg.prototype.l=function(t){var e,o,i=ol("http://www.opengis.net/wfs","GetFeature");return i.setAttribute("service","WFS"),i.setAttribute("version","1.1.0"),t&&(t.handle&&i.setAttribute("handle",t.handle),t.outputFormat&&i.setAttribute("outputFormat",t.outputFormat),void 0!==t.maxFeatures&&i.setAttribute("maxFeatures",t.maxFeatures),t.resultType&&i.setAttribute("resultType",t.resultType),void 0!==t.startIndex&&i.setAttribute("startIndex",t.startIndex),void 0!==t.count&&i.setAttribute("count",t.count),o=t.filter,t.bbox)&&(O(t.geometryName,12),e=lu(t.geometryName,t.bbox,t.srsName),o=o?hu(o,e):e),i.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",this.o),o={node:i,srsName:t.srsName,featureNS:t.featureNS||this.a,featurePrefix:t.featurePrefix,geometryName:t.geometryName,filter:o,propertyNames:t.propertyNames||[]},O(Array.isArray(t.featureTypes),11),t=t.featureTypes,(e=Xt({},(o=[o])[o.length-1])).node=i,vl(e,pd,cl("Query"),t,o),i},Vg.prototype.v=function(t,e,o,i){var r,n=[],s=ol("http://www.opengis.net/wfs","Transaction"),a=i.version||"1.1.0",p="1.0.0"===a?2:3;return s.setAttribute("service","WFS"),s.setAttribute("version",a),i&&(r=i.gmlOptions||{},i.handle)&&s.setAttribute("handle",i.handle),s.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",Wg[a]),t&&(a={node:s,featureNS:i.featureNS,featureType:i.featureType,featurePrefix:i.featurePrefix,gmlVersion:p,hasZ:i.hasZ,srsName:i.srsName},Xt(a,r),vl(a,ed,cl("Insert"),t,n)),e&&(a={node:s,featureNS:i.featureNS,featureType:i.featureType,featurePrefix:i.featurePrefix,gmlVersion:p,hasZ:i.hasZ,srsName:i.srsName},Xt(a,r),vl(a,ed,cl("Update"),e,n)),o&&vl({node:s,featureNS:i.featureNS,featureType:i.featureType,featurePrefix:i.featurePrefix,gmlVersion:p,srsName:i.srsName},ed,cl("Delete"),o,n),i.nativeElements&&vl({node:s,featureNS:i.featureNS,featureType:i.featureType,featurePrefix:i.featurePrefix,gmlVersion:p,srsName:i.srsName},ed,cl("Native"),i.nativeElements,n),s},Vg.prototype.Eg=function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType==Node.ELEMENT_NODE)return this.kf(t);return null},Vg.prototype.kf=function(t){if(t.firstElementChild&&t.firstElementChild.firstElementChild)for(t=(t=t.firstElementChild.firstElementChild).firstElementChild;t;t=t.nextElementSibling){var e;if(0!==t.childNodes.length&&(1!==t.childNodes.length||3!==t.firstChild.nodeType))return this.b.gf(t,e=[{}]),v(e.pop().srsName)}return null},e(hd,Dc);var yd={Point:ld,LineString:ud,Polygon:cd,MultiPoint:function(t){for(var e=[],o=0,i=(t=t.Zd()).length;o<i;++o)e.push("("+ld(t[o])+")");return e.join(",")},MultiLineString:function(t){for(var e=[],o=0,i=(t=t.gd()).length;o<i;++o)e.push("("+ud(t[o])+")");return e.join(",")},MultiPolygon:function(t){for(var e=[],o=0,i=(t=t.Td()).length;o<i;++o)e.push("("+cd(t[o])+")");return e.join(",")},GeometryCollection:function(t){for(var e=[],o=0,i=(t=t.Vf()).length;o<i;++o)e.push(fd(t[o]));return e.join(",")}};function gd(t){this.a=t,this.b=-1}function dd(t){this.i=t,this.a="XY"}function vd(t){t.b=function t(e){var o=e.a.charAt(++e.b),i={position:e.b,value:o};if("("==o)i.type=2;else if(","==o)i.type=5;else if(")"==o)i.type=3;else if("0"<=o&&o<="9"||"."==o||"-"==o){var o=e.b,r=!(i.type=4),n=!1;do{"."==s?r=!0:"e"!=s&&"E"!=s||(n=!0);var s=e.a.charAt(++e.b)}while("0"<=s&&s<="9"||"."==s&&(void 0===r||!r)||!n&&("e"==s||"E"==s)||n&&("-"==s||"+"==s));e=parseFloat(e.a.substring(o,e.b--)),i.value=e}else if("a"<=o&&o<="z"||"A"<=o&&o<="Z"){for(i.type=1,o=e.b;"a"<=(s=e.a.charAt(++e.b))&&s<="z"||"A"<=s&&s<="Z";);e=e.a.substring(o,e.b--).toUpperCase(),i.value=e}else{if(" "==o||"\t"==o||"\r"==o||"\n"==o)return t(e);if(""!==o)throw Error("Unexpected character: "+o);i.type=6}return i}(t.i)}function bd(t,e){return(e=t.b.type==e)&&vd(t),e}function md(t){for(var e=[],o=t.a.length,i=0;i<o;++i){var r=t.b;if(!bd(t,4))break;e.push(r.value)}if(e.length==o)return e;throw Error(Md(t))}function wd(t){for(var e=[md(t)];bd(t,5);)e.push(md(t));return e}function xd(t){for(var e=[t.sg()];bd(t,5);)e.push(t.sg());return e}function Sd(t){var e=1==t.b.type&&"EMPTY"==t.b.value;return e&&vd(t),e}function Md(t){return"Unexpected `"+t.b.value+"` at position "+t.b.position+" in `"+t.i.a+"`"}(r=hd.prototype).ae=function(t,e){return(t=this.wd(t,e))?((e=new x).Ra(t),e):null},r.zg=function(t,e){var o=[];t=this.wd(t,e),e=[];for(var i=0,r=(o=this.b&&"GeometryCollection"==t.U()?t.a:[t]).length;i<r;++i)(t=new x).Ra(o[i]),e.push(t);return e},r.wd=function(t,e){return vd(t=new dd(new gd(t))),(t=function t(e){var o=e.b;if(bd(e,1)){var o=o.value,i="XY",r=e.b;if(1==e.b.type&&("Z"===(r=r.value)?i="XYZ":"M"===r?i="XYM":"ZM"===r&&(i="XYZM"),"XY"!==i)&&vd(e),e.a=i,"GEOMETRYCOLLECTION"==o){t:{if(bd(e,2)){for(o=[];o.push(t(e)),bd(e,5););if(bd(e,3)){e=o;break t}}else if(Sd(e)){e=[];break t}throw Error(Md(e))}return new uu(e)}if(r=Ad[o],i=Pd[o],r&&i)return o=r.call(e),new i(o,e.a);throw Error("Invalid geometry type: "+o)}throw Error(Md(e))}(t))?Ml(t,!1,e):null},r.ge=function(t,e){return(t=t.V())?this.Cd(t,e):""},r.Wg=function(t,e){if(1==t.length)return this.ge(t[0],e);for(var o=[],i=0,r=t.length;i<r;++i)o.push(t[i].V());return t=new uu(o),this.Cd(t,e)},r.Cd=function(t,e){return fd(Ml(t,!0,e))},(r=dd.prototype).tg=function(){if(bd(this,2)){var t=md(this);if(bd(this,3))return t}else if(Sd(this))return null;throw Error(Md(this))},r.sg=function(){if(bd(this,2)){var t=wd(this);if(bd(this,3))return t}else if(Sd(this))return[];throw Error(Md(this))},r.ug=function(){if(bd(this,2)){var t=xd(this);if(bd(this,3))return t}else if(Sd(this))return[];throw Error(Md(this))},r.fp=function(){if(bd(this,2)){var t;if(2==this.b.type)for(t=[this.tg()];bd(this,5);)t.push(this.tg());else t=wd(this);if(bd(this,3))return t}else if(Sd(this))return[];throw Error(Md(this))},r.ep=function(){if(bd(this,2)){var t=xd(this);if(bd(this,3))return t}else if(Sd(this))return[];throw Error(Md(this))},r.gp=function(){if(bd(this,2)){for(var t=[this.ug()];bd(this,5);)t.push(this.ug());if(bd(this,3))return t}else if(Sd(this))return[];throw Error(Md(this))};var Pd={POINT:m,LINESTRING:S,POLYGON:w,MULTIPOINT:P,MULTILINESTRING:M,MULTIPOLYGON:f},Ad={POINT:dd.prototype.tg,LINESTRING:dd.prototype.sg,POLYGON:dd.prototype.ug,MULTIPOINT:dd.prototype.fp,MULTILINESTRING:dd.prototype.ep,MULTIPOLYGON:dd.prototype.gp};function Ed(){this.version=void 0}function Td(t,e){return g({},zd,t,e)}function jd(t,e){return g({},Vd,t,e)}function Cd(t,e){if(e=Td(t,e))return t=[Ru(t.getAttribute("width")),Ru(t.getAttribute("height"))],e.size=t,e}function Ld(t,e){return g([],Yd,t,e)}e(Ed,gg),Ed.prototype.a=function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType==Node.ELEMENT_NODE)return this.b(t);return null},Ed.prototype.b=function(t){return this.version=t.getAttribute("version").trim(),(t=g({version:this.version},Rd,t,[]))||null};var ti=[null,"http://www.opengis.net/wms"],Rd=l(ti,{Service:o(function(t,e){return g({},Nd,t,e)}),Capability:o(function(t,e){return g({},Id,t,e)})}),Id=l(ti,{Request:o(function(t,e){return g({},Xd,t,e)}),Exception:o(function(t,e){return g([],Od,t,e)}),Layer:o(function(t,e){return g({},Ud,t,e)})}),Nd=l(ti,{Name:o(i),Title:o(i),Abstract:o(i),KeywordList:o(Ld),OnlineResource:o(yg),ContactInformation:o(function(t,e){return g({},Fd,t,e)}),Fees:o(i),AccessConstraints:o(i),LayerLimit:o(Lu),MaxWidth:o(Lu),MaxHeight:o(Lu)}),Fd=l(ti,{ContactPersonPrimary:o(function(t,e){return g({},kd,t,e)}),ContactPosition:o(i),ContactAddress:o(function(t,e){return g({},Dd,t,e)}),ContactVoiceTelephone:o(i),ContactFacsimileTelephone:o(i),ContactElectronicMailAddress:o(i)}),kd=l(ti,{ContactPerson:o(i),ContactOrganization:o(i)}),Dd=l(ti,{AddressType:o(i),Address:o(i),City:o(i),StateOrProvince:o(i),PostCode:o(i),Country:o(i)}),Od=l(ti,{Format:pl(i)}),Ud=l(ti,{Name:o(i),Title:o(i),Abstract:o(i),KeywordList:o(Ld),CRS:ll(i),EX_GeographicBoundingBox:o(function(t,e){if(i=g({},Bd,t,e)){t=i.westBoundLongitude,e=i.southBoundLatitude;var o=i.eastBoundLongitude,i=i.northBoundLatitude;if(void 0!==t&&void 0!==e&&void 0!==o&&void 0!==i)return[t,e,o,i]}}),BoundingBox:ll(function(t){var e=[Cu(t.getAttribute("minx")),Cu(t.getAttribute("miny")),Cu(t.getAttribute("maxx")),Cu(t.getAttribute("maxy"))],o=[Cu(t.getAttribute("resx")),Cu(t.getAttribute("resy"))];return{crs:t.getAttribute("CRS"),extent:e,res:o}}),Dimension:ll(function(t){return{name:t.getAttribute("name"),units:t.getAttribute("units"),unitSymbol:t.getAttribute("unitSymbol"),default:t.getAttribute("default"),multipleValues:Eu(t.getAttribute("multipleValues")),nearestValue:Eu(t.getAttribute("nearestValue")),current:Eu(t.getAttribute("current")),values:i(t)}}),Attribution:o(function(t,e){return g({},Gd,t,e)}),AuthorityURL:ll(function(t,e){if(e=Td(t,e))return e.name=t.getAttribute("name"),e}),Identifier:ll(i),MetadataURL:ll(function(t,e){if(e=Td(t,e))return e.type=t.getAttribute("type"),e}),DataURL:ll(Td),FeatureListURL:ll(Td),Style:ll(function(t,e){return g({},Kd,t,e)}),MinScaleDenominator:o(ju),MaxScaleDenominator:o(ju),Layer:ll(function(t,e){var o=e[e.length-1],i=g({},Ud,t,e);if(i)return void 0===(e=Eu(t.getAttribute("queryable")))&&(e=o.queryable),i.queryable=void 0!==e&&e,void 0===(e=Ru(t.getAttribute("cascaded")))&&(e=o.cascaded),i.cascaded=e,void 0===(e=Eu(t.getAttribute("opaque")))&&(e=o.opaque),i.opaque=void 0!==e&&e,void 0===(e=Eu(t.getAttribute("noSubsets")))&&(e=o.noSubsets),i.noSubsets=void 0!==e&&e,e=(e=Cu(t.getAttribute("fixedWidth")))||o.fixedWidth,i.fixedWidth=e,t=(t=Cu(t.getAttribute("fixedHeight")))||o.fixedHeight,i.fixedHeight=t,["Style","CRS","AuthorityURL"].forEach(function(t){t in o&&(i[t]=(i[t]||[]).concat(o[t]))}),"EX_GeographicBoundingBox BoundingBox Dimension Attribution MinScaleDenominator MaxScaleDenominator".split(" ").forEach(function(t){t in i||(i[t]=o[t])}),i})}),Gd=l(ti,{Title:o(i),OnlineResource:o(yg),LogoURL:o(Cd)}),Bd=l(ti,{westBoundLongitude:o(ju),eastBoundLongitude:o(ju),southBoundLatitude:o(ju),northBoundLatitude:o(ju)}),Xd=l(ti,{GetCapabilities:o(jd),GetMap:o(jd),GetFeatureInfo:o(jd)}),Vd=l(ti,{Format:ll(i),DCPType:ll(function(t,e){return g({},Wd,t,e)})}),Wd=l(ti,{HTTP:o(function(t,e){return g({},Zd,t,e)})}),Zd=l(ti,{Get:o(Td),Post:o(Td)}),Kd=l(ti,{Name:o(i),Title:o(i),Abstract:o(i),LegendURL:ll(Cd),StyleSheetURL:o(Td),StyleURL:o(Td)}),zd=l(ti,{Format:o(i),OnlineResource:o(yg)}),Yd=l(ti,{Keyword:pl(i)});function Hd(t){t=t||{},this.a="http://mapserver.gis.umn.edu/mapserver",this.b=new Zu,this.c=t.layers||null,wu.call(this)}function qd(){this.i=new dg}function Jd(t){var e=i(t).split(" ");if(e&&2==e.length&&(t=+e[0],e=+e[1],!isNaN(t))&&!isNaN(e))return[t,e]}e(Hd,wu),Hd.prototype.zc=function(t,e){var o={},i=(e&&Xt(o,xl(this,t,e)),o=[o],t.setAttribute("namespaceURI",this.a),t.localName);if(e=[],t.childNodes.length){if("msGMLOutput"==i)for(var r=0,n=t.childNodes.length;r<n;r++){var s,a,p,h=t.childNodes[r];h.nodeType===Node.ELEMENT_NODE&&(s=o[0],a=h.localName.replace("_layer",""),!this.c||D(this.c,a))&&(a+="_feature",s.featureType=a,s.featureNS=this.a,(p={})[a]=pl(this.b.wg,this.b),s=l([s.featureNS,null],p),h.setAttribute("namespaceURI",this.a),h=g([],s,h,o,this.b))&&X(e,h)}"FeatureCollection"==i&&(t=g([],this.b.b,t,[{}],this.b))&&(e=t)}return e},Hd.prototype.Vg=function(){},Hd.prototype.Xb=function(){},Hd.prototype.ie=function(){},e(qd,gg),qd.prototype.a=function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType==Node.ELEMENT_NODE)return this.b(t);return null},qd.prototype.b=function(t){var e=t.getAttribute("version").trim(),o=this.i.b(t);return o&&(o.version=e,o=g(o,_d,t,[]))||null};var fi=[null,"http://www.opengis.net/wmts/1.0"],ti=[null,"http://www.opengis.net/ows/1.1"],_d=l(fi,{Contents:o(function(t,e){return g({},$d,t,e)})}),$d=l(fi,{Layer:ll(function(t,e){return g({},Qd,t,e)}),TileMatrixSet:ll(function(t,e){return g({},s0,t,e)})}),Qd=l(fi,{Style:ll(function(t,e){if(e=g({},t0,t,e))return t="true"===t.getAttribute("isDefault"),e.isDefault=t,e}),Format:ll(i),TileMatrixSetLink:ll(function(t,e){return g({},e0,t,e)}),Dimension:ll(function(t,e){return g({},r0,t,e)}),ResourceURL:ll(function(t){var e=t.getAttribute("format"),o=t.getAttribute("template"),i=(t=t.getAttribute("resourceType"),{});return e&&(i.format=e),o&&(i.template=o),t&&(i.resourceType=t),i})},l(ti,{Title:o(i),Abstract:o(i),WGS84BoundingBox:o(function(t,e){if(2==(t=g([],n0,t,e)).length)return ht(t)}),Identifier:o(i)})),t0=l(fi,{LegendURL:ll(function(t){var e={};return e.format=t.getAttribute("format"),e.href=yg(t),e})},l(ti,{Title:o(i),Identifier:o(i)})),e0=l(fi,{TileMatrixSet:o(i),TileMatrixSetLimits:o(function(t,e){return g([],o0,t,e)})}),o0=l(fi,{TileMatrixLimits:pl(function(t,e){return g({},i0,t,e)})}),i0=l(fi,{TileMatrix:o(i),MinTileRow:o(Lu),MaxTileRow:o(Lu),MinTileCol:o(Lu),MaxTileCol:o(Lu)}),r0=l(fi,{Default:o(i),Value:ll(i)},l(ti,{Identifier:o(i)})),n0=l(ti,{LowerCorner:pl(Jd),UpperCorner:pl(Jd)}),s0=l(fi,{WellKnownScaleSet:o(i),TileMatrix:ll(function(t,e){return g({},a0,t,e)})},l(ti,{SupportedCRS:o(i),Identifier:o(i)})),a0=l(fi,{TopLeftCorner:o(Jd),ScaleDenominator:o(ju),TileWidth:o(Lu),TileHeight:o(Lu),MatrixWidth:o(Lu),MatrixHeight:o(Lu)},l(ti,{Identifier:o(i)}));function p0(t){ro.call(this),t=t||{},this.a=null,this.f=xe,this.c=void 0,d(this,so("projection"),this.Am,this),d(this,so("tracking"),this.Bm,this),void 0!==t.projection&&this.Wh(t.projection),void 0!==t.trackingOptions&&this.wj(t.trackingOptions),this.Ke(void 0!==t.tracking&&t.tracking)}function h0(t,e,o){b.call(this),this.Ng(t,e||0,o)}function l0(t){var e=t.A[t.a]-t.A[0];return e*e+(t=t.A[t.a+1]-t.A[1])*t}function u0(t,e,o){for(var i,r,n,s,a,p,h=[],l=t(0),u=t(1),c=e(l),f=[u,l],y=[e(u),c],g=[1,0],d={},v=1e5;0<--v&&0<g.length;)s=g.pop(),l=f.pop(),c=y.pop(),(u=s.toString())in d||(h.push(c[0],c[1]),d[u]=!0),a=g.pop(),u=f.pop(),i=y.pop(),et((n=e(r=t(p=(s+a)/2)))[0],n[1],c[0],c[1],i[0],i[1])<o?(h.push(i[0],i[1]),d[u=a.toString()]=!0):(g.push(a,p,p,s),y.push(i,n,n,c),f.push(u,r,r,l));return h}function c0(t){t=t||{},this.j=this.v=null,this.f=this.o=1/0,this.g=this.l=-1/0,this.ra=this.oa=1/0,this.R=this.I=-1/0,this.Jb=void 0!==t.targetSize?t.targetSize:100,this.fb=void 0!==t.maxLines?t.maxLines:100,this.i=[],this.c=[],this.pa=void 0!==t.strokeStyle?t.strokeStyle:f0,this.D=this.u=void 0,this.a=this.b=this.S=null,1==t.showLabels&&(this.na=t.lonLabelFormatter||ir.bind(this,"EW"),this.Ua=t.latLabelFormatter||ir.bind(this,"NS"),this.fa=null==t.lonLabelPosition?0:t.lonLabelPosition,this.T=null==t.latLabelPosition?1:t.latLabelPosition,this.B=void 0!==t.lonLabelStyle?t.lonLabelStyle:new pf({font:"12px Calibri,sans-serif",textBaseline:"bottom",fill:new Hh({color:"rgba(0,0,0,1)"}),stroke:new hp({color:"rgba(255,255,255,1)",width:3})}),this.C=void 0!==t.latLabelStyle?t.latLabelStyle:new pf({font:"12px Calibri,sans-serif",textAlign:"end",fill:new Hh({color:"rgba(0,0,0,1)"}),stroke:new hp({color:"rgba(255,255,255,1)",width:3})}),this.b=[],this.a=[]),this.setMap(void 0!==t.map?t.map:null)}e(p0,ro),(r=p0.prototype).ka=function(){this.Ke(!1),ro.prototype.ka.call(this)},r.Am=function(){var t=this.Uh();t&&(this.f=we(v("EPSG:4326"),t),this.a)&&this.set("position",this.f(this.a))},r.Bm=function(){var t;hi&&((t=this.Vh())&&void 0===this.c?this.c=navigator.geolocation.watchPosition(this.np.bind(this),this.op.bind(this),this.Gh()):t||void 0===this.c||(navigator.geolocation.clearWatch(this.c),this.c=void 0))},r.np=function(t){t=t.coords,this.set("accuracy",t.accuracy),this.set("altitude",null===t.altitude?void 0:t.altitude),this.set("altitudeAccuracy",null===t.altitudeAccuracy?void 0:t.altitudeAccuracy),this.set("heading",null===t.heading?void 0:it(t.heading)),this.a?(this.a[0]=t.longitude,this.a[1]=t.latitude):this.a=[t.longitude,t.latitude];var e=this.f(this.a);this.set("position",e),this.set("speed",null===t.speed?void 0:t.speed),(t=Yr(ie,this.a,t.accuracy)).Dc(this.f),this.set("accuracyGeometry",t),this.s()},r.op=function(t){t.type="error",this.Ke(!1),this.b(t)},r.Dk=function(){return this.get("accuracy")},r.Ek=function(){return this.get("accuracyGeometry")||null},r.Gk=function(){return this.get("altitude")},r.Hk=function(){return this.get("altitudeAccuracy")},r.ym=function(){return this.get("heading")},r.zm=function(){return this.get("position")},r.Uh=function(){return this.get("projection")},r.ll=function(){return this.get("speed")},r.Vh=function(){return this.get("tracking")},r.Gh=function(){return this.get("trackingOptions")},r.Wh=function(t){this.set("projection",v(t))},r.Ke=function(t){this.set("tracking",t)},r.wj=function(t){this.set("trackingOptions",t)},e(h0,b),(r=h0.prototype).clone=function(){var t=new h0(null);return br(t,this.ja,this.A.slice()),t.s(),t},r.Kb=function(t,e,o,i){var r=this.A,n=(t-=r[0],e-r[1]);if((e=t*t+n*n)<i){if(e)for(i=this.pd()/Math.sqrt(e),o[0]=r[0]+i*t,o[1]=r[1]+i*n,i=2;i<this.a;++i)o[i]=r[i];else for(i=0;i<this.a;++i)o[i]=r[i];return o.length=this.a,e}return i},r.Mc=function(t,e){var o=this.A;return(t-=o[0])*t+(e-=o[1])*e<=l0(this)},r.wa=function(){return this.A.slice(0,this.a)},r.se=function(t){var e=this.A,o=e[this.a]-e[0];return bt(e[0]-o,e[1]-o,e[0]+o,e[1]+o,t)},r.pd=function(){return Math.sqrt(l0(this))},r.U=function(){return"Circle"},r.Xa=function(t){var e;return!!Ot(t,this.G())&&(e=this.wa(),t[0]<=e[0]&&t[2]>=e[0]||t[1]<=e[1]&&t[3]>=e[1]||Et(t,this.sb,this))},r.ob=function(t){var e,o=this.a,i=t.slice();for(i[o]=i[0]+(this.A[o]-this.A[0]),e=1;e<o;++e)i[o+e]=t[e];br(this,this.ja,i),this.s()},r.Ng=function(t,e,o){if(t){var i;for(mr(this,o,t,0),this.A||(this.A=[]),t=Tr(o=this.A,t),o[t++]=o[0]+e,e=1,i=this.a;e<i;++e)o[t++]=o[e];o.length=t}else br(this,"XY",null);this.s()},r.X=function(){},r.ma=function(){},r.Uc=function(t){this.A[this.a]=this.A[0]+t,this.s()};var f0=new hp({color:"rgba(0,0,0,0.2)"}),y0=[90,45,30,20,10,5,2,1,.5,.2,.1,.05,.01,.005,.002,.001];function g0(t,e,o,i,r,n,s){var a,p,h,l,u=s;return a=e,p=o,h=i,l=t.j,r=r,o=u0(function(t){return[a,p+(h-p)*t]},me(v("EPSG:4326"),l),r),(u=void 0!==t.i[u]?t.i[u]:new S(null)).ba("XY",o),Ot(u.G(),n)&&(t.b&&(o=s,n=[(i=u.ga())[0],Q(n[1]+Math.abs(n[1]-n[3])*t.fa,Math.max(n[1],i[1]),Math.min(n[3],i[i.length-1]))],(o=t.b[o]?t.b[o].Qd:new m(null)).ma(n),t.b[s]={Qd:o,text:t.na(e)}),t.i[s++]=u),s}function d0(t,e,o,i,r){var n,s,a,p,h,l=r;return n=e,s=t.g,a=t.f,h=t.j,p=o,o=u0(function(t){return[s+(a-s)*t,n]},me(v("EPSG:4326"),h),p),(l=void 0!==t.c[l]?t.c[l]:new S(null)).ba("XY",o),Ot(l.G(),i)&&(t.a&&(o=r,h=l.ga(),i=[Q(i[0]+Math.abs(i[0]-i[2])*t.T,Math.max(i[0],h[0]),Math.min(i[2],h[h.length-2])),h[1]],(o=t.a[o]?t.a[o].Qd:new m(null)).ma(i),t.a[r]={Qd:o,text:t.Ua(e)}),t.c[r++]=l),r}function v0(t,e,o,i,r){eo.call(this),this.f=r,this.extent=t,this.a=o,this.resolution=e,this.state=i}function b0(t,e,o,i,r,n,s){v0.call(this,t,e,o,0,i),this.j=r,this.M=new Image,null!==n&&(this.M.crossOrigin=n),this.c={},this.i=null,this.state=0,this.g=s}function m0(t,e,o,i,r,n){this.c=n||null,v0.call(this,t,e,o,n?0:2,i),this.i=r}function w0(t,e){eo.call(this),this.ta=t,this.state=e,this.i=null,this.key=""}function x0(t){if(t.i){var e=t.i;do{if(2==e.getState())return e}while(e=e.i)}return t}function S0(t,e){t.state=e,t.s()}function M0(t,e,o,i,r){w0.call(this,t,e),this.g=o,this.M=new Image,null!==i&&(this.M.crossOrigin=i),this.c=null,this.j=r}function P0(t){t.c.forEach(qe),t.c=null}(r=c0.prototype).Cm=function(){return this.v},r.al=function(){return this.i},r.hl=function(){return this.c},r.Kh=function(t){var e,o,i,r,n,s,a,p,h,l,u=t.vectorContext,c=t.frameState,f=c.extent,y=(t=c.viewState).center,g=t.projection,d=t.resolution;for(t=d*d/(4*(t=c.pixelRatio)*t),this.j&&be(this.j,g)||(e=v("EPSG:4326"),o=g.G(),l=Pe(i=g.g,e,g),r=i[2],n=i[1],s=i[0],a=l[3],p=l[2],h=l[1],l=l[0],this.o=i[3],this.f=r,this.l=n,this.g=s,this.oa=a,this.ra=p,this.I=h,this.R=l,this.u=me(e,g),this.D=me(g,e),this.S=this.D(Lt(o)),this.j=g),g.i&&(e=Dt(g=g.G()),(c=c.focus[0])<g[0]||c>g[2])&&(c=e*Math.ceil((g[0]-c)/e),f=[f[0]+c,f[1],f[2]+c,f[3]]),c=this.S[0],g=this.S[1],e=-1,i=Math.pow(this.Jb*d,2),r=[],n=[],d=0,o=y0.length;d<o&&(r[0]=c-(s=y0[d]/2),r[1]=g-s,n[0]=c+s,n[1]=g+s,this.u(r,r),this.u(n,n),!((s=Math.pow(n[0]-r[0],2)+Math.pow(n[1]-r[1],2))<=i));++d)e=y0[d];if(-1==(d=e))this.i.length=this.c.length=0,this.b&&(this.b.length=0),this.a&&(this.a.length=0);else{for(y=(c=this.D(y))[0],c=c[1],g=this.fb,i=(e=Pe(e=[Math.max(f[0],this.R),Math.max(f[1],this.I),Math.min(f[2],this.ra),Math.min(f[3],this.oa)],this.j,"EPSG:4326"))[3],n=e[1],o=g0(this,r=Q(y=Math.floor(y/d)*d,this.g,this.f),n,i,t,f,0),e=0;r!=this.g&&e++<g;)o=g0(this,r=Math.max(r-d,this.g),n,i,t,f,o);for(r=Q(y,this.g,this.f),e=0;r!=this.f&&e++<g;)o=g0(this,r=Math.min(r+d,this.f),n,i,t,f,o);for(this.i.length=o,this.b&&(this.b.length=o),o=d0(this,y=Q(c=Math.floor(c/d)*d,this.l,this.o),t,f,0),e=0;y!=this.l&&e++<g;)o=d0(this,y=Math.max(y-d,this.l),t,f,o);for(y=Q(c,this.l,this.o),e=0;y!=this.o&&e++<g;)o=d0(this,y=Math.min(y+d,this.o),t,f,o);this.c.length=o,this.a&&(this.a.length=o)}for(u.Ma(null,this.pa),t=0,y=this.i.length;t<y;++t)d=this.i[t],u.zb(d);for(t=0,y=this.c.length;t<y;++t)d=this.c[t],u.zb(d);if(this.b)for(t=0,y=this.b.length;t<y;++t)d=this.b[t],this.B.xd(d.text),u.Cb(this.B),u.zb(d.Qd);if(this.a)for(t=0,y=this.a.length;t<y;++t)d=this.a[t],this.C.xd(d.text),u.Cb(this.C),u.zb(d.Qd)},r.setMap=function(t){this.v&&(this.v.K("postcompose",this.Kh,this),this.v.render()),t&&(t.J("postcompose",this.Kh,this),t.render()),this.v=t},e(v0,eo),v0.prototype.s=function(){this.b("change")},v0.prototype.G=function(){return this.extent},v0.prototype.getState=function(){return this.state},e(b0,v0),(r=b0.prototype).Y=function(t){var e;return void 0!==t?(t=U(t))in this.c?this.c[t]:(e=Zt(this.c)?this.M:this.M.cloneNode(!1),this.c[t]=e):this.M},r.Fm=function(){this.state=3,this.i.forEach(qe),this.i=null,this.s()},r.Gm=function(){void 0===this.resolution&&(this.resolution=It(this.extent)/this.M.height),this.state=2,this.i.forEach(qe),this.i=null,this.s()},r.load=function(){0!=this.state&&3!=this.state||(this.state=1,this.s(),this.i=[Ye(this.M,"error",this.Fm,this),Ye(this.M,"load",this.Gm,this)],this.g(this,this.j))},r.Og=function(t){this.M=t},e(m0,v0),m0.prototype.g=function(t){this.state=t?3:2,this.s()},m0.prototype.load=function(){0==this.state&&(this.state=1,this.s(),this.c(this.g.bind(this)))},m0.prototype.Y=function(){return this.i},e(w0,eo),w0.prototype.s=function(){this.b("change")},w0.prototype.bb=function(){return this.key+"/"+this.ta},w0.prototype.f=function(){return this.ta},w0.prototype.getState=function(){return this.state},e(M0,w0),(r=M0.prototype).ka=function(){1==this.state&&P0(this),this.i&&$e(this.i),this.state=5,this.s(),w0.prototype.ka.call(this)},r.Y=function(){return this.M},r.bb=function(){return this.g},r.Dm=function(){this.state=3,this.M=A0,P0(this),this.s()},r.Em=function(){this.state=this.M.naturalWidth&&this.M.naturalHeight?2:4,P0(this),this.s()},r.load=function(){0!=this.state&&3!=this.state||(this.state=1,this.s(),this.c=[Ye(this.M,"error",this.Dm,this),Ye(this.M,"load",this.Em,this)],this.j(this,this.g))};var A0=new Image;function E0(t){t=t||{},pn.call(this,{handleEvent:cr}),this.g=t.formatConstructors||[],this.o=t.projection?v(t.projection):null,this.a=null,this.target=t.target||null}function T0(t){for(var e=0,o=(t=t.dataTransfer.files).length;e<o;++e){var i=t.item(e),r=new FileReader;r.addEventListener("load",this.j.bind(this,i)),r.readAsText(i)}}function j0(t){t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy"}function C0(t){var e=t.v;e&&(e=t.target||e.a,t.a=[d(e,"drop",T0,t),d(e,"dragenter",j0,t),d(e,"dragover",j0,t),d(e,"drop",j0,t)])}function L0(t){t.a&&(t.a.forEach(qe),t.a=null)}A0.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",e(E0,pn),E0.prototype.j=function(t,e){e=e.target.result;for(var o=this.v,i=(i=this.o)||o.Z().v,r=[],n=0,s=(o=this.g).length;n<s;++n){var a=new o[n],p={featureProjection:i};try{r=a.Oa(e,p)}catch(t){r=null}if(r&&0<r.length)break}this.b(new I0(R0,t,r,i))},E0.prototype.Ha=function(t){pn.prototype.Ha.call(this,t),(t?C0:L0)(this)},E0.prototype.setMap=function(t){L0(this),pn.prototype.setMap.call(this,t),this.c()&&C0(this)};var R0="addfeatures";function I0(t,e,o,i){Qe.call(this,t),this.features=o,this.file=e,this.projection=i}function N0(t){t=t||{},Mn.call(this,{handleDownEvent:D0,handleDragEvent:F0,handleUpEvent:k0}),this.l=t.condition||mn,this.a=this.g=void 0,this.j=0,this.u=void 0!==t.duration?t.duration:400}function F0(t){var e,o,i;xn(t)&&(o=(e=t.map).Ob(),t=(i=t.pixel)[0]-o[0]/2,i=o[1]/2-i[1],o=Math.atan2(i,t),t=Math.sqrt(t*t+i*i),(e=e.Z()).g.rotation!==_i&&void 0!==this.g&&(i=o-this.g,hn(e,e.Qa()-i)),this.g=o,void 0!==this.a&&(o=this.a*(e.Pa()/t),un(e,o)),void 0!==this.a&&(this.j=this.a/t),this.a=t)}function k0(t){if(!xn(t))return!0;nn(t=t.map.Z(),1,-1);var e=this.j-1,o=t.Qa(),o=t.constrainRotation(o,0),o=(hn(t,o,void 0,void 0),t.Pa()),i=this.u,o=t.constrainResolution(o,0,e);return un(t,o,void 0,i),this.j=0,!1}function D0(t){return!(!xn(t)||!this.l(t)||(nn(t.map.Z(),1,1),this.a=this.g=void 0))}function O0(t,e,o,i){this.fb=t,this.Ua=e,this.overlaps=i,this.c=0,this.resolution=o,this.ra=this.oa=null,this.a=[],this.coordinates=[],this.T=ms(),this.b=[],this.B=null,this.fa=ms(),this.na=ms()}function U0(t,e,o,i,r,n,s){for(var a=t.coordinates.length,p=t.Sf(),h=(s&&(o+=r),s=[e[o],e[o+1]],[NaN,NaN]),l=!0,u=o+r;u<i;u+=r){h[0]=e[u],h[1]=e[u+1];var c=dt(p,h),l=c!==f?(l&&(t.coordinates[a++]=s[0],t.coordinates[a++]=s[1]),t.coordinates[a++]=h[0],t.coordinates[a++]=h[1],!1):1!==c||(t.coordinates[a++]=h[0],t.coordinates[a++]=h[1],!1),f=(s[0]=h[0],s[1]=h[1],c)}return(n&&l||u===o+r)&&(t.coordinates[a++]=s[0],t.coordinates[a++]=s[1]),a}function G0(t,e){t.oa=[0,e,0],t.a.push(t.oa),t.ra=[0,e,0],t.b.push(t.ra)}function B0(t,e,o,i,r,n,s,a,p){var h;t.B&&Z(i,t.T)?h=t.B:(t.B||(t.B=[]),h=gr(t.coordinates,0,t.coordinates.length,2,i,t.B),Ms(t.T,i)),i=!Zt(n);for(var l,u,c=0,D=s.length,f=0,y=t.fa,g=t.na,d=0,v=0,b=t.a!=s||t.overlaps?0:200;c<D;)switch((N=s[c])[0]){case 0:f=N[1],i&&n[U(f).toString()]||!f.V()?c=N[2]:void 0===p||Ot(p,f.V().G())?++c:c=N[2]+1;break;case 1:b<d&&(t.Va(e,r),d=0),b<v&&(e.stroke(),v=0),d||v||(e.beginPath(),l=u=NaN),++c;break;case 2:m=h[f=N[1]],N=h[f+1],j=h[f+2]-m,f=h[f+3]-N,f=Math.sqrt(j*j+f*f),e.moveTo(m+f,N),e.arc(m,N,f,0,2*Math.PI,!0),++c;break;case 3:e.closePath(),++c;break;case 4:f=N[1];var m=N[2],w=N[3],x=N[4]*o,S=N[5]*o,M=N[6],P=N[7],A=N[8],E=N[9],T=N[10],j=N[11],C=N[12],L=N[13],R=N[14];for(T&&(j+=r);f<m;f+=2){var I,N=h[f]-x,T=h[f+1]-S,F=(L&&(N=Math.round(N),T=Math.round(T)),1==C&&!j||(js(y,I=N+x,F=T+S,C,C,j,-I,-F),e.setTransform.apply(e,y)),I=e.globalAlpha,1!=P&&(e.globalAlpha=I*P),R+A>w.width?w.width-A:R),O=M+E>w.height?w.height-E:M;e.drawImage(w,A,E,F,O,N,T,F*o,O*o),1!=P&&(e.globalAlpha=I),1==C&&!j||e.setTransform.apply(e,g)}++c;break;case 5:for(f=N[1],m=N[2],S=N[3],M=N[4]*o,P=N[5]*o,j=N[6],C=N[7]*o,w=N[8],x=N[9],(T=N[10])&&(j+=r);f<m;f+=2){for(N=h[f]+M,T=h[f+1]+P,1==C&&!j||(js(y,N,T,C,C,j,-N,-T),e.setTransform.apply(e,y)),1<(E=(A=S.split("\n")).length)?T-=(E-1)/2*(L=Math.round(1.5*e.measureText("M").width)):L=0,R=0;R<E;R++)I=A[R],x&&e.strokeText(I,N,T),w&&e.fillText(I,N,T),T+=L;1==C&&!j||e.setTransform.apply(e,g)}++c;break;case 6:if(a&&(f=a(f=N[1])))return f;++c;break;case 7:b?d++:t.Va(e,r),++c;break;case 8:for(f=N[1],m=N[2],N=h[f],C=(T=h[f+1])+.5|0,(j=N+.5|0)===l&&C===u||(e.moveTo(N,T),l=j,u=C),f+=2;f<m;f+=2)j=(N=h[f])+.5|0,C=(T=h[f+1])+.5|0,f!=m-2&&j===l&&C===u||(e.lineTo(N,T),l=j,u=C);++c;break;case 9:t.R=N[2],d&&(t.Va(e,r),d=0,v)&&(e.stroke(),v=0),e.fillStyle=N[1],++c;break;case 10:var f=void 0===N[8]||N[8],k=N[9];m=N[2],v&&(e.stroke(),v=0),e.strokeStyle=N[1],e.lineWidth=f?m*o:m,e.lineCap=N[3],e.lineJoin=N[4],e.miterLimit=N[5],si&&(m=N[6],j=N[7],f&&o!==k&&(m=m.map(function(t){return t*o/k}),j*=o/k,N[6]=m,N[7]=j,N[9]=o),e.lineDashOffset=j,e.setLineDash(m)),++c;break;case 11:e.font=N[1],e.textAlign=N[2],e.textBaseline=N[3],++c;break;case 12:b?v++:e.stroke(),++c;break;default:++c}d&&t.Va(e,r),v&&e.stroke()}function X0(t){var e=t.b;e.reverse();for(var o=e.length,i=-1,r=0;r<o;++r){var n=e[r],s=n[0];if(6==s)i=r;else if(0==s){for(n[2]=r,n=t.b,s=r;i<s;){var a=n[i];n[i]=n[s],n[s]=a,++i,--s}i=-1}}}function V0(t,e){t.oa[2]=t.a.length,t.oa=null,t.ra[2]=t.b.length,t.ra=null,t.a.push(e=[6,e]),t.b.push(e)}function W0(t,e,o,i){O0.call(this,t,e,o,i),this.M=this.I=null,this.C=this.D=this.S=this.u=this.v=this.l=this.o=this.j=this.g=this.f=this.i=void 0}function Z0(t,e,o,i){O0.call(this,t,e,o,i),this.f=null,this.i={Md:void 0,Gd:void 0,Hd:null,Id:void 0,Jd:void 0,Kd:void 0,Ld:void 0,eg:0,strokeStyle:void 0,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0}}function K0(t,e,o,i,r){var n=t.coordinates.length;return e=U0(t,e,o,i,r,!1,!1),t.a.push(n=[8,n,e]),t.b.push(n),i}function z0(t){var e=t.i,o=e.strokeStyle,i=e.lineCap,r=e.lineDash,n=e.lineDashOffset,s=e.lineJoin,a=e.lineWidth,p=e.miterLimit;e.Md==o&&e.Gd==i&&Z(e.Hd,r)&&e.Id==n&&e.Jd==s&&e.Kd==a&&e.Ld==p||(e.eg!=t.coordinates.length&&(t.a.push([12]),e.eg=t.coordinates.length),t.a.push([10,o,a,i,s,p,r,n,!0,1],[1]),e.Md=o,e.Gd=i,e.Hd=r,e.Id=n,e.Jd=s,e.Kd=a,e.Ld=p)}function Y0(t,e,o,i){O0.call(this,t,e,o,i),this.f=null,this.i={oh:void 0,Md:void 0,Gd:void 0,Hd:null,Id:void 0,Jd:void 0,Kd:void 0,Ld:void 0,fillStyle:void 0,strokeStyle:void 0,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0}}function H0(t,e,o,i,r){var n=void 0!==(s=t.i).fillStyle,s=null!=s.strokeStyle,a=i.length,p=[1];for(t.a.push(p),t.b.push(p),p=0;p<a;++p){var h=i[p],l=t.coordinates.length;o=U0(t,e,o,h,r,!0,!s),t.a.push(o=[8,l,o]),t.b.push(o),s&&(t.a.push(o=[3]),t.b.push(o)),o=h}return t.b.push(e=[7]),n&&t.a.push(e),s&&(t.a.push(n=[12]),t.b.push(n)),o}function q0(t,e){var o,i=t.i,r=i.fillStyle,n=i.strokeStyle,s=i.lineCap,a=i.lineDash,p=i.lineDashOffset,h=i.lineJoin,l=i.lineWidth,u=i.miterLimit;void 0===r||"string"==typeof r&&i.oh==r||(o=[9,r],"string"!=typeof r&&(e=e.G(),o.push([e[0],e[3]])),t.a.push(o),i.oh=i.fillStyle),void 0===n||i.Md==n&&i.Gd==s&&Z(i.Hd,a)&&i.Id==p&&i.Jd==h&&i.Kd==l&&i.Ld==u||(t.a.push([10,n,l,s,h,u,a,p,!0,1]),i.Md=n,i.Gd=s,i.Hd=a,i.Id=p,i.Jd=h,i.Kd=l,i.Ld=u)}function J0(t,e,o,i){O0.call(this,t,e,o,i),this.C=this.D=this.S=null,this.Ia="",this.o=this.j=0,this.l=void 0,this.u=this.v=0,this.g=this.f=this.i=null}function _0(t,e,o,i,r){this.v=t,this.c=e,this.o=i,this.l=o,this.f=r,this.a={},this.g=Po(1,1),this.j=ms()}e(I0,Qe),e(N0,Mn),e(O0,Xs),O0.prototype.Va=function(t,e){var o;this.R&&(o=Ps(this.T,this.R.slice()),t.translate(o[0],o[1]),t.rotate(e)),t.fill(),this.R&&t.setTransform.apply(t,this.na)},O0.prototype.La=function(t,e,o,i,r){B0(this,t,e,o,i,r,this.a,void 0,void 0)},O0.prototype.Te=Y,O0.prototype.Sf=function(){return this.Ua},e(W0,O0),W0.prototype.qc=function(t,e){var o,i;this.M&&(G0(this,e),o=t.ga(),i=this.coordinates.length,t=U0(this,o,0,o.length,t.qa(),!1,!1),this.a.push([4,i,t,this.M,this.i,this.f,this.g,this.j,this.o,this.l,this.v,this.u,this.S,this.D,this.C]),this.b.push([4,i,t,this.I,this.i,this.f,this.g,this.j,this.o,this.l,this.v,this.u,this.S,this.D,this.C]),V0(this,e))},W0.prototype.oc=function(t,e){var o,i;this.M&&(G0(this,e),o=t.ga(),i=this.coordinates.length,t=U0(this,o,0,o.length,t.qa(),!1,!1),this.a.push([4,i,t,this.M,this.i,this.f,this.g,this.j,this.o,this.l,this.v,this.u,this.S,this.D,this.C]),this.b.push([4,i,t,this.I,this.i,this.f,this.g,this.j,this.o,this.l,this.v,this.u,this.S,this.D,this.C]),V0(this,e))},W0.prototype.Te=function(){X0(this),this.f=this.i=void 0,this.M=this.I=null,this.C=this.D=this.u=this.v=this.l=this.o=this.j=this.S=this.g=void 0},W0.prototype.Ub=function(t){var e=t.Hc(),o=t.ic(),i=t.qg(1),r=t.Y(1),n=t.Oc();this.i=e[0],this.f=e[1],this.I=i,this.M=r,this.g=o[1],this.j=t.f,this.o=n[0],this.l=n[1],this.v=t.l,this.u=t.g,this.S=t.a,this.D=t.v,this.C=o[0]},e(Z0,O0),(r=Z0.prototype).Sf=function(){return this.f||(this.f=ut(this.Ua),0<this.c&<(this.f,this.resolution*(this.c+1)/2,this.f)),this.f},r.mc=function(t,e){var o=this.i,i=o.lineWidth;void 0!==o.strokeStyle&&void 0!==i&&(z0(this),G0(this,e),this.b.push([10,o.strokeStyle,o.lineWidth,o.lineCap,o.lineJoin,o.miterLimit,o.lineDash,o.lineDashOffset,!0,1],[1]),K0(this,o=t.ga(),0,o.length,t.qa()),this.b.push([12]),V0(this,e))},r.nc=function(t,e){var o=this.i,i=o.lineWidth;if(void 0!==o.strokeStyle&&void 0!==i){z0(this),G0(this,e),this.b.push([10,o.strokeStyle,o.lineWidth,o.lineCap,o.lineJoin,o.miterLimit,o.lineDash,o.lineDashOffset,!0,1],[1]),o=t.Bb(),i=t.ga(),t=t.qa();for(var r=0,n=0,s=o.length;n<s;++n)r=K0(this,i,r,o[n],t);this.b.push([12]),V0(this,e)}},r.Te=function(){this.i.eg!=this.coordinates.length&&this.a.push([12]),X0(this),this.i=null},r.Ma=function(t,e){t=e.a,this.i.strokeStyle=Mo(t||Gs),t=e.f,this.i.lineCap=void 0!==t?t:"round",t=e.i,this.i.lineDash=t||Us,t=e.g,this.i.lineDashOffset=t||0,t=e.j,this.i.lineJoin=void 0!==t?t:"round",t=e.c,this.i.lineWidth=void 0!==t?t:1,e=e.o,this.i.miterLimit=void 0!==e?e:10,this.i.lineWidth>this.c&&(this.c=this.i.lineWidth,this.f=null)},e(Y0,O0),(r=Y0.prototype).Zb=function(t,e){var o,i=this.i,r=i.strokeStyle;void 0===i.fillStyle&&void 0===r||(q0(this,t),G0(this,e),this.b.push([9,bo(Os)]),void 0!==i.strokeStyle&&this.b.push([10,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset,!0,1]),o=t.ga(),r=this.coordinates.length,U0(this,o,0,o.length,t.qa(),!1,!1),this.a.push(t=[1],r=[2,r]),this.b.push(t,r),this.b.push(t=[7]),void 0!==i.fillStyle&&this.a.push(t),void 0!==i.strokeStyle&&(this.a.push(i=[12]),this.b.push(i)),V0(this,e))},r.rc=function(t,e){var o=this.i,o=(q0(this,t),G0(this,e),this.b.push([9,bo(Os)]),void 0!==o.strokeStyle&&this.b.push([10,o.strokeStyle,o.lineWidth,o.lineCap,o.lineJoin,o.miterLimit,o.lineDash,o.lineDashOffset,!0,1]),t.Bb());H0(this,t.ec(),0,o,t.qa()),V0(this,e)},r.pc=function(t,e){var o=this.i,i=o.strokeStyle;if(void 0!==o.fillStyle||void 0!==i){q0(this,t),G0(this,e),this.b.push([9,bo(Os)]),void 0!==o.strokeStyle&&this.b.push([10,o.strokeStyle,o.lineWidth,o.lineCap,o.lineJoin,o.miterLimit,o.lineDash,o.lineDashOffset,!0,1]),o=t.c,i=Il(t),t=t.qa();for(var r=0,n=0,s=o.length;n<s;++n)r=H0(this,i,r,o[n],t);V0(this,e)}},r.Te=function(){X0(this),this.i=null;var t=this.fb;if(t)for(var e=this.coordinates,o=0,i=e.length;o<i;++o)e[o]=t*Math.round(e[o]/t)},r.Sf=function(){return this.f||(this.f=ut(this.Ua),0<this.c&<(this.f,this.resolution*(this.c+1)/2,this.f)),this.f},r.Ma=function(t,e){var o=this.i;t?(t=t.b,o.fillStyle=Mo(t||Os)):o.fillStyle=void 0,e?(t=e.a,o.strokeStyle=Mo(t||Gs),t=e.f,o.lineCap=void 0!==t?t:"round",t=e.i,o.lineDash=t?t.slice():Us,t=e.g,o.lineDashOffset=t||0,t=e.j,o.lineJoin=void 0!==t?t:"round",t=e.c,o.lineWidth=void 0!==t?t:1,e=e.o,o.miterLimit=void 0!==e?e:10,o.lineWidth>this.c&&(this.c=o.lineWidth,this.f=null)):(o.strokeStyle=void 0,o.lineCap=void 0,o.lineDash=null,o.lineDashOffset=void 0,o.lineJoin=void 0,o.lineWidth=void 0,o.miterLimit=void 0)},e(J0,O0),J0.prototype.yc=function(t,e,o,i,r,n){var s,a;""!==this.Ia&&this.g&&(this.i||this.f)&&(this.i&&(r=this.i,(s=this.S)&&s.fillStyle==r.fillStyle||(a=[9,r.fillStyle],this.a.push(a),this.b.push(a),s?s.fillStyle=r.fillStyle:this.S={fillStyle:r.fillStyle})),this.f&&(r=this.f,(s=this.D)&&s.lineCap==r.lineCap&&s.lineDash==r.lineDash&&s.lineDashOffset==r.lineDashOffset&&s.lineJoin==r.lineJoin&&s.lineWidth==r.lineWidth&&s.miterLimit==r.miterLimit&&s.strokeStyle==r.strokeStyle||(a=[10,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset,!1,1],this.a.push(a),this.b.push(a),s?(s.lineCap=r.lineCap,s.lineDash=r.lineDash,s.lineDashOffset=r.lineDashOffset,s.lineJoin=r.lineJoin,s.lineWidth=r.lineWidth,s.miterLimit=r.miterLimit,s.strokeStyle=r.strokeStyle):this.D={lineCap:r.lineCap,lineDash:r.lineDash,lineDashOffset:r.lineDashOffset,lineJoin:r.lineJoin,lineWidth:r.lineWidth,miterLimit:r.miterLimit,strokeStyle:r.strokeStyle})),r=this.g,(s=this.C)&&s.font==r.font&&s.textAlign==r.textAlign&&s.textBaseline==r.textBaseline||(a=[11,r.font,r.textAlign,r.textBaseline],this.a.push(a),this.b.push(a),s?(s.font=r.font,s.textAlign=r.textAlign,s.textBaseline=r.textBaseline):this.C={font:r.font,textAlign:r.textAlign,textBaseline:r.textBaseline}),G0(this,n),t=[5,r=this.coordinates.length,t=U0(this,t,e,o,i,!1,!1),this.Ia,this.j,this.o,this.v,this.u,!!this.i,!!this.f,this.l],this.a.push(t),this.b.push(t),V0(this,n))},J0.prototype.Cb=function(t){var e,o,i,r,n,s,a,p,h;t?((o=t.Fa())?(o=Mo((o=o.b)||Os),this.i?this.i.fillStyle=o:this.i={fillStyle:o}):this.i=null,(s=t.Ga())?(o=s.a,i=s.f,r=s.i,a=s.g,p=s.j,n=s.c,s=s.o,i=void 0!==i?i:"round",r=r?r.slice():Us,a=void 0!==a?a:0,p=void 0!==p?p:"round",n=void 0!==n?n:1,s=void 0!==s?s:10,o=Mo(o||Gs),this.f?((h=this.f).lineCap=i,h.lineDash=r,h.lineDashOffset=a,h.lineJoin=p,h.lineWidth=n,h.miterLimit=s,h.strokeStyle=o):this.f={lineCap:i,lineDash:r,lineDashOffset:a,lineJoin:p,lineWidth:n,miterLimit:s,strokeStyle:o}):this.f=null,e=t.a,o=t.i,i=t.c,r=t.o,n=t.f,s=t.b,a=t.Na(),p=t.g,h=t.j,t=void 0!==e?e:"10px sans-serif",p=void 0!==p?p:"center",h=void 0!==h?h:"middle",this.g?((e=this.g).font=t,e.textAlign=p,e.textBaseline=h):this.g={font:t,textAlign:p,textBaseline:h},this.Ia=void 0!==a?a:"",this.j=void 0!==o?o:0,this.o=void 0!==i?i:0,this.l=void 0!==r&&r,this.v=void 0!==n?n:0,this.u=void 0!==s?s:1):this.Ia=""},e(_0,$s);var $0={0:[[!0]]};function Q0(t,e,o){var i,r=Math.floor(t.length/2);if(r<=e)for(i=r;i<e;i++)t[i][o]=!0;else if(e<r)for(i=e+1;i<r;i++)t[i][o]=!0}function tv(t){for(var e in t.a){var o,i=t.a[e];for(o in i)i[o].Te()}}function ev(t,e){var o=t.c,i=(t=o[0],o[1]),r=o[2];return gr(t=[t,i,t,o=o[3],r,o,r,i],0,8,2,e,t),t}_0.prototype.Ea=function(t,e,o,i,r,n){var s,a,p,h=2*(i=Math.round(i))+1,l=js(this.j,i+.5,i+.5,1/e,-1/e,-o,-t[0],-t[1]),u=this.g,c=(u.canvas.width!==h||u.canvas.height!==h?(u.canvas.width=h,u.canvas.height=h):u.clearRect(0,0,h,h),void 0!==this.f&&(Pt(s=vt(),t),lt(s,e*(this.f+i),s)),function(t){if(void 0!==$0[t])return $0[t];for(var e=2*t+1,o=Array(e),i=0;i<e;i++)o[i]=Array(e);for(var e=t,r=i=0;i<=e;)Q0(o,t+e,t+i),Q0(o,t+i,t+e),Q0(o,t-i,t+e),Q0(o,t-e,t+i),Q0(o,t-e,t-i),Q0(o,t-i,t-e),Q0(o,t+i,t-e),Q0(o,t+e,t-i),0<2*((r+=1+2*++i)-e)+1&&(r+=1-2*--e);return $0[t]=o}(i)),f=this,y=u,g=l,d=o,v=r,b=function(t){for(var e=u.getImageData(0,0,h,h).data,o=0;o<h;o++)for(var i=0;i<h;i++)if(c[o][i]&&0<e[4*(i*h+o)+3])return(t=n(t))||void u.clearRect(0,0,h,h)},m=s,w=Object.keys(f.a).map(Number),x=(w.sort(function(t,e){return e-t}),0);for(a=w.length;x<a;++x){var S=f.a[w[x].toString()];for(p=_s.length-1;0<=p;--p){var M=S[_s[p]];if(void 0!==M&&(M=B0(M,y,1,g,d,v,M.b,b,m)))return M}}},_0.prototype.b=function(t,e){var o=void 0!==t?t.toString():"0";return void 0===(t=this.a[o])&&(this.a[o]=t={}),void 0===(o=t[e])&&(o=new ov[e](this.v,this.c,this.l,this.o),t[e]=o),o},_0.prototype.i=function(){return Zt(this.a)},_0.prototype.La=function(t,e,o,i,r,n){var s=Object.keys(this.a).map(Number),a=(s.sort(G),ev(this,o));t.save(),t.beginPath(),t.moveTo(a[0],a[1]),t.lineTo(a[2],a[3]),t.lineTo(a[4],a[5]),t.lineTo(a[6],a[7]),t.clip(),n=n||_s;for(var a=0,p=s.length;a<p;++a)for(var h=this.a[s[a].toString()],l=0,u=n.length;l<u;++l){var c=h[n[l]];void 0!==c&&c.La(t,e,o,i,r)}t.restore()};var ov={Circle:Y0,Image:W0,LineString:Z0,Polygon:Y0,Text:J0};function iv(t){io.call(this),this.a=t}function rv(t,e){var o=e.getState();return 2!=o&&3!=o&&d(e,"change",t.na,t),0==o&&(e.load(),o=e.getState()),2==o}function nv(t){var e=t.a;e.Mb()&&"ready"==e.$f()&&t.s()}function sv(t,e){e.Ki()&&t.postRenderFunctions.push(function(t,e,o){e=U(t).toString(),t.fd(o.viewState.projection,o.usedTiles[e])}.bind(null,e))}function av(t,e){if(e)for(var o=0,i=e.length;o<i;++o){var r=e[o];t[U(r).toString()]=r}}function pv(t,e){void 0!==(e=e.D)&&("string"==typeof e?t.logos[e]="":e&&(O("string"==typeof e.href,44),O("string"==typeof e.src,45),t.logos[e.src]=e.href))}function hv(t,e,o,i){e=U(e).toString(),o=o.toString(),e in t?o in t[e]?(t=t[e][o],i.ca<t.ca&&(t.ca=i.ca),i.$>t.$&&(t.$=i.$),i.da<t.da&&(t.da=i.da),i.ia>t.ia&&(t.ia=i.ia)):t[e][o]=i:(t[e]={},t[e][o]=i)}function lv(t,e,o,i,r,n,s,a,p,h){for(var l,u=U(e).toString(),c=(u in t.wantedTiles||(t.wantedTiles[u]={}),t.wantedTiles[u]),f=(t=t.tileQueue,o.minZoom),y=s;f<=y;--y)for(var g,d=Ie(o,n,y,d),v=o.Da(y),b=d.ca;b<=d.$;++b)for(l=d.da;l<=d.ia;++l)s-y<=a?(0==(g=e.Nc(y,b,l,i,r)).getState()&&(c[g.bb()]=!0,g.bb()in t.a||t.f([g,u,Ne(o,g.ta),v])),p&&p.call(h,g)):e.Ug(y,b,l,r)}function uv(t){iv.call(this,t),this.fa=ms()}function cv(t,e,o){var i=e.pixelRatio,r=e.size[0]*i,n=e.size[1]*i,s=e.viewState.rotation,a=Ft(o),p=kt(o),h=Ct(o);o=jt(o),Ps(e.coordinateToPixelTransform,a),Ps(e.coordinateToPixelTransform,p),Ps(e.coordinateToPixelTransform,h),Ps(e.coordinateToPixelTransform,o),t.save(),Bs(t,-s,r/2,n/2),t.beginPath(),t.moveTo(a[0]*i,a[1]*i),t.lineTo(p[0]*i,p[1]*i),t.lineTo(h[0]*i,h[1]*i),t.lineTo(o[0]*i,o[1]*i),t.clip(),Bs(t,s,r/2,n/2)}function fv(t,e,o,i,r){var n,s,a,p=t.a;oo(p,e)&&(n=i.size[0]*i.pixelRatio,s=i.size[1]*i.pixelRatio,Bs(o,-(a=i.viewState.rotation),n/2,s/2),t=r||yv(t,i,0),p.b(new Ds(e,new Vs(o,i.pixelRatio,i.extent,t,i.viewState.rotation),i,o,null)),Bs(o,a,n/2,s/2))}function yv(t,e,o){var i=e.viewState,r=e.pixelRatio,n=r/i.resolution;return js(t.fa,r*e.size[0]/2,r*e.size[1]/2,n,-n,-i.rotation,-i.center[0]+o,-i.center[1])}function gv(t,e){return U(t)-U(e)}function dv(t,e){return(t=.5*t/e)*t}function vv(t,e,o,i,r,n){var s,a,p=!1;return(s=o.Y())&&(2==(a=s.Ye())||3==a?s.Bj(r,n):(0==a&&s.load(),s.Nh(r,n),p=!0)),(r=(0,o.Za)(e))&&(i=r.Vd(i),(0,bv[i.U()])(t,i,o,e)),p}e(iv,io),iv.prototype.Ea=Y,iv.prototype.Ue=fr,iv.prototype.Nf=function(o,i,r){return function(e,t){return Cm(o,i,e,t,function(t){r[e]||(r[e]={}),r[e][t.ta.toString()]=t})}},iv.prototype.na=function(t){2===t.target.getState()&&nv(this)},e(uv,iv),uv.prototype.u=function(t,e,o,i){if(this.Ea(t,e,0,cr,this))return o.call(i,this.a,null)},uv.prototype.ef=function(t,e,o,i){fv(this,"postcompose",t,e,i)};var bv={Point:function(t,e,o,i){var r=o.Y();if(r){if(2!=r.Ye())return;var n=t.b(o.Ba(),"Image");n.Ub(r),n.qc(e,i)}(r=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(r),t.yc(e.ga(),0,2,2,e,i))},LineString:function(t,e,o,i){var r,n=o.Ga();n&&((r=t.b(o.Ba(),"LineString")).Ma(null,n),r.mc(e,i)),(n=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(n),t.yc(jl(e),0,2,2,e,i))},Polygon:function(t,e,o,i){var r,n=o.Fa(),s=o.Ga();(n||s)&&((r=t.b(o.Ba(),"Polygon")).Ma(n,s),r.rc(e,i)),(n=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(n),t.yc(zr(e),0,2,2,e,i))},MultiPoint:function(t,e,o,i){var r=o.Y();if(r){if(2!=r.Ye())return;var n=t.b(o.Ba(),"Image");n.Ub(r),n.oc(e,i)}(r=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(r),o=e.ga(),t.yc(o,0,o.length,e.qa(),e,i))},MultiLineString:function(t,e,o,i){var r,n=o.Ga();n&&((r=t.b(o.Ba(),"LineString")).Ma(null,n),r.nc(e,i)),(n=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(n),o=Cl(e),t.yc(o,0,o.length,2,e,i))},MultiPolygon:function(t,e,o,i){var r,n=o.Fa(),s=o.Ga();(s||n)&&((r=t.b(o.Ba(),"Polygon")).Ma(n,s),r.pc(e,i)),(n=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(n),o=Rl(e),t.yc(o,0,o.length,2,e,i))},GeometryCollection:function(t,e,o,i){for(var r=0,n=(e=e.a).length;r<n;++r)(0,bv[e[r].U()])(t,e[r],o,i)},Circle:function(t,e,o,i){var r,n=o.Fa(),s=o.Ga();(n||s)&&((r=t.b(o.Ba(),"Circle")).Ma(n,s),r.Zb(e,i)),(n=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(n),t.yc(e.wa(),0,2,2,e,i))}};function mv(t){uv.call(this,t),this.c=!1,this.v=-1,this.l=NaN,this.j=vt(),this.f=this.o=null,this.g=Po()}function wv(){this.b="precision mediump float;varying vec2 a;uniform float f;uniform sampler2D g;void main(void){vec4 texColor=texture2D(g,a);gl_FragColor.rgb=texColor.rgb;gl_FragColor.a=texColor.a*f;}"}e(mv,uv),mv.prototype.S=function(t,e,o){var i=t.extent,r=t.pixelRatio,n=e.Je?t.skippedFeatureUids:{},s=(a=t.viewState).projection,a=a.rotation,p=s.G(),h=this.a.ha(),l=yv(this,t,0),u=(fv(this,"precompose",o,t,l),e.extent),c=void 0!==u;if(c&&cv(o,t,u),(u=this.f)&&!u.i()){var f,y,g=0,d=0,v=(f=(y=oo(this.a,"render")?(y=o.canvas.width,f=o.canvas.height,a&&(g=((v=Math.round(Math.sqrt(y*y+f*f)))-y)/2,d=(v-f)/2,y=f=v),this.g.canvas.width=y,this.g.canvas.height=f,this.g):o).globalAlpha,y.globalAlpha=e.opacity,y!=o&&y.translate(g,d),t.size[0]*r),b=t.size[1]*r;if(Bs(y,-a,v/2,b/2),u.La(y,r,l,a,n),h.u&&s.i&&!yt(p,i)){for(var s=i[0],h=Dt(p),m=0;s<p[0];)l=yv(this,t,l=h*--m),u.La(y,r,l,a,n),s+=h;for(m=0,s=i[2];s>p[2];)l=yv(this,t,l=h*++m),u.La(y,r,l,a,n),s-=h;l=yv(this,t,0)}Bs(y,a,v/2,b/2),y!=o&&(fv(this,"render",y,t,l),o.drawImage(y.canvas,-g,-d),y.translate(-g,-d)),y.globalAlpha=f}c&&o.restore(),this.ef(o,t,e,l)},mv.prototype.Ea=function(t,e,o,i,r){var n,s;if(this.f)return n=this.a,s={},this.f.Ea(t,e.viewState.resolution,e.viewState.rotation,o,{},function(t){var e=U(t).toString();if(!(e in s))return s[e]=!0,i.call(r,t,n)})},mv.prototype.D=function(){nv(this)},mv.prototype.sd=function(t){function e(t){var e,o=t.Lc();if(o?e=o.call(t,n):(o=p.f)&&(e=o(t,n)),e){if(o=!1,Array.isArray(e))for(var i=0,r=e.length;i<r;++i)o=vv(a,t,e[i],dv(n,s),this.D,this)||o;else o=vv(a,t,e,dv(n,s),this.D,this)||o;t=o,this.c=this.c||t}}var o,n,s,i,a,r,p=this.a,h=p.ha(),l=(av(t.attributions,h.j),pv(t,h),t.viewHints[0]),u=t.viewHints[1],c=p.T,f=p.na;return!this.c&&!c&&l||!f&&u||(o=t.extent,l=(f=t.viewState).projection,n=f.resolution,s=t.pixelRatio,u=p.i,i=p.c,void 0===(c=p.get(jv))&&(c=gv),o=lt(o,i*n),i=f.projection.G(),h.u&&f.projection.i&&!yt(i,t.extent)&&(t=Math.max(Dt(o)/2,Dt(i)),o[0]=i[0]-t,o[2]=i[2]+t),!this.c&&this.l==n&&this.v==u&&this.o==c&&yt(this.j,o))||(this.f=null,this.c=!1,a=new _0(.5*n/s,o,n,h.T,p.c),h.Yd(o,n,l),c?(r=[],h.$b(o,function(t){r.push(t)},this),r.sort(c),r.forEach(e,this)):h.$b(o,e,this),tv(a),this.l=n,this.v=u,this.o=c,this.j=o,this.f=a),!0},e(wv,ta);var xv=new wv;function Sv(){this.b="varying vec2 a;attribute vec2 b;attribute vec2 c;uniform mat4 d;uniform mat4 e;void main(void){gl_Position=e*vec4(b,0.,1.);a=(d*vec4(c,0.,1.)).st;}"}e(Sv,ea);var Mv=new Sv;function Pv(t,e){this.i=t.getUniformLocation(e,"f"),this.c=t.getUniformLocation(e,"e"),this.g=t.getUniformLocation(e,"d"),this.f=t.getUniformLocation(e,"g"),this.b=t.getAttribLocation(e,"b"),this.a=t.getAttribLocation(e,"c")}function Av(t,e){iv.call(this,e),this.c=t,this.T=new da([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]),this.g=this.Ib=null,this.j=void 0,this.v=ms(),this.S=ms(),this.C=aa(),this.u=null}function Ev(t,e,o,i){var r;oo(t=t.a,e)&&(r=i.viewState,t.b(new Ds(e,new sh(o,r.center,r.resolution,r.rotation,i.size,i.extent,i.pixelRatio),i,null,o)))}function Tv(t,e){Av.call(this,t,e),this.l=!1,this.R=-1,this.I=NaN,this.D=vt(),this.o=this.f=this.B=null}function s(t){var e=Xt({},t=t||{});delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,ys.call(this,e),this.c=void 0!==t.renderBuffer?t.renderBuffer:100,this.u=null,this.f=void 0,this.g(t.style),this.T=void 0!==t.updateWhileAnimating&&t.updateWhileAnimating,this.na=void 0!==t.updateWhileInteracting&&t.updateWhileInteracting}e(Av,iv),Av.prototype.Gi=function(t,e,o){Ev(this,"precompose",o,t),Ea(o,34962,this.T);var i,r=o.b,n=La(o,xv,Mv);this.u?i=this.u:this.u=i=new Pv(r,n),o.Qc(n)&&(r.enableVertexAttribArray(i.b),r.vertexAttribPointer(i.b,2,5126,!1,16,0),r.enableVertexAttribArray(i.a),r.vertexAttribPointer(i.a,2,5126,!1,16,8),r.uniform1i(i.f,0)),r.uniformMatrix4fv(i.g,!1,pa(this.C,this.v)),r.uniformMatrix4fv(i.c,!1,pa(this.C,this.S)),r.uniform1f(i.i,e.opacity),r.bindTexture(3553,this.Ib),r.drawArrays(5,0,4),Ev(this,"postcompose",o,t)},Av.prototype.mg=function(){this.g=this.Ib=null,this.j=void 0},e(Tv,Av),(r=Tv.prototype).Gi=function(t,e,o){this.o=e;var i=t.viewState,r=this.f,n=t.size,s=t.pixelRatio,a=this.c.i;r&&!r.i()&&(a.enable(a.SCISSOR_TEST),a.scissor(0,0,n[0]*s,n[1]*s),r.La(o,i.center,i.resolution,i.rotation,n,s,e.opacity,e.Je?t.skippedFeatureUids:{}),a.disable(a.SCISSOR_TEST))},r.ka=function(){var t=this.f;t&&(oh(t,this.c.f)(),this.f=null),Av.prototype.ka.call(this)},r.Ea=function(t,e,o,i,r){var n,s;if(this.f&&this.o)return o=e.viewState,n=this.a,s={},this.f.Ea(t,this.c.f,o.center,o.resolution,o.rotation,e.size,e.pixelRatio,this.o.opacity,{},function(t){var e=U(t).toString();if(!(e in s))return s[e]=!0,i.call(r,t,n)})},r.Ue=function(t,e){var o,i,r,n,s,a,p;return!(!this.f||!this.o)&&(n=e.viewState,o=this.f,t=t,i=this.c.f,r=n.resolution,n=n.rotation,s=e.pixelRatio,a=this.o.opacity,e=e.skippedFeatureUids,(p=i.b).bindFramebuffer(p.FRAMEBUFFER,ja(i)),void 0!==ih(o,i,t,r,n,s,a,e,function(){var t=new Uint8Array(4);return p.readPixels(0,0,1,1,p.RGBA,p.UNSIGNED_BYTE,t),0<t[3]},!1))},r.lg=function(t,e,o,i){if(t=Ps(e.pixelToCoordinateTransform,t.slice()),this.Ue(t,e))return o.call(i,this.a,null)},r.Hi=function(){nv(this)},r.ng=function(t,e,o){function i(t){var e,o=t.Lc();if(o?e=o.call(t,h):(o=r.f)&&(e=o(t,h)),e){if(o=!1,Array.isArray(e))for(var i=e.length-1;0<=i;--i)o=vv(y,t,e[i],dv(h,l),this.Hi,this)||o;else o=vv(y,t,e,dv(h,l),this.Hi,this)||o;t=o,this.l=this.l||t}}var r=this.a,n=(e=r.ha(),av(t.attributions,e.j),pv(t,e),t.viewHints[0]),s=t.viewHints[1],a=r.T,p=r.na;if(!(!this.l&&!a&&n||!p&&s)){var s=t.extent,n=(a=t.viewState).projection,h=a.resolution,l=t.pixelRatio,a=r.i,u=r.c,p=r.get(jv);if(void 0===p&&(p=gv),s=lt(s,u*h),this.l||this.I!=h||this.R!=a||this.B!=p||!yt(this.D,s)){this.f&&t.postRenderFunctions.push(oh(this.f,o)),this.l=!1;var c,f,y=new eh(.5*h/l,s,r.c),g=(e.Yd(s,h,n),p?(c=[],e.$b(s,function(t){c.push(t)},this),c.sort(p),c.forEach(i,this)):e.$b(s,i,this),y),d=o;for(f in g.a){var v,b=g.a[f];for(v in b)b[v].Db(d)}this.I=h,this.R=a,this.B=p,this.D=s,this.f=y}}return!0},e(s,ys),s.prototype.Fd=function(t){var e=null,o=t.U();return"canvas"===o?e=new mv(this):"webgl"===o&&(e=new Tv(t,this)),e},s.prototype.D=function(){return this.u},s.prototype.C=function(){return this.f},s.prototype.g=function(t){this.u=void 0!==t?t:$h,this.f=null===t?void 0:Jh(this.u),this.s()};var jv="renderOrder";function Cv(){return[[-1/0,-1/0,1/0,1/0]]}function Lv(t){ro.call(this),this.c=v(t.projection),this.j=Rv(t.attributions),this.D=t.logo,this.na=void 0!==t.state?t.state:"ready",this.u=void 0!==t.wrapX&&t.wrapX}function Rv(t){if("string"==typeof t)return[new Be({html:t})];if(t instanceof Be)return[t];if(Array.isArray(t)){for(var e=t.length,o=Array(e),i=0;i<e;i++){var r=t[i];o[i]="string"==typeof r?new Be({html:r}):r}return o}return null}function Iv(t,e){t.na=e,t.s()}function a(t){Lv.call(this,{attributions:(t=t||{}).attributions,logo:t.logo,projection:void 0,state:"ready",wrapX:void 0===t.wrapX||t.wrapX}),this.B=Y,this.C=t.format,this.T=null==t.overlaps||t.overlaps,this.I=t.url,t.loader?this.B=t.loader:void 0!==this.I&&(O(this.C,7),this.B=ml(this.I,this.C)),this.fa=t.strategy||Cv;var e,o,i,r,n=void 0===t.useSpatialIndex||t.useSpatialIndex;this.a=n?new Fp:null,this.R=new Fp,this.g={},this.o={},this.l={},this.v={},this.f=null,t.features instanceof ho?o=(e=t.features).a:Array.isArray(t.features)&&(o=t.features),n||(e=e||new ho(o)),o&&kv(this,o),e&&(i=e,r=!1,d(t=this,"addfeature",function(t){r||(r=!0,i.push(t.feature),r=!1)}),d(t,"removefeature",function(t){r||(r=!0,i.remove(t.feature),r=!1)}),d(i,"add",function(t){r||(r=!0,this.yb(t.element),r=!1)},t),d(i,"remove",function(t){r||(r=!0,this.Gb(t.element),r=!1)},t),t.f=i)}function Nv(t,e,o){t.v[e]=[d(o,"change",t.Oi,t),d(o,"propertychange",t.Oi,t)]}function Fv(t,e,o){var i=!0,r=o.a;return void 0!==r?r.toString()in t.o?i=!1:t.o[r.toString()]=o:(O(!(e in t.l),30),t.l[e]=o),i}function kv(t,e){for(var o=[],i=[],r=[],n=0,s=e.length;n<s;n++){var a=e[n],p=U(a).toString();Fv(t,p,a)&&i.push(a)}for(n=0,s=i.length;n<s;n++)Nv(t,p=U(a=i[n]).toString(),a),(e=a.V())?(p=e.G(),o.push(p),r.push(a)):t.g[p]=a;for(t.a&&t.a.load(o,r),n=0,s=i.length;n<s;n++)t.b(new Ov("addfeature",i[n]))}function Dv(t,e){for(var o in t.o)if(t.o[o]===e){delete t.o[o];break}}function Ov(t,e){Qe.call(this,t),this.feature=e}function Uv(t){var e;Mn.call(this,{handleDownEvent:Bv,handleEvent:Gv,handleUpEvent:Xv}),this.T=!1,this.fa=null,this.u=!1,this.Yb=t.source||null,this.$a=t.features||null,this.wk=t.snapTolerance||12,this.R=t.type,this.g=("Point"===(n=this.R)||"MultiPoint"===n?e=Hv:"LineString"===n||"MultiLineString"===n?e=qv:"Polygon"===n||"MultiPolygon"===n?e=Jv:"Circle"===n&&(e=_v),e),this.Sa=t.minPoints||(this.g===Jv?3:2),this.va=t.maxPoints||1/0,this.Cf=t.finishCondition||cr;var o,i,r,n=(n=t.geometryFunction)||("Circle"===this.R?function(t,e){return(e=e||new h0([NaN,NaN])).Ng(t[0],Math.sqrt(pr(t[0],t[1]))),e}:((i=this.g)===Hv?o=m:i===qv?o=S:i===Jv&&(o=w),function(t,e){return e?i===Jv?e.ma([t[0].concat([t[0][0]])]):e.ma(t):e=new o(t),e}));this.Za=n,this.I=this.C=this.a=this.B=this.j=this.l=null,this.ad=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,this.pa=new s({source:new a({useSpatialIndex:!1,wrapX:t.wrapX||!1}),style:t.style||(r=Qh(),function(t){return r[t.V().U()]})}),this.xb=t.geometryName,this.vk=t.condition||bn,this.Df=t.freehand?cr:t.freehandCondition||mn,d(this,so("active"),this.ri,this)}function Gv(t){this.u=this.g!==Hv&&this.Df(t);var e=!this.u;return this.u&&"pointerdrag"===t.type&&null!==this.j?(Kv(this,t),e=!1):"pointermove"===t.type?e=Vv(this,t):"dblclick"===t.type&&(e=!1),An.call(this,t)&&e}function Bv(t){return this.T=!this.u,this.u?(this.fa=t.pixel,this.l||Zv(this,t),!0):!!this.vk(t)&&(this.fa=t.pixel,!0)}function Xv(t){var e=!0,o=(Vv(this,t),this.g===_v);return this.T?(this.l?this.u||o?this.Pd():Wv(this,t)?this.Cf(t)&&this.Pd():Kv(this,t):(Zv(this,t),this.g===Hv&&this.Pd()),e=!1):this.u&&(this.l=null,zv(this)),e}function Vv(t,e){var o,i,r;return t.fa&&(!t.u&&t.T||t.u&&!t.T)&&(i=t.fa,o=e.pixel,r=(r=i[0]-o[0])*r+(i=i[1]-o[1])*i,t.T=t.u?r>t.ad:r<=t.ad),t.l?(r=e.coordinate,i=t.j.V(),t.g===Hv?o=t.a:t.g===Jv?(o=(o=t.a[0])[o.length-1],Wv(t,e)&&(r=t.l.slice())):o=(o=t.a)[o.length-1],o[0]=r[0],o[1]=r[1],t.Za(t.a,i),t.B&&t.B.V().ma(r),i instanceof w&&t.g!==Jv?(t.C||(t.C=new x(new S(null))),r=i.Ch(0),(e=t.C.V()).ba(r.ja,r.ga())):t.I&&(e=t.C.V()).ma(t.I),Yv(t)):(e=e.coordinate.slice(),t.B?t.B.V().ma(e):(t.B=new x(new m(e)),Yv(t))),!0}function Wv(t,e){var o=!1;if(t.j){var i=!1,r=[t.l];if(t.g===qv?i=t.a.length>t.Sa:t.g===Jv&&(i=t.a[0].length>t.Sa,r=[t.a[0][0],t.a[0][t.a[0].length-2]]),i)for(var i=e.map,n=0,s=r.length;n<s;n++){var a=r[n],p=i.Ja(a),h=e.pixel,o=h[0]-p[0],p=h[1]-p[1];if(o=Math.sqrt(o*o+p*p)<=(t.u?1:t.wk)){t.l=a;break}}}return o}function Zv(t,e){e=e.coordinate,t.l=e,t.g===Hv?t.a=e.slice():t.g===Jv?(t.a=[[e.slice(),e.slice()]],t.I=t.a[0]):(t.a=[e.slice(),e.slice()],t.g===_v&&(t.I=t.a)),t.I&&(t.C=new x(new S(t.I))),e=t.Za(t.a),t.j=new x,t.xb&&t.j.Tc(t.xb),t.j.Ra(e),Yv(t),t.b(new $v("drawstart",t.j))}function Kv(t,e){e=e.coordinate;var o,i,r=t.j.V();t.g===qv?(t.l=e.slice(),(i=t.a).length>=t.va&&(t.u?i.pop():o=!0),i.push(e.slice()),t.Za(i,r)):t.g===Jv&&((i=t.a[0]).length>=t.va&&(t.u?i.pop():o=!0),i.push(e.slice()),o&&(t.l=i[0]),t.Za(t.a,r)),Yv(t),o&&t.Pd()}function zv(t){t.l=null;var e=t.j;return e&&(t.j=null,t.B=null,t.C=null,t.pa.ha().clear(!0)),e}function Yv(t){var e=[];t.j&&e.push(t.j),t.C&&e.push(t.C),t.B&&e.push(t.B),(t=t.pa.ha()).clear(!0),t.cd(e)}e(Lv,ro),(r=Lv.prototype).Ea=Y,r.ya=function(){return this.j},r.xa=function(){return this.D},r.za=function(){return this.c},r.getState=function(){return this.na},r.sa=function(){this.s()},r.ua=function(t){this.j=Rv(t),this.s()},e(a,Lv),(r=a.prototype).yb=function(t){var e,o=U(t).toString();Fv(this,o,t)&&(Nv(this,o,t),(e=t.V())?(o=e.G(),this.a&&this.a.Ca(o,t)):this.g[o]=t,this.b(new Ov("addfeature",t))),this.s()},r.cd=function(t){kv(this,t),this.s()},r.clear=function(t){if(t){for(var e in this.v)this.v[e].forEach(qe);this.f||(this.v={},this.o={},this.l={})}else if(this.a)for(var o in this.a.forEach(this.Ig,this),this.g)this.Ig(this.g[o]);this.f&&this.f.clear(),this.a&&this.a.clear(),this.R.clear(),this.g={},this.b(new Ov("clear")),this.s()},r.sh=function(t,e){return this.a?this.a.forEach(t,e):this.f?this.f.forEach(t,e):void 0},r.$b=function(t,e,o){return this.a?Up(this.a,t,e,o):this.f?this.f.forEach(e,o):void 0},r.th=function(e,o,i){return this.$b(e,function(t){if(t.V().Xa(e)&&(t=o.call(i,t)))return t})},r.Ah=function(){return this.f},r.Xe=function(){var t;return this.f?t=this.f.a:this.a&&(t=Dp(this.a),Zt(this.g)||X(t,Wt(this.g))),t},r.zh=function(t){var e,o,i=[];return e=t,o=function(t){i.push(t)},this.$b([e[0],e[1],e[0],e[1]],function(t){if(t.V().sb(e))return o.call(void 0,t)}),i},r.Uf=function(t){return Op(this.a,t)},r.vh=function(t,e){var i=t[0],r=t[1],n=null,s=[NaN,NaN],a=1/0,p=[-1/0,-1/0,1/0,1/0],h=e||cr;return Up(this.a,p,function(t){var e,o;h(t)&&(e=t.V(),o=a,(a=e.Kb(i,r,s,a))<o)&&(n=t,t=Math.sqrt(a),p[0]=i-t,p[1]=r-t,p[2]=i+t,p[3]=r+t)}),n},r.G=function(t){return this.a.G(t)},r.yh=function(t){return void 0!==(t=this.o[t.toString()])?t:null},r.Mi=function(){return this.C},r.Ni=function(){return this.I},r.Oi=function(t){var e=U(t=t.target).toString(),o=t.V();o?(o=o.G(),e in this.g?(delete this.g[e],this.a&&this.a.Ca(o,t)):this.a&&kp(this.a,o,t)):e in this.g||(this.a&&this.a.remove(t),this.g[e]=t),void 0!==(o=t.a)?(o=o.toString(),e in this.l?(delete this.l[e],this.o[o]=t):this.o[o]!==t&&(Dv(this,t),this.o[o]=t)):e in this.l||(Dv(this,t),this.l[e]=t),this.s(),this.b(new Ov("changefeature",t))},r.Yd=function(t,e,o){for(var i=this.R,r=0,n=(t=this.fa(t,e)).length;r<n;++r){var s=t[r];Up(i,s,function(t){return yt(t.extent,s)})||(this.B.call(this,s,e,o),i.Ca(s,{extent:s.slice()}))}},r.Gb=function(t){var e=U(t).toString();e in this.g?delete this.g[e]:this.a&&this.a.remove(t),this.Ig(t),this.s()},r.Ig=function(t){var e=U(t).toString(),o=(this.v[e].forEach(qe),delete this.v[e],t.a);void 0!==o?delete this.o[o.toString()]:delete this.l[e],this.b(new Ov("removefeature",t))},e(Ov,Qe),e(Uv,Mn),(r=Uv.prototype).setMap=function(t){Mn.prototype.setMap.call(this,t),this.ri()},r.Op=function(){var t,e;this.j&&(t=this.j.V(),this.g===qv?((e=this.a).splice(-2,1),this.Za(e,t),2<=e.length&&(this.l=e[e.length-2].slice())):this.g===Jv&&((e=this.a[0]).splice(-2,1),this.C.V().ma(e),this.Za(this.a,t)),0===e.length&&(this.l=null),Yv(this))},r.Pd=function(){var t=zv(this),e=this.a,o=t.V();this.g===qv?(e.pop(),this.Za(e,o)):this.g===Jv&&(e[0].pop(),this.Za(e,o),e=o.X()),"MultiPoint"===this.R?t.Ra(new P([e])):"MultiLineString"===this.R?t.Ra(new M([e])):"MultiPolygon"===this.R&&t.Ra(new f([e])),this.b(new $v("drawend",t)),this.$a&&this.$a.push(t),this.Yb&&this.Yb.yb(t)},r.vn=function(t){var e=t.V();this.j=t,this.a=e.X(),t=this.a[this.a.length-1],this.l=t.slice(),this.a.push(t.slice()),Yv(this),this.b(new $v("drawstart",this.j))},r.Xc=fr,r.ri=function(){var t=this.v,e=this.c();t&&e||zv(this),this.pa.setMap(e?t:null)};var Hv="Point",qv="LineString",Jv="Polygon",_v="Circle";function $v(t,e){Qe.call(this,t),this.feature=e}function Qv(t){var e,o;this.a=this.j=null,this.C=!1,this.B=this.l=null,(t=t||{}).extent&&this.g(t.extent),Mn.call(this,{handleDownEvent:eb,handleDragEvent:ob,handleEvent:tb,handleUpEvent:ib}),this.u=new s({source:new a({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.boxStyle||(e=Qh(),function(){return e.Polygon}),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.I=new s({source:new a({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.pointerStyle||(o=Qh(),function(){return o.Point}),updateWhileAnimating:!0,updateWhileInteracting:!0})}function tb(t){var e,o;return!(t instanceof mi&&("pointermove"!=t.type||this.D||ab(this,sb(this,e=t.pixel,o=t.map)||o.Wa(e)),An.call(this,t),1))}function eb(t){function e(t){var e=null,o=null;return t[0]==r[0]?e=r[2]:t[0]==r[2]&&(e=r[0]),t[1]==r[1]?o=r[3]:t[1]==r[3]&&(o=r[1]),null!==e&&null!==o?[e,o]:null}var o=t.pixel,i=t.map,r=this.G();return(t=sb(this,o,i))&&r?(o=t[0]==r[0]||t[0]==r[2]?t[0]:null,i=t[1]==r[1]||t[1]==r[3]?t[1]:null,null!==o&&null!==i?this.a=rb(e(t)):null!==o?this.a=nb(e([o,r[1]]),e([o,r[3]])):null!==i&&(this.a=nb(e([r[0],i]),e([r[2],i])))):(t=i.Wa(o),this.g([t[0],t[1],t[0],t[1]]),this.a=rb(t)),!0}function ob(t){return this.a&&(t=t.coordinate,this.g(this.a(t)),ab(this,t)),!0}function ib(){this.a=null;var t=this.G();return t&&Tt(t)||this.g(null),!1}function rb(e){return function(t){return ht([e,t])}}function nb(e,o){return e[0]==o[0]?function(t){return ht([e,[t[0],o[1]]])}:e[1]==o[1]?function(t){return ht([e,[o[0],t[1]]])}:null}function sb(t,e,o){var i=o.Wa(e);if(r=t.G()){(r=[[[r[0],r[1]],[r[0],r[3]]],[[r[0],r[3]],[r[2],r[3]]],[[r[2],r[3]],[r[2],r[1]]],[[r[2],r[1]],[r[0],r[1]]]]).sort(function(t,e){return lr(i,t)-lr(i,e)});var r=r[0],n=or(i,r),s=o.Ja(n);if(hr(e,s)<=10)return e=o.Ja(r[0]),o=o.Ja(r[1]),e=pr(s,e),o=pr(s,o),t.C=Math.sqrt(Math.min(e,o))<=10,n=t.C?o<e?r[1]:r[0]:n}return null}function ab(t,e){var o=t.B;o?o.V().ma(e):(o=new x(new m(e)),t.B=o,t.I.ha().yb(o))}function pb(t){Qe.call(this,hb),this.b=t}e($v,Qe),e(Qv,Mn),Qv.prototype.setMap=function(t){this.u.setMap(t),this.I.setMap(t),Mn.prototype.setMap.call(this,t)},Qv.prototype.G=function(){return this.j},Qv.prototype.g=function(t){this.j=t||null;var e=this.l;e?t?e.Ra(Hr(t)):e.Ra(void 0):(this.l=e=new x(t?Hr(t):{}),this.u.ha().yb(e)),this.b(new pb(this.j))},e(pb,Qe);var hb="extentchanged";function lb(t){var e;Mn.call(this,{handleDownEvent:gb,handleDragEvent:db,handleEvent:bb,handleUpEvent:vb}),this.ad=t.condition||Sn,this.$a=function(t){return bn(t)&&vn(t)},this.xb=t.deleteCondition||this.$a,this.Yb=t.insertVertexCondition||cr,this.Sa=this.g=null,this.va=[0,0],this.C=this.I=!1,this.a=new Fp,this.fa=void 0!==t.pixelTolerance?t.pixelTolerance:10,this.l=this.pa=!1,this.j=[],this.B=new s({source:new a({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style||(e=Qh(),function(){return e.Point}),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.T={Point:this.Dn,LineString:this.ti,LinearRing:this.ti,Polygon:this.En,MultiPoint:this.Bn,MultiLineString:this.An,MultiPolygon:this.Cn,Circle:this.yn,GeometryCollection:this.zn},this.u=t.features,this.u.forEach(this.kg,this),d(this.u,"add",this.wn,this),d(this.u,"remove",this.xn,this),this.R=null}function ub(t,e){t.C||(t.C=!0,t.b(new Mb("modifystart",t.u,e)))}function cb(t,e){var o=t,i=e,r=(o=o.a,[]);o.forEach(function(t){i===t.feature&&r.push(t)});for(var n=r.length-1;0<=n;--n)o.remove(r[n]);t.g&&!t.u.dc()&&(t.B.ha().Gb(t.g),t.g=null),He(e,"change",t.si,t)}function fb(t,e){var o=t.g;o?o.V().ma(e):(o=new x(new m(e)),t.g=o,t.B.ha().yb(o))}function yb(t,e){return t.index-e.index}function gb(t){if(!this.ad(t))return!1;mb(this,t.pixel,t.map);var e=t.map.Wa(t.pixel);if(this.j.length=0,this.C=!1,o=this.g){var o,i=[],r=ht([o=o.V().X()]),n={};(r=Op(this.a,r)).sort(yb);for(var s=0,a=r.length;s<a;++s){var p=r[s],h=p.la,l=U(p.feature),u=p.depth;u&&(l+="-"+u.join("-")),n[l]||(n[l]=Array(2)),"Circle"===p.geometry.U()&&1===p.index?nr(h=xb(e,p),o)&&!n[l][0]&&(this.j.push([p,0]),n[l][0]=p):nr(h[0],o)&&!n[l][0]?(this.j.push([p,0]),n[l][0]=p):nr(h[1],o)&&!n[l][1]?("LineString"===p.geometry.U()||"MultiLineString"===p.geometry.U())&&n[l][0]&&0===n[l][0].index||(this.j.push([p,1]),n[l][1]=p):this.Yb(t)&&U(h)in this.Sa&&!n[l][0]&&!n[l][1]&&i.push([p,o])}for(i.length&&ub(this,t),t=i.length-1;0<=t;--t)this.bm.apply(this,i[t])}return!!this.g}function db(t){this.I=!1,ub(this,t),t=t.coordinate;for(var e=0,o=this.j.length;e<o;++e){for(var i,r=(p=this.j[e])[0],n=r.depth,s=r.geometry,a=r.la,p=p[1];t.length<s.qa();)t.push(a[p][t.length]);switch(s.U()){case"Point":i=t,a[0]=a[1]=t;break;case"MultiPoint":(i=s.X())[r.index]=t,a[0]=a[1]=t;break;case"LineString":(i=s.X())[r.index+p]=t,a[p]=t;break;case"MultiLineString":case"Polygon":(i=s.X())[n[0]][r.index+p]=t,a[p]=t;break;case"MultiPolygon":(i=s.X())[n[1]][n[0]][r.index+p]=t,a[p]=t;break;case"Circle":a[0]=a[1]=t,0===r.index?(this.l=!0,s.ob(t)):(this.l=!0,s.Uc(hr(s.wa(),t))),this.l=!1}i&&(r=s,n=i,this.l=!0,r.ma(n),this.l=!1)}fb(this,t)}function vb(t){for(var e,o,i,r,n=this.j.length-1;0<=n;--n)"Circle"===(e=(r=this.j[n][0]).geometry).U()?(o=e.wa(),i=r.Pf[0],r=r.Pf[1],i.la[0]=i.la[1]=o,r.la[0]=r.la[1]=o,kp(this.a,wt(o),i),kp(this.a,e.G(),r)):kp(this.a,ht(r.la),r);return this.C&&(this.b(new Mb("modifyend",this.u,t)),this.C=!1),!1}function bb(t){var e;return!(t instanceof mi)||(on((this.R=t).map.Z())[1]||"pointermove"!=t.type||this.D||(this.va=t.pixel,mb(this,t.pixel,t.map)),this.g&&this.xb(t)&&(e=!("singleclick"!=t.type||!this.I)||this.hj()),"singleclick"==t.type&&(this.I=!1),An.call(this,t)&&!e)}function mb(t,e,o){var i=o.Wa(e),r=lt(wt(i),o.Z().Pa()*t.fa);if(0<(r=Op(t.a,r)).length){r.sort(function(t,e){return wb(i,t)-wb(i,e)});var n,s=r[0],a=s.la,p=xb(i,s),h=o.Ja(p);if(hr(e,h)<=t.fa){if(e={},"Circle"===s.geometry.U()&&1===s.index)t.pa=!0,fb(t,p);else for(n=o.Ja(a[0]),s=o.Ja(a[1]),o=pr(h,n),h=pr(h,s),n=Math.sqrt(Math.min(o,h)),t.pa=n<=t.fa,fb(t,p=t.pa?h<o?a[1]:a[0]:p),h=1,o=r.length;h<o&&(p=r[h].la,nr(a[0],p[0])&&nr(a[1],p[1])||nr(a[0],p[1])&&nr(a[1],p[0]));++h)e[U(p)]=!0;return e[U(a)]=!0,void(t.Sa=e)}}t.g&&(t.B.ha().Gb(t.g),t.g=null)}function wb(t,e){var o=e.geometry;return"Circle"===o.U()&&1===e.index?(t=pr(o.wa(),t),(o=Math.sqrt(t)-o.pd())*o):lr(t,e.la)}function xb(t,e){var o=e.geometry;return"Circle"===o.U()&&1===e.index?o.Ab(t):or(t,e.la)}function Sb(t,e,o,i,r){Up(t.a,e.G(),function(t){t.geometry===e&&(void 0===i||void 0===t.depth||Z(t.depth,i))&&t.index>o&&(t.index+=r)})}function Mb(t,e,o){Qe.call(this,t),this.features=e,this.mapBrowserEvent=o}function Pb(t){var e,o;pn.call(this,{handleEvent:Ab}),this.C=(t=t||{}).condition||vn,this.D=t.addCondition||fr,this.B=t.removeCondition||fr,this.I=t.toggleCondition||mn,this.l=t.multi||!1,this.o=t.filter||cr,this.j=t.hitTolerance||0,this.g=new s({source:new a({useSpatialIndex:!1,features:t.features,wrapX:t.wrapX}),style:t.style||(X((e=Qh()).Polygon,e.LineString),X(e.GeometryCollection,e.LineString),function(t){return t.V()?e[t.V().U()]:null}),updateWhileAnimating:!0,updateWhileInteracting:!0}),t=t.layers?"function"==typeof t.layers?t.layers:(o=t.layers,function(t){return D(o,t)}):cr,this.u=t,this.a={},d(t=this.g.ha().f,"add",this.Fn,this),d(t,"remove",this.Jn,this)}function Ab(t){if(!this.C(t))return!0;var o=this.D(t),i=this.B(t),r=this.I(t),e=!o&&!i&&!r,n=t.map,s=this.g.ha().f,a=[],p=[];if(e){for(Vt(this.a),n.we(t.pixel,function(t,e){if(this.o(t,e))return p.push(t),t=U(t),this.a[t]=e,!this.l}.bind(this),{layerFilter:this.u,hitTolerance:this.j}),e=s.dc()-1;0<=e;--e){var n=s.item(e),h=p.indexOf(n);-1<h?p.splice(h,1):(s.remove(n),a.push(n))}p.length&&s.fg(p)}else{for(n.we(t.pixel,function(t,e){if(this.o(t,e))return!o&&!r||D(s.a,t)?(i||r)&&D(s.a,t)&&(a.push(t),e=U(t),delete this.a[e]):(p.push(t),t=U(t),this.a[t]=e),!this.l}.bind(this),{layerFilter:this.u,hitTolerance:this.j}),e=a.length-1;0<=e;--e)s.remove(a[e]);s.fg(p)}return(0<p.length||0<a.length)&&this.b(new Eb(Tb,p,a,t)),dn(t)}function Eb(t,e,o,i){Qe.call(this,t),this.selected=e,this.deselected=o,this.mapBrowserEvent=i}e(lb,Mn),(r=lb.prototype).kg=function(t){var e=t.V();e&&e.U()in this.T&&this.T[e.U()].call(this,t,e),(e=this.v)&&e.c&&this.c()&&mb(this,this.va,e),d(t,"change",this.si,this)},r.Ha=function(t){this.g&&!t&&(this.B.ha().Gb(this.g),this.g=null),Mn.prototype.Ha.call(this,t)},r.setMap=function(t){this.B.setMap(t),Mn.prototype.setMap.call(this,t)},r.wn=function(t){this.kg(t.element)},r.si=function(t){this.l||(cb(this,t=t.target),this.kg(t))},r.xn=function(t){cb(this,t.element)},r.Dn=function(t,e){var o=e.X();t={feature:t,geometry:e,la:[o,o]},this.a.Ca(e.G(),t)},r.Bn=function(t,e){for(var o=e.X(),i=0,r=o.length;i<r;++i){var n={feature:t,geometry:e,depth:[i],index:i,la:[n=o[i],n]};this.a.Ca(e.G(),n)}},r.ti=function(t,e){for(var o=e.X(),i=0,r=o.length-1;i<r;++i){var n=o.slice(i,i+2),s={feature:t,geometry:e,index:i,la:n};this.a.Ca(ht(n),s)}},r.An=function(t,e){for(var o=e.X(),i=0,r=o.length;i<r;++i)for(var n=o[i],s=0,a=n.length-1;s<a;++s){var p=n.slice(s,s+2),h={feature:t,geometry:e,depth:[i],index:s,la:p};this.a.Ca(ht(p),h)}},r.En=function(t,e){for(var o=e.X(),i=0,r=o.length;i<r;++i)for(var n=o[i],s=0,a=n.length-1;s<a;++s){var p=n.slice(s,s+2),h={feature:t,geometry:e,depth:[i],index:s,la:p};this.a.Ca(ht(p),h)}},r.Cn=function(t,e){for(var o=e.X(),i=0,r=o.length;i<r;++i)for(var n=o[i],s=0,a=n.length;s<a;++s)for(var p=n[s],h=0,l=p.length-1;h<l;++h){var u=p.slice(h,h+2),c={feature:t,geometry:e,depth:[s,i],index:h,la:u};this.a.Ca(ht(u),c)}},r.yn=function(t,e){var o=e.wa(),i={feature:t,geometry:e,index:0,la:[o,o]};i.Pf=(t={feature:t,geometry:e,index:1,la:[o,o]}).Pf=[i,t],this.a.Ca(wt(o),i),this.a.Ca(e.G(),t)},r.zn=function(t,e){var o=e.a;for(e=0;e<o.length;++e)this.T[o[e].U()].call(this,t,o[e])},r.bm=function(t,e){for(var o,i=t.la,r=t.feature,n=t.geometry,s=t.depth,a=t.index;e.length<n.qa();)e.push(0);switch(n.U()){case"MultiLineString":case"Polygon":(o=n.X())[s[0]].splice(a+1,0,e);break;case"MultiPolygon":(o=n.X())[s[1]][s[0]].splice(a+1,0,e);break;case"LineString":(o=n.X()).splice(a+1,0,e);break;default:return}this.l=!0,n.ma(o),this.l=!1,(o=this.a).remove(t),Sb(this,n,a,s,1),t={la:[i[0],e],feature:r,geometry:n,depth:s,index:a},o.Ca(ht(t.la),t),this.j.push([t,1]),e={la:[e,i[1]],feature:r,geometry:n,depth:s,index:a+1},o.Ca(ht(e.la),e),this.j.push([e,0]),this.I=!0},r.hj=function(){if(this.R&&"pointerdrag"!=this.R.type){var t,e=this.R,o=(ub(this,e),this.j),i={};for(a=o.length-1;0<=a;--a){var r=o[a],n=r[0],s=U(n.feature);n.depth&&(s+="-"+n.depth.join("-")),s in i||(i[s]={}),0===r[1]?(i[s].right=n,i[s].index=n.index):1==r[1]&&(i[s].left=n,i[s].index=n.index+1)}for(s in i){var a,p=i[s].right,h=i[s].left,l=(a=i[s].index)-1;l<0&&(l=0);var u=t=(r=(n=void 0!==h?h:p).geometry).X(),c=!1;switch(r.U()){case"MultiLineString":2<t[n.depth[0]].length&&(t[n.depth[0]].splice(a,1),c=!0);break;case"LineString":2<t.length&&(t.splice(a,1),c=!0);break;case"MultiPolygon":u=u[n.depth[1]];case"Polygon":4<(u=u[n.depth[0]]).length&&(a==u.length-1&&(a=0),u.splice(a,1),c=!0,0===a)&&(u.pop(),u.push(u[0]),l=u.length-1)}c&&(c=r,this.l=!0,c.ma(t),this.l=!1,t=[],void 0!==h&&(this.a.remove(h),t.push(h.la[0])),void 0!==p&&(this.a.remove(p),t.push(p.la[1])),void 0!==h&&void 0!==p&&(h={depth:n.depth,feature:n.feature,geometry:n.geometry,index:l,la:t},this.a.Ca(ht(h.la),h)),Sb(this,r,a,n.depth,-1),this.g&&(this.B.ha().Gb(this.g),this.g=null),o.length=0)}return this.b(new Mb("modifyend",this.u,e)),!(this.C=!1)}return!1},e(Mb,Qe),e(Pb,pn),(r=Pb.prototype).Gn=function(){return this.g.ha().f},r.Hn=function(){return this.j},r.In=function(t){return t=U(t),this.a[t]},r.Kn=function(t){this.j=t},r.setMap=function(t){var e=this.v,o=this.g.ha().f;e&&o.forEach(e.Cj,e),pn.prototype.setMap.call(this,t),this.g.setMap(t),t&&o.forEach(t.xj,t)},r.Fn=function(t){var e=this.v;e&&e.xj(t.element)},r.Jn=function(t){var e=this.v;e&&e.Cj(t.element)},e(Eb,Qe);var Tb="select";function jb(t){Mn.call(this,{handleEvent:Lb,handleDownEvent:cr,handleUpEvent:Rb}),this.l=(t=t||{}).source||null,this.R=void 0===t.vertex||t.vertex,this.C=void 0===t.edge||t.edge,this.j=t.features||null,this.pa=[],this.B={},this.T={},this.u={},this.I=null,this.g=void 0!==t.pixelTolerance?t.pixelTolerance:10,this.va=function(t,e){return lr(this.I,t.la)-lr(this.I,e.la)}.bind(this),this.a=new Fp,this.fa={Point:this.Rn,LineString:this.wi,LinearRing:this.wi,Polygon:this.Sn,MultiPoint:this.Pn,MultiLineString:this.On,MultiPolygon:this.Qn,GeometryCollection:this.Nn,Circle:this.Mn}}function Cb(t,e,o,i){var r,n,s,a,p,h,l=i.Wa([e[0]-t.g,e[1]+t.g]),u=i.Wa([e[0]+t.g,e[1]-t.g]),l=ht([l,u]),c=Op(t.a,l),f=!1,l=!1,y=u=null;return 0<(c=t.R&&!t.C?c.filter(function(t){return"Circle"!==t.feature.V().U()}):c).length&&(t.I=o,c.sort(t.va),r=c[0].la,f="Circle"===c[0].feature.V().U(),t.R&&!t.C?(o=i.Ja(r[0]),f=i.Ja(r[1]),o=pr(e,o),e=pr(e,f),(f=(f=Math.sqrt(Math.min(o,e)))<=t.g)&&(l=!0,u=e<o?r[1]:r[0],y=i.Ja(u))):t.C&&(u=f?(n=o,c=c[0].feature.V(),s=c.pd(),c=(a=c.wa())[0],a=a[1],p=n[0]-c,n=n[1]-a,p||n||(p=1),h=Math.sqrt(p*p+n*n),[c+s*p/h,a+s*n/h]):or(o,r),hr(e,y=i.Ja(u))<=t.g)&&(l=!0,t.R)&&!f&&(o=i.Ja(r[0]),f=i.Ja(r[1]),o=pr(y,o),e=pr(y,f),f=(f=Math.sqrt(Math.min(o,e)))<=t.g)&&(u=e<o?r[1]:r[0],y=i.Ja(u)),l)&&(y=[Math.round(y[0]),Math.round(y[1])]),{nq:l,vertex:u,wq:y}}function Lb(t){var e=Cb(this,t.pixel,t.coordinate,t.map);return e.nq&&(t.coordinate=e.vertex.slice(0,2),t.pixel=e.wq),An.call(this,t)}function Rb(){var t=Wt(this.u);return t.length&&(t.forEach(this.Dj,this),this.u={}),!1}function Ib(t){var e,o;Mn.call(this,{handleDownEvent:Nb,handleDragEvent:kb,handleMoveEvent:Db,handleUpEvent:Fb}),t=t||{},this.a=null,this.j=void 0!==t.features?t.features:null,o=t.layers?"function"==typeof t.layers?t.layers:(e=t.layers,function(t){return D(e,t)}):cr,this.C=o,this.l=t.hitTolerance||0,this.g=null,d(this,so("active"),this.u,this)}function Nb(t){var e;return this.g=Ob(this,t.pixel,t.map),!(this.a||!this.g||(this.a=t.coordinate,Db.call(this,t),e=this.j||new ho([this.g]),this.b(new Gb("translatestart",e,t.coordinate)),0))}function Fb(t){var e;return!!this.a&&(this.a=null,Db.call(this,t),e=this.j||new ho([this.g]),this.b(new Gb("translateend",e,t.coordinate)),!0)}function kb(t){var o,i,e;this.a&&(o=(t=t.coordinate)[0]-this.a[0],i=t[1]-this.a[1],(e=this.j||new ho([this.g])).forEach(function(t){var e=t.V();e.translate(o,i),t.Ra(e)}),this.a=t,this.b(new Gb("translating",e,t)))}function Db(t){var e=t.map.a;Ob(this,t.pixel,t.map)?(e.classList.remove(this.a?"ol-grab":"ol-grabbing"),e.classList.add(this.a?"ol-grabbing":"ol-grab")):e.classList.remove("ol-grab","ol-grabbing")}function Ob(t,e,o){return o.we(e,function(t){if(!this.j||D(this.j.a,t))return t}.bind(t),{layerFilter:t.C,hitTolerance:t.l})}function Ub(t,e){var o=t.v;t=t.c(),o&&t||(o=o||e).a.classList.remove("ol-grab","ol-grabbing")}function Gb(t,e,o){Qe.call(this,t),this.features=e,this.coordinate=o}function p(t){var e=Xt({},t=t||{}),o=(delete e.gradient,delete e.radius,delete e.blur,delete e.shadow,delete e.weight,s.call(this,e),this.j=null,this.R=void 0!==t.shadow?t.shadow:250,this.I=void 0,this.B=null,d(this,so(Vb),this.Bl,this),this.pj(t.gradient||Bb),this.jj(void 0!==t.blur?t.blur:15),this.Uc(void 0!==t.radius?t.radius:8),d(this,so(Xb),this.cg,this),d(this,so(Wb),this.cg,this),this.cg(),t.weight||"weight"),i="string"==typeof o?function(t){return t.get(o)}:o;this.g(function(t){var e=255*(t=void 0!==(t=i(t))?Q(t,0,1):1)|0,o=this.B[e];return o||(o=[new qh({image:new af({opacity:t,src:this.I})})],this.B[e]=o),o}.bind(this)),this.set(jv,null),d(this,"render",this.Sl,this)}e(jb,Mn),(r=jb.prototype).yb=function(t,e){e=void 0===e||e;var o,i=U(t),r=t.V();r&&(o=this.fa[r.U()])&&(this.T[i]=r.G(vt()),o.call(this,t,r)),e&&(this.B[i]=d(t,"change",this.Ln,this))},r.Ak=function(t){this.yb(t)},r.Bk=function(t){this.Gb(t)},r.ui=function(t){var e;t instanceof Ov?e=t.feature:t instanceof fo&&(e=t.element),this.yb(e)},r.vi=function(t){var e;t instanceof Ov?e=t.feature:t instanceof fo&&(e=t.element),this.Gb(e)},r.Ln=function(t){var e;t=t.target,this.D?(e=U(t))in this.u||(this.u[e]=t):this.Dj(t)},r.Gb=function(e,t){t=void 0===t||t;var o=U(e),i=this.T[o];if(i){var r=this.a,n=[];for(Up(r,i,function(t){e===t.feature&&n.push(t)}),i=n.length-1;0<=i;--i)r.remove(n[i])}t&&(qe(this.B[o]),delete this.B[o])},r.setMap=function(t){var e,o=this.v,i=this.pa;this.j?e=this.j:this.l&&(e=this.l.Xe()),o&&(i.forEach(qe),i.length=0,e.forEach(this.Bk,this)),Mn.prototype.setMap.call(this,t),t&&(this.j?i.push(d(this.j,"add",this.ui,this),d(this.j,"remove",this.vi,this)):this.l&&i.push(d(this.l,"addfeature",this.ui,this),d(this.l,"removefeature",this.vi,this)),e.forEach(this.Ak,this))},r.Xc=fr,r.Dj=function(t){this.Gb(t,!1),this.yb(t,!1)},r.Mn=function(t,e){for(var o=0,i=(e=qr(e).X()[0]).length-1;o<i;++o){var r=e.slice(o,o+2),n={feature:t,la:r};this.a.Ca(ht(r),n)}},r.Nn=function(t,e){var o=e.a;for(e=0;e<o.length;++e){var i=this.fa[o[e].U()];i&&i.call(this,t,o[e])}},r.wi=function(t,e){for(var o=0,i=(e=e.X()).length-1;o<i;++o){var r=e.slice(o,o+2),n={feature:t,la:r};this.a.Ca(ht(r),n)}},r.On=function(t,e){for(var o=0,i=(e=e.X()).length;o<i;++o)for(var r=e[o],n=0,s=r.length-1;n<s;++n){var a=r.slice(n,n+2),p={feature:t,la:a};this.a.Ca(ht(a),p)}},r.Pn=function(t,e){for(var o=e.X(),i=0,r=o.length;i<r;++i){var n={feature:t,la:[n=o[i],n]};this.a.Ca(e.G(),n)}},r.Qn=function(t,e){for(var o=0,i=(e=e.X()).length;o<i;++o)for(var r=e[o],n=0,s=r.length;n<s;++n)for(var a=r[n],p=0,h=a.length-1;p<h;++p){var l=a.slice(p,p+2),u={feature:t,la:l};this.a.Ca(ht(l),u)}},r.Rn=function(t,e){var o=e.X();t={feature:t,la:[o,o]},this.a.Ca(e.G(),t)},r.Sn=function(t,e){for(var o=0,i=(e=e.X()).length;o<i;++o)for(var r=e[o],n=0,s=r.length-1;n<s;++n){var a=r.slice(n,n+2),p={feature:t,la:a};this.a.Ca(ht(a),p)}},e(Ib,Mn),Ib.prototype.B=function(){return this.l},Ib.prototype.I=function(t){this.l=t},Ib.prototype.setMap=function(t){var e=this.v;Mn.prototype.setMap.call(this,t),Ub(this,e)},Ib.prototype.u=function(){Ub(this,null)},e(Gb,Qe),e(p,s);var Bb=["#00f","#0ff","#0f0","#ff0","#f00"],Xb=((r=p.prototype).uh=function(){return this.get(Xb)},r.Bh=function(){return this.get(Vb)},r.yi=function(){return this.get(Wb)},r.Bl=function(){for(var t=this.Bh(),e=Po(1,256),o=e.createLinearGradient(0,0,1,256),i=1/(t.length-1),r=0,n=t.length;r<n;++r)o.addColorStop(r*i,t[r]);e.fillStyle=o,e.fillRect(0,0,1,256),this.j=e.getImageData(0,0,1,256).data},r.cg=function(){var t=this.yi(),e=this.uh(),o=t+e+1,i=2*o;(i=Po(i,i)).shadowOffsetX=i.shadowOffsetY=this.R,i.shadowBlur=e,i.shadowColor="#000",i.beginPath(),e=o-this.R,i.arc(e,e,t,0,2*Math.PI,!0),i.fill(),this.I=i.canvas.toDataURL(),this.B=Array(256),this.s()},r.Sl=function(t){for(var e,o=(t=t.context).canvas,i=(o=t.getImageData(0,0,o.width,o.height)).data,r=0,n=i.length;r<n;r+=4)(e=4*i[r+3])&&(i[r]=this.j[e],i[r+1]=this.j[1+e],i[r+2]=this.j[2+e]);t.putImageData(o,0,0)},r.jj=function(t){this.set(Xb,t)},r.pj=function(t){this.set(Vb,t)},r.Uc=function(t){this.set(Wb,t)},"blur"),Vb="gradient",Wb="radius";function Zb(t){uv.call(this,t),this.v=ms(),this.j=null}function Kb(t){Zb.call(this,t),this.M=null,this.c=ms()}function zb(t,e,o,i){var r=Me(o,e,t);return o=ce(e,i,o),void 0!==(e=e.sc())&&(o*=e),void 0!==(e=t.sc())&&(o/=e),t=ce(t,o,r)/o,isFinite(t)&&0<t&&(o/=t),o}function Yb(t,e,o,i){t=o-t,e=i-e;var r=Math.sqrt(t*t+e*e);return[Math.round(o+t/r),Math.round(i+e/r)]}function Hb(t,e,g,d,o,v,i,r,n,s,a){var b,m,p,w,x=Po(Math.round(g*t),Math.round(g*e));return n.length&&(x.scale(g,g),b=vt(),n.forEach(function(t){Mt(b,t.extent)}),m=Po(Math.round(g*Dt(b)/d),Math.round(g*It(b)/d)),p=g/d,n.forEach(function(t){m.drawImage(t.image,s,s,t.image.width-2*s,t.image.height-2*s,(t.extent[0]-b[0])*p,-(t.extent[3]-b[3])*p,Dt(t.extent)*p,It(t.extent)*p)}),w=Ft(i),r.c.forEach(function(t){var e=t.source,o=t.target,i=e[1][0],r=e[1][1],n=e[2][0],s=e[2][1],a=(t=(o[0][0]-w[0])/v,-(o[0][1]-w[1])/v),p=(o[1][0]-w[0])/v,h=-(o[1][1]-w[1])/v,l=(o[2][0]-w[0])/v,u=-(o[2][1]-w[1])/v;t:{for(r=(i=[[i=i-(o=e[0][0]),r=r-(e=e[0][1]),0,0,p-t],[n=n-o,s=s-e,0,0,l-t],[0,0,i,r,h-a],[0,0,n,s,u-a]]).length,n=0;n<r;n++){for(var s=n,c=Math.abs(i[n][n]),f=n+1;f<r;f++){var y=Math.abs(i[f][n]);c<y&&(c=y,s=f)}if(!c){i=null;break t}for(c=i[s],i[s]=i[n],i[n]=c,s=n+1;s<r;s++)for(c=-i[s][n]/i[n][n],f=n;f<r+1;f++)i[s][f]=n==f?0:i[s][f]+c*i[n][f]}for(n=Array(r),s=r-1;0<=s;s--)for(n[s]=i[s][r]/i[s][s],c=s-1;0<=c;c--)i[c][r]-=i[c][s]*n[s];i=n}i&&(x.save(),x.beginPath(),r=Yb(n=(t+p+l)/3,s=(a+h+u)/3,t,a),p=Yb(n,s,p,h),l=Yb(n,s,l,u),x.moveTo(p[0],p[1]),x.lineTo(r[0],r[1]),x.lineTo(l[0],l[1]),x.clip(),x.transform(i[0],i[2],i[1],i[3],t,a),x.translate(b[0]-o,b[3]-e),x.scale(d/g,-d/g),x.drawImage(m.canvas,0,0),x.restore())}),a)&&(x.save(),x.strokeStyle="black",x.lineWidth=1,r.c.forEach(function(t){t=((n=t.target)[0][0]-w[0])/v;var e=-(n[0][1]-w[1])/v,o=(n[1][0]-w[0])/v,i=-(n[1][1]-w[1])/v,r=(n[2][0]-w[0])/v,n=-(n[2][1]-w[1])/v;x.beginPath(),x.moveTo(o,i),x.lineTo(t,e),x.lineTo(r,n),x.closePath(),x.stroke()}),x.restore()),x.canvas}function qb(t,e,o,i,r){this.i=t,this.f=e;var n,s={},a=me(this.f,this.i),p=(this.a=function(t){var e=t[0]+"/"+t[1];return s[e]||(s[e]=a(t)),s[e]},this.g=i,this.v=r*r,this.c=[],this.o=!1,this.l=this.i.i&&!!i&&!!this.i.G()&&Dt(i)==Dt(this.i.G()),this.b=this.i.G()?Dt(this.i.G()):null,this.j=this.f.G()?Dt(this.f.G()):null,t=Ft(o),e=kt(o),i=Ct(o),o=jt(o),r=this.a(t),this.a(e)),h=this.a(i),l=this.a(o);!function t(e,o,i,r,n,s,a,p,h,l){var u=ht([s,a,p,h]),c=e.b?Dt(u)/e.b:null,f=e.b,y=e.i.i&&.5<c&&c<1,g=!1;{var d;0<l&&(e.f.c&&e.j&&(d=ht([o,i,r,n]),g|=.25<Dt(d)/e.j),!y)&&e.i.c&&c&&(g|=.25<c)}if(g||!e.g||Ot(u,e.g)){if(!(g||isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1])&&isFinite(p[0])&&isFinite(p[1])&&isFinite(h[0])&&isFinite(h[1]))){if(!(0<l))return;g=!0}if(0<l&&(g||(u=e.a([(o[0]+r[0])/2,(o[1]+r[1])/2]),f=y?(rt(s[0],f)+rt(p[0],f))/2-rt(u[0],f):(s[0]+p[0])/2-u[0],u=(s[1]+p[1])/2-u[1],g=f*f+u*u>e.v),g))Math.abs(o[0]-r[0])<=Math.abs(o[1]-r[1])?(y=[(i[0]+r[0])/2,(i[1]+r[1])/2],f=e.a(y),u=[(n[0]+o[0])/2,(n[1]+o[1])/2],c=e.a(u),t(e,o,i,y,u,s,a,f,c,l-1),t(e,u,y,r,n,c,f,p,h,l-1)):(y=[(o[0]+i[0])/2,(o[1]+i[1])/2],f=e.a(y),u=[(r[0]+n[0])/2,(r[1]+n[1])/2],c=e.a(u),t(e,o,y,u,n,s,f,c,h,l-1),t(e,y,i,r,u,f,a,p,c,l-1));else{if(y){if(!e.l)return;e.o=!0}e.c.push({source:[s,p,h],target:[o,r,n]}),e.c.push({source:[s,a,p],target:[o,i,r]})}}}(this,t,e,i,o,r,p,h,l,10),this.o&&(n=1/0,this.c.forEach(function(t){n=Math.min(n,t.source[0][0],t.source[1][0],t.source[2][0])}),this.c.forEach(function(t){var e;Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-n>this.b/2&&((e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]])[0][0]-n>this.b/2&&(e[0][0]-=this.b),e[1][0]-n>this.b/2&&(e[1][0]-=this.b),e[2][0]-n>this.b/2&&(e[2][0]-=this.b),Math.max(e[0][0],e[1][0],e[2][0])-Math.min(e[0][0],e[1][0],e[2][0])<this.b/2)&&(t.source=e)},this)),s={}}function Jb(t){var e=vt();return t.c.forEach(function(t){t=t.source,Pt(e,t[0]),Pt(e,t[1]),Pt(e,t[2])}),e}function _b(t,e,o,i,r,n){this.v=e,this.l=t.G();var s=(a=e.G())?Nt(o,a):o,a=zb(t,e,Lt(s),i);this.j=new qb(t,e,s,this.l,.5*a),this.c=i,this.i=o,t=Jb(this.j),this.o=(this.Hb=n(t,a,r))?this.Hb.a:1,this.ee=this.g=null,r=2,n=[],this.Hb&&(r=0,n=this.Hb.f),v0.call(this,o,i,this.o,r,n)}function $b(t){Lv.call(this,{attributions:t.attributions,extent:t.extent,logo:t.logo,projection:t.projection,state:t.state}),this.C=void 0!==t.resolutions?t.resolutions:null,this.a=null,this.fa=0}function Qb(t,e){return e=t.C?t.C[B(t.C,e,0)]:e}function tm(t,e){t.Y().src=e}function em(t,e){Qe.call(this,t),this.image=e}e(Zb,uv),Zb.prototype.S=function(t,e,o){fv(this,"precompose",o,t,void 0);var i,r,n,s=this.Y();s&&((i=void 0!==(r=e.extent)&&!yt(r,t.extent)&&Ot(r,t.extent))&&cv(o,t,r),r=this.C(),n=o.globalAlpha,o.globalAlpha=e.opacity,o.drawImage(s,0,0,+s.width,+s.height,Math.round(r[4]),Math.round(r[5]),Math.round(s.width*r[0]),Math.round(s.height*r[3])),o.globalAlpha=n,i)&&o.restore(),this.ef(o,t,e)},Zb.prototype.Ea=function(t,e,o,i,r){var n=this.a;return n.ha().Ea(t,e.viewState.resolution,e.viewState.rotation,o,e.skippedFeatureUids,function(t){return i.call(r,t,n)})},Zb.prototype.u=function(t,e,o,i){if(this.Y())return this.a.ha().Ea!==Y?uv.prototype.u.apply(this,arguments):(ar(t=Ps(this.v,t.slice()),e.viewState.resolution/this.f),this.j||(this.j=Po(1,1)),this.j.clearRect(0,0,1,1),this.j.drawImage(this.Y(),t[0],t[1],1,1,0,0,1,1),0<(t=this.j.getImageData(0,0,1,1).data)[3]?o.call(i,this.a,t):void 0)},e(Kb,Zb),Kb.prototype.Y=function(){return this.M?this.M.Y():null},Kb.prototype.C=function(){return this.c},Kb.prototype.sd=function(t,e){var o,i=t.pixelRatio,r=t.size,n=t.viewState,s=n.center,a=n.resolution,p=this.a.ha(),h=t.viewHints,l=t.extent;return void 0!==e.extent&&(l=Nt(l,e.extent)),h[0]||h[1]||Ut(l)||(e=p.Y(l,a,i,n.projection))&&rv(this,e)&&(this.M=e),this.M&&(h=(e=this.M).G(),o=i*(l=e.resolution)/(a*(n=e.a)),h=js(this.c,i*r[0]/2,i*r[1]/2,o,o,0,n*(h[0]-s[0])/l,n*(s[1]-h[3])/l),js(this.v,i*r[0]/2-h[4],i*r[1]/2-h[5],i/a,-i/a,0,-s[0],-s[1]),av(t.attributions,e.f),pv(t,p),this.f=a*i/n),!!this.M},e(_b,v0),_b.prototype.ka=function(){1==this.state&&(qe(this.ee),this.ee=null),v0.prototype.ka.call(this)},_b.prototype.Y=function(){return this.g},_b.prototype.de=function(){var t=this.Hb.getState();2==t&&(this.g=Hb(Dt(this.i)/this.c,It(this.i)/this.c,this.o,this.Hb.resolution,0,this.c,this.i,this.j,[{extent:this.Hb.G(),image:this.Hb.Y()}],0)),this.state=t,this.s()},_b.prototype.load=function(){var t;0==this.state&&(this.state=1,this.s(),2==(t=this.Hb.getState())||3==t?this.de():(this.ee=d(this.Hb,"change",function(){var t=this.Hb.getState();2!=t&&3!=t||(qe(this.ee),this.ee=null,this.de())},this),this.Hb.load()))},e($b,Lv),$b.prototype.Y=function(t,e,o,i){var r=this.c;if(r&&i&&!be(r,i)){if(this.a){if(this.fa==this.i&&be(this.a.v,i)&&this.a.resolution==e&&this.a.a==o&&St(this.a.G(),t))return this.a;$e(this.a),this.a=null}return this.a=new _b(r,i,t,e,o,function(t,e,o){return this.Jc(t,e,o,r)}.bind(this)),this.fa=this.i,this.a}return this.Jc(t,e,o,i=r?r:i)},$b.prototype.o=function(t){switch((t=t.target).getState()){case 1:this.b(new em(om,t));break;case 2:this.b(new em(im,t));break;case 3:this.b(new em(rm,t))}},e(em,Qe);var om="imageloadstart",im="imageloadend",rm="imageloaderror";function nm(t){$b.call(this,{attributions:t.attributions,logo:t.logo,projection:t.projection,resolutions:t.resolutions,state:t.state}),this.pa=t.canvasFunction,this.R=null,this.T=0,this.va=void 0!==t.ratio?t.ratio:1.5}function sm(t){this.f=t.source,this.$a=ms(),this.g=Po(),this.l=[0,0],this.Sa=null==t.renderBuffer?100:t.renderBuffer,this.B=null,nm.call(this,{attributions:t.attributions,canvasFunction:this.tk.bind(this),logo:t.logo,projection:t.projection,ratio:t.ratio,resolutions:t.resolutions,state:this.f.getState()}),this.I=null,this.v=void 0,this.Ii(t.style),d(this.f,"change",this.ro,this)}function am(t,e){Av.call(this,t,e),this.o=this.f=this.M=null}function pm(t){ys.call(this,t||{})}function hm(t){Zb.call(this,t),this.c=null===this.c?null:Po(),this.o=null,this.g=[],this.l=vt(),this.va=new J(0,0,0,0),this.B=ms(),this.T=0}function lm(t,e){return e=e.getState(),t=t.a.kd(),2==e||4==e||3==e&&!t}function um(){this.b="precision mediump float;varying vec2 a;uniform sampler2D e;void main(void){gl_FragColor=texture2D(e,a);}"}e(nm,$b),nm.prototype.Jc=function(t,e,o,i){e=Qb(this,e);var r=this.R;return r&&this.T==this.i&&r.resolution==e&&r.a==o&&yt(r.G(),t)||(Gt(t=t.slice(),this.va),(i=this.pa(t,e,o,[Dt(t)/e*o,It(t)/e*o],i))&&(r=new m0(t,e,o,this.j,i)),this.R=r,this.T=this.i),r},e(sm,nm),(r=sm.prototype).tk=function(t,n,s,e,o){var i,r,a=new _0(.5*n/s,t,n,this.f.T,this.Sa),p=(this.f.Yd(t,n,o),!1);return this.f.$b(t,function(t){var e;if(!(i=p))if((i=t.Lc())?e=i.call(t,n):this.v&&(e=this.v(t,n)),e){for(var o=!1,i=0,r=(e=Array.isArray(e)?e:[e]).length;i<r;++i)o=vv(a,t,e[i],dv(n,s),this.qo,this)||o;i=o}else i=!1;p=i},this),tv(a),p?null:(this.l[0]!=e[0]||this.l[1]!=e[1]?(this.g.canvas.width=e[0],this.g.canvas.height=e[1],this.l[0]=e[0],this.l[1]=e[1]):this.g.clearRect(0,0,e[0],e[1]),o=this,i=Lt(t),r=s/(r=n),t=js(o.$a,e[0]/2,e[1]/2,r,-r,0,-i[0],-i[1]),a.La(this.g,s,t,0,{}),this.B=a,this.g.canvas)},r.Ea=function(t,e,o,i,r,n){var s;if(this.B)return s={},this.B.Ea(t,e,0,i,r,function(t){var e=U(t).toString();if(!(e in s))return s[e]=!0,n(t)})},r.no=function(){return this.f},r.oo=function(){return this.I},r.po=function(){return this.v},r.qo=function(){this.s()},r.ro=function(){Iv(this,this.f.getState())},r.Ii=function(t){this.I=void 0!==t?t:$h,this.v=t?Jh(this.I):void 0,this.s()},e(am,Av),am.prototype.Ea=function(t,e,o,i,r){var n=this.a;return n.ha().Ea(t,e.viewState.resolution,e.viewState.rotation,o,e.skippedFeatureUids,function(t){return i.call(r,t,n)})},am.prototype.ng=function(t,e){var o=this.c.i,i=t.pixelRatio,r=t.viewState,n=r.center,s=r.resolution,a=r.rotation,p=this.M,h=this.Ib,l=this.a.ha(),u=t.viewHints,c=t.extent;return void 0!==e.extent&&(c=Nt(c,e.extent)),u[0]||u[1]||Ut(c)||(e=l.Y(c,s,i,r.projection))&&rv(this,e)&&(u=this,c=(c=p=e).Y(),h=Na(u.c.i,c),this.Ib)&&t.postRenderFunctions.push(function(t,e){t.isContextLost()||t.deleteTexture(e)}.bind(null,o,this.Ib)),p&&(o=this.c.f.j,r=this,e=o.width,u=o.height,c=i,o=n,n=s,s=a,a=p.G(),e*=n,u*=n,ws(r=r.S),Es(r,2*c/e,2*c/u),As(r,-s),Ts(r,a[0]-o[0],a[1]-o[1]),Es(r,(a[2]-a[0])/2,(a[3]-a[1])/2),Ts(r,1,1),this.o=null,ws(i=this.v),Es(i,1,-1),Ts(i,0,-1),this.M=p,this.Ib=h,av(t.attributions,p.f),pv(t,l)),!!p},am.prototype.Ue=function(t,e){return void 0!==this.Ea(t,e,0,cr,this)},am.prototype.lg=function(t,e,o,i){if(this.M&&this.M.Y())if(this.a.ha()instanceof sm){var r=Ps(e.pixelToCoordinateTransform,t.slice());if(this.Ea(r,e,0,cr,this))return o.call(i,this.a,null)}else{var n,s,r=[this.M.Y().width,this.M.Y().height];if(this.o||(n=e.size,Ts(e=ms(),-1,-1),Es(e,2/n[0],2/n[1]),Ts(e,0,n[1]),Es(e,1,-1),n=Cs(this.S.slice()),Ts(s=ms(),0,r[1]),Es(s,1,-1),Es(s,r[0]/2,r[1]/2),Ts(s,1,1),xs(s,n),xs(s,e),this.o=s),!((t=Ps(this.o,t.slice()))[0]<0||t[0]>r[0]||t[1]<0||t[1]>r[1])&&(this.f||(this.f=Po(1,1)),this.f.clearRect(0,0,1,1),this.f.drawImage(this.M.Y(),t[0],t[1],1,1,0,0,1,1),0<(r=this.f.getImageData(0,0,1,1).data)[3]))return o.call(i,this.a,r)}},e(pm,ys),pm.prototype.Fd=function(t){var e=null,o=t.U();return"canvas"===o?e=new Kb(this):"webgl"===o&&(e=new am(t,this)),e},e(hm,Zb),hm.prototype.sd=function(t,e){var o=t.pixelRatio,i=t.size,r=(s=t.viewState).projection,n=s.resolution,s=s.center,a=this.a,p=a.ha(),h=p.i,l=p.Ta(r),u=l.tc(n,this.T),c=l.Da(u),f=Math.round(n/c)||1,y=t.extent;if(Ut(y=void 0!==e.extent?Nt(y,e.extent):y))return!1;var g=Re(l,y,c),d=l.Pc(u),v=l.Da(u),b=pt(l.gb(u),l.j),d=bt(d[0]+g.ca*b[0]*v,d[1]+g.da*b[1]*v,d[0]+(g.$+1)*b[0]*v,d[1]+(g.ia+1)*b[1]*v,void 0),v=p.nb(o),m=((b={})[u]={},this.Nf(p,r,b)),w=this.l,x=this.va,S=!1;for(C=g.ca;C<=g.$;++C)for(L=g.da;L<=g.ia;++L){var M=p.Nc(u,C,L,o,r);3!=M.getState()||this.a.kd()||S0(M,2),lm(this,M)||(M=x0(M)),lm(this,M)?2==M.getState()&&(b[u][M.ta.toString()]=M,S||-1!=this.g.indexOf(M)||(S=!0)):Ce(l,M.ta,m,x,w)||(M=Le(l,M.ta,x,w))&&m(u+1,M)}if(C=(C=t.viewHints)[0]||C[1],!(this.f&&16<Date.now()-t.time&&C||!S&&this.o&&yt(this.o,y)&&this.mf==h&&f==this.R&&(C||c*o/v*f==this.f))){(C=this.c)&&(L=p.Xd(u,o,r),M=Math.round((g.$-g.ca+1)*L[0]/f),L=Math.round((g.ia-g.da+1)*L[1]/f),(S=C.canvas).width!=M||S.height!=L?(this.R=f,S.width=M,S.height=L):(C.clearRect(0,0,M,L),f=this.R)),this.g.length=0,(S=Object.keys(b).map(Number)).sort(G);for(var x=0,P=S.length;x<P;++x){C=S[x];var A,m=p.Xd(C,o,r),E=(M=l.Da(C))/c,T=v*p.Wf(r),j=b[C];for(A in j){var M=j[A],C=((L=l.Aa(M.ta,w))[0]-d[0])/c*v/f,L=(d[3]-L[3])/c*v/f,R=m[0]*E/f,I=m[1]*E/f;this.Of(M,t,e,C,L,R,I,T),this.g.push(M)}}this.mf=h,this.f=c*o/v*f,this.o=d}return e=this.f/n,e=js(this.B,o*i[0]/2,o*i[1]/2,e,e,0,(this.o[0]-s[0])/this.f*o,(s[1]-this.o[3])/this.f*o),js(this.v,o*i[0]/2-e[4],o*i[1]/2-e[5],o/n,-o/n,0,-s[0],-s[1]),hv(t.usedTiles,p,u,g),lv(t,p,l,o,r,y,u,a.Ud()),sv(t,p),pv(t,p),0<this.g.length},hm.prototype.Of=function(t,e,o,i,r,n,s,a){this.a.ha().Zf(e.viewState.projection)||this.c.clearRect(i,r,n,s),(t=t.Y())&&this.c.drawImage(t,a,a,t.width-2*a,t.height-2*a,i,r,n,s)},hm.prototype.Y=function(){var t=this.c;return t?t.canvas:null},hm.prototype.C=function(){return this.B},e(um,ta);var cm=new um;function fm(){this.b="varying vec2 a;attribute vec2 b;attribute vec2 c;uniform vec4 d;void main(void){gl_Position=vec4(b*d.xy+d.zw,0.,1.);a=c;}"}e(fm,ea);var ym=new fm;function gm(t,e){this.i=t.getUniformLocation(e,"e"),this.c=t.getUniformLocation(e,"d"),this.b=t.getAttribLocation(e,"b"),this.a=t.getAttribLocation(e,"c")}function dm(t,e){Av.call(this,t,e),this.I=cm,this.fa=ym,this.f=null,this.B=new da([0,0,0,1,1,0,1,1,0,1,0,0,1,1,1,0]),this.D=this.o=null,this.l=-1,this.R=[0,0]}function A(t){var e=Xt({},t=t||{});delete e.preload,delete e.useInterimTilesOnError,ys.call(this,e),this.zi(void 0!==t.preload?t.preload:0),this.Ai(void 0===t.useInterimTilesOnError||t.useInterimTilesOnError)}function vm(t){this.c=null,hm.call(this,t),this.I=!1,this.D=ms(),this.T="vector"==t.j?1:0}e(dm,Av),(r=dm.prototype).ka=function(){Ta(this.c.f,this.B),Av.prototype.ka.call(this)},r.Nf=function(e,i,r){var n=this.c;return function(o,t){return Cm(e,i,o,t,function(t){var e=n.a.b.hasOwnProperty(t.bb());return e&&(r[o]||(r[o]={}),r[o][t.ta.toString()]=t),e})}},r.mg=function(){Av.prototype.mg.call(this),this.f=null},r.ng=function(t,e,o){var i,r,n,s,a,p,h=this.c,l=o.b,u=t.viewState,c=u.projection,f=this.a,y=f.ha(),g=y.Ta(c),d=g.tc(u.resolution),v=g.Da(d),b=y.Xd(d,t.pixelRatio,c),m=b[0]/pt(g.gb(d),this.R)[0],w=v/m,x=y.nb(m)*y.Wf(c),S=u.center,M=t.extent,P=Re(g,M,v);if(this.o&&(a=this.o,p=P,a.ca==p.ca)&&a.da==p.da&&a.$==p.$&&a.ia==p.ia&&this.l==y.i)w=this.D;else{var A=[P.$-P.ca+1,P.ia-P.da+1];O(0<(a=Math.max(A[0]*b[0],A[1]*b[1])),29);for(var E,A=w*(L=Math.pow(2,Math.ceil(Math.log(a)/Math.LN2))),T=g.Pc(d),w=[R=T[0]+P.ca*b[0]*w,w=T[1]+P.da*b[1]*w,R+A,w+A],j=(p=t,r=L,s=(i=this).c.i,void 0===i.j||i.j!=r?(p.postRenderFunctions.push(function(t,e,o){t.isContextLost()||(t.deleteFramebuffer(e),t.deleteTexture(o))}.bind(null,s,i.g,i.Ib)),p=Ia(s,r,r),n=s.createFramebuffer(),s.bindFramebuffer(36160,n),s.framebufferTexture2D(36160,36064,3553,p,0),i.Ib=p,i.g=n,i.j=r):s.bindFramebuffer(36160,i.g),l.viewport(0,0,L,L),l.clearColor(0,0,0,0),l.clear(16384),l.disable(3042),L=La(o,this.I,this.fa),o.Qc(L),this.f||(this.f=new gm(l,L)),Ea(o,34962,this.B),l.enableVertexAttribArray(this.f.b),l.vertexAttribPointer(this.f.b,2,5126,!1,16,0),l.enableVertexAttribArray(this.f.a),l.vertexAttribPointer(this.f.a,2,5126,!1,16,8),l.uniform1i(this.f.i,0),(o={})[d]={},this.Nf(y,c,o)),C=f.kd(),L=!0,R=vt(),I=new J(0,0,0,0),N=P.ca;N<=P.$;++N)for(E=P.da;E<=P.ia;++E){if(T=y.Nc(d,N,E,m,c),void 0!==e.extent){var F=g.Aa(T.ta,R);if(!Ot(F,e.extent))continue}if(2==(F=(T=(F=2==(F=T.getState())||4==F||3==F&&!C)?T:x0(T)).getState())){if(h.a.b.hasOwnProperty(T.bb())){o[d][T.ta.toString()]=T;continue}}else if(4==F||3==F&&!C)continue;L=!1,(F=Ce(g,T.ta,j,I,R))||(T=Le(g,T.ta,I,R))&&j(d+1,T)}(e=Object.keys(o).map(Number)).sort(G);for(var k,j=new Float32Array(4),C=0,I=e.length;C<I;++C)for(k in N=o[e[C]])T=N[k],F=g.Aa(T.ta,R),j[0]=2*(F[2]-F[0])/A,j[1]=2*(F[3]-F[1])/A,j[2]=2*(F[0]-w[0])/A-1,j[3]=2*(F[1]-w[1])/A-1,l.uniform4fv(this.f.c,j),hh(h,T,b,x*m),l.drawArrays(5,0,4);L?(this.o=P,this.D=w,this.l=y.i):(this.D=this.o=null,this.l=-1,t.animate=!0)}hv(t.usedTiles,y,d,P);var D=h.j;return lv(t,y,g,m,c,M,d,f.Ud(),function(t){2!=t.getState()||h.a.b.hasOwnProperty(t.bb())||t.bb()in D.a||D.f([t,Ne(g,t.ta),g.Da(t.ta[0]),b,x*m])},this),sv(t,y),pv(t,y),ws(l=this.v),Ts(l,(Math.round(S[0]/v)*v-w[0])/(w[2]-w[0]),(Math.round(S[1]/v)*v-w[1])/(w[3]-w[1])),u.rotation&&As(l,u.rotation),Es(l,t.size[0]*u.resolution/(w[2]-w[0]),t.size[1]*u.resolution/(w[3]-w[1])),Ts(l,-.5,-.5),!0},r.lg=function(t,e,o,i){if(this.g){t=[(t=Ps(this.v,[t[0]/e.size[0],(e.size[1]-t[1])/e.size[1]].slice()))[0]*this.j,t[1]*this.j],(e=this.c.f.b).bindFramebuffer(e.FRAMEBUFFER,this.g);var r=new Uint8Array(4);if(e.readPixels(t[0],t[1],1,1,e.RGBA,e.UNSIGNED_BYTE,r),0<r[3])return o.call(i,this.a,r)}},e(A,ys),(r=A.prototype).Fd=function(t){var e=null,o=t.U();return"canvas"===o?e=new hm(this):"webgl"===o&&(e=new dm(t,this)),e},r.Ud=function(){return this.get("preload")},r.zi=function(t){this.set("preload",t)},r.kd=function(){return this.get("useInterimTilesOnError")},r.Ai=function(t){this.set("useInterimTilesOnError",t)},e(vm,hm);var bm={image:_s,hybrid:["Polygon","LineString"]},mm={hybrid:["Image","Text"],vector:_s};function E(t){var e=Xt({},t=t||{});delete e.preload,delete e.useInterimTilesOnError,s.call(this,e),this.Bi(t.preload||0),this.Ci(t.useInterimTilesOnError||!0),O(null==t.renderMode||"image"==t.renderMode||"hybrid"==t.renderMode||"vector"==t.renderMode,28),this.j=t.renderMode||"hybrid"}function wm(t,e,o,i){function r(){delete window[s],n.parentNode.removeChild(n)}var n=document.createElement("script"),s="olc_"+U(e),a=(n.async=!0,n.src=t+(-1==t.indexOf("?")?"?":"&")+(i||"callback")+"="+s,setTimeout(function(){r(),o&&o()},1e4));window[s]=function(t){clearTimeout(a),r(),e(t)},document.getElementsByTagName("head")[0].appendChild(n)}function xm(t,e,o,i,r,n,s,a,p,h,l){if(w0.call(this,r,0),this.D=void 0!==l&&l,this.S=s,this.u=a,this.v=null,this.c=e,this.j=i,this.o=n||r,this.a=[],this.yd=null,this.g=0,n=i.Aa(this.o),a=this.j.G(),r=this.c.G(),Tt(n=a?Nt(n,a):n))if((a=t.G())&&(r=r?Nt(r,a):a),i=zb(t,o,Lt(n),i.Da(this.o[0])),!isFinite(i)||i<=0)this.state=4;else if(this.l=new qb(t,o,n,r,i*(void 0!==h?h:.5)),this.l.c.length)if(this.g=e.tc(i),o=Jb(this.l),r&&(t.i?(o[1]=Q(o[1],r[1],r[3]),o[3]=Q(o[3],r[1],r[3])):o=Nt(o,r)),Tt(o)){for(e=(t=Ie(e,o,this.g)).ca;e<=t.$;e++)for(o=t.da;o<=t.ia;o++)(h=p(this.g,e,o,s))&&this.a.push(h);this.a.length||(this.state=4)}else this.state=4;else this.state=4;else this.state=4}function Sm(t,e){for(var o=t.length,i=Array(o),r=0;r<o;++r)i[r]=function(t,o){var i=/\{z\}/g,r=/\{x\}/g,n=/\{y\}/g,s=/\{-y\}/g;return function(e){if(e)return t.replace(i,e[0].toString()).replace(r,e[1].toString()).replace(n,function(){return(-e[2]-1).toString()}).replace(s,function(){var t=o.a?o.a[e[0]]:null;return O(t,55),(t.ia-t.da+1+e[2]).toString()})}}(t[r],e);return Mm(i)}function Mm(i){return 1===i.length?i[0]:function(t,e,o){if(t)return i[rt((t[1]<<t[0])+t[2],i.length)](t,e,o)}}function Pm(){}function Am(t){var e=[],o=/\{([a-z])-([a-z])\}/.exec(t);if(o)for(var i=o[2].charCodeAt(0),r=o[1].charCodeAt(0);r<=i;++r)e.push(t.replace(o[0],String.fromCharCode(r)));else if(o=/\{(\d+)-(\d+)\}/.exec(t))for(i=parseInt(o[2],10),r=parseInt(o[1],10);r<=i;r++)e.push(t.replace(o[0],r.toString()));else e.push(t);return e}function Em(t){ah.call(this),this.highWaterMark=void 0!==t?t:2048}function Tm(t){return t.c>t.highWaterMark}function jm(t){Lv.call(this,{attributions:t.attributions,extent:t.extent,logo:t.logo,projection:t.projection,state:t.state,wrapX:t.wrapX}),this.va=void 0!==t.opaque&&t.opaque,this.$a=void 0!==t.tilePixelRatio?t.tilePixelRatio:1,this.tileGrid=void 0!==t.tileGrid?t.tileGrid:null,this.a=new Em(t.cacheSize),this.o=[0,0],this.uc=""}function Cm(t,e,o,i,r){if(!(e=t.Wd(e)))return!1;for(var n,s,a=!0,p=i.ca;p<=i.$;++p)for(var h=i.da;h<=i.ia;++h)n=t.Sb(o,p,h),s=!1,(s=e.b.hasOwnProperty(n)?(s=2===(n=e.get(n)).getState())&&!1!==r(n):s)||(a=!1);return a}function Lm(t,e){t.uc!==e&&(t.uc=e,t.s())}function Rm(t,e,o){var i,r,n=void 0!==o?o:t.c;return o=t.Ta(n),t.u&&n.c&&(e=(i=e)[0],t=Ne(o,i),e=ft(n=Ge(n),t)?i:(i=Dt(n),t[0]+=i*Math.ceil((n[0]-t[0])/i),o.bg(t,e))),i=e[0],n=e[1],t=e[2],(o=!(o.minZoom>i||i>o.maxZoom)&&(!(o=(r=o.G())?Ie(o,r,i):o.a?o.a[i]:null)||_(o,n,t)))?e:null}function Im(t,e){Qe.call(this,t),this.tile=e}function Nm(t){jm.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,extent:t.extent,logo:t.logo,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX}),this.tileLoadFunction=t.tileLoadFunction,this.tileUrlFunction=this.Fc?this.Fc.bind(this):Pm,this.urls=null,t.urls?this.eb(t.urls):t.url&&this.jb(t.url),t.tileUrlFunction&&this.cb(t.tileUrlFunction)}function T(t){Nm.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,extent:t.extent,logo:t.logo,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction||Dm,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX}),this.crossOrigin=void 0!==t.crossOrigin?t.crossOrigin:null,this.tileClass=t.tileClass||M0,this.g={},this.v={},this.Sa=t.reprojectionErrorThreshold,this.I=!1}function Fm(t,e,o,i,r,n,s){return r=(o=Rm(t,e=[e,o,i],n))?t.tileUrlFunction(o,r,n):void 0,(r=new t.tileClass(e,void 0!==r?0:4,void 0!==r?r:"",t.crossOrigin,t.tileLoadFunction)).key=s,d(r,"change",t.Li,t),r}function km(t,e,o,i,r,n){var s=t.Sb(e,o,i),a=t.uc;if(t.a.b.hasOwnProperty(s)){if((h=t.a.get(s)).key!=a){var p=h,h=Fm(t,e,o,i,r,n,a);if(0==p.getState()?h.i=p.i:h.i=p,h.i){e=h.i,o=h;do{if(2==e.getState()){e.i=null;break}}while(1!=e.getState()&&0==e.getState()?o.i=e.i:o=e,e=o.i)}t.a.replace(s,h)}}else h=Fm(t,e,o,i,r,n,a),t.a.set(s,h);return h}function Dm(t,e){t.Y().src=e}function j(t){this.B=void 0!==t.hidpi&&t.hidpi,T.call(this,{cacheSize:t.cacheSize,crossOrigin:"anonymous",opaque:!0,projection:v("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,tilePixelRatio:this.B?2:1,wrapX:void 0===t.wrapX||t.wrapX}),this.R=void 0!==t.culture?t.culture:"en-us",this.C=void 0!==t.maxZoom?t.maxZoom:-1,this.f=t.key,this.l=t.imagerySet,wm("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+this.l+"?uriScheme=https&include=ImageryProviders&key="+this.f,this.pa.bind(this),void 0,"jsonp")}(r=vm.prototype).sd=function(t,e){var o=this.a,i=o.i;return this.pa!=i&&(this.g.length=0,o=o.j,this.c||"vector"==o||(this.c=Po()),this.c)&&"vector"==o&&(this.c=null),this.pa=i,hm.prototype.sd.apply(this,arguments)},r.Of=function(t,e,o,i,r,n,s,a){var p=t,h=this.a,l=e.pixelRatio,u=e.viewState.projection,c=h.i,f=h.get(jv)||null,y=p.o;if(y.Nd||y.mf!=c||y.Kg!=f){for(var g=0,d=p.a.length;g<d;++g){var v,b,m=p.c[p.a[g]],w=(m.S=null,y.Nd=!1,h.ha()),x=w.tileGrid,S=m.ta,M=m.a,P=(E=w.Ta(u)).Da(p.ta[0]),A=x.Da(m.ta[0]),E=Nt(E=E.Aa(p.v),S=x.Aa(S));for("tile-pixels"==M.a?(v=x=w.nb(),A=Ps(A=js(this.D,0,0,1/A*v,-1/A*v,0,-S[0],-S[3]),[E[0],E[3]]).concat(Ps(A,[E[2],E[1]]))):(x=P,A=E,be(u,M)||(b=!0,m.ig(u))),y.Nd=!1,w=new _0(0,A,x,w.l,h.c),A=dv(x,l),x=m.g,f&&f!==y.Kg&&x.sort(f),S=0,E=x.length;S<E;++S){v=x[S],b&&v.V().tb(M,u);var T=void 0;if((j=v.Lc())?T=j.call(v,P):(j=h.f)&&(T=j(v,P)),T){var j=A,C=w;if(T=Array.isArray(T)?T:[T]){var L=!1;if(Array.isArray(T))for(var R=0,I=T.length;R<I;++R)L=vv(C,v,T[R],j,this.Fi,this)||L;else L=vv(C,v,T,j,this.Fi,this)||L;v=L}else v=!1;this.I=this.I||v,y.Nd=y.Nd||v}}tv(w),m.c[p.ta.toString()]=w}y.mf=c,y.Kg=f}if(this.c){if(g=e,u=this.a,l=p.o,c=u.i,(h=bm[u.j])&&l.Lg!==c)for(l.Lg=c,m=(d=p.v)[0],l=g.pixelRatio,u=(P=u.ha()).tileGrid,c=(M=P.Ta(g.viewState.projection)).Da(m),f=P.nb(),p.j||(p.j=Po()),y=p.j,g=P.Xd(m,l,g.viewState.projection),y.canvas.width=g[0],y.canvas.height=g[1],g=M.Aa(d),d=0,m=p.a.length;d<m;++d)w=(M=p.c[p.a[d]]).ta,b=l/c,P=ws(this.D),"tile-pixels"==M.a.a?(b=u.Aa(w,this.l),Es(P,A=l/f*(w=u.Da(w[0]))/c,A),Ts(P,Math.round((b[0]-g[0])/w*f),Math.round((g[3]-b[3])/w*f))):(Es(P,b,-b),Ts(P,-g[0],-g[3])),M.c[p.ta.toString()].La(y,l,P,0,{},h);hm.prototype.Of.apply(this,arguments)}},r.Ea=function(t,e,o,i,r){for(var n=e.viewState.resolution,s=e.viewState.rotation,a=(o=null==o?0:o,this.a),p={},h=this.g,l=a.ha(),u=(e=l.Ta(e.viewState.projection),l.tileGrid),c=0,f=h.length;c<f;++c){var y=h[c],g=y.ta,d=lt(g=e.Aa(g,this.l),o*n,d);if(ft(d,t))for(var g=0,v=y.a.length;g<v;++g)var b,m="tile-pixels"===(w=y.c[y.a[g]]).a.a?(b=w.ta,m=Ft(n=u.Aa(b,this.l)),n=l.nb(),b=u.Da(b[0])/n,[(t[0]-m[0])/b,(m[1]-t[1])/b]):t,w=w.c[y.ta],x=x||w.Ea(m,n,s,o,{},function(t){var e=U(t).toString();if(!(e in p))return p[e]=!0,i.call(r,t,a)})}return x},r.Fi=function(){nv(this)},r.ef=function(t,e,o){var i=(l=this.a).ha(),r=mm[l.j];if(r)for(var n=e.pixelRatio,s=e.viewState.rotation,a=e.size,p=Math.round(n*a[0]/2),a=Math.round(n*a[1]/2),h=this.g,l=l.ha().nb(),u=i.tileGrid,i=i.Ta(e.viewState.projection),c=[],f=[],y=h.length-1;0<=y;--y){var g=h[y];if(5!=g.getState())for(var d=g.ta,v=i.Aa(d)[0]-i.Aa(g.v)[0],b=0,m=g.a.length;b<m;++b){var w,x,S,M,P,A=g.c[g.a[b]],E=A.ta[0],T=u.Da(E),j=A,C=e;for(Ts(C="tile-pixels"==j.a.a?(M=(w=this.a.ha()).tileGrid,P=j.ta,w=M.Da(P[0])/w.nb(),j=C.viewState,x=C.pixelRatio,S=j.resolution/x,P=M.Aa(P,this.l),M=j.center,P=Ft(P),C=C.size,js(this.D,Math.round(x*C[0]/2),Math.round(x*C[1]/2),w/S,w/S,j.rotation,(P[0]-M[0])/w,(M[1]-P[1])/w)):yv(this,C,0),v*l/T,0),T=ev(A=A.c[d.toString()],C),t.save(),t.globalAlpha=o.opacity,Bs(t,-s,p,a),w=0,j=c.length;w<j;++w)x=c[w],E<f[w]&&(t.beginPath(),t.moveTo(T[0],T[1]),t.lineTo(T[2],T[3]),t.lineTo(T[4],T[5]),t.lineTo(T[6],T[7]),t.moveTo(x[6],x[7]),t.lineTo(x[4],x[5]),t.lineTo(x[2],x[3]),t.lineTo(x[0],x[1]),t.clip());A.La(t,n,C,s,{},r),t.restore(),c.push(T),f.push(E)}}hm.prototype.ef.apply(this,arguments)},e(E,s),(r=E.prototype).Fd=function(t){var e=null;return e="canvas"===t.U()?new vm(this):e},r.Ud=function(){return this.get("preload")},r.kd=function(){return this.get("useInterimTilesOnError")},r.Bi=function(t){this.set("preload",t)},r.Ci=function(t){this.set("useInterimTilesOnError",t)},e(xm,w0),xm.prototype.ka=function(){1==this.state&&(this.yd.forEach(qe),this.yd=null),w0.prototype.ka.call(this)},xm.prototype.Y=function(){return this.v},xm.prototype.de=function(){var t,e,o,i,r,n=[];this.a.forEach(function(t){t&&2==t.getState()&&n.push({extent:this.c.Aa(t.ta),image:t.Y()})},this),this.a.length=0,n.length?(o=this.o[0],t="number"==typeof(e=this.j.gb(o))?e:e[0],e="number"==typeof e?e:e[1],o=this.j.Da(o),i=this.c.Da(this.g),r=this.j.Aa(this.o),this.v=Hb(t,e,this.S,i,this.c.G(),o,r,this.l,n,this.u,this.D),this.state=2):this.state=3,this.s()},xm.prototype.load=function(){var i;0==this.state&&(this.state=1,this.s(),i=0,this.yd=[],this.a.forEach(function(e){var o,t=e.getState();0!=t&&1!=t||(i++,o=d(e,"change",function(){var t=e.getState();2!=t&&3!=t&&4!=t||(qe(o),--i)||(this.yd.forEach(qe),this.yd=null,this.de())},this),this.yd.push(o))},this),this.a.forEach(function(t){0==t.getState()&&t.load()}),i||setTimeout(this.de.bind(this),0))},e(Em,ah),Em.prototype.fd=function(t){for(var e,o,i;Tm(this);){if((e=(i=(o=this.a.Yc).ta[0].toString())in t)&&(o=o.ta,e=_(t[i],o[1],o[2])),e)break;$e(this.pop())}},e(jm,Lv),(r=jm.prototype).Ki=function(){return Tm(this.a)},r.fd=function(t,e){(t=this.Wd(t))&&t.fd(e)},r.Wf=function(){return 0},r.Sb=function(t,e,o){return t+"/"+e+"/"+o},r.Zf=function(){return this.va},r.ab=function(){return this.tileGrid},r.Ta=function(t){return this.tileGrid||ke(t)},r.Wd=function(t){var e=this.c;return e&&!be(e,t)?null:this.a},r.nb=function(){return this.$a},r.Xd=function(t,e,o){return o=this.Ta(o),e=this.nb(e),t=pt(o.gb(t),this.o),1==e?t:at(t,e,this.o)},r.sa=function(){this.a.clear(),this.s()},r.Ug=Y,e(Im,Qe),e(Nm,jm),(r=Nm.prototype).pb=function(){return this.tileLoadFunction},r.qb=function(){return this.tileUrlFunction},r.rb=function(){return this.urls},r.Li=function(t){switch((t=t.target).getState()){case 1:this.b(new Im("tileloadstart",t));break;case 2:this.b(new Im("tileloadend",t));break;case 3:this.b(new Im("tileloaderror",t))}},r.vb=function(t){this.a.clear(),this.tileLoadFunction=t,this.s()},r.cb=function(t,e){this.tileUrlFunction=t,void 0!==e?Lm(this,e):this.s()},r.jb=function(t){var e=this.urls=Am(t);this.cb(this.Fc?this.Fc.bind(this):Sm(e,this.tileGrid),t)},r.eb=function(t){var e=(this.urls=t).join("\n");this.cb(this.Fc?this.Fc.bind(this):Sm(t,this.tileGrid),e)},r.Ug=function(t,e,o){t=this.Sb(t,e,o),this.a.b.hasOwnProperty(t)&&this.a.get(t)},e(T,Nm),(r=T.prototype).Ki=function(){if(Tm(this.a))return!0;for(var t in this.g)if(Tm(this.g[t]))return!0;return!1},r.fd=function(t,e){for(var o in t=this.Wd(t),this.a.fd(this.a==t?e:{}),this.g){o=this.g[o];o.fd(o==t?e:{})}},r.Wf=function(t){return this.c&&t&&!be(this.c,t)?0:this.Xf()},r.Xf=function(){return 0},r.Zf=function(t){return!(this.c&&t&&!be(this.c,t))&&Nm.prototype.Zf.call(this,t)},r.Ta=function(t){var e=this.c;return!this.tileGrid||e&&!be(e,t)?((e=U(t).toString())in this.v||(this.v[e]=ke(t)),this.v[e]):this.tileGrid},r.Wd=function(t){var e=this.c;return!e||be(e,t)?this.a:((t=U(t).toString())in this.g||(this.g[t]=new Em(this.a.highWaterMark)),this.g[t])},r.Nc=function(t,e,o,i,r){var n,s,a,p,h,l;return this.c&&r&&!be(this.c,r)?(n=this.Wd(r),t=this.Sb.apply(this,o=[t,e,o]),n.b.hasOwnProperty(t)&&(s=n.get(t)),e=this.uc,s&&s.key==e?s:(a=this.c,p=this.Ta(a),h=this.Ta(r),l=Rm(this,o,r),(i=new xm(a,p,r,h,o,l,this.nb(i),this.Xf(),function(t,e,o,i){return km(this,t,e,o,i,a)}.bind(this),this.Sa,this.I)).key=e,s?(i.i=s,n.replace(t,i)):n.set(t,i),i)):km(this,t,e,o,i,r)},r.Pb=function(t){if(this.I!=t){for(var e in this.I=t,this.g)this.g[e].clear();this.s()}},r.Qb=function(t,e){(t=v(t))&&((t=U(t).toString())in this.v||(this.v[t]=e))},e(j,T);var Om=new Be({html:'<a class="ol-attribution-bing-tos" href="http://www.microsoft.com/maps/product/terms.html">Terms of Use</a>'});function Um(t){var e=void 0!==(t=t||{}).projection?t.projection:"EPSG:3857",o=void 0!==t.tileGrid?t.tileGrid:De({extent:Ge(e),maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});T.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:o,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX})}function C(t){this.C=t.account,this.B=t.map||"",this.f=t.config||{},this.l={},Um.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,maxZoom:void 0!==t.maxZoom?t.maxZoom:18,minZoom:t.minZoom,projection:t.projection,state:"loading",wrapX:t.wrapX}),Gm(this)}function Gm(t){var e,o,i=JSON.stringify(t.f);t.l[i]?Bm(t,t.l[i]):(e="https://"+t.C+".cartodb.com/api/v1/map",t.B&&(e+="/named/"+t.B),(o=new XMLHttpRequest).addEventListener("load",t.Dl.bind(t,i)),o.addEventListener("error",t.Cl.bind(t)),o.open("POST",e),o.setRequestHeader("Content-type","application/json"),o.send(JSON.stringify(t.f)))}function Bm(t,e){t.jb("https://"+e.cdn_url.https+"/"+t.C+"/api/v1/map/"+e.layergroupid+"/{z}/{x}/{y}.png")}function L(t){a.call(this,{attributions:t.attributions,extent:t.extent,logo:t.logo,projection:t.projection,wrapX:t.wrapX}),this.resolution=void 0,this.distance=void 0!==t.distance?t.distance:20,this.features=[],this.geometryFunction=t.geometryFunction||function(t){return O((t=t.V())instanceof m,10),t},this.source=t.source,this.source.J("change",L.prototype.sa,this)}function Xm(t){if(void 0!==t.resolution){t.features.length=0;for(var e=vt(),o=t.distance*t.resolution,i=t.source.Xe(),r={},n=0,s=i.length;n<s;n++){var a=i[n];U(a).toString()in r||!(a=t.geometryFunction(a))||(wt(a=a.X(),e),lt(e,o,e),a=(a=t.source.Uf(e)).filter(function(t){return!((t=U(t).toString())in r)&&(r[t]=!0)}),t.features.push(function(t,e){for(var o=[0,0],i=e.length-1;0<=i;--i){var r=t.geometryFunction(e[i]);r?er(o,r.X()):e.splice(i,1)}return ar(o,1/e.length),(t=new x(new m(o))).set("features",e),t}(t,a)))}}}function Vm(t,e){var o=[],i=(Object.keys(e).forEach(function(t){null!==e[t]&&void 0!==e[t]&&o.push(t+"="+encodeURIComponent(e[t]))}),o.join("&"));return(t=-1===(t=t.replace(/[?&]$/,"")).indexOf("?")?t+"?":t+"&")+i}function Wm(t){$b.call(this,{attributions:(t=t||{}).attributions,logo:t.logo,projection:t.projection,resolutions:t.resolutions}),this.R=void 0!==t.crossOrigin?t.crossOrigin:null,this.T=void 0===t.hidpi||t.hidpi,this.f=t.url,this.g=t.imageLoadFunction||tm,this.v=t.params||{},this.M=null,this.l=[0,0],this.I=0,this.B=void 0!==t.ratio?t.ratio:1.5}function Zm(t){$b.call(this,{projection:t.projection,resolutions:t.resolutions}),this.R=void 0!==t.crossOrigin?t.crossOrigin:null,this.l=void 0!==t.displayDpi?t.displayDpi:96,this.g=t.params||{},this.I=t.url,this.f=t.imageLoadFunction||tm,this.T=void 0===t.hidpi||t.hidpi,this.pa=void 0!==t.metersPerUnit?t.metersPerUnit:1,this.v=void 0!==t.ratio?t.ratio:1,this.va=void 0!==t.useOverlay&&t.useOverlay,this.M=null,this.B=0}function Km(t){var e=t.imageExtent,o=void 0!==t.crossOrigin?t.crossOrigin:null,i=t.imageLoadFunction||tm;$b.call(this,{attributions:t.attributions,logo:t.logo,projection:v(t.projection)}),this.M=new b0(e,void 0,1,this.j,t.url,o,i),this.f=t.imageSize||null,d(this.M,"change",this.o,this)}function zm(t){$b.call(this,{attributions:(t=t||{}).attributions,logo:t.logo,projection:t.projection,resolutions:t.resolutions}),this.pa=void 0!==t.crossOrigin?t.crossOrigin:null,this.g=t.url,this.v=t.imageLoadFunction||tm,this.f=t.params||{},this.l=!0,qm(this),this.T=t.serverType,this.va=void 0===t.hidpi||t.hidpi,this.M=null,this.B=[0,0],this.R=0,this.I=void 0!==t.ratio?t.ratio:1.5}j.prototype.T=function(){return this.f},j.prototype.fa=function(){return this.l},j.prototype.pa=function(t){var e,i,s,a,r,n,p;200!=t.statusCode||"OK"!=t.statusDescription||"ValidCredentials"!=t.authenticationResultCode||1!=t.resourceSets.length||1!=t.resourceSets[0].resources.length?Iv(this,"error"):(-1==(e=t.brandLogoUri).indexOf("https")&&(e=e.replace("http","https")),i=t.resourceSets[0].resources[0],s=-1==this.C?i.zoomMax:this.C,a=De({extent:t=Ge(this.c),minZoom:i.zoomMin,maxZoom:s,tileSize:(i.imageWidth==i.imageHeight?i.imageWidth:[i.imageWidth,i.imageHeight])/this.nb()}),this.tileGrid=a,r=this.R,n=this.B,this.tileUrlFunction=Mm(i.imageUrlSubdomains.map(function(t){var e=[0,0,0],o=i.imageUrl.replace("{subdomain}",t).replace("{culture}",r);return function(t){if(t)return Ee(t[0],t[1],-t[2]-1,e),t=o,n&&(t+="&dpi=d1&device=mobile"),t.replace("{quadkey}",function(t){for(var e=t[0],o=Array(e),i=1<<e-1,r=0;r<e;++r){var n=48;t[1]&i&&(n+=1),t[2]&i&&(n+=2),o[r]=String.fromCharCode(n),i>>=1}return o.join("")}(e))}})),i.imageryProviders&&(p=we(v("EPSG:4326"),this.c),(t=i.imageryProviders.map(function(t){var e=t.attribution,n={};return t.coverageAreas.forEach(function(t){var e,o=t.zoomMin,i=Math.min(t.zoomMax,s);for(t=Bt([(t=t.bbox)[1],t[0],t[3],t[2]],p),e=o;e<=i;++e){var r=e.toString(),o=Ie(a,t,e);r in n?n[r].push(o):n[r]=[o]}}),new Be({html:e,tileRanges:n})})).push(Om),this.ua(t)),this.D=e,Iv(this,"ready"))},e(Um,T),e(C,Um),(r=C.prototype).Kk=function(){return this.f},r.tq=function(t){Xt(this.f,t),Gm(this)},r.Xp=function(t){this.f=t||{},Gm(this)},r.Dl=function(t,e){if(!(e=e.target).status||200<=e.status&&e.status<300){try{var o=JSON.parse(e.responseText)}catch(t){return void Iv(this,"error")}Bm(this,o),this.l[t]=o,Iv(this,"ready")}else Iv(this,"error")},r.Cl=function(){Iv(this,"error")},e(L,a),(r=L.prototype).$n=function(){return this.distance},r.ao=function(){return this.source},r.Yd=function(t,e,o){this.source.Yd(t,e,o),e!==this.resolution&&(this.clear(),this.resolution=e,Xm(this),this.cd(this.features))},r.Yp=function(t){this.distance=t,this.sa()},r.sa=function(){this.clear(),Xm(this),this.cd(this.features),a.prototype.sa.call(this)},e(Wm,$b),(r=Wm.prototype).co=function(){return this.v},r.Jc=function(t,e,o,i){if(void 0===this.f)return null;e=Qb(this,e),o=this.T?o:1;var r=this.M;if(r&&this.I==this.i&&r.resolution==e&&r.a==o&&yt(r.G(),t))return r;Xt(r={F:"image",FORMAT:"PNG32",TRANSPARENT:!0},this.v);var n=((t=t.slice())[0]+t[2])/2,s=(t[1]+t[3])/2,a=(1!=this.B&&(a=this.B*Dt(t)/2,p=this.B*It(t)/2,t[0]=n-a,t[1]=s-p,t[2]=n+a,t[3]=s+p),e/o),p=Math.ceil(Dt(t)/a),h=Math.ceil(It(t)/a);return t[0]=n-a*p/2,t[2]=n+a*p/2,t[1]=s-a*h/2,t[3]=s+a*h/2,this.l[0]=p,this.l[1]=h,n=t,s=this.l,a=o,i=i.mb.split(":").pop(),r.SIZE=s[0]+","+s[1],r.BBOX=n.join(","),r.BBOXSR=i,r.IMAGESR=i,r.DPI=Math.round(90*a),(n=(i=this.f).replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"))==i&&O(!1,50),r=Vm(n,r),this.M=new b0(t,e,o,this.j,r,this.R,this.g),this.I=this.i,d(this.M,"change",this.o,this),this.M},r.bo=function(){return this.g},r.eo=function(){return this.f},r.fo=function(t){this.M=null,this.g=t,this.s()},r.ho=function(t){t!=this.f&&(this.f=t,this.M=null,this.s())},r.io=function(t){Xt(this.v,t),this.M=null,this.s()},e(Zm,$b),(r=Zm.prototype).ko=function(){return this.g},r.Jc=function(t,e,o){e=Qb(this,e),o=this.T?o:1;var i,r,n,s,a,p,h,l,u=this.M;return u&&this.B==this.i&&u.resolution==e&&u.a==o&&yt(u.G(),t)||(1!=this.v&&Gt(t=t.slice(),this.v),l=[Dt(t)/e*o,It(t)/e*o],void 0!==this.I?(u=this.I,i=Lt(t),r=this.pa,n=Dt(t),s=It(t),a=l[0],p=l[1],h=.0254/this.l,l={OPERATION:this.va?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol.source.ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.l,SETDISPLAYWIDTH:Math.round(l[0]),SETDISPLAYHEIGHT:Math.round(l[1]),SETVIEWSCALE:a*s<p*n?n*r/(a*h):s*r/(p*h),SETVIEWCENTERX:i[0],SETVIEWCENTERY:i[1]},Xt(l,this.g),u=Vm(u,l),d(u=new b0(t,e,o,this.j,u,this.R,this.f),"change",this.o,this)):u=null,this.M=u,this.B=this.i),u},r.jo=function(){return this.f},r.mo=function(t){Xt(this.g,t),this.s()},r.lo=function(t){this.M=null,this.f=t,this.s()},e(Km,$b),Km.prototype.Jc=function(t){return Ot(t,this.M.G())?this.M:null},Km.prototype.o=function(t){var e,o,i,r,n;2==this.M.getState()&&(i=this.M.G(),e=this.M.Y(),n=this.f?(o=this.f[0],this.f[1]):(o=e.width,e.height),(i=Math.ceil(Dt(i)/(It(i)/n)))!=o)&&(r=(i=Po(i,n)).canvas,i.drawImage(e,0,0,o,n,0,0,r.width,r.height),this.M.Og(r)),$b.prototype.o.call(this,t)},e(zm,$b);var Ym=[101,101];function Hm(t,e,o,i,r,n){if(O(void 0!==t.g,9),n[t.l?"CRS":"SRS"]=r.mb,"STYLES"in t.f||(n.STYLES=""),1!=i)switch(t.T){case"geoserver":i=90*i+.5|0,n.FORMAT_OPTIONS="FORMAT_OPTIONS"in n?n.FORMAT_OPTIONS+";dpi:"+i:"dpi:"+i;break;case"mapserver":n.MAP_RESOLUTION=90*i;break;case"carmentaserver":case"qgis":n.DPI=90*i;break;default:O(!1,8)}return n.WIDTH=o[0],n.HEIGHT=o[1],o=r.b,r=t.l&&"ne"==o.substr(0,2)?[e[1],e[0],e[3],e[2]]:e,n.BBOX=r.join(","),Vm(t.g,n)}function qm(t){t.l=0<=tr(t.f.VERSION||"1.3.0")}function Jm(t){var e=void 0!==(t=t||{}).attributions?t.attributions:[_m];Um.call(this,{attributions:e,cacheSize:t.cacheSize,crossOrigin:void 0!==t.crossOrigin?t.crossOrigin:"anonymous",opaque:void 0===t.opaque||t.opaque,maxZoom:void 0!==t.maxZoom?t.maxZoom:19,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,url:void 0!==t.url?t.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",wrapX:t.wrapX})}(r=zm.prototype).so=function(t,e,o,i){var r,n;if(void 0!==this.g)return r=Rt(t,e,0,Ym),n={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.f.LAYERS},Xt(n,this.f,i),i=Math.floor((r[3]-t[1])/e),n[this.l?"I":"X"]=Math.floor((t[0]-r[0])/e),n[this.l?"J":"Y"]=i,Hm(this,r,Ym,1,v(o),n)},r.uo=function(){return this.f},r.Jc=function(t,e,o,i){var r,n,s;return void 0===this.g?null:(r=(e=Qb(this,e))/(o=1==o||this.va&&void 0!==this.T?o:1),s=Rt(n=Lt(t),r,0,[Math.ceil(Dt(t)/r),Math.ceil(It(t)/r)]),t=Rt(n,r,0,[Math.ceil(this.I*Dt(t)/r),Math.ceil(this.I*It(t)/r)]),(n=this.M)&&this.R==this.i&&n.resolution==e&&n.a==o&&yt(n.G(),s)?n:(Xt(s={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0},this.f),this.B[0]=Math.round(Dt(t)/r),this.B[1]=Math.round(It(t)/r),i=Hm(this,t,this.B,o,i,s),this.M=new b0(t,e,o,this.j,i,this.pa,this.v),this.R=this.i,d(this.M,"change",this.o,this),this.M))},r.to=function(){return this.v},r.vo=function(){return this.g},r.wo=function(t){this.M=null,this.v=t,this.s()},r.xo=function(t){t!=this.g&&(this.g=t,this.M=null,this.s())},r.yo=function(t){Xt(this.f,t),qm(this),this.M=null,this.s()},e(Jm,Um);var _m=new Be({html:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.'}),fi=(mp.df={},mp.df.Af=function(){},mp.df=mp.df||{});function $m(u){var c=!0;try{new ImageData(10,10)}catch(t){c=!1}return function(t){var e=t.buffers,o=t.meta,i=t.width,r=t.height,n=e.length,s=e[0].byteLength;if(t.imageOps){for(s=Array(n),t=0;t<n;++t){var a=t,p=new Uint8ClampedArray(e[t]),h=i,l=r,p=c?new ImageData(p,h,l):{data:p,width:h,height:l};s[a]=p}i=u(s,o).data}else{for(i=new Uint8ClampedArray(s),r=Array(n),a=Array(n),t=0;t<n;++t)r[t]=new Uint8ClampedArray(e[t]),a[t]=[0,0,0,0];for(e=0;e<s;e+=4){for(t=0;t<n;++t)p=r[t],a[t][0]=p[e],a[t][1]=p[e+1],a[t][2]=p[e+2],a[t][3]=p[e+3];t=u(a,o),i[e]=t[0],i[e+1]=t[1],i[e+2]=t[2],i[e+3]=t[3]}}return i.buffer}}function Qm(t){this.Ff=!!t.$l;var e,o,i,r,n=[];if(e=0===t.threads?0:!this.Ff&&t.threads||1)for(var s=0;s<e;++s)n[s]=function(e,t){var o=Object.keys(e.lib||{}).map(function(t){return"var "+t+" = "+e.lib[t].toString()+";"}).concat(["var __minion__ = ("+$m.toString()+")(",e.operation.toString(),");",'self.addEventListener("message", function(event) {'," var buffer = __minion__(event.data);"," self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),o=URL.createObjectURL(new Blob(o,{type:"text/javascript"}));return(o=new Worker(o)).addEventListener("message",t),o}(t,this.gh.bind(this,s));else n[0]=(o=t,i=this.gh.bind(this,0),r=$m(o.operation),{postMessage:function(t){setTimeout(function(){i({data:{buffer:r(t),meta:t.meta}})},0)}});this.qe=n,this.Ed=[],this.fk=t.rp||1/0,this.oe=0,this.bd={},this.Gf=null}var t1=!0;try{new ImageData(10,10)}catch(t){t1=!1}var e1=document.createElement("canvas").getContext("2d");function o1(t){this.B=null,this.va=void 0!==t.operationType?t.operationType:"pixel",this.Sa=void 0!==t.threads?t.threads:1,this.g=function(t){for(var e=t.length,o=Array(e),i=0;i<e;++i){var r=i,n=t[i],s=null;n instanceof jm?(n=new A({source:n}),s=new hm(n)):n instanceof $b&&(n=new pm({source:n}),s=new Kb(n)),o[r]=s}return o}(t.sources);for(var e=0,o=this.g.length;e<o;++e)d(this.g[e],"change",this.s,this);this.T=new qi(function(){return 1},this.s.bind(this));for(var o={},i=0,r=(e=this.g.map(function(t){return us(t.a)})).length;i<r;++i)o[U(e[i].layer)]=e[i];this.f=null,this.I={animate:!1,attributions:{},coordinateToPixelTransform:ms(),extent:null,focus:null,index:0,layerStates:o,layerStatesArray:e,logos:{},pixelRatio:1,pixelToCoordinateTransform:ms(),postRenderFunctions:[],size:[0,0],skippedFeatureUids:{},tileQueue:this.T,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{}},$b.call(this,{}),t.operation&&this.v(t.operation,t.lib)}Qm.prototype.pp=function(t,e,o){this.dk({inputs:t,Qh:e,callback:o}),this.dh()},Qm.prototype.dk=function(t){for(this.Ed.push(t);this.Ed.length>this.fk;)this.Ed.shift().callback(null,null)},Qm.prototype.dh=function(){if(0===this.oe&&0<this.Ed.length){var t=this.Gf=this.Ed.shift(),e=t.inputs[0].width,o=t.inputs[0].height,i=t.inputs.map(function(t){return t.data.buffer}),r=this.qe.length;if(1===(this.oe=r))this.qe[0].postMessage({buffers:i,meta:t.Qh,imageOps:this.Ff,width:e,height:o},i);else for(var n=4*Math.ceil(t.inputs[0].data.length/4/r),s=0;s<r;++s){for(var a=s*n,p=[],h=0,l=i.length;h<l;++h)p.push(i[s].slice(a,a+n));this.qe[s].postMessage({buffers:p,meta:t.Qh,imageOps:this.Ff,width:e,height:o},p)}}},Qm.prototype.gh=function(t,e){this.Jq||(this.bd[t]=e.data,--this.oe,0===this.oe&&this.gk())},Qm.prototype.gk=function(){var t,e,o=this.Gf,i=this.qe.length;if(1===i)var r=new Uint8ClampedArray(this.bd[0].buffer),n=this.bd[0].meta;else for(var s=o.inputs[0].data.length,r=new Uint8ClampedArray(s),n=Array(s),s=4*Math.ceil(s/4/i),a=0;a<i;++a){var p=a*s;r.set(new Uint8ClampedArray(this.bd[a].buffer),p),n[a]=this.bd[a].meta}this.Gf=null,this.bd={},o.callback(null,(t=r,e=o.inputs[0].width,o=o.inputs[0].height,t1?new ImageData(t,e,o):((e=e1.createImageData(e,o)).data.set(t),e)),n),this.dh()},fi.default={Af:Qm},fi.Af=Qm,e(o1,$b),o1.prototype.v=function(t,e){this.B=new mp.df.Af({operation:t,$l:"image"===this.va,rp:1,lib:e,threads:this.Sa}),this.s()},o1.prototype.Y=function(t,e,o,i){o=!0;for(var r=0,n=this.g.length;r<n;++r)if("ready"!==(h=this.g[r].a.ha()).getState()){o=!1;break}if(!o)return null;if((o=Xt({},this.I)).viewState=Xt({},o.viewState),h=Lt(t),o.extent=t.slice(),o.focus=h,o.size[0]=Math.round(Dt(t)/e),o.size[1]=Math.round(It(t)/e),(r=o.viewState).center=h,r.projection=i,r.resolution=e,Ji((this.l=o).tileQueue,16,16),this.f&&(i=this.f.resolution,o=this.f.G(),e===i&&St(t,o)||(this.f=null)),!this.f||this.i!==this.R)t:{for(t=this.l,i=this.g.length,e=Array(i),o=0;o<i;++o){var s,a,p,h=this.g[o],r=t,n=t.layerStatesArray[o];if(!(h=h.sd(r,n)?(s=r.size[0],a=r.size[1],!i1||(p=i1.canvas).width!==s||p.height!==a?i1=Po(s,a):i1.clearRect(0,0,s,a),h.S(r,n,i1),i1.getImageData(0,0,s,a)):null))break t;e[o]=h}this.b(new r1(n1,t,i={})),this.B.pp(e,i,this.pa.bind(this,t))}return this.f},o1.prototype.pa=function(t,e,o,i){var r,n;!e&&o&&(e=t.extent,(r=t.viewState.resolution)===this.l.viewState.resolution)&&St(e,this.l.extent)&&(this.f?n=this.f.Y().getContext("2d"):(n=Po(Math.round(Dt(e)/r),Math.round(It(e)/r)),this.f=new m0(e,r,1,this.j,n.canvas)),n.putImageData(o,0,0),this.s(),this.R=this.i,this.b(new r1(s1,t,i)))};var i1=null;function r1(t,e,o){Qe.call(this,t),this.extent=e.extent,this.resolution=e.viewState.resolution/e.pixelRatio,this.data=o}e(r1,Qe),o1.prototype.Jc=function(){return null};var n1="beforeoperations",s1="afteroperations";function a1(t){var e=t.layer.indexOf("-"),e=l1[-1==e?t.layer:t.layer.slice(0,e)],o=h1[t.layer];Um.call(this,{attributions:p1,cacheSize:t.cacheSize,crossOrigin:"anonymous",maxZoom:(null!=t.maxZoom?t:e).maxZoom,minZoom:(null!=t.minZoom?t:e).minZoom,opaque:o.opaque,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,url:void 0!==t.url?t.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+t.layer+"/{z}/{x}/{y}."+o.Lb,wrapX:t.wrapX})}e(a1,Um);var p1=[new Be({html:'Map tiles by <a href="http://stamen.com/">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.'}),_m],h1={terrain:{Lb:"jpg",opaque:!0},"terrain-background":{Lb:"jpg",opaque:!0},"terrain-labels":{Lb:"png",opaque:!1},"terrain-lines":{Lb:"png",opaque:!1},"toner-background":{Lb:"png",opaque:!0},toner:{Lb:"png",opaque:!0},"toner-hybrid":{Lb:"png",opaque:!1},"toner-labels":{Lb:"png",opaque:!1},"toner-lines":{Lb:"png",opaque:!1},"toner-lite":{Lb:"png",opaque:!0},watercolor:{Lb:"jpg",opaque:!0}},l1={terrain:{minZoom:4,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:1,maxZoom:16}};function R(t){T.call(this,{attributions:(t=t||{}).attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX}),this.f=t.params||{},this.l=vt(),Lm(this,u1(this))}function u1(t){var e,o=0,i=[];for(e in t.f)i[o++]=e+"-"+t.f[e];return i.join("/")}function c1(t){jm.call(this,{opaque:!1,projection:t.projection,tileGrid:t.tileGrid,wrapX:void 0===t.wrapX||t.wrapX})}function f1(t,e,o){w0.call(this,t,2),this.c=e,this.Ia=o,this.a=null}function y1(t){var e;this.f=null,T.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,projection:v("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,wrapX:void 0===t.wrapX||t.wrapX}),t.url?t.jsonp?wm(t.url,this.og.bind(this),this.Ve.bind(this)):((e=new XMLHttpRequest).addEventListener("load",this.Ao.bind(this)),e.addEventListener("error",this.zo.bind(this)),e.open("GET",t.url),e.send()):t.tileJSON?this.og(t.tileJSON):O(!1,51)}function g1(t){var e;jm.call(this,{projection:v("EPSG:3857"),state:"loading"}),this.v=void 0===t.preemptive||t.preemptive,this.l=Pm,this.g=void 0,this.f=t.jsonp||!1,t.url?this.f?wm(t.url,this.pg.bind(this),this.We.bind(this)):((e=new XMLHttpRequest).addEventListener("load",this.Eo.bind(this)),e.addEventListener("error",this.Do.bind(this)),e.open("GET",t.url),e.send()):t.tileJSON?this.pg(t.tileJSON):O(!1,51)}function d1(t,e,o,i,r,n){w0.call(this,t,e),this.o=o,this.a=i,this.v=r,this.c=this.j=this.g=null,this.l=n}function v1(t){var e;0==t.state&&(t.state=1,t.l?wm(t.o,t.Ji.bind(t),t.De.bind(t)):((e=new XMLHttpRequest).addEventListener("load",t.Co.bind(t)),e.addEventListener("error",t.Bo.bind(t)),e.open("GET",t.o),e.send()))}function I(t){var e=(t=t||{}).params||{};T.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,opaque:!(!("TRANSPARENT"in e)||e.TRANSPARENT),projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX}),this.C=void 0!==t.gutter?t.gutter:0,this.f=e,this.l=!0,this.B=t.serverType,this.T=void 0===t.hidpi||t.hidpi,this.R="",m1(this),this.fa=vt(),x1(this),Lm(this,w1(this))}function b1(t,e,o,i,r,n,s){var a=t.urls;if(a){if(s.WIDTH=o[0],s.HEIGHT=o[1],s[t.l?"CRS":"SRS"]=n.mb,"STYLES"in t.f||(s.STYLES=""),1!=r)switch(t.B){case"geoserver":o=90*r+.5|0,s.FORMAT_OPTIONS="FORMAT_OPTIONS"in s?s.FORMAT_OPTIONS+";dpi:"+o:"dpi:"+o;break;case"mapserver":s.MAP_RESOLUTION=90*r;break;case"carmentaserver":case"qgis":s.DPI=90*r;break;default:O(!1,52)}return n=n.b,t.l&&"ne"==n.substr(0,2)&&(t=i[0],i[0]=i[1],i[1]=t,t=i[2],i[2]=i[3],i[3]=t),s.BBOX=i.join(","),Vm(1==a.length?a[0]:a[rt((e[1]<<e[0])+e[2],a.length)],s)}}function m1(t){var e=0,o=[];if(t.urls)for(var i=0,r=t.urls.length;i<r;++i)o[e++]=t.urls[i];t.R=o.join("#")}function w1(t){var e,o=0,i=[];for(e in t.f)i[o++]=e+"-"+t.f[e];return i.join("/")}function x1(t){t.l=0<=tr(t.f.VERSION||"1.3.0")}function S1(t,e,o,i,r,n,s,a,p,h,l,u,c,f){var y,g;w0.call(this,t,e),this.j=null,this.o={Nd:!1,Kg:null,mf:-1,Lg:-1},this.c=h,this.a=[],this.u=o,this.v=n,this.g=[],this.l=[],n&&(y=p.Aa(n),g=p.Da(t[0]),a.Rf(y,a.tc(g),function(t){var e,o=Nt(y,a.Aa(t));.5<=Dt(o)/g&&.5<=It(o)/g&&(o=t.toString(),(e=h[o])||(e=s(t,l,u),e=h[o]=new c(t,null==e?4:0,null==e?"":e,i,r),this.l.push(d(e,"change",f))),e.j++,this.a.push(o))}.bind(this)))}function M1(t,e){t.Pg(bl(e,t.o,t.$o.bind(t),t.Zo.bind(t)))}function P1(t,e,o,i,r){w0.call(this,t,e),this.j=0,this.o=i,this.g=null,this.c={},this.u=r,this.l=o}function A1(t){Nm.call(this,{attributions:t.attributions,cacheSize:void 0!==t.cacheSize?t.cacheSize:128,extent:t.extent,logo:t.logo,opaque:!1,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction||M1,tileUrlFunction:t.tileUrlFunction,tilePixelRatio:t.tilePixelRatio,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX}),this.g=t.format||null,this.v={},this.l=null==t.overlaps||t.overlaps,this.tileClass=t.tileClass||P1,this.f={},this.tileGrid||(this.tileGrid=this.Ta(v(t.projection||"EPSG:3857")))}function E1(t){this.o=t.matrixIds,Te.call(this,{extent:t.extent,origin:t.origin,origins:t.origins,resolutions:t.resolutions,tileSize:t.tileSize,tileSizes:t.tileSizes,sizes:t.sizes})}function T1(t,e,o){var r=[],n=[],s=[],a=[],p=[],h=void 0!==o?o:[],l=(o=v(t.SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))).sc(),u="ne"==o.b.substr(0,2);return t.TileMatrix.sort(function(t,e){return e.ScaleDenominator-t.ScaleDenominator}),t.TileMatrix.forEach(function(e){var t,o,i;(t=!(0<h.length)||W(h,function(t){return e.Identifier==t.TileMatrix}))&&(n.push(e.Identifier),t=28e-5*e.ScaleDenominator/l,o=e.TileWidth,i=e.TileHeight,s.push(u?[e.TopLeftCorner[1],e.TopLeftCorner[0]]:e.TopLeftCorner),r.push(t),a.push(o==i?o:[o,i]),p.push([e.MatrixWidth,-e.MatrixHeight]))}),new E1({extent:e,origins:s,resolutions:r,matrixIds:n,tileSizes:a,sizes:p})}function N(t){this.fa=void 0!==t.version?t.version:"1.0.0",this.C=void 0!==t.format?t.format:"image/jpeg",this.f=t.dimensions||{},this.B=t.layer,this.l=t.matrixSet,this.R=t.style;var e=t.urls,i=(void 0===e&&void 0!==t.url&&(e=Am(t.url)),this.T=void 0!==t.requestEncoding?t.requestEncoding:"KVP"),r=t.tileGrid,o={layer:this.B,style:this.R,tilematrixset:this.l},n=("KVP"==i&&Xt(o,{Service:"WMTS",Request:"GetTile",Version:this.fa,Format:this.C}),this.f),s=e&&0<e.length?Mm(e.map(function(e){return e="KVP"==i?Vm(e,o):e.replace(/\{(\w+?)\}/g,function(t,e){return e.toLowerCase()in o?o[e.toLowerCase()]:t}),function(t){var o;if(t)return o={TileMatrix:r.o[t[0]],TileCol:t[1],TileRow:-t[2]-1},Xt(o,n),t=e,"KVP"==i?Vm(t,o):t.replace(/\{(\w+?)\}/g,function(t,e){return o[e]})}})):Pm;T.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:r,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:s,urls:e,wrapX:void 0!==t.wrapX&&t.wrapX}),Lm(this,j1(this))}function j1(t){var e,o=0,i=[];for(e in t.f)i[o++]=e+"-"+t.f[e];return i.join("/")}function C1(t){var e=(t=t||{}).size,o=e[0],i=e[1],n=[],r=256;switch(void 0!==t.tierSizeCalculation?t.tierSizeCalculation:R1){case R1:for(;r<o||r<i;)n.push([Math.ceil(o/r),Math.ceil(i/r)]),r+=r;break;case I1:for(;r<o||r<i;)n.push([Math.ceil(o/r),Math.ceil(i/r)]),o>>=1,i>>=1;break;default:O(!1,53)}n.push([1,1]),n.reverse();for(var r=[1],s=[0],i=1,o=n.length;i<o;i++)r.push(1<<i),s.push(n[i-1][0]*n[i-1][1]+s[i-1]);r.reverse(),e=new Te({extent:e=[0,-e[1],e[0],0],origin:Ft(e),resolutions:r}),(r=t.url)&&-1==r.indexOf("{TileGroup}")&&(r+="{TileGroup}/{z}-{x}-{y}.jpg"),r=Mm((r=Am(r)).map(function(r){return function(t){var e,o,i;if(t)return e=t[0],o=t[1],i={z:e,x:o,y:t=-t[2]-1,TileGroup:"TileGroup"+((o+t*n[e][0]+s[e])/256|0)},r.replace(/\{(\w+?)\}/g,function(t,e){return i[e]})}})),T.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:L1,tileGrid:e,tileUrlFunction:r})}function L1(t,e,o,i,r){M0.call(this,t,e,o,i,r),this.a=null}e(R,T),R.prototype.C=function(){return this.f},R.prototype.nb=function(t){return t},R.prototype.Fc=function(t,e,o){var i,r,n,s=this.tileGrid;if(!((s=s||this.Ta(o)).b.length<=t[0]))return i=s.Aa(t,this.l),r=pt(s.gb(t[0]),this.o),1!=e&&(r=at(r,e,this.o)),Xt(s={F:"image",FORMAT:"PNG32",TRANSPARENT:!0},this.f),(n=this.urls)?(o=o.mb.split(":").pop(),s.SIZE=r[0]+","+r[1],s.BBOX=i.join(","),s.BBOXSR=o,s.IMAGESR=o,s.DPI=Math.round(s.DPI?s.DPI*e:90*e),Vm(t=(1==n.length?n[0]:n[rt((t[1]<<t[0])+t[2],n.length)]).replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),s)):void 0},R.prototype.B=function(t){Xt(this.f,t),Lm(this,u1(this))},e(c1,jm),c1.prototype.Nc=function(t,e,o){var i,r=this.Sb(t,e,o);return this.a.b.hasOwnProperty(r)?this.a.get(r):(i=pt(this.tileGrid.gb(t)),i=new f1(t=[t,e,o],i,e=(e=Rm(this,t))?Rm(this,e).toString():""),this.a.set(r,i),i)},e(f1,w0),f1.prototype.Y=function(){var t,e;return this.a||((e=Po((t=this.c)[0],t[1])).strokeStyle="black",e.strokeRect(.5,.5,t[0]+.5,t[1]+.5),e.fillStyle="black",e.textAlign="center",e.textBaseline="middle",e.font="24px sans-serif",e.fillText(this.Ia,t[0]/2,t[1]/2),this.a=e.canvas)},f1.prototype.load=function(){},e(y1,T),(r=y1.prototype).Ao=function(t){if(!(t=t.target).status||200<=t.status&&t.status<300){try{var e=JSON.parse(t.responseText)}catch(t){return void this.Ve()}this.og(e)}else this.Ve()},r.zo=function(){this.Ve()},r.pl=function(){return this.f},r.og=function(t){var e,o=v("EPSG:4326"),i=this.c,r=(t.bounds&&(n=we(o,i),e=Bt(t.bounds,n)),t.minzoom||0),n=t.maxzoom||22;if(this.tileGrid=i=De({extent:Ge(i),maxZoom:n,minZoom:r}),this.tileUrlFunction=Sm(t.tiles,i),void 0!==t.attribution&&!this.j){o=void 0!==e?e:o.G(),e={};for(;r<=n;++r)e[r.toString()]=[Ie(i,o,r)];this.ua([new Be({html:t.attribution,tileRanges:e})])}this.f=t,Iv(this,"ready")},r.Ve=function(){Iv(this,"error")},e(g1,jm),(r=g1.prototype).Eo=function(t){if(!(t=t.target).status||200<=t.status&&t.status<300){try{var e=JSON.parse(t.responseText)}catch(t){return void this.We()}this.pg(e)}else this.We()},r.Do=function(){this.We()},r.ml=function(){return this.g},r.zk=function(t,e,o,i,r){var n,s,a;this.tileGrid?(e=this.tileGrid.Be(t,e),e=this.Nc(e[0],e[1],e[2],1,this.c),n=t,s=o,a=i,t=r,0==e.state&&!0===t?(Ye(e,"change",function(){s.call(a,this.getData(n))},e),v1(e)):!0===t?setTimeout(function(){s.call(a,this.getData(n))}.bind(e),0):s.call(a,e.getData(n))):!0===r?setTimeout(function(){o.call(i,null)},0):o.call(i,null)},r.We=function(){Iv(this,"error")},r.pg=function(t){var e,o=v("EPSG:4326"),i=this.c,r=(t.bounds&&(n=we(o,i),e=Bt(t.bounds,n)),t.minzoom||0),n=t.maxzoom||22,s=(this.tileGrid=i=De({extent:Ge(i),maxZoom:n,minZoom:r}),this.g=t.template,t.grids);if(s){if(this.l=Sm(s,i),void 0!==t.attribution){for(o=void 0!==e?e:o.G(),e={};r<=n;++r)e[s=r.toString()]=[Ie(i,o,r)];this.ua([new Be({html:t.attribution,tileRanges:e})])}Iv(this,"ready")}else Iv(this,"error")},r.Nc=function(t,e,o,i,r){var n=this.Sb(t,e,o);return this.a.b.hasOwnProperty(n)?this.a.get(n):(e=Rm(this,t=[t,e,o],r),i=new d1(t,void 0!==(i=this.l(e,i,r))?0:4,void 0!==i?i:"",this.tileGrid.Aa(t),this.v,this.f),this.a.set(n,i),i)},r.Ug=function(t,e,o){t=this.Sb(t,e,o),this.a.b.hasOwnProperty(t)&&this.a.get(t)},e(d1,w0),(r=d1.prototype).Y=function(){return null},r.getData=function(t){var e;return!this.g||!this.j||"string"!=typeof(e=this.g[Math.floor((1-(t[1]-this.a[1])/(this.a[3]-this.a[1]))*this.g.length)])?null:(93<=(e=e.charCodeAt(Math.floor((t[0]-this.a[0])/(this.a[2]-this.a[0])*e.length)))&&e--,35<=e&&e--,t=null,(e-=32)in this.j&&(e=this.j[e],t=this.c&&e in this.c?this.c[e]:e),t)},r.bb=function(){return this.o},r.De=function(){this.state=3,this.s()},r.Ji=function(t){this.g=t.grid,this.j=t.keys,this.c=t.data,this.state=4,this.s()},r.Co=function(t){if(!(t=t.target).status||200<=t.status&&t.status<300){try{var e=JSON.parse(t.responseText)}catch(t){return void this.De()}this.Ji(e)}else this.De()},r.Bo=function(){this.De()},r.load=function(){this.v&&v1(this)},e(I,T),(r=I.prototype).Fo=function(t,e,o,i){o=v(o);var r,n,s,a=this.tileGrid;if(e=(a=a||this.Ta(o)).Be(t,e),!(a.b.length<=e[0]))return r=a.Da(e[0]),n=a.Aa(e,this.fa),a=pt(a.gb(e[0]),this.o),(s=this.C)&&(a=st(a,s,this.o),n=lt(n,r*s,n)),s={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.f.LAYERS},Xt(s,this.f,i),i=Math.floor((n[3]-t[1])/r),s[this.l?"I":"X"]=Math.floor((t[0]-n[0])/r),s[this.l?"J":"Y"]=i,b1(this,e,a,n,1,o,s)},r.Xf=function(){return this.C},r.Sb=function(t,e,o){return this.R+T.prototype.Sb.call(this,t,e,o)},r.Go=function(){return this.f},r.nb=function(t){return this.T&&void 0!==this.B?t:1},r.Fc=function(t,e,o){var i,r,n,s=this.tileGrid;if(!((s=s||this.Ta(o)).b.length<=t[0]))return 1==e||this.T&&void 0!==this.B||(e=1),i=s.Da(t[0]),r=s.Aa(t,this.fa),s=pt(s.gb(t[0]),this.o),(n=this.C)&&(s=st(s,n,this.o),r=lt(r,i*n,r)),1!=e&&(s=at(s,e,this.o)),Xt(i={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0},this.f),b1(this,t,s,r,e,o,i)},r.eb=function(t){T.prototype.eb.call(this,t),m1(this)},r.Ho=function(t){Xt(this.f,t),m1(this),x1(this),Lm(this,w1(this))},e(S1,w0),S1.prototype.ka=function(){for(var t=0,e=this.a.length;t<e;++t){var o=this.a[t],i=this.c[o];i.j--,i.j||(delete this.c[o],$e(i))}this.a.length=0,this.c=null,1==this.state&&(this.g.forEach(qe),this.g.length=0),this.i&&$e(this.i),this.state=5,this.s(),this.l.forEach(qe),this.l.length=0,w0.prototype.ka.call(this)},S1.prototype.Y=function(){return-1==this.o.Lg?null:this.j.canvas},S1.prototype.bb=function(){return this.a.join("/")+"/"+this.u},S1.prototype.load=function(){var r=0,n=!1;0==this.state&&S0(this,1),1==this.state&&this.a.forEach(function(e){var o,i=this.c[e];0==i.state?(i.Pg(this.S),i.load()):3==i.state?n=!0:4==i.state&&V(this.a,e),1==i.state&&(o=d(i,"change",function(){var t=i.getState();2!=t&&3!=t||(--r,qe(o),V(this.g,o),3==t&&(V(this.a,e),n=!0),r)||S0(this,0<this.a.length?2:3)}.bind(this)),this.g.push(o),++r)}.bind(this)),r||setTimeout(function(){S0(this,0<this.a.length?2:n?3:4)}.bind(this),0)},e(P1,w0),(r=P1.prototype).ka=function(){this.g=null,this.c={},this.state=5,this.s(),w0.prototype.ka.call(this)},r.Lm=function(){return this.o},r.Km=function(){return this.g},r.bb=function(){return this.l},r.Mm=function(){return this.a},r.load=function(){0==this.state&&(S0(this,1),this.u(this,this.l),this.v(null,NaN,null))},r.$o=function(t,e){this.ig(e),this.mj(t)},r.Zo=function(){S0(this,3)},r.mj=function(t){this.g=t,S0(this,2)},r.ig=function(t){this.a=t},r.Pg=function(t){this.v=t},e(A1,Nm),A1.prototype.Nc=function(t,e,o,i,r){var n=this.Sb(t,e,o);return this.a.b.hasOwnProperty(n)?this.a.get(n):(i=new S1(t=[t,e,o],void 0!==(o=(e=Rm(this,t,r))?this.tileUrlFunction(e,i,r):void 0)?0:4,void 0!==o?o:"",this.g,this.tileLoadFunction,e,this.tileUrlFunction,this.tileGrid,this.Ta(r),this.v,i,r,this.tileClass,this.Li.bind(this)),this.a.set(n,i),i)},A1.prototype.Ta=function(t){var e=t.mb,o=this.f[e];return o||(o=this.tileGrid,o=this.f[e]=Ue(t,void 0,o?o.gb(o.minZoom):void 0)),o},A1.prototype.nb=function(t){return null==t?Nm.prototype.nb.call(this,t):t},A1.prototype.Xd=function(t,e,o){return t=pt(this.Ta(o).gb(t)),[Math.round(t[0]*e),Math.round(t[1]*e)]},e(E1,Te),E1.prototype.l=function(){return this.o},e(N,T),(r=N.prototype).Mk=function(){return this.f},r.Io=function(){return this.C},r.Jo=function(){return this.B},r.$k=function(){return this.l},r.kl=function(){return this.T},r.Ko=function(){return this.R},r.rl=function(){return this.fa},r.uq=function(t){Xt(this.f,t),Lm(this,j1(this))},e(C1,T),e(L1,M0),L1.prototype.Y=function(){var t,e;return this.a||(t=M0.prototype.Y.call(this),2==this.state?256==t.width&&256==t.height?this.a=t:((e=Po(256,256)).drawImage(t,0,0),this.a=e.canvas):t)};var R1="default",I1="truncated";function N1(t,e){this.b=e,this.a=[{x:0,y:0,width:t,height:t}],this.c={},this.i=Po(t,t),this.f=this.i.canvas}function F1(t,e,o,i){e=[e,1],0<o.width&&0<o.height&&e.push(o),0<i.width&&0<i.height&&e.push(i),t.a.splice.apply(t.a,e)}function k1(t){this.a=void 0!==(t=t||{}).initialSize?t.initialSize:256,this.i=void 0!==t.maxSize?t.maxSize:void 0!==vi?vi:2048,this.b=void 0!==t.space?t.space:1,this.f=[new N1(this.a,this.b)],this.c=this.a,this.g=[new N1(this.c,this.b)]}function D1(t,e,o,i,r,n,s){for(var a=e?t.g:t.f,p=0,h=a.length;p<h;++p){var l=a[p];if(l=l.add(o,i,r,n,s))return l;l||p!==h-1||(e?(l=Math.min(2*t.c,t.i),t.c=l):(l=Math.min(2*t.a,t.i),t.a=l),l=new N1(l,t.b),a.push(l),++h)}return null}return N1.prototype.get=function(t){return this.c[t]||null},N1.prototype.add=function(t,e,o,i,r){for(var n=0,s=this.a.length;n<s;++n){var a=this.a[n];if(a.width>=e+this.b&&a.height>=o+this.b)return s={offsetX:a.x+this.b,offsetY:a.y+this.b,image:this.f},this.c[t]=s,i.call(r,this.i,a.x+this.b,a.y+this.b),t=n,e+=this.b,i=o+this.b,e=a.width-e>a.height-i?(o={x:a.x+e,y:a.y,width:a.width-e,height:a.height},{x:a.x,y:a.y+i,width:e,height:a.height-i}):(o={x:a.x+e,y:a.y,width:a.width-e,height:i},{x:a.x,y:a.y+i,width:a.width,height:a.height-i}),F1(this,t,o,e),s}return null},k1.prototype.add=function(t,e,o,i,r,n){return!(e+this.b>this.i||o+this.b>this.i)&&(i=D1(this,!1,t,e,o,i,n))?(t=D1(this,!0,t,e,o,r||Y,n),{offsetX:i.offsetX,offsetY:i.offsetY,image:i.image,Zl:t.image}):null},t("ol.Attribution",Be),Be.prototype.getHTML=Be.prototype.i,t("ol.Collection",ho),ho.prototype.extend=ho.prototype.fg,ho.prototype.getArray=ho.prototype.tm,ho.prototype.getLength=ho.prototype.dc,ho.prototype.insertAt=ho.prototype.He,ho.prototype.removeAt=ho.prototype.Hg,ho.prototype.setAt=ho.prototype.Wp,t("ol.color.asArray",vo),t("ol.color.asString",bo),t("ol.colorlike.asColorLike",Mo),t("ol.control.defaults",Uo),t("ol.coordinate.add",er),t("ol.coordinate.createStringXY",function(e){return function(t){return ur(t,e)}}),t("ol.coordinate.format",rr),t("ol.coordinate.rotate",sr),t("ol.coordinate.toStringHDMS",function(t,e){return t?ir("NS",t[1],e)+" "+ir("EW",t[0],e):""}),t("ol.coordinate.toStringXY",ur),t("ol.DeviceOrientation",Uh),Uh.prototype.getAlpha=Uh.prototype.Fk,Uh.prototype.getBeta=Uh.prototype.Ik,Uh.prototype.getGamma=Uh.prototype.Ok,Uh.prototype.getHeading=Uh.prototype.um,Uh.prototype.getTracking=Uh.prototype.Th,Uh.prototype.setTracking=Uh.prototype.gg,t("ol.easing.easeIn",Ro),t("ol.easing.easeOut",Io),t("ol.easing.inAndOut",No),t("ol.easing.linear",Fo),t("ol.easing.upAndDown",function(t){return t<.5?No(2*t):1-No(2*(t-.5))}),t("ol.extent.boundingExtent",ht),t("ol.extent.buffer",lt),t("ol.extent.containsCoordinate",ft),t("ol.extent.containsExtent",yt),t("ol.extent.containsXY",gt),t("ol.extent.createEmpty",vt),t("ol.extent.equals",St),t("ol.extent.extend",Mt),t("ol.extent.getArea",Tt),t("ol.extent.getBottomLeft",jt),t("ol.extent.getBottomRight",Ct),t("ol.extent.getCenter",Lt),t("ol.extent.getHeight",It),t("ol.extent.getIntersection",Nt),t("ol.extent.getSize",function(t){return[t[2]-t[0],t[3]-t[1]]}),t("ol.extent.getTopLeft",Ft),t("ol.extent.getTopRight",kt),t("ol.extent.getWidth",Dt),t("ol.extent.intersects",Ot),t("ol.extent.isEmpty",Ut),t("ol.extent.applyTransform",Bt),t("ol.Feature",x),x.prototype.getGeometry=x.prototype.V,x.prototype.getId=x.prototype.wm,x.prototype.getGeometryName=x.prototype.Qk,x.prototype.getStyle=x.prototype.xm,x.prototype.getStyleFunction=x.prototype.Lc,x.prototype.setGeometry=x.prototype.Ra,x.prototype.setStyle=x.prototype.hg,x.prototype.setId=x.prototype.jc,x.prototype.setGeometryName=x.prototype.Tc,t("ol.featureloader.xhr",ml),t("ol.Geolocation",p0),p0.prototype.getAccuracy=p0.prototype.Dk,p0.prototype.getAccuracyGeometry=p0.prototype.Ek,p0.prototype.getAltitude=p0.prototype.Gk,p0.prototype.getAltitudeAccuracy=p0.prototype.Hk,p0.prototype.getHeading=p0.prototype.ym,p0.prototype.getPosition=p0.prototype.zm,p0.prototype.getProjection=p0.prototype.Uh,p0.prototype.getSpeed=p0.prototype.ll,p0.prototype.getTracking=p0.prototype.Vh,p0.prototype.getTrackingOptions=p0.prototype.Gh,p0.prototype.setProjection=p0.prototype.Wh,p0.prototype.setTracking=p0.prototype.Ke,p0.prototype.setTrackingOptions=p0.prototype.wj,t("ol.Graticule",c0),c0.prototype.getMap=c0.prototype.Cm,c0.prototype.getMeridians=c0.prototype.al,c0.prototype.getParallels=c0.prototype.hl,t("ol.has.DEVICE_PIXEL_RATIO",ni),t("ol.has.CANVAS",ai),t("ol.has.DEVICE_ORIENTATION",pi),t("ol.has.GEOLOCATION",hi),t("ol.has.TOUCH",li),t("ol.has.WEBGL",gi),b0.prototype.getImage=b0.prototype.Y,M0.prototype.getImage=M0.prototype.Y,t("ol.inherits",e),t("ol.interaction.defaults",hs),t("ol.Kinetic",sn),t("ol.loadingstrategy.all",Cv),t("ol.loadingstrategy.bbox",function(t){return[t]}),t("ol.loadingstrategy.tile",function(i){return function(t,e){e=i.tc(e),t=Ie(i,t,e);var o=[];for((e=[e,0,0])[1]=t.ca;e[1]<=t.$;++e[1])for(e[2]=t.da;e[2]<=t.ia;++e[2])o.push(i.Aa(e));return o}}),t("ol.Map",u),u.prototype.addControl=u.prototype.kk,u.prototype.addInteraction=u.prototype.lk,u.prototype.addLayer=u.prototype.ih,u.prototype.addOverlay=u.prototype.jh,u.prototype.forEachFeatureAtPixel=u.prototype.we,u.prototype.forEachLayerAtPixel=u.prototype.Im,u.prototype.hasFeatureAtPixel=u.prototype.Yl,u.prototype.getEventCoordinate=u.prototype.Tf,u.prototype.getEventPixel=u.prototype.xe,u.prototype.getTarget=u.prototype.ag,u.prototype.getTargetElement=u.prototype.jd,u.prototype.getCoordinateFromPixel=u.prototype.Wa,u.prototype.getControls=u.prototype.Lk,u.prototype.getOverlays=u.prototype.fl,u.prototype.getOverlayById=u.prototype.el,u.prototype.getInteractions=u.prototype.Sk,u.prototype.getLayerGroup=u.prototype.Kc,u.prototype.getLayers=u.prototype.Xh,u.prototype.getPixelFromCoordinate=u.prototype.Ja,u.prototype.getSize=u.prototype.Ob,u.prototype.getView=u.prototype.Z,u.prototype.getViewport=u.prototype.sl,u.prototype.renderSync=u.prototype.Tp,u.prototype.removeControl=u.prototype.Mp,u.prototype.removeInteraction=u.prototype.Np,u.prototype.removeLayer=u.prototype.Pp,u.prototype.removeOverlay=u.prototype.Qp,u.prototype.setLayerGroup=u.prototype.qj,u.prototype.setSize=u.prototype.Qg,u.prototype.setTarget=u.prototype.Le,u.prototype.setView=u.prototype.iq,u.prototype.updateSize=u.prototype.Ad,t("ol.Object",ro),ro.prototype.getKeys=ro.prototype.O,ro.prototype.getProperties=ro.prototype.N,ro.prototype.setProperties=ro.prototype.H,ro.prototype.unset=ro.prototype.P,t("ol.Observable",io),t("ol.Observable.unByKey",function(t){if(Array.isArray(t))for(var e=0,o=t.length;e<o;++e)qe(t[e]);else qe(t)}),io.prototype.changed=io.prototype.s,io.prototype.dispatchEvent=io.prototype.b,io.prototype.getRevision=io.prototype.L,io.prototype.on=io.prototype.J,io.prototype.un=io.prototype.K,t("ol.Overlay",fh),fh.prototype.getElement=fh.prototype.Rd,fh.prototype.getId=fh.prototype.Jm,fh.prototype.getMap=fh.prototype.Me,fh.prototype.getOffset=fh.prototype.Dh,fh.prototype.getPosition=fh.prototype.Yh,fh.prototype.getPositioning=fh.prototype.Eh,fh.prototype.setElement=fh.prototype.lj,fh.prototype.setOffset=fh.prototype.rj,fh.prototype.setPosition=fh.prototype.Ne,fh.prototype.setPositioning=fh.prototype.uj,t("ol.proj.METERS_PER_UNIT",Yt),t("ol.proj.setProj4",function(t){Ht=t}),t("ol.proj.getPointResolution",ce),t("ol.proj.addEquivalentProjections",fe),t("ol.proj.addProjection",ye),t("ol.proj.addCoordinateTransforms",de),t("ol.proj.fromLonLat",function(t,e){return Me(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")}),t("ol.proj.toLonLat",function(t,e){return Me(t,void 0!==e?e:"EPSG:3857","EPSG:4326")}),t("ol.proj.get",v),t("ol.proj.equivalent",be),t("ol.proj.getTransform",me),t("ol.proj.transform",Me),t("ol.proj.transformExtent",Pe),t("ol.render.toContext",function(t,e){var o=t.canvas,i=e||{};return e=i.pixelRatio||ni,(i=i.size)&&(o.width=i[0]*e,o.height=i[1]*e,o.style.width=i[0]+"px",o.style.height=i[1]+"px"),new Vs(t,e,o=[0,0,o.width,o.height],Es(ms(),e,e),0)}),t("ol.size.toSize",pt),t("ol.Sphere",Kt),Kt.prototype.geodesicArea=Kt.prototype.a,Kt.prototype.haversineDistance=Kt.prototype.b,w0.prototype.getTileCoord=w0.prototype.f,t("ol.tilegrid.createXYZ",De),P1.prototype.getFormat=P1.prototype.Lm,P1.prototype.getFeatures=P1.prototype.Km,P1.prototype.getProjection=P1.prototype.Mm,P1.prototype.setFeatures=P1.prototype.mj,P1.prototype.setProjection=P1.prototype.ig,P1.prototype.setLoader=P1.prototype.Pg,t("ol.View",h),h.prototype.getAnimating=h.prototype.Ic,h.prototype.getInteracting=h.prototype.Rk,h.prototype.cancelAnimations=h.prototype.ed,h.prototype.constrainCenter=h.prototype.Ec,h.prototype.getCenter=h.prototype.wa,h.prototype.calculateExtent=h.prototype.dd,h.prototype.getMaxResolution=h.prototype.Nm,h.prototype.getMinResolution=h.prototype.Pm,h.prototype.getMaxZoom=h.prototype.Om,h.prototype.setMaxZoom=h.prototype.eq,h.prototype.getMinZoom=h.prototype.Qm,h.prototype.setMinZoom=h.prototype.fq,h.prototype.getProjection=h.prototype.Rm,h.prototype.getResolution=h.prototype.Pa,h.prototype.getResolutions=h.prototype.Sm,h.prototype.getResolutionForExtent=h.prototype.ze,h.prototype.getRotation=h.prototype.Qa,h.prototype.getZoom=h.prototype.Hh,h.prototype.getZoomForResolution=h.prototype.Ce,h.prototype.fit=h.prototype.Qf,h.prototype.centerOn=h.prototype.uk,h.prototype.setCenter=h.prototype.ob,h.prototype.setResolution=h.prototype.Vc,h.prototype.setRotation=h.prototype.Oe,h.prototype.setZoom=h.prototype.lq,t("ol.xml.getAllTextContent",il),t("ol.xml.parse",sl),Aa.prototype.getGL=Aa.prototype.Wo,Aa.prototype.useProgram=Aa.prototype.Qc,t("ol.tilegrid.TileGrid",Te),Te.prototype.forEachTileCoord=Te.prototype.Rf,Te.prototype.getMaxZoom=Te.prototype.Ti,Te.prototype.getMinZoom=Te.prototype.Ui,Te.prototype.getOrigin=Te.prototype.Pc,Te.prototype.getResolution=Te.prototype.Da,Te.prototype.getResolutions=Te.prototype.Vi,Te.prototype.getTileCoordExtent=Te.prototype.Aa,Te.prototype.getTileCoordForCoordAndResolution=Te.prototype.Be,Te.prototype.getTileCoordForCoordAndZ=Te.prototype.bg,Te.prototype.getTileSize=Te.prototype.gb,Te.prototype.getZForResolution=Te.prototype.tc,t("ol.tilegrid.WMTS",E1),E1.prototype.getMatrixIds=E1.prototype.l,t("ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet",T1),t("ol.style.AtlasManager",k1),t("ol.style.Circle",Yh),Yh.prototype.setRadius=Yh.prototype.Uc,t("ol.style.Fill",Hh),Hh.prototype.getColor=Hh.prototype.i,Hh.prototype.setColor=Hh.prototype.c,t("ol.style.Icon",af),af.prototype.getAnchor=af.prototype.Hc,af.prototype.getColor=af.prototype.Lo,af.prototype.getImage=af.prototype.Y,af.prototype.getOrigin=af.prototype.Oc,af.prototype.getSrc=af.prototype.Mo,af.prototype.getSize=af.prototype.ic,t("ol.style.Image",Zh),Zh.prototype.getOpacity=Zh.prototype.Ze,Zh.prototype.getRotateWithView=Zh.prototype.$e,Zh.prototype.getRotation=Zh.prototype.af,Zh.prototype.getScale=Zh.prototype.bf,Zh.prototype.getSnapToPixel=Zh.prototype.Ae,Zh.prototype.setOpacity=Zh.prototype.td,Zh.prototype.setRotation=Zh.prototype.cf,Zh.prototype.setScale=Zh.prototype.ud,t("ol.style.RegularShape",Kh),Kh.prototype.getAnchor=Kh.prototype.Hc,Kh.prototype.getAngle=Kh.prototype.Pi,Kh.prototype.getFill=Kh.prototype.Fa,Kh.prototype.getImage=Kh.prototype.Y,Kh.prototype.getOrigin=Kh.prototype.Oc,Kh.prototype.getPoints=Kh.prototype.Qi,Kh.prototype.getRadius=Kh.prototype.Ri,Kh.prototype.getRadius2=Kh.prototype.Fh,Kh.prototype.getSize=Kh.prototype.ic,Kh.prototype.getStroke=Kh.prototype.Ga,t("ol.style.Stroke",hp),hp.prototype.getColor=hp.prototype.No,hp.prototype.getLineCap=hp.prototype.Vk,hp.prototype.getLineDash=hp.prototype.Oo,hp.prototype.getLineDashOffset=hp.prototype.Wk,hp.prototype.getLineJoin=hp.prototype.Xk,hp.prototype.getMiterLimit=hp.prototype.bl,hp.prototype.getWidth=hp.prototype.Po,hp.prototype.setColor=hp.prototype.Qo,hp.prototype.setLineCap=hp.prototype.aq,hp.prototype.setLineDashOffset=hp.prototype.bq,hp.prototype.setLineJoin=hp.prototype.cq,hp.prototype.setMiterLimit=hp.prototype.gq,hp.prototype.setWidth=hp.prototype.jq,t("ol.style.Style",qh),qh.prototype.getGeometry=qh.prototype.V,qh.prototype.getGeometryFunction=qh.prototype.Pk,qh.prototype.getFill=qh.prototype.Fa,qh.prototype.setFill=qh.prototype.pf,qh.prototype.getImage=qh.prototype.Y,qh.prototype.setImage=qh.prototype.Og,qh.prototype.getStroke=qh.prototype.Ga,qh.prototype.setStroke=qh.prototype.qf,qh.prototype.getText=qh.prototype.Na,qh.prototype.setText=qh.prototype.xd,qh.prototype.getZIndex=qh.prototype.Ba,qh.prototype.setGeometry=qh.prototype.Ra,qh.prototype.setZIndex=qh.prototype.Vb,t("ol.style.Text",pf),pf.prototype.getFont=pf.prototype.Nk,pf.prototype.getOffsetX=pf.prototype.cl,pf.prototype.getOffsetY=pf.prototype.dl,pf.prototype.getFill=pf.prototype.Fa,pf.prototype.getRotateWithView=pf.prototype.Ro,pf.prototype.getRotation=pf.prototype.So,pf.prototype.getScale=pf.prototype.To,pf.prototype.getStroke=pf.prototype.Ga,pf.prototype.getText=pf.prototype.Na,pf.prototype.getTextAlign=pf.prototype.nl,pf.prototype.getTextBaseline=pf.prototype.ol,pf.prototype.setFont=pf.prototype.nj,pf.prototype.setOffsetX=pf.prototype.sj,pf.prototype.setOffsetY=pf.prototype.tj,pf.prototype.setFill=pf.prototype.pf,pf.prototype.setRotation=pf.prototype.Uo,pf.prototype.setScale=pf.prototype.Si,pf.prototype.setStroke=pf.prototype.qf,pf.prototype.setText=pf.prototype.xd,pf.prototype.setTextAlign=pf.prototype.vj,pf.prototype.setTextBaseline=pf.prototype.hq,t("ol.source.BingMaps",j),t("ol.source.BingMaps.TOS_ATTRIBUTION",Om),j.prototype.getApiKey=j.prototype.T,j.prototype.getImagerySet=j.prototype.fa,t("ol.source.CartoDB",C),C.prototype.getConfig=C.prototype.Kk,C.prototype.updateConfig=C.prototype.tq,C.prototype.setConfig=C.prototype.Xp,t("ol.source.Cluster",L),L.prototype.getDistance=L.prototype.$n,L.prototype.getSource=L.prototype.ao,L.prototype.setDistance=L.prototype.Yp,t("ol.source.Image",$b),t("ol.source.ImageArcGISRest",Wm),Wm.prototype.getParams=Wm.prototype.co,Wm.prototype.getImageLoadFunction=Wm.prototype.bo,Wm.prototype.getUrl=Wm.prototype.eo,Wm.prototype.setImageLoadFunction=Wm.prototype.fo,Wm.prototype.setUrl=Wm.prototype.ho,Wm.prototype.updateParams=Wm.prototype.io,t("ol.source.ImageCanvas",nm),t("ol.source.ImageMapGuide",Zm),Zm.prototype.getParams=Zm.prototype.ko,Zm.prototype.getImageLoadFunction=Zm.prototype.jo,Zm.prototype.updateParams=Zm.prototype.mo,Zm.prototype.setImageLoadFunction=Zm.prototype.lo,t("ol.source.ImageStatic",Km),t("ol.source.ImageVector",sm),sm.prototype.getSource=sm.prototype.no,sm.prototype.getStyle=sm.prototype.oo,sm.prototype.getStyleFunction=sm.prototype.po,sm.prototype.setStyle=sm.prototype.Ii,t("ol.source.ImageWMS",zm),zm.prototype.getGetFeatureInfoUrl=zm.prototype.so,zm.prototype.getParams=zm.prototype.uo,zm.prototype.getImageLoadFunction=zm.prototype.to,zm.prototype.getUrl=zm.prototype.vo,zm.prototype.setImageLoadFunction=zm.prototype.wo,zm.prototype.setUrl=zm.prototype.xo,zm.prototype.updateParams=zm.prototype.yo,t("ol.source.OSM",Jm),t("ol.source.OSM.ATTRIBUTION",_m),t("ol.source.Raster",o1),o1.prototype.setOperation=o1.prototype.v,t("ol.source.Source",Lv),Lv.prototype.getAttributions=Lv.prototype.ya,Lv.prototype.getLogo=Lv.prototype.xa,Lv.prototype.getProjection=Lv.prototype.za,Lv.prototype.refresh=Lv.prototype.sa,Lv.prototype.setAttributions=Lv.prototype.ua,t("ol.source.Stamen",a1),t("ol.source.Tile",jm),jm.prototype.getTileGrid=jm.prototype.ab,t("ol.source.TileArcGISRest",R),R.prototype.getParams=R.prototype.C,R.prototype.updateParams=R.prototype.B,t("ol.source.TileDebug",c1),t("ol.source.TileImage",T),T.prototype.setRenderReprojectionEdges=T.prototype.Pb,T.prototype.setTileGridForProjection=T.prototype.Qb,t("ol.source.TileJSON",y1),y1.prototype.getTileJSON=y1.prototype.pl,t("ol.source.TileUTFGrid",g1),g1.prototype.getTemplate=g1.prototype.ml,g1.prototype.forDataAtCoordinateAndResolution=g1.prototype.zk,t("ol.source.TileWMS",I),I.prototype.getGetFeatureInfoUrl=I.prototype.Fo,I.prototype.getParams=I.prototype.Go,I.prototype.updateParams=I.prototype.Ho,Nm.prototype.getTileLoadFunction=Nm.prototype.pb,Nm.prototype.getTileUrlFunction=Nm.prototype.qb,Nm.prototype.getUrls=Nm.prototype.rb,Nm.prototype.setTileLoadFunction=Nm.prototype.vb,Nm.prototype.setTileUrlFunction=Nm.prototype.cb,Nm.prototype.setUrl=Nm.prototype.jb,Nm.prototype.setUrls=Nm.prototype.eb,t("ol.source.Vector",a),a.prototype.addFeature=a.prototype.yb,a.prototype.addFeatures=a.prototype.cd,a.prototype.forEachFeature=a.prototype.sh,a.prototype.forEachFeatureInExtent=a.prototype.$b,a.prototype.forEachFeatureIntersectingExtent=a.prototype.th,a.prototype.getFeaturesCollection=a.prototype.Ah,a.prototype.getFeatures=a.prototype.Xe,a.prototype.getFeaturesAtCoordinate=a.prototype.zh,a.prototype.getFeaturesInExtent=a.prototype.Uf,a.prototype.getClosestFeatureToCoordinate=a.prototype.vh,a.prototype.getExtent=a.prototype.G,a.prototype.getFeatureById=a.prototype.yh,a.prototype.getFormat=a.prototype.Mi,a.prototype.getUrl=a.prototype.Ni,a.prototype.removeFeature=a.prototype.Gb,t("ol.source.VectorTile",A1),t("ol.source.WMTS",N),N.prototype.getDimensions=N.prototype.Mk,N.prototype.getFormat=N.prototype.Io,N.prototype.getLayer=N.prototype.Jo,N.prototype.getMatrixSet=N.prototype.$k,N.prototype.getRequestEncoding=N.prototype.kl,N.prototype.getStyle=N.prototype.Ko,N.prototype.getVersion=N.prototype.rl,N.prototype.updateDimensions=N.prototype.uq,t("ol.source.WMTS.optionsFromCapabilities",function(t,r){var e=W(t.Contents.Layer,function(t){return t.Identifier==r.layer});if(null===e)return null;var o,i,n=t.Contents.TileMatrixSet,s=1<e.TileMatrixSetLink.length?"projection"in r?z(e.TileMatrixSetLink,function(e){var t=W(n,function(t){return t.Identifier==e.TileMatrixSet}).SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"),o=v(t),i=v(r.projection);return o&&i?be(o,i):t==r.projection}):z(e.TileMatrixSetLink,function(t){return t.TileMatrixSet==r.matrixSet}):0,a=e.TileMatrixSetLink[s=s<0?0:s].TileMatrixSet,p=e.TileMatrixSetLink[s].TileMatrixSetLimits,h=e.Format[0],l=("format"in r&&(h=r.format),s=z(e.Style,function(t){return"style"in r?t.Title==r.style:t.isDefault}),s=e.Style[s=s<0?0:s].Identifier,{}),u=("Dimension"in e&&e.Dimension.forEach(function(t){var e=t.Identifier,o=t.Default;void 0===o&&(o=t.Value[0]),l[e]=o}),W(t.Contents.TileMatrixSet,function(t){return t.Identifier==a})),c="projection"in r?v(r.projection):v(u.SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3")),f=e.WGS84BoundingBox,y=(p=T1(u,i=void 0!==f&&(o=v("EPSG:4326").G(),o=f[0]==o[0]&&f[2]==o[2],i=Pe(f,"EPSG:4326",c),f=c.G())&&!yt(f,i)?void 0:i,p),[]),u=void 0!==(u=r.requestEncoding)?u:"";if("OperationsMetadata"in t&&"GetTile"in t.OperationsMetadata)for(i=0,f=(t=t.OperationsMetadata.GetTile.DCP.HTTP.Get).length;i<f;++i){var g=W(t[i].Constraint,function(t){return"GetEncoding"==t.name}).AllowedValues.Value;if("KVP"!==(u=""===u?g[0]:u))break;D(g,"KVP")&&y.push(t[i].href)}return y.length||(u="REST",e.ResourceURL.forEach(function(t){"tile"===t.resourceType&&(h=t.format,y.push(t.template))})),{urls:y,layer:r.layer,matrixSet:a,format:h,projection:c,requestEncoding:u,tileGrid:p,style:s,dimensions:l,wrapX:o,crossOrigin:r.crossOrigin}}),t("ol.source.XYZ",Um),t("ol.source.Zoomify",C1),sg.prototype.getExtent=sg.prototype.G,sg.prototype.getId=sg.prototype.Wn,sg.prototype.getGeometry=sg.prototype.V,sg.prototype.getProperties=sg.prototype.Xn,sg.prototype.getType=sg.prototype.U,t("ol.render.VectorContext",Xs),sh.prototype.setStyle=sh.prototype.rd,sh.prototype.drawGeometry=sh.prototype.zb,sh.prototype.drawFeature=sh.prototype.te,Vs.prototype.drawCircle=Vs.prototype.Zb,Vs.prototype.setStyle=Vs.prototype.rd,Vs.prototype.drawGeometry=Vs.prototype.zb,Vs.prototype.drawFeature=Vs.prototype.te,t("ol.proj.common.add",Ae),t("ol.proj.Projection",qt),qt.prototype.getCode=qt.prototype.Jk,qt.prototype.getExtent=qt.prototype.G,qt.prototype.getUnits=qt.prototype.Un,qt.prototype.getMetersPerUnit=qt.prototype.sc,qt.prototype.getWorldExtent=qt.prototype.tl,qt.prototype.isGlobal=qt.prototype.dm,qt.prototype.setGlobal=qt.prototype.$p,qt.prototype.setExtent=qt.prototype.Vn,qt.prototype.setWorldExtent=qt.prototype.kq,qt.prototype.setGetPointResolution=qt.prototype.Zp,t("ol.proj.Units.METERS_PER_UNIT",Yt),t("ol.layer.Base",ls),ls.prototype.getExtent=ls.prototype.G,ls.prototype.getMaxResolution=ls.prototype.fc,ls.prototype.getMinResolution=ls.prototype.gc,ls.prototype.getOpacity=ls.prototype.hc,ls.prototype.getVisible=ls.prototype.Mb,ls.prototype.getZIndex=ls.prototype.Ba,ls.prototype.setExtent=ls.prototype.vc,ls.prototype.setMaxResolution=ls.prototype.Ac,ls.prototype.setMinResolution=ls.prototype.Bc,ls.prototype.setOpacity=ls.prototype.wc,ls.prototype.setVisible=ls.prototype.xc,ls.prototype.setZIndex=ls.prototype.Vb,t("ol.layer.Group",cs),cs.prototype.getLayers=cs.prototype.qd,cs.prototype.setLayers=cs.prototype.xi,t("ol.layer.Heatmap",p),p.prototype.getBlur=p.prototype.uh,p.prototype.getGradient=p.prototype.Bh,p.prototype.getRadius=p.prototype.yi,p.prototype.setBlur=p.prototype.jj,p.prototype.setGradient=p.prototype.pj,p.prototype.setRadius=p.prototype.Uc,t("ol.layer.Image",pm),pm.prototype.getSource=pm.prototype.ha,t("ol.layer.Layer",ys),ys.prototype.getSource=ys.prototype.ha,ys.prototype.setSource=ys.prototype.Wc,t("ol.layer.Tile",A),A.prototype.getPreload=A.prototype.Ud,A.prototype.getSource=A.prototype.ha,A.prototype.setPreload=A.prototype.zi,A.prototype.getUseInterimTilesOnError=A.prototype.kd,A.prototype.setUseInterimTilesOnError=A.prototype.Ai,t("ol.layer.Vector",s),s.prototype.getSource=s.prototype.ha,s.prototype.getStyle=s.prototype.D,s.prototype.getStyleFunction=s.prototype.C,s.prototype.setStyle=s.prototype.g,t("ol.layer.VectorTile",E),E.prototype.getPreload=E.prototype.Ud,E.prototype.getUseInterimTilesOnError=E.prototype.kd,E.prototype.setPreload=E.prototype.Bi,E.prototype.setUseInterimTilesOnError=E.prototype.Ci,t("ol.interaction.DoubleClickZoom",cn),t("ol.interaction.DoubleClickZoom.handleEvent",fn),t("ol.interaction.DragAndDrop",E0),t("ol.interaction.DragAndDrop.handleEvent",cr),t("ol.interaction.DragBox",On),On.prototype.getGeometry=On.prototype.V,t("ol.interaction.DragPan",En),t("ol.interaction.DragRotate",Ln),t("ol.interaction.DragRotateAndZoom",N0),t("ol.interaction.DragZoom",zn),t("ol.interaction.Draw",Uv),t("ol.interaction.Draw.handleEvent",Gv),Uv.prototype.removeLastPoint=Uv.prototype.Op,Uv.prototype.finishDrawing=Uv.prototype.Pd,Uv.prototype.extend=Uv.prototype.vn,t("ol.interaction.Draw.createRegularPolygon",function(r,n){return function(t,e){var o=t[0],i=(t=t[1],Math.sqrt(pr(o,t)));return Jr(e=e||qr(new h0(o),r),o,i,n||Math.atan((t[1]-o[1])/(t[0]-o[0]))),e}}),t("ol.interaction.Draw.createBox",function(){return function(t,e){return t=ht(t),(e=e||new w(null)).ma([[jt(t),Ct(t),kt(t),Ft(t),jt(t)]]),e}}),t("ol.interaction.Extent",Qv),Qv.prototype.getExtent=Qv.prototype.G,Qv.prototype.setExtent=Qv.prototype.g,pb.prototype.extent_=pb.prototype.b,t("ol.interaction.Interaction",pn),pn.prototype.getActive=pn.prototype.c,pn.prototype.getMap=pn.prototype.f,pn.prototype.setActive=pn.prototype.Ha,t("ol.interaction.KeyboardPan",Yn),t("ol.interaction.KeyboardPan.handleEvent",Hn),t("ol.interaction.KeyboardZoom",qn),t("ol.interaction.KeyboardZoom.handleEvent",Jn),t("ol.interaction.Modify",lb),t("ol.interaction.Modify.handleEvent",bb),lb.prototype.removePoint=lb.prototype.hj,t("ol.interaction.MouseWheelZoom",_n),t("ol.interaction.MouseWheelZoom.handleEvent",$n),_n.prototype.setMouseAnchor=_n.prototype.T,t("ol.interaction.PinchRotate",es),t("ol.interaction.PinchZoom",ns),t("ol.interaction.Pointer",Mn),t("ol.interaction.Pointer.handleEvent",An),t("ol.interaction.Select",Pb),Pb.prototype.getFeatures=Pb.prototype.Gn,Pb.prototype.getHitTolerance=Pb.prototype.Hn,Pb.prototype.getLayer=Pb.prototype.In,t("ol.interaction.Select.handleEvent",Ab),Pb.prototype.setHitTolerance=Pb.prototype.Kn,t("ol.interaction.Snap",jb),jb.prototype.addFeature=jb.prototype.yb,jb.prototype.removeFeature=jb.prototype.Gb,t("ol.interaction.Translate",Ib),Ib.prototype.getHitTolerance=Ib.prototype.B,Ib.prototype.setHitTolerance=Ib.prototype.I,t("ol.geom.Circle",h0),h0.prototype.getCenter=h0.prototype.wa,h0.prototype.getRadius=h0.prototype.pd,h0.prototype.getType=h0.prototype.U,h0.prototype.intersectsExtent=h0.prototype.Xa,h0.prototype.setCenter=h0.prototype.ob,h0.prototype.setCenterAndRadius=h0.prototype.Ng,h0.prototype.setRadius=h0.prototype.Uc,h0.prototype.transform=h0.prototype.tb,t("ol.geom.Geometry",yr),yr.prototype.getClosestPoint=yr.prototype.Ab,yr.prototype.intersectsCoordinate=yr.prototype.sb,yr.prototype.getExtent=yr.prototype.G,yr.prototype.simplify=yr.prototype.Rb,yr.prototype.transform=yr.prototype.tb,t("ol.geom.GeometryCollection",uu),uu.prototype.getGeometries=uu.prototype.Vf,uu.prototype.getType=uu.prototype.U,uu.prototype.intersectsExtent=uu.prototype.Xa,uu.prototype.setGeometries=uu.prototype.oj,uu.prototype.applyTransform=uu.prototype.Dc,t("ol.geom.LinearRing",Fr),Fr.prototype.getArea=Fr.prototype.qn,Fr.prototype.getCoordinates=Fr.prototype.X,Fr.prototype.getType=Fr.prototype.U,Fr.prototype.setCoordinates=Fr.prototype.ma,t("ol.geom.LineString",S),S.prototype.appendCoordinate=S.prototype.mk,S.prototype.forEachSegment=S.prototype.Ck,S.prototype.getCoordinateAtM=S.prototype.nn,S.prototype.getCoordinates=S.prototype.X,S.prototype.getCoordinateAt=S.prototype.wh,S.prototype.getLength=S.prototype.pn,S.prototype.getType=S.prototype.U,S.prototype.intersectsExtent=S.prototype.Xa,S.prototype.setCoordinates=S.prototype.ma,t("ol.geom.MultiLineString",M),M.prototype.appendLineString=M.prototype.nk,M.prototype.getCoordinateAtM=M.prototype.rn,M.prototype.getCoordinates=M.prototype.X,M.prototype.getLineString=M.prototype.Yk,M.prototype.getLineStrings=M.prototype.gd,M.prototype.getType=M.prototype.U,M.prototype.intersectsExtent=M.prototype.Xa,M.prototype.setCoordinates=M.prototype.ma,t("ol.geom.MultiPoint",P),P.prototype.appendPoint=P.prototype.qk,P.prototype.getCoordinates=P.prototype.X,P.prototype.getPoint=P.prototype.il,P.prototype.getPoints=P.prototype.Zd,P.prototype.getType=P.prototype.U,P.prototype.intersectsExtent=P.prototype.Xa,P.prototype.setCoordinates=P.prototype.ma,t("ol.geom.MultiPolygon",f),f.prototype.appendPolygon=f.prototype.rk,f.prototype.getArea=f.prototype.sn,f.prototype.getCoordinates=f.prototype.X,f.prototype.getInteriorPoints=f.prototype.Uk,f.prototype.getPolygon=f.prototype.jl,f.prototype.getPolygons=f.prototype.Td,f.prototype.getType=f.prototype.U,f.prototype.intersectsExtent=f.prototype.Xa,f.prototype.setCoordinates=f.prototype.ma,t("ol.geom.Point",m),m.prototype.getCoordinates=m.prototype.X,m.prototype.getType=m.prototype.U,m.prototype.intersectsExtent=m.prototype.Xa,m.prototype.setCoordinates=m.prototype.ma,t("ol.geom.Polygon",w),w.prototype.appendLinearRing=w.prototype.pk,w.prototype.getArea=w.prototype.tn,w.prototype.getCoordinates=w.prototype.X,w.prototype.getInteriorPoint=w.prototype.Tk,w.prototype.getLinearRingCount=w.prototype.Zk,w.prototype.getLinearRing=w.prototype.Ch,w.prototype.getLinearRings=w.prototype.Sd,w.prototype.getType=w.prototype.U,w.prototype.intersectsExtent=w.prototype.Xa,w.prototype.setCoordinates=w.prototype.ma,t("ol.geom.Polygon.circular",Yr),t("ol.geom.Polygon.fromExtent",Hr),t("ol.geom.Polygon.fromCircle",qr),t("ol.geom.SimpleGeometry",b),b.prototype.getFirstCoordinate=b.prototype.ac,b.prototype.getLastCoordinate=b.prototype.bc,b.prototype.getLayout=b.prototype.cc,b.prototype.applyTransform=b.prototype.Dc,t("ol.format.EsriJSON",kl),kl.prototype.readFeature=kl.prototype.Tb,kl.prototype.readFeatures=kl.prototype.Oa,kl.prototype.readGeometry=kl.prototype.Sc,kl.prototype.readProjection=kl.prototype.kb,kl.prototype.writeGeometry=kl.prototype.$c,kl.prototype.writeGeometryObject=kl.prototype.je,kl.prototype.writeFeature=kl.prototype.Bd,kl.prototype.writeFeatureObject=kl.prototype.Zc,kl.prototype.writeFeatures=kl.prototype.Wb,kl.prototype.writeFeaturesObject=kl.prototype.he,t("ol.format.Feature",wl),t("ol.format.filter.and",hu),t("ol.format.filter.or",function(t){var e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(au,e))}),t("ol.format.filter.not",function(t){return new nu(t)}),t("ol.format.filter.bbox",lu),t("ol.format.filter.intersects",function(t,e,o){return new Ql(t,e,o)}),t("ol.format.filter.within",function(t,e,o){return new pu(t,e,o)}),t("ol.format.filter.equalTo",function(t,e,o){return new ql(t,e,o)}),t("ol.format.filter.notEqualTo",function(t,e,o){return new su(t,e,o)}),t("ol.format.filter.lessThan",function(t,e){return new iu(t,e)}),t("ol.format.filter.lessThanOrEqualTo",function(t,e){return new ru(t,e)}),t("ol.format.filter.greaterThan",function(t,e){return new Jl(t,e)}),t("ol.format.filter.greaterThanOrEqualTo",function(t,e){return new _l(t,e)}),t("ol.format.filter.isNull",function(t){return new ou(t)}),t("ol.format.filter.between",function(t,e,o){return new tu(t,e,o)}),t("ol.format.filter.like",function(t,e,o,i,r,n){return new eu(t,e,o,i,r,n)}),t("ol.format.filter.during",function(t,e,o){return new Yl(t,e,o)}),t("ol.format.GeoJSON",gu),gu.prototype.readFeature=gu.prototype.Tb,gu.prototype.readFeatures=gu.prototype.Oa,gu.prototype.readGeometry=gu.prototype.Sc,gu.prototype.readProjection=gu.prototype.kb,gu.prototype.writeFeature=gu.prototype.Bd,gu.prototype.writeFeatureObject=gu.prototype.Zc,gu.prototype.writeFeatures=gu.prototype.Wb,gu.prototype.writeFeaturesObject=gu.prototype.he,gu.prototype.writeGeometry=gu.prototype.$c,gu.prototype.writeGeometryObject=gu.prototype.je,t("ol.format.GML",y),y.prototype.writeFeatures=y.prototype.Wb,y.prototype.writeFeaturesNode=y.prototype.Xb,t("ol.format.GML2",Zu),t("ol.format.GML3",y),y.prototype.writeGeometryNode=y.prototype.ie,y.prototype.writeFeatures=y.prototype.Wb,y.prototype.writeFeaturesNode=y.prototype.Xb,Mu.prototype.readFeatures=Mu.prototype.Oa,t("ol.format.GPX",ec),ec.prototype.readFeature=ec.prototype.Tb,ec.prototype.readFeatures=ec.prototype.Oa,ec.prototype.readProjection=ec.prototype.kb,ec.prototype.writeFeatures=ec.prototype.Wb,ec.prototype.writeFeaturesNode=ec.prototype.Xb,t("ol.format.IGC",Uc),Uc.prototype.readFeature=Uc.prototype.Tb,Uc.prototype.readFeatures=Uc.prototype.Oa,Uc.prototype.readProjection=Uc.prototype.kb,t("ol.format.KML",hf),hf.prototype.readFeature=hf.prototype.Tb,hf.prototype.readFeatures=hf.prototype.Oa,hf.prototype.readName=hf.prototype.Cp,hf.prototype.readNetworkLinks=hf.prototype.Dp,hf.prototype.readRegion=hf.prototype.Gp,hf.prototype.readRegionFromNode=hf.prototype.lf,hf.prototype.readProjection=hf.prototype.kb,hf.prototype.writeFeatures=hf.prototype.Wb,hf.prototype.writeFeaturesNode=hf.prototype.Xb,t("ol.format.MVT",ag),ag.prototype.readFeatures=ag.prototype.Oa,ag.prototype.readProjection=ag.prototype.kb,ag.prototype.setLayers=ag.prototype.mn,t("ol.format.OSMXML",hg),hg.prototype.readFeatures=hg.prototype.Oa,hg.prototype.readProjection=hg.prototype.kb,t("ol.format.Polyline",Ig),t("ol.format.Polyline.encodeDeltas",Ng),t("ol.format.Polyline.decodeDeltas",Fg),t("ol.format.Polyline.encodeFloats",kg),t("ol.format.Polyline.decodeFloats",Dg),Ig.prototype.readFeature=Ig.prototype.Tb,Ig.prototype.readFeatures=Ig.prototype.Oa,Ig.prototype.readGeometry=Ig.prototype.Sc,Ig.prototype.readProjection=Ig.prototype.kb,Ig.prototype.writeGeometry=Ig.prototype.$c,t("ol.format.TopoJSON",Og),Og.prototype.readFeatures=Og.prototype.Oa,Og.prototype.readProjection=Og.prototype.kb,t("ol.format.WFS",Vg),Vg.prototype.readFeatures=Vg.prototype.Oa,Vg.prototype.readTransactionResponse=Vg.prototype.j,Vg.prototype.readFeatureCollectionMetadata=Vg.prototype.g,t("ol.format.WFS.writeFilter",function(t){var e=ol("http://www.opengis.net/ogc","Filter");return vl({node:e},pd,cl(t.kc),[t],[]),e}),Vg.prototype.writeGetFeature=Vg.prototype.l,Vg.prototype.writeTransaction=Vg.prototype.v,Vg.prototype.readProjection=Vg.prototype.kb,t("ol.format.WKT",hd),hd.prototype.readFeature=hd.prototype.Tb,hd.prototype.readFeatures=hd.prototype.Oa,hd.prototype.readGeometry=hd.prototype.Sc,hd.prototype.writeFeature=hd.prototype.Bd,hd.prototype.writeFeatures=hd.prototype.Wb,hd.prototype.writeGeometry=hd.prototype.$c,t("ol.format.WMSCapabilities",Ed),t("ol.format.WMSGetFeatureInfo",Hd),Hd.prototype.readFeatures=Hd.prototype.Oa,t("ol.format.WMTSCapabilities",qd),t("ol.format.filter.And",Zl),t("ol.format.filter.Bbox",Kl),t("ol.format.filter.Comparison",zl),t("ol.format.filter.ComparisonBinary",Hl),t("ol.format.filter.During",Yl),t("ol.format.filter.EqualTo",ql),t("ol.format.filter.Filter",Vl),t("ol.format.filter.GreaterThan",Jl),t("ol.format.filter.GreaterThanOrEqualTo",_l),t("ol.format.filter.Intersects",Ql),t("ol.format.filter.IsBetween",tu),t("ol.format.filter.IsLike",eu),t("ol.format.filter.IsNull",ou),t("ol.format.filter.LessThan",iu),t("ol.format.filter.LessThanOrEqualTo",ru),t("ol.format.filter.Not",nu),t("ol.format.filter.NotEqualTo",su),t("ol.format.filter.Or",au),t("ol.format.filter.Spatial",$l),t("ol.format.filter.Within",pu),t("ol.events.condition.altKeyOnly",function(t){return(t=t.originalEvent).altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey}),t("ol.events.condition.altShiftKeysOnly",yn),t("ol.events.condition.always",cr),t("ol.events.condition.click",function(t){return"click"==t.type}),t("ol.events.condition.never",fr),t("ol.events.condition.pointerMove",dn),t("ol.events.condition.singleClick",vn),t("ol.events.condition.doubleClick",function(t){return"dblclick"==t.type}),t("ol.events.condition.noModifierKeys",bn),t("ol.events.condition.platformModifierKeyOnly",function(t){return!(t=t.originalEvent).altKey&&(ri?t.metaKey:t.ctrlKey)&&!t.shiftKey}),t("ol.events.condition.shiftKeyOnly",mn),t("ol.events.condition.targetNotEditable",wn),t("ol.events.condition.mouseOnly",xn),t("ol.events.condition.primaryAction",Sn),t("ol.control.Attribution",jo),t("ol.control.Attribution.render",Co),jo.prototype.getCollapsible=jo.prototype.Um,jo.prototype.setCollapsible=jo.prototype.Xm,jo.prototype.setCollapsed=jo.prototype.Wm,jo.prototype.getCollapsed=jo.prototype.Tm,t("ol.control.Control",To),To.prototype.getMap=To.prototype.g,To.prototype.setTarget=To.prototype.f,t("ol.control.FullScreen",Go),t("ol.control.MousePosition",Ko),t("ol.control.MousePosition.render",zo),Ko.prototype.getCoordinateFormat=Ko.prototype.xh,Ko.prototype.getProjection=Ko.prototype.Zh,Ko.prototype.setCoordinateFormat=Ko.prototype.kj,Ko.prototype.setProjection=Ko.prototype.$h,t("ol.control.OverviewMap",Sh),t("ol.control.OverviewMap.render",Mh),Sh.prototype.getCollapsible=Sh.prototype.$m,Sh.prototype.setCollapsible=Sh.prototype.cn,Sh.prototype.setCollapsed=Sh.prototype.bn,Sh.prototype.getCollapsed=Sh.prototype.Zm,Sh.prototype.getOverviewMap=Sh.prototype.gl,t("ol.control.Rotate",ko),t("ol.control.Rotate.render",Do),t("ol.control.ScaleLine",Th),Th.prototype.getUnits=Th.prototype.C,t("ol.control.ScaleLine.render",Ch),Th.prototype.setUnits=Th.prototype.I,t("ol.control.Zoom",Oo),t("ol.control.ZoomSlider",Ih),t("ol.control.ZoomSlider.render",Fh),t("ol.control.ZoomToExtent",Oh),ro.prototype.changed=ro.prototype.s,ro.prototype.dispatchEvent=ro.prototype.b,ro.prototype.getRevision=ro.prototype.L,ro.prototype.on=ro.prototype.J,ro.prototype.un=ro.prototype.K,ho.prototype.getKeys=ho.prototype.O,ho.prototype.getProperties=ho.prototype.N,ho.prototype.setProperties=ho.prototype.H,ho.prototype.unset=ho.prototype.P,ho.prototype.changed=ho.prototype.s,ho.prototype.dispatchEvent=ho.prototype.b,ho.prototype.getRevision=ho.prototype.L,ho.prototype.on=ho.prototype.J,ho.prototype.un=ho.prototype.K,Uh.prototype.getKeys=Uh.prototype.O,Uh.prototype.getProperties=Uh.prototype.N,Uh.prototype.setProperties=Uh.prototype.H,Uh.prototype.unset=Uh.prototype.P,Uh.prototype.changed=Uh.prototype.s,Uh.prototype.dispatchEvent=Uh.prototype.b,Uh.prototype.getRevision=Uh.prototype.L,Uh.prototype.on=Uh.prototype.J,Uh.prototype.un=Uh.prototype.K,x.prototype.getKeys=x.prototype.O,x.prototype.getProperties=x.prototype.N,x.prototype.setProperties=x.prototype.H,x.prototype.unset=x.prototype.P,x.prototype.changed=x.prototype.s,x.prototype.dispatchEvent=x.prototype.b,x.prototype.getRevision=x.prototype.L,x.prototype.on=x.prototype.J,x.prototype.un=x.prototype.K,p0.prototype.getKeys=p0.prototype.O,p0.prototype.getProperties=p0.prototype.N,p0.prototype.setProperties=p0.prototype.H,p0.prototype.unset=p0.prototype.P,p0.prototype.changed=p0.prototype.s,p0.prototype.dispatchEvent=p0.prototype.b,p0.prototype.getRevision=p0.prototype.L,p0.prototype.on=p0.prototype.J,p0.prototype.un=p0.prototype.K,M0.prototype.getTileCoord=M0.prototype.f,u.prototype.getKeys=u.prototype.O,u.prototype.getProperties=u.prototype.N,u.prototype.setProperties=u.prototype.H,u.prototype.unset=u.prototype.P,u.prototype.changed=u.prototype.s,u.prototype.dispatchEvent=u.prototype.b,u.prototype.getRevision=u.prototype.L,u.prototype.on=u.prototype.J,u.prototype.un=u.prototype.K,fh.prototype.getKeys=fh.prototype.O,fh.prototype.getProperties=fh.prototype.N,fh.prototype.setProperties=fh.prototype.H,fh.prototype.unset=fh.prototype.P,fh.prototype.changed=fh.prototype.s,fh.prototype.dispatchEvent=fh.prototype.b,fh.prototype.getRevision=fh.prototype.L,fh.prototype.on=fh.prototype.J,fh.prototype.un=fh.prototype.K,S1.prototype.getTileCoord=S1.prototype.f,P1.prototype.getTileCoord=P1.prototype.f,h.prototype.getKeys=h.prototype.O,h.prototype.getProperties=h.prototype.N,h.prototype.setProperties=h.prototype.H,h.prototype.unset=h.prototype.P,h.prototype.changed=h.prototype.s,h.prototype.dispatchEvent=h.prototype.b,h.prototype.getRevision=h.prototype.L,h.prototype.on=h.prototype.J,h.prototype.un=h.prototype.K,E1.prototype.forEachTileCoord=E1.prototype.Rf,E1.prototype.getMaxZoom=E1.prototype.Ti,E1.prototype.getMinZoom=E1.prototype.Ui,E1.prototype.getOrigin=E1.prototype.Pc,E1.prototype.getResolution=E1.prototype.Da,E1.prototype.getResolutions=E1.prototype.Vi,E1.prototype.getTileCoordExtent=E1.prototype.Aa,E1.prototype.getTileCoordForCoordAndResolution=E1.prototype.Be,E1.prototype.getTileCoordForCoordAndZ=E1.prototype.bg,E1.prototype.getTileSize=E1.prototype.gb,E1.prototype.getZForResolution=E1.prototype.tc,Kh.prototype.getOpacity=Kh.prototype.Ze,Kh.prototype.getRotateWithView=Kh.prototype.$e,Kh.prototype.getRotation=Kh.prototype.af,Kh.prototype.getScale=Kh.prototype.bf,Kh.prototype.getSnapToPixel=Kh.prototype.Ae,Kh.prototype.setOpacity=Kh.prototype.td,Kh.prototype.setRotation=Kh.prototype.cf,Kh.prototype.setScale=Kh.prototype.ud,Yh.prototype.getAngle=Yh.prototype.Pi,Yh.prototype.getFill=Yh.prototype.Fa,Yh.prototype.getPoints=Yh.prototype.Qi,Yh.prototype.getRadius=Yh.prototype.Ri,Yh.prototype.getRadius2=Yh.prototype.Fh,Yh.prototype.getStroke=Yh.prototype.Ga,Yh.prototype.getOpacity=Yh.prototype.Ze,Yh.prototype.getRotateWithView=Yh.prototype.$e,Yh.prototype.getRotation=Yh.prototype.af,Yh.prototype.getScale=Yh.prototype.bf,Yh.prototype.getSnapToPixel=Yh.prototype.Ae,Yh.prototype.setOpacity=Yh.prototype.td,Yh.prototype.setRotation=Yh.prototype.cf,Yh.prototype.setScale=Yh.prototype.ud,af.prototype.getOpacity=af.prototype.Ze,af.prototype.getRotateWithView=af.prototype.$e,af.prototype.getRotation=af.prototype.af,af.prototype.getScale=af.prototype.bf,af.prototype.getSnapToPixel=af.prototype.Ae,af.prototype.setOpacity=af.prototype.td,af.prototype.setRotation=af.prototype.cf,af.prototype.setScale=af.prototype.ud,Lv.prototype.getKeys=Lv.prototype.O,Lv.prototype.getProperties=Lv.prototype.N,Lv.prototype.setProperties=Lv.prototype.H,Lv.prototype.unset=Lv.prototype.P,Lv.prototype.changed=Lv.prototype.s,Lv.prototype.dispatchEvent=Lv.prototype.b,Lv.prototype.getRevision=Lv.prototype.L,Lv.prototype.on=Lv.prototype.J,Lv.prototype.un=Lv.prototype.K,jm.prototype.getAttributions=jm.prototype.ya,jm.prototype.getLogo=jm.prototype.xa,jm.prototype.getProjection=jm.prototype.za,jm.prototype.refresh=jm.prototype.sa,jm.prototype.setAttributions=jm.prototype.ua,jm.prototype.getKeys=jm.prototype.O,jm.prototype.getProperties=jm.prototype.N,jm.prototype.setProperties=jm.prototype.H,jm.prototype.unset=jm.prototype.P,jm.prototype.changed=jm.prototype.s,jm.prototype.dispatchEvent=jm.prototype.b,jm.prototype.getRevision=jm.prototype.L,jm.prototype.on=jm.prototype.J,jm.prototype.un=jm.prototype.K,Nm.prototype.getTileGrid=Nm.prototype.ab,Nm.prototype.refresh=Nm.prototype.sa,Nm.prototype.getAttributions=Nm.prototype.ya,Nm.prototype.getLogo=Nm.prototype.xa,Nm.prototype.getProjection=Nm.prototype.za,Nm.prototype.setAttributions=Nm.prototype.ua,Nm.prototype.getKeys=Nm.prototype.O,Nm.prototype.getProperties=Nm.prototype.N,Nm.prototype.setProperties=Nm.prototype.H,Nm.prototype.unset=Nm.prototype.P,Nm.prototype.changed=Nm.prototype.s,Nm.prototype.dispatchEvent=Nm.prototype.b,Nm.prototype.getRevision=Nm.prototype.L,Nm.prototype.on=Nm.prototype.J,Nm.prototype.un=Nm.prototype.K,T.prototype.getTileLoadFunction=T.prototype.pb,T.prototype.getTileUrlFunction=T.prototype.qb,T.prototype.getUrls=T.prototype.rb,T.prototype.setTileLoadFunction=T.prototype.vb,T.prototype.setTileUrlFunction=T.prototype.cb,T.prototype.setUrl=T.prototype.jb,T.prototype.setUrls=T.prototype.eb,T.prototype.getTileGrid=T.prototype.ab,T.prototype.refresh=T.prototype.sa,T.prototype.getAttributions=T.prototype.ya,T.prototype.getLogo=T.prototype.xa,T.prototype.getProjection=T.prototype.za,T.prototype.setAttributions=T.prototype.ua,T.prototype.getKeys=T.prototype.O,T.prototype.getProperties=T.prototype.N,T.prototype.setProperties=T.prototype.H,T.prototype.unset=T.prototype.P,T.prototype.changed=T.prototype.s,T.prototype.dispatchEvent=T.prototype.b,T.prototype.getRevision=T.prototype.L,T.prototype.on=T.prototype.J,T.prototype.un=T.prototype.K,j.prototype.setRenderReprojectionEdges=j.prototype.Pb,j.prototype.setTileGridForProjection=j.prototype.Qb,j.prototype.getTileLoadFunction=j.prototype.pb,j.prototype.getTileUrlFunction=j.prototype.qb,j.prototype.getUrls=j.prototype.rb,j.prototype.setTileLoadFunction=j.prototype.vb,j.prototype.setTileUrlFunction=j.prototype.cb,j.prototype.setUrl=j.prototype.jb,j.prototype.setUrls=j.prototype.eb,j.prototype.getTileGrid=j.prototype.ab,j.prototype.refresh=j.prototype.sa,j.prototype.getAttributions=j.prototype.ya,j.prototype.getLogo=j.prototype.xa,j.prototype.getProjection=j.prototype.za,j.prototype.setAttributions=j.prototype.ua,j.prototype.getKeys=j.prototype.O,j.prototype.getProperties=j.prototype.N,j.prototype.setProperties=j.prototype.H,j.prototype.unset=j.prototype.P,j.prototype.changed=j.prototype.s,j.prototype.dispatchEvent=j.prototype.b,j.prototype.getRevision=j.prototype.L,j.prototype.on=j.prototype.J,j.prototype.un=j.prototype.K,Um.prototype.setRenderReprojectionEdges=Um.prototype.Pb,Um.prototype.setTileGridForProjection=Um.prototype.Qb,Um.prototype.getTileLoadFunction=Um.prototype.pb,Um.prototype.getTileUrlFunction=Um.prototype.qb,Um.prototype.getUrls=Um.prototype.rb,Um.prototype.setTileLoadFunction=Um.prototype.vb,Um.prototype.setTileUrlFunction=Um.prototype.cb,Um.prototype.setUrl=Um.prototype.jb,Um.prototype.setUrls=Um.prototype.eb,Um.prototype.getTileGrid=Um.prototype.ab,Um.prototype.refresh=Um.prototype.sa,Um.prototype.getAttributions=Um.prototype.ya,Um.prototype.getLogo=Um.prototype.xa,Um.prototype.getProjection=Um.prototype.za,Um.prototype.setAttributions=Um.prototype.ua,Um.prototype.getKeys=Um.prototype.O,Um.prototype.getProperties=Um.prototype.N,Um.prototype.setProperties=Um.prototype.H,Um.prototype.unset=Um.prototype.P,Um.prototype.changed=Um.prototype.s,Um.prototype.dispatchEvent=Um.prototype.b,Um.prototype.getRevision=Um.prototype.L,Um.prototype.on=Um.prototype.J,Um.prototype.un=Um.prototype.K,C.prototype.setRenderReprojectionEdges=C.prototype.Pb,C.prototype.setTileGridForProjection=C.prototype.Qb,C.prototype.getTileLoadFunction=C.prototype.pb,C.prototype.getTileUrlFunction=C.prototype.qb,C.prototype.getUrls=C.prototype.rb,C.prototype.setTileLoadFunction=C.prototype.vb,C.prototype.setTileUrlFunction=C.prototype.cb,C.prototype.setUrl=C.prototype.jb,C.prototype.setUrls=C.prototype.eb,C.prototype.getTileGrid=C.prototype.ab,C.prototype.refresh=C.prototype.sa,C.prototype.getAttributions=C.prototype.ya,C.prototype.getLogo=C.prototype.xa,C.prototype.getProjection=C.prototype.za,C.prototype.setAttributions=C.prototype.ua,C.prototype.getKeys=C.prototype.O,C.prototype.getProperties=C.prototype.N,C.prototype.setProperties=C.prototype.H,C.prototype.unset=C.prototype.P,C.prototype.changed=C.prototype.s,C.prototype.dispatchEvent=C.prototype.b,C.prototype.getRevision=C.prototype.L,C.prototype.on=C.prototype.J,C.prototype.un=C.prototype.K,a.prototype.getAttributions=a.prototype.ya,a.prototype.getLogo=a.prototype.xa,a.prototype.getProjection=a.prototype.za,a.prototype.refresh=a.prototype.sa,a.prototype.setAttributions=a.prototype.ua,a.prototype.getKeys=a.prototype.O,a.prototype.getProperties=a.prototype.N,a.prototype.setProperties=a.prototype.H,a.prototype.unset=a.prototype.P,a.prototype.changed=a.prototype.s,a.prototype.dispatchEvent=a.prototype.b,a.prototype.getRevision=a.prototype.L,a.prototype.on=a.prototype.J,a.prototype.un=a.prototype.K,L.prototype.addFeature=L.prototype.yb,L.prototype.addFeatures=L.prototype.cd,L.prototype.forEachFeature=L.prototype.sh,L.prototype.forEachFeatureInExtent=L.prototype.$b,L.prototype.forEachFeatureIntersectingExtent=L.prototype.th,L.prototype.getFeaturesCollection=L.prototype.Ah,L.prototype.getFeatures=L.prototype.Xe,L.prototype.getFeaturesAtCoordinate=L.prototype.zh,L.prototype.getFeaturesInExtent=L.prototype.Uf,L.prototype.getClosestFeatureToCoordinate=L.prototype.vh,L.prototype.getExtent=L.prototype.G,L.prototype.getFeatureById=L.prototype.yh,L.prototype.getFormat=L.prototype.Mi,L.prototype.getUrl=L.prototype.Ni,L.prototype.removeFeature=L.prototype.Gb,L.prototype.getAttributions=L.prototype.ya,L.prototype.getLogo=L.prototype.xa,L.prototype.getProjection=L.prototype.za,L.prototype.refresh=L.prototype.sa,L.prototype.setAttributions=L.prototype.ua,L.prototype.getKeys=L.prototype.O,L.prototype.getProperties=L.prototype.N,L.prototype.setProperties=L.prototype.H,L.prototype.unset=L.prototype.P,L.prototype.changed=L.prototype.s,L.prototype.dispatchEvent=L.prototype.b,L.prototype.getRevision=L.prototype.L,L.prototype.on=L.prototype.J,L.prototype.un=L.prototype.K,$b.prototype.getAttributions=$b.prototype.ya,$b.prototype.getLogo=$b.prototype.xa,$b.prototype.getProjection=$b.prototype.za,$b.prototype.refresh=$b.prototype.sa,$b.prototype.setAttributions=$b.prototype.ua,$b.prototype.getKeys=$b.prototype.O,$b.prototype.getProperties=$b.prototype.N,$b.prototype.setProperties=$b.prototype.H,$b.prototype.unset=$b.prototype.P,$b.prototype.changed=$b.prototype.s,$b.prototype.dispatchEvent=$b.prototype.b,$b.prototype.getRevision=$b.prototype.L,$b.prototype.on=$b.prototype.J,$b.prototype.un=$b.prototype.K,Wm.prototype.getAttributions=Wm.prototype.ya,Wm.prototype.getLogo=Wm.prototype.xa,Wm.prototype.getProjection=Wm.prototype.za,Wm.prototype.refresh=Wm.prototype.sa,Wm.prototype.setAttributions=Wm.prototype.ua,Wm.prototype.getKeys=Wm.prototype.O,Wm.prototype.getProperties=Wm.prototype.N,Wm.prototype.setProperties=Wm.prototype.H,Wm.prototype.unset=Wm.prototype.P,Wm.prototype.changed=Wm.prototype.s,Wm.prototype.dispatchEvent=Wm.prototype.b,Wm.prototype.getRevision=Wm.prototype.L,Wm.prototype.on=Wm.prototype.J,Wm.prototype.un=Wm.prototype.K,nm.prototype.getAttributions=nm.prototype.ya,nm.prototype.getLogo=nm.prototype.xa,nm.prototype.getProjection=nm.prototype.za,nm.prototype.refresh=nm.prototype.sa,nm.prototype.setAttributions=nm.prototype.ua,nm.prototype.getKeys=nm.prototype.O,nm.prototype.getProperties=nm.prototype.N,nm.prototype.setProperties=nm.prototype.H,nm.prototype.unset=nm.prototype.P,nm.prototype.changed=nm.prototype.s,nm.prototype.dispatchEvent=nm.prototype.b,nm.prototype.getRevision=nm.prototype.L,nm.prototype.on=nm.prototype.J,nm.prototype.un=nm.prototype.K,Zm.prototype.getAttributions=Zm.prototype.ya,Zm.prototype.getLogo=Zm.prototype.xa,Zm.prototype.getProjection=Zm.prototype.za,Zm.prototype.refresh=Zm.prototype.sa,Zm.prototype.setAttributions=Zm.prototype.ua,Zm.prototype.getKeys=Zm.prototype.O,Zm.prototype.getProperties=Zm.prototype.N,Zm.prototype.setProperties=Zm.prototype.H,Zm.prototype.unset=Zm.prototype.P,Zm.prototype.changed=Zm.prototype.s,Zm.prototype.dispatchEvent=Zm.prototype.b,Zm.prototype.getRevision=Zm.prototype.L,Zm.prototype.on=Zm.prototype.J,Zm.prototype.un=Zm.prototype.K,Km.prototype.getAttributions=Km.prototype.ya,Km.prototype.getLogo=Km.prototype.xa,Km.prototype.getProjection=Km.prototype.za,Km.prototype.refresh=Km.prototype.sa,Km.prototype.setAttributions=Km.prototype.ua,Km.prototype.getKeys=Km.prototype.O,Km.prototype.getProperties=Km.prototype.N,Km.prototype.setProperties=Km.prototype.H,Km.prototype.unset=Km.prototype.P,Km.prototype.changed=Km.prototype.s,Km.prototype.dispatchEvent=Km.prototype.b,Km.prototype.getRevision=Km.prototype.L,Km.prototype.on=Km.prototype.J,Km.prototype.un=Km.prototype.K,sm.prototype.getAttributions=sm.prototype.ya,sm.prototype.getLogo=sm.prototype.xa,sm.prototype.getProjection=sm.prototype.za,sm.prototype.refresh=sm.prototype.sa,sm.prototype.setAttributions=sm.prototype.ua,sm.prototype.getKeys=sm.prototype.O,sm.prototype.getProperties=sm.prototype.N,sm.prototype.setProperties=sm.prototype.H,sm.prototype.unset=sm.prototype.P,sm.prototype.changed=sm.prototype.s,sm.prototype.dispatchEvent=sm.prototype.b,sm.prototype.getRevision=sm.prototype.L,sm.prototype.on=sm.prototype.J,sm.prototype.un=sm.prototype.K,zm.prototype.getAttributions=zm.prototype.ya,zm.prototype.getLogo=zm.prototype.xa,zm.prototype.getProjection=zm.prototype.za,zm.prototype.refresh=zm.prototype.sa,zm.prototype.setAttributions=zm.prototype.ua,zm.prototype.getKeys=zm.prototype.O,zm.prototype.getProperties=zm.prototype.N,zm.prototype.setProperties=zm.prototype.H,zm.prototype.unset=zm.prototype.P,zm.prototype.changed=zm.prototype.s,zm.prototype.dispatchEvent=zm.prototype.b,zm.prototype.getRevision=zm.prototype.L,zm.prototype.on=zm.prototype.J,zm.prototype.un=zm.prototype.K,Jm.prototype.setRenderReprojectionEdges=Jm.prototype.Pb,Jm.prototype.setTileGridForProjection=Jm.prototype.Qb,Jm.prototype.getTileLoadFunction=Jm.prototype.pb,Jm.prototype.getTileUrlFunction=Jm.prototype.qb,Jm.prototype.getUrls=Jm.prototype.rb,Jm.prototype.setTileLoadFunction=Jm.prototype.vb,Jm.prototype.setTileUrlFunction=Jm.prototype.cb,Jm.prototype.setUrl=Jm.prototype.jb,Jm.prototype.setUrls=Jm.prototype.eb,Jm.prototype.getTileGrid=Jm.prototype.ab,Jm.prototype.refresh=Jm.prototype.sa,Jm.prototype.getAttributions=Jm.prototype.ya,Jm.prototype.getLogo=Jm.prototype.xa,Jm.prototype.getProjection=Jm.prototype.za,Jm.prototype.setAttributions=Jm.prototype.ua,Jm.prototype.getKeys=Jm.prototype.O,Jm.prototype.getProperties=Jm.prototype.N,Jm.prototype.setProperties=Jm.prototype.H,Jm.prototype.unset=Jm.prototype.P,Jm.prototype.changed=Jm.prototype.s,Jm.prototype.dispatchEvent=Jm.prototype.b,Jm.prototype.getRevision=Jm.prototype.L,Jm.prototype.on=Jm.prototype.J,Jm.prototype.un=Jm.prototype.K,o1.prototype.getAttributions=o1.prototype.ya,o1.prototype.getLogo=o1.prototype.xa,o1.prototype.getProjection=o1.prototype.za,o1.prototype.refresh=o1.prototype.sa,o1.prototype.setAttributions=o1.prototype.ua,o1.prototype.getKeys=o1.prototype.O,o1.prototype.getProperties=o1.prototype.N,o1.prototype.setProperties=o1.prototype.H,o1.prototype.unset=o1.prototype.P,o1.prototype.changed=o1.prototype.s,o1.prototype.dispatchEvent=o1.prototype.b,o1.prototype.getRevision=o1.prototype.L,o1.prototype.on=o1.prototype.J,o1.prototype.un=o1.prototype.K,a1.prototype.setRenderReprojectionEdges=a1.prototype.Pb,a1.prototype.setTileGridForProjection=a1.prototype.Qb,a1.prototype.getTileLoadFunction=a1.prototype.pb,a1.prototype.getTileUrlFunction=a1.prototype.qb,a1.prototype.getUrls=a1.prototype.rb,a1.prototype.setTileLoadFunction=a1.prototype.vb,a1.prototype.setTileUrlFunction=a1.prototype.cb,a1.prototype.setUrl=a1.prototype.jb,a1.prototype.setUrls=a1.prototype.eb,a1.prototype.getTileGrid=a1.prototype.ab,a1.prototype.refresh=a1.prototype.sa,a1.prototype.getAttributions=a1.prototype.ya,a1.prototype.getLogo=a1.prototype.xa,a1.prototype.getProjection=a1.prototype.za,a1.prototype.setAttributions=a1.prototype.ua,a1.prototype.getKeys=a1.prototype.O,a1.prototype.getProperties=a1.prototype.N,a1.prototype.setProperties=a1.prototype.H,a1.prototype.unset=a1.prototype.P,a1.prototype.changed=a1.prototype.s,a1.prototype.dispatchEvent=a1.prototype.b,a1.prototype.getRevision=a1.prototype.L,a1.prototype.on=a1.prototype.J,a1.prototype.un=a1.prototype.K,R.prototype.setRenderReprojectionEdges=R.prototype.Pb,R.prototype.setTileGridForProjection=R.prototype.Qb,R.prototype.getTileLoadFunction=R.prototype.pb,R.prototype.getTileUrlFunction=R.prototype.qb,R.prototype.getUrls=R.prototype.rb,R.prototype.setTileLoadFunction=R.prototype.vb,R.prototype.setTileUrlFunction=R.prototype.cb,R.prototype.setUrl=R.prototype.jb,R.prototype.setUrls=R.prototype.eb,R.prototype.getTileGrid=R.prototype.ab,R.prototype.refresh=R.prototype.sa,R.prototype.getAttributions=R.prototype.ya,R.prototype.getLogo=R.prototype.xa,R.prototype.getProjection=R.prototype.za,R.prototype.setAttributions=R.prototype.ua,R.prototype.getKeys=R.prototype.O,R.prototype.getProperties=R.prototype.N,R.prototype.setProperties=R.prototype.H,R.prototype.unset=R.prototype.P,R.prototype.changed=R.prototype.s,R.prototype.dispatchEvent=R.prototype.b,R.prototype.getRevision=R.prototype.L,R.prototype.on=R.prototype.J,R.prototype.un=R.prototype.K,c1.prototype.getTileGrid=c1.prototype.ab,c1.prototype.refresh=c1.prototype.sa,c1.prototype.getAttributions=c1.prototype.ya,c1.prototype.getLogo=c1.prototype.xa,c1.prototype.getProjection=c1.prototype.za,c1.prototype.setAttributions=c1.prototype.ua,c1.prototype.getKeys=c1.prototype.O,c1.prototype.getProperties=c1.prototype.N,c1.prototype.setProperties=c1.prototype.H,c1.prototype.unset=c1.prototype.P,c1.prototype.changed=c1.prototype.s,c1.prototype.dispatchEvent=c1.prototype.b,c1.prototype.getRevision=c1.prototype.L,c1.prototype.on=c1.prototype.J,c1.prototype.un=c1.prototype.K,y1.prototype.setRenderReprojectionEdges=y1.prototype.Pb,y1.prototype.setTileGridForProjection=y1.prototype.Qb,y1.prototype.getTileLoadFunction=y1.prototype.pb,y1.prototype.getTileUrlFunction=y1.prototype.qb,y1.prototype.getUrls=y1.prototype.rb,y1.prototype.setTileLoadFunction=y1.prototype.vb,y1.prototype.setTileUrlFunction=y1.prototype.cb,y1.prototype.setUrl=y1.prototype.jb,y1.prototype.setUrls=y1.prototype.eb,y1.prototype.getTileGrid=y1.prototype.ab,y1.prototype.refresh=y1.prototype.sa,y1.prototype.getAttributions=y1.prototype.ya,y1.prototype.getLogo=y1.prototype.xa,y1.prototype.getProjection=y1.prototype.za,y1.prototype.setAttributions=y1.prototype.ua,y1.prototype.getKeys=y1.prototype.O,y1.prototype.getProperties=y1.prototype.N,y1.prototype.setProperties=y1.prototype.H,y1.prototype.unset=y1.prototype.P,y1.prototype.changed=y1.prototype.s,y1.prototype.dispatchEvent=y1.prototype.b,y1.prototype.getRevision=y1.prototype.L,y1.prototype.on=y1.prototype.J,y1.prototype.un=y1.prototype.K,g1.prototype.getTileGrid=g1.prototype.ab,g1.prototype.refresh=g1.prototype.sa,g1.prototype.getAttributions=g1.prototype.ya,g1.prototype.getLogo=g1.prototype.xa,g1.prototype.getProjection=g1.prototype.za,g1.prototype.setAttributions=g1.prototype.ua,g1.prototype.getKeys=g1.prototype.O,g1.prototype.getProperties=g1.prototype.N,g1.prototype.setProperties=g1.prototype.H,g1.prototype.unset=g1.prototype.P,g1.prototype.changed=g1.prototype.s,g1.prototype.dispatchEvent=g1.prototype.b,g1.prototype.getRevision=g1.prototype.L,g1.prototype.on=g1.prototype.J,g1.prototype.un=g1.prototype.K,I.prototype.setRenderReprojectionEdges=I.prototype.Pb,I.prototype.setTileGridForProjection=I.prototype.Qb,I.prototype.getTileLoadFunction=I.prototype.pb,I.prototype.getTileUrlFunction=I.prototype.qb,I.prototype.getUrls=I.prototype.rb,I.prototype.setTileLoadFunction=I.prototype.vb,I.prototype.setTileUrlFunction=I.prototype.cb,I.prototype.setUrl=I.prototype.jb,I.prototype.setUrls=I.prototype.eb,I.prototype.getTileGrid=I.prototype.ab,I.prototype.refresh=I.prototype.sa,I.prototype.getAttributions=I.prototype.ya,I.prototype.getLogo=I.prototype.xa,I.prototype.getProjection=I.prototype.za,I.prototype.setAttributions=I.prototype.ua,I.prototype.getKeys=I.prototype.O,I.prototype.getProperties=I.prototype.N,I.prototype.setProperties=I.prototype.H,I.prototype.unset=I.prototype.P,I.prototype.changed=I.prototype.s,I.prototype.dispatchEvent=I.prototype.b,I.prototype.getRevision=I.prototype.L,I.prototype.on=I.prototype.J,I.prototype.un=I.prototype.K,A1.prototype.getTileLoadFunction=A1.prototype.pb,A1.prototype.getTileUrlFunction=A1.prototype.qb,A1.prototype.getUrls=A1.prototype.rb,A1.prototype.setTileLoadFunction=A1.prototype.vb,A1.prototype.setTileUrlFunction=A1.prototype.cb,A1.prototype.setUrl=A1.prototype.jb,A1.prototype.setUrls=A1.prototype.eb,A1.prototype.getTileGrid=A1.prototype.ab,A1.prototype.refresh=A1.prototype.sa,A1.prototype.getAttributions=A1.prototype.ya,A1.prototype.getLogo=A1.prototype.xa,A1.prototype.getProjection=A1.prototype.za,A1.prototype.setAttributions=A1.prototype.ua,A1.prototype.getKeys=A1.prototype.O,A1.prototype.getProperties=A1.prototype.N,A1.prototype.setProperties=A1.prototype.H,A1.prototype.unset=A1.prototype.P,A1.prototype.changed=A1.prototype.s,A1.prototype.dispatchEvent=A1.prototype.b,A1.prototype.getRevision=A1.prototype.L,A1.prototype.on=A1.prototype.J,A1.prototype.un=A1.prototype.K,N.prototype.setRenderReprojectionEdges=N.prototype.Pb,N.prototype.setTileGridForProjection=N.prototype.Qb,N.prototype.getTileLoadFunction=N.prototype.pb,N.prototype.getTileUrlFunction=N.prototype.qb,N.prototype.getUrls=N.prototype.rb,N.prototype.setTileLoadFunction=N.prototype.vb,N.prototype.setTileUrlFunction=N.prototype.cb,N.prototype.setUrl=N.prototype.jb,N.prototype.setUrls=N.prototype.eb,N.prototype.getTileGrid=N.prototype.ab,N.prototype.refresh=N.prototype.sa,N.prototype.getAttributions=N.prototype.ya,N.prototype.getLogo=N.prototype.xa,N.prototype.getProjection=N.prototype.za,N.prototype.setAttributions=N.prototype.ua,N.prototype.getKeys=N.prototype.O,N.prototype.getProperties=N.prototype.N,N.prototype.setProperties=N.prototype.H,N.prototype.unset=N.prototype.P,N.prototype.changed=N.prototype.s,N.prototype.dispatchEvent=N.prototype.b,N.prototype.getRevision=N.prototype.L,N.prototype.on=N.prototype.J,N.prototype.un=N.prototype.K,C1.prototype.setRenderReprojectionEdges=C1.prototype.Pb,C1.prototype.setTileGridForProjection=C1.prototype.Qb,C1.prototype.getTileLoadFunction=C1.prototype.pb,C1.prototype.getTileUrlFunction=C1.prototype.qb,C1.prototype.getUrls=C1.prototype.rb,C1.prototype.setTileLoadFunction=C1.prototype.vb,C1.prototype.setTileUrlFunction=C1.prototype.cb,C1.prototype.setUrl=C1.prototype.jb,C1.prototype.setUrls=C1.prototype.eb,C1.prototype.getTileGrid=C1.prototype.ab,C1.prototype.refresh=C1.prototype.sa,C1.prototype.getAttributions=C1.prototype.ya,C1.prototype.getLogo=C1.prototype.xa,C1.prototype.getProjection=C1.prototype.za,C1.prototype.setAttributions=C1.prototype.ua,C1.prototype.getKeys=C1.prototype.O,C1.prototype.getProperties=C1.prototype.N,C1.prototype.setProperties=C1.prototype.H,C1.prototype.unset=C1.prototype.P,C1.prototype.changed=C1.prototype.s,C1.prototype.dispatchEvent=C1.prototype.b,C1.prototype.getRevision=C1.prototype.L,C1.prototype.on=C1.prototype.J,C1.prototype.un=C1.prototype.K,xm.prototype.getTileCoord=xm.prototype.f,iv.prototype.changed=iv.prototype.s,iv.prototype.dispatchEvent=iv.prototype.b,iv.prototype.getRevision=iv.prototype.L,iv.prototype.on=iv.prototype.J,iv.prototype.un=iv.prototype.K,Av.prototype.changed=Av.prototype.s,Av.prototype.dispatchEvent=Av.prototype.b,Av.prototype.getRevision=Av.prototype.L,Av.prototype.on=Av.prototype.J,Av.prototype.un=Av.prototype.K,am.prototype.changed=am.prototype.s,am.prototype.dispatchEvent=am.prototype.b,am.prototype.getRevision=am.prototype.L,am.prototype.on=am.prototype.J,am.prototype.un=am.prototype.K,dm.prototype.changed=dm.prototype.s,dm.prototype.dispatchEvent=dm.prototype.b,dm.prototype.getRevision=dm.prototype.L,dm.prototype.on=dm.prototype.J,dm.prototype.un=dm.prototype.K,Tv.prototype.changed=Tv.prototype.s,Tv.prototype.dispatchEvent=Tv.prototype.b,Tv.prototype.getRevision=Tv.prototype.L,Tv.prototype.on=Tv.prototype.J,Tv.prototype.un=Tv.prototype.K,uv.prototype.changed=uv.prototype.s,uv.prototype.dispatchEvent=uv.prototype.b,uv.prototype.getRevision=uv.prototype.L,uv.prototype.on=uv.prototype.J,uv.prototype.un=uv.prototype.K,Zb.prototype.changed=Zb.prototype.s,Zb.prototype.dispatchEvent=Zb.prototype.b,Zb.prototype.getRevision=Zb.prototype.L,Zb.prototype.on=Zb.prototype.J,Zb.prototype.un=Zb.prototype.K,Kb.prototype.changed=Kb.prototype.s,Kb.prototype.dispatchEvent=Kb.prototype.b,Kb.prototype.getRevision=Kb.prototype.L,Kb.prototype.on=Kb.prototype.J,Kb.prototype.un=Kb.prototype.K,hm.prototype.changed=hm.prototype.s,hm.prototype.dispatchEvent=hm.prototype.b,hm.prototype.getRevision=hm.prototype.L,hm.prototype.on=hm.prototype.J,hm.prototype.un=hm.prototype.K,mv.prototype.changed=mv.prototype.s,mv.prototype.dispatchEvent=mv.prototype.b,mv.prototype.getRevision=mv.prototype.L,mv.prototype.on=mv.prototype.J,mv.prototype.un=mv.prototype.K,vm.prototype.changed=vm.prototype.s,vm.prototype.dispatchEvent=vm.prototype.b,vm.prototype.getRevision=vm.prototype.L,vm.prototype.on=vm.prototype.J,vm.prototype.un=vm.prototype.K,ls.prototype.getKeys=ls.prototype.O,ls.prototype.getProperties=ls.prototype.N,ls.prototype.setProperties=ls.prototype.H,ls.prototype.unset=ls.prototype.P,ls.prototype.changed=ls.prototype.s,ls.prototype.dispatchEvent=ls.prototype.b,ls.prototype.getRevision=ls.prototype.L,ls.prototype.on=ls.prototype.J,ls.prototype.un=ls.prototype.K,cs.prototype.getExtent=cs.prototype.G,cs.prototype.getMaxResolution=cs.prototype.fc,cs.prototype.getMinResolution=cs.prototype.gc,cs.prototype.getOpacity=cs.prototype.hc,cs.prototype.getVisible=cs.prototype.Mb,cs.prototype.getZIndex=cs.prototype.Ba,cs.prototype.setExtent=cs.prototype.vc,cs.prototype.setMaxResolution=cs.prototype.Ac,cs.prototype.setMinResolution=cs.prototype.Bc,cs.prototype.setOpacity=cs.prototype.wc,cs.prototype.setVisible=cs.prototype.xc,cs.prototype.setZIndex=cs.prototype.Vb,cs.prototype.getKeys=cs.prototype.O,cs.prototype.getProperties=cs.prototype.N,cs.prototype.setProperties=cs.prototype.H,cs.prototype.unset=cs.prototype.P,cs.prototype.changed=cs.prototype.s,cs.prototype.dispatchEvent=cs.prototype.b,cs.prototype.getRevision=cs.prototype.L,cs.prototype.on=cs.prototype.J,cs.prototype.un=cs.prototype.K,ys.prototype.getExtent=ys.prototype.G,ys.prototype.getMaxResolution=ys.prototype.fc,ys.prototype.getMinResolution=ys.prototype.gc,ys.prototype.getOpacity=ys.prototype.hc,ys.prototype.getVisible=ys.prototype.Mb,ys.prototype.getZIndex=ys.prototype.Ba,ys.prototype.setExtent=ys.prototype.vc,ys.prototype.setMaxResolution=ys.prototype.Ac,ys.prototype.setMinResolution=ys.prototype.Bc,ys.prototype.setOpacity=ys.prototype.wc,ys.prototype.setVisible=ys.prototype.xc,ys.prototype.setZIndex=ys.prototype.Vb,ys.prototype.getKeys=ys.prototype.O,ys.prototype.getProperties=ys.prototype.N,ys.prototype.setProperties=ys.prototype.H,ys.prototype.unset=ys.prototype.P,ys.prototype.changed=ys.prototype.s,ys.prototype.dispatchEvent=ys.prototype.b,ys.prototype.getRevision=ys.prototype.L,ys.prototype.on=ys.prototype.J,ys.prototype.un=ys.prototype.K,s.prototype.setSource=s.prototype.Wc,s.prototype.getExtent=s.prototype.G,s.prototype.getMaxResolution=s.prototype.fc,s.prototype.getMinResolution=s.prototype.gc,s.prototype.getOpacity=s.prototype.hc,s.prototype.getVisible=s.prototype.Mb,s.prototype.getZIndex=s.prototype.Ba,s.prototype.setExtent=s.prototype.vc,s.prototype.setMaxResolution=s.prototype.Ac,s.prototype.setMinResolution=s.prototype.Bc,s.prototype.setOpacity=s.prototype.wc,s.prototype.setVisible=s.prototype.xc,s.prototype.setZIndex=s.prototype.Vb,s.prototype.getKeys=s.prototype.O,s.prototype.getProperties=s.prototype.N,s.prototype.setProperties=s.prototype.H,s.prototype.unset=s.prototype.P,s.prototype.changed=s.prototype.s,s.prototype.dispatchEvent=s.prototype.b,s.prototype.getRevision=s.prototype.L,s.prototype.on=s.prototype.J,s.prototype.un=s.prototype.K,p.prototype.getSource=p.prototype.ha,p.prototype.getStyle=p.prototype.D,p.prototype.getStyleFunction=p.prototype.C,p.prototype.setStyle=p.prototype.g,p.prototype.setSource=p.prototype.Wc,p.prototype.getExtent=p.prototype.G,p.prototype.getMaxResolution=p.prototype.fc,p.prototype.getMinResolution=p.prototype.gc,p.prototype.getOpacity=p.prototype.hc,p.prototype.getVisible=p.prototype.Mb,p.prototype.getZIndex=p.prototype.Ba,p.prototype.setExtent=p.prototype.vc,p.prototype.setMaxResolution=p.prototype.Ac,p.prototype.setMinResolution=p.prototype.Bc,p.prototype.setOpacity=p.prototype.wc,p.prototype.setVisible=p.prototype.xc,p.prototype.setZIndex=p.prototype.Vb,p.prototype.getKeys=p.prototype.O,p.prototype.getProperties=p.prototype.N,p.prototype.setProperties=p.prototype.H,p.prototype.unset=p.prototype.P,p.prototype.changed=p.prototype.s,p.prototype.dispatchEvent=p.prototype.b,p.prototype.getRevision=p.prototype.L,p.prototype.on=p.prototype.J,p.prototype.un=p.prototype.K,pm.prototype.setSource=pm.prototype.Wc,pm.prototype.getExtent=pm.prototype.G,pm.prototype.getMaxResolution=pm.prototype.fc,pm.prototype.getMinResolution=pm.prototype.gc,pm.prototype.getOpacity=pm.prototype.hc,pm.prototype.getVisible=pm.prototype.Mb,pm.prototype.getZIndex=pm.prototype.Ba,pm.prototype.setExtent=pm.prototype.vc,pm.prototype.setMaxResolution=pm.prototype.Ac,pm.prototype.setMinResolution=pm.prototype.Bc,pm.prototype.setOpacity=pm.prototype.wc,pm.prototype.setVisible=pm.prototype.xc,pm.prototype.setZIndex=pm.prototype.Vb,pm.prototype.getKeys=pm.prototype.O,pm.prototype.getProperties=pm.prototype.N,pm.prototype.setProperties=pm.prototype.H,pm.prototype.unset=pm.prototype.P,pm.prototype.changed=pm.prototype.s,pm.prototype.dispatchEvent=pm.prototype.b,pm.prototype.getRevision=pm.prototype.L,pm.prototype.on=pm.prototype.J,pm.prototype.un=pm.prototype.K,A.prototype.setSource=A.prototype.Wc,A.prototype.getExtent=A.prototype.G,A.prototype.getMaxResolution=A.prototype.fc,A.prototype.getMinResolution=A.prototype.gc,A.prototype.getOpacity=A.prototype.hc,A.prototype.getVisible=A.prototype.Mb,A.prototype.getZIndex=A.prototype.Ba,A.prototype.setExtent=A.prototype.vc,A.prototype.setMaxResolution=A.prototype.Ac,A.prototype.setMinResolution=A.prototype.Bc,A.prototype.setOpacity=A.prototype.wc,A.prototype.setVisible=A.prototype.xc,A.prototype.setZIndex=A.prototype.Vb,A.prototype.getKeys=A.prototype.O,A.prototype.getProperties=A.prototype.N,A.prototype.setProperties=A.prototype.H,A.prototype.unset=A.prototype.P,A.prototype.changed=A.prototype.s,A.prototype.dispatchEvent=A.prototype.b,A.prototype.getRevision=A.prototype.L,A.prototype.on=A.prototype.J,A.prototype.un=A.prototype.K,E.prototype.getSource=E.prototype.ha,E.prototype.getStyle=E.prototype.D,E.prototype.getStyleFunction=E.prototype.C,E.prototype.setStyle=E.prototype.g,E.prototype.setSource=E.prototype.Wc,E.prototype.getExtent=E.prototype.G,E.prototype.getMaxResolution=E.prototype.fc,E.prototype.getMinResolution=E.prototype.gc,E.prototype.getOpacity=E.prototype.hc,E.prototype.getVisible=E.prototype.Mb,E.prototype.getZIndex=E.prototype.Ba,E.prototype.setExtent=E.prototype.vc,E.prototype.setMaxResolution=E.prototype.Ac,E.prototype.setMinResolution=E.prototype.Bc,E.prototype.setOpacity=E.prototype.wc,E.prototype.setVisible=E.prototype.xc,E.prototype.setZIndex=E.prototype.Vb,E.prototype.getKeys=E.prototype.O,E.prototype.getProperties=E.prototype.N,E.prototype.setProperties=E.prototype.H,E.prototype.unset=E.prototype.P,E.prototype.changed=E.prototype.s,E.prototype.dispatchEvent=E.prototype.b,E.prototype.getRevision=E.prototype.L,E.prototype.on=E.prototype.J,E.prototype.un=E.prototype.K,pn.prototype.getKeys=pn.prototype.O,pn.prototype.getProperties=pn.prototype.N,pn.prototype.setProperties=pn.prototype.H,pn.prototype.unset=pn.prototype.P,pn.prototype.changed=pn.prototype.s,pn.prototype.dispatchEvent=pn.prototype.b,pn.prototype.getRevision=pn.prototype.L,pn.prototype.on=pn.prototype.J,pn.prototype.un=pn.prototype.K,cn.prototype.getActive=cn.prototype.c,cn.prototype.getMap=cn.prototype.f,cn.prototype.setActive=cn.prototype.Ha,cn.prototype.getKeys=cn.prototype.O,cn.prototype.getProperties=cn.prototype.N,cn.prototype.setProperties=cn.prototype.H,cn.prototype.unset=cn.prototype.P,cn.prototype.changed=cn.prototype.s,cn.prototype.dispatchEvent=cn.prototype.b,cn.prototype.getRevision=cn.prototype.L,cn.prototype.on=cn.prototype.J,cn.prototype.un=cn.prototype.K,E0.prototype.getActive=E0.prototype.c,E0.prototype.getMap=E0.prototype.f,E0.prototype.setActive=E0.prototype.Ha,E0.prototype.getKeys=E0.prototype.O,E0.prototype.getProperties=E0.prototype.N,E0.prototype.setProperties=E0.prototype.H,E0.prototype.unset=E0.prototype.P,E0.prototype.changed=E0.prototype.s,E0.prototype.dispatchEvent=E0.prototype.b,E0.prototype.getRevision=E0.prototype.L,E0.prototype.on=E0.prototype.J,E0.prototype.un=E0.prototype.K,Mn.prototype.getActive=Mn.prototype.c,Mn.prototype.getMap=Mn.prototype.f,Mn.prototype.setActive=Mn.prototype.Ha,Mn.prototype.getKeys=Mn.prototype.O,Mn.prototype.getProperties=Mn.prototype.N,Mn.prototype.setProperties=Mn.prototype.H,Mn.prototype.unset=Mn.prototype.P,Mn.prototype.changed=Mn.prototype.s,Mn.prototype.dispatchEvent=Mn.prototype.b,Mn.prototype.getRevision=Mn.prototype.L,Mn.prototype.on=Mn.prototype.J,Mn.prototype.un=Mn.prototype.K,On.prototype.getActive=On.prototype.c,On.prototype.getMap=On.prototype.f,On.prototype.setActive=On.prototype.Ha,On.prototype.getKeys=On.prototype.O,On.prototype.getProperties=On.prototype.N,On.prototype.setProperties=On.prototype.H,On.prototype.unset=On.prototype.P,On.prototype.changed=On.prototype.s,On.prototype.dispatchEvent=On.prototype.b,On.prototype.getRevision=On.prototype.L,On.prototype.on=On.prototype.J,On.prototype.un=On.prototype.K,En.prototype.getActive=En.prototype.c,En.prototype.getMap=En.prototype.f,En.prototype.setActive=En.prototype.Ha,En.prototype.getKeys=En.prototype.O,En.prototype.getProperties=En.prototype.N,En.prototype.setProperties=En.prototype.H,En.prototype.unset=En.prototype.P,En.prototype.changed=En.prototype.s,En.prototype.dispatchEvent=En.prototype.b,En.prototype.getRevision=En.prototype.L,En.prototype.on=En.prototype.J,En.prototype.un=En.prototype.K,Ln.prototype.getActive=Ln.prototype.c,Ln.prototype.getMap=Ln.prototype.f,Ln.prototype.setActive=Ln.prototype.Ha,Ln.prototype.getKeys=Ln.prototype.O,Ln.prototype.getProperties=Ln.prototype.N,Ln.prototype.setProperties=Ln.prototype.H,Ln.prototype.unset=Ln.prototype.P,Ln.prototype.changed=Ln.prototype.s,Ln.prototype.dispatchEvent=Ln.prototype.b,Ln.prototype.getRevision=Ln.prototype.L,Ln.prototype.on=Ln.prototype.J,Ln.prototype.un=Ln.prototype.K,N0.prototype.getActive=N0.prototype.c,N0.prototype.getMap=N0.prototype.f,N0.prototype.setActive=N0.prototype.Ha,N0.prototype.getKeys=N0.prototype.O,N0.prototype.getProperties=N0.prototype.N,N0.prototype.setProperties=N0.prototype.H,N0.prototype.unset=N0.prototype.P,N0.prototype.changed=N0.prototype.s,N0.prototype.dispatchEvent=N0.prototype.b,N0.prototype.getRevision=N0.prototype.L,N0.prototype.on=N0.prototype.J,N0.prototype.un=N0.prototype.K,zn.prototype.getGeometry=zn.prototype.V,zn.prototype.getActive=zn.prototype.c,zn.prototype.getMap=zn.prototype.f,zn.prototype.setActive=zn.prototype.Ha,zn.prototype.getKeys=zn.prototype.O,zn.prototype.getProperties=zn.prototype.N,zn.prototype.setProperties=zn.prototype.H,zn.prototype.unset=zn.prototype.P,zn.prototype.changed=zn.prototype.s,zn.prototype.dispatchEvent=zn.prototype.b,zn.prototype.getRevision=zn.prototype.L,zn.prototype.on=zn.prototype.J,zn.prototype.un=zn.prototype.K,Uv.prototype.getActive=Uv.prototype.c,Uv.prototype.getMap=Uv.prototype.f,Uv.prototype.setActive=Uv.prototype.Ha,Uv.prototype.getKeys=Uv.prototype.O,Uv.prototype.getProperties=Uv.prototype.N,Uv.prototype.setProperties=Uv.prototype.H,Uv.prototype.unset=Uv.prototype.P,Uv.prototype.changed=Uv.prototype.s,Uv.prototype.dispatchEvent=Uv.prototype.b,Uv.prototype.getRevision=Uv.prototype.L,Uv.prototype.on=Uv.prototype.J,Uv.prototype.un=Uv.prototype.K,Qv.prototype.getActive=Qv.prototype.c,Qv.prototype.getMap=Qv.prototype.f,Qv.prototype.setActive=Qv.prototype.Ha,Qv.prototype.getKeys=Qv.prototype.O,Qv.prototype.getProperties=Qv.prototype.N,Qv.prototype.setProperties=Qv.prototype.H,Qv.prototype.unset=Qv.prototype.P,Qv.prototype.changed=Qv.prototype.s,Qv.prototype.dispatchEvent=Qv.prototype.b,Qv.prototype.getRevision=Qv.prototype.L,Qv.prototype.on=Qv.prototype.J,Qv.prototype.un=Qv.prototype.K,Yn.prototype.getActive=Yn.prototype.c,Yn.prototype.getMap=Yn.prototype.f,Yn.prototype.setActive=Yn.prototype.Ha,Yn.prototype.getKeys=Yn.prototype.O,Yn.prototype.getProperties=Yn.prototype.N,Yn.prototype.setProperties=Yn.prototype.H,Yn.prototype.unset=Yn.prototype.P,Yn.prototype.changed=Yn.prototype.s,Yn.prototype.dispatchEvent=Yn.prototype.b,Yn.prototype.getRevision=Yn.prototype.L,Yn.prototype.on=Yn.prototype.J,Yn.prototype.un=Yn.prototype.K,qn.prototype.getActive=qn.prototype.c,qn.prototype.getMap=qn.prototype.f,qn.prototype.setActive=qn.prototype.Ha,qn.prototype.getKeys=qn.prototype.O,qn.prototype.getProperties=qn.prototype.N,qn.prototype.setProperties=qn.prototype.H,qn.prototype.unset=qn.prototype.P,qn.prototype.changed=qn.prototype.s,qn.prototype.dispatchEvent=qn.prototype.b,qn.prototype.getRevision=qn.prototype.L,qn.prototype.on=qn.prototype.J,qn.prototype.un=qn.prototype.K,lb.prototype.getActive=lb.prototype.c,lb.prototype.getMap=lb.prototype.f,lb.prototype.setActive=lb.prototype.Ha,lb.prototype.getKeys=lb.prototype.O,lb.prototype.getProperties=lb.prototype.N,lb.prototype.setProperties=lb.prototype.H,lb.prototype.unset=lb.prototype.P,lb.prototype.changed=lb.prototype.s,lb.prototype.dispatchEvent=lb.prototype.b,lb.prototype.getRevision=lb.prototype.L,lb.prototype.on=lb.prototype.J,lb.prototype.un=lb.prototype.K,_n.prototype.getActive=_n.prototype.c,_n.prototype.getMap=_n.prototype.f,_n.prototype.setActive=_n.prototype.Ha,_n.prototype.getKeys=_n.prototype.O,_n.prototype.getProperties=_n.prototype.N,_n.prototype.setProperties=_n.prototype.H,_n.prototype.unset=_n.prototype.P,_n.prototype.changed=_n.prototype.s,_n.prototype.dispatchEvent=_n.prototype.b,_n.prototype.getRevision=_n.prototype.L,_n.prototype.on=_n.prototype.J,_n.prototype.un=_n.prototype.K,es.prototype.getActive=es.prototype.c,es.prototype.getMap=es.prototype.f,es.prototype.setActive=es.prototype.Ha,es.prototype.getKeys=es.prototype.O,es.prototype.getProperties=es.prototype.N,es.prototype.setProperties=es.prototype.H,es.prototype.unset=es.prototype.P,es.prototype.changed=es.prototype.s,es.prototype.dispatchEvent=es.prototype.b,es.prototype.getRevision=es.prototype.L,es.prototype.on=es.prototype.J,es.prototype.un=es.prototype.K,ns.prototype.getActive=ns.prototype.c,ns.prototype.getMap=ns.prototype.f,ns.prototype.setActive=ns.prototype.Ha,ns.prototype.getKeys=ns.prototype.O,ns.prototype.getProperties=ns.prototype.N,ns.prototype.setProperties=ns.prototype.H,ns.prototype.unset=ns.prototype.P,ns.prototype.changed=ns.prototype.s,ns.prototype.dispatchEvent=ns.prototype.b,ns.prototype.getRevision=ns.prototype.L,ns.prototype.on=ns.prototype.J,ns.prototype.un=ns.prototype.K,Pb.prototype.getActive=Pb.prototype.c,Pb.prototype.getMap=Pb.prototype.f,Pb.prototype.setActive=Pb.prototype.Ha,Pb.prototype.getKeys=Pb.prototype.O,Pb.prototype.getProperties=Pb.prototype.N,Pb.prototype.setProperties=Pb.prototype.H,Pb.prototype.unset=Pb.prototype.P,Pb.prototype.changed=Pb.prototype.s,Pb.prototype.dispatchEvent=Pb.prototype.b,Pb.prototype.getRevision=Pb.prototype.L,Pb.prototype.on=Pb.prototype.J,Pb.prototype.un=Pb.prototype.K,jb.prototype.getActive=jb.prototype.c,jb.prototype.getMap=jb.prototype.f,jb.prototype.setActive=jb.prototype.Ha,jb.prototype.getKeys=jb.prototype.O,jb.prototype.getProperties=jb.prototype.N,jb.prototype.setProperties=jb.prototype.H,jb.prototype.unset=jb.prototype.P,jb.prototype.changed=jb.prototype.s,jb.prototype.dispatchEvent=jb.prototype.b,jb.prototype.getRevision=jb.prototype.L,jb.prototype.on=jb.prototype.J,jb.prototype.un=jb.prototype.K,Ib.prototype.getActive=Ib.prototype.c,Ib.prototype.getMap=Ib.prototype.f,Ib.prototype.setActive=Ib.prototype.Ha,Ib.prototype.getKeys=Ib.prototype.O,Ib.prototype.getProperties=Ib.prototype.N,Ib.prototype.setProperties=Ib.prototype.H,Ib.prototype.unset=Ib.prototype.P,Ib.prototype.changed=Ib.prototype.s,Ib.prototype.dispatchEvent=Ib.prototype.b,Ib.prototype.getRevision=Ib.prototype.L,Ib.prototype.on=Ib.prototype.J,Ib.prototype.un=Ib.prototype.K,yr.prototype.getKeys=yr.prototype.O,yr.prototype.getProperties=yr.prototype.N,yr.prototype.setProperties=yr.prototype.H,yr.prototype.unset=yr.prototype.P,yr.prototype.changed=yr.prototype.s,yr.prototype.dispatchEvent=yr.prototype.b,yr.prototype.getRevision=yr.prototype.L,yr.prototype.on=yr.prototype.J,yr.prototype.un=yr.prototype.K,b.prototype.getClosestPoint=b.prototype.Ab,b.prototype.intersectsCoordinate=b.prototype.sb,b.prototype.getExtent=b.prototype.G,b.prototype.simplify=b.prototype.Rb,b.prototype.transform=b.prototype.tb,b.prototype.getKeys=b.prototype.O,b.prototype.getProperties=b.prototype.N,b.prototype.setProperties=b.prototype.H,b.prototype.unset=b.prototype.P,b.prototype.changed=b.prototype.s,b.prototype.dispatchEvent=b.prototype.b,b.prototype.getRevision=b.prototype.L,b.prototype.on=b.prototype.J,b.prototype.un=b.prototype.K,h0.prototype.getFirstCoordinate=h0.prototype.ac,h0.prototype.getLastCoordinate=h0.prototype.bc,h0.prototype.getLayout=h0.prototype.cc,h0.prototype.getClosestPoint=h0.prototype.Ab,h0.prototype.intersectsCoordinate=h0.prototype.sb,h0.prototype.getExtent=h0.prototype.G,h0.prototype.simplify=h0.prototype.Rb,h0.prototype.getKeys=h0.prototype.O,h0.prototype.getProperties=h0.prototype.N,h0.prototype.setProperties=h0.prototype.H,h0.prototype.unset=h0.prototype.P,h0.prototype.changed=h0.prototype.s,h0.prototype.dispatchEvent=h0.prototype.b,h0.prototype.getRevision=h0.prototype.L,h0.prototype.on=h0.prototype.J,h0.prototype.un=h0.prototype.K,uu.prototype.getClosestPoint=uu.prototype.Ab,uu.prototype.intersectsCoordinate=uu.prototype.sb,uu.prototype.getExtent=uu.prototype.G,uu.prototype.simplify=uu.prototype.Rb,uu.prototype.transform=uu.prototype.tb,uu.prototype.getKeys=uu.prototype.O,uu.prototype.getProperties=uu.prototype.N,uu.prototype.setProperties=uu.prototype.H,uu.prototype.unset=uu.prototype.P,uu.prototype.changed=uu.prototype.s,uu.prototype.dispatchEvent=uu.prototype.b,uu.prototype.getRevision=uu.prototype.L,uu.prototype.on=uu.prototype.J,uu.prototype.un=uu.prototype.K,Fr.prototype.getFirstCoordinate=Fr.prototype.ac,Fr.prototype.getLastCoordinate=Fr.prototype.bc,Fr.prototype.getLayout=Fr.prototype.cc,Fr.prototype.getClosestPoint=Fr.prototype.Ab,Fr.prototype.intersectsCoordinate=Fr.prototype.sb,Fr.prototype.getExtent=Fr.prototype.G,Fr.prototype.simplify=Fr.prototype.Rb,Fr.prototype.transform=Fr.prototype.tb,Fr.prototype.getKeys=Fr.prototype.O,Fr.prototype.getProperties=Fr.prototype.N,Fr.prototype.setProperties=Fr.prototype.H,Fr.prototype.unset=Fr.prototype.P,Fr.prototype.changed=Fr.prototype.s,Fr.prototype.dispatchEvent=Fr.prototype.b,Fr.prototype.getRevision=Fr.prototype.L,Fr.prototype.on=Fr.prototype.J,Fr.prototype.un=Fr.prototype.K,S.prototype.getFirstCoordinate=S.prototype.ac,S.prototype.getLastCoordinate=S.prototype.bc,S.prototype.getLayout=S.prototype.cc,S.prototype.getClosestPoint=S.prototype.Ab,S.prototype.intersectsCoordinate=S.prototype.sb,S.prototype.getExtent=S.prototype.G,S.prototype.simplify=S.prototype.Rb,S.prototype.transform=S.prototype.tb,S.prototype.getKeys=S.prototype.O,S.prototype.getProperties=S.prototype.N,S.prototype.setProperties=S.prototype.H,S.prototype.unset=S.prototype.P,S.prototype.changed=S.prototype.s,S.prototype.dispatchEvent=S.prototype.b,S.prototype.getRevision=S.prototype.L,S.prototype.on=S.prototype.J,S.prototype.un=S.prototype.K,M.prototype.getFirstCoordinate=M.prototype.ac,M.prototype.getLastCoordinate=M.prototype.bc,M.prototype.getLayout=M.prototype.cc,M.prototype.getClosestPoint=M.prototype.Ab,M.prototype.intersectsCoordinate=M.prototype.sb,M.prototype.getExtent=M.prototype.G,M.prototype.simplify=M.prototype.Rb,M.prototype.transform=M.prototype.tb,M.prototype.getKeys=M.prototype.O,M.prototype.getProperties=M.prototype.N,M.prototype.setProperties=M.prototype.H,M.prototype.unset=M.prototype.P,M.prototype.changed=M.prototype.s,M.prototype.dispatchEvent=M.prototype.b,M.prototype.getRevision=M.prototype.L,M.prototype.on=M.prototype.J,M.prototype.un=M.prototype.K,P.prototype.getFirstCoordinate=P.prototype.ac,P.prototype.getLastCoordinate=P.prototype.bc,P.prototype.getLayout=P.prototype.cc,P.prototype.getClosestPoint=P.prototype.Ab,P.prototype.intersectsCoordinate=P.prototype.sb,P.prototype.getExtent=P.prototype.G,P.prototype.simplify=P.prototype.Rb,P.prototype.transform=P.prototype.tb,P.prototype.getKeys=P.prototype.O,P.prototype.getProperties=P.prototype.N,P.prototype.setProperties=P.prototype.H,P.prototype.unset=P.prototype.P,P.prototype.changed=P.prototype.s,P.prototype.dispatchEvent=P.prototype.b,P.prototype.getRevision=P.prototype.L,P.prototype.on=P.prototype.J,P.prototype.un=P.prototype.K,f.prototype.getFirstCoordinate=f.prototype.ac,f.prototype.getLastCoordinate=f.prototype.bc,f.prototype.getLayout=f.prototype.cc,f.prototype.getClosestPoint=f.prototype.Ab,f.prototype.intersectsCoordinate=f.prototype.sb,f.prototype.getExtent=f.prototype.G,f.prototype.simplify=f.prototype.Rb,f.prototype.transform=f.prototype.tb,f.prototype.getKeys=f.prototype.O,f.prototype.getProperties=f.prototype.N,f.prototype.setProperties=f.prototype.H,f.prototype.unset=f.prototype.P,f.prototype.changed=f.prototype.s,f.prototype.dispatchEvent=f.prototype.b,f.prototype.getRevision=f.prototype.L,f.prototype.on=f.prototype.J,f.prototype.un=f.prototype.K,m.prototype.getFirstCoordinate=m.prototype.ac,m.prototype.getLastCoordinate=m.prototype.bc,m.prototype.getLayout=m.prototype.cc,m.prototype.getClosestPoint=m.prototype.Ab,m.prototype.intersectsCoordinate=m.prototype.sb,m.prototype.getExtent=m.prototype.G,m.prototype.simplify=m.prototype.Rb,m.prototype.transform=m.prototype.tb,m.prototype.getKeys=m.prototype.O,m.prototype.getProperties=m.prototype.N,m.prototype.setProperties=m.prototype.H,m.prototype.unset=m.prototype.P,m.prototype.changed=m.prototype.s,m.prototype.dispatchEvent=m.prototype.b,m.prototype.getRevision=m.prototype.L,m.prototype.on=m.prototype.J,m.prototype.un=m.prototype.K,w.prototype.getFirstCoordinate=w.prototype.ac,w.prototype.getLastCoordinate=w.prototype.bc,w.prototype.getLayout=w.prototype.cc,w.prototype.getClosestPoint=w.prototype.Ab,w.prototype.intersectsCoordinate=w.prototype.sb,w.prototype.getExtent=w.prototype.G,w.prototype.simplify=w.prototype.Rb,w.prototype.transform=w.prototype.tb,w.prototype.getKeys=w.prototype.O,w.prototype.getProperties=w.prototype.N,w.prototype.setProperties=w.prototype.H,w.prototype.unset=w.prototype.P,w.prototype.changed=w.prototype.s,w.prototype.dispatchEvent=w.prototype.b,w.prototype.getRevision=w.prototype.L,w.prototype.on=w.prototype.J,w.prototype.un=w.prototype.K,y.prototype.readFeatures=y.prototype.Oa,Zu.prototype.readFeatures=Zu.prototype.Oa,y.prototype.readFeatures=y.prototype.Oa,To.prototype.getKeys=To.prototype.O,To.prototype.getProperties=To.prototype.N,To.prototype.setProperties=To.prototype.H,To.prototype.unset=To.prototype.P,To.prototype.changed=To.prototype.s,To.prototype.dispatchEvent=To.prototype.b,To.prototype.getRevision=To.prototype.L,To.prototype.on=To.prototype.J,To.prototype.un=To.prototype.K,jo.prototype.getMap=jo.prototype.g,jo.prototype.setTarget=jo.prototype.f,jo.prototype.getKeys=jo.prototype.O,jo.prototype.getProperties=jo.prototype.N,jo.prototype.setProperties=jo.prototype.H,jo.prototype.unset=jo.prototype.P,jo.prototype.changed=jo.prototype.s,jo.prototype.dispatchEvent=jo.prototype.b,jo.prototype.getRevision=jo.prototype.L,jo.prototype.on=jo.prototype.J,jo.prototype.un=jo.prototype.K,Go.prototype.getMap=Go.prototype.g,Go.prototype.setTarget=Go.prototype.f,Go.prototype.getKeys=Go.prototype.O,Go.prototype.getProperties=Go.prototype.N,Go.prototype.setProperties=Go.prototype.H,Go.prototype.unset=Go.prototype.P,Go.prototype.changed=Go.prototype.s,Go.prototype.dispatchEvent=Go.prototype.b,Go.prototype.getRevision=Go.prototype.L,Go.prototype.on=Go.prototype.J,Go.prototype.un=Go.prototype.K,Ko.prototype.getMap=Ko.prototype.g,Ko.prototype.setTarget=Ko.prototype.f,Ko.prototype.getKeys=Ko.prototype.O,Ko.prototype.getProperties=Ko.prototype.N,Ko.prototype.setProperties=Ko.prototype.H,Ko.prototype.unset=Ko.prototype.P,Ko.prototype.changed=Ko.prototype.s,Ko.prototype.dispatchEvent=Ko.prototype.b,Ko.prototype.getRevision=Ko.prototype.L,Ko.prototype.on=Ko.prototype.J,Ko.prototype.un=Ko.prototype.K,Sh.prototype.getMap=Sh.prototype.g,Sh.prototype.setTarget=Sh.prototype.f,Sh.prototype.getKeys=Sh.prototype.O,Sh.prototype.getProperties=Sh.prototype.N,Sh.prototype.setProperties=Sh.prototype.H,Sh.prototype.unset=Sh.prototype.P,Sh.prototype.changed=Sh.prototype.s,Sh.prototype.dispatchEvent=Sh.prototype.b,Sh.prototype.getRevision=Sh.prototype.L,Sh.prototype.on=Sh.prototype.J,Sh.prototype.un=Sh.prototype.K,ko.prototype.getMap=ko.prototype.g,ko.prototype.setTarget=ko.prototype.f,ko.prototype.getKeys=ko.prototype.O,ko.prototype.getProperties=ko.prototype.N,ko.prototype.setProperties=ko.prototype.H,ko.prototype.unset=ko.prototype.P,ko.prototype.changed=ko.prototype.s,ko.prototype.dispatchEvent=ko.prototype.b,ko.prototype.getRevision=ko.prototype.L,ko.prototype.on=ko.prototype.J,ko.prototype.un=ko.prototype.K,Th.prototype.getMap=Th.prototype.g,Th.prototype.setTarget=Th.prototype.f,Th.prototype.getKeys=Th.prototype.O,Th.prototype.getProperties=Th.prototype.N,Th.prototype.setProperties=Th.prototype.H,Th.prototype.unset=Th.prototype.P,Th.prototype.changed=Th.prototype.s,Th.prototype.dispatchEvent=Th.prototype.b,Th.prototype.getRevision=Th.prototype.L,Th.prototype.on=Th.prototype.J,Th.prototype.un=Th.prototype.K,Oo.prototype.getMap=Oo.prototype.g,Oo.prototype.setMap,Oo.prototype.setTarget=Oo.prototype.f,Oo.prototype.get,Oo.prototype.getKeys=Oo.prototype.O,Oo.prototype.getProperties=Oo.prototype.N,Oo.prototype.set,Oo.prototype.setProperties=Oo.prototype.H,Oo.prototype.unset=Oo.prototype.P,Oo.prototype.changed=Oo.prototype.s,Oo.prototype.dispatchEvent=Oo.prototype.b,Oo.prototype.getRevision=Oo.prototype.L,Oo.prototype.on=Oo.prototype.J,Oo.prototype.once,Oo.prototype.un=Oo.prototype.K,Ih.prototype.getMap=Ih.prototype.g,Ih.prototype.setTarget=Ih.prototype.f,Ih.prototype.getKeys=Ih.prototype.O,Ih.prototype.getProperties=Ih.prototype.N,Ih.prototype.setProperties=Ih.prototype.H,Ih.prototype.unset=Ih.prototype.P,Ih.prototype.changed=Ih.prototype.s,Ih.prototype.dispatchEvent=Ih.prototype.b,Ih.prototype.getRevision=Ih.prototype.L,Ih.prototype.on=Ih.prototype.J,Ih.prototype.un=Ih.prototype.K,Oh.prototype.getMap=Oh.prototype.g,Oh.prototype.setTarget=Oh.prototype.f,Oh.prototype.getKeys=Oh.prototype.O,Oh.prototype.getProperties=Oh.prototype.N,Oh.prototype.setProperties=Oh.prototype.H,Oh.prototype.unset=Oh.prototype.P,Oh.prototype.changed=Oh.prototype.s,Oh.prototype.dispatchEvent=Oh.prototype.b,Oh.prototype.getRevision=Oh.prototype.L,Oh.prototype.on=Oh.prototype.J,Oh.prototype.un=Oh.prototype.K,F.ol})
\ No newline at end of file
1
+// OpenLayers. See https://openlayers.org/
2
+// License: https://raw.githubusercontent.com/openlayers/openlayers/master/LICENSE.md
3
+// Version: v4.2.0
4
+;(function (root, factory) {
5
+ if (typeof exports === "object") {
6
+ module.exports = factory();
7
+ } else if (typeof define === "function" && define.amd) {
8
+ define([], factory);
9
+ } else {
10
+ root.ol = factory();
11
+ }
12
+}(this, function () {
13
+ var OPENLAYERS = {};
14
+ var k,aa=this;function t(a,b){var c=OPENLAYERS;a=a.split(".");c=c||aa;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};var ea,fa;function ia(a,b){return a>b?1:a<b?-1:0}function ja(a,b){return 0<=a.indexOf(b)}function ka(a,b,c){var d=a.length;if(a[0]<=b)return 0;if(!(b<=a[d-1]))if(0<c)for(c=1;c<d;++c){if(a[c]<b)return c-1}else if(0>c)for(c=1;c<d;++c){if(a[c]<=b)return c}else for(c=1;c<d;++c){if(a[c]==b)return c;if(a[c]<b)return a[c-1]-b<b-a[c]?c-1:c}return d-1}function la(a,b){var c=Array.isArray(b)?b:[b],d=c.length;for(b=0;b<d;b++)a[a.length]=c[b]}function ma(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}
15
+function na(a,b){for(var c=a.length>>>0,d,e=0;e<c;e++)if(d=a[e],b(d,e,a))return d;return null}function pa(a,b){var c=a.length;if(c!==b.length)return!1;for(var d=0;d<c;d++)if(a[d]!==b[d])return!1;return!0}function qa(a){var b=ra,c=a.length,d=Array(a.length),e;for(e=0;e<c;e++)d[e]={index:e,value:a[e]};d.sort(function(a,c){return b(a.value,c.value)||a.index-c.index});for(e=0;e<a.length;e++)a[e]=d[e].value}function sa(a,b){var c;return a.every(function(d,e){c=e;return!b(d,e,a)})?-1:c}
16
+function ta(a,b){var c=b||ia;return a.every(function(b,e){if(!e)return!0;b=c(a[e-1],b);return!(0<b||0===b)})};function v(a,b){a.prototype=Object.create(b.prototype);a.prototype.constructor=a}function ua(){}function w(a){return a.Vo||(a.Vo=++va)}var va=0;function wa(a){this.message="Assertion failed. See https://openlayers.org/en/v4.2.0/doc/errors/#"+a+" for details.";this.code=a;this.name="AssertionError"}v(wa,Error);function xa(a,b){if(!a)throw new wa(b);};function ya(a,b,c,d){this.ca=a;this.$=b;this.da=c;this.ia=d}function za(a,b,c){return a.ca<=b&&b<=a.$&&a.da<=c&&c<=a.ia}function Aa(a,b){return a.ca==b.ca&&a.da==b.da&&a.$==b.$&&a.ia==b.ia}function Ba(a,b){return a.ca<=b.$&&a.$>=b.ca&&a.da<=b.ia&&a.ia>=b.da};function Ca(a,b,c){return Math.min(Math.max(a,b),c)}var Da=function(){var a;"cosh"in Math?a=Math.cosh:a=function(a){a=Math.exp(a);return(a+1/a)/2};return a}();function Ea(a){xa(0<a,29);return Math.pow(2,Math.ceil(Math.log(a)/Math.LN2))}function Fa(a,b,c,d,e,f){var g=e-c,h=f-d;if(g||h){var l=((a-c)*g+(b-d)*h)/(g*g+h*h);1<l?(c=e,d=f):0<l&&(c+=g*l,d+=h*l)}return Ga(a,b,c,d)}function Ga(a,b,c,d){a=c-a;b=d-b;return a*a+b*b}function Ha(a){return a*Math.PI/180}function Ia(a,b){a%=b;return 0>a*b?a+b:a}
17
+function Ja(a,b,c){return a+c*(b-a)};function Ka(a,b,c){void 0===c&&(c=[0,0]);c[0]=a[0]+2*b;c[1]=a[1]+2*b;return c}function La(a,b,c){void 0===c&&(c=[0,0]);c[0]=a[0]*b+.5|0;c[1]=a[1]*b+.5|0;return c}function Ma(a,b){if(Array.isArray(a))return a;void 0===b?b=[a,a]:b[0]=b[1]=a;return b};function Na(a){for(var b=Oa(),c=0,d=a.length;c<d;++c)Pa(b,a[c]);return b}function Qa(a,b,c){return c?(c[0]=a[0]-b,c[1]=a[1]-b,c[2]=a[2]+b,c[3]=a[3]+b,c):[a[0]-b,a[1]-b,a[2]+b,a[3]+b]}function Ra(a,b){return b?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b):a.slice()}function Sa(a,b,c){b=b<a[0]?a[0]-b:a[2]<b?b-a[2]:0;a=c<a[1]?a[1]-c:a[3]<c?c-a[3]:0;return b*b+a*a}function Ta(a,b){return Ua(a,b[0],b[1])}function Va(a,b){return a[0]<=b[0]&&b[2]<=a[2]&&a[1]<=b[1]&&b[3]<=a[3]}
18
+function Ua(a,b,c){return a[0]<=b&&b<=a[2]&&a[1]<=c&&c<=a[3]}function Wa(a,b){var c=a[1],d=a[2],e=a[3],f=b[0];b=b[1];var g=0;f<a[0]?g|=16:f>d&&(g|=4);b<c?g|=8:b>e&&(g|=2);g||(g=1);return g}function Oa(){return[Infinity,Infinity,-Infinity,-Infinity]}function Xa(a,b,c,d,e){return e?(e[0]=a,e[1]=b,e[2]=c,e[3]=d,e):[a,b,c,d]}function Ya(a){return Xa(Infinity,Infinity,-Infinity,-Infinity,a)}function Za(a,b){var c=a[0];a=a[1];return Xa(c,a,c,a,b)}function $a(a,b,c,d,e){e=Ya(e);return ab(e,a,b,c,d)}
19
+function bb(a,b){return a[0]==b[0]&&a[2]==b[2]&&a[1]==b[1]&&a[3]==b[3]}function cb(a,b){b[0]<a[0]&&(a[0]=b[0]);b[2]>a[2]&&(a[2]=b[2]);b[1]<a[1]&&(a[1]=b[1]);b[3]>a[3]&&(a[3]=b[3]);return a}function Pa(a,b){b[0]<a[0]&&(a[0]=b[0]);b[0]>a[2]&&(a[2]=b[0]);b[1]<a[1]&&(a[1]=b[1]);b[1]>a[3]&&(a[3]=b[1])}function ab(a,b,c,d,e){for(;c<d;c+=e){var f=a,g=b[c],h=b[c+1];f[0]=Math.min(f[0],g);f[1]=Math.min(f[1],h);f[2]=Math.max(f[2],g);f[3]=Math.max(f[3],h)}return a}
20
+function db(a,b,c){var d;return(d=b.call(c,eb(a)))||(d=b.call(c,gb(a)))||(d=b.call(c,hb(a)))?d:(d=b.call(c,ib(a)))?d:!1}function jb(a){var b=0;kb(a)||(b=lb(a)*mb(a));return b}function eb(a){return[a[0],a[1]]}function gb(a){return[a[2],a[1]]}function nb(a){return[(a[0]+a[2])/2,(a[1]+a[3])/2]}
21
+function ob(a,b,c,d,e){var f=b*d[0]/2;d=b*d[1]/2;b=Math.cos(c);var g=Math.sin(c);c=f*b;f*=g;b*=d;var h=d*g,l=a[0],m=a[1];a=l-c+h;d=l-c-h;g=l+c-h;c=l+c+h;var h=m-f-b,l=m-f+b,n=m+f+b,f=m+f-b;return Xa(Math.min(a,d,g,c),Math.min(h,l,n,f),Math.max(a,d,g,c),Math.max(h,l,n,f),e)}function mb(a){return a[3]-a[1]}function pb(a,b,c){c=c?c:Oa();qb(a,b)&&(c[0]=a[0]>b[0]?a[0]:b[0],c[1]=a[1]>b[1]?a[1]:b[1],c[2]=a[2]<b[2]?a[2]:b[2],c[3]=a[3]<b[3]?a[3]:b[3]);return c}function ib(a){return[a[0],a[3]]}
22
+function hb(a){return[a[2],a[3]]}function lb(a){return a[2]-a[0]}function qb(a,b){return a[0]<=b[2]&&a[2]>=b[0]&&a[1]<=b[3]&&a[3]>=b[1]}function kb(a){return a[2]<a[0]||a[3]<a[1]}function rb(a,b){var c=(a[2]-a[0])/2*(b-1);b=(a[3]-a[1])/2*(b-1);a[0]-=c;a[2]+=c;a[1]-=b;a[3]+=b}
23
+function sb(a,b,c){a=[a[0],a[1],a[0],a[3],a[2],a[1],a[2],a[3]];b(a,a,2);var d=[a[0],a[2],a[4],a[6]],e=[a[1],a[3],a[5],a[7]];b=Math.min.apply(null,d);a=Math.min.apply(null,e);d=Math.max.apply(null,d);e=Math.max.apply(null,e);return Xa(b,a,d,e,c)};var tb="function"===typeof Object.assign?Object.assign:function(a,b){if(!a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var c=Object(a),d=1,e=arguments.length;d<e;++d){var f=arguments[d];if(void 0!==f&&null!==f)for(var g in f)f.hasOwnProperty(g)&&(c[g]=f[g])}return c};function ub(a){for(var b in a)delete a[b]}function vb(a){var b=[],c;for(c in a)b.push(a[c]);return b}function wb(a){for(var b in a)return!1;return!b};/*
24
+
25
+ Latitude/longitude spherical geodesy formulae taken from
26
+ http://www.movable-type.co.uk/scripts/latlong.html
27
+ Licensed under CC-BY-3.0.
28
+*/
29
+function xb(a){this.radius=a}xb.prototype.a=function(a){for(var b=0,c=a.length,d=a[c-1][0],e=a[c-1][1],f=0;f<c;f++)var g=a[f][0],h=a[f][1],b=b+Ha(g-d)*(2+Math.sin(Ha(e))+Math.sin(Ha(h))),d=g,e=h;return b*this.radius*this.radius/2};xb.prototype.b=function(a,b){var c=Ha(a[1]),d=Ha(b[1]),e=(d-c)/2;a=Ha(b[0]-a[0])/2;c=Math.sin(e)*Math.sin(e)+Math.sin(a)*Math.sin(a)*Math.cos(c)*Math.cos(d);return 2*this.radius*Math.atan2(Math.sqrt(c),Math.sqrt(1-c))};
30
+xb.prototype.offset=function(a,b,c){var d=Ha(a[1]);b/=this.radius;var e=Math.asin(Math.sin(d)*Math.cos(b)+Math.cos(d)*Math.sin(b)*Math.cos(c));return[180*(Ha(a[0])+Math.atan2(Math.sin(c)*Math.sin(b)*Math.cos(d),Math.cos(b)-Math.sin(d)*Math.sin(e)))/Math.PI,180*e/Math.PI]};var yb=new xb(6370997);var zb={};zb.degrees=2*Math.PI*yb.radius/360;zb.ft=.3048;zb.m=1;zb["us-ft"]=1200/3937;var Ab=null;function Bb(a){this.mb=a.code;this.a=a.units;this.f=void 0!==a.extent?a.extent:null;this.g=void 0!==a.worldExtent?a.worldExtent:null;this.b=void 0!==a.axisOrientation?a.axisOrientation:"enu";this.c=void 0!==a.global?a.global:!1;this.i=!(!this.c||!this.f);this.o=a.getPointResolution;this.j=null;this.l=a.metersPerUnit;var b=a.code,c=Ab||window.proj4;"function"==typeof c&&(b=c.defs(b),void 0!==b&&(void 0!==b.axis&&void 0===a.axisOrientation&&(this.b=b.axis),void 0===a.metersPerUnit&&(this.l=b.to_meter),
31
+void 0===a.units&&(this.a=b.units)))}k=Bb.prototype;k.Jk=function(){return this.mb};k.G=function(){return this.f};k.Un=function(){return this.a};k.sc=function(){return this.l||zb[this.a]};k.tl=function(){return this.g};k.dm=function(){return this.c};k.$p=function(a){this.c=a;this.i=!(!a||!this.f)};k.Vn=function(a){this.f=a;this.i=!(!this.c||!a)};k.kq=function(a){this.g=a};k.Zp=function(a){this.o=a};function Cb(a){Bb.call(this,{code:a,units:"m",extent:Db,global:!0,worldExtent:Eb,getPointResolution:function(a,c){return a/Da(c[1]/6378137)}})}v(Cb,Bb);var Fb=6378137*Math.PI,Db=[-Fb,-Fb,Fb,Fb],Eb=[-180,-85,180,85],Gb="EPSG:3857 EPSG:102100 EPSG:102113 EPSG:900913 urn:ogc:def:crs:EPSG:6.18:3:3857 urn:ogc:def:crs:EPSG::3857 http://www.opengis.net/gml/srs/epsg.xml#3857".split(" ").map(function(a){return new Cb(a)});
32
+function Hb(a,b,c){var d=a.length;c=1<c?c:2;void 0===b&&(2<c?b=a.slice():b=Array(d));for(var e=0;e<d;e+=c){b[e]=Fb*a[e]/180;var f=6378137*Math.log(Math.tan(Math.PI*(a[e+1]+90)/360));f>Fb?f=Fb:f<-Fb&&(f=-Fb);b[e+1]=f}return b}function Ib(a,b,c){var d=a.length;c=1<c?c:2;void 0===b&&(2<c?b=a.slice():b=Array(d));for(var e=0;e<d;e+=c)b[e]=180*a[e]/Fb,b[e+1]=360*Math.atan(Math.exp(a[e+1]/6378137))/Math.PI-90;return b};var Jb=new xb(6378137);function Kb(a,b){Bb.call(this,{code:a,units:"degrees",extent:Lb,axisOrientation:b,global:!0,metersPerUnit:Mb,worldExtent:Lb})}v(Kb,Bb);var Lb=[-180,-90,180,90],Mb=Math.PI*Jb.radius/180,Nb=[new Kb("CRS:84"),new Kb("EPSG:4326","neu"),new Kb("urn:ogc:def:crs:EPSG::4326","neu"),new Kb("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new Kb("urn:ogc:def:crs:OGC:1.3:CRS84"),new Kb("urn:ogc:def:crs:OGC:2:84"),new Kb("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Kb("urn:x-ogc:def:crs:EPSG:4326","neu")];var Ob={};var Pb={};function Qb(a,b,c){a=a.mb;b=b.mb;a in Pb||(Pb[a]={});Pb[a][b]=c}function Rb(a,b){var c;a in Pb&&b in Pb[a]&&(c=Pb[a][b]);return c};function Sb(a,b,c){a=Tb(a);var d=a.o;d?b=d(b,c):"degrees"!=a.a&&(d=Vb(a,Tb("EPSG:4326")),b=[c[0]-b/2,c[1],c[0]+b/2,c[1],c[0],c[1]-b/2,c[0],c[1]+b/2],b=d(b,b,2),b=(yb.b(b.slice(0,2),b.slice(2,4))+yb.b(b.slice(4,6),b.slice(6,8)))/2,a=a.sc(),void 0!==a&&(b/=a));return b}function Wb(a){a.forEach(Xb);a.forEach(function(b){a.forEach(function(a){b!==a&&Qb(b,a,Yb)})})}function Zb(){Nb.forEach(function(a){Gb.forEach(function(b){Qb(a,b,Hb);Qb(b,a,Ib)})})}function Xb(a){Ob[a.mb]=a;Qb(a,a,Yb)}
33
+function $b(a){return a?"string"===typeof a?Tb(a):a:Tb("EPSG:3857")}function ac(a,b,c,d){a=Tb(a);b=Tb(b);Qb(a,b,cc(c));Qb(b,a,cc(d))}function cc(a){return function(b,c,d){var e=b.length;d=void 0!==d?d:2;c=void 0!==c?c:Array(e);var f;for(f=0;f<e;f+=d){var g=a([b[f],b[f+1]]);c[f]=g[0];c[f+1]=g[1];for(g=d-1;2<=g;--g)c[f+g]=b[f+g]}return c}}
34
+function Tb(a){var b=null;if(a instanceof Bb)b=a;else if("string"===typeof a){var b=Ob[a]||null,c=Ab||window.proj4;b||"function"!=typeof c||void 0===c.defs(a)||(b=new Bb({code:a}),Xb(b))}return b}function dc(a,b){if(a===b)return!0;var c=a.a===b.a;return a.mb===b.mb?c:Vb(a,b)===Yb&&c}function ec(a,b){a=Tb(a);b=Tb(b);return Vb(a,b)}
35
+function Vb(a,b){var c=a.mb,d=b.mb,e=Rb(c,d);if(!e){var f=Ab||window.proj4;if("function"==typeof f){var g=f.defs(c),h=f.defs(d);void 0!==g&&void 0!==h&&(g===h?Wb([b,a]):(e=f(d,c),ac(b,a,e.forward,e.inverse)),e=Rb(c,d))}}e||(e=fc);return e}function fc(a,b){if(void 0!==b&&a!==b){for(var c=0,d=a.length;c<d;++c)b[c]=a[c];a=b}return a}function Yb(a,b){if(void 0!==b){for(var c=0,d=a.length;c<d;++c)b[c]=a[c];a=b}else a=a.slice();return a}function gc(a,b,c){return ec(b,c)(a,void 0,a.length)}
36
+function hc(a,b,c){b=ec(b,c);return sb(a,b)}function ic(){Wb(Gb);Wb(Nb);Zb()}ic();function jc(a,b,c,d){return void 0!==d?(d[0]=a,d[1]=b,d[2]=c,d):[a,b,c]}function kc(a){var b=a[0],c=Array(b),d=1<<b-1,e;for(e=0;e<b;++e){var f=48;a[1]&d&&(f+=1);a[2]&d&&(f+=2);c[e]=String.fromCharCode(f);d>>=1}return c.join("")};function lc(a){this.minZoom=void 0!==a.minZoom?a.minZoom:0;this.b=a.resolutions;xa(ta(this.b,function(a,b){return b-a}),17);this.maxZoom=this.b.length-1;this.i=void 0!==a.origin?a.origin:null;this.c=null;void 0!==a.origins&&(this.c=a.origins,xa(this.c.length==this.b.length,20));var b=a.extent;void 0===b||this.i||this.c||(this.i=ib(b));xa(!this.i&&this.c||this.i&&!this.c,18);this.f=null;void 0!==a.tileSizes&&(this.f=a.tileSizes,xa(this.f.length==this.b.length,19));this.g=void 0!==a.tileSize?a.tileSize:
37
+this.f?null:256;xa(!this.g&&this.f||this.g&&!this.f,22);this.v=void 0!==b?b:null;this.a=null;this.j=[0,0];void 0!==a.sizes?this.a=a.sizes.map(function(a){return new ya(Math.min(0,a[0]),Math.max(a[0]-1,-1),Math.min(0,a[1]),Math.max(a[1]-1,-1))},this):b&&mc(this,b)}var nc=[0,0,0];k=lc.prototype;k.Rf=function(a,b,c){a=oc(this,a,b);for(var d=a.ca,e=a.$;d<=e;++d)for(var f=a.da,g=a.ia;f<=g;++f)c([b,d,f])};
38
+function pc(a,b,c,d,e){e=a.Aa(b,e);for(b=b[0]-1;b>=a.minZoom;){if(c.call(null,b,oc(a,e,b,d)))return!0;--b}return!1}k.G=function(){return this.v};k.Ti=function(){return this.maxZoom};k.Ui=function(){return this.minZoom};k.Pc=function(a){return this.i?this.i:this.c[a]};k.Da=function(a){return this.b[a]};k.Vi=function(){return this.b};function qc(a,b,c,d){return b[0]<a.maxZoom?(d=a.Aa(b,d),oc(a,d,b[0]+1,c)):null}
39
+function rc(a,b,c,d){sc(a,b[0],b[1],c,!1,nc);var e=nc[1],f=nc[2];sc(a,b[2],b[3],c,!0,nc);a=nc[1];b=nc[2];void 0!==d?(d.ca=e,d.$=a,d.da=f,d.ia=b):d=new ya(e,a,f,b);return d}function oc(a,b,c,d){return rc(a,b,a.Da(c),d)}function tc(a,b){var c=a.Pc(b[0]),d=a.Da(b[0]);a=Ma(a.gb(b[0]),a.j);return[c[0]+(b[1]+.5)*a[0]*d,c[1]+(b[2]+.5)*a[1]*d]}k.Aa=function(a,b){var c=this.Pc(a[0]),d=this.Da(a[0]),e=Ma(this.gb(a[0]),this.j),f=c[0]+a[1]*e[0]*d;a=c[1]+a[2]*e[1]*d;return Xa(f,a,f+e[0]*d,a+e[1]*d,b)};
40
+k.Be=function(a,b,c){return sc(this,a[0],a[1],b,!1,c)};function sc(a,b,c,d,e,f){var g=a.tc(d),h=d/a.Da(g),l=a.Pc(g);a=Ma(a.gb(g),a.j);b=h*Math.floor((b-l[0])/d+(e?.5:0))/a[0];c=h*Math.floor((c-l[1])/d+(e?0:.5))/a[1];e?(b=Math.ceil(b)-1,c=Math.ceil(c)-1):(b=Math.floor(b),c=Math.floor(c));return jc(g,b,c,f)}k.bg=function(a,b,c){return sc(this,a[0],a[1],this.Da(b),!1,c)};k.gb=function(a){return this.g?this.g:this.f[a]};k.tc=function(a,b){return Ca(ka(this.b,a,b||0),this.minZoom,this.maxZoom)};
41
+function mc(a,b){for(var c=a.b.length,d=Array(c),e=a.minZoom;e<c;++e)d[e]=oc(a,b,e);a.a=d};function vc(a){var b=a.j;b||(b=wc(a),a.j=b);return b}function xc(a){var b={};tb(b,a?a:{});void 0===b.extent&&(b.extent=Tb("EPSG:3857").G());b.resolutions=yc(b.extent,b.maxZoom,b.tileSize);delete b.maxZoom;return new lc(b)}function yc(a,b,c){b=void 0!==b?b:42;var d=mb(a);a=lb(a);c=Ma(void 0!==c?c:256);c=Math.max(a/c[0],d/c[1]);b+=1;d=Array(b);for(a=0;a<b;++a)d[a]=c/Math.pow(2,a);return d}function wc(a,b,c){a=zc(a);b=yc(a,b,c);return new lc({extent:a,origin:ib(a),resolutions:b,tileSize:c})}
42
+function zc(a){a=Tb(a);var b=a.G();b||(a=180*zb.degrees/a.sc(),b=Xa(-a,-a,a,a));return b};function Ac(a){this.b=a.html;this.a=a.tileRanges?a.tileRanges:null}Ac.prototype.i=function(){return this.b};function Bc(a){return function(b){if(b)return[Ca(b[0],a[0],a[2]),Ca(b[1],a[1],a[3])]}}function Cc(a){return a};function Dc(a){function b(b){var c=a.listener,e=a.lh||a.target;a.nh&&Ec(a);return c.call(e,b)}return a.mh=b}function Fc(a,b,c,d){for(var e,f=0,g=a.length;f<g;++f)if(e=a[f],e.listener===b&&e.lh===c)return d&&(e.deleteIndex=f),e}function Gc(a,b){return(a=a.fb)?a[b]:void 0}function Hc(a){var b=a.fb;b||(b=a.fb={});return b}function Ic(a,b){var c=Gc(a,b);if(c){for(var d=0,e=c.length;d<e;++d)a.removeEventListener(b,c[d].mh),ub(c[d]);c.length=0;if(c=a.fb)delete c[b],Object.keys(c).length||delete a.fb}}
43
+function y(a,b,c,d,e){var f=Hc(a),g=f[b];g||(g=f[b]=[]);(f=Fc(g,c,d,!1))?e||(f.nh=!1):(f={lh:d,nh:!!e,listener:c,target:a,type:b},a.addEventListener(b,Dc(f)),g.push(f));return f}function Jc(a,b,c,d){return y(a,b,c,d,!0)}function Kc(a,b,c,d){(a=Gc(a,b))&&(c=Fc(a,c,d,!0))&&Ec(c)}function Ec(a){if(a&&a.target){a.target.removeEventListener(a.type,a.mh);var b=Gc(a.target,a.type);if(b){var c="deleteIndex"in a?a.deleteIndex:b.indexOf(a);-1!==c&&b.splice(c,1);b.length||Ic(a.target,a.type)}ub(a)}}
44
+function Lc(a){var b=Hc(a),c;for(c in b)Ic(a,c)};function Mc(){}Mc.prototype.Jb=!1;function Nc(a){a.Jb||(a.Jb=!0,a.ka())}Mc.prototype.ka=ua;function Oc(a){this.type=a;this.target=null}Oc.prototype.preventDefault=Oc.prototype.stopPropagation=function(){this.qp=!0};function Pc(a){a.stopPropagation()};function Qc(){this.Ua={};this.ra={};this.oa={}}v(Qc,Mc);Qc.prototype.addEventListener=function(a,b){var c=this.oa[a];c||(c=this.oa[a]=[]);-1===c.indexOf(b)&&c.push(b)};
45
+Qc.prototype.b=function(a){var b="string"===typeof a?new Oc(a):a;a=b.type;b.target=this;var c=this.oa[a];if(c){a in this.ra||(this.ra[a]=0,this.Ua[a]=0);++this.ra[a];for(var d=0,e=c.length;d<e;++d)if(!1===c[d].call(this,b)||b.qp){var f=!1;break}--this.ra[a];if(!this.ra[a]){b=this.Ua[a];for(delete this.Ua[a];b--;)this.removeEventListener(a,ua);delete this.ra[a]}return f}};Qc.prototype.ka=function(){Lc(this)};function Rc(a,b){return b?b in a.oa:0<Object.keys(a.oa).length}
46
+Qc.prototype.removeEventListener=function(a,b){var c=this.oa[a];c&&(b=c.indexOf(b),a in this.Ua?(c[b]=ua,++this.Ua[a]):(c.splice(b,1),c.length||delete this.oa[a]))};function Sc(){Qc.call(this);this.i=0}v(Sc,Qc);k=Sc.prototype;k.s=function(){++this.i;this.b("change")};k.L=function(){return this.i};k.J=function(a,b,c){if(Array.isArray(a)){for(var d=a.length,e=Array(d),f=0;f<d;++f)e[f]=y(this,a[f],b,c);return e}return y(this,a,b,c)};k.once=function(a,b,c){if(Array.isArray(a)){for(var d=a.length,e=Array(d),f=0;f<d;++f)e[f]=Jc(this,a[f],b,c);return e}return Jc(this,a,b,c)};
47
+k.K=function(a,b,c){if(Array.isArray(a))for(var d=0,e=a.length;d<e;++d)Kc(this,a[d],b,c);else Kc(this,a,b,c)};function Tc(a){Sc.call(this);w(this);this.S={};void 0!==a&&this.H(a)}v(Tc,Sc);var Uc={};function Vc(a){return Uc.hasOwnProperty(a)?Uc[a]:Uc[a]="change:"+a}k=Tc.prototype;k.get=function(a){var b;this.S.hasOwnProperty(a)&&(b=this.S[a]);return b};k.O=function(){return Object.keys(this.S)};k.N=function(){return tb({},this.S)};function Wc(a,b,c){var d=Vc(b);a.b(new Xc(d,b,c));a.b(new Xc("propertychange",b,c))}k.set=function(a,b,c){c?this.S[a]=b:(c=this.S[a],this.S[a]=b,c!==b&&Wc(this,a,c))};
48
+k.H=function(a,b){for(var c in a)this.set(c,a[c],b)};k.P=function(a,b){if(a in this.S){var c=this.S[a];delete this.S[a];b||Wc(this,a,c)}};function Xc(a,b,c){Oc.call(this,a);this.key=b;this.oldValue=c}v(Xc,Oc);function Yc(a,b){Tc.call(this);this.c=!!(b||{}).unique;this.a=a?a:[];if(this.c)for(a=0,b=this.a.length;a<b;++a)Zc(this,this.a[a],a);$c(this)}v(Yc,Tc);k=Yc.prototype;k.clear=function(){for(;0<this.dc();)this.pop()};k.fg=function(a){var b;var c=0;for(b=a.length;c<b;++c)this.push(a[c]);return this};k.forEach=function(a,b){this.a.forEach(a,b)};k.tm=function(){return this.a};k.item=function(a){return this.a[a]};k.dc=function(){return this.get(ad)};
49
+k.He=function(a,b){this.c&&Zc(this,b);this.a.splice(a,0,b);$c(this);this.b(new bd("add",b))};k.pop=function(){return this.Hg(this.dc()-1)};k.push=function(a){this.c&&Zc(this,a);var b=this.dc();this.He(b,a);return this.dc()};k.remove=function(a){var b=this.a,c;var d=0;for(c=b.length;d<c;++d)if(b[d]===a)return this.Hg(d)};k.Hg=function(a){var b=this.a[a];this.a.splice(a,1);$c(this);this.b(new bd("remove",b));return b};
50
+k.Wp=function(a,b){var c=this.dc();if(a<c)this.c&&Zc(this,b,a),c=this.a[a],this.a[a]=b,this.b(new bd("remove",c)),this.b(new bd("add",b));else{for(;c<a;++c)this.He(c,void 0);this.He(a,b)}};function $c(a){a.set(ad,a.a.length)}function Zc(a,b,c){for(var d=0,e=a.a.length;d<e;++d)if(a.a[d]===b&&d!==c)throw new wa(58);}var ad="length";function bd(a,b){Oc.call(this,a);this.element=b}v(bd,Oc);var cd=/^#(?:[0-9a-f]{3}){1,2}$/i,dd=/^([a-z]*)$/i;function ed(a){return Array.isArray(a)?a:fd(a)}function gd(a){if("string"!==typeof a){var b=a[0];b!=(b|0)&&(b=b+.5|0);var c=a[1];c!=(c|0)&&(c=c+.5|0);var d=a[2];d!=(d|0)&&(d=d+.5|0);a="rgba("+b+","+c+","+d+","+(void 0===a[3]?1:a[3])+")"}return a}
51
+var fd=function(){var a={},b=0;return function(c){if(a.hasOwnProperty(c))var d=a[c];else{if(1024<=b){d=0;for(var e in a)d++&3||(delete a[e],--b)}d=c;dd.exec(d)&&(e=document.createElement("div"),e.style.color=d,document.body.appendChild(e),d=getComputedStyle(e).color,document.body.removeChild(e));if(cd.exec(d)){var f=d.length-1;xa(3==f||6==f,54);var g=3==f?1:2;f=parseInt(d.substr(1+0*g,g),16);e=parseInt(d.substr(1+1*g,g),16);d=parseInt(d.substr(1+2*g,g),16);1==g&&(f=(f<<4)+f,e=(e<<4)+e,d=(d<<4)+d);
52
+f=[f,e,d,1]}else d.indexOf("rgba(")?d.indexOf("rgb(")?xa(!1,14):(d=d.slice(4,-1).split(",").map(Number),d.push(1),f=hd(d)):(d=d.slice(5,-1).split(",").map(Number),f=hd(d));d=f;a[c]=d;++b}return d}}();function hd(a){var b=[];b[0]=Ca(a[0]+.5|0,0,255);b[1]=Ca(a[1]+.5|0,0,255);b[2]=Ca(a[2]+.5|0,0,255);b[3]=Ca(a[3],0,1);return b};function id(a){return"string"===typeof a||a instanceof CanvasPattern||a instanceof CanvasGradient?a:gd(a)};function jd(a,b){var c=document.createElement("CANVAS");a&&(c.width=a);b&&(c.height=b);return c.getContext("2d")}function kd(a,b){var c=b.parentNode;c&&c.replaceChild(a,b)}function ld(a){a&&a.parentNode&&a.parentNode.removeChild(a)};function md(a){Tc.call(this);this.element=a.element?a.element:null;this.a=this.R=null;this.v=[];this.render=a.render?a.render:ua;a.target&&this.f(a.target)}v(md,Tc);md.prototype.ka=function(){ld(this.element);Tc.prototype.ka.call(this)};md.prototype.g=function(){return this.a};
53
+md.prototype.setMap=function(a){this.a&&ld(this.element);for(var b=0,c=this.v.length;b<c;++b)Ec(this.v[b]);this.v.length=0;if(this.a=a)(this.R?this.R:a.D).appendChild(this.element),this.render!==ua&&this.v.push(y(a,"postrender",this.render,this)),a.render()};md.prototype.f=function(a){this.R="string"===typeof a?document.getElementById(a):a};function nd(a){a=a?a:{};this.I=document.createElement("UL");this.u=document.createElement("LI");this.I.appendChild(this.u);this.u.style.display="none";this.c=void 0!==a.collapsed?a.collapsed:!0;this.o=void 0!==a.collapsible?a.collapsible:!0;this.o||(this.c=!1);var b=void 0!==a.className?a.className:"ol-attribution",c=void 0!==a.tipLabel?a.tipLabel:"Attributions",d=void 0!==a.collapseLabel?a.collapseLabel:"\u00bb";"string"===typeof d?(this.D=document.createElement("span"),this.D.textContent=d):this.D=
54
+d;d=void 0!==a.label?a.label:"i";"string"===typeof d?(this.C=document.createElement("span"),this.C.textContent=d):this.C=d;var e=this.o&&!this.c?this.D:this.C,d=document.createElement("button");d.setAttribute("type","button");d.title=c;d.appendChild(e);y(d,"click",this.Vm,this);c=document.createElement("div");c.className=b+" ol-unselectable ol-control"+(this.c&&this.o?" ol-collapsed":"")+(this.o?"":" ol-uncollapsible");c.appendChild(this.I);c.appendChild(d);md.call(this,{element:c,render:a.render?
55
+a.render:od,target:a.target});this.B=!0;this.l={};this.j={};this.T={}}v(nd,md);
56
+function od(a){if(a=a.frameState){var b,c,d,e,f,g=a.layerStatesArray,h=tb({},a.attributions),l={},m={},n=a.viewState.projection;var p=0;for(b=g.length;p<b;p++)if(e=g[p].layer.ha()){var q=w(e).toString();if(f=e.j){var r=0;for(c=f.length;r<c;r++){var u=f[r];var x=w(u).toString();if(!(x in h)){if(d=a.usedTiles[q]){var B=e.Ta(n);a:{var E=void 0;var A,L=u,oa=B,ha=n;if(L.a){for(E in d)if(E in L.a){var B=d[E];var ga=0;for(A=L.a[E].length;ga<A;++ga){var z=L.a[E][ga];if(Ba(z,B)){E=!0;break a}var M=oc(oa,zc(ha),
57
+parseInt(E,10)),ba=M.$-M.ca+1;if(B.ca<M.ca||B.$>M.$)if(Ba(z,new ya(Ia(B.ca,ba),Ia(B.$,ba),B.da,B.ia))||B.$-B.ca+1>ba&&Ba(z,M)){E=!0;break a}}}E=!1}else E=!0}}else E=!1;E?(x in l&&delete l[x],E=u.b,E in m||(m[E]=!0,h[x]=u)):l[x]=u}}}}b=[h,l];p=b[0];b=b[1];for(var da in this.l)da in p?(this.j[da]||(this.l[da].style.display="",this.j[da]=!0),delete p[da]):da in b?(this.j[da]&&(this.l[da].style.display="none",delete this.j[da]),delete b[da]):(ld(this.l[da]),delete this.l[da],delete this.j[da]);for(da in p)r=
58
+document.createElement("LI"),r.innerHTML=p[da].b,this.I.appendChild(r),this.l[da]=r,this.j[da]=!0;for(da in b)r=document.createElement("LI"),r.innerHTML=b[da].b,r.style.display="none",this.I.appendChild(r),this.l[da]=r;da=!wb(this.j)||!wb(a.logos);this.B!=da&&(this.element.style.display=da?"":"none",this.B=da);da&&wb(this.j)?this.element.classList.add("ol-logo-only"):this.element.classList.remove("ol-logo-only");a=a.logos;da=this.T;for(ca in da)ca in a||(ld(da[ca]),delete da[ca]);for(var fb in a)if(b=
59
+a[fb],b instanceof HTMLElement&&(this.u.appendChild(b),da[fb]=b),!(fb in da)){var ca=new Image;ca.src=fb;""===b?p=ca:(p=document.createElement("a"),p.href=b,p.appendChild(ca));this.u.appendChild(p);da[fb]=p}this.u.style.display=wb(a)?"none":""}else this.B&&(this.element.style.display="none",this.B=!1)}k=nd.prototype;k.Vm=function(a){a.preventDefault();pd(this)};function pd(a){a.element.classList.toggle("ol-collapsed");a.c?kd(a.D,a.C):kd(a.C,a.D);a.c=!a.c}k.Um=function(){return this.o};
60
+k.Xm=function(a){this.o!==a&&(this.o=a,this.element.classList.toggle("ol-uncollapsible"),!a&&this.c&&pd(this))};k.Wm=function(a){this.o&&this.c!==a&&pd(this)};k.Tm=function(){return this.c};function qd(a){return Math.pow(a,3)}function rd(a){return 1-qd(1-a)}function sd(a){return 3*a*a-2*a*a*a}function td(a){return a};function ud(a){a=a?a:{};var b=void 0!==a.className?a.className:"ol-rotate",c=void 0!==a.label?a.label:"\u21e7";this.c=null;"string"===typeof c?(this.c=document.createElement("span"),this.c.className="ol-compass",this.c.textContent=c):(this.c=c,this.c.classList.add("ol-compass"));var d=a.tipLabel?a.tipLabel:"Reset rotation",c=document.createElement("button");c.className=b+"-reset";c.setAttribute("type","button");c.title=d;c.appendChild(this.c);y(c,"click",ud.prototype.D,this);d=document.createElement("div");
61
+d.className=b+" ol-unselectable ol-control";d.appendChild(c);b=a.render?a.render:vd;this.o=a.resetNorth?a.resetNorth:void 0;md.call(this,{element:d,render:b,target:a.target});this.l=void 0!==a.duration?a.duration:250;this.j=void 0!==a.autoHide?a.autoHide:!0;this.u=void 0;this.j&&this.element.classList.add("ol-hidden")}v(ud,md);ud.prototype.D=function(a){a.preventDefault();this.o?this.o():(a=this.a.Z())&&void 0!==a.Qa()&&(0<this.l?a.animate({rotation:0,duration:this.l,easing:rd}):a.Oe(0))};
62
+function vd(a){if(a=a.frameState){a=a.viewState.rotation;if(a!=this.u){var b="rotate("+a+"rad)";if(this.j){var c=this.element.classList.contains("ol-hidden");c||a?c&&a&&this.element.classList.remove("ol-hidden"):this.element.classList.add("ol-hidden")}this.c.style.msTransform=b;this.c.style.webkitTransform=b;this.c.style.transform=b}this.u=a}};function wd(a){a=a?a:{};var b=void 0!==a.className?a.className:"ol-zoom",c=void 0!==a.delta?a.delta:1,d=void 0!==a.zoomInLabel?a.zoomInLabel:"+",e=void 0!==a.zoomOutLabel?a.zoomOutLabel:"\u2212",f=void 0!==a.zoomInTipLabel?a.zoomInTipLabel:"Zoom in",g=void 0!==a.zoomOutTipLabel?a.zoomOutTipLabel:"Zoom out",h=document.createElement("button");h.className=b+"-in";h.setAttribute("type","button");h.title=f;h.appendChild("string"===typeof d?document.createTextNode(d):d);y(h,"click",wd.prototype.j.bind(this,
63
+c));d=document.createElement("button");d.className=b+"-out";d.setAttribute("type","button");d.title=g;d.appendChild("string"===typeof e?document.createTextNode(e):e);y(d,"click",wd.prototype.j.bind(this,-c));c=document.createElement("div");c.className=b+" ol-unselectable ol-control";c.appendChild(h);c.appendChild(d);md.call(this,{element:c,target:a.target});this.c=void 0!==a.duration?a.duration:250}v(wd,md);
64
+wd.prototype.j=function(a,b){b.preventDefault();if(b=this.a.Z()){var c=b.Pa();c&&(a=b.constrainResolution(c,a),0<this.c?(b.Ic()&&b.ed(),b.animate({resolution:a,duration:this.c,easing:rd})):b.Vc(a))}};function xd(a){a=a?a:{};var b=new Yc;(void 0!==a.zoom?a.zoom:1)&&b.push(new wd(a.zoomOptions));(void 0!==a.rotate?a.rotate:1)&&b.push(new ud(a.rotateOptions));(void 0!==a.attribution?a.attribution:1)&&b.push(new nd(a.attributionOptions));return b};function yd(a){a=a?a:{};this.c=void 0!==a.className?a.className:"ol-full-screen";var b=void 0!==a.label?a.label:"\u2922";this.o="string"===typeof b?document.createTextNode(b):b;b=void 0!==a.labelActive?a.labelActive:"\u00d7";this.l="string"===typeof b?document.createTextNode(b):b;var c=a.tipLabel?a.tipLabel:"Toggle full-screen",b=document.createElement("button");b.className=this.c+"-"+zd();b.setAttribute("type","button");b.title=c;b.appendChild(this.o);y(b,"click",this.C,this);c=document.createElement("div");
65
+c.className=this.c+" ol-unselectable ol-control "+(Ad()?"":"ol-unsupported");c.appendChild(b);md.call(this,{element:c,target:a.target});this.D=void 0!==a.keys?a.keys:!1;this.j=a.source}v(yd,md);
66
+yd.prototype.C=function(a){a.preventDefault();Ad()&&(a=this.a)&&(zd()?document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():(a=this.j?"string"===typeof this.j?document.getElementById(this.j):this.j:a.jd(),this.D?a.mozRequestFullScreenWithKeys?a.mozRequestFullScreenWithKeys():a.webkitRequestFullscreen?a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):
67
+Bd(a):Bd(a)))};yd.prototype.u=function(){var a=this.element.firstElementChild,b=this.a;zd()?(a.className=this.c+"-true",kd(this.l,this.o)):(a.className=this.c+"-false",kd(this.o,this.l));b&&b.Ad()};yd.prototype.setMap=function(a){md.prototype.setMap.call(this,a);a&&this.v.push(y(document,Cd(),this.u,this))};
68
+function Ad(){var a=document.body;return!!(a.webkitRequestFullscreen||a.mozRequestFullScreen&&document.mozFullScreenEnabled||a.msRequestFullscreen&&document.msFullscreenEnabled||a.requestFullscreen&&document.fullscreenEnabled)}function zd(){return!!(document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||document.fullscreenElement)}
69
+function Bd(a){a.requestFullscreen?a.requestFullscreen():a.msRequestFullscreen?a.msRequestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen&&a.webkitRequestFullscreen()}var Cd=function(){var a;return function(){if(!a){var b=document.body;b.webkitRequestFullscreen?a="webkitfullscreenchange":b.mozRequestFullScreen?a="mozfullscreenchange":b.msRequestFullscreen?a="MSFullscreenChange":b.requestFullscreen&&(a="fullscreenchange")}return a}}();function Dd(a){a=a?a:{};var b=document.createElement("DIV");b.className=void 0!==a.className?a.className:"ol-mouse-position";md.call(this,{element:b,render:a.render?a.render:Ed,target:a.target});y(this,Vc(Fd),this.Ym,this);a.coordinateFormat&&this.kj(a.coordinateFormat);a.projection&&this.$h(a.projection);this.u=void 0!==a.undefinedHTML?a.undefinedHTML:"";this.l=b.innerHTML;this.o=this.j=this.c=null}v(Dd,md);
70
+function Ed(a){a=a.frameState;a?this.c!=a.viewState.projection&&(this.c=a.viewState.projection,this.j=null):this.c=null;Gd(this,this.o)}k=Dd.prototype;k.Ym=function(){this.j=null};k.xh=function(){return this.get(Hd)};k.Zh=function(){return this.get(Fd)};k.Ll=function(a){this.o=this.a.xe(a);Gd(this,this.o)};k.Ml=function(){Gd(this,null);this.o=null};k.setMap=function(a){md.prototype.setMap.call(this,a);a&&(a=a.a,this.v.push(y(a,"mousemove",this.Ll,this),y(a,"mouseout",this.Ml,this)))};
71
+k.kj=function(a){this.set(Hd,a)};k.$h=function(a){this.set(Fd,Tb(a))};function Gd(a,b){var c=a.u;if(b&&a.c){if(!a.j){var d=a.Zh();a.j=d?Vb(a.c,d):fc}if(b=a.a.Wa(b))a.j(b,b),c=(c=a.xh())?c(b):b.toString()}a.l&&c==a.l||(a.element.innerHTML=c,a.l=c)}var Fd="projection",Hd="coordinateFormat";function Id(a,b,c){Oc.call(this,a);this.map=b;this.frameState=void 0!==c?c:null}v(Id,Oc);function Jd(a,b,c,d,e){Id.call(this,a,b,e);this.originalEvent=c;this.pixel=b.xe(c);this.coordinate=b.Wa(this.pixel);this.dragging=void 0!==d?d:!1}v(Jd,Id);Jd.prototype.preventDefault=function(){Id.prototype.preventDefault.call(this);this.originalEvent.preventDefault()};Jd.prototype.stopPropagation=function(){Id.prototype.stopPropagation.call(this);this.originalEvent.stopPropagation()};var Kd=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function Ld(a,b){var c,d,e=Kd.length;for(d=0;d<e;++d)try{if(c=a.getContext(Kd[d],b))return c}catch(f){}return null};var Md,Nd="undefined"!==typeof navigator?navigator.userAgent.toLowerCase():"",Od=-1!==Nd.indexOf("firefox"),Pd=-1!==Nd.indexOf("safari")&&-1==Nd.indexOf("chrom"),Qd=-1!==Nd.indexOf("webkit")&&-1==Nd.indexOf("edge"),Rd=-1!==Nd.indexOf("macintosh"),Sd=window.devicePixelRatio||1,Td=!1,Ud=function(){if(!("HTMLCanvasElement"in window))return!1;try{var a=document.createElement("CANVAS").getContext("2d");return a?(void 0!==a.setLineDash&&(Td=!0),!0):!1}catch(b){return!1}}(),Vd="DeviceOrientationEvent"in
72
+window,Wd="geolocation"in navigator,Xd="ontouchstart"in window,Yd="PointerEvent"in window,Zd=!!navigator.msPointerEnabled,$d=!1,ae,be=[];if("WebGLRenderingContext"in window)try{var ce=Ld(document.createElement("CANVAS"),{failIfMajorPerformanceCaveat:!0});ce&&($d=!0,ae=ce.getParameter(ce.MAX_TEXTURE_SIZE),be=ce.getSupportedExtensions())}catch(a){}Md=$d;fa=be;ea=ae;var de={Iq:"singleclick",xq:"click",yq:"dblclick",Bq:"pointerdrag",Eq:"pointermove",Aq:"pointerdown",Hq:"pointerup",Gq:"pointerover",Fq:"pointerout",Cq:"pointerenter",Dq:"pointerleave",zq:"pointercancel"};function ee(a,b,c,d,e){Jd.call(this,a,b,c.b,d,e);this.b=c}v(ee,Jd);function fe(a,b){this.b=a;this.f=b};function ge(a){fe.call(this,a,{mousedown:this.fm,mousemove:this.gm,mouseup:this.jm,mouseover:this.im,mouseout:this.hm});this.a=a.i;this.i=[]}v(ge,fe);function he(a,b){a=a.i;var c=b.clientX;b=b.clientY;for(var d=0,e=a.length,f;d<e&&(f=a[d]);d++){var g=Math.abs(b-f[1]);if(25>=Math.abs(c-f[0])&&25>=g)return!0}return!1}function ie(a){var b=je(a,a),c=b.preventDefault;b.preventDefault=function(){a.preventDefault();c()};b.pointerId=1;b.isPrimary=!0;b.pointerType="mouse";return b}k=ge.prototype;
73
+k.fm=function(a){if(!he(this,a)){(1).toString()in this.a&&this.cancel(a);var b=ie(a);this.a[(1).toString()]=a;ke(this.b,"pointerdown",b,a)}};k.gm=function(a){if(!he(this,a)){var b=ie(a);ke(this.b,"pointermove",b,a)}};k.jm=function(a){if(!he(this,a)){var b=this.a[(1).toString()];b&&b.button===a.button&&(b=ie(a),ke(this.b,"pointerup",b,a),delete this.a[(1).toString()])}};k.im=function(a){if(!he(this,a)){var b=ie(a);le(this.b,b,a)}};k.hm=function(a){if(!he(this,a)){var b=ie(a);me(this.b,b,a)}};
74
+k.cancel=function(a){var b=ie(a);this.b.cancel(b,a);delete this.a[(1).toString()]};function ne(a){fe.call(this,a,{MSPointerDown:this.om,MSPointerMove:this.pm,MSPointerUp:this.sm,MSPointerOut:this.qm,MSPointerOver:this.rm,MSPointerCancel:this.nm,MSGotPointerCapture:this.lm,MSLostPointerCapture:this.mm});this.a=a.i;this.i=["","unavailable","touch","pen","mouse"]}v(ne,fe);function oe(a,b){var c=b;"number"===typeof b.pointerType&&(c=je(b,b),c.pointerType=a.i[b.pointerType]);return c}k=ne.prototype;
75
+k.om=function(a){this.a[a.pointerId.toString()]=a;var b=oe(this,a);ke(this.b,"pointerdown",b,a)};k.pm=function(a){var b=oe(this,a);ke(this.b,"pointermove",b,a)};k.sm=function(a){var b=oe(this,a);ke(this.b,"pointerup",b,a);delete this.a[a.pointerId.toString()]};k.qm=function(a){var b=oe(this,a);me(this.b,b,a)};k.rm=function(a){var b=oe(this,a);le(this.b,b,a)};k.nm=function(a){var b=oe(this,a);this.b.cancel(b,a);delete this.a[a.pointerId.toString()]};
76
+k.mm=function(a){this.b.b(new pe("lostpointercapture",a,a))};k.lm=function(a){this.b.b(new pe("gotpointercapture",a,a))};function qe(a){fe.call(this,a,{pointerdown:this.ip,pointermove:this.jp,pointerup:this.mp,pointerout:this.kp,pointerover:this.lp,pointercancel:this.hp,gotpointercapture:this.ul,lostpointercapture:this.em})}v(qe,fe);k=qe.prototype;k.ip=function(a){re(this.b,a)};k.jp=function(a){re(this.b,a)};k.mp=function(a){re(this.b,a)};k.kp=function(a){re(this.b,a)};k.lp=function(a){re(this.b,a)};k.hp=function(a){re(this.b,a)};k.em=function(a){re(this.b,a)};k.ul=function(a){re(this.b,a)};function pe(a,b,c){Oc.call(this,a);this.b=b;a=c?c:{};this.buttons=se(a);this.pressure=te(a,this.buttons);this.bubbles="bubbles"in a?a.bubbles:!1;this.cancelable="cancelable"in a?a.cancelable:!1;this.view="view"in a?a.view:null;this.detail="detail"in a?a.detail:null;this.screenX="screenX"in a?a.screenX:0;this.screenY="screenY"in a?a.screenY:0;this.clientX="clientX"in a?a.clientX:0;this.clientY="clientY"in a?a.clientY:0;this.ctrlKey="ctrlKey"in a?a.ctrlKey:!1;this.altKey="altKey"in a?a.altKey:!1;this.shiftKey=
77
+"shiftKey"in a?a.shiftKey:!1;this.metaKey="metaKey"in a?a.metaKey:!1;this.button="button"in a?a.button:0;this.relatedTarget="relatedTarget"in a?a.relatedTarget:null;this.pointerId="pointerId"in a?a.pointerId:0;this.width="width"in a?a.width:0;this.height="height"in a?a.height:0;this.tiltX="tiltX"in a?a.tiltX:0;this.tiltY="tiltY"in a?a.tiltY:0;this.pointerType="pointerType"in a?a.pointerType:"";this.isPrimary="isPrimary"in a?a.isPrimary:!1;b.preventDefault&&(this.preventDefault=function(){b.preventDefault()})}
78
+v(pe,Oc);function se(a){if(a.buttons||ue)a=a.buttons;else switch(a.which){case 1:a=1;break;case 2:a=4;break;case 3:a=2;break;default:a=0}return a}function te(a,b){var c=0;a.pressure?c=a.pressure:c=b?.5:0;return c}var ue=!1;try{ue=1===(new MouseEvent("click",{buttons:1})).buttons}catch(a){};function ve(a,b){fe.call(this,a,{touchstart:this.rq,touchmove:this.qq,touchend:this.pq,touchcancel:this.oq});this.a=a.i;this.j=b;this.i=void 0;this.g=0;this.c=void 0}v(ve,fe);k=ve.prototype;k.ij=function(){this.g=0;this.c=void 0};
79
+function we(a,b,c){b=je(b,c);b.pointerId=c.identifier+2;b.bubbles=!0;b.cancelable=!0;b.detail=a.g;b.button=0;b.buttons=1;b.width=c.webkitRadiusX||c.radiusX||0;b.height=c.webkitRadiusY||c.radiusY||0;b.pressure=c.webkitForce||c.force||.5;b.isPrimary=a.i===c.identifier;b.pointerType="touch";b.clientX=c.clientX;b.clientY=c.clientY;b.screenX=c.screenX;b.screenY=c.screenY;return b}
80
+function xe(a,b,c){function d(){b.preventDefault()}var e=Array.prototype.slice.call(b.changedTouches),f=e.length,g;for(g=0;g<f;++g){var h=we(a,b,e[g]);h.preventDefault=d;c.call(a,b,h)}}
81
+k.rq=function(a){var b=a.touches,c=Object.keys(this.a),d=c.length;if(d>=b.length){var e=[],f;for(f=0;f<d;++f){var g=c[f];var h=this.a[g];var l;if(!(l=1==g))a:{for(var m=b.length,n=0;n<m;n++)if(l=b[n],l.identifier===g-2){l=!0;break a}l=!1}l||e.push(h.out)}for(f=0;f<e.length;++f)this.Kf(a,e[f])}b=a.changedTouches[0];c=Object.keys(this.a).length;if(!c||1===c&&(1).toString()in this.a)this.i=b.identifier,void 0!==this.c&&clearTimeout(this.c);ye(this,a);this.g++;xe(this,a,this.cp)};
82
+k.cp=function(a,b){this.a[b.pointerId]={target:b.target,out:b,Wi:b.target};var c=this.b;b.bubbles=!0;ke(c,"pointerover",b,a);c=this.b;b.bubbles=!1;ke(c,"pointerenter",b,a);ke(this.b,"pointerdown",b,a)};k.qq=function(a){a.preventDefault();xe(this,a,this.km)};
83
+k.km=function(a,b){var c=this.a[b.pointerId];if(c){var d=c.out,e=c.Wi;ke(this.b,"pointermove",b,a);d&&e!==b.target&&(d.relatedTarget=b.target,b.relatedTarget=e,d.target=e,b.target?(me(this.b,d,a),le(this.b,b,a)):(b.target=e,b.relatedTarget=null,this.Kf(a,b)));c.out=b;c.Wi=b.target}};k.pq=function(a){ye(this,a);xe(this,a,this.sq)};
84
+k.sq=function(a,b){ke(this.b,"pointerup",b,a);this.b.out(b,a);ze(this.b,b,a);delete this.a[b.pointerId];b.isPrimary&&(this.i=void 0,this.c=setTimeout(this.ij.bind(this),200))};k.oq=function(a){xe(this,a,this.Kf)};k.Kf=function(a,b){this.b.cancel(b,a);this.b.out(b,a);ze(this.b,b,a);delete this.a[b.pointerId];b.isPrimary&&(this.i=void 0,this.c=setTimeout(this.ij.bind(this),200))};
85
+function ye(a,b){var c=a.j.i;b=b.changedTouches[0];if(a.i===b.identifier){var d=[b.clientX,b.clientY];c.push(d);setTimeout(function(){ma(c,d)},2500)}};function Ae(a){Qc.call(this);this.g=a;this.i={};this.f={};this.a=[];Yd?Be(this,new qe(this)):Zd?Be(this,new ne(this)):(a=new ge(this),Be(this,a),Xd&&Be(this,new ve(this,a)));a=this.a.length;for(var b,c=0;c<a;c++)b=this.a[c],Ce(this,Object.keys(b.f))}v(Ae,Qc);function Be(a,b){var c=Object.keys(b.f);c&&(c.forEach(function(a){var c=b.f[a];c&&(this.f[a]=c.bind(b))},a),a.a.push(b))}Ae.prototype.c=function(a){var b=this.f[a.type];b&&b(a)};
86
+function Ce(a,b){b.forEach(function(a){y(this.g,a,this.c,this)},a)}function De(a,b){b.forEach(function(a){Kc(this.g,a,this.c,this)},a)}function je(a,b){for(var c={},d,e=0,f=Ee.length;e<f;e++)d=Ee[e][0],c[d]=a[d]||b[d]||Ee[e][1];return c}function ze(a,b,c){b.bubbles=!1;ke(a,"pointerleave",b,c)}Ae.prototype.out=function(a,b){a.bubbles=!0;ke(this,"pointerout",a,b)};Ae.prototype.cancel=function(a,b){ke(this,"pointercancel",a,b)};
87
+function me(a,b,c){a.out(b,c);var d=b.target,e=b.relatedTarget;d&&e&&d.contains(e)||ze(a,b,c)}function le(a,b,c){b.bubbles=!0;ke(a,"pointerover",b,c);var d=b.target,e=b.relatedTarget;d&&e&&d.contains(e)||(b.bubbles=!1,ke(a,"pointerenter",b,c))}function ke(a,b,c,d){a.b(new pe(b,d,c))}function re(a,b){a.b(new pe(b.type,b,b))}Ae.prototype.ka=function(){for(var a=this.a.length,b,c=0;c<a;c++)b=this.a[c],De(this,Object.keys(b.f));Qc.prototype.ka.call(this)};
88
+var Ee=[["bubbles",!1],["cancelable",!1],["view",null],["detail",null],["screenX",0],["screenY",0],["clientX",0],["clientY",0],["ctrlKey",!1],["altKey",!1],["shiftKey",!1],["metaKey",!1],["button",0],["relatedTarget",null],["buttons",0],["pointerId",0],["width",0],["height",0],["pressure",0],["tiltX",0],["tiltY",0],["pointerType",""],["hwTimestamp",0],["isPrimary",!1],["type",""],["target",null],["currentTarget",null],["which",0]];function Fe(a,b){Qc.call(this);this.i=a;this.j=0;this.o=!1;this.f=[];this.D=b?b*Sd:Sd;this.c=null;a=this.i.a;this.S=0;this.u={};this.g=new Ae(a);this.a=null;this.l=y(this.g,"pointerdown",this.Ol,this);this.v=y(this.g,"pointermove",this.Lp,this)}v(Fe,Qc);function Ge(a,b){var c=new ee("click",a.i,b);a.b(c);a.j?(clearTimeout(a.j),a.j=0,c=new ee("dblclick",a.i,b),a.b(c)):a.j=setTimeout(function(){this.j=0;var a=new ee("singleclick",this.i,b);this.b(a)}.bind(a),250)}
89
+function He(a,b){"pointerup"==b.type||"pointercancel"==b.type?delete a.u[b.pointerId]:"pointerdown"==b.type&&(a.u[b.pointerId]=!0);a.S=Object.keys(a.u).length}k=Fe.prototype;k.Jh=function(a){He(this,a);var b=new ee("pointerup",this.i,a);this.b(b);this.o||a.button||Ge(this,this.c);this.S||(this.f.forEach(Ec),this.f.length=0,this.o=!1,this.c=null,Nc(this.a),this.a=null)};
90
+k.Ol=function(a){He(this,a);var b=new ee("pointerdown",this.i,a);this.b(b);this.c=a;this.f.length||(this.a=new Ae(document),this.f.push(y(this.a,"pointermove",this.Hm,this),y(this.a,"pointerup",this.Jh,this),y(this.g,"pointercancel",this.Jh,this)))};k.Hm=function(a){if(Ie(this,a)){this.o=!0;var b=new ee("pointerdrag",this.i,a,this.o);this.b(b)}a.preventDefault()};k.Lp=function(a){this.b(new ee(a.type,this.i,a,!(!this.c||!Ie(this,a))))};
91
+function Ie(a,b){return Math.abs(b.clientX-a.c.clientX)>a.D||Math.abs(b.clientY-a.c.clientY)>a.D}k.ka=function(){this.v&&(Ec(this.v),this.v=null);this.l&&(Ec(this.l),this.l=null);this.f.forEach(Ec);this.f.length=0;this.a&&(Nc(this.a),this.a=null);this.g&&(Nc(this.g),this.g=null);Qc.prototype.ka.call(this)};function Ke(a,b){this.l=a;this.c=b;this.b=[];this.i=[];this.a={}}Ke.prototype.clear=function(){this.b.length=0;this.i.length=0;ub(this.a)};function Le(a){var b=a.b,c=a.i,d=b[0];1==b.length?(b.length=0,c.length=0):(b[0]=b.pop(),c[0]=c.pop(),Me(a,0));b=a.c(d);delete a.a[b];return d}Ke.prototype.f=function(a){xa(!(this.c(a)in this.a),31);var b=this.l(a);return Infinity!=b?(this.b.push(a),this.i.push(b),this.a[this.c(a)]=!0,Ne(this,0,this.b.length-1),!0):!1};
92
+function Me(a,b){for(var c=a.b,d=a.i,e=c.length,f=c[b],g=d[b],h=b;b<e>>1;){var l=2*b+1,m=2*b+2,l=m<e&&d[m]<d[l]?m:l;c[b]=c[l];d[b]=d[l];b=l}c[b]=f;d[b]=g;Ne(a,h,b)}function Ne(a,b,c){var d=a.b;a=a.i;for(var e=d[c],f=a[c];c>b;){var g=c-1>>1;if(a[g]>f)d[c]=d[g],a[c]=a[g],c=g;else break}d[c]=e;a[c]=f}
93
+function Oe(a){var b=a.l,c=a.b,d=a.i,e=0,f=c.length,g;for(g=0;g<f;++g){var h=c[g];var l=b(h);Infinity==l?delete a.a[a.c(h)]:(d[e]=l,c[e++]=h)}c.length=e;d.length=e;for(b=(a.b.length>>1)-1;0<=b;b--)Me(a,b)};function Pe(a,b){Ke.call(this,function(b){return a.apply(null,b)},function(a){return a[0].bb()});this.v=b;this.j=0;this.g={}}v(Pe,Ke);Pe.prototype.f=function(a){var b=Ke.prototype.f.call(this,a);b&&y(a[0],"change",this.o,this);return b};Pe.prototype.o=function(a){a=a.target;var b=a.getState();if(2===b||3===b||4===b||5===b)Kc(a,"change",this.o,this),a=a.bb(),a in this.g&&(delete this.g[a],--this.j),this.v()};
94
+function Qe(a,b,c){for(var d=0,e,f;a.j<b&&d<c&&0<a.b.length;)e=Le(a)[0],f=e.bb(),0!==e.getState()||f in a.g||(a.g[f]=!0,++a.j,++d,e.load())};function Re(a){return function(b,c,d){if(void 0!==b)return b=ka(a,b,d),b=Ca(b+c,0,a.length-1),c=Math.floor(b),b!=c&&c<a.length-1?a[c]/Math.pow(a[c]/a[c+1],b-c):a[c]}}function Se(a,b,c){return function(d,e,f){if(void 0!==d)return d=Math.max(Math.floor(Math.log(b/d)/Math.log(a)+(-f/2+.5))+e,0),void 0!==c&&(d=Math.min(d,c)),b/Math.pow(a,d)}};function Te(a){if(void 0!==a)return 0}function Ue(a,b){if(void 0!==a)return a+b}function Ve(a){var b=2*Math.PI/a;return function(a,d){if(void 0!==a)return a=Math.floor((a+d)/b+.5)*b}}function We(){var a=Ha(5);return function(b,c){if(void 0!==b)return Math.abs(b+c)<=a?0:b+c}};function Xe(a,b){a=void 0!==b?a.toFixed(b):""+a;b=a.indexOf(".");b=-1===b?a.length:b;return 2<b?a:Array(3-b).join("0")+a}function Ye(a){a=(""+a).split(".");for(var b=["1","3"],c=0;c<Math.max(a.length,b.length);c++){var d=parseInt(a[c]||"0",10),e=parseInt(b[c]||"0",10);if(d>e)return 1;if(e>d)return-1}return 0};function Ze(a,b){a[0]+=b[0];a[1]+=b[1];return a}function $e(a,b){var c=b.pd(),d=b.wa();b=d[0];var d=d[1],e=a[0]-b;a=a[1]-d;e||a||(e=1);var f=Math.sqrt(e*e+a*a);return[b+c*e/f,d+c*a/f]}function af(a,b){var c=a[0];a=a[1];var d=b[0],e=b[1];b=d[0];var d=d[1],f=e[0],e=e[1],g=f-b,h=e-d,c=g||h?(g*(c-b)+h*(a-d))/(g*g+h*h||0):0;0>=c?(a=b,c=d):1<=c?(a=f,c=e):(a=b+c*g,c=d+c*h);return[a,c]}
95
+function bf(a,b,c){b=Ia(b+180,360)-180;var d=Math.abs(3600*b);c=c||0;var e=Math.pow(10,c),f=Math.floor(d/3600),g=Math.floor((d-3600*f)/60),d=Math.ceil((d-3600*f-60*g)*e)/e;60<=d&&(d=0,g+=1);60<=g&&(g=0,f+=1);return f+"\u00b0 "+Xe(g)+"\u2032 "+Xe(d,c)+"\u2033"+(b?" "+a.charAt(0>b?1:0):"")}function cf(a,b,c){return a?b.replace("{x}",a[0].toFixed(c)).replace("{y}",a[1].toFixed(c)):""}function df(a,b){for(var c=!0,d=a.length-1;0<=d;--d)if(a[d]!=b[d]){c=!1;break}return c}
96
+function ef(a,b){var c=Math.cos(b);b=Math.sin(b);var d=a[1]*c+a[0]*b;a[0]=a[0]*c-a[1]*b;a[1]=d;return a}function gf(a,b){a[0]*=b;a[1]*=b}function hf(a,b){var c=a[0]-b[0];a=a[1]-b[1];return c*c+a*a}function jf(a,b){return Math.sqrt(hf(a,b))}function kf(a,b){return hf(a,af(a,b))}function lf(a,b){return cf(a,"{x}, {y}",b)};function mf(){return!0}function nf(){return!1};function of(){Tc.call(this);this.l=Oa();this.v=-1;this.f={};this.o=this.g=0}v(of,Tc);k=of.prototype;k.Ab=function(a,b){b=b?b:[NaN,NaN];this.Kb(a[0],a[1],b,Infinity);return b};k.sb=function(a){return this.Mc(a[0],a[1])};k.Mc=nf;k.G=function(a){this.v!=this.i&&(this.l=this.se(this.l),this.v=this.i);var b=this.l;a?(a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=b[3]):a=b;return a};k.Rb=function(a){return this.Vd(a*a)};k.tb=function(a,b){this.Dc(ec(a,b));return this};function pf(a,b,c,d,e,f){for(var g=f?f:[],h=0;b<c;b+=d){var l=a[b],m=a[b+1];g[h++]=e[0]*l+e[2]*m+e[4];g[h++]=e[1]*l+e[3]*m+e[5]}f&&g.length!=h&&(g.length=h);return g}function qf(a,b,c,d,e,f,g){for(var h=g?g:[],l=0,m;b<c;b+=d)for(h[l++]=a[b]+e,h[l++]=a[b+1]+f,m=b+2;m<b+d;++m)h[l++]=a[m];g&&h.length!=l&&(h.length=l);return h};function rf(){of.call(this);this.ja="XY";this.a=2;this.A=null}v(rf,of);function sf(a){var b;"XY"==a?b=2:"XYZ"==a||"XYM"==a?b=3:"XYZM"==a&&(b=4);return b}k=rf.prototype;k.Mc=nf;k.se=function(a){return $a(this.A,0,this.A.length,this.a,a)};k.ac=function(){return this.A.slice(0,this.a)};k.ga=function(){return this.A};k.bc=function(){return this.A.slice(this.A.length-this.a)};k.cc=function(){return this.ja};
97
+k.Vd=function(a){this.o!=this.i&&(ub(this.f),this.g=0,this.o=this.i);if(0>a||this.g&&a<=this.g)return this;var b=a.toString();if(this.f.hasOwnProperty(b))return this.f[b];var c=this.hd(a);if(c.ga().length<this.A.length)return this.f[b]=c;this.g=a;return this};k.hd=function(){return this};k.qa=function(){return this.a};function tf(a,b,c){a.a=sf(b);a.ja=b;a.A=c}
98
+function uf(a,b,c,d){if(b)c=sf(b);else{for(b=0;b<d;++b)if(c.length)c=c[0];else{a.ja="XY";a.a=2;return}c=c.length;var e;2==c?e="XY":3==c?e="XYZ":4==c&&(e="XYZM");b=e}a.ja=b;a.a=c}k.Dc=function(a){this.A&&(a(this.A,this.A,this.a),this.s())};
99
+k.rotate=function(a,b){var c=this.ga();if(c){var d=c.length,e=this.qa(),f=c?c:[],g=Math.cos(a);a=Math.sin(a);var h=b[0];b=b[1];for(var l=0,m=0;m<d;m+=e){var n=c[m]-h,p=c[m+1]-b;f[l++]=h+n*g-p*a;f[l++]=b+n*a+p*g;for(n=m+2;n<m+e;++n)f[l++]=c[n]}c&&f.length!=l&&(f.length=l);this.s()}};
100
+k.scale=function(a,b,c){var d=b;void 0===d&&(d=a);var e=c;e||(e=nb(this.G()));if(c=this.ga()){b=c.length;for(var f=this.qa(),g=c?c:[],h=e[0],e=e[1],l=0,m=0;m<b;m+=f){var n=c[m]-h,p=c[m+1]-e;g[l++]=h+a*n;g[l++]=e+d*p;for(n=m+2;n<m+f;++n)g[l++]=c[n]}c&&g.length!=l&&(g.length=l);this.s()}};k.translate=function(a,b){var c=this.ga();c&&(qf(c,0,c.length,this.qa(),a,b,c),this.s())};function vf(a,b,c,d){for(var e=0,f=a[c-d],g=a[c-d+1];b<c;b+=d)var h=a[b],l=a[b+1],e=e+(g*h-f*l),f=h,g=l;return e/2}function wf(a,b,c,d){var e=0,f;var g=0;for(f=c.length;g<f;++g){var h=c[g],e=e+vf(a,b,h,d);b=h}return e};function xf(a,b,c,d,e,f,g){var h=a[b],l=a[b+1],m=a[c]-h,n=a[c+1]-l;if(m||n)if(f=((e-h)*m+(f-l)*n)/(m*m+n*n),1<f)b=c;else if(0<f){for(e=0;e<d;++e)g[e]=Ja(a[b+e],a[c+e],f);g.length=d;return}for(e=0;e<d;++e)g[e]=a[b+e];g.length=d}function yf(a,b,c,d,e){var f=a[b],g=a[b+1];for(b+=d;b<c;b+=d){var h=a[b],l=a[b+1],f=Ga(f,g,h,l);f>e&&(e=f);f=h;g=l}return e}function zf(a,b,c,d,e){var f;var g=0;for(f=c.length;g<f;++g){var h=c[g];e=yf(a,b,h,d,e);b=h}return e}
101
+function Af(a,b,c,d,e,f,g,h,l,m,n){if(b==c)return m;if(!e){var p=Ga(g,h,a[b],a[b+1]);if(p<m){for(n=0;n<d;++n)l[n]=a[b+n];l.length=d;return p}return m}for(var q=n?n:[NaN,NaN],r=b+d;r<c;)if(xf(a,r-d,r,d,g,h,q),p=Ga(g,h,q[0],q[1]),p<m){m=p;for(n=0;n<d;++n)l[n]=q[n];l.length=d;r+=d}else r+=d*Math.max((Math.sqrt(p)-Math.sqrt(m))/e|0,1);if(f&&(xf(a,c-d,b,d,g,h,q),p=Ga(g,h,q[0],q[1]),p<m)){m=p;for(n=0;n<d;++n)l[n]=q[n];l.length=d}return m}
102
+function Bf(a,b,c,d,e,f,g,h,l,m,n){n=n?n:[NaN,NaN];var p;var q=0;for(p=c.length;q<p;++q){var r=c[q];m=Af(a,b,r,d,e,f,g,h,l,m,n);b=r}return m};function Cf(a,b){var c=0,d;var e=0;for(d=b.length;e<d;++e)a[c++]=b[e];return c}function Df(a,b,c,d){var e;var f=0;for(e=c.length;f<e;++f){var g=c[f],h;for(h=0;h<d;++h)a[b++]=g[h]}return b}function Ef(a,b,c,d,e){e=e?e:[];var f=0,g;var h=0;for(g=c.length;h<g;++h)b=Df(a,b,c[h],d),e[f++]=b;e.length=f;return e};function Ff(a,b,c,d,e){e=void 0!==e?e:[];for(var f=0;b<c;b+=d)e[f++]=a.slice(b,b+d);e.length=f;return e}function Gf(a,b,c,d,e){e=void 0!==e?e:[];var f=0,g;var h=0;for(g=c.length;h<g;++h){var l=c[h];e[f++]=Ff(a,b,l,d,e[f]);b=l}e.length=f;return e};function Hf(a,b,c,d,e,f,g){var h=(c-b)/d;if(3>h){for(;b<c;b+=d)f[g++]=a[b],f[g++]=a[b+1];return g}var l=Array(h);l[0]=1;l[h-1]=1;c=[b,c-d];for(var m=0,n;0<c.length;){var p=c.pop(),q=c.pop(),r=0,u=a[q],x=a[q+1],B=a[p],E=a[p+1];for(n=q+d;n<p;n+=d){var A=Fa(a[n],a[n+1],u,x,B,E);A>r&&(m=n,r=A)}r>e&&(l[(m-b)/d]=1,q+d<m&&c.push(q,m),m+d<p&&c.push(m,p))}for(n=0;n<h;++n)l[n]&&(f[g++]=a[b+n*d],f[g++]=a[b+n*d+1]);return g}
103
+function If(a,b,c,d,e,f,g,h){var l;var m=0;for(l=c.length;m<l;++m){var n=c[m];a:{var p=a,q=n,r=d,u=e,x=f,B=g;if(b!=q){var E=u*Math.round(p[b]/u),A=u*Math.round(p[b+1]/u);b+=r;x[B++]=E;x[B++]=A;do{var L=u*Math.round(p[b]/u);g=u*Math.round(p[b+1]/u);b+=r;if(b==q){x[B++]=L;x[B++]=g;g=B;break a}}while(L==E&&g==A);for(;b<q;){var oa=u*Math.round(p[b]/u);var ha=u*Math.round(p[b+1]/u);b+=r;if(oa!=L||ha!=g){var ga=L-E,z=g-A,M=oa-E,ba=ha-A;ga*ba==z*M&&(0>ga&&M<ga||ga==M||0<ga&&M>ga)&&(0>z&&ba<z||z==ba||0<z&&
104
+ba>z)||(x[B++]=L,x[B++]=g,E=L,A=g);L=oa;g=ha}}x[B++]=L;x[B++]=g}g=B}h.push(g);b=n}return g};function Jf(a,b){rf.call(this);this.c=this.j=-1;this.ma(a,b)}v(Jf,rf);k=Jf.prototype;k.clone=function(){var a=new Jf(null);Kf(a,this.ja,this.A.slice());return a};k.Kb=function(a,b,c,d){if(d<Sa(this.G(),a,b))return d;this.c!=this.i&&(this.j=Math.sqrt(yf(this.A,0,this.A.length,this.a,0)),this.c=this.i);return Af(this.A,0,this.A.length,this.a,this.j,!0,a,b,c,d)};k.qn=function(){return vf(this.A,0,this.A.length,this.a)};k.X=function(){return Ff(this.A,0,this.A.length,this.a)};
105
+k.hd=function(a){var b=[];b.length=Hf(this.A,0,this.A.length,this.a,a,b,0);a=new Jf(null);Kf(a,"XY",b);return a};k.U=function(){return"LinearRing"};k.Xa=function(){};k.ma=function(a,b){a?(uf(this,b,a,1),this.A||(this.A=[]),this.A.length=Df(this.A,0,a,this.a),this.s()):Kf(this,"XY",null)};function Kf(a,b,c){tf(a,b,c);a.s()};function C(a,b){rf.call(this);this.ma(a,b)}v(C,rf);k=C.prototype;k.clone=function(){var a=new C(null);a.ba(this.ja,this.A.slice());return a};k.Kb=function(a,b,c,d){var e=this.A;a=Ga(a,b,e[0],e[1]);if(a<d){d=this.a;for(b=0;b<d;++b)c[b]=e[b];c.length=d;return a}return d};k.X=function(){return this.A?this.A.slice():[]};k.se=function(a){return Za(this.A,a)};k.U=function(){return"Point"};k.Xa=function(a){return Ua(a,this.A[0],this.A[1])};
106
+k.ma=function(a,b){a?(uf(this,b,a,0),this.A||(this.A=[]),this.A.length=Cf(this.A,a),this.s()):this.ba("XY",null)};k.ba=function(a,b){tf(this,a,b);this.s()};function Lf(a,b,c,d,e){return!db(e,function(e){return!Mf(a,b,c,d,e[0],e[1])})}function Mf(a,b,c,d,e,f){for(var g=0,h=a[c-d],l=a[c-d+1];b<c;b+=d){var m=a[b],n=a[b+1];l<=f?n>f&&0<(m-h)*(f-l)-(e-h)*(n-l)&&g++:n<=f&&0>(m-h)*(f-l)-(e-h)*(n-l)&&g--;h=m;l=n}return!!g}function Nf(a,b,c,d,e,f){if(!c.length||!Mf(a,b,c[0],d,e,f))return!1;var g;b=1;for(g=c.length;b<g;++b)if(Mf(a,c[b-1],c[b],d,e,f))return!1;return!0};function Of(a,b,c,d,e,f,g){var h,l=e[f+1],m=[],n=c[0];var p=a[n-d];var q=a[n-d+1];for(h=b;h<n;h+=d){var r=a[h];var u=a[h+1];if(l<=q&&u<=l||q<=l&&l<=u)p=(l-q)/(u-q)*(r-p)+p,m.push(p);p=r;q=u}n=NaN;q=-Infinity;m.sort(ia);p=m[0];h=1;for(u=m.length;h<u;++h){r=m[h];var x=Math.abs(r-p);x>q&&(p=(p+r)/2,Nf(a,b,c,d,p,l)&&(n=p,q=x));p=r}isNaN(n)&&(n=e[f]);return g?(g.push(n,l),g):[n,l]};function Pf(a,b,c,d,e,f){for(var g=[a[b],a[b+1]],h=[],l;b+d<c;b+=d){h[0]=a[b+d];h[1]=a[b+d+1];if(l=e.call(f,g,h))return l;g[0]=h[0];g[1]=h[1]}return!1};function Qf(a,b,c,d,e){var f=ab(Oa(),a,b,c,d);return qb(e,f)?Va(e,f)||f[0]>=e[0]&&f[2]<=e[2]||f[1]>=e[1]&&f[3]<=e[3]?!0:Pf(a,b,c,d,function(a,b){var c=!1,d=Wa(e,a),f=Wa(e,b);if(1===d||1===f)c=!0;else{var g=e[0],h=e[1],r=e[2],u=e[3],x=b[0];b=b[1];a=(b-a[1])/(x-a[0]);f&2&&!(d&2)&&(c=x-(b-u)/a,c=c>=g&&c<=r);c||!(f&4)||d&4||(c=b-(x-r)*a,c=c>=h&&c<=u);c||!(f&8)||d&8||(c=x-(b-h)/a,c=c>=g&&c<=r);c||!(f&16)||d&16||(c=b-(x-g)*a,c=c>=h&&c<=u)}return c}):!1}
107
+function Rf(a,b,c,d,e){var f=c[0];if(!(Qf(a,b,f,d,e)||Mf(a,b,f,d,e[0],e[1])||Mf(a,b,f,d,e[0],e[3])||Mf(a,b,f,d,e[2],e[1])||Mf(a,b,f,d,e[2],e[3])))return!1;if(1===c.length)return!0;b=1;for(f=c.length;b<f;++b)if(Lf(a,c[b-1],c[b],d,e))return!1;return!0};function Sf(a,b,c,d){for(var e=0,f=a[c-d],g=a[c-d+1];b<c;b+=d)var h=a[b],l=a[b+1],e=e+(h-f)*(l+g),f=h,g=l;return 0<e}function Tf(a,b,c,d){var e=0;d=void 0!==d?d:!1;var f;var g=0;for(f=b.length;g<f;++g){var h=b[g],e=Sf(a,e,h,c);if(!g){if(d&&e||!d&&!e)return!1}else if(d&&!e||!d&&e)return!1;e=h}return!0}
108
+function Uf(a,b,c,d,e){e=void 0!==e?e:!1;var f;var g=0;for(f=c.length;g<f;++g){var h=c[g],l=Sf(a,b,h,d);if(g?e&&!l||!e&&l:e&&l||!e&&!l)for(var l=a,m=h,n=d;b<m-n;){var p;for(p=0;p<n;++p){var q=l[b+p];l[b+p]=l[m-n+p];l[m-n+p]=q}b+=n;m-=n}b=h}return b}function Vf(a,b,c,d){var e=0,f;var g=0;for(f=b.length;g<f;++g)e=Uf(a,e,b[g],c,d);return e};function D(a,b){rf.call(this);this.c=[];this.u=-1;this.D=null;this.I=this.C=this.B=-1;this.j=null;this.ma(a,b)}v(D,rf);k=D.prototype;k.pk=function(a){this.A?la(this.A,a.ga()):this.A=a.ga().slice();this.c.push(this.A.length);this.s()};k.clone=function(){var a=new D(null);a.ba(this.ja,this.A.slice(),this.c.slice());return a};
109
+k.Kb=function(a,b,c,d){if(d<Sa(this.G(),a,b))return d;this.C!=this.i&&(this.B=Math.sqrt(zf(this.A,0,this.c,this.a,0)),this.C=this.i);return Bf(this.A,0,this.c,this.a,this.B,!0,a,b,c,d)};k.Mc=function(a,b){return Nf(this.ec(),0,this.c,this.a,a,b)};k.tn=function(){return wf(this.ec(),0,this.c,this.a)};k.X=function(a){if(void 0!==a){var b=this.ec().slice();Uf(b,0,this.c,this.a,a)}else b=this.A;return Gf(b,0,this.c,this.a)};k.Bb=function(){return this.c};
110
+function Wf(a){if(a.u!=a.i){var b=nb(a.G());a.D=Of(a.ec(),0,a.c,a.a,b,0);a.u=a.i}return a.D}k.Tk=function(){return new C(Wf(this))};k.Zk=function(){return this.c.length};k.Ch=function(a){if(0>a||this.c.length<=a)return null;var b=new Jf(null);Kf(b,this.ja,this.A.slice(a?this.c[a-1]:0,this.c[a]));return b};k.Sd=function(){var a=this.ja,b=this.A,c=this.c,d=[],e=0,f;var g=0;for(f=c.length;g<f;++g){var h=c[g],l=new Jf(null);Kf(l,a,b.slice(e,h));d.push(l);e=h}return d};
111
+k.ec=function(){if(this.I!=this.i){var a=this.A;Tf(a,this.c,this.a)?this.j=a:(this.j=a.slice(),this.j.length=Uf(this.j,0,this.c,this.a));this.I=this.i}return this.j};k.hd=function(a){var b=[],c=[];b.length=If(this.A,0,this.c,this.a,Math.sqrt(a),b,0,c);a=new D(null);a.ba("XY",b,c);return a};k.U=function(){return"Polygon"};k.Xa=function(a){return Rf(this.ec(),0,this.c,this.a,a)};
112
+k.ma=function(a,b){a?(uf(this,b,a,2),this.A||(this.A=[]),a=Ef(this.A,0,a,this.a,this.c),this.A.length=a.length?a[a.length-1]:0,this.s()):this.ba("XY",null,this.c)};k.ba=function(a,b,c){tf(this,a,b);this.c=c;this.s()};function Xf(a,b,c,d){var e=d?d:32;d=[];var f;for(f=0;f<e;++f)la(d,a.offset(b,c,2*Math.PI*f/e));d.push(d[0],d[1]);a=new D(null);a.ba("XY",d,[d.length]);return a}function Yf(a){var b=a[0],c=a[1],d=a[2];a=a[3];b=[b,c,b,a,d,a,d,c,b,c];c=new D(null);c.ba("XY",b,[b.length]);return c}
113
+function Zf(a,b,c){var d=b?b:32,e=a.qa();b=a.ja;for(var f=new D(null,b),d=e*(d+1),e=Array(d),g=0;g<d;g++)e[g]=0;f.ba(b,e,[e.length]);$f(f,a.wa(),a.pd(),c);return f}function $f(a,b,c,d){var e=a.ga(),f=a.ja,g=a.qa(),h=a.Bb(),l=e.length/g-1;d=d?d:0;for(var m,n,p=0;p<=l;++p)n=p*g,m=d+2*Ia(p,l)*Math.PI/l,e[n]=b[0]+c*Math.cos(m),e[n+1]=b[1]+c*Math.sin(m);a.ba(f,e,h)};function F(a){Tc.call(this);a=tb({},a);this.o=[0,0];this.c=[];this.wf=this.wf.bind(this);this.v=$b(a.projection);ag(this,a)}v(F,Tc);
114
+function ag(a,b){var c={};c.center=void 0!==b.center?b.center:null;var d=void 0!==b.minZoom?b.minZoom:0;var e=void 0!==b.maxZoom?b.maxZoom:28;var f=void 0!==b.zoomFactor?b.zoomFactor:2;if(void 0!==b.resolutions){e=b.resolutions;var g=e[0];var h=e[e.length-1];e=Re(e)}else{g=$b(b.projection);h=g.G();var l=(h?Math.max(lb(h),mb(h)):360*zb.degrees/g.sc())/256/Math.pow(2,0),m=l/Math.pow(2,28);g=b.maxResolution;void 0!==g?d=0:g=l/Math.pow(f,d);h=b.minResolution;void 0===h&&(h=void 0!==b.maxZoom?void 0!==
115
+b.maxResolution?g/Math.pow(f,e):l/Math.pow(f,e):m);e=d+Math.floor(Math.log(g/h)/Math.log(f));h=g/Math.pow(f,e-d);e=Se(f,g,e-d)}a.a=g;a.f=h;a.C=f;a.j=b.resolutions;a.l=d;(void 0!==b.enableRotation?b.enableRotation:1)?(d=b.constrainRotation,d=void 0===d||!0===d?We():!1===d?Ue:"number"===typeof d?Ve(d):Ue):d=Te;a.g={center:void 0!==b.extent?Bc(b.extent):Cc,resolution:e,rotation:d};void 0!==b.resolution?c.resolution=b.resolution:void 0!==b.zoom&&(c.resolution=a.constrainResolution(a.a,b.zoom-a.l));c.rotation=
116
+void 0!==b.rotation?b.rotation:0;a.H(c);a.D=b}function bg(a,b){var c=tb({},a.D);void 0!==c.resolution?c.resolution=a.Pa():c.zoom=a.Hh();c.center=a.wa();c.rotation=a.Qa();return tb({},c,b)}k=F.prototype;
117
+k.animate=function(a){var b=Date.now(),c=this.wa().slice(),d=this.Pa(),e=this.Qa(),f=arguments.length;if(1<f&&"function"===typeof arguments[f-1]){var g=arguments[f-1];--f}for(var h=[],l=0;l<f;++l){var m=arguments[l],n={start:b,complete:!1,anchor:m.anchor,duration:void 0!==m.duration?m.duration:1E3,easing:m.easing||sd};m.center&&(n.Rg=c,n.Tg=m.center,c=n.Tg);void 0!==m.zoom?(n.tf=d,n.zd=this.constrainResolution(this.a,m.zoom-this.l,0),d=n.zd):m.resolution&&(n.tf=d,n.zd=m.resolution,d=n.zd);void 0!==
118
+m.rotation&&(n.Sg=e,n.uf=m.rotation,e=n.uf);n.callback=g;b+=n.duration;h.push(n)}this.c.push(h);cg(this,0,1);this.wf()};k.Ic=function(){return 0<dg(this)[0]};k.Rk=function(){return 0<dg(this)[1]};k.ed=function(){cg(this,0,-dg(this)[0]);for(var a=0,b=this.c.length;a<b;++a){var c=this.c[a];c[0].callback&&c[0].callback(!1)}this.c.length=0};
119
+k.wf=function(){void 0!==this.u&&(cancelAnimationFrame(this.u),this.u=void 0);if(this.Ic()){for(var a=Date.now(),b=!1,c=this.c.length-1;0<=c;--c){for(var d=this.c[c],e=!0,f=0,g=d.length;f<g;++f){var h=d[f];if(!h.complete){b=a-h.start;b=0<h.duration?b/h.duration:1;1<=b?(h.complete=!0,b=1):e=!1;b=h.easing(b);if(h.Rg){var l=h.Rg[0],m=h.Rg[1];this.set("center",[l+b*(h.Tg[0]-l),m+b*(h.Tg[1]-m)])}h.tf&&h.zd&&(l=1===b?h.zd:h.tf+b*(h.zd-h.tf),h.anchor&&this.set("center",eg(this,l,h.anchor)),this.set("resolution",
120
+l));void 0!==h.Sg&&void 0!==h.uf&&(b=1===b?h.uf:h.Sg+b*(h.uf-h.Sg),h.anchor&&this.set("center",fg(this,b,h.anchor)),this.set("rotation",b));b=!0;if(!h.complete)break}}e&&(this.c[c]=null,cg(this,0,-1),(d=d[0].callback)&&d(!0))}this.c=this.c.filter(Boolean);b&&void 0===this.u&&(this.u=requestAnimationFrame(this.wf))}};function fg(a,b,c){var d=a.wa();if(void 0!==d){var e=[d[0]-c[0],d[1]-c[1]];ef(e,b-a.Qa());Ze(e,c)}return e}
121
+function eg(a,b,c){var d,e=a.wa();a=a.Pa();void 0!==e&&void 0!==a&&(d=[c[0]-b*(c[0]-e[0])/a,c[1]-b*(c[1]-e[1])/a]);return d}function gg(a){var b=[100,100];a='.ol-viewport[data-view="'+w(a)+'"]';if(a=document.querySelector(a))a=getComputedStyle(a),b[0]=parseInt(a.width,10),b[1]=parseInt(a.height,10);return b}k.Ec=function(a){return this.g.center(a)};k.constrainResolution=function(a,b,c){return this.g.resolution(a,b||0,c||0)};k.constrainRotation=function(a,b){return this.g.rotation(a,b||0)};k.wa=function(){return this.get("center")};
122
+function dg(a,b){return void 0!==b?(b[0]=a.o[0],b[1]=a.o[1],b):a.o.slice()}k.dd=function(a){a=a||gg(this);var b=this.wa();xa(b,1);var c=this.Pa();xa(void 0!==c,2);var d=this.Qa();xa(void 0!==d,3);return ob(b,c,d,a)};k.Nm=function(){return this.a};k.Pm=function(){return this.f};k.Om=function(){return this.Ce(this.f)};k.eq=function(a){ag(this,bg(this,{maxZoom:a}))};k.Qm=function(){return this.Ce(this.a)};k.fq=function(a){ag(this,bg(this,{minZoom:a}))};k.Rm=function(){return this.v};k.Pa=function(){return this.get("resolution")};
123
+k.Sm=function(){return this.j};k.ze=function(a,b){b=b||gg(this);return Math.max(lb(a)/b[0],mb(a)/b[1])};function hg(a){var b=a.a,c=Math.log(b/a.f)/Math.log(2);return function(a){return b/Math.pow(2,a*c)}}k.Qa=function(){return this.get("rotation")};function ig(a){var b=a.a,c=Math.log(b/a.f)/Math.log(2);return function(a){return Math.log(b/a)/Math.log(2)/c}}k.getState=function(){var a=this.wa(),b=this.v,c=this.Pa(),d=this.Qa();return{center:a.slice(),projection:void 0!==b?b:null,resolution:c,rotation:d}};
124
+k.Hh=function(){var a,b=this.Pa();void 0!==b&&(a=this.Ce(b));return a};k.Ce=function(a){if(a>=this.f&&a<=this.a){var b=this.l||0;if(this.j){var c=ka(this.j,a,1);b+=c;if(c==this.j.length-1)return b;var d=this.j[c];c=d/this.j[c+1]}else d=this.a,c=this.C;b+=Math.log(d/a)/Math.log(c)}return b};
125
+k.Qf=function(a,b){b=b||{};var c=b.size;c||(c=gg(this));if(a instanceof rf)if("Circle"===a.U()){a=a.G();var d=Yf(a);d.rotate(this.Qa(),nb(a))}else d=a;else xa(Array.isArray(a),24),xa(!kb(a),25),d=Yf(a);var e=b.padding?b.padding:[0,0,0,0],f=void 0!==b.constrainResolution?b.constrainResolution:!0,g=void 0!==b.nearest?b.nearest:!1,h;void 0!==b.minResolution?h=b.minResolution:void 0!==b.maxZoom?h=this.constrainResolution(this.a,b.maxZoom-this.l,0):h=0;var l=d.ga(),m=this.Qa();a=Math.cos(-m);var m=Math.sin(-m),
126
+n=Infinity,p=Infinity,q=-Infinity,r=-Infinity;d=d.qa();for(var u=0,x=l.length;u<x;u+=d)var B=l[u]*a-l[u+1]*m,E=l[u]*m+l[u+1]*a,n=Math.min(n,B),p=Math.min(p,E),q=Math.max(q,B),r=Math.max(r,E);c=this.ze([n,p,q,r],[c[0]-e[1]-e[3],c[1]-e[0]-e[2]]);c=isNaN(c)?h:Math.max(c,h);f&&(h=this.constrainResolution(c,0,0),!g&&h<c&&(h=this.constrainResolution(h,-1,0)),c=h);m=-m;h=(n+q)/2+(e[1]-e[3])/2*c;e=(p+r)/2+(e[0]-e[2])/2*c;a=[h*a-e*m,e*a+h*m];e=b.callback?b.callback:ua;void 0!==b.duration?this.animate({resolution:c,
127
+center:a,duration:b.duration,easing:b.easing},e):(this.Vc(c),this.ob(a),setTimeout(e.bind(void 0,!0),0))};k.uk=function(a,b,c){var d=this.Qa(),e=Math.cos(-d),d=Math.sin(-d),f=a[0]*e-a[1]*d;a=a[1]*e+a[0]*d;var g=this.Pa(),f=f+(b[0]/2-c[0])*g;a+=(c[1]-b[1]/2)*g;d=-d;this.ob([f*e-a*d,a*e+f*d])};function jg(a){return!!a.wa()&&void 0!==a.Pa()}k.rotate=function(a,b){void 0!==b&&(b=fg(this,a,b),this.ob(b));this.Oe(a)};k.ob=function(a){this.set("center",a);this.Ic()&&this.ed()};
128
+function cg(a,b,c){a.o[b]+=c;a.s()}k.Vc=function(a){this.set("resolution",a);this.Ic()&&this.ed()};k.Oe=function(a){this.set("rotation",a);this.Ic()&&this.ed()};k.lq=function(a){a=this.constrainResolution(this.a,a-this.l,0);this.Vc(a)};function kg(a,b,c){this.f=a;this.c=b;this.g=c;this.b=[];this.a=this.i=0}function lg(a){a.b.length=0;a.i=0;a.a=0}function mg(a){if(6>a.b.length)return!1;var b=Date.now()-a.g,c=a.b.length-3;if(a.b[c+2]<b)return!1;for(var d=c-3;0<d&&a.b[d+2]>b;)d-=3;b=a.b[c+2]-a.b[d+2];if(b<1E3/60)return!1;var e=a.b[c]-a.b[d],c=a.b[c+1]-a.b[d+1];a.i=Math.atan2(c,e);a.a=Math.sqrt(e*e+c*c)/b;return a.a>a.c};function ng(a){Tc.call(this);this.v=null;this.Ha(!0);this.handleEvent=a.handleEvent}v(ng,Tc);ng.prototype.c=function(){return this.get("active")};ng.prototype.f=function(){return this.v};ng.prototype.Ha=function(a){this.set("active",a)};ng.prototype.setMap=function(a){this.v=a};function og(a,b,c,d){if(void 0!==b){var e=a.Qa(),f=a.wa();void 0!==e&&f&&0<d?a.animate({rotation:b,anchor:c,duration:d,easing:rd}):a.rotate(b,c)}}
129
+function pg(a,b,c,d){var e=a.Pa();b=a.constrainResolution(e,b,0);if(c&&void 0!==b&&b!==e){var f=a.wa();c=eg(a,b,c);c=a.Ec(c);c=[(b*f[0]-e*c[0])/(b-e),(b*f[1]-e*c[1])/(b-e)]}qg(a,b,c,d)}function qg(a,b,c,d){if(b){var e=a.Pa(),f=a.wa();void 0!==e&&f&&b!==e&&d?a.animate({resolution:b,anchor:c,duration:d,easing:rd}):(c&&(c=eg(a,b,c),a.ob(c)),a.Vc(b))}};function rg(a){a=a?a:{};this.a=a.delta?a.delta:1;ng.call(this,{handleEvent:sg});this.g=void 0!==a.duration?a.duration:250}v(rg,ng);function sg(a){var b=!1,c=a.originalEvent;if("dblclick"==a.type){var b=a.coordinate,c=c.shiftKey?-this.a:this.a,d=a.map.Z();pg(d,c,b,this.g);a.preventDefault();b=!0}return!b};function tg(a){a=a.originalEvent;return a.altKey&&!(a.metaKey||a.ctrlKey)&&a.shiftKey}function ug(a){a=a.originalEvent;return!a.button&&!(Qd&&Rd&&a.ctrlKey)}function vg(a){return"pointermove"==a.type}function wg(a){return"singleclick"==a.type}function xg(a){a=a.originalEvent;return!a.altKey&&!(a.metaKey||a.ctrlKey)&&!a.shiftKey}function yg(a){a=a.originalEvent;return!a.altKey&&!(a.metaKey||a.ctrlKey)&&a.shiftKey}
130
+function Ag(a){a=a.originalEvent.target.tagName;return"INPUT"!==a&&"SELECT"!==a&&"TEXTAREA"!==a}function Bg(a){xa(a.b,56);return"mouse"==a.b.pointerType}function Cg(a){a=a.b;return a.isPrimary&&0===a.button};function Dg(a){a=a?a:{};ng.call(this,{handleEvent:a.handleEvent?a.handleEvent:Eg});this.yf=a.handleDownEvent?a.handleDownEvent:nf;this.If=a.handleDragEvent?a.handleDragEvent:ua;this.Jf=a.handleMoveEvent?a.handleMoveEvent:ua;this.sk=a.handleUpEvent?a.handleUpEvent:nf;this.D=!1;this.na={};this.o=[]}v(Dg,ng);function Fg(a){for(var b=a.length,c=0,d=0,e=0;e<b;e++)c+=a[e].clientX,d+=a[e].clientY;return[c/b,d/b]}
131
+function Eg(a){if(!(a instanceof ee))return!0;var b=!1,c=a.type;if("pointerdown"===c||"pointerdrag"===c||"pointerup"===c)c=a.b,"pointerup"==a.type?delete this.na[c.pointerId]:"pointerdown"==a.type?this.na[c.pointerId]=c:c.pointerId in this.na&&(this.na[c.pointerId]=c),this.o=vb(this.na);this.D?"pointerdrag"==a.type?this.If(a):"pointerup"==a.type&&(this.D=this.sk(a)&&0<this.o.length):"pointerdown"==a.type?(this.D=a=this.yf(a),b=this.Xc(a)):"pointermove"==a.type&&this.Jf(a);return!b}
132
+Dg.prototype.Xc=function(a){return a};function Gg(a){Dg.call(this,{handleDownEvent:Hg,handleDragEvent:Ig,handleUpEvent:Jg});a=a?a:{};this.a=a.kinetic;this.g=null;this.u=a.condition?a.condition:xg;this.j=!1}v(Gg,Dg);function Ig(a){var b=this.o,c=Fg(b);if(b.length==this.l){if(this.a&&this.a.b.push(c[0],c[1],Date.now()),this.g){var d=this.g[0]-c[0],e=c[1]-this.g[1];a=a.map.Z();var f=a.getState(),d=[d,e];gf(d,f.resolution);ef(d,f.rotation);Ze(d,f.center);d=a.Ec(d);a.ob(d)}}else this.a&&lg(this.a);this.g=c;this.l=b.length}
133
+function Jg(a){var b=a.map;a=b.Z();if(this.o.length)return this.a&&lg(this.a),this.g=null,!0;if(!this.j&&this.a&&mg(this.a)){var c=this.a;c=(c.c-c.a)/c.f;var d=this.a.i,e=a.wa(),e=b.Ja(e),b=b.Wa([e[0]-c*Math.cos(d),e[1]-c*Math.sin(d)]);a.animate({center:a.Ec(b),duration:500,easing:rd})}cg(a,1,-1);return!1}
134
+function Hg(a){if(0<this.o.length&&this.u(a)){var b=a.map.Z();this.g=null;this.D||cg(b,1,1);dg(b)[0]&&b.ob(a.frameState.viewState.center);this.a&&lg(this.a);this.j=1<this.o.length;return!0}return!1}Gg.prototype.Xc=nf;function Kg(a){a=a?a:{};Dg.call(this,{handleDownEvent:Lg,handleDragEvent:Mg,handleUpEvent:Ng});this.g=a.condition?a.condition:tg;this.a=void 0;this.j=void 0!==a.duration?a.duration:250}v(Kg,Dg);function Mg(a){if(Bg(a)){var b=a.map,c=b.Z();if(c.g.rotation!==Te){b=b.Ob();a=a.pixel;a=Math.atan2(b[1]/2-a[1],a[0]-b[0]/2);if(void 0!==this.a){var b=a-this.a,d=c.Qa();og(c,d-b)}this.a=a}}}
135
+function Ng(a){if(!Bg(a))return!0;a=a.map.Z();cg(a,1,-1);var b=a.Qa(),c=this.j,b=a.constrainRotation(b,0);og(a,b,void 0,c);return!1}function Lg(a){return Bg(a)&&ug(a)&&this.g(a)?(cg(a.map.Z(),1,1),this.a=void 0,!0):!1}Kg.prototype.Xc=nf;function Og(a){this.Gc=null;this.a=document.createElement("div");this.a.style.position="absolute";this.a.className="ol-box "+a;this.i=this.c=this.b=null}v(Og,Mc);Og.prototype.ka=function(){this.setMap(null)};function Pg(a){var b=a.c,c=a.i;a=a.a.style;a.left=Math.min(b[0],c[0])+"px";a.top=Math.min(b[1],c[1])+"px";a.width=Math.abs(c[0]-b[0])+"px";a.height=Math.abs(c[1]-b[1])+"px"}
136
+Og.prototype.setMap=function(a){if(this.b){this.b.C.removeChild(this.a);var b=this.a.style;b.left=b.top=b.width=b.height="inherit"}(this.b=a)&&this.b.C.appendChild(this.a)};function Qg(a){var b=a.c,c=a.i,b=[b,[b[0],c[1]],c,[c[0],b[1]]].map(a.b.Wa,a.b);b[4]=b[0].slice();a.Gc?a.Gc.ma([b]):a.Gc=new D([b])}Og.prototype.V=function(){return this.Gc};function Rg(a){Dg.call(this,{handleDownEvent:Sg,handleDragEvent:Tg,handleUpEvent:Ug});a=a?a:{};this.a=new Og(a.className||"ol-dragbox");this.u=void 0!==a.minArea?a.minArea:64;this.g=null;this.C=a.condition?a.condition:mf;this.l=a.boxEndCondition?a.boxEndCondition:Vg}v(Rg,Dg);function Vg(a,b,c){a=c[0]-b[0];b=c[1]-b[1];return a*a+b*b>=this.u}function Tg(a){if(Bg(a)){var b=this.a,c=a.pixel;b.c=this.g;b.i=c;Qg(b);Pg(b);this.b(new Wg(Xg,a.coordinate,a))}}Rg.prototype.V=function(){return this.a.V()};
137
+Rg.prototype.j=ua;function Ug(a){if(!Bg(a))return!0;this.a.setMap(null);this.l(a,this.g,a.pixel)&&(this.j(a),this.b(new Wg(Yg,a.coordinate,a)));return!1}function Sg(a){if(Bg(a)&&ug(a)&&this.C(a)){this.g=a.pixel;this.a.setMap(a.map);var b=this.a,c=this.g;b.c=this.g;b.i=c;Qg(b);Pg(b);this.b(new Wg(Zg,a.coordinate,a));return!0}return!1}var Zg="boxstart",Xg="boxdrag",Yg="boxend";function Wg(a,b,c){Oc.call(this,a);this.coordinate=b;this.mapBrowserEvent=c}v(Wg,Oc);function $g(a){a=a?a:{};var b=a.condition?a.condition:yg;this.B=void 0!==a.duration?a.duration:200;this.I=void 0!==a.out?a.out:!1;Rg.call(this,{condition:b,className:a.className||"ol-dragzoom"})}v($g,Rg);
138
+$g.prototype.j=function(){var a=this.v,b=a.Z(),c=a.Ob(),d=this.V().G();if(this.I){var e=b.dd(c),d=[a.Ja(eb(d)),a.Ja(hb(d))],a=Ya(void 0),f;var g=0;for(f=d.length;g<f;++g)Pa(a,d[g]);d=b.ze(a,c);rb(e,1/d);d=e}c=b.constrainResolution(b.ze(d,c));e=nb(d);e=b.Ec(e);b.animate({resolution:c,center:e,duration:this.B,easing:rd})};function ah(a){ng.call(this,{handleEvent:bh});a=a||{};this.a=function(a){return xg(a)&&Ag(a)};this.g=a.condition?a.condition:this.a;this.j=void 0!==a.duration?a.duration:100;this.o=void 0!==a.pixelDelta?a.pixelDelta:128}v(ah,ng);
139
+function bh(a){var b=!1;if("keydown"==a.type){var c=a.originalEvent.keyCode;if(this.g(a)&&(40==c||37==c||39==c||38==c)){var b=a.map.Z(),d=b.Pa()*this.o,e=0,f=0;40==c?f=-d:37==c?e=-d:39==c?e=d:f=d;d=[e,f];ef(d,b.Qa());c=this.j;if(e=b.wa())d=b.Ec([e[0]+d[0],e[1]+d[1]]),c?b.animate({duration:c,easing:td,center:d}):b.ob(d);a.preventDefault();b=!0}}return!b};function ch(a){ng.call(this,{handleEvent:dh});a=a?a:{};this.g=a.condition?a.condition:Ag;this.a=a.delta?a.delta:1;this.j=void 0!==a.duration?a.duration:100}v(ch,ng);function dh(a){var b=!1;if("keydown"==a.type||"keypress"==a.type){var c=a.originalEvent.charCode;!this.g(a)||43!=c&&45!=c||(b=43==c?this.a:-this.a,c=a.map.Z(),pg(c,b,void 0,this.j),a.preventDefault(),b=!0)}return!b};function eh(a){ng.call(this,{handleEvent:fh});a=a||{};this.j=0;this.D=void 0!==a.duration?a.duration:250;this.na=void 0!==a.timeout?a.timeout:80;this.C=void 0!==a.useAnchor?a.useAnchor:!0;this.R=a.constrainResolution||!1;this.a=null;this.l=this.o=this.u=this.g=void 0}v(eh,ng);
140
+function fh(a){var b=a.type;if("wheel"!==b&&"mousewheel"!==b)return!0;a.preventDefault();var b=a.map,c=a.originalEvent;this.C&&(this.a=a.coordinate);if("wheel"==a.type){var d=c.deltaY;Od&&c.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(d/=Sd);c.deltaMode===WheelEvent.DOM_DELTA_LINE&&(d*=40)}else"mousewheel"==a.type&&(d=-c.wheelDeltaY,Pd&&(d/=3));if(0===d)return!1;a=Date.now();void 0===this.g&&(this.g=a);if(!this.o||400<a-this.g)this.o=4>Math.abs(d)?gh:hh;if(this.o===gh){b=b.Z();this.l?clearTimeout(this.l):
141
+cg(b,1,1);this.l=setTimeout(this.B.bind(this),400);var c=b.Pa()*Math.pow(2,d/300),e=b.f,f=b.a,g=0;c<e?(c=Math.max(c,e/1.5),g=1):c>f&&(c=Math.min(c,1.5*f),g=-1);if(this.a){var h=eg(b,c,this.a);b.ob(b.Ec(h))}b.Vc(c);!g&&this.R&&b.animate({resolution:b.constrainResolution(c,0<d?-1:1),easing:rd,anchor:this.a,duration:this.D});0<g?b.animate({resolution:e,easing:rd,anchor:this.a,duration:500}):0>g&&b.animate({resolution:f,easing:rd,anchor:this.a,duration:500});this.g=a;return!1}this.j+=d;d=Math.max(this.na-
142
+(a-this.g),0);clearTimeout(this.u);this.u=setTimeout(this.I.bind(this,b),d);return!1}eh.prototype.B=function(){this.l=void 0;cg(this.v.Z(),1,-1)};eh.prototype.I=function(a){a=a.Z();a.Ic()&&a.ed();pg(a,-Ca(this.j,-1,1),this.a,this.D);this.o=void 0;this.j=0;this.a=null;this.u=this.g=void 0};eh.prototype.T=function(a){this.C=a;a||(this.a=null)};var gh="trackpad",hh="wheel";function ih(a){Dg.call(this,{handleDownEvent:jh,handleDragEvent:kh,handleUpEvent:lh});a=a||{};this.g=null;this.j=void 0;this.a=!1;this.l=0;this.C=void 0!==a.threshold?a.threshold:.3;this.u=void 0!==a.duration?a.duration:250}v(ih,Dg);
143
+function kh(a){var b=0,c=this.o[0],d=this.o[1],c=Math.atan2(d.clientY-c.clientY,d.clientX-c.clientX);void 0!==this.j&&(b=c-this.j,this.l+=b,!this.a&&Math.abs(this.l)>this.C&&(this.a=!0));this.j=c;a=a.map;c=a.Z();if(c.g.rotation!==Te){var d=a.a.getBoundingClientRect(),e=Fg(this.o);e[0]-=d.left;e[1]-=d.top;this.g=a.Wa(e);this.a&&(d=c.Qa(),a.render(),og(c,d+b,this.g))}}
144
+function lh(a){if(2>this.o.length){a=a.map.Z();cg(a,1,-1);if(this.a){var b=a.Qa(),c=this.g,d=this.u,b=a.constrainRotation(b,0);og(a,b,c,d)}return!1}return!0}function jh(a){return 2<=this.o.length?(a=a.map,this.g=null,this.j=void 0,this.a=!1,this.l=0,this.D||cg(a.Z(),1,1),!0):!1}ih.prototype.Xc=nf;function mh(a){Dg.call(this,{handleDownEvent:nh,handleDragEvent:oh,handleUpEvent:ph});a=a?a:{};this.l=a.constrainResolution||!1;this.g=null;this.u=void 0!==a.duration?a.duration:400;this.a=void 0;this.j=1}v(mh,Dg);
145
+function oh(a){var b=1,c=this.o[0],d=this.o[1],e=c.clientX-d.clientX,c=c.clientY-d.clientY,e=Math.sqrt(e*e+c*c);void 0!==this.a&&(b=this.a/e);this.a=e;a=a.map;var e=a.Z(),d=e.Pa(),f=e.a,g=e.f,c=d*b;c>f?(b=f/d,c=f):c<g&&(b=g/d,c=g);1!=b&&(this.j=b);b=a.a.getBoundingClientRect();d=Fg(this.o);d[0]-=b.left;d[1]-=b.top;this.g=a.Wa(d);a.render();qg(e,c,this.g)}
146
+function ph(a){if(2>this.o.length){a=a.map.Z();cg(a,1,-1);var b=a.Pa();if(this.l||b<a.f||b>a.a){var c=this.g,d=this.u,b=a.constrainResolution(b,0,this.j-1);qg(a,b,c,d)}return!1}return!0}function nh(a){return 2<=this.o.length?(a=a.map,this.g=null,this.a=void 0,this.j=1,this.D||cg(a.Z(),1,1),!0):!1}mh.prototype.Xc=nf;function qh(a){a=a?a:{};var b=new Yc,c=new kg(-.005,.05,100);(void 0!==a.altShiftDragRotate?a.altShiftDragRotate:1)&&b.push(new Kg);(void 0!==a.doubleClickZoom?a.doubleClickZoom:1)&&b.push(new rg({delta:a.zoomDelta,duration:a.zoomDuration}));(void 0!==a.dragPan?a.dragPan:1)&&b.push(new Gg({kinetic:c}));(void 0!==a.pinchRotate?a.pinchRotate:1)&&b.push(new ih);(void 0!==a.pinchZoom?a.pinchZoom:1)&&b.push(new mh({constrainResolution:a.constrainResolution,duration:a.zoomDuration}));if(void 0!==a.keyboard?
147
+a.keyboard:1)b.push(new ah),b.push(new ch({delta:a.zoomDelta,duration:a.zoomDuration}));(void 0!==a.mouseWheelZoom?a.mouseWheelZoom:1)&&b.push(new eh({constrainResolution:a.constrainResolution,duration:a.zoomDuration}));(void 0!==a.shiftDragZoom?a.shiftDragZoom:1)&&b.push(new $g({duration:a.zoomDuration}));return b};function sh(a){Tc.call(this);var b=tb({},a);b.opacity=void 0!==a.opacity?a.opacity:1;b.visible=void 0!==a.visible?a.visible:!0;b.zIndex=void 0!==a.zIndex?a.zIndex:0;b.maxResolution=void 0!==a.maxResolution?a.maxResolution:Infinity;b.minResolution=void 0!==a.minResolution?a.minResolution:0;this.H(b);this.a={layer:this,Je:!0}}v(sh,Tc);
148
+function th(a){a.a.opacity=Ca(a.hc(),0,1);a.a.yj=a.$f();a.a.visible=a.Mb();a.a.extent=a.G();a.a.zIndex=a.Ba();a.a.maxResolution=a.fc();a.a.minResolution=Math.max(a.gc(),0);return a.a}k=sh.prototype;k.G=function(){return this.get("extent")};k.fc=function(){return this.get("maxResolution")};k.gc=function(){return this.get("minResolution")};k.hc=function(){return this.get("opacity")};k.Mb=function(){return this.get("visible")};k.Ba=function(){return this.get("zIndex")};
149
+k.vc=function(a){this.set("extent",a)};k.Ac=function(a){this.set("maxResolution",a)};k.Bc=function(a){this.set("minResolution",a)};k.wc=function(a){this.set("opacity",a)};k.xc=function(a){this.set("visible",a)};k.Vb=function(a){this.set("zIndex",a)};function uh(a){var b=a||{};a=tb({},b);delete a.layers;b=b.layers;sh.call(this,a);this.f=[];this.c={};y(this,Vc(vh),this.Hl,this);b?Array.isArray(b)?b=new Yc(b.slice(),{unique:!0}):xa(b instanceof Yc,43):b=new Yc(void 0,{unique:!0});this.xi(b)}v(uh,sh);k=uh.prototype;k.Fd=function(){};k.Fe=function(){this.Mb()&&this.s()};
150
+k.Hl=function(){this.f.forEach(Ec);this.f.length=0;var a=this.qd();this.f.push(y(a,"add",this.Gl,this),y(a,"remove",this.Il,this));for(var b in this.c)this.c[b].forEach(Ec);ub(this.c);var a=a.a,c;b=0;for(c=a.length;b<c;b++){var d=a[b];this.c[w(d).toString()]=[y(d,"propertychange",this.Fe,this),y(d,"change",this.Fe,this)]}this.s()};k.Gl=function(a){a=a.element;var b=w(a).toString();this.c[b]=[y(a,"propertychange",this.Fe,this),y(a,"change",this.Fe,this)];this.s()};
151
+k.Il=function(a){a=w(a.element).toString();this.c[a].forEach(Ec);delete this.c[a];this.s()};k.qd=function(){return this.get(vh)};k.xi=function(a){this.set(vh,a)};
152
+k.Yf=function(a){var b=void 0!==a?a:[],c=b.length;this.qd().forEach(function(a){a.Yf(b)});a=th(this);var d;for(d=b.length;c<d;c++){var e=b[c];e.opacity*=a.opacity;e.visible=e.visible&&a.visible;e.maxResolution=Math.min(e.maxResolution,a.maxResolution);e.minResolution=Math.max(e.minResolution,a.minResolution);void 0!==a.extent&&(e.extent=void 0!==e.extent?pb(e.extent,a.extent):a.extent)}return b};k.$f=function(){return"ready"};var vh="layers";function wh(a){var b=tb({},a);delete b.source;sh.call(this,b);this.v=this.l=this.o=null;a.map&&this.setMap(a.map);y(this,Vc("source"),this.Ul,this);this.Wc(a.source?a.source:null)}v(wh,sh);function xh(a,b){return a.visible&&b>=a.minResolution&&b<a.maxResolution}k=wh.prototype;k.Yf=function(a){a=a?a:[];a.push(th(this));return a};k.ha=function(){return this.get("source")||null};k.$f=function(){var a=this.ha();return a?a.getState():"undefined"};k.Tn=function(){this.s()};
153
+k.Ul=function(){this.v&&(Ec(this.v),this.v=null);var a=this.ha();a&&(this.v=y(a,"change",this.Tn,this));this.s()};k.setMap=function(a){this.o&&(Ec(this.o),this.o=null);a||this.s();this.l&&(Ec(this.l),this.l=null);a&&(this.o=y(a,"precompose",function(a){var b=th(this);b.Je=!1;b.zIndex=Infinity;a.frameState.layerStatesArray.push(b);a.frameState.layerStates[w(this)]=b},this),this.l=y(this,"change",a.render,a),this.s())};k.Wc=function(a){this.set("source",a)};function yh(){this.b={};this.a=0}yh.prototype.clear=function(){this.b={};this.a=0};yh.prototype.get=function(a,b,c){a=b+":"+a+":"+(c?gd(c):"null");return a in this.b?this.b[a]:null};yh.prototype.set=function(a,b,c,d){this.b[b+":"+a+":"+(c?gd(c):"null")]=d;++this.a};var zh=new yh;var Ah=Array(6);function Bh(){return[1,0,0,1,0,0]}function Ch(a){return Dh(a,1,0,0,1,0,0)}function Eh(a,b){var c=a[0],d=a[1],e=a[2],f=a[3],g=a[4],h=a[5],l=b[0],m=b[1],n=b[2],p=b[3],q=b[4];b=b[5];a[0]=c*l+e*m;a[1]=d*l+f*m;a[2]=c*n+e*p;a[3]=d*n+f*p;a[4]=c*q+e*b+g;a[5]=d*q+f*b+h;return a}function Dh(a,b,c,d,e,f,g){a[0]=b;a[1]=c;a[2]=d;a[3]=e;a[4]=f;a[5]=g;return a}function Fh(a,b){a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];a[4]=b[4];a[5]=b[5];return a}
154
+function Gh(a,b){var c=b[0],d=b[1];b[0]=a[0]*c+a[2]*d+a[4];b[1]=a[1]*c+a[3]*d+a[5];return b}function Hh(a,b){var c=Math.cos(b);b=Math.sin(b);Eh(a,Dh(Ah,c,b,-b,c,0,0))}function Ih(a,b,c){return Eh(a,Dh(Ah,b,0,0,c,0,0))}function Jh(a,b,c){Eh(a,Dh(Ah,1,0,0,1,b,c))}function Kh(a,b,c,d,e,f,g,h){var l=Math.sin(f);f=Math.cos(f);a[0]=d*f;a[1]=e*l;a[2]=-d*l;a[3]=e*f;a[4]=g*d*f-h*d*l+b;a[5]=g*e*l+h*e*f+c;return a}
155
+function Lh(a){var b=a[0]*a[3]-a[1]*a[2];xa(!!b,32);var c=a[0],d=a[1],e=a[2],f=a[3],g=a[4],h=a[5];a[0]=f/b;a[1]=-d/b;a[2]=-e/b;a[3]=c/b;a[4]=(e*h-f*g)/b;a[5]=-(c*h-d*g)/b;return a};function Mh(a,b){this.o=b;this.c={};this.v={}}v(Mh,Mc);function Nh(a){var b=a.viewState,c=a.coordinateToPixelTransform,d=a.pixelToCoordinateTransform;Kh(c,a.size[0]/2,a.size[1]/2,1/b.resolution,-1/b.resolution,-b.rotation,-b.center[0],-b.center[1]);Lh(Fh(d,c))}k=Mh.prototype;k.ka=function(){for(var a in this.c)Nc(this.c[a])};function Oh(){if(32<zh.a){var a=0,b;for(b in zh.b){var c=zh.b[b];a++&3||Rc(c)||(delete zh.b[b],--zh.a)}}}
156
+k.Ea=function(a,b,c,d,e,f,g){function h(a,c){var f=w(a).toString(),g=b.layerStates[w(c)].Je;if(!(f in b.skippedFeatureUids)||g)return d.call(e,a,g?c:null)}var l,m=b.viewState,n=m.resolution,p=m.projection,m=a;if(p.i){var p=p.G(),q=lb(p),r=a[0];if(r<p[0]||r>p[2])m=[r+q*Math.ceil((p[0]-r)/q),a[1]]}p=b.layerStatesArray;for(q=p.length-1;0<=q;--q){var u=p[q],r=u.layer;if(xh(u,n)&&f.call(g,r)&&(u=Ph(this,r),r.ha()&&(l=u.Ea(r.ha().u?m:a,b,c,h,e)),l))return l}};
157
+k.Ei=function(a,b,c,d,e){return void 0!==this.Ea(a,b,c,mf,this,d,e)};function Ph(a,b){var c=w(b).toString();if(c in a.c)return a.c[c];b=b.Fd(a);a.c[c]=b;a.v[c]=y(b,"change",a.Fl,a);return b}k.Fl=function(){this.o.render()};k.Jg=ua;k.Rp=function(a,b){for(var c in this.c)if(!(b&&c in b.layerStates)){a=c;var d=this.c[a];delete this.c[a];Ec(this.v[a]);delete this.v[a];Nc(d)}};function Qh(a,b){for(var c in a.c)if(!(c in b.layerStates)){b.postRenderFunctions.push(a.Rp.bind(a));break}}
158
+function ra(a,b){return a.zIndex-b.zIndex};function Rh(a,b,c,d,e){Oc.call(this,a);this.vectorContext=b;this.frameState=c;this.context=d;this.glContext=e}v(Rh,Oc);var Sh=[0,0,0,1],Th=[],Uh=[0,0,0,1];function Vh(a,b,c,d){b&&(a.translate(c,d),a.rotate(b),a.translate(-c,-d))};function Wh(){}k=Wh.prototype;k.zb=function(){};k.rd=function(){};k.Zb=function(){};k.te=function(){};k.ue=function(){};k.mc=function(){};k.nc=function(){};k.oc=function(){};k.pc=function(){};k.qc=function(){};k.rc=function(){};k.yc=function(){};k.Ma=function(){};k.Ub=function(){};k.Cb=function(){};function Xh(a,b,c,d,e){this.i=a;this.u=b;this.c=c;this.S=d;this.Yb=e;this.M=this.b=this.a=this.Ua=this.R=this.I=null;this.na=this.T=this.l=this.B=this.C=this.D=0;this.fa=!1;this.f=this.fb=0;this.pa=!1;this.oa=0;this.Ia="";this.va=this.Jb=0;this.Sa=!1;this.j=this.$a=0;this.ra=this.o=this.g=null;this.v=[];this.xb=Bh()}v(Xh,Wh);
159
+function Yh(a,b,c){if(a.M){b=pf(b,0,c,2,a.S,a.v);c=a.i;var d=a.xb,e=c.globalAlpha;1!=a.l&&(c.globalAlpha=e*a.l);var f=a.fb;a.fa&&(f+=a.Yb);var g;var h=0;for(g=b.length;h<g;h+=2){var l=b[h]-a.D,m=b[h+1]-a.C;a.pa&&(l=Math.round(l),m=Math.round(m));if(f||1!=a.f){var n=l+a.D,p=m+a.C;Kh(d,n,p,a.f,a.f,f,-n,-p);c.setTransform.apply(c,d)}c.drawImage(a.M,a.T,a.na,a.oa,a.B,l,m,a.oa,a.B)}(f||1!=a.f)&&c.setTransform(1,0,0,1,0,0);1!=a.l&&(c.globalAlpha=e)}}
160
+function Zh(a,b,c,d){var e=0;if(a.ra&&""!==a.Ia){a.g&&$h(a,a.g);a.o&&ai(a,a.o);var f=a.ra,g=a.i,h=a.Ua;h?(h.font!=f.font&&(h.font=g.font=f.font),h.textAlign!=f.textAlign&&(h.textAlign=g.textAlign=f.textAlign),h.textBaseline!=f.textBaseline&&(h.textBaseline=g.textBaseline=f.textBaseline)):(g.font=f.font,g.textAlign=f.textAlign,g.textBaseline=f.textBaseline,a.Ua={font:f.font,textAlign:f.textAlign,textBaseline:f.textBaseline});b=pf(b,e,c,d,a.S,a.v);f=a.i;g=a.$a;for(a.Sa&&(g+=a.Yb);e<c;e+=d){var h=b[e]+
161
+a.Jb,l=b[e+1]+a.va;if(g||1!=a.j){var m=Kh(a.xb,h,l,a.j,a.j,g,-h,-l);f.setTransform.apply(f,m)}a.o&&f.strokeText(a.Ia,h,l);a.g&&f.fillText(a.Ia,h,l)}(g||1!=a.j)&&f.setTransform(1,0,0,1,0,0)}}function bi(a,b,c,d,e,f){var g=a.i;a=pf(b,c,d,e,a.S,a.v);g.moveTo(a[0],a[1]);b=a.length;f&&(b-=2);for(c=2;c<b;c+=2)g.lineTo(a[c],a[c+1]);f&&g.closePath();return d}function ci(a,b,c,d,e){var f;var g=0;for(f=d.length;g<f;++g)c=bi(a,b,c,d[g],e,!0);return c}k=Xh.prototype;
162
+k.Zb=function(a){if(qb(this.c,a.G())){if(this.a||this.b){this.a&&$h(this,this.a);this.b&&ai(this,this.b);var b=this.S;var c=this.v,d=a.ga();b=d?pf(d,0,d.length,a.qa(),b,c):null;c=b[2]-b[0];d=b[3]-b[1];c=Math.sqrt(c*c+d*d);d=this.i;d.beginPath();d.arc(b[0],b[1],c,0,2*Math.PI);this.a&&d.fill();this.b&&d.stroke()}""!==this.Ia&&Zh(this,a.wa(),2,2)}};k.rd=function(a){this.Ma(a.Fa(),a.Ga());this.Ub(a.Y());this.Cb(a.Na())};
163
+k.zb=function(a){switch(a.U()){case "Point":this.qc(a);break;case "LineString":this.mc(a);break;case "Polygon":this.rc(a);break;case "MultiPoint":this.oc(a);break;case "MultiLineString":this.nc(a);break;case "MultiPolygon":this.pc(a);break;case "GeometryCollection":this.ue(a);break;case "Circle":this.Zb(a)}};k.te=function(a,b){(a=(0,b.Za)(a))&&qb(this.c,a.G())&&(this.rd(b),this.zb(a))};k.ue=function(a){a=a.a;var b;var c=0;for(b=a.length;c<b;++c)this.zb(a[c])};
164
+k.qc=function(a){var b=a.ga();a=a.qa();this.M&&Yh(this,b,b.length);""!==this.Ia&&Zh(this,b,b.length,a)};k.oc=function(a){var b=a.ga();a=a.qa();this.M&&Yh(this,b,b.length);""!==this.Ia&&Zh(this,b,b.length,a)};k.mc=function(a){if(qb(this.c,a.G())){if(this.b){ai(this,this.b);var b=this.i,c=a.ga();b.beginPath();bi(this,c,0,c.length,a.qa(),!1);b.stroke()}""!==this.Ia&&(a=di(a),Zh(this,a,2,2))}};
165
+k.nc=function(a){var b=a.G();if(qb(this.c,b)){if(this.b){ai(this,this.b);var b=this.i,c=a.ga(),d=0,e=a.Bb(),f=a.qa();b.beginPath();var g;var h=0;for(g=e.length;h<g;++h)d=bi(this,c,d,e[h],f,!1);b.stroke()}""!==this.Ia&&(a=ei(a),Zh(this,a,a.length,2))}};k.rc=function(a){if(qb(this.c,a.G())){if(this.b||this.a){this.a&&$h(this,this.a);this.b&&ai(this,this.b);var b=this.i;b.beginPath();ci(this,a.ec(),0,a.Bb(),a.qa());this.a&&b.fill();this.b&&b.stroke()}""!==this.Ia&&(a=Wf(a),Zh(this,a,2,2))}};
166
+k.pc=function(a){if(qb(this.c,a.G())){if(this.b||this.a){this.a&&$h(this,this.a);this.b&&ai(this,this.b);var b=this.i,c=fi(a),d=0,e=a.c,f=a.qa(),g;b.beginPath();var h=0;for(g=e.length;h<g;++h)d=ci(this,c,d,e[h],f);this.a&&b.fill();this.b&&b.stroke()}""!==this.Ia&&(a=gi(a),Zh(this,a,a.length,2))}};function $h(a,b){var c=a.i,d=a.I;d?d.fillStyle!=b.fillStyle&&(d.fillStyle=c.fillStyle=b.fillStyle):(c.fillStyle=b.fillStyle,a.I={fillStyle:b.fillStyle})}
167
+function ai(a,b){var c=a.i,d=a.R;d?(d.lineCap!=b.lineCap&&(d.lineCap=c.lineCap=b.lineCap),Td&&!pa(d.lineDash,b.lineDash)&&c.setLineDash(d.lineDash=b.lineDash),d.lineJoin!=b.lineJoin&&(d.lineJoin=c.lineJoin=b.lineJoin),d.lineWidth!=b.lineWidth&&(d.lineWidth=c.lineWidth=b.lineWidth),d.miterLimit!=b.miterLimit&&(d.miterLimit=c.miterLimit=b.miterLimit),d.strokeStyle!=b.strokeStyle&&(d.strokeStyle=c.strokeStyle=b.strokeStyle)):(c.lineCap=b.lineCap,Td&&c.setLineDash(b.lineDash),c.lineJoin=b.lineJoin,c.lineWidth=
168
+b.lineWidth,c.miterLimit=b.miterLimit,c.strokeStyle=b.strokeStyle,a.R={lineCap:b.lineCap,lineDash:b.lineDash,lineJoin:b.lineJoin,lineWidth:b.lineWidth,miterLimit:b.miterLimit,strokeStyle:b.strokeStyle})}
169
+k.Ma=function(a,b){a?(a=a.b,this.a={fillStyle:id(a?a:Sh)}):this.a=null;if(b){a=b.a;var c=b.f,d=b.i,e=b.g,f=b.j,g=b.c;b=b.o;this.b={lineCap:void 0!==c?c:"round",lineDash:d?d:Th,lineDashOffset:e?e:0,lineJoin:void 0!==f?f:"round",lineWidth:this.u*(void 0!==g?g:1),miterLimit:void 0!==b?b:10,strokeStyle:id(a?a:Uh)}}else this.b=null};
170
+k.Ub=function(a){if(a){var b=a.Hc(),c=a.Y(1),d=a.Oc(),e=a.ic();this.D=b[0];this.C=b[1];this.B=e[1];this.M=c;this.l=a.f;this.T=d[0];this.na=d[1];this.fa=a.l;this.fb=a.g;this.f=a.a;this.pa=a.v;this.oa=e[0]}else this.M=null};
171
+k.Cb=function(a){if(a){var b=a.Fa();b?(b=b.b,this.g={fillStyle:id(b?b:Sh)}):this.g=null;var c=a.Ga();if(c){var b=c.a,d=c.f,e=c.i,f=c.g,g=c.j,h=c.c,c=c.o;this.o={lineCap:void 0!==d?d:"round",lineDash:e?e:Th,lineDashOffset:f?f:0,lineJoin:void 0!==g?g:"round",lineWidth:void 0!==h?h:1,miterLimit:void 0!==c?c:10,strokeStyle:id(b?b:Uh)}}else this.o=null;var b=a.a,d=a.i,e=a.c,f=a.o,g=a.f,h=a.b,c=a.Na(),l=a.g;a=a.j;this.ra={font:void 0!==b?b:"10px sans-serif",textAlign:void 0!==l?l:"center",textBaseline:void 0!==
172
+a?a:"middle"};this.Ia=void 0!==c?c:"";this.Jb=void 0!==d?this.u*d:0;this.va=void 0!==e?this.u*e:0;this.Sa=void 0!==f?f:!1;this.$a=void 0!==g?g:0;this.j=this.u*(void 0!==h?h:1)}else this.Ia=""};function hi(a,b){Mh.call(this,0,b);this.i=jd();this.b=this.i.canvas;this.b.style.width="100%";this.b.style.height="100%";this.b.style.display="block";this.b.className="ol-unselectable";a.insertBefore(this.b,a.childNodes[0]||null);this.a=!0;this.f=Bh()}v(hi,Mh);
173
+function ii(a,b,c){var d=a.o,e=a.i;if(Rc(d,b)){var f=c.extent,g=c.pixelRatio,h=c.viewState.rotation,l=c.viewState,m=c.pixelRatio/l.resolution;a=Kh(a.f,a.b.width/2,a.b.height/2,m,-m,-l.rotation,-l.center[0],-l.center[1]);d.b(new Rh(b,new Xh(e,g,f,a,h),c,e,null))}}hi.prototype.U=function(){return"canvas"};
174
+hi.prototype.Jg=function(a){if(a){var b=this.i,c=a.pixelRatio,d=Math.round(a.size[0]*c),e=Math.round(a.size[1]*c);this.b.width!=d||this.b.height!=e?(this.b.width=d,this.b.height=e):b.clearRect(0,0,d,e);c=a.viewState.rotation;Nh(a);ii(this,"precompose",a);var f=a.layerStatesArray;qa(f);c&&(b.save(),Vh(b,c,d/2,e/2));var d=a.viewState.resolution,g,e=0;for(g=f.length;e<g;++e){var h=f[e];var l=h.layer;l=Ph(this,l);xh(h,d)&&"ready"==h.yj&&l.sd(a,h)&&l.S(a,h,b)}c&&b.restore();ii(this,"postcompose",a);this.a||
175
+(this.b.style.display="",this.a=!0);Qh(this,a);a.postRenderFunctions.push(Oh)}else this.a&&(this.b.style.display="none",this.a=!1)};hi.prototype.Di=function(a,b,c,d,e,f){var g=b.viewState.resolution,h=b.layerStatesArray,l=h.length;a=Gh(b.pixelToCoordinateTransform,a.slice());for(--l;0<=l;--l){var m=h[l];var n=m.layer;if(xh(m,g)&&e.call(f,n)&&(m=Ph(this,n).u(a,b,c,d)))return m}};var ji=["Polygon","Circle","LineString","Image","Text"];function ki(){};function li(a){this.b=a};function mi(a){this.b=a}v(mi,li);mi.prototype.U=function(){return 35632};function ni(a){this.b=a}v(ni,li);ni.prototype.U=function(){return 35633};function oi(){this.b="precision mediump float;varying vec2 a;varying vec2 b;varying float c;varying float d;uniform float m;uniform vec4 n;uniform vec4 o;uniform vec2 p;void main(void){vec2 windowCenter=vec2((a.x+1.0)/2.0*p.x*d,(a.y+1.0)/2.0*p.y*d);vec2 windowOffset=vec2((b.x+1.0)/2.0*p.x*d,(b.y+1.0)/2.0*p.y*d);float radius=length(windowCenter-windowOffset);float dist=length(windowCenter-gl_FragCoord.xy);if(dist>radius+c){if(o.a==0.0){gl_FragColor=n;}else{gl_FragColor=o;}gl_FragColor.a=gl_FragColor.a-(dist-(radius+c));}else if(n.a==0.0){gl_FragColor=o;if(dist<radius-c){gl_FragColor.a=gl_FragColor.a-(radius-c-dist);}} else{gl_FragColor=n;float strokeDist=radius-c;float antialias=2.0*d;if(dist>strokeDist){gl_FragColor=o;}else if(dist>=strokeDist-antialias){float step=smoothstep(strokeDist-antialias,strokeDist,dist);gl_FragColor=mix(n,o,step);}} gl_FragColor.a=gl_FragColor.a*m;if(gl_FragColor.a<=0.0){discard;}}"}
176
+v(oi,mi);var pi=new oi;
177
+function qi(){this.b="varying vec2 a;varying vec2 b;varying float c;varying float d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;void main(void){mat4 offsetMatrix=i*j;a=vec4(h*vec4(e,0.0,1.0)).xy;d=l;float lineWidth=k*l;c=lineWidth/2.0;if(lineWidth==0.0){lineWidth=2.0*l;}vec2 offset;float radius=g+3.0*l;if(f==0.0){offset=vec2(-1.0,1.0);}else if(f==1.0){offset=vec2(-1.0,-1.0);}else if(f==2.0){offset=vec2(1.0,-1.0);}else{offset=vec2(1.0,1.0);}gl_Position=h*vec4(e+offset*radius,0.0,1.0)+offsetMatrix*vec4(offset*lineWidth,0.0,0.0);b=vec4(h*vec4(e.x+g,e.y,0.0,1.0)).xy;if(distance(a,b)>20000.0){gl_Position=vec4(a,0.0,1.0);}}"}
178
+v(qi,ni);var ri=new qi;function si(a,b){this.B=a.getUniformLocation(b,"n");this.oa=a.getUniformLocation(b,"k");this.c=a.getUniformLocation(b,"j");this.f=a.getUniformLocation(b,"i");this.a=a.getUniformLocation(b,"m");this.ra=a.getUniformLocation(b,"l");this.i=a.getUniformLocation(b,"h");this.I=a.getUniformLocation(b,"p");this.R=a.getUniformLocation(b,"o");this.j=a.getAttribLocation(b,"f");this.b=a.getAttribLocation(b,"e");this.S=a.getAttribLocation(b,"g")};function ti(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function ui(a,b){a[0]=b[0];a[1]=b[1];a[4]=b[2];a[5]=b[3];a[12]=b[4];a[13]=b[5];return a};function vi(a,b){this.origin=nb(b);this.xb=Bh();this.Sa=Bh();this.$a=Bh();this.Jb=ti();this.b=[];this.o=null;this.i=[];this.f=[];this.a=[];this.l=null;this.g=void 0}v(vi,Wh);
179
+vi.prototype.La=function(a,b,c,d,e,f,g,h,l,m,n){var p=a.b;if(this.g){var q=p.isEnabled(p.STENCIL_TEST);var r=p.getParameter(p.STENCIL_FUNC);var u=p.getParameter(p.STENCIL_VALUE_MASK);var x=p.getParameter(p.STENCIL_REF);var B=p.getParameter(p.STENCIL_WRITEMASK);var E=p.getParameter(p.STENCIL_FAIL);var A=p.getParameter(p.STENCIL_PASS_DEPTH_PASS);var L=p.getParameter(p.STENCIL_PASS_DEPTH_FAIL);p.enable(p.STENCIL_TEST);p.clear(p.STENCIL_BUFFER_BIT);p.stencilMask(255);p.stencilFunc(p.ALWAYS,1,255);p.stencilOp(p.KEEP,
180
+p.KEEP,p.REPLACE);this.g.La(a,b,c,d,e,f,g,h,l,m,n);p.stencilMask(0);p.stencilFunc(p.NOTEQUAL,1,255)}wi(a,34962,this.l);wi(a,34963,this.o);f=this.rf(p,a,e,f);var oa=Ch(this.xb);Ih(oa,2/(c*e[0]),2/(c*e[1]));Hh(oa,-d);Jh(oa,-(b[0]-this.origin[0]),-(b[1]-this.origin[1]));b=Ch(this.$a);Ih(b,2/e[0],2/e[1]);e=Ch(this.Sa);d&&Hh(e,-d);p.uniformMatrix4fv(f.i,!1,ui(this.Jb,oa));p.uniformMatrix4fv(f.f,!1,ui(this.Jb,b));p.uniformMatrix4fv(f.c,!1,ui(this.Jb,e));p.uniform1f(f.a,g);if(l){m?a=this.ve(p,a,h,l,n):(p.clear(p.COLOR_BUFFER_BIT|
181
+p.DEPTH_BUFFER_BIT),this.Od(p,a,h,!0),a=(a=l(null))?a:void 0);var ha=a}else this.Od(p,a,h,!1);this.sf(p,f);this.g&&(q||p.disable(p.STENCIL_TEST),p.clear(p.STENCIL_BUFFER_BIT),p.stencilFunc(r,x,u),p.stencilMask(B),p.stencilOp(E,L,A));return ha};function xi(a,b,c,d){a.drawElements(4,d-c,b.g?5125:5123,c*(b.g?4:2))};var yi=[0,0,0,1],zi=[],Ai=[0,0,0,1];function Bi(a,b,c,d,e,f){a=(c-a)*(f-b)-(e-a)*(d-b);return a<=Ci&&a>=-Ci?void 0:0<a}var Ci=Number.EPSILON||2.220446049250313E-16;function Di(a){this.b=void 0!==a?a:[];this.a=Ei}var Ei=35044;function Fi(a,b){vi.call(this,0,b);this.v=null;this.j=[];this.u=[];this.S=0;this.c={fillColor:null,strokeColor:null,lineDash:null,lineDashOffset:void 0,lineWidth:void 0,s:!1}}v(Fi,vi);k=Fi.prototype;
182
+k.Zb=function(a,b){var c=a.pd(),d=a.qa();if(c){this.i.push(this.b.length);this.f.push(b);this.c.s&&(this.u.push(this.b.length),this.c.s=!1);this.S=c;a=a.ga();a=qf(a,0,2,d,-this.origin[0],-this.origin[1]);b=this.a.length;var c=this.b.length,e=b/4,f;for(f=0;2>f;f+=d)this.a[b++]=a[f],this.a[b++]=a[f+1],this.a[b++]=0,this.a[b++]=this.S,this.a[b++]=a[f],this.a[b++]=a[f+1],this.a[b++]=1,this.a[b++]=this.S,this.a[b++]=a[f],this.a[b++]=a[f+1],this.a[b++]=2,this.a[b++]=this.S,this.a[b++]=a[f],this.a[b++]=
183
+a[f+1],this.a[b++]=3,this.a[b++]=this.S,this.b[c++]=e,this.b[c++]=e+1,this.b[c++]=e+2,this.b[c++]=e+2,this.b[c++]=e+3,this.b[c++]=e,e+=4}else this.c.s&&(this.j.pop(),this.j.length&&(d=this.j[this.j.length-1],this.c.fillColor=d[0],this.c.strokeColor=d[1],this.c.lineWidth=d[2],this.c.s=!1))};k.Db=function(){this.l=new Di(this.a);this.o=new Di(this.b);this.i.push(this.b.length);!this.u.length&&0<this.j.length&&(this.j=[]);this.b=this.a=null};
184
+k.Eb=function(a){var b=this.l,c=this.o;return function(){Gi(a,b);Gi(a,c)}};k.rf=function(a,b,c,d){var e=Hi(b,pi,ri);if(this.v)var f=this.v;else this.v=f=new si(a,e);b.Qc(e);a.enableVertexAttribArray(f.b);a.vertexAttribPointer(f.b,2,5126,!1,16,0);a.enableVertexAttribArray(f.j);a.vertexAttribPointer(f.j,1,5126,!1,16,8);a.enableVertexAttribArray(f.S);a.vertexAttribPointer(f.S,1,5126,!1,16,12);a.uniform2fv(f.I,c);a.uniform1f(f.ra,d);return f};
185
+k.sf=function(a,b){a.disableVertexAttribArray(b.b);a.disableVertexAttribArray(b.j);a.disableVertexAttribArray(b.S)};
186
+k.Od=function(a,b,c){if(wb(c)){var d=this.i[this.i.length-1];for(c=this.u.length-1;0<=c;--c){var e=this.u[c];var f=this.j[c];a.uniform4fv(this.v.B,f[0]);Ii(this,a,f[1],f[2]);xi(a,b,e,d);d=e}}else{var g=this.i.length-2;f=d=this.i[g+1];for(e=this.u.length-1;0<=e;--e){var h=this.j[e];a.uniform4fv(this.v.B,h[0]);Ii(this,a,h[1],h[2]);for(h=this.u[e];0<=g&&this.i[g]>=h;){var l=this.i[g];var m=this.f[g];m=w(m).toString();c[m]&&(d!==f&&xi(a,b,d,f),f=l);g--;d=l}d!==f&&xi(a,b,d,f);d=f=h}}};
187
+k.ve=function(a,b,c,d,e){var f,g;var h=this.i.length-2;var l=this.i[h+1];for(f=this.u.length-1;0<=f;--f){var m=this.j[f];a.uniform4fv(this.v.B,m[0]);Ii(this,a,m[1],m[2]);for(g=this.u[f];0<=h&&this.i[h]>=g;){m=this.i[h];var n=this.f[h];var p=w(n).toString();if(void 0===c[p]&&n.V()&&(void 0===e||qb(e,n.V().G()))&&(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),xi(a,b,m,l),l=d(n)))return l;h--;l=m}}};function Ii(a,b,c,d){b.uniform4fv(a.v.R,c);b.uniform1f(a.v.oa,d)}
188
+k.Ma=function(a,b){if(b){var c=b.i;this.c.lineDash=c?c:zi;c=b.g;this.c.lineDashOffset=c?c:0;c=b.a;c instanceof CanvasGradient||c instanceof CanvasPattern?c=Ai:c=ed(c).map(function(a,b){return 3!=b?a/255:a})||Ai;b=b.c;b=void 0!==b?b:1}else c=[0,0,0,0],b=0;a=a?a.b:[0,0,0,0];a instanceof CanvasGradient||a instanceof CanvasPattern?a=yi:a=ed(a).map(function(a,b){return 3!=b?a/255:a})||yi;this.c.strokeColor&&pa(this.c.strokeColor,c)&&this.c.fillColor&&pa(this.c.fillColor,a)&&this.c.lineWidth===b||(this.c.s=
189
+!0,this.c.fillColor=a,this.c.strokeColor=c,this.c.lineWidth=b,this.j.push([a,c,b]))};function Ji(){this.b="precision mediump float;varying vec2 a;varying float b;uniform float k;uniform sampler2D l;void main(void){vec4 texColor=texture2D(l,a);gl_FragColor.rgb=texColor.rgb;float alpha=texColor.a*b*k;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"}v(Ji,mi);var Ki=new Ji;
190
+function Li(){this.b="varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.0,0.0);gl_Position=h*vec4(c,0.0,1.0)+offsets;a=d;b=f;}"}v(Li,ni);var Mi=new Li;
191
+function Ni(a,b){this.c=a.getUniformLocation(b,"j");this.f=a.getUniformLocation(b,"i");this.a=a.getUniformLocation(b,"k");this.i=a.getUniformLocation(b,"h");this.v=a.getAttribLocation(b,"e");this.u=a.getAttribLocation(b,"f");this.b=a.getAttribLocation(b,"c");this.D=a.getAttribLocation(b,"g");this.C=a.getAttribLocation(b,"d")};function Oi(a,b){this.j=a;this.b=b;this.a={};this.c={};this.i={};this.l=this.v=this.f=this.o=null;(this.g=ja(fa,"OES_element_index_uint"))&&b.getExtension("OES_element_index_uint");y(this.j,"webglcontextlost",this.Xo,this);y(this.j,"webglcontextrestored",this.Yo,this)}v(Oi,Mc);
192
+function wi(a,b,c){var d=a.b,e=c.b,f=String(w(c));if(f in a.a)d.bindBuffer(b,a.a[f].buffer);else{var g=d.createBuffer();d.bindBuffer(b,g);var h;34962==b?h=new Float32Array(e):34963==b&&(h=a.g?new Uint32Array(e):new Uint16Array(e));d.bufferData(b,h,c.a);a.a[f]={lc:c,buffer:g}}}function Gi(a,b){var c=a.b;b=String(w(b));var d=a.a[b];c.isContextLost()||c.deleteBuffer(d.buffer);delete a.a[b]}k=Oi.prototype;
193
+k.ka=function(){Lc(this.j);var a=this.b;if(!a.isContextLost()){for(var b in this.a)a.deleteBuffer(this.a[b].buffer);for(b in this.i)a.deleteProgram(this.i[b]);for(b in this.c)a.deleteShader(this.c[b]);a.deleteFramebuffer(this.f);a.deleteRenderbuffer(this.l);a.deleteTexture(this.v)}};k.Wo=function(){return this.b};
194
+function Pi(a){if(!a.f){var b=a.b,c=b.createFramebuffer();b.bindFramebuffer(b.FRAMEBUFFER,c);var d=Qi(b,1,1),e=b.createRenderbuffer();b.bindRenderbuffer(b.RENDERBUFFER,e);b.renderbufferStorage(b.RENDERBUFFER,b.DEPTH_COMPONENT16,1,1);b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,d,0);b.framebufferRenderbuffer(b.FRAMEBUFFER,b.DEPTH_ATTACHMENT,b.RENDERBUFFER,e);b.bindTexture(b.TEXTURE_2D,null);b.bindRenderbuffer(b.RENDERBUFFER,null);b.bindFramebuffer(b.FRAMEBUFFER,null);a.f=c;
195
+a.v=d;a.l=e}return a.f}function Ri(a,b){var c=String(w(b));if(c in a.c)return a.c[c];var d=a.b,e=d.createShader(b.U());d.shaderSource(e,b.b);d.compileShader(e);return a.c[c]=e}function Hi(a,b,c){var d=w(b)+"/"+w(c);if(d in a.i)return a.i[d];var e=a.b,f=e.createProgram();e.attachShader(f,Ri(a,b));e.attachShader(f,Ri(a,c));e.linkProgram(f);return a.i[d]=f}k.Xo=function(){ub(this.a);ub(this.c);ub(this.i);this.l=this.v=this.f=this.o=null};k.Yo=function(){};
196
+k.Qc=function(a){if(a==this.o)return!1;this.b.useProgram(a);this.o=a;return!0};function Si(a,b,c){var d=a.createTexture();a.bindTexture(a.TEXTURE_2D,d);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR);void 0!==b&&a.texParameteri(3553,10242,b);void 0!==c&&a.texParameteri(3553,10243,c);return d}function Qi(a,b,c){var d=Si(a,void 0,void 0);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,b,c,0,a.RGBA,a.UNSIGNED_BYTE,null);return d}
197
+function Ti(a,b){var c=Si(a,33071,33071);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,b);return c};function Ui(a,b){vi.call(this,0,b);this.C=this.D=void 0;this.S=[];this.v=[];this.oa=void 0;this.j=[];this.c=[];this.I=this.ra=void 0;this.B=null;this.fb=this.fa=this.na=this.T=this.Ua=this.R=void 0;this.va=[];this.u=[];this.pa=void 0}v(Ui,vi);k=Ui.prototype;k.Eb=function(a){var b=this.l,c=this.o,d=this.va,e=this.u,f=a.b;return function(){if(!f.isContextLost()){var g;var h=0;for(g=d.length;h<g;++h)f.deleteTexture(d[h]);h=0;for(g=e.length;h<g;++h)f.deleteTexture(e[h])}Gi(a,b);Gi(a,c)}};
198
+function Vi(a,b,c,d){var e=a.D,f=a.C,g=a.oa,h=a.ra,l=a.I,m=a.R,n=a.Ua,p=a.T,q=a.na?1:0,r=-a.fa,u=a.fb,x=a.pa,B=Math.cos(r),r=Math.sin(r),E=a.b.length,A=a.a.length,L;for(L=0;L<c;L+=d){var oa=b[L]-a.origin[0];var ha=b[L+1]-a.origin[1];var ga=A/8;var z=-u*e;var M=-u*(g-f);a.a[A++]=oa;a.a[A++]=ha;a.a[A++]=z*B-M*r;a.a[A++]=z*r+M*B;a.a[A++]=n/l;a.a[A++]=(p+g)/h;a.a[A++]=m;a.a[A++]=q;z=u*(x-e);M=-u*(g-f);a.a[A++]=oa;a.a[A++]=ha;a.a[A++]=z*B-M*r;a.a[A++]=z*r+M*B;a.a[A++]=(n+x)/l;a.a[A++]=(p+g)/h;a.a[A++]=
199
+m;a.a[A++]=q;z=u*(x-e);M=u*f;a.a[A++]=oa;a.a[A++]=ha;a.a[A++]=z*B-M*r;a.a[A++]=z*r+M*B;a.a[A++]=(n+x)/l;a.a[A++]=p/h;a.a[A++]=m;a.a[A++]=q;z=-u*e;M=u*f;a.a[A++]=oa;a.a[A++]=ha;a.a[A++]=z*B-M*r;a.a[A++]=z*r+M*B;a.a[A++]=n/l;a.a[A++]=p/h;a.a[A++]=m;a.a[A++]=q;a.b[E++]=ga;a.b[E++]=ga+1;a.b[E++]=ga+2;a.b[E++]=ga;a.b[E++]=ga+2;a.b[E++]=ga+3}}k.oc=function(a,b){this.i.push(this.b.length);this.f.push(b);b=a.ga();Vi(this,b,b.length,a.qa())};
200
+k.qc=function(a,b){this.i.push(this.b.length);this.f.push(b);b=a.ga();Vi(this,b,b.length,a.qa())};k.Db=function(a){a=a.b;this.S.push(this.b.length);this.v.push(this.b.length);this.l=new Di(this.a);this.o=new Di(this.b);var b={};Wi(this.va,this.j,b,a);Wi(this.u,this.c,b,a);this.oa=this.C=this.D=void 0;this.c=this.j=null;this.I=this.ra=void 0;this.b=null;this.fb=this.fa=this.na=this.T=this.Ua=this.R=void 0;this.a=null;this.pa=void 0};
201
+function Wi(a,b,c,d){var e,f=b.length;for(e=0;e<f;++e){var g=b[e];var h=w(g).toString();h in c?g=c[h]:(g=Ti(d,g),c[h]=g);a[e]=g}}
202
+k.rf=function(a,b){var c=Hi(b,Ki,Mi);if(this.B)var d=this.B;else this.B=d=new Ni(a,c);b.Qc(c);a.enableVertexAttribArray(d.b);a.vertexAttribPointer(d.b,2,5126,!1,32,0);a.enableVertexAttribArray(d.v);a.vertexAttribPointer(d.v,2,5126,!1,32,8);a.enableVertexAttribArray(d.C);a.vertexAttribPointer(d.C,2,5126,!1,32,16);a.enableVertexAttribArray(d.u);a.vertexAttribPointer(d.u,1,5126,!1,32,24);a.enableVertexAttribArray(d.D);a.vertexAttribPointer(d.D,1,5126,!1,32,28);return d};
203
+k.sf=function(a,b){a.disableVertexAttribArray(b.b);a.disableVertexAttribArray(b.v);a.disableVertexAttribArray(b.C);a.disableVertexAttribArray(b.u);a.disableVertexAttribArray(b.D)};
204
+k.Od=function(a,b,c,d){var e=d?this.u:this.va;d=d?this.v:this.S;if(wb(c)){var f;c=0;var g=e.length;for(f=0;c<g;++c){a.bindTexture(3553,e[c]);var h=d[c];xi(a,b,f,h);f=h}}else for(f=g=0,h=e.length;f<h;++f){a.bindTexture(3553,e[f]);for(var l=0<f?d[f-1]:0,m=d[f],n=l;g<this.i.length&&this.i[g]<=m;){var p=w(this.f[g]).toString();void 0!==c[p]?(n!==l&&xi(a,b,n,l),l=n=g===this.i.length-1?m:this.i[g+1]):l=g===this.i.length-1?m:this.i[g+1];g++}n!==l&&xi(a,b,n,l)}};
205
+k.ve=function(a,b,c,d,e){var f,g,h=this.i.length-1;for(f=this.u.length-1;0<=f;--f){a.bindTexture(3553,this.u[f]);var l=0<f?this.v[f-1]:0;for(g=this.v[f];0<=h&&this.i[h]>=l;){var m=this.i[h];var n=this.f[h];var p=w(n).toString();if(void 0===c[p]&&n.V()&&(void 0===e||qb(e,n.V().G()))&&(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),xi(a,b,m,g),g=d(n)))return g;g=m;h--}}};
206
+k.Ub=function(a){var b=a.Hc(),c=a.Y(1),d=a.ye(),e=a.qg(1),f=a.f,g=a.Oc(),h=a.l,l=a.g,m=a.ic();a=a.a;if(this.j.length){var n=this.j[this.j.length-1];w(n)!=w(c)&&(this.S.push(this.b.length),this.j.push(c))}else this.j.push(c);this.c.length?(n=this.c[this.c.length-1],w(n)!=w(e)&&(this.v.push(this.b.length),this.c.push(e))):this.c.push(e);this.D=b[0];this.C=b[1];this.oa=m[1];this.ra=d[1];this.I=d[0];this.R=f;this.Ua=g[0];this.T=g[1];this.fa=l;this.na=h;this.fb=a;this.pa=m[0]};function Xi(a,b,c){var d=b-c;return a[0]===a[d]&&a[1]===a[d+1]&&3<(b-0)/c?!!vf(a,0,b,c):!1};function Yi(){this.b="precision mediump float;varying float a;varying vec2 b;varying float c;uniform float m;uniform vec4 n;uniform vec2 o;uniform float p;void main(void){if(a>0.0){vec2 windowCoords=vec2((b.x+1.0)/2.0*o.x*p,(b.y+1.0)/2.0*o.y*p);if(length(windowCoords-gl_FragCoord.xy)>c*p){discard;}} gl_FragColor=n;float alpha=n.a*m;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"}v(Yi,mi);var Zi=new Yi;
207
+function $i(){this.b="varying float a;varying vec2 b;varying float c;attribute vec2 d;attribute vec2 e;attribute vec2 f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;bool nearlyEquals(in float value,in float ref){float epsilon=0.000000000001;return value>=ref-epsilon&&value<=ref+epsilon;}void alongNormal(out vec2 offset,in vec2 nextP,in float turnDir,in float direction){vec2 dirVect=nextP-e;vec2 normal=normalize(vec2(-turnDir*dirVect.y,turnDir*dirVect.x));offset=k/2.0*normal*direction;}void miterUp(out vec2 offset,out float round,in bool isRound,in float direction){float halfWidth=k/2.0;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=f-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;round=0.0;if(isRound){round=1.0;}else if(miterLength>l+k){offset=halfWidth*tmpNormal*direction;}} bool miterDown(out vec2 offset,in vec4 projPos,in mat4 offsetMatrix,in float direction){bool degenerate=false;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=d-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));vec2 longOffset,shortOffset,longVertex;vec4 shortProjVertex;float halfWidth=k/2.0;if(length(f-e)>length(d-e)){longOffset=tmpNormal*direction*halfWidth;shortOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=f;shortProjVertex=h*vec4(d,0.0,1.0);}else{shortOffset=tmpNormal*direction*halfWidth;longOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=d;shortProjVertex=h*vec4(f,0.0,1.0);}vec4 p1=h*vec4(longVertex,0.0,1.0)+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p2=projPos+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p3=shortProjVertex+offsetMatrix*vec4(-shortOffset,0.0,0.0);vec4 p4=shortProjVertex+offsetMatrix*vec4(shortOffset,0.0,0.0);float denom=(p4.y-p3.y)*(p2.x-p1.x)-(p4.x-p3.x)*(p2.y-p1.y);float firstU=((p4.x-p3.x)*(p1.y-p3.y)-(p4.y-p3.y)*(p1.x-p3.x))/denom;float secondU=((p2.x-p1.x)*(p1.y-p3.y)-(p2.y-p1.y)*(p1.x-p3.x))/denom;float epsilon=0.000000000001;if(firstU>epsilon&&firstU<1.0-epsilon&&secondU>epsilon&&secondU<1.0-epsilon){shortProjVertex.x=p1.x+firstU*(p2.x-p1.x);shortProjVertex.y=p1.y+firstU*(p2.y-p1.y);offset=shortProjVertex.xy;degenerate=true;}else{float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;}return degenerate;}void squareCap(out vec2 offset,out float round,in bool isRound,in vec2 nextP,in float turnDir,in float direction){round=0.0;vec2 dirVect=e-nextP;vec2 firstNormal=normalize(dirVect);vec2 secondNormal=vec2(turnDir*firstNormal.y*direction,-turnDir*firstNormal.x*direction);vec2 hypotenuse=normalize(firstNormal-secondNormal);vec2 normal=vec2(turnDir*hypotenuse.y*direction,-turnDir*hypotenuse.x*direction);float length=sqrt(c*c*2.0);offset=normal*length;if(isRound){round=1.0;}} void main(void){bool degenerate=false;float direction=float(sign(g));mat4 offsetMatrix=i*j;vec2 offset;vec4 projPos=h*vec4(e,0.0,1.0);bool round=nearlyEquals(mod(g,2.0),0.0);a=0.0;c=k/2.0;b=projPos.xy;if(nearlyEquals(mod(g,3.0),0.0)||nearlyEquals(mod(g,17.0),0.0)){alongNormal(offset,f,1.0,direction);}else if(nearlyEquals(mod(g,5.0),0.0)||nearlyEquals(mod(g,13.0),0.0)){alongNormal(offset,d,-1.0,direction);}else if(nearlyEquals(mod(g,23.0),0.0)){miterUp(offset,a,round,direction);}else if(nearlyEquals(mod(g,19.0),0.0)){degenerate=miterDown(offset,projPos,offsetMatrix,direction);}else if(nearlyEquals(mod(g,7.0),0.0)){squareCap(offset,a,round,f,1.0,direction);}else if(nearlyEquals(mod(g,11.0),0.0)){squareCap(offset,a,round,d,-1.0,direction);}if(!degenerate){vec4 offsets=offsetMatrix*vec4(offset,0.0,0.0);gl_Position=projPos+offsets;}else{gl_Position=vec4(offset,0.0,1.0);}}"}
208
+v($i,ni);var aj=new $i;function bj(a,b){this.B=a.getUniformLocation(b,"n");this.oa=a.getUniformLocation(b,"k");this.R=a.getUniformLocation(b,"l");this.c=a.getUniformLocation(b,"j");this.f=a.getUniformLocation(b,"i");this.a=a.getUniformLocation(b,"m");this.ra=a.getUniformLocation(b,"p");this.i=a.getUniformLocation(b,"h");this.I=a.getUniformLocation(b,"o");this.g=a.getAttribLocation(b,"g");this.o=a.getAttribLocation(b,"d");this.l=a.getAttribLocation(b,"f");this.b=a.getAttribLocation(b,"e")};function cj(a,b){vi.call(this,0,b);this.v=null;this.u=[];this.j=[];this.c={strokeColor:null,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0,s:!1}}v(cj,vi);
209
+function dj(a,b,c,d){var e,f=a.a.length,g=a.b.length,h="bevel"===a.c.lineJoin?0:"miter"===a.c.lineJoin?1:2,l="butt"===a.c.lineCap?0:"square"===a.c.lineCap?1:2,m=Xi(b,c,d),n=g,p=1;for(e=0;e<c;e+=d){var q=f/7;var r=u;var u=x||[b[e],b[e+1]];if(e)if(e===c-d){if(m)var x=B;else r=r||[0,0],f=ej(a,r,u,[0,0],p*fj*(l||1),f),f=ej(a,r,u,[0,0],-p*fj*(l||1),f),a.b[g++]=q,a.b[g++]=n-1,a.b[g++]=n,a.b[g++]=n,a.b[g++]=q+1,a.b[g++]=q,l&&(f=ej(a,r,u,[0,0],p*gj*l,f),f=ej(a,r,u,[0,0],-p*gj*l,f),a.b[g++]=q+2,a.b[g++]=q,
210
+a.b[g++]=q+1,a.b[g++]=q+1,a.b[g++]=q+3,a.b[g++]=q+2);break}else x=[b[e+d],b[e+d+1]];else{x=[b[e+d],b[e+d+1]];if(c-0===2*d&&pa(u,x))break;if(m){r=[b[c-2*d],b[c-2*d+1]];var B=x}else{l&&(f=ej(a,[0,0],u,x,p*hj*l,f),f=ej(a,[0,0],u,x,-p*hj*l,f),a.b[g++]=q+2,a.b[g++]=q,a.b[g++]=q+1,a.b[g++]=q+1,a.b[g++]=q+3,a.b[g++]=q+2);f=ej(a,[0,0],u,x,p*ij*(l||1),f);f=ej(a,[0,0],u,x,-p*ij*(l||1),f);n=f/7-1;continue}}var E=Bi(r[0],r[1],u[0],u[1],x[0],x[1])?-1:1;f=ej(a,r,u,x,E*jj*(h||1),f);f=ej(a,r,u,x,E*kj*(h||1),f);f=
211
+ej(a,r,u,x,-E*lj*(h||1),f);0<e&&(a.b[g++]=q,a.b[g++]=n-1,a.b[g++]=n,a.b[g++]=q+2,a.b[g++]=q,a.b[g++]=0<p*E?n:n-1);a.b[g++]=q;a.b[g++]=q+2;a.b[g++]=q+1;n=q+2;p=E;h&&(f=ej(a,r,u,x,E*mj*h,f),a.b[g++]=q+1,a.b[g++]=q+3,a.b[g++]=q)}m&&(q=q||f/7,E=Sf([r[0],r[1],u[0],u[1],x[0],x[1]],0,6,2)?1:-1,f=ej(a,r,u,x,E*jj*(h||1),f),ej(a,r,u,x,-E*lj*(h||1),f),a.b[g++]=q,a.b[g++]=n-1,a.b[g++]=n,a.b[g++]=q+1,a.b[g++]=q,a.b[g++]=0<p*E?n:n-1)}
212
+function ej(a,b,c,d,e,f){a.a[f++]=b[0];a.a[f++]=b[1];a.a[f++]=c[0];a.a[f++]=c[1];a.a[f++]=d[0];a.a[f++]=d[1];a.a[f++]=e;return f}function nj(a,b,c,d){c-=b;return c<2*d?!1:c===2*d?!pa([a[b],a[b+1]],[a[b+d],a[b+d+1]]):!0}k=cj.prototype;k.mc=function(a,b){var c=a.ga();a=a.qa();nj(c,0,c.length,a)&&(c=qf(c,0,c.length,a,-this.origin[0],-this.origin[1]),this.c.s&&(this.j.push(this.b.length),this.c.s=!1),this.i.push(this.b.length),this.f.push(b),dj(this,c,c.length,a))};
213
+k.nc=function(a,b){var c=this.b.length,d=a.Bb();d.unshift(0);var e=a.ga();a=a.qa();var f;if(1<d.length){var g=1;for(f=d.length;g<f;++g)if(nj(e,d[g-1],d[g],a)){var h=qf(e,d[g-1],d[g],a,-this.origin[0],-this.origin[1]);dj(this,h,h.length,a)}}this.b.length>c&&(this.i.push(c),this.f.push(b),this.c.s&&(this.j.push(c),this.c.s=!1))};
214
+function oj(a,b,c,d){Xi(b,b.length,d)||(b.push(b[0]),b.push(b[1]));dj(a,b,b.length,d);if(c.length){var e;b=0;for(e=c.length;b<e;++b)Xi(c[b],c[b].length,d)||(c[b].push(c[b][0]),c[b].push(c[b][1])),dj(a,c[b],c[b].length,d)}}function pj(a,b,c){c=void 0===c?a.b.length:c;a.i.push(c);a.f.push(b);a.c.s&&(a.j.push(c),a.c.s=!1)}k.Db=function(){this.l=new Di(this.a);this.o=new Di(this.b);this.i.push(this.b.length);!this.j.length&&0<this.u.length&&(this.u=[]);this.b=this.a=null};
215
+k.Eb=function(a){var b=this.l,c=this.o;return function(){Gi(a,b);Gi(a,c)}};
216
+k.rf=function(a,b,c,d){var e=Hi(b,Zi,aj);if(this.v)var f=this.v;else this.v=f=new bj(a,e);b.Qc(e);a.enableVertexAttribArray(f.o);a.vertexAttribPointer(f.o,2,5126,!1,28,0);a.enableVertexAttribArray(f.b);a.vertexAttribPointer(f.b,2,5126,!1,28,8);a.enableVertexAttribArray(f.l);a.vertexAttribPointer(f.l,2,5126,!1,28,16);a.enableVertexAttribArray(f.g);a.vertexAttribPointer(f.g,1,5126,!1,28,24);a.uniform2fv(f.I,c);a.uniform1f(f.ra,d);return f};
217
+k.sf=function(a,b){a.disableVertexAttribArray(b.o);a.disableVertexAttribArray(b.b);a.disableVertexAttribArray(b.l);a.disableVertexAttribArray(b.g)};
218
+k.Od=function(a,b,c,d){var e=a.getParameter(a.DEPTH_FUNC),f=a.getParameter(a.DEPTH_WRITEMASK);d||(a.enable(a.DEPTH_TEST),a.depthMask(!0),a.depthFunc(a.NOTEQUAL));if(wb(c)){var g=this.i[this.i.length-1];for(c=this.j.length-1;0<=c;--c){var h=this.j[c];var l=this.u[c];qj(this,a,l[0],l[1],l[2]);xi(a,b,h,g);a.clear(a.DEPTH_BUFFER_BIT);g=h}}else{var m=this.i.length-2;l=g=this.i[m+1];for(h=this.j.length-1;0<=h;--h){var n=this.u[h];qj(this,a,n[0],n[1],n[2]);for(n=this.j[h];0<=m&&this.i[m]>=n;){var p=this.i[m];
219
+var q=this.f[m];q=w(q).toString();c[q]&&(g!==l&&(xi(a,b,g,l),a.clear(a.DEPTH_BUFFER_BIT)),l=p);m--;g=p}g!==l&&(xi(a,b,g,l),a.clear(a.DEPTH_BUFFER_BIT));g=l=n}}d||(a.disable(a.DEPTH_TEST),a.clear(a.DEPTH_BUFFER_BIT),a.depthMask(f),a.depthFunc(e))};
220
+k.ve=function(a,b,c,d,e){var f,g;var h=this.i.length-2;var l=this.i[h+1];for(f=this.j.length-1;0<=f;--f){var m=this.u[f];qj(this,a,m[0],m[1],m[2]);for(g=this.j[f];0<=h&&this.i[h]>=g;){m=this.i[h];var n=this.f[h];var p=w(n).toString();if(void 0===c[p]&&n.V()&&(void 0===e||qb(e,n.V().G()))&&(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),xi(a,b,m,l),l=d(n)))return l;h--;l=m}}};function qj(a,b,c,d,e){b.uniform4fv(a.v.B,c);b.uniform1f(a.v.oa,d);b.uniform1f(a.v.R,e)}
221
+k.Ma=function(a,b){a=b.f;this.c.lineCap=void 0!==a?a:"round";a=b.i;this.c.lineDash=a?a:zi;a=b.g;this.c.lineDashOffset=a?a:0;a=b.j;this.c.lineJoin=void 0!==a?a:"round";a=b.a;a instanceof CanvasGradient||a instanceof CanvasPattern?a=Ai:a=ed(a).map(function(a,b){return 3!=b?a/255:a})||Ai;var c=b.c,c=void 0!==c?c:1;b=b.o;b=void 0!==b?b:10;this.c.strokeColor&&pa(this.c.strokeColor,a)&&this.c.lineWidth===c&&this.c.miterLimit===b||(this.c.s=!0,this.c.strokeColor=a,this.c.lineWidth=c,this.c.miterLimit=b,
222
+this.u.push([a,c,b]))};var ij=3,fj=5,hj=7,gj=11,jj=13,kj=17,lj=19,mj=23;function rj(){this.b="precision mediump float;uniform vec4 e;uniform float f;void main(void){gl_FragColor=e;float alpha=e.a*f;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"}v(rj,mi);var sj=new rj;function tj(){this.b="attribute vec2 a;uniform mat4 b;uniform mat4 c;uniform mat4 d;void main(void){gl_Position=b*vec4(a,0.0,1.0);}"}v(tj,ni);var uj=new tj;
223
+function vj(a,b){this.B=a.getUniformLocation(b,"e");this.c=a.getUniformLocation(b,"d");this.f=a.getUniformLocation(b,"c");this.a=a.getUniformLocation(b,"f");this.i=a.getUniformLocation(b,"b");this.b=a.getAttribLocation(b,"a")};function wj(a){a=a||{};this.a=void 0!==a.color?a.color:null;this.f=a.lineCap;this.i=void 0!==a.lineDash?a.lineDash:null;this.g=a.lineDashOffset;this.j=a.lineJoin;this.o=a.miterLimit;this.c=a.width;this.b=void 0}k=wj.prototype;k.clone=function(){var a=this.a;return new wj({color:a&&a.slice?a.slice():a||void 0,lineCap:this.f,lineDash:this.i?this.i.slice():void 0,lineDashOffset:this.g,lineJoin:this.j,miterLimit:this.o,width:this.c})};k.No=function(){return this.a};k.Vk=function(){return this.f};
224
+k.Oo=function(){return this.i};k.Wk=function(){return this.g};k.Xk=function(){return this.j};k.bl=function(){return this.o};k.Po=function(){return this.c};k.Qo=function(a){this.a=a;this.b=void 0};k.aq=function(a){this.f=a;this.b=void 0};k.setLineDash=function(a){this.i=a;this.b=void 0};k.bq=function(a){this.g=a;this.b=void 0};k.cq=function(a){this.j=a;this.b=void 0};k.gq=function(a){this.o=a;this.b=void 0};k.jq=function(a){this.c=a;this.b=void 0};function xj(a){this.b=this.a=this.i=void 0;this.f=void 0===a?!0:a;this.c=0}function yj(a){var b=a.b;if(b){var c=b.next,d=b.ub;c&&(c.ub=d);d&&(d.next=c);a.b=c||d;a.i===a.a?(a.b=void 0,a.i=void 0,a.a=void 0):a.i===b?a.i=a.b:a.a===b&&(a.a=d?a.b.ub:a.b);a.c--}}function zj(a){a.b=a.i;if(a.b)return a.b.data}function Aj(a){if(a.b&&a.b.next)return a.b=a.b.next,a.b.data}function Bj(a){if(a.b&&a.b.next)return a.b.next.data}function Cj(a){if(a.b&&a.b.ub)return a.b=a.b.ub,a.b.data}
225
+function Dj(a){if(a.b&&a.b.ub)return a.b.ub.data}function Ej(a){if(a.b)return a.b.data}xj.prototype.concat=function(a){if(a.b){if(this.b){var b=this.b.next;this.b.next=a.i;a.i.ub=this.b;b.ub=a.a;a.a.next=b;this.c+=a.c}else this.b=a.b,this.i=a.i,this.a=a.a,this.c=a.c;a.b=void 0;a.i=void 0;a.a=void 0;a.c=0}};var Fj={$d:function(){}};
226
+(function(a){function b(a,e,f,g,h){f=f||0;g=g||a.length-1;for(h=h||d;g>f;){if(600<g-f){var l=g-f+1,m=e-f+1,n=Math.log(l),p=.5*Math.exp(2*n/3),n=.5*Math.sqrt(n*p*(l-p)/l)*(0>m-l/2?-1:1);b(a,e,Math.max(f,Math.floor(e-m*p/l+n)),Math.min(g,Math.floor(e+(l-m)*p/l+n)),h)}l=a[e];m=f;p=g;c(a,f,e);for(0<h(a[g],l)&&c(a,f,g);m<p;){c(a,m,p);m++;for(p--;0>h(a[m],l);)m++;for(;0<h(a[p],l);)p--}0===h(a[f],l)?c(a,f,p):(p++,c(a,p,g));p<=e&&(f=p+1);e<=p&&(g=p-1)}}function c(a,b,c){var d=a[b];a[b]=a[c];a[c]=d}function d(a,
227
+b){return a<b?-1:a>b?1:0}function e(a,b){if(!(this instanceof e))return new e(a,b);this.Hf=Math.max(4,a||9);this.fh=Math.max(2,Math.ceil(.4*this.Hf));b&&this.ek(b);this.clear()}function f(a,b){g(a,0,a.children.length,b,a)}function g(a,b,c,d,e){e||(e=u(null));e.ca=Infinity;e.da=Infinity;e.$=-Infinity;e.ia=-Infinity;for(var f;b<c;b++)f=a.children[b],h(e,a.ib?d(f):f);return e}function h(a,b){a.ca=Math.min(a.ca,b.ca);a.da=Math.min(a.da,b.da);a.$=Math.max(a.$,b.$);a.ia=Math.max(a.ia,b.ia)}function l(a,
228
+b){return a.ca-b.ca}function m(a,b){return a.da-b.da}function n(a){return(a.$-a.ca)*(a.ia-a.da)}function p(a){return a.$-a.ca+(a.ia-a.da)}function q(a,b){return a.ca<=b.ca&&a.da<=b.da&&b.$<=a.$&&b.ia<=a.ia}function r(a,b){return b.ca<=a.$&&b.da<=a.ia&&b.$>=a.ca&&b.ia>=a.da}function u(a){return{children:a,height:1,ib:!0,ca:Infinity,da:Infinity,$:-Infinity,ia:-Infinity}}function x(a,b,c,d,e){for(var f=[b,c],g;f.length;)c=f.pop(),b=f.pop(),c-b<=d||(g=b+Math.ceil((c-b)/d/2)*d,B(a,g,b,c,e),f.push(b,g,
229
+g,c))}var B=b;e.prototype={all:function(){return this.$g(this.data,[])},search:function(a){var b=this.data,c=[],d=this.wb;if(!r(a,b))return c;for(var e=[],f,g,h,l;b;){f=0;for(g=b.children.length;f<g;f++)h=b.children[f],l=b.ib?d(h):h,r(a,l)&&(b.ib?c.push(h):q(a,l)?this.$g(h,c):e.push(h));b=e.pop()}return c},load:function(a){if(!a||!a.length)return this;if(a.length<this.fh){for(var b=0,c=a.length;b<c;b++)this.Ca(a[b]);return this}a=this.bh(a.slice(),0,a.length-1,0);this.data.children.length?this.data.height===
230
+a.height?this.hh(this.data,a):(this.data.height<a.height&&(b=this.data,this.data=a,a=b),this.eh(a,this.data.height-a.height-1,!0)):this.data=a;return this},Ca:function(a){a&&this.eh(a,this.data.height-1);return this},clear:function(){this.data=u([]);return this},remove:function(a,b){if(!a)return this;for(var c=this.data,d=this.wb(a),e=[],f=[],g,h,l,m;c||e.length;){c||(c=e.pop(),h=e[e.length-1],g=f.pop(),m=!0);if(c.ib){a:{l=a;var n=c.children,p=b;if(p){for(var r=0;r<n.length;r++)if(p(l,n[r])){l=r;
231
+break a}l=-1}else l=n.indexOf(l)}if(-1!==l){c.children.splice(l,1);e.push(c);this.ck(e);break}}m||c.ib||!q(c,d)?h?(g++,c=h.children[g],m=!1):c=null:(e.push(c),f.push(g),g=0,h=c,c=c.children[0])}return this},wb:function(a){return a},Lf:l,Mf:m,toJSON:function(){return this.data},$g:function(a,b){for(var c=[];a;)a.ib?b.push.apply(b,a.children):c.push.apply(c,a.children),a=c.pop();return b},bh:function(a,b,c,d){var e=c-b+1,g=this.Hf;if(e<=g){var h=u(a.slice(b,c+1));f(h,this.wb);return h}d||(d=Math.ceil(Math.log(e)/
232
+Math.log(g)),g=Math.ceil(e/Math.pow(g,d-1)));h=u([]);h.ib=!1;h.height=d;var e=Math.ceil(e/g),g=e*Math.ceil(Math.sqrt(g)),l;for(x(a,b,c,g,this.Lf);b<=c;b+=g){var m=Math.min(b+g-1,c);x(a,b,m,e,this.Mf);for(l=b;l<=m;l+=e){var n=Math.min(l+e-1,m);h.children.push(this.bh(a,l,n,d-1))}}f(h,this.wb);return h},bk:function(a,b,c,d){for(var e,f,g,h,l,m,p,q;;){d.push(b);if(b.ib||d.length-1===c)break;p=q=Infinity;e=0;for(f=b.children.length;e<f;e++)g=b.children[e],l=n(g),m=(Math.max(g.$,a.$)-Math.min(g.ca,a.ca))*
233
+(Math.max(g.ia,a.ia)-Math.min(g.da,a.da))-l,m<q?(q=m,p=l<p?l:p,h=g):m===q&&l<p&&(p=l,h=g);b=h||b.children[0]}return b},eh:function(a,b,c){var d=this.wb;c=c?a:d(a);var d=[],e=this.bk(c,this.data,b,d);e.children.push(a);for(h(e,c);0<=b;)if(d[b].children.length>this.Hf)this.jk(d,b),b--;else break;this.Zj(c,d,b)},jk:function(a,b){var c=a[b],d=c.children.length,e=this.fh;this.$j(c,e,d);d=this.ak(c,e,d);d=u(c.children.splice(d,c.children.length-d));d.height=c.height;d.ib=c.ib;f(c,this.wb);f(d,this.wb);
234
+b?a[b-1].children.push(d):this.hh(c,d)},hh:function(a,b){this.data=u([a,b]);this.data.height=a.height+1;this.data.ib=!1;f(this.data,this.wb)},ak:function(a,b,c){var d,e;var f=e=Infinity;for(d=b;d<=c-b;d++){var h=g(a,0,d,this.wb);var l=g(a,d,c,this.wb);var m=Math.max(0,Math.min(h.$,l.$)-Math.max(h.ca,l.ca))*Math.max(0,Math.min(h.ia,l.ia)-Math.max(h.da,l.da));h=n(h)+n(l);if(m<f){f=m;var p=d;e=h<e?h:e}else m===f&&h<e&&(e=h,p=d)}return p},$j:function(a,b,c){var d=a.ib?this.Lf:l,e=a.ib?this.Mf:m,f=this.ah(a,
235
+b,c,d);b=this.ah(a,b,c,e);f<b&&a.children.sort(d)},ah:function(a,b,c,d){a.children.sort(d);d=this.wb;var e=g(a,0,b,d),f=g(a,c-b,c,d),l=p(e)+p(f),m;for(m=b;m<c-b;m++){var n=a.children[m];h(e,a.ib?d(n):n);l+=p(e)}for(m=c-b-1;m>=b;m--)n=a.children[m],h(f,a.ib?d(n):n),l+=p(f);return l},Zj:function(a,b,c){for(;0<=c;c--)h(b[c],a)},ck:function(a){for(var b=a.length-1,c;0<=b;b--)0===a[b].children.length?0<b?(c=a[b-1].children,c.splice(c.indexOf(a[b]),1)):this.clear():f(a[b],this.wb)},ek:function(a){var b=
236
+["return a"," - b",";"];this.Lf=new Function("a","b",b.join(a[0]));this.Mf=new Function("a","b",b.join(a[1]));this.wb=new Function("a","return {minX: a"+a[0]+", minY: a"+a[1]+", maxX: a"+a[2]+", maxY: a"+a[3]+"};")}};a["default"]=e})(Fj.$d=Fj.$d||{});Fj.$d=Fj.$d.default;function Gj(a){this.a=Fj.$d(a);this.b={}}k=Gj.prototype;k.Ca=function(a,b){a={ca:a[0],da:a[1],$:a[2],ia:a[3],value:b};this.a.Ca(a);this.b[w(b)]=a};k.load=function(a,b){for(var c=Array(b.length),d=0,e=b.length;d<e;d++){var f=a[d],g=b[d],f={ca:f[0],da:f[1],$:f[2],ia:f[3],value:g};c[d]=f;this.b[w(g)]=f}this.a.load(c)};k.remove=function(a){a=w(a);var b=this.b[a];delete this.b[a];return null!==this.a.remove(b)};function Hj(a,b,c){var d=a.b[w(c)];bb([d.ca,d.da,d.$,d.ia],b)||(a.remove(c),a.Ca(b,c))}
237
+function Ij(a){return a.a.all().map(function(a){return a.value})}function Jj(a,b){return a.a.search({ca:b[0],da:b[1],$:b[2],ia:b[3]}).map(function(a){return a.value})}k.forEach=function(a,b){return Kj(Ij(this),a,b)};function Lj(a,b,c,d){return Kj(Jj(a,b),c,d)}function Kj(a,b,c){for(var d,e=0,f=a.length;e<f&&!(d=b.call(c,a[e]));e++);return d}k.clear=function(){this.a.clear();this.b={}};k.G=function(a){var b=this.a.data;return Xa(b.ca,b.da,b.$,b.ia,a)};
238
+k.concat=function(a){this.a.load(a.a.all());for(var b in a.b)this.b[b|0]=a.b[b|0]};function Mj(a,b){vi.call(this,0,b);this.g=new cj(0,b);this.v=null;this.u=[];this.c=[];this.j={fillColor:null,s:!1}}v(Mj,vi);
239
+function Nj(a,b,c,d){var e=new xj,f=new Gj;b=Oj(a,b,d,e,f,!0);if(c.length){var g,h=[];var l=0;for(g=c.length;l<g;++l){var m={list:new xj,$:void 0,Mg:new Gj};h.push(m);m.$=Oj(a,c[l],d,m.list,m.Mg,!1)}h.sort(function(a,b){return b.$[0]===a.$[0]?a.$[1]-b.$[1]:b.$[0]-a.$[0]});for(l=0;l<h.length;++l){c=h[l].list;g=d=zj(c);do{if(Pj(g,f).length){var n=!0;break}g=Aj(c)}while(d!==g);n||(Qj(c,h[l].Mg,!0),Rj(c,h[l].$[0],e,b[0],f)&&(f.concat(h[l].Mg),Qj(e,f,!1)))}}else Qj(e,f,!1);Sj(a,e,f)}
240
+function Oj(a,b,c,d,e,f){var g,h=a.a.length/2,l,m=[],n=[];if(f===Sf(b,0,b.length,c)){var p=l=Tj(a,b[0],b[1],h++);f=b[0];var q=b[1];var r=c;for(g=b.length;r<g;r+=c){var u=Tj(a,b[r],b[r+1],h++);n.push(Uj(p,u,d));m.push([Math.min(p.x,u.x),Math.min(p.y,u.y),Math.max(p.x,u.x),Math.max(p.y,u.y)]);b[r]>f&&(f=b[r],q=b[r+1]);p=u}}else for(r=b.length-c,p=l=Tj(a,b[r],b[r+1],h++),f=b[r],q=b[r+1],r-=c,g=0;r>=g;r-=c)u=Tj(a,b[r],b[r+1],h++),n.push(Uj(p,u,d)),m.push([Math.min(p.x,u.x),Math.min(p.y,u.y),Math.max(p.x,
241
+u.x),Math.max(p.y,u.y)]),b[r]>f&&(f=b[r],q=b[r+1]),p=u;n.push(Uj(u,l,d));m.push([Math.min(p.x,u.x),Math.min(p.y,u.y),Math.max(p.x,u.x),Math.max(p.y,u.y)]);e.load(m,n);return[f,q]}function Qj(a,b,c){var d=zj(a),e=d,f=Aj(a),g=!1;do{var h=c?Bi(f.W.x,f.W.y,e.W.x,e.W.y,e.aa.x,e.aa.y):Bi(e.aa.x,e.aa.y,e.W.x,e.W.y,f.W.x,f.W.y);void 0===h?(Vj(e,f,a,b),g=!0,f===d&&(d=Bj(a)),f=e,Cj(a)):e.W.Fb!==h&&(e.W.Fb=h,g=!0);e=f;f=Aj(a)}while(e!==d);return g}
242
+function Rj(a,b,c,d,e){for(var f=zj(a);f.W.x!==b;)f=Aj(a);b=f.W;d={x:d,y:b.y,hb:-1};var g=Infinity,h;var l=Pj({aa:b,W:d},e,!0);var m=0;for(h=l.length;m<h;++m){var n=l[m],p=Wj(b,d,n.aa,n.W,!0),q=Math.abs(b.x-p[0]);if(q<g&&void 0!==Bi(b.x,b.y,n.aa.x,n.aa.y,n.W.x,n.W.y)){g=q;var r={x:p[0],y:p[1],hb:-1};f=n}}if(Infinity===g)return!1;l=f.W;if(0<g&&(f=Xj(b,r,f.W,e),f.length))for(r=Infinity,m=0,h=f.length;m<h;++m)if(g=f[m],n=Math.atan2(b.y-g.y,d.x-g.x),n<r||n===r&&g.x<l.x)r=n,l=g;for(f=zj(c);f.W.x!==l.x||
243
+f.W.y!==l.y;)f=Aj(c);d={x:b.x,y:b.y,hb:b.hb,Fb:void 0};m={x:f.W.x,y:f.W.y,hb:f.W.hb,Fb:void 0};Bj(a).aa=d;Uj(b,f.W,a,e);Uj(m,d,a,e);f.W=m;a.f&&a.b&&(a.i=a.b,a.a=a.b.ub);c.concat(a);return!0}
244
+function Sj(a,b,c){for(var d=!1,e=Yj(b,c);3<b.c;)if(e){if(!Zj(a,b,c,e,d)&&!Qj(b,c,d)&&!ak(a,b,c,!0))break}else if(!Zj(a,b,c,e,d)&&!Qj(b,c,d)&&!ak(a,b,c))if(e=Yj(b,c)){var d=b,f=2*d.c,g=Array(f),h=zj(d),l=h,m=0;do g[m++]=l.aa.x,g[m++]=l.aa.y,l=Aj(d);while(l!==h);d=!Sf(g,0,f,2);Qj(b,c,d)}else{e=a;d=b;f=g=zj(d);do{h=Pj(f,c);if(h.length){g=h[0];h=Wj(f.aa,f.W,g.aa,g.W);h=Tj(e,h[0],h[1],e.a.length/2);l=new xj;m=new Gj;Uj(h,f.W,l,m);f.W=h;Hj(c,[Math.min(f.aa.x,h.x),Math.min(f.aa.y,h.y),Math.max(f.aa.x,h.x),
245
+Math.max(f.aa.y,h.y)],f);for(f=Aj(d);f!==g;)Uj(f.aa,f.W,l,m),c.remove(f),yj(d),f=Ej(d);Uj(g.aa,h,l,m);g.aa=h;Hj(c,[Math.min(g.W.x,h.x),Math.min(g.W.y,h.y),Math.max(g.W.x,h.x),Math.max(g.W.y,h.y)],g);Qj(d,c,!1);Sj(e,d,c);Qj(l,m,!1);Sj(e,l,m);break}f=Aj(d)}while(f!==g);break}3===b.c&&(e=a.b.length,a.b[e++]=Dj(b).aa.hb,a.b[e++]=Ej(b).aa.hb,a.b[e++]=Bj(b).aa.hb)}
246
+function Zj(a,b,c,d,e){var f=a.b.length,g=zj(b),h=Dj(b),l=g,m=Aj(b),n=Bj(b),p=!1;do{var q=l.aa;var r=l.W;var u=m.W;if(!1===r.Fb){var x=e?bk(n.W,u,r,q,h.aa):bk(h.aa,q,r,u,n.W);!d&&Pj({aa:q,W:u},c).length||!x||Xj(q,r,u,c,!0).length||!d&&!1!==q.Fb&&!1!==u.Fb&&Sf([h.aa.x,h.aa.y,q.x,q.y,r.x,r.y,u.x,u.y,n.W.x,n.W.y],0,10,2)!==!e||(a.b[f++]=q.hb,a.b[f++]=r.hb,a.b[f++]=u.hb,Vj(l,m,b,c),m===g&&(g=n),p=!0)}h=Dj(b);l=Ej(b);m=Aj(b);n=Bj(b)}while(l!==g&&3<b.c);return p}
247
+function ak(a,b,c,d){var e=zj(b);Aj(b);var f=e,g=Aj(b),h=!1;do{var l=Wj(f.aa,f.W,g.aa,g.W,d);if(l){var h=a.b.length,m=a.a.length/2,n=Cj(b);yj(b);c.remove(n);var p=n===e;d?(l[0]===f.aa.x&&l[1]===f.aa.y?(Cj(b),l=f.aa,g.aa=l,c.remove(f),p=p||f===e):(l=g.W,f.W=l,c.remove(g),p=p||g===e),yj(b)):(l=Tj(a,l[0],l[1],m),f.W=l,g.aa=l,Hj(c,[Math.min(f.aa.x,f.W.x),Math.min(f.aa.y,f.W.y),Math.max(f.aa.x,f.W.x),Math.max(f.aa.y,f.W.y)],f),Hj(c,[Math.min(g.aa.x,g.W.x),Math.min(g.aa.y,g.W.y),Math.max(g.aa.x,g.W.x),
248
+Math.max(g.aa.y,g.W.y)],g));a.b[h++]=n.aa.hb;a.b[h++]=n.W.hb;a.b[h++]=l.hb;h=!0;if(p)break}f=Dj(b);g=Aj(b)}while(f!==e);return h}function Yj(a,b){var c=zj(a),d=c;do{if(Pj(d,b).length)return!1;d=Aj(a)}while(d!==c);return!0}function Tj(a,b,c,d){var e=a.a.length;a.a[e++]=b;a.a[e++]=c;return{x:b,y:c,hb:d,Fb:void 0}}
249
+function Uj(a,b,c,d){var e={aa:a,W:b},f={ub:void 0,next:void 0,data:e},g=c.b;if(g){var h=g.next;f.ub=g;f.next=h;g.next=f;h&&(h.ub=f);g===c.a&&(c.a=f)}else c.i=f,c.a=f,c.f&&(f.next=f,f.ub=f);c.b=f;c.c++;d&&d.Ca([Math.min(a.x,b.x),Math.min(a.y,b.y),Math.max(a.x,b.x),Math.max(a.y,b.y)],e);return e}function Vj(a,b,c,d){Ej(c)===b&&(yj(c),a.W=b.W,d.remove(b),Hj(d,[Math.min(a.aa.x,a.W.x),Math.min(a.aa.y,a.W.y),Math.max(a.aa.x,a.W.x),Math.max(a.aa.y,a.W.y)],a))}
250
+function Xj(a,b,c,d,e){var f,g,h=[],l=Jj(d,[Math.min(a.x,b.x,c.x),Math.min(a.y,b.y,c.y),Math.max(a.x,b.x,c.x),Math.max(a.y,b.y,c.y)]);d=0;for(f=l.length;d<f;++d)for(g in l[d]){var m=l[d][g];"object"!==typeof m||e&&!m.Fb||m.x===a.x&&m.y===a.y||m.x===b.x&&m.y===b.y||m.x===c.x&&m.y===c.y||-1!==h.indexOf(m)||!Mf([a.x,a.y,b.x,b.y,c.x,c.y],0,6,2,m.x,m.y)||h.push(m)}return h}
251
+function Pj(a,b,c){var d=a.aa,e=a.W;b=Jj(b,[Math.min(d.x,e.x),Math.min(d.y,e.y),Math.max(d.x,e.x),Math.max(d.y,e.y)]);var f=[],g;var h=0;for(g=b.length;h<g;++h){var l=b[h];a!==l&&(c||l.aa!==e||l.W!==d)&&Wj(d,e,l.aa,l.W,c)&&f.push(l)}return f}
252
+function Wj(a,b,c,d,e){var f=(d.y-c.y)*(b.x-a.x)-(d.x-c.x)*(b.y-a.y);if(f&&(d=((d.x-c.x)*(a.y-c.y)-(d.y-c.y)*(a.x-c.x))/f,c=((b.x-a.x)*(a.y-c.y)-(b.y-a.y)*(a.x-c.x))/f,!e&&d>Ci&&d<1-Ci&&c>Ci&&c<1-Ci||e&&0<=d&&1>=d&&0<=c&&1>=c))return[a.x+d*(b.x-a.x),a.y+d*(b.y-a.y)]}
253
+function bk(a,b,c,d,e){if(void 0===b.Fb||void 0===d.Fb)return!1;var f=(c.x-d.x)*(b.y-d.y)>(c.y-d.y)*(b.x-d.x);e=(e.x-d.x)*(b.y-d.y)<(e.y-d.y)*(b.x-d.x);a=(a.x-b.x)*(d.y-b.y)>(a.y-b.y)*(d.x-b.x);c=(c.x-b.x)*(d.y-b.y)<(c.y-b.y)*(d.x-b.x);b=b.Fb?c||a:c&&a;return(d.Fb?e||f:e&&f)&&b}k=Mj.prototype;
254
+k.pc=function(a,b){var c=a.c,d=a.qa(),e=this.b.length,f=this.g.b.length;a=a.ga();var g,h,l;var m=h=0;for(g=c.length;m<g;++m){var n=c[m];if(0<n.length){var p=qf(a,h,n[0],d,-this.origin[0],-this.origin[1]);if(p.length){var q=[];h=1;for(l=n.length;h<l;++h)if(n[h]!==n[h-1]){var r=qf(a,n[h-1],n[h],d,-this.origin[0],-this.origin[1]);q.push(r)}oj(this.g,p,q,d);Nj(this,p,q,d)}}h=n[n.length-1]}this.b.length>e&&(this.i.push(e),this.f.push(b),this.j.s&&(this.c.push(e),this.j.s=!1));this.g.b.length>f&&pj(this.g,
255
+b,f)};k.rc=function(a,b){var c=a.Bb(),d=a.qa();if(0<c.length){a=a.ga().map(Number);var e=qf(a,0,c[0],d,-this.origin[0],-this.origin[1]);if(e.length){var f=[],g;var h=1;for(g=c.length;h<g;++h)if(c[h]!==c[h-1]){var l=qf(a,c[h-1],c[h],d,-this.origin[0],-this.origin[1]);f.push(l)}this.i.push(this.b.length);this.f.push(b);this.j.s&&(this.c.push(this.b.length),this.j.s=!1);pj(this.g,b);oj(this.g,e,f,d);Nj(this,e,f,d)}}};
256
+k.Db=function(a){this.l=new Di(this.a);this.o=new Di(this.b);this.i.push(this.b.length);this.g.Db(a);!this.c.length&&0<this.u.length&&(this.u=[]);this.b=this.a=null};k.Eb=function(a){var b=this.l,c=this.o,d=this.g.Eb(a);return function(){Gi(a,b);Gi(a,c);d()}};k.rf=function(a,b){var c=Hi(b,sj,uj);if(this.v)var d=this.v;else this.v=d=new vj(a,c);b.Qc(c);a.enableVertexAttribArray(d.b);a.vertexAttribPointer(d.b,2,5126,!1,8,0);return d};k.sf=function(a,b){a.disableVertexAttribArray(b.b)};
257
+k.Od=function(a,b,c,d){var e=a.getParameter(a.DEPTH_FUNC),f=a.getParameter(a.DEPTH_WRITEMASK);d||(a.enable(a.DEPTH_TEST),a.depthMask(!0),a.depthFunc(a.NOTEQUAL));if(wb(c)){var g=this.i[this.i.length-1];for(c=this.c.length-1;0<=c;--c){var h=this.c[c];var l=this.u[c];a.uniform4fv(this.v.B,l);xi(a,b,h,g);g=h}}else{var m=this.i.length-2;l=g=this.i[m+1];for(h=this.c.length-1;0<=h;--h){var n=this.u[h];a.uniform4fv(this.v.B,n);for(n=this.c[h];0<=m&&this.i[m]>=n;){var p=this.i[m];var q=this.f[m];q=w(q).toString();
258
+c[q]&&(g!==l&&(xi(a,b,g,l),a.clear(a.DEPTH_BUFFER_BIT)),l=p);m--;g=p}g!==l&&(xi(a,b,g,l),a.clear(a.DEPTH_BUFFER_BIT));g=l=n}}d||(a.disable(a.DEPTH_TEST),a.clear(a.DEPTH_BUFFER_BIT),a.depthMask(f),a.depthFunc(e))};
259
+k.ve=function(a,b,c,d,e){var f,g;var h=this.i.length-2;var l=this.i[h+1];for(f=this.c.length-1;0<=f;--f){var m=this.u[f];a.uniform4fv(this.v.B,m);for(g=this.c[f];0<=h&&this.i[h]>=g;){m=this.i[h];var n=this.f[h];var p=w(n).toString();if(void 0===c[p]&&n.V()&&(void 0===e||qb(e,n.V().G()))&&(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),xi(a,b,m,l),l=d(n)))return l;h--;l=m}}};
260
+k.Ma=function(a,b){a=a?a.b:[0,0,0,0];a instanceof CanvasGradient||a instanceof CanvasPattern?a=yi:a=ed(a).map(function(a,b){return 3!=b?a/255:a})||yi;this.j.fillColor&&pa(a,this.j.fillColor)||(this.j.fillColor=a,this.j.s=!0,this.u.push(a));b?this.g.Ma(null,b):this.g.Ma(null,new wj({color:[0,0,0,0],lineWidth:0}))};function ck(){}ck.prototype.La=function(){};function dk(a,b,c){this.f=b;this.g=a;this.c=c;this.a={}}v(dk,ki);function ek(a,b){var c=[],d;for(d in a.a){var e=a.a[d],f;for(f in e)c.push(e[f].Eb(b))}return function(){for(var a=c.length,b,d=0;d<a;d++)b=c[d].apply(this,arguments);return b}}function fk(a,b){for(var c in a.a){var d=a.a[c],e;for(e in d)d[e].Db(b)}}dk.prototype.b=function(a,b){var c=void 0!==a?a.toString():"0";a=this.a[c];void 0===a&&(a={},this.a[c]=a);c=a[b];void 0===c&&(c=new gk[b](this.g,this.f),a[b]=c);return c};
261
+dk.prototype.i=function(){return wb(this.a)};dk.prototype.La=function(a,b,c,d,e,f,g,h){var l=Object.keys(this.a).map(Number);l.sort(ia);var m,n;var p=0;for(m=l.length;p<m;++p){var q=this.a[l[p].toString()];var r=0;for(n=ji.length;r<n;++r){var u=q[ji[r]];void 0!==u&&u.La(a,b,c,d,e,f,g,h,void 0,!1)}}};
262
+function hk(a,b,c,d,e,f,g,h,l,m,n){var p=ik,q=Object.keys(a.a).map(Number);q.sort(function(a,b){return b-a});var r,u;var x=0;for(r=q.length;x<r;++x){var B=a.a[q[x].toString()];for(u=ji.length-1;0<=u;--u){var E=B[ji[u]];if(void 0!==E&&(E=E.La(b,c,d,e,p,f,g,h,l,m,n)))return E}}}
263
+dk.prototype.Ea=function(a,b,c,d,e,f,g,h,l,m){var n=b.b;n.bindFramebuffer(n.FRAMEBUFFER,Pi(b));var p;void 0!==this.c&&(p=Qa(Za(a),d*this.c));return hk(this,b,a,d,e,g,h,l,function(a){var b=new Uint8Array(4);n.readPixels(0,0,1,1,n.RGBA,n.UNSIGNED_BYTE,b);if(0<b[3]&&(a=m(a)))return a},!0,p)};
264
+function jk(a,b,c,d,e,f,g,h){var l=c.b;l.bindFramebuffer(l.FRAMEBUFFER,Pi(c));return void 0!==hk(a,c,b,d,e,f,g,h,function(){var a=new Uint8Array(4);l.readPixels(0,0,1,1,l.RGBA,l.UNSIGNED_BYTE,a);return 0<a[3]},!1)}var ik=[1,1],gk={Circle:Fi,Image:Ui,LineString:cj,Polygon:Mj,Text:ck};function kk(a,b,c,d,e,f,g){this.b=a;this.i=b;this.a=f;this.c=g;this.j=e;this.g=d;this.f=c;this.o=this.l=this.v=null}v(kk,Wh);k=kk.prototype;k.rd=function(a){this.Ma(a.Fa(),a.Ga());this.Ub(a.Y())};
265
+k.zb=function(a){switch(a.U()){case "Point":this.qc(a,null);break;case "LineString":this.mc(a,null);break;case "Polygon":this.rc(a,null);break;case "MultiPoint":this.oc(a,null);break;case "MultiLineString":this.nc(a,null);break;case "MultiPolygon":this.pc(a,null);break;case "GeometryCollection":this.ue(a,null);break;case "Circle":this.Zb(a,null)}};k.te=function(a,b){(a=(0,b.Za)(a))&&qb(this.a,a.G())&&(this.rd(b),this.zb(a))};k.ue=function(a){a=a.a;var b;var c=0;for(b=a.length;c<b;++c)this.zb(a[c])};
266
+k.qc=function(a,b){var c=this.b,d=(new dk(1,this.a)).b(0,"Image");d.Ub(this.v);d.qc(a,b);d.Db(c);d.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1);d.Eb(c)()};k.oc=function(a,b){var c=this.b,d=(new dk(1,this.a)).b(0,"Image");d.Ub(this.v);d.oc(a,b);d.Db(c);d.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1);d.Eb(c)()};
267
+k.mc=function(a,b){var c=this.b,d=(new dk(1,this.a)).b(0,"LineString");d.Ma(null,this.o);d.mc(a,b);d.Db(c);d.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1);d.Eb(c)()};k.nc=function(a,b){var c=this.b,d=(new dk(1,this.a)).b(0,"LineString");d.Ma(null,this.o);d.nc(a,b);d.Db(c);d.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1);d.Eb(c)()};
268
+k.rc=function(a,b){var c=this.b,d=(new dk(1,this.a)).b(0,"Polygon");d.Ma(this.l,this.o);d.rc(a,b);d.Db(c);d.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1);d.Eb(c)()};k.pc=function(a,b){var c=this.b,d=(new dk(1,this.a)).b(0,"Polygon");d.Ma(this.l,this.o);d.pc(a,b);d.Db(c);d.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1);d.Eb(c)()};
269
+k.Zb=function(a,b){var c=this.b,d=(new dk(1,this.a)).b(0,"Circle");d.Ma(this.l,this.o);d.Zb(a,b);d.Db(c);d.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1);d.Eb(c)()};k.Ub=function(a){this.v=a};k.Ma=function(a,b){this.l=a;this.o=b};function lk(){this.c=0;this.b={};this.i=this.a=null}k=lk.prototype;k.clear=function(){this.c=0;this.b={};this.i=this.a=null};k.forEach=function(a,b){for(var c=this.a;c;)a.call(b,c.Yc,c.uc,this),c=c.Nb};k.get=function(a){a=this.b[a];xa(!!a,15);if(a===this.i)return a.Yc;a===this.a?(this.a=this.a.Nb,this.a.vd=null):(a.Nb.vd=a.vd,a.vd.Nb=a.Nb);a.Nb=null;a.vd=this.i;this.i=this.i.Nb=a;return a.Yc};
270
+k.pop=function(){var a=this.a;delete this.b[a.uc];a.Nb&&(a.Nb.vd=null);this.a=a.Nb;this.a||(this.i=null);--this.c;return a.Yc};k.replace=function(a,b){this.get(a);this.b[a].Yc=b};k.set=function(a,b){xa(!(a in this.b),16);b={uc:a,Nb:null,vd:this.i,Yc:b};this.i?this.i.Nb=b:this.a=b;this.i=b;this.b[a]=b;++this.c};function mk(a,b){Mh.call(this,0,b);this.b=document.createElement("CANVAS");this.b.style.width="100%";this.b.style.height="100%";this.b.style.display="block";this.b.className="ol-unselectable";a.insertBefore(this.b,a.childNodes[0]||null);this.S=this.D=0;this.C=jd();this.l=!0;this.i=Ld(this.b,{antialias:!0,depth:!0,failIfMajorPerformanceCaveat:!0,preserveDrawingBuffer:!1,stencil:!0});this.f=new Oi(this.b,this.i);y(this.b,"webglcontextlost",this.Yn,this);y(this.b,"webglcontextrestored",this.Zn,this);
271
+this.a=new lk;this.u=null;this.j=new Ke(function(a){var b=a[1];a=a[2];var c=b[0]-this.u[0],b=b[1]-this.u[1];return 65536*Math.log(a)+Math.sqrt(c*c+b*b)/a}.bind(this),function(a){return a[0].bb()});this.B=function(){if(this.j.b.length){Oe(this.j);var a=Le(this.j);nk(this,a[0],a[3],a[4])}return!1}.bind(this);this.g=0;ok(this)}v(mk,Mh);
272
+function nk(a,b,c,d){var e=a.i,f=b.bb();if(a.a.b.hasOwnProperty(f))a=a.a.get(f),e.bindTexture(3553,a.Ib),9729!=a.Ph&&(e.texParameteri(3553,10240,9729),a.Ph=9729),9729!=a.Rh&&(e.texParameteri(3553,10241,9729),a.Rh=9729);else{var g=e.createTexture();e.bindTexture(3553,g);if(0<d){var h=a.C.canvas,l=a.C;a.D!==c[0]||a.S!==c[1]?(h.width=c[0],h.height=c[1],a.D=c[0],a.S=c[1]):l.clearRect(0,0,c[0],c[1]);l.drawImage(b.Y(),d,d,c[0],c[1],0,0,c[0],c[1]);e.texImage2D(3553,0,6408,6408,5121,h)}else e.texImage2D(3553,
273
+0,6408,6408,5121,b.Y());e.texParameteri(3553,10240,9729);e.texParameteri(3553,10241,9729);e.texParameteri(3553,10242,33071);e.texParameteri(3553,10243,33071);a.a.set(f,{Ib:g,Ph:9729,Rh:9729})}}function pk(a,b,c){var d=a.o;if(Rc(d,b)){a=a.f;var e=c.viewState;d.b(new Rh(b,new kk(a,e.center,e.resolution,e.rotation,c.size,c.extent,c.pixelRatio),c,null,a))}}k=mk.prototype;k.ka=function(){var a=this.i;a.isContextLost()||this.a.forEach(function(b){b&&a.deleteTexture(b.Ib)});Nc(this.f);Mh.prototype.ka.call(this)};
274
+k.xk=function(a,b){a=this.i;for(var c;1024<this.a.c-this.g;){if(c=this.a.a.Yc)a.deleteTexture(c.Ib);else if(+this.a.a.uc==b.index)break;else--this.g;this.a.pop()}};k.U=function(){return"webgl"};k.Yn=function(a){a.preventDefault();this.a.clear();this.g=0;a=this.c;for(var b in a)a[b].mg()};k.Zn=function(){ok(this);this.o.render()};function ok(a){a=a.i;a.activeTexture(33984);a.blendFuncSeparate(770,771,1,771);a.disable(2884);a.disable(2929);a.disable(3089);a.disable(2960)}
275
+k.Jg=function(a){var b=this.f,c=this.i;if(c.isContextLost())return!1;if(!a)return this.l&&(this.b.style.display="none",this.l=!1),!1;this.u=a.focus;this.a.set((-a.index).toString(),null);++this.g;pk(this,"precompose",a);var d=[],e=a.layerStatesArray;qa(e);var f=a.viewState.resolution,g;var h=0;for(g=e.length;h<g;++h){var l=e[h];if(xh(l,f)&&"ready"==l.yj){var m=Ph(this,l.layer);m.ng(a,l,b)&&d.push(l)}}e=a.size[0]*a.pixelRatio;f=a.size[1]*a.pixelRatio;if(this.b.width!=e||this.b.height!=f)this.b.width=
276
+e,this.b.height=f;c.bindFramebuffer(36160,null);c.clearColor(0,0,0,0);c.clear(16384);c.enable(3042);c.viewport(0,0,this.b.width,this.b.height);h=0;for(g=d.length;h<g;++h)l=d[h],m=Ph(this,l.layer),m.Gi(a,l,b);this.l||(this.b.style.display="",this.l=!0);Nh(a);1024<this.a.c-this.g&&a.postRenderFunctions.push(this.xk.bind(this));this.j.b.length&&(a.postRenderFunctions.push(this.B),a.animate=!0);pk(this,"postcompose",a);Qh(this,a);a.postRenderFunctions.push(Oh)};
277
+k.Ea=function(a,b,c,d,e,f,g){if(this.i.isContextLost())return!1;var h=b.viewState,l=b.layerStatesArray,m;for(m=l.length-1;0<=m;--m){var n=l[m];var p=n.layer;if(xh(n,h.resolution)&&f.call(g,p)&&(n=Ph(this,p).Ea(a,b,c,d,e)))return n}};k.Ei=function(a,b,c,d,e){c=!1;if(this.i.isContextLost())return!1;var f=b.viewState,g=b.layerStatesArray,h;for(h=g.length-1;0<=h;--h){var l=g[h],m=l.layer;if(xh(l,f.resolution)&&d.call(e,m)&&(c=Ph(this,m).Ue(a,b)))return!0}return c};
278
+k.Di=function(a,b,c,d,e){if(this.i.isContextLost())return!1;var f=b.viewState,g=b.layerStatesArray,h;for(h=g.length-1;0<=h;--h){var l=g[h];var m=l.layer;if(xh(l,f.resolution)&&e.call(d,m)&&(l=Ph(this,m).lg(a,b,c,d)))return l}};var qk=["canvas","webgl"];
279
+function G(a){Tc.call(this);var b=rk(a);this.Cf=void 0!==a.loadTilesWhileAnimating?a.loadTilesWhileAnimating:!1;this.Df=void 0!==a.loadTilesWhileInteracting?a.loadTilesWhileInteracting:!1;this.If=void 0!==a.pixelRatio?a.pixelRatio:Sd;this.yf=b.logos;this.pa=function(){this.j=void 0;this.Sp.call(this,Date.now())}.bind(this);this.Yb=Bh();this.Jf=Bh();this.ad=0;this.I=this.R=this.T=this.g=this.c=null;this.a=document.createElement("DIV");this.a.className="ol-viewport"+(Xd?" ol-touch":"");this.a.style.position=
280
+"relative";this.a.style.overflow="hidden";this.a.style.width="100%";this.a.style.height="100%";this.a.style.msTouchAction="none";this.a.style.touchAction="none";this.C=document.createElement("DIV");this.C.className="ol-overlaycontainer";this.a.appendChild(this.C);this.D=document.createElement("DIV");this.D.className="ol-overlaycontainer-stopevent";for(var c="click dblclick mousedown touchstart MSPointerDown pointerdown mousewheel wheel".split(" "),d=0,e=c.length;d<e;++d)y(this.D,c[d],Pc);this.a.appendChild(this.D);
281
+this.Sa=new Fe(this,a.moveTolerance);for(var f in de)y(this.Sa,de[f],this.Ih,this);this.va=b.keyboardEventTarget;this.u=null;y(this.a,"wheel",this.ld,this);y(this.a,"mousewheel",this.ld,this);this.l=b.controls;this.o=b.interactions;this.v=b.overlays;this.rg={};this.B=new b.Up(this.a,this);this.na=null;this.xb=[];this.$a=new Pe(this.ql.bind(this),this.Wl.bind(this));this.fa={};y(this,Vc("layergroup"),this.El,this);y(this,Vc("view"),this.Xl,this);y(this,Vc("size"),this.Tl,this);y(this,Vc("target"),
282
+this.Vl,this);this.H(b.values);this.l.forEach(function(a){a.setMap(this)},this);y(this.l,"add",function(a){a.element.setMap(this)},this);y(this.l,"remove",function(a){a.element.setMap(null)},this);this.o.forEach(function(a){a.setMap(this)},this);y(this.o,"add",function(a){a.element.setMap(this)},this);y(this.o,"remove",function(a){a.element.setMap(null)},this);this.v.forEach(this.kh,this);y(this.v,"add",function(a){this.kh(a.element)},this);y(this.v,"remove",function(a){var b=a.element.g;void 0!==
283
+b&&delete this.rg[b.toString()];a.element.setMap(null)},this)}v(G,Tc);k=G.prototype;k.kk=function(a){this.l.push(a)};k.lk=function(a){this.o.push(a)};k.ih=function(a){this.Kc().qd().push(a)};k.jh=function(a){this.v.push(a)};k.kh=function(a){var b=a.g;void 0!==b&&(this.rg[b.toString()]=a);a.setMap(this)};
284
+k.ka=function(){Nc(this.Sa);Nc(this.B);Kc(this.a,"wheel",this.ld,this);Kc(this.a,"mousewheel",this.ld,this);this.f&&(window.removeEventListener("resize",this.f,!1),this.f=void 0);this.j&&(cancelAnimationFrame(this.j),this.j=void 0);this.Le(null);Tc.prototype.ka.call(this)};k.we=function(a,b,c){if(this.c)return a=this.Wa(a),c=c?c:{},this.B.Ea(a,this.c,void 0!==c.hitTolerance?c.hitTolerance*this.c.pixelRatio:0,b,null,c.layerFilter?c.layerFilter:mf,null)};
285
+k.Im=function(a,b,c,d,e){if(this.c)return this.B.Di(a,this.c,b,void 0!==c?c:null,d?d:mf,void 0!==e?e:null)};k.Yl=function(a,b){if(!this.c)return!1;a=this.Wa(a);b=b?b:{};return this.B.Ei(a,this.c,void 0!==b.hitTolerance?b.hitTolerance*this.c.pixelRatio:0,b.layerFilter?b.layerFilter:mf,null)};k.Tf=function(a){return this.Wa(this.xe(a))};k.xe=function(a){var b=this.a.getBoundingClientRect();a=a.changedTouches?a.changedTouches[0]:a;return[a.clientX-b.left,a.clientY-b.top]};k.ag=function(){return this.get("target")};
286
+k.jd=function(){var a=this.ag();return void 0!==a?"string"===typeof a?document.getElementById(a):a:null};k.Wa=function(a){var b=this.c;return b?Gh(b.pixelToCoordinateTransform,a.slice()):null};k.Lk=function(){return this.l};k.fl=function(){return this.v};k.el=function(a){a=this.rg[a.toString()];return void 0!==a?a:null};k.Sk=function(){return this.o};k.Kc=function(){return this.get("layergroup")};k.Xh=function(){return this.Kc().qd()};
287
+k.Ja=function(a){var b=this.c;return b?Gh(b.coordinateToPixelTransform,a.slice(0,2)):null};k.Ob=function(){return this.get("size")};k.Z=function(){return this.get("view")};k.sl=function(){return this.a};k.ql=function(a,b,c,d){var e=this.c;if(!(e&&b in e.wantedTiles&&e.wantedTiles[b][a.bb()]))return Infinity;a=c[0]-e.focus[0];c=c[1]-e.focus[1];return 65536*Math.log(d)+Math.sqrt(a*a+c*c)/d};k.ld=function(a,b){a=new Jd(b||a.type,this,a);this.Ih(a)};
288
+k.Ih=function(a){if(this.c){this.na=a.coordinate;a.frameState=this.c;var b=this.o.a,c;if(!1!==this.b(a))for(c=b.length-1;0<=c;c--){var d=b[c];if(d.c()&&!d.handleEvent(a))break}}};k.Rl=function(){var a=this.c,b=this.$a;if(b.b.length){var c=16,d=c;if(a){var e=a.viewHints;e[0]&&(c=this.Cf?8:0,d=2);e[1]&&(c=this.Df?8:0,d=2)}b.j<c&&(Oe(b),Qe(b,c,d))}b=this.xb;c=0;for(d=b.length;c<d;++c)b[c](this,a);b.length=0};k.Tl=function(){this.render()};
289
+k.Vl=function(){var a;this.ag()&&(a=this.jd());if(this.u){for(var b=0,c=this.u.length;b<c;++b)Ec(this.u[b]);this.u=null}a?(a.appendChild(this.a),a=this.va?this.va:a,this.u=[y(a,"keydown",this.ld,this),y(a,"keypress",this.ld,this)],this.f||(this.f=this.Ad.bind(this),window.addEventListener("resize",this.f,!1))):(ld(this.a),this.f&&(window.removeEventListener("resize",this.f,!1),this.f=void 0));this.Ad()};k.Wl=function(){this.render()};k.Lh=function(){this.render()};
290
+k.Xl=function(){this.T&&(Ec(this.T),this.T=null);this.R&&(Ec(this.R),this.R=null);var a=this.Z();a&&(this.a.setAttribute("data-view",w(a)),this.T=y(a,"propertychange",this.Lh,this),this.R=y(a,"change",this.Lh,this));this.render()};k.El=function(){this.I&&(this.I.forEach(Ec),this.I=null);var a=this.Kc();a&&(this.I=[y(a,"propertychange",this.render,this),y(a,"change",this.render,this)]);this.render()};k.Tp=function(){this.j&&cancelAnimationFrame(this.j);this.pa()};
291
+k.render=function(){void 0===this.j&&(this.j=requestAnimationFrame(this.pa))};k.Mp=function(a){return this.l.remove(a)};k.Np=function(a){return this.o.remove(a)};k.Pp=function(a){return this.Kc().qd().remove(a)};k.Qp=function(a){return this.v.remove(a)};
292
+k.Sp=function(a){var b,c=this.Ob(),d=this.Z(),e=Oa(),f=this.c,g=null;if(void 0!==c&&0<c[0]&&0<c[1]&&d&&jg(d)){var g=dg(d,this.c?this.c.viewHints:void 0),h=this.Kc().Yf(),l={};var m=0;for(b=h.length;m<b;++m)l[w(h[m].layer)]=h[m];m=d.getState();g={animate:!1,attributions:{},coordinateToPixelTransform:this.Yb,extent:e,focus:this.na?this.na:m.center,index:this.ad++,layerStates:l,layerStatesArray:h,logos:tb({},this.yf),pixelRatio:this.If,pixelToCoordinateTransform:this.Jf,postRenderFunctions:[],size:c,
293
+skippedFeatureUids:this.fa,tileQueue:this.$a,time:a,usedTiles:{},viewState:m,viewHints:g,wantedTiles:{}}}g&&(g.extent=ob(m.center,m.resolution,m.rotation,g.size,e));this.c=g;this.B.Jg(g);g&&(g.animate&&this.render(),Array.prototype.push.apply(this.xb,g.postRenderFunctions),!f||this.g&&(kb(this.g)||bb(g.extent,this.g))||(this.b(new Id("movestart",this,f)),this.g=Ya(this.g)),!this.g||g.viewHints[0]||g.viewHints[1]||bb(g.extent,this.g)||(this.b(new Id("moveend",this,g)),Ra(g.extent,this.g)));this.b(new Id("postrender",
294
+this,g));setTimeout(this.Rl.bind(this),0)};k.qj=function(a){this.set("layergroup",a)};k.Qg=function(a){this.set("size",a)};k.Le=function(a){this.set("target",a)};k.iq=function(a){this.set("view",a)};k.xj=function(a){a=w(a).toString();this.fa[a]=!0;this.render()};
295
+k.Ad=function(){var a=this.jd();if(a){var b=getComputedStyle(a);this.Qg([a.offsetWidth-parseFloat(b.borderLeftWidth)-parseFloat(b.paddingLeft)-parseFloat(b.paddingRight)-parseFloat(b.borderRightWidth),a.offsetHeight-parseFloat(b.borderTopWidth)-parseFloat(b.paddingTop)-parseFloat(b.paddingBottom)-parseFloat(b.borderBottomWidth)])}else this.Qg(void 0)};k.Cj=function(a){a=w(a).toString();delete this.fa[a];this.render()};
296
+function rk(a){var b=null;void 0!==a.keyboardEventTarget&&(b="string"===typeof a.keyboardEventTarget?document.getElementById(a.keyboardEventTarget):a.keyboardEventTarget);var c={},d={};if(void 0===a.logo||"boolean"===typeof a.logo&&a.logo)d["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAHGAAABxgEXwfpGAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAhNQTFRF////AP//AICAgP//AFVVQECA////K1VVSbbbYL/fJ05idsTYJFtbbcjbJllmZszWWMTOIFhoHlNiZszTa9DdUcHNHlNlV8XRIVdiasrUHlZjIVZjaMnVH1RlIFRkH1RkH1ZlasvYasvXVsPQH1VkacnVa8vWIVZjIFRjVMPQa8rXIVVkXsXRsNveIFVkIFZlIVVj3eDeh6GmbMvXH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0dZ8uBI1hJ2UUDgq82CM2MwKeibqAvSO7MCABq0wXEPiqWEAAAAAElFTkSuQmCC"]=
297
+"https://openlayers.org/";else{var e=a.logo;"string"===typeof e?d[e]="":e instanceof HTMLElement?d[w(e).toString()]=e:e&&(xa("string"==typeof e.href,44),xa("string"==typeof e.src,45),d[e.src]=e.href)}e=a.layers instanceof uh?a.layers:new uh({layers:a.layers});c.layergroup=e;c.target=a.target;c.view=void 0!==a.view?a.view:new F;var e=Mh,f;void 0!==a.renderer?(Array.isArray(a.renderer)?f=a.renderer:"string"===typeof a.renderer?f=[a.renderer]:xa(!1,46),0<=f.indexOf("dom")&&(f=f.concat(qk))):f=qk;var g;
298
+var h=0;for(g=f.length;h<g;++h){var l=f[h];if("canvas"==l){if(Ud){e=hi;break}}else if("webgl"==l&&Md){e=mk;break}}void 0!==a.controls?Array.isArray(a.controls)?f=new Yc(a.controls.slice()):(xa(a.controls instanceof Yc,47),f=a.controls):f=xd();void 0!==a.interactions?Array.isArray(a.interactions)?h=new Yc(a.interactions.slice()):(xa(a.interactions instanceof Yc,48),h=a.interactions):h=qh();void 0!==a.overlays?Array.isArray(a.overlays)?a=new Yc(a.overlays.slice()):(xa(a.overlays instanceof Yc,49),a=
299
+a.overlays):a=new Yc;return{controls:f,interactions:h,keyboardEventTarget:b,logos:d,overlays:a,Up:e,values:c}};function sk(a){Tc.call(this);this.g=a.id;this.l=void 0!==a.insertFirst?a.insertFirst:!0;this.v=void 0!==a.stopEvent?a.stopEvent:!0;this.c=document.createElement("DIV");this.c.className="ol-overlay-container ol-selectable";this.c.style.position="absolute";this.autoPan=void 0!==a.autoPan?a.autoPan:!1;this.j=a.autoPanAnimation||{};this.o=void 0!==a.autoPanMargin?a.autoPanMargin:20;this.a={re:"",Ie:"",nf:"",vf:"",visible:!0};this.f=null;y(this,Vc(tk),this.zl,this);y(this,Vc(uk),this.Jl,this);y(this,Vc(vk),
300
+this.Nl,this);y(this,Vc(wk),this.Pl,this);y(this,Vc(xk),this.Ql,this);void 0!==a.element&&this.lj(a.element);this.rj(void 0!==a.offset?a.offset:[0,0]);this.uj(void 0!==a.positioning?a.positioning:"top-left");void 0!==a.position&&this.Ne(a.position)}v(sk,Tc);k=sk.prototype;k.Rd=function(){return this.get(tk)};k.Jm=function(){return this.g};k.Me=function(){return this.get(uk)};k.Dh=function(){return this.get(vk)};k.Yh=function(){return this.get(wk)};k.Eh=function(){return this.get(xk)};
301
+k.zl=function(){for(var a=this.c;a.lastChild;)a.removeChild(a.lastChild);(a=this.Rd())&&this.c.appendChild(a)};k.Jl=function(){this.f&&(ld(this.c),Ec(this.f),this.f=null);var a=this.Me();a&&(this.f=y(a,"postrender",this.render,this),yk(this),a=this.v?a.D:a.C,this.l?a.insertBefore(this.c,a.childNodes[0]||null):a.appendChild(this.c))};k.render=function(){yk(this)};k.Nl=function(){yk(this)};
302
+k.Pl=function(){yk(this);if(this.get(wk)&&this.autoPan){var a=this.Me();if(a&&a.jd()){var b=zk(a.jd(),a.Ob()),c=this.Rd(),d=c.offsetWidth,e=getComputedStyle(c),d=d+(parseInt(e.marginLeft,10)+parseInt(e.marginRight,10)),e=c.offsetHeight,f=getComputedStyle(c),e=e+(parseInt(f.marginTop,10)+parseInt(f.marginBottom,10)),g=zk(c,[d,e]),c=this.o;Va(b,g)||(d=g[0]-b[0],e=b[2]-g[2],f=g[1]-b[1],g=b[3]-g[3],b=[0,0],0>d?b[0]=d-c:0>e&&(b[0]=Math.abs(e)+c),0>f?b[1]=f-c:0>g&&(b[1]=Math.abs(g)+c),0===b[0]&&0===b[1])||
303
+(c=a.Z().wa(),c=a.Ja(c),b=[c[0]+b[0],c[1]+b[1]],a.Z().animate({center:a.Wa(b),duration:this.j.duration,easing:this.j.easing}))}}};k.Ql=function(){yk(this)};k.lj=function(a){this.set(tk,a)};k.setMap=function(a){this.set(uk,a)};k.rj=function(a){this.set(vk,a)};k.Ne=function(a){this.set(wk,a)};function zk(a,b){var c=a.getBoundingClientRect();a=c.left+window.pageXOffset;c=c.top+window.pageYOffset;return[a,c,a+b[0],c+b[1]]}k.uj=function(a){this.set(xk,a)};
304
+function Ak(a,b){a.a.visible!==b&&(a.c.style.display=b?"":"none",a.a.visible=b)}
305
+function yk(a){var b=a.Me(),c=a.Yh();if(b&&b.c&&c){var c=b.Ja(c),d=b.Ob(),b=a.c.style,e=a.Dh(),f=a.Eh();Ak(a,!0);var g=e[0],e=e[1];if("bottom-right"==f||"center-right"==f||"top-right"==f)""!==a.a.Ie&&(a.a.Ie=b.left=""),g=Math.round(d[0]-c[0]-g)+"px",a.a.nf!=g&&(a.a.nf=b.right=g);else{""!==a.a.nf&&(a.a.nf=b.right="");if("bottom-center"==f||"center-center"==f||"top-center"==f)g-=a.c.offsetWidth/2;g=Math.round(c[0]+g)+"px";a.a.Ie!=g&&(a.a.Ie=b.left=g)}if("bottom-left"==f||"bottom-center"==f||"bottom-right"==
306
+f)""!==a.a.vf&&(a.a.vf=b.top=""),c=Math.round(d[1]-c[1]-e)+"px",a.a.re!=c&&(a.a.re=b.bottom=c);else{""!==a.a.re&&(a.a.re=b.bottom="");if("center-left"==f||"center-center"==f||"center-right"==f)e-=a.c.offsetHeight/2;c=Math.round(c[1]+e)+"px";a.a.vf!=c&&(a.a.vf=b.top=c)}}else Ak(a,!1)}var tk="element",uk="map",vk="offset",wk="position",xk="positioning";function Bk(a){function b(a){a=h.Tf(a);l.a.Z().ob(a);window.removeEventListener("mousemove",c);window.removeEventListener("mouseup",b)}function c(a){a=h.Tf({clientX:a.clientX-n.offsetWidth/2,clientY:a.clientY+n.offsetHeight/2});m.Ne(a)}a=a?a:{};this.j=void 0!==a.collapsed?a.collapsed:!0;this.o=void 0!==a.collapsible?a.collapsible:!0;this.o||(this.j=!1);var d=void 0!==a.className?a.className:"ol-overviewmap",e=void 0!==a.tipLabel?a.tipLabel:"Overview map",f=void 0!==a.collapseLabel?a.collapseLabel:
307
+"\u00ab";"string"===typeof f?(this.u=document.createElement("span"),this.u.textContent=f):this.u=f;f=void 0!==a.label?a.label:"\u00bb";"string"===typeof f?(this.D=document.createElement("span"),this.D.textContent=f):this.D=f;var g=this.o&&!this.j?this.u:this.D,f=document.createElement("button");f.setAttribute("type","button");f.title=e;f.appendChild(g);y(f,"click",this.an,this);this.C=document.createElement("DIV");this.C.className="ol-overviewmap-map";var h=this.c=new G({controls:new Yc,interactions:new Yc,
308
+view:a.view});a.layers&&a.layers.forEach(function(a){h.ih(a)},this);e=document.createElement("DIV");e.className="ol-overviewmap-box";e.style.boxSizing="border-box";this.l=new sk({position:[0,0],positioning:"bottom-left",element:e});this.c.jh(this.l);e=document.createElement("div");e.className=d+" ol-unselectable ol-control"+(this.j&&this.o?" ol-collapsed":"")+(this.o?"":" ol-uncollapsible");e.appendChild(this.C);e.appendChild(f);md.call(this,{element:e,render:a.render?a.render:Ck,target:a.target});
309
+var l=this,m=this.l,n=this.l.Rd();n.addEventListener("mousedown",function(){window.addEventListener("mousemove",c);window.addEventListener("mouseup",b)})}v(Bk,md);k=Bk.prototype;k.setMap=function(a){var b=this.a;a!==b&&(b&&((b=b.Z())&&Kc(b,Vc("rotation"),this.Ge,this),this.c.Le(null)),md.prototype.setMap.call(this,a),a&&(this.c.Le(this.C),this.v.push(y(a,"propertychange",this.Kl,this)),this.c.Xh().dc()||this.c.qj(a.Kc()),a=a.Z()))&&(y(a,Vc("rotation"),this.Ge,this),jg(a)&&(this.c.Ad(),Dk(this)))};
310
+k.Kl=function(a){"view"===a.key&&((a=a.oldValue)&&Kc(a,Vc("rotation"),this.Ge,this),a=this.a.Z(),y(a,Vc("rotation"),this.Ge,this))};k.Ge=function(){this.c.Z().Oe(this.a.Z().Qa())};function Ck(){var a=this.a,b=this.c;if(a.c&&b.c){var c=a.Ob(),a=a.Z().dd(c),d=b.Ob(),c=b.Z().dd(d),e=b.Ja(ib(a)),f=b.Ja(gb(a)),b=Math.abs(e[0]-f[0]),e=Math.abs(e[1]-f[1]),f=d[0],d=d[1];b<.1*f||e<.1*d||b>.75*f||e>.75*d?Dk(this):Va(c,a)||(a=this.c,c=this.a.Z(),a.Z().ob(c.wa()))}Ek(this)}
311
+function Dk(a){var b=a.a;a=a.c;var c=b.Ob(),b=b.Z().dd(c);a=a.Z();rb(b,1/(.1*Math.pow(2,Math.log(7.5)/Math.LN2/2)));a.Qf(b)}function Ek(a){var b=a.a,c=a.c;if(b.c&&c.c){var d=b.Ob(),e=b.Z(),f=c.Z(),c=e.Qa(),b=a.l,g=a.l.Rd(),h=e.dd(d),d=f.Pa(),e=eb(h),f=hb(h);if(a=a.a.Z().wa()){var l=[e[0]-a[0],e[1]-a[1]];ef(l,c);Ze(l,a)}b.Ne(l);g&&(g.style.width=Math.abs((e[0]-f[0])/d)+"px",g.style.height=Math.abs((f[1]-e[1])/d)+"px")}}k.an=function(a){a.preventDefault();Fk(this)};
312
+function Fk(a){a.element.classList.toggle("ol-collapsed");a.j?kd(a.u,a.D):kd(a.D,a.u);a.j=!a.j;var b=a.c;a.j||b.c||(b.Ad(),Dk(a),Jc(b,"postrender",function(){Ek(this)},a))}k.$m=function(){return this.o};k.cn=function(a){this.o!==a&&(this.o=a,this.element.classList.toggle("ol-uncollapsible"),!a&&this.j&&Fk(this))};k.bn=function(a){this.o&&this.j!==a&&Fk(this)};k.Zm=function(){return this.j};k.gl=function(){return this.c};function Gk(a){a=a?a:{};var b=void 0!==a.className?a.className:"ol-scale-line";this.o=document.createElement("DIV");this.o.className=b+"-inner";this.c=document.createElement("DIV");this.c.className=b+" ol-unselectable";this.c.appendChild(this.o);this.u=null;this.l=void 0!==a.minWidth?a.minWidth:64;this.j=!1;this.B=void 0;this.D="";md.call(this,{element:this.c,render:a.render?a.render:Hk,target:a.target});y(this,Vc(Ik),this.T,this);this.I(a.units||"metric")}v(Gk,md);var Jk=[1,2,5];Gk.prototype.C=function(){return this.get(Ik)};
313
+function Hk(a){(a=a.frameState)?this.u=a.viewState:this.u=null;Kk(this)}Gk.prototype.T=function(){Kk(this)};Gk.prototype.I=function(a){this.set(Ik,a)};
314
+function Kk(a){var b=a.u;if(b){var c=b.projection,d=c.sc(),b=Sb(c,b.resolution,b.center)*d,d=a.l*b,c="",e=a.C();"degrees"==e?(c=zb.degrees,b/=c,d<c/60?(c="\u2033",b*=3600):d<c?(c="\u2032",b*=60):c="\u00b0"):"imperial"==e?.9144>d?(c="in",b/=.0254):1609.344>d?(c="ft",b/=.3048):(c="mi",b/=1609.344):"nautical"==e?(b/=1852,c="nm"):"metric"==e?.001>d?(c="\u03bcm",b*=1E6):1>d?(c="mm",b*=1E3):1E3>d?c="m":(c="km",b/=1E3):"us"==e?.9144>d?(c="in",b*=39.37):1609.344>d?(c="ft",b/=.30480061):(c="mi",b/=1609.3472):
315
+xa(!1,33);for(var e=3*Math.floor(Math.log(a.l*b)/Math.log(10)),f;;){f=Jk[(e%3+3)%3]*Math.pow(10,Math.floor(e/3));d=Math.round(f/b);if(isNaN(d)){a.c.style.display="none";a.j=!1;return}if(d>=a.l)break;++e}b=f+" "+c;a.D!=b&&(a.o.innerHTML=b,a.D=b);a.B!=d&&(a.o.style.width=d+"px",a.B=d);a.j||(a.c.style.display="",a.j=!0)}else a.j&&(a.c.style.display="none",a.j=!1)}var Ik="units";function Lk(a){a=a?a:{};this.c=void 0;this.j=Mk;this.D=this.l=0;this.I=null;this.na=!1;this.T=void 0!==a.duration?a.duration:200;var b=void 0!==a.className?a.className:"ol-zoomslider",c=document.createElement("button");c.setAttribute("type","button");c.className=b+"-thumb ol-unselectable";var d=document.createElement("div");d.className=b+" ol-unselectable ol-control";d.appendChild(c);this.o=new Ae(d);y(this.o,"pointerdown",this.yl,this);y(this.o,"pointermove",this.wl,this);y(this.o,"pointerup",this.xl,
316
+this);y(d,"click",this.vl,this);y(c,"click",Pc);md.call(this,{element:d,render:a.render?a.render:Nk})}v(Lk,md);Lk.prototype.ka=function(){Nc(this.o);md.prototype.ka.call(this)};var Mk=0;k=Lk.prototype;k.setMap=function(a){md.prototype.setMap.call(this,a);a&&a.render()};
317
+function Nk(a){if(a.frameState){if(!this.na){var b=this.element,c=b.offsetWidth,d=b.offsetHeight,e=b.firstElementChild,f=getComputedStyle(e),b=e.offsetWidth+parseFloat(f.marginRight)+parseFloat(f.marginLeft),e=e.offsetHeight+parseFloat(f.marginTop)+parseFloat(f.marginBottom);this.I=[b,e];c>d?(this.j=1,this.D=c-b):(this.j=Mk,this.l=d-e);this.na=!0}a=a.frameState.viewState.resolution;a!==this.c&&(this.c=a,Ok(this,a))}}
318
+k.vl=function(a){var b=this.a.Z();a=Pk(this,Ca(1===this.j?(a.offsetX-this.I[0]/2)/this.D:(a.offsetY-this.I[1]/2)/this.l,0,1));b.animate({resolution:b.constrainResolution(a),duration:this.T,easing:rd})};k.yl=function(a){this.u||a.b.target!==this.element.firstElementChild||(cg(this.a.Z(),1,1),this.C=a.clientX,this.B=a.clientY,this.u=!0)};
319
+k.wl=function(a){if(this.u){var b=this.element.firstElementChild;this.c=Pk(this,Ca(1===this.j?(a.clientX-this.C+parseInt(b.style.left,10))/this.D:(a.clientY-this.B+parseInt(b.style.top,10))/this.l,0,1));this.a.Z().Vc(this.c);Ok(this,this.c);this.C=a.clientX;this.B=a.clientY}};k.xl=function(){if(this.u){var a=this.a.Z();cg(a,1,-1);a.animate({resolution:a.constrainResolution(this.c),duration:this.T,easing:rd});this.u=!1;this.B=this.C=void 0}};
320
+function Ok(a,b){b=1-ig(a.a.Z())(b);var c=a.element.firstElementChild;1==a.j?c.style.left=a.D*b+"px":c.style.top=a.l*b+"px"}function Pk(a,b){return hg(a.a.Z())(1-b)};function Qk(a){a=a?a:{};this.c=a.extent?a.extent:null;var b=void 0!==a.className?a.className:"ol-zoom-extent",c=void 0!==a.label?a.label:"E",d=void 0!==a.tipLabel?a.tipLabel:"Fit to extent",e=document.createElement("button");e.setAttribute("type","button");e.title=d;e.appendChild("string"===typeof c?document.createTextNode(c):c);y(e,"click",this.j,this);c=document.createElement("div");c.className=b+" ol-unselectable ol-control";c.appendChild(e);md.call(this,{element:c,target:a.target})}v(Qk,md);
321
+Qk.prototype.j=function(a){a.preventDefault();a=this.a.Z();var b=this.c?this.c:a.v.G();a.Qf(b)};function Rk(a){Tc.call(this);a=a?a:{};this.a=null;y(this,Vc(Sk),this.vm,this);this.gg(void 0!==a.tracking?a.tracking:!1)}v(Rk,Tc);k=Rk.prototype;k.ka=function(){this.gg(!1);Tc.prototype.ka.call(this)};
322
+k.ap=function(a){if(null!==a.alpha){var b=Ha(a.alpha);this.set(Tk,b);"boolean"===typeof a.absolute&&a.absolute?this.set(Uk,b):"number"===typeof a.webkitCompassHeading&&-1!=a.webkitCompassAccuracy&&this.set(Uk,Ha(a.webkitCompassHeading))}null!==a.beta&&this.set(Vk,Ha(a.beta));null!==a.gamma&&this.set(Wk,Ha(a.gamma));this.s()};k.Fk=function(){return this.get(Tk)};k.Ik=function(){return this.get(Vk)};k.Ok=function(){return this.get(Wk)};k.um=function(){return this.get(Uk)};k.Th=function(){return this.get(Sk)};
323
+k.vm=function(){if(Vd){var a=this.Th();a&&!this.a?this.a=y(window,"deviceorientation",this.ap,this):a||null===this.a||(Ec(this.a),this.a=null)}};k.gg=function(a){this.set(Sk,a)};var Tk="alpha",Vk="beta",Wk="gamma",Uk="heading",Sk="tracking";function Xk(a){this.f=a.opacity;this.l=a.rotateWithView;this.g=a.rotation;this.a=a.scale;this.v=a.snapToPixel}k=Xk.prototype;k.Ze=function(){return this.f};k.$e=function(){return this.l};k.af=function(){return this.g};k.bf=function(){return this.a};k.Ae=function(){return this.v};k.td=function(a){this.f=a};k.cf=function(a){this.g=a};k.ud=function(a){this.a=a};function Yk(a){this.D=this.u=this.c=null;this.Va=void 0!==a.fill?a.fill:null;this.oa=[0,0];this.o=a.points;this.b=void 0!==a.radius?a.radius:a.radius1;this.i=a.radius2;this.j=void 0!==a.angle?a.angle:0;this.Ya=void 0!==a.stroke?a.stroke:null;this.B=this.ra=this.C=null;this.S=a.atlasManager;Zk(this,this.S);Xk.call(this,{opacity:1,rotateWithView:void 0!==a.rotateWithView?a.rotateWithView:!1,rotation:void 0!==a.rotation?a.rotation:0,scale:1,snapToPixel:void 0!==a.snapToPixel?a.snapToPixel:!0})}
324
+v(Yk,Xk);k=Yk.prototype;k.clone=function(){var a=new Yk({fill:this.Fa()?this.Fa().clone():void 0,points:this.o,radius:this.b,radius2:this.i,angle:this.j,snapToPixel:this.v,stroke:this.Ga()?this.Ga().clone():void 0,rotation:this.g,rotateWithView:this.l,atlasManager:this.S});a.td(this.f);a.ud(this.a);return a};k.Hc=function(){return this.C};k.Pi=function(){return this.j};k.Fa=function(){return this.Va};k.qg=function(){return this.D};k.Y=function(){return this.u};k.ye=function(){return this.B};
325
+k.Ye=function(){return 2};k.Oc=function(){return this.oa};k.Qi=function(){return this.o};k.Ri=function(){return this.b};k.Fh=function(){return this.i};k.ic=function(){return this.ra};k.Ga=function(){return this.Ya};k.Nh=function(){};k.load=function(){};k.Bj=function(){};
326
+function Zk(a,b){var c="",d="",e=0,f=null,g=0;if(a.Ya){var h=a.Ya.a;null===h&&(h=Uh);h=id(h);g=a.Ya.c;void 0===g&&(g=1);f=a.Ya.i;Td||(f=null);d=a.Ya.j;void 0===d&&(d="round");c=a.Ya.f;void 0===c&&(c="round");e=a.Ya.o;void 0===e&&(e=10)}var l=2*(a.b+g)+1,c={strokeStyle:h,zj:g,size:l,lineCap:c,lineDash:f,lineJoin:d,miterLimit:e};if(void 0===b){var m=jd(l,l);a.u=m.canvas;b=l=a.u.width;a.rh(c,m,0,0);a.Va?a.D=a.u:(m=jd(c.size,c.size),a.D=m.canvas,a.qh(c,m,0,0))}else l=Math.round(l),(d=!a.Va)&&(m=a.qh.bind(a,
327
+c)),a.Ya?(e=a.Ya,void 0===e.b&&(e.b="s",e.b=e.a?"string"===typeof e.a?e.b+e.a:e.b+w(e.a).toString():e.b+"-",e.b+=","+(void 0!==e.f?e.f.toString():"-")+","+(e.i?e.i.toString():"-")+","+(void 0!==e.g?e.g:"-")+","+(void 0!==e.j?e.j:"-")+","+(void 0!==e.o?e.o.toString():"-")+","+(void 0!==e.c?e.c.toString():"-")),e=e.b):e="-",a.Va?(f=a.Va,void 0===f.a&&(f.a=f.b instanceof CanvasPattern||f.b instanceof CanvasGradient?w(f.b).toString():"f"+(f.b?gd(f.b):"-")),f=f.a):f="-",a.c&&e==a.c[1]&&f==a.c[2]&&a.b==
328
+a.c[3]&&a.i==a.c[4]&&a.j==a.c[5]&&a.o==a.c[6]||(a.c=["r"+e+f+(void 0!==a.b?a.b.toString():"-")+(void 0!==a.i?a.i.toString():"-")+(void 0!==a.j?a.j.toString():"-")+(void 0!==a.o?a.o.toString():"-"),e,f,a.b,a.i,a.j,a.o]),m=b.add(a.c[0],l,l,a.rh.bind(a,c),m),a.u=m.image,a.oa=[m.offsetX,m.offsetY],b=m.image.width,a.D=d?m.Zl:a.u;a.C=[l/2,l/2];a.ra=[l,l];a.B=[b,b]}
329
+k.rh=function(a,b,c,d){b.setTransform(1,0,0,1,0,0);b.translate(c,d);b.beginPath();var e=this.o;if(Infinity===e)b.arc(a.size/2,a.size/2,this.b,0,2*Math.PI,!0);else{var f=void 0!==this.i?this.i:this.b;f!==this.b&&(e*=2);for(c=0;c<=e;c++){d=2*c*Math.PI/e-Math.PI/2+this.j;var g=c%2?f:this.b;b.lineTo(a.size/2+g*Math.cos(d),a.size/2+g*Math.sin(d))}}this.Va&&(c=this.Va.b,null===c&&(c=Sh),b.fillStyle=id(c),b.fill());this.Ya&&(b.strokeStyle=a.strokeStyle,b.lineWidth=a.zj,a.lineDash&&b.setLineDash(a.lineDash),
330
+b.lineCap=a.lineCap,b.lineJoin=a.lineJoin,b.miterLimit=a.miterLimit,b.stroke());b.closePath()};
331
+k.qh=function(a,b,c,d){b.setTransform(1,0,0,1,0,0);b.translate(c,d);b.beginPath();c=this.o;if(Infinity===c)b.arc(a.size/2,a.size/2,this.b,0,2*Math.PI,!0);else{d=void 0!==this.i?this.i:this.b;d!==this.b&&(c*=2);var e;for(e=0;e<=c;e++){var f=2*e*Math.PI/c-Math.PI/2+this.j;var g=e%2?d:this.b;b.lineTo(a.size/2+g*Math.cos(f),a.size/2+g*Math.sin(f))}}b.fillStyle=Sh;b.fill();this.Ya&&(b.strokeStyle=a.strokeStyle,b.lineWidth=a.zj,a.lineDash&&b.setLineDash(a.lineDash),b.stroke());b.closePath()};function $k(a){a=a||{};Yk.call(this,{points:Infinity,fill:a.fill,radius:a.radius,snapToPixel:a.snapToPixel,stroke:a.stroke,atlasManager:a.atlasManager})}v($k,Yk);$k.prototype.clone=function(){var a=new $k({fill:this.Fa()?this.Fa().clone():void 0,stroke:this.Ga()?this.Ga().clone():void 0,radius:this.b,snapToPixel:this.v,atlasManager:this.S});a.td(this.f);a.ud(this.a);return a};$k.prototype.Uc=function(a){this.b=a;Zk(this,this.S)};function al(a){a=a||{};this.b=void 0!==a.color?a.color:null;this.a=void 0}al.prototype.clone=function(){var a=this.b;return new al({color:a&&a.slice?a.slice():a||void 0})};al.prototype.i=function(){return this.b};al.prototype.c=function(a){this.b=a;this.a=void 0};function bl(a){a=a||{};this.Gc=null;this.Za=cl;void 0!==a.geometry&&this.Ra(a.geometry);this.Va=void 0!==a.fill?a.fill:null;this.M=void 0!==a.image?a.image:null;this.Ya=void 0!==a.stroke?a.stroke:null;this.Ia=void 0!==a.text?a.text:null;this.Fj=a.zIndex}k=bl.prototype;
332
+k.clone=function(){var a=this.V();a&&a.clone&&(a=a.clone());return new bl({geometry:a,fill:this.Fa()?this.Fa().clone():void 0,image:this.Y()?this.Y().clone():void 0,stroke:this.Ga()?this.Ga().clone():void 0,text:this.Na()?this.Na().clone():void 0,zIndex:this.Ba()})};k.V=function(){return this.Gc};k.Pk=function(){return this.Za};k.Fa=function(){return this.Va};k.pf=function(a){this.Va=a};k.Y=function(){return this.M};k.Og=function(a){this.M=a};k.Ga=function(){return this.Ya};
333
+k.qf=function(a){this.Ya=a};k.Na=function(){return this.Ia};k.xd=function(a){this.Ia=a};k.Ba=function(){return this.Fj};k.Ra=function(a){"function"===typeof a?this.Za=a:"string"===typeof a?this.Za=function(b){return b.get(a)}:a?a&&(this.Za=function(){return a}):this.Za=cl;this.Gc=a};k.Vb=function(a){this.Fj=a};function dl(a){if("function"!==typeof a){if(Array.isArray(a))var b=a;else xa(a instanceof bl,41),b=[a];a=function(){return b}}return a}var el=null;
334
+function fl(){if(!el){var a=new al({color:"rgba(255,255,255,0.4)"}),b=new wj({color:"#3399CC",width:1.25});el=[new bl({image:new $k({fill:a,stroke:b,radius:5}),fill:a,stroke:b})]}return el}
335
+function gl(){var a={},b=[255,255,255,1],c=[0,153,255,1];a.Polygon=[new bl({fill:new al({color:[255,255,255,.5]})})];a.MultiPolygon=a.Polygon;a.LineString=[new bl({stroke:new wj({color:b,width:5})}),new bl({stroke:new wj({color:c,width:3})})];a.MultiLineString=a.LineString;a.Circle=a.Polygon.concat(a.LineString);a.Point=[new bl({image:new $k({radius:6,fill:new al({color:c}),stroke:new wj({color:b,width:1.5})}),zIndex:Infinity})];a.MultiPoint=a.Point;a.GeometryCollection=a.Polygon.concat(a.LineString,
336
+a.Point);return a}function cl(a){return a.V()};function H(a){Tc.call(this);this.a=void 0;this.c="geometry";this.g=null;this.j=void 0;this.f=null;y(this,Vc(this.c),this.Ee,this);void 0!==a&&(a instanceof of||!a?this.Ra(a):this.H(a))}v(H,Tc);k=H.prototype;k.clone=function(){var a=new H(this.N());a.Tc(this.c);var b=this.V();b&&a.Ra(b.clone());(b=this.g)&&a.hg(b);return a};k.V=function(){return this.get(this.c)};k.wm=function(){return this.a};k.Qk=function(){return this.c};k.xm=function(){return this.g};k.Lc=function(){return this.j};k.Al=function(){this.s()};
337
+k.Ee=function(){this.f&&(Ec(this.f),this.f=null);var a=this.V();a&&(this.f=y(a,"change",this.Al,this));this.s()};k.Ra=function(a){this.set(this.c,a)};k.hg=function(a){this.j=(this.g=a)?hl(a):void 0;this.s()};k.jc=function(a){this.a=a;this.s()};k.Tc=function(a){Kc(this,Vc(this.c),this.Ee,this);this.c=a;y(this,Vc(this.c),this.Ee,this);this.Ee()};
338
+function hl(a){var b;if("function"===typeof a)2==a.length?b=function(b){return a(this,b)}:b=a;else{if(Array.isArray(a))var c=a;else xa(a instanceof bl,41),c=[a];b=function(){return c}}return b};var il=document.implementation.createDocument("","",null);function jl(a,b){return il.createElementNS(a,b)}function kl(a,b){return ll(a,b,[]).join("")}function ll(a,b,c){if(a.nodeType==Node.CDATA_SECTION_NODE||a.nodeType==Node.TEXT_NODE)b?c.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):c.push(a.nodeValue);else for(a=a.firstChild;a;a=a.nextSibling)ll(a,b,c);return c}function ml(a){return a instanceof Document}function nl(a){return a instanceof Node}
339
+function pl(a){return(new DOMParser).parseFromString(a,"application/xml")}function ql(a,b){return function(c,d){c=a.call(b,c,d);void 0!==c&&la(d[d.length-1],c)}}function rl(a,b){return function(c,d){c=a.call(void 0!==b?b:this,c,d);void 0!==c&&d[d.length-1].push(c)}}function sl(a,b){return function(c,d){c=a.call(void 0!==b?b:this,c,d);void 0!==c&&(d[d.length-1]=c)}}
340
+function tl(a){return function(b,c){var d=a.call(this,b,c);if(void 0!==d){c=c[c.length-1];b=b.localName;var e;b in c?e=c[b]:e=c[b]=[];e.push(d)}}}function I(a,b){return function(c,d){var e=a.call(this,c,d);void 0!==e&&(d[d.length-1][void 0!==b?b:c.localName]=e)}}function J(a,b){return function(c,d,e){a.call(void 0!==b?b:this,c,d,e);e[e.length-1].node.appendChild(c)}}
341
+function vl(a){var b,c;return function(d,e,f){if(!b){b={};var g={};g[d.localName]=a;b[d.namespaceURI]=g;c=wl(d.localName)}xl(b,c,e,f)}}function wl(a,b){return function(c,d,e){c=d[d.length-1].node;d=a;void 0===d&&(d=e);e=b;void 0===b&&(e=c.namespaceURI);return jl(e,d)}}var yl=wl();function zl(a,b){for(var c=b.length,d=Array(c),e=0;e<c;++e)d[e]=a[b[e]];return d}function K(a,b,c){c=void 0!==c?c:{};var d;var e=0;for(d=a.length;e<d;++e)c[a[e]]=b;return c}
342
+function Al(a,b,c,d){for(b=b.firstElementChild;b;b=b.nextElementSibling){var e=a[b.namespaceURI];void 0!==e&&(e=e[b.localName])&&e.call(d,b,c)}}function N(a,b,c,d,e){d.push(a);Al(b,c,d,e);return d.pop()}function xl(a,b,c,d,e,f){for(var g=(void 0!==e?e:c).length,h,l,m=0;m<g;++m)h=c[m],void 0!==h&&(l=b.call(f,h,d,void 0!==e?e[m]:void 0),void 0!==l&&a[l.namespaceURI][l.localName].call(f,l,h,d))}function Bl(a,b,c,d,e,f,g){e.push(a);xl(b,c,d,e,f,g);e.pop()};function Cl(a,b,c,d){return function(e,f,g){var h=new XMLHttpRequest;h.open("GET","function"===typeof a?a(e,f,g):a,!0);"arraybuffer"==b.U()&&(h.responseType="arraybuffer");h.onload=function(){if(!h.status||200<=h.status&&300>h.status){var a=b.U();if("json"==a||"text"==a)var e=h.responseText;else"xml"==a?(e=h.responseXML)||(e=pl(h.responseText)):"arraybuffer"==a&&(e=h.response);e?c.call(this,b.Oa(e,{featureProjection:g}),b.kb(e)):d.call(this)}else d.call(this)}.bind(this);h.onerror=function(){d.call(this)}.bind(this);
343
+h.send()}}function Dl(a,b){return Cl(a,b,function(a){this.cd(a)},ua)};function El(){this.f=this.defaultDataProjection=null}function Fl(a,b,c){var d;c&&(d={dataProjection:c.dataProjection?c.dataProjection:a.kb(b),featureProjection:c.featureProjection});return Gl(a,d)}function Gl(a,b){return tb({dataProjection:a.defaultDataProjection,featureProjection:a.f},b)}
344
+function Hl(a,b,c){var d=c?Tb(c.featureProjection):null,e=c?Tb(c.dataProjection):null,f;d&&e&&!dc(d,e)?a instanceof of?f=(b?a.clone():a).tb(b?d:e,b?e:d):f=hc(a,e,d):f=a;if(b&&c&&void 0!==c.decimals){var g=Math.pow(10,c.decimals);f===a&&(f=f.clone());f.Dc(function(a){for(var b=0,c=a.length;b<c;++b)a[b]=Math.round(a[b]*g)/g;return a})}return f};function Il(){El.call(this)}v(Il,El);function Jl(a){return"string"===typeof a?(a=JSON.parse(a))?a:null:null!==a?a:null}k=Il.prototype;k.U=function(){return"json"};k.Tb=function(a,b){return this.Rc(Jl(a),Fl(this,a,b))};k.Oa=function(a,b){return this.yg(Jl(a),Fl(this,a,b))};k.Sc=function(a,b){return this.Cg(Jl(a),Fl(this,a,b))};k.kb=function(a){return this.Fg(Jl(a))};k.Bd=function(a,b){return JSON.stringify(this.Zc(a,b))};k.Wb=function(a,b){return JSON.stringify(this.he(a,b))};
345
+k.$c=function(a,b){return JSON.stringify(this.je(a,b))};function Kl(a,b,c,d,e,f){var g=NaN,h=NaN,l=(c-b)/d;if(1===l)g=a[b],h=a[b+1];else if(2==l)g=(1-e)*a[b]+e*a[b+d],h=(1-e)*a[b+1]+e*a[b+d+1];else if(l){var h=a[b],l=a[b+1],m=0,g=[0],n;for(n=b+d;n<c;n+=d){var p=a[n],q=a[n+1],m=m+Math.sqrt((p-h)*(p-h)+(q-l)*(q-l));g.push(m);h=p;l=q}c=e*m;l=0;m=g.length;for(n=!1;l<m;)e=l+(m-l>>1),h=+ia(g[e],c),0>h?l=e+1:(m=e,n=!h);e=n?l:~l;0>e?(c=(c-g[-e-2])/(g[-e-1]-g[-e-2]),b+=(-e-2)*d,g=Ja(a[b],a[b+d],c),h=Ja(a[b+1],a[b+d+1],c)):(g=a[b+e*d],h=a[b+e*d+1])}return f?(f[0]=
346
+g,f[1]=h,f):[g,h]}function Ll(a,b,c,d,e,f){if(c==b)return null;if(e<a[b+d-1])return f?(c=a.slice(b,b+d),c[d-1]=e,c):null;if(a[c-1]<e)return f?(c=a.slice(c-d,c),c[d-1]=e,c):null;if(e==a[b+d-1])return a.slice(b,b+d);b/=d;for(c/=d;b<c;)f=b+c>>1,e<a[(f+1)*d-1]?c=f:b=f+1;c=a[b*d-1];if(e==c)return a.slice((b-1)*d,(b-1)*d+d);f=(e-c)/(a[(b+1)*d-1]-c);c=[];var g;for(g=0;g<d-1;++g)c.push(Ja(a[(b-1)*d+g],a[b*d+g],f));c.push(e);return c}
347
+function Ml(a,b,c,d,e,f){var g=0;if(f)return Ll(a,g,b[b.length-1],c,d,e);if(d<a[c-1])return e?(a=a.slice(0,c),a[c-1]=d,a):null;if(a[a.length-1]<d)return e?(a=a.slice(a.length-c),a[c-1]=d,a):null;e=0;for(f=b.length;e<f;++e){var h=b[e];if(g!=h){if(d<a[g+c-1])break;else if(d<=a[h-1])return Ll(a,g,h,c,d,!1);g=h}}return null};function O(a,b){rf.call(this);this.c=null;this.u=this.D=this.j=-1;this.ma(a,b)}v(O,rf);k=O.prototype;k.mk=function(a){this.A?la(this.A,a):this.A=a.slice();this.s()};k.clone=function(){var a=new O(null);a.ba(this.ja,this.A.slice());return a};k.Kb=function(a,b,c,d){if(d<Sa(this.G(),a,b))return d;this.u!=this.i&&(this.D=Math.sqrt(yf(this.A,0,this.A.length,this.a,0)),this.u=this.i);return Af(this.A,0,this.A.length,this.a,this.D,!1,a,b,c,d)};
348
+k.Ck=function(a,b){return Pf(this.A,0,this.A.length,this.a,a,b)};k.nn=function(a,b){return"XYM"!=this.ja&&"XYZM"!=this.ja?null:Ll(this.A,0,this.A.length,this.a,a,void 0!==b?b:!1)};k.X=function(){return Ff(this.A,0,this.A.length,this.a)};k.wh=function(a,b){return Kl(this.A,0,this.A.length,this.a,a,b)};k.pn=function(){var a=this.A,b=this.a,c=a[0],d=a[1],e=0,f;for(f=0+b;f<this.A.length;f+=b)var g=a[f],h=a[f+1],e=e+Math.sqrt((g-c)*(g-c)+(h-d)*(h-d)),c=g,d=h;return e};
349
+function di(a){a.j!=a.i&&(a.c=a.wh(.5,a.c),a.j=a.i);return a.c}k.hd=function(a){var b=[];b.length=Hf(this.A,0,this.A.length,this.a,a,b,0);a=new O(null);a.ba("XY",b);return a};k.U=function(){return"LineString"};k.Xa=function(a){return Qf(this.A,0,this.A.length,this.a,a)};k.ma=function(a,b){a?(uf(this,b,a,1),this.A||(this.A=[]),this.A.length=Df(this.A,0,a,this.a),this.s()):this.ba("XY",null)};k.ba=function(a,b){tf(this,a,b);this.s()};function P(a,b){rf.call(this);this.c=[];this.j=this.u=-1;this.ma(a,b)}v(P,rf);k=P.prototype;k.nk=function(a){this.A?la(this.A,a.ga().slice()):this.A=a.ga().slice();this.c.push(this.A.length);this.s()};k.clone=function(){var a=new P(null);a.ba(this.ja,this.A.slice(),this.c.slice());return a};k.Kb=function(a,b,c,d){if(d<Sa(this.G(),a,b))return d;this.j!=this.i&&(this.u=Math.sqrt(zf(this.A,0,this.c,this.a,0)),this.j=this.i);return Bf(this.A,0,this.c,this.a,this.u,!1,a,b,c,d)};
350
+k.rn=function(a,b,c){return"XYM"!=this.ja&&"XYZM"!=this.ja||!this.A.length?null:Ml(this.A,this.c,this.a,a,void 0!==b?b:!1,void 0!==c?c:!1)};k.X=function(){return Gf(this.A,0,this.c,this.a)};k.Bb=function(){return this.c};k.Yk=function(a){if(0>a||this.c.length<=a)return null;var b=new O(null);b.ba(this.ja,this.A.slice(a?this.c[a-1]:0,this.c[a]));return b};
351
+k.gd=function(){var a=this.A,b=this.c,c=this.ja,d=[],e=0,f;var g=0;for(f=b.length;g<f;++g){var h=b[g],l=new O(null);l.ba(c,a.slice(e,h));d.push(l);e=h}return d};function ei(a){var b=[],c=a.A,d=0,e=a.c;a=a.a;var f;var g=0;for(f=e.length;g<f;++g){var h=e[g],d=Kl(c,d,h,a,.5);la(b,d);d=h}return b}k.hd=function(a){var b=[],c=[],d=this.A,e=this.c,f=this.a,g=0,h=0,l;var m=0;for(l=e.length;m<l;++m){var n=e[m],h=Hf(d,g,n,f,a,b,h);c.push(h);g=n}b.length=h;a=new P(null);a.ba("XY",b,c);return a};k.U=function(){return"MultiLineString"};
352
+k.Xa=function(a){a:{var b=this.A,c=this.c,d=this.a,e=0,f;var g=0;for(f=c.length;g<f;++g){if(Qf(b,e,c[g],d,a)){a=!0;break a}e=c[g]}a=!1}return a};k.ma=function(a,b){a?(uf(this,b,a,2),this.A||(this.A=[]),a=Ef(this.A,0,a,this.a,this.c),this.A.length=a.length?a[a.length-1]:0,this.s()):this.ba("XY",null,this.c)};k.ba=function(a,b,c){tf(this,a,b);this.c=c;this.s()};function Nl(a,b){var c=a.ja,d=[],e=[],f;var g=0;for(f=b.length;g<f;++g){var h=b[g];g||(c=h.ja);la(d,h.ga());e.push(d.length)}a.ba(c,d,e)};function Q(a,b){rf.call(this);this.ma(a,b)}v(Q,rf);k=Q.prototype;k.qk=function(a){this.A?la(this.A,a.ga()):this.A=a.ga().slice();this.s()};k.clone=function(){var a=new Q(null);a.ba(this.ja,this.A.slice());return a};k.Kb=function(a,b,c,d){if(d<Sa(this.G(),a,b))return d;var e=this.A,f=this.a,g;var h=0;for(g=e.length;h<g;h+=f){var l=Ga(a,b,e[h],e[h+1]);if(l<d){d=l;for(l=0;l<f;++l)c[l]=e[h+l];c.length=f}}return d};k.X=function(){return Ff(this.A,0,this.A.length,this.a)};
353
+k.il=function(a){var b=this.A?this.A.length/this.a:0;if(0>a||b<=a)return null;b=new C(null);b.ba(this.ja,this.A.slice(a*this.a,(a+1)*this.a));return b};k.Zd=function(){var a=this.A,b=this.ja,c=this.a,d=[],e;var f=0;for(e=a.length;f<e;f+=c){var g=new C(null);g.ba(b,a.slice(f,f+c));d.push(g)}return d};k.U=function(){return"MultiPoint"};k.Xa=function(a){var b=this.A,c=this.a,d;var e=0;for(d=b.length;e<d;e+=c){var f=b[e];var g=b[e+1];if(Ua(a,f,g))return!0}return!1};
354
+k.ma=function(a,b){a?(uf(this,b,a,1),this.A||(this.A=[]),this.A.length=Df(this.A,0,a,this.a),this.s()):this.ba("XY",null)};k.ba=function(a,b){tf(this,a,b);this.s()};function R(a,b){rf.call(this);this.c=[];this.u=-1;this.D=null;this.I=this.C=this.B=-1;this.j=null;this.ma(a,b)}v(R,rf);k=R.prototype;k.rk=function(a){if(this.A){var b=this.A.length;la(this.A,a.ga());a=a.Bb().slice();var c;var d=0;for(c=a.length;d<c;++d)a[d]+=b}else this.A=a.ga().slice(),a=a.Bb().slice(),this.c.push();this.c.push(a);this.s()};k.clone=function(){for(var a=new R(null),b=this.c.length,c=Array(b),d=0;d<b;++d)c[d]=this.c[d].slice();Ol(a,this.ja,this.A.slice(),c);return a};
355
+k.Kb=function(a,b,c,d){if(d<Sa(this.G(),a,b))return d;if(this.C!=this.i){var e=this.c,f=0,g=0,h;var l=0;for(h=e.length;l<h;++l)var m=e[l],g=zf(this.A,f,m,this.a,g),f=m[m.length-1];this.B=Math.sqrt(g);this.C=this.i}e=fi(this);f=this.c;g=this.a;l=this.B;h=0;var m=[NaN,NaN],n;var p=0;for(n=f.length;p<n;++p){var q=f[p];d=Bf(e,h,q,g,l,!0,a,b,c,d,m);h=q[q.length-1]}return d};
356
+k.Mc=function(a,b){a:{var c=fi(this),d=this.c,e=0;if(d.length){var f;var g=0;for(f=d.length;g<f;++g){var h=d[g];if(Nf(c,e,h,this.a,a,b)){a=!0;break a}e=h[h.length-1]}}a=!1}return a};k.sn=function(){var a=fi(this),b=this.c,c=0,d=0,e;var f=0;for(e=b.length;f<e;++f)var g=b[f],d=d+wf(a,c,g,this.a),c=g[g.length-1];return d};
357
+k.X=function(a){if(void 0!==a){var b=fi(this).slice();Vf(b,this.c,this.a,a)}else b=this.A;a=b;b=this.c;var c=this.a,d=0,e=[],f=0,g;var h=0;for(g=b.length;h<g;++h){var l=b[h];e[f++]=Gf(a,d,l,c,e[f]);d=l[l.length-1]}e.length=f;return e};
358
+function gi(a){if(a.u!=a.i){var b=a.A,c=a.c,d=a.a,e=0,f=[],g;var h=0;for(g=c.length;h<g;++h){var l=c[h],e=$a(b,e,l[0],d);f.push((e[0]+e[2])/2,(e[1]+e[3])/2);e=l[l.length-1]}b=fi(a);c=a.c;d=a.a;h=0;g=[];l=0;for(e=c.length;l<e;++l){var m=c[l];g=Of(b,h,m,d,f,2*l,g);h=m[m.length-1]}a.D=g;a.u=a.i}return a.D}k.Uk=function(){var a=new Q(null);a.ba("XY",gi(this).slice());return a};
359
+function fi(a){if(a.I!=a.i){var b=a.A;a:{var c=a.c;var d;var e=0;for(d=c.length;e<d;++e)if(!Tf(b,c[e],a.a,void 0)){c=!1;break a}c=!0}c?a.j=b:(a.j=b.slice(),a.j.length=Vf(a.j,a.c,a.a));a.I=a.i}return a.j}k.hd=function(a){var b=[],c=[],d=this.A,e=this.c,f=this.a;a=Math.sqrt(a);var g=0,h=0,l;var m=0;for(l=e.length;m<l;++m){var n=e[m],p=[],h=If(d,g,n,f,a,b,h,p);c.push(p);g=n[n.length-1]}b.length=h;d=new R(null);Ol(d,"XY",b,c);return d};
360
+k.jl=function(a){if(0>a||this.c.length<=a)return null;if(a){var b=this.c[a-1];b=b[b.length-1]}else b=0;a=this.c[a].slice();var c=a[a.length-1];if(b){var d;var e=0;for(d=a.length;e<d;++e)a[e]-=b}e=new D(null);e.ba(this.ja,this.A.slice(b,c),a);return e};k.Td=function(){var a=this.ja,b=this.A,c=this.c,d=[],e=0,f,g;var h=0;for(f=c.length;h<f;++h){var l=c[h].slice(),m=l[l.length-1];if(e){var n=0;for(g=l.length;n<g;++n)l[n]-=e}n=new D(null);n.ba(a,b.slice(e,m),l);d.push(n);e=m}return d};k.U=function(){return"MultiPolygon"};
361
+k.Xa=function(a){a:{var b=fi(this),c=this.c,d=this.a,e=0,f;var g=0;for(f=c.length;g<f;++g){var h=c[g];if(Rf(b,e,h,d,a)){a=!0;break a}e=h[h.length-1]}a=!1}return a};k.ma=function(a,b){if(a){uf(this,b,a,3);this.A||(this.A=[]);b=this.A;var c=this.a,d=this.c,e=0,d=d?d:[],f=0,g;var h=0;for(g=a.length;h<g;++h)e=Ef(b,e,a[h],c,d[f]),d[f++]=e,e=e[e.length-1];d.length=f;d.length?(a=d[d.length-1],this.A.length=a.length?a[a.length-1]:0):this.A.length=0;this.s()}else Ol(this,"XY",null,this.c)};
362
+function Ol(a,b,c,d){tf(a,b,c);a.c=d;a.s()}function Pl(a,b){var c=a.ja,d=[],e=[],f;var g=0;for(f=b.length;g<f;++g){var h=b[g];g||(c=h.ja);var l=d.length;var m=h.Bb();var n;var p=0;for(n=m.length;p<n;++p)m[p]+=l;la(d,h.ga());e.push(m)}Ol(a,c,d,e)};function Ql(a){a=a?a:{};El.call(this);this.b=a.geometryName}v(Ql,Il);
363
+function Rl(a,b){if(!a)return null;if("number"===typeof a.x&&"number"===typeof a.y)var c="Point";else if(a.points)c="MultiPoint";else if(a.paths)c=1===a.paths.length?"LineString":"MultiLineString";else if(a.rings){var d=a.rings,e=Sl(a),f=[],g=[];c=[];var h;var l=0;for(h=d.length;l<h;++l)f.length=0,Df(f,0,d[l],e.length),Sf(f,0,f.length,e.length)?g.push([d[l]]):c.push(d[l]);for(;c.length;){d=c.shift();e=!1;for(l=g.length-1;0<=l;l--)if(Va((new Jf(g[l][0])).G(),(new Jf(d)).G())){g[l].push(d);e=!0;break}e||
364
+g.push([d.reverse()])}a=tb({},a);1===g.length?(c="Polygon",a.rings=g[0]):(c="MultiPolygon",a.rings=g)}return Hl((0,Tl[c])(a),!1,b)}function Sl(a){var b="XY";!0===a.hasZ&&!0===a.hasM?b="XYZM":!0===a.hasZ?b="XYZ":!0===a.hasM&&(b="XYM");return b}function Ul(a){a=a.ja;return{hasZ:"XYZ"===a||"XYZM"===a,hasM:"XYM"===a||"XYZM"===a}}
365
+var Tl={Point:function(a){return void 0!==a.m&&void 0!==a.z?new C([a.x,a.y,a.z,a.m],"XYZM"):void 0!==a.z?new C([a.x,a.y,a.z],"XYZ"):void 0!==a.m?new C([a.x,a.y,a.m],"XYM"):new C([a.x,a.y])},LineString:function(a){return new O(a.paths[0],Sl(a))},Polygon:function(a){return new D(a.rings,Sl(a))},MultiPoint:function(a){return new Q(a.points,Sl(a))},MultiLineString:function(a){return new P(a.paths,Sl(a))},MultiPolygon:function(a){return new R(a.rings,Sl(a))}},Vl={Point:function(a){var b=a.X(),c;a=a.ja;
366
+"XYZ"===a?c={x:b[0],y:b[1],z:b[2]}:"XYM"===a?c={x:b[0],y:b[1],m:b[2]}:"XYZM"===a?c={x:b[0],y:b[1],z:b[2],m:b[3]}:"XY"===a?c={x:b[0],y:b[1]}:xa(!1,34);return c},LineString:function(a){var b=Ul(a);return{hasZ:b.hasZ,hasM:b.hasM,paths:[a.X()]}},Polygon:function(a){var b=Ul(a);return{hasZ:b.hasZ,hasM:b.hasM,rings:a.X(!1)}},MultiPoint:function(a){var b=Ul(a);return{hasZ:b.hasZ,hasM:b.hasM,points:a.X()}},MultiLineString:function(a){var b=Ul(a);return{hasZ:b.hasZ,hasM:b.hasM,paths:a.X()}},MultiPolygon:function(a){var b=
367
+Ul(a);a=a.X(!1);for(var c=[],d=0;d<a.length;d++)for(var e=a[d].length-1;0<=e;e--)c.push(a[d][e]);return{hasZ:b.hasZ,hasM:b.hasM,rings:c}}};k=Ql.prototype;k.Rc=function(a,b){var c=Rl(a.geometry,b),d=new H;this.b&&d.Tc(this.b);d.Ra(c);b&&b.dg&&a.attributes[b.dg]&&d.jc(a.attributes[b.dg]);a.attributes&&d.H(a.attributes);return d};k.yg=function(a,b){b=b?b:{};if(a.features){var c=[],d=a.features,e;b.dg=a.objectIdFieldName;a=0;for(e=d.length;a<e;++a)c.push(this.Rc(d[a],b));return c}return[this.Rc(a,b)]};
368
+k.Cg=function(a,b){return Rl(a,b)};k.Fg=function(a){return a.spatialReference&&a.spatialReference.wkid?Tb("EPSG:"+a.spatialReference.wkid):null};function Wl(a,b){return(0,Vl[a.U()])(Hl(a,!0,b),b)}k.je=function(a,b){return Wl(a,Gl(this,b))};k.Zc=function(a,b){b=Gl(this,b);var c={},d=a.V();d&&(c.geometry=Wl(d,b));d=a.N();delete d[a.c];c.attributes=wb(d)?{}:d;b&&b.featureProjection&&(c.spatialReference={wkid:Tb(b.featureProjection).mb.split(":").pop()});return c};
369
+k.he=function(a,b){b=Gl(this,b);var c=[],d;var e=0;for(d=a.length;e<d;++e)c.push(this.Zc(a[e],b));return{features:c}};function Xl(a){this.kc=a};function Yl(a,b){this.kc=a;this.b=Array.prototype.slice.call(arguments,1);xa(2<=this.b.length,57)}v(Yl,Xl);function Zl(a){var b=["And"].concat(Array.prototype.slice.call(arguments));Yl.apply(this,b)}v(Zl,Yl);function $l(a,b,c){this.kc="BBOX";this.geometryName=a;this.extent=b;this.srsName=c}v($l,Xl);function am(a,b){this.kc=a;this.b=b}v(am,Xl);function bm(a,b,c){am.call(this,"During",a);this.a=b;this.i=c}v(bm,am);function cm(a,b,c,d){am.call(this,a,b);this.i=c;this.a=d}v(cm,am);function dm(a,b,c){cm.call(this,"PropertyIsEqualTo",a,b,c)}v(dm,cm);function em(a,b){cm.call(this,"PropertyIsGreaterThan",a,b)}v(em,cm);function fm(a,b){cm.call(this,"PropertyIsGreaterThanOrEqualTo",a,b)}v(fm,cm);function gm(a,b,c,d){this.kc=a;this.geometryName=b||"the_geom";this.geometry=c;this.srsName=d}v(gm,Xl);function hm(a,b,c){gm.call(this,"Intersects",a,b,c)}v(hm,gm);function im(a,b,c){am.call(this,"PropertyIsBetween",a);this.a=b;this.i=c}v(im,am);function jm(a,b,c,d,e,f){am.call(this,"PropertyIsLike",a);this.c=b;this.g=void 0!==c?c:"*";this.f=void 0!==d?d:".";this.i=void 0!==e?e:"!";this.a=f}v(jm,am);function km(a){am.call(this,"PropertyIsNull",a)}v(km,am);function lm(a,b){cm.call(this,"PropertyIsLessThan",a,b)}v(lm,cm);function mm(a,b){cm.call(this,"PropertyIsLessThanOrEqualTo",a,b)}v(mm,cm);function nm(a){this.kc="Not";this.condition=a}v(nm,Xl);function om(a,b,c){cm.call(this,"PropertyIsNotEqualTo",a,b,c)}v(om,cm);function pm(a){var b=["Or"].concat(Array.prototype.slice.call(arguments));Yl.apply(this,b)}v(pm,Yl);function qm(a,b,c){gm.call(this,"Within",a,b,c)}v(qm,gm);function rm(a){var b=[null].concat(Array.prototype.slice.call(arguments));return new (Function.prototype.bind.apply(Zl,b))}function sm(a,b,c){return new $l(a,b,c)};function tm(a){of.call(this);this.a=a?a:null;um(this)}v(tm,of);function vm(a){var b=[],c;var d=0;for(c=a.length;d<c;++d)b.push(a[d].clone());return b}function wm(a){var b;if(a.a){var c=0;for(b=a.a.length;c<b;++c)Kc(a.a[c],"change",a.s,a)}}function um(a){var b;if(a.a){var c=0;for(b=a.a.length;c<b;++c)y(a.a[c],"change",a.s,a)}}k=tm.prototype;k.clone=function(){var a=new tm(null);a.oj(this.a);return a};
370
+k.Kb=function(a,b,c,d){if(d<Sa(this.G(),a,b))return d;var e=this.a,f;var g=0;for(f=e.length;g<f;++g)d=e[g].Kb(a,b,c,d);return d};k.Mc=function(a,b){var c=this.a,d;var e=0;for(d=c.length;e<d;++e)if(c[e].Mc(a,b))return!0;return!1};k.se=function(a){Ya(a);for(var b=this.a,c=0,d=b.length;c<d;++c)cb(a,b[c].G());return a};k.Vf=function(){return vm(this.a)};
371
+k.Vd=function(a){this.o!=this.i&&(ub(this.f),this.g=0,this.o=this.i);if(0>a||this.g&&a<this.g)return this;var b=a.toString();if(this.f.hasOwnProperty(b))return this.f[b];var c=[],d=this.a,e=!1,f;var g=0;for(f=d.length;g<f;++g){var h=d[g],l=h.Vd(a);c.push(l);l!==h&&(e=!0)}if(e)return a=new tm(null),wm(a),a.a=c,um(a),a.s(),this.f[b]=a;this.g=a;return this};k.U=function(){return"GeometryCollection"};k.Xa=function(a){var b=this.a,c;var d=0;for(c=b.length;d<c;++d)if(b[d].Xa(a))return!0;return!1};
372
+k.rotate=function(a,b){for(var c=this.a,d=0,e=c.length;d<e;++d)c[d].rotate(a,b);this.s()};k.scale=function(a,b,c){c||(c=nb(this.G()));for(var d=this.a,e=0,f=d.length;e<f;++e)d[e].scale(a,b,c);this.s()};k.oj=function(a){a=vm(a);wm(this);this.a=a;um(this);this.s()};k.Dc=function(a){var b=this.a,c;var d=0;for(c=b.length;d<c;++d)b[d].Dc(a);this.s()};k.translate=function(a,b){var c=this.a,d;var e=0;for(d=c.length;e<d;++e)c[e].translate(a,b);this.s()};k.ka=function(){wm(this);of.prototype.ka.call(this)};function xm(a){a=a?a:{};El.call(this);this.defaultDataProjection=Tb(a.defaultDataProjection?a.defaultDataProjection:"EPSG:4326");a.featureProjection&&(this.f=Tb(a.featureProjection));this.b=a.geometryName}v(xm,Il);function ym(a,b){return a?Hl((0,zm[a.type])(a),!1,b):null}function Am(a,b){return(0,Bm[a.U()])(Hl(a,!0,b),b)}
373
+var zm={Point:function(a){return new C(a.coordinates)},LineString:function(a){return new O(a.coordinates)},Polygon:function(a){return new D(a.coordinates)},MultiPoint:function(a){return new Q(a.coordinates)},MultiLineString:function(a){return new P(a.coordinates)},MultiPolygon:function(a){return new R(a.coordinates)},GeometryCollection:function(a,b){a=a.geometries.map(function(a){return ym(a,b)});return new tm(a)}},Bm={Point:function(a){return{type:"Point",coordinates:a.X()}},LineString:function(a){return{type:"LineString",
374
+coordinates:a.X()}},Polygon:function(a,b){if(b)var c=b.rightHanded;return{type:"Polygon",coordinates:a.X(c)}},MultiPoint:function(a){return{type:"MultiPoint",coordinates:a.X()}},MultiLineString:function(a){return{type:"MultiLineString",coordinates:a.X()}},MultiPolygon:function(a,b){if(b)var c=b.rightHanded;return{type:"MultiPolygon",coordinates:a.X(c)}},GeometryCollection:function(a,b){return{type:"GeometryCollection",geometries:a.a.map(function(a){var c=tb({},b);delete c.featureProjection;return Am(a,
375
+c)})}},Circle:function(){return{type:"GeometryCollection",geometries:[]}}};k=xm.prototype;k.Rc=function(a,b){a="Feature"===a.type?a:{type:"Feature",geometry:a};b=ym(a.geometry,b);var c=new H;this.b&&c.Tc(this.b);c.Ra(b);void 0!==a.id&&c.jc(a.id);a.properties&&c.H(a.properties);return c};k.yg=function(a,b){if("FeatureCollection"===a.type){var c=[];a=a.features;var d;var e=0;for(d=a.length;e<d;++e)c.push(this.Rc(a[e],b))}else c=[this.Rc(a,b)];return c};k.Cg=function(a,b){return ym(a,b)};
376
+k.Fg=function(a){a=a.crs;var b;a?"name"==a.type?b=Tb(a.properties.name):"EPSG"==a.type?b=Tb("EPSG:"+a.properties.code):xa(!1,36):b=this.defaultDataProjection;return b};k.Zc=function(a,b){b=Gl(this,b);var c={type:"Feature"},d=a.a;void 0!==d&&(c.id=d);(d=a.V())?c.geometry=Am(d,b):c.geometry=null;b=a.N();delete b[a.c];wb(b)?c.properties=null:c.properties=b;return c};k.he=function(a,b){b=Gl(this,b);var c=[],d;var e=0;for(d=a.length;e<d;++e)c.push(this.Zc(a[e],b));return{type:"FeatureCollection",features:c}};
377
+k.je=function(a,b){return Am(a,Gl(this,b))};function Cm(){this.i=new XMLSerializer;El.call(this)}v(Cm,El);k=Cm.prototype;k.U=function(){return"xml"};k.Tb=function(a,b){return ml(a)?Dm(this,a,b):nl(a)?this.xg(a,b):"string"===typeof a?(a=pl(a),Dm(this,a,b)):null};function Dm(a,b,c){a=Em(a,b,c);return 0<a.length?a[0]:null}k.xg=function(){return null};k.Oa=function(a,b){return ml(a)?Em(this,a,b):nl(a)?this.zc(a,b):"string"===typeof a?(a=pl(a),Em(this,a,b)):[]};
378
+function Em(a,b,c){var d=[];for(b=b.firstChild;b;b=b.nextSibling)b.nodeType==Node.ELEMENT_NODE&&la(d,a.zc(b,c));return d}k.Sc=function(a,b){if(ml(a))return null;if(nl(a))return this.aj(a,b);"string"===typeof a&&pl(a);return null};k.aj=function(){return null};k.kb=function(a){return ml(a)?this.Eg(a):nl(a)?this.kf(a):"string"===typeof a?(a=pl(a),this.Eg(a)):null};k.Eg=function(){return this.defaultDataProjection};k.kf=function(){return this.defaultDataProjection};
379
+k.Bd=function(a,b){return this.i.serializeToString(this.Vg(a,b))};k.Vg=function(){return null};k.Wb=function(a,b){a=this.Xb(a,b);return this.i.serializeToString(a)};k.Xb=function(){return null};k.$c=function(a,b){a=this.ie(a,b);return this.i.serializeToString(a)};k.ie=function(){return null};function Fm(a){a=a?a:{};this.featureType=a.featureType;this.featureNS=a.featureNS;this.srsName=a.srsName;this.schemaLocation="";this.b={};this.b["http://www.opengis.net/gml"]={featureMember:sl(Fm.prototype.be),featureMembers:sl(Fm.prototype.be)};Cm.call(this)}v(Fm,Cm);var Gm=/^[\s\xa0]*$/;k=Fm.prototype;
380
+k.be=function(a,b){var c=a.localName,d=null;if("FeatureCollection"==c)"http://www.opengis.net/wfs"===a.namespaceURI?d=N([],this.b,a,b,this):d=N(null,this.b,a,b,this);else if("featureMembers"==c||"featureMember"==c){var e=b[0],f=e.featureType,g=e.featureNS,h;if(!f&&a.childNodes){f=[];g={};var l=0;for(h=a.childNodes.length;l<h;++l){var m=a.childNodes[l];if(1===m.nodeType){var n=m.nodeName.split(":").pop();if(-1===f.indexOf(n)){var p="",q=0,m=m.namespaceURI,r;for(r in g){if(g[r]===m){p=r;break}++q}p||
381
+(p="p"+q,g[p]=m);f.push(p+":"+n)}}}"featureMember"!=c&&(e.featureType=f,e.featureNS=g)}"string"===typeof g&&(l=g,g={},g.p0=l);var e={},f=Array.isArray(f)?f:[f],u;for(u in g){n={};l=0;for(h=f.length;l<h;++l)(-1===f[l].indexOf(":")?"p0":f[l].split(":")[0])===u&&(n[f[l].split(":").pop()]="featureMembers"==c?rl(this.wg,this):sl(this.wg,this));e[g[u]]=n}"featureMember"==c?d=N(void 0,e,a,b):d=N([],e,a,b)}null===d&&(d=[]);return d};
382
+k.gf=function(a,b){var c=b[0];c.srsName=a.firstElementChild.getAttribute("srsName");if(a=N(null,this.Zg,a,b,this))return Hl(a,!1,c)};
383
+k.wg=function(a,b){var c;(c=a.getAttribute("fid"))||(c=a.getAttributeNS("http://www.opengis.net/gml","id")||"");var d={},e;for(a=a.firstElementChild;a;a=a.nextElementSibling){var f=a.localName;if(0===a.childNodes.length||1===a.childNodes.length&&(3===a.firstChild.nodeType||4===a.firstChild.nodeType)){var g=kl(a,!1);Gm.test(g)&&(g=void 0);d[f]=g}else"boundedBy"!==f&&(e=f),d[f]=this.gf(a,b)}b=new H(d);e&&b.Tc(e);c&&b.jc(c);return b};
384
+k.fj=function(a,b){if(a=this.ff(a,b))return b=new C(null),b.ba("XYZ",a),b};k.dj=function(a,b){if(a=N([],this.Nj,a,b,this))return new Q(a)};k.cj=function(a,b){if(a=N([],this.Mj,a,b,this))return b=new P(null),Nl(b,a),b};k.ej=function(a,b){if(a=N([],this.Oj,a,b,this))return b=new R(null),Pl(b,a),b};k.Xi=function(a,b){Al(this.Rj,a,b,this)};k.Mh=function(a,b){Al(this.Kj,a,b,this)};k.Yi=function(a,b){Al(this.Sj,a,b,this)};k.hf=function(a,b){if(a=this.ff(a,b))return b=new O(null),b.ba("XYZ",a),b};
385
+k.wp=function(a,b){if(a=N(null,this.ke,a,b,this))return a};k.bj=function(a,b){if(a=this.ff(a,b))return b=new Jf(null),Kf(b,"XYZ",a),b};k.jf=function(a,b){if((a=N([null],this.zf,a,b,this))&&a[0]){b=new D(null);var c=a[0],d=[c.length],e;var f=1;for(e=a.length;f<e;++f)la(c,a[f]),d.push(c.length);b.ba("XYZ",c,d);return b}};k.ff=function(a,b){return N(null,this.ke,a,b,this)};k.Nj={"http://www.opengis.net/gml":{pointMember:rl(Fm.prototype.Xi),pointMembers:rl(Fm.prototype.Xi)}};
386
+k.Mj={"http://www.opengis.net/gml":{lineStringMember:rl(Fm.prototype.Mh),lineStringMembers:rl(Fm.prototype.Mh)}};k.Oj={"http://www.opengis.net/gml":{polygonMember:rl(Fm.prototype.Yi),polygonMembers:rl(Fm.prototype.Yi)}};k.Rj={"http://www.opengis.net/gml":{Point:rl(Fm.prototype.ff)}};k.Kj={"http://www.opengis.net/gml":{LineString:rl(Fm.prototype.hf)}};k.Sj={"http://www.opengis.net/gml":{Polygon:rl(Fm.prototype.jf)}};k.le={"http://www.opengis.net/gml":{LinearRing:sl(Fm.prototype.wp)}};
387
+k.aj=function(a,b){return(a=this.gf(a,[Fl(this,a,b?b:{})]))?a:null};k.zc=function(a,b){var c={featureType:this.featureType,featureNS:this.featureNS};b&&tb(c,Fl(this,a,b));return this.be(a,[c])||[]};k.kf=function(a){return Tb(this.srsName?this.srsName:a.firstElementChild.getAttribute("srsName"))};function Hm(a){a=kl(a,!1);return Im(a)}function Im(a){if(a=/^\s*(true|1)|(false|0)\s*$/.exec(a))return void 0!==a[1]||!1}function Jm(a){a=kl(a,!1);a=Date.parse(a);return isNaN(a)?void 0:a/1E3}function Km(a){a=kl(a,!1);return Lm(a)}function Lm(a){if(a=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(a))return parseFloat(a[1])}function Mm(a){a=kl(a,!1);return Nm(a)}function Nm(a){if(a=/^\s*(\d+)\s*$/.exec(a))return parseInt(a[1],10)}function S(a){return kl(a,!1).trim()}
388
+function Om(a,b){Pm(a,b?"1":"0")}function Qm(a,b){a.appendChild(il.createTextNode(b.toPrecision()))}function Rm(a,b){a.appendChild(il.createTextNode(b.toString()))}function Pm(a,b){a.appendChild(il.createTextNode(b))};function Sm(a){a=a?a:{};Fm.call(this,a);this.l=void 0!==a.surface?a.surface:!1;this.c=void 0!==a.curve?a.curve:!1;this.g=void 0!==a.multiCurve?a.multiCurve:!0;this.j=void 0!==a.multiSurface?a.multiSurface:!0;this.schemaLocation=a.schemaLocation?a.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd"}v(Sm,Fm);k=Sm.prototype;k.Ap=function(a,b){if(a=N([],this.Lj,a,b,this))return b=new P(null),Nl(b,a),b};
389
+k.Bp=function(a,b){if(a=N([],this.Pj,a,b,this))return b=new R(null),Pl(b,a),b};k.ph=function(a,b){Al(this.Hj,a,b,this)};k.Aj=function(a,b){Al(this.Uj,a,b,this)};k.Ep=function(a,b){return N([null],this.Qj,a,b,this)};k.Hp=function(a,b){return N([null],this.Tj,a,b,this)};k.Fp=function(a,b){return N([null],this.zf,a,b,this)};k.zp=function(a,b){return N([null],this.ke,a,b,this)};k.cm=function(a,b){(a=N(void 0,this.le,a,b,this))&&b[b.length-1].push(a)};
390
+k.yk=function(a,b){(a=N(void 0,this.le,a,b,this))&&(b[b.length-1][0]=a)};k.gj=function(a,b){if((a=N([null],this.Vj,a,b,this))&&a[0]){b=new D(null);var c=a[0],d=[c.length],e;var f=1;for(e=a.length;f<e;++f)la(c,a[f]),d.push(c.length);b.ba("XYZ",c,d);return b}};k.Zi=function(a,b){if(a=N([null],this.Ij,a,b,this))return b=new O(null),b.ba("XYZ",a),b};k.vp=function(a,b){a=N([null],this.Jj,a,b,this);return Xa(a[1][0],a[1][1],a[2][0],a[2][1])};
391
+k.xp=function(a,b){var c=kl(a,!1),d=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/;a=[];for(var e;e=d.exec(c);)a.push(parseFloat(e[1])),c=c.substr(e[0].length);if(""===c){b=b[0].srsName;c="enu";b&&(c=Tb(b).b);if("neu"===c)for(b=0,c=a.length;b<c;b+=3)d=a[b],a[b]=a[b+1],a[b+1]=d;b=a.length;2==b&&a.push(0);if(b)return a}};
392
+k.Bg=function(a,b){var c=kl(a,!1).replace(/^\s*|\s*$/g,""),d=b[0].srsName,e=a.parentNode.getAttribute("srsDimension");b="enu";d&&(b=Tb(d).b);c=c.split(/\s+/);d=2;a.getAttribute("srsDimension")?d=Nm(a.getAttribute("srsDimension")):a.getAttribute("dimension")?d=Nm(a.getAttribute("dimension")):e&&(d=Nm(e));for(var f,g=[],h=0,l=c.length;h<l;h+=d)a=parseFloat(c[h]),e=parseFloat(c[h+1]),f=3===d?parseFloat(c[h+2]):0,"en"===b.substr(0,2)?g.push(a,e,f):g.push(e,a,f);return g};
393
+k.ke={"http://www.opengis.net/gml":{pos:sl(Sm.prototype.xp),posList:sl(Sm.prototype.Bg)}};k.zf={"http://www.opengis.net/gml":{interior:Sm.prototype.cm,exterior:Sm.prototype.yk}};
394
+k.Zg={"http://www.opengis.net/gml":{Point:sl(Fm.prototype.fj),MultiPoint:sl(Fm.prototype.dj),LineString:sl(Fm.prototype.hf),MultiLineString:sl(Fm.prototype.cj),LinearRing:sl(Fm.prototype.bj),Polygon:sl(Fm.prototype.jf),MultiPolygon:sl(Fm.prototype.ej),Surface:sl(Sm.prototype.gj),MultiSurface:sl(Sm.prototype.Bp),Curve:sl(Sm.prototype.Zi),MultiCurve:sl(Sm.prototype.Ap),Envelope:sl(Sm.prototype.vp)}};k.Lj={"http://www.opengis.net/gml":{curveMember:rl(Sm.prototype.ph),curveMembers:rl(Sm.prototype.ph)}};
395
+k.Pj={"http://www.opengis.net/gml":{surfaceMember:rl(Sm.prototype.Aj),surfaceMembers:rl(Sm.prototype.Aj)}};k.Hj={"http://www.opengis.net/gml":{LineString:rl(Fm.prototype.hf),Curve:rl(Sm.prototype.Zi)}};k.Uj={"http://www.opengis.net/gml":{Polygon:rl(Fm.prototype.jf),Surface:rl(Sm.prototype.gj)}};k.Vj={"http://www.opengis.net/gml":{patches:sl(Sm.prototype.Ep)}};k.Ij={"http://www.opengis.net/gml":{segments:sl(Sm.prototype.Hp)}};k.Jj={"http://www.opengis.net/gml":{lowerCorner:rl(Sm.prototype.Bg),upperCorner:rl(Sm.prototype.Bg)}};
396
+k.Qj={"http://www.opengis.net/gml":{PolygonPatch:sl(Sm.prototype.Fp)}};k.Tj={"http://www.opengis.net/gml":{LineStringSegment:sl(Sm.prototype.zp)}};function Tm(a,b,c){var d=c[c.length-1];c=d.hasZ;d=d.srsName;b=b.X();for(var e=b.length,f=Array(e),g,h=0;h<e;++h){g=b[h];var l=h,m=c,n="enu";d&&(n=Tb(d).b);n="en"===n.substr(0,2)?g[0]+" "+g[1]:g[1]+" "+g[0];m&&(n+=" "+(g[2]||0));f[l]=n}Pm(a,f.join(" "))}
397
+k.ni=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);d=jl(a.namespaceURI,"pos");a.appendChild(d);c=c[c.length-1];a=c.hasZ;var e=c.srsName;c="enu";e&&(c=Tb(e).b);b=b.X();c="en"===c.substr(0,2)?b[0]+" "+b[1]:b[1]+" "+b[0];a&&(c+=" "+(b[2]||0));Pm(d,c)};var Um={"http://www.opengis.net/gml":{lowerCorner:J(Pm),upperCorner:J(Pm)}};k=Sm.prototype;
398
+k.jn=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);Bl({node:a},Um,yl,[b[0]+" "+b[1],b[2]+" "+b[3]],c,["lowerCorner","upperCorner"],this)};k.ki=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);d=jl(a.namespaceURI,"posList");a.appendChild(d);Tm(d,b,c)};k.hn=function(a,b){a=b[b.length-1];b=a.node;var c=a.exteriorWritten;void 0===c&&(a.exteriorWritten=!0);return jl(b.namespaceURI,void 0!==c?"interior":"exterior")};
399
+k.Se=function(a,b,c){var d=c[c.length-1],e=d.hasZ,d=d.srsName;"PolygonPatch"!==a.nodeName&&d&&a.setAttribute("srsName",d);"Polygon"===a.nodeName||"PolygonPatch"===a.nodeName?(b=b.Sd(),Bl({node:a,hasZ:e,srsName:d},Vm,this.hn,b,c,void 0,this)):"Surface"===a.nodeName&&(e=jl(a.namespaceURI,"patches"),a.appendChild(e),a=jl(e.namespaceURI,"PolygonPatch"),e.appendChild(a),this.Se(a,b,c))};
400
+k.Re=function(a,b,c){var d=c[c.length-1].srsName;"LineStringSegment"!==a.nodeName&&d&&a.setAttribute("srsName",d);"LineString"===a.nodeName||"LineStringSegment"===a.nodeName?(d=jl(a.namespaceURI,"posList"),a.appendChild(d),Tm(d,b,c)):"Curve"===a.nodeName&&(d=jl(a.namespaceURI,"segments"),a.appendChild(d),a=jl(d.namespaceURI,"LineStringSegment"),d.appendChild(a),this.Re(a,b,c))};
401
+k.mi=function(a,b,c){var d=c[c.length-1],e=d.hasZ,f=d.srsName,d=d.surface;f&&a.setAttribute("srsName",f);b=b.Td();Bl({node:a,hasZ:e,srsName:f,surface:d},Wm,this.o,b,c,void 0,this)};k.kn=function(a,b,c){var d=c[c.length-1],e=d.srsName,d=d.hasZ;e&&a.setAttribute("srsName",e);b=b.Zd();Bl({node:a,hasZ:d,srsName:e},Xm,wl("pointMember"),b,c,void 0,this)};
402
+k.li=function(a,b,c){var d=c[c.length-1],e=d.hasZ,f=d.srsName,d=d.curve;f&&a.setAttribute("srsName",f);b=b.gd();Bl({node:a,hasZ:e,srsName:f,curve:d},Ym,this.o,b,c,void 0,this)};k.oi=function(a,b,c){var d=jl(a.namespaceURI,"LinearRing");a.appendChild(d);this.ki(d,b,c)};k.pi=function(a,b,c){var d=this.a(b,c);d&&(a.appendChild(d),this.Se(d,b,c))};k.ln=function(a,b,c){var d=jl(a.namespaceURI,"Point");a.appendChild(d);this.ni(d,b,c)};
403
+k.ji=function(a,b,c){var d=this.a(b,c);d&&(a.appendChild(d),this.Re(d,b,c))};k.od=function(a,b,c){var d=c[c.length-1],e=tb({},d);e.node=a;var f;Array.isArray(b)?d.dataProjection?f=hc(b,d.featureProjection,d.dataProjection):f=b:f=Hl(b,!0,d);Bl(e,Zm,this.a,[f],c,void 0,this)};
404
+k.ii=function(a,b,c){var d=b.a;d&&a.setAttribute("fid",d);var d=c[c.length-1],e=d.featureNS,f=b.c;d.lb||(d.lb={},d.lb[e]={});var g=b.N();b=[];var h=[];for(m in g){var l=g[m];null!==l&&(b.push(m),h.push(l),m==f||l instanceof of?m in d.lb[e]||(d.lb[e][m]=J(this.od,this)):m in d.lb[e]||(d.lb[e][m]=J(Pm)))}var m=tb({},d);m.node=a;Bl(m,d.lb,wl(void 0,e),h,c,b)};
405
+var Wm={"http://www.opengis.net/gml":{surfaceMember:J(Sm.prototype.pi),polygonMember:J(Sm.prototype.pi)}},Xm={"http://www.opengis.net/gml":{pointMember:J(Sm.prototype.ln)}},Ym={"http://www.opengis.net/gml":{lineStringMember:J(Sm.prototype.ji),curveMember:J(Sm.prototype.ji)}},Vm={"http://www.opengis.net/gml":{exterior:J(Sm.prototype.oi),interior:J(Sm.prototype.oi)}},Zm={"http://www.opengis.net/gml":{Curve:J(Sm.prototype.Re),MultiCurve:J(Sm.prototype.li),Point:J(Sm.prototype.ni),MultiPoint:J(Sm.prototype.kn),
406
+LineString:J(Sm.prototype.Re),MultiLineString:J(Sm.prototype.li),LinearRing:J(Sm.prototype.ki),Polygon:J(Sm.prototype.Se),MultiPolygon:J(Sm.prototype.mi),Surface:J(Sm.prototype.Se),MultiSurface:J(Sm.prototype.mi),Envelope:J(Sm.prototype.jn)}},$m={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"};Sm.prototype.o=function(a,b){return jl("http://www.opengis.net/gml",$m[b[b.length-1].node.nodeName])};
407
+Sm.prototype.a=function(a,b){var c=b[b.length-1];b=c.multiSurface;var d=c.surface,e=c.curve,c=c.multiCurve;Array.isArray(a)?a="Envelope":(a=a.U(),"MultiPolygon"===a&&!0===b?a="MultiSurface":"Polygon"===a&&!0===d?a="Surface":"LineString"===a&&!0===e?a="Curve":"MultiLineString"===a&&!0===c&&(a="MultiCurve"));return jl("http://www.opengis.net/gml",a)};
408
+Sm.prototype.ie=function(a,b){b=Gl(this,b);var c=jl("http://www.opengis.net/gml","geom"),d={node:c,hasZ:this.hasZ,srsName:this.srsName,curve:this.c,surface:this.l,multiSurface:this.j,multiCurve:this.g};b&&tb(d,b);this.od(c,a,[d]);return c};
409
+Sm.prototype.Xb=function(a,b){b=Gl(this,b);var c=jl("http://www.opengis.net/gml","featureMembers");c.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",this.schemaLocation);var d={srsName:this.srsName,hasZ:this.hasZ,curve:this.c,surface:this.l,multiSurface:this.j,multiCurve:this.g,featureNS:this.featureNS,featureType:this.featureType};b&&tb(d,b);b=[d];var e=b[b.length-1],d=e.featureType,f=e.featureNS,g={};g[f]={};g[f][d]=J(this.ii,this);e=tb({},e);e.node=c;Bl(e,g,wl(d,
410
+f),a,b);return c};function an(a){a=a?a:{};Fm.call(this,a);this.b["http://www.opengis.net/gml"].featureMember=rl(Fm.prototype.be);this.schemaLocation=a.schemaLocation?a.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd"}v(an,Fm);k=an.prototype;
411
+k.$i=function(a,b){a=kl(a,!1).replace(/^\s*|\s*$/g,"");var c=b[0].srsName;b="enu";c&&(c=Tb(c))&&(b=c.b);a=a.trim().split(/\s+/);for(var d,e,f=[],g=0,h=a.length;g<h;g++)e=a[g].split(/,+/),c=parseFloat(e[0]),d=parseFloat(e[1]),e=3===e.length?parseFloat(e[2]):0,"en"===b.substr(0,2)?f.push(c,d,e):f.push(d,c,e);return f};k.tp=function(a,b){a=N([null],this.Gj,a,b,this);return Xa(a[1][0],a[1][1],a[1][3],a[1][4])};k.am=function(a,b){(a=N(void 0,this.le,a,b,this))&&b[b.length-1].push(a)};
412
+k.bp=function(a,b){(a=N(void 0,this.le,a,b,this))&&(b[b.length-1][0]=a)};k.ke={"http://www.opengis.net/gml":{coordinates:sl(an.prototype.$i)}};k.zf={"http://www.opengis.net/gml":{innerBoundaryIs:an.prototype.am,outerBoundaryIs:an.prototype.bp}};k.Gj={"http://www.opengis.net/gml":{coordinates:rl(an.prototype.$i)}};
413
+k.Zg={"http://www.opengis.net/gml":{Point:sl(Fm.prototype.fj),MultiPoint:sl(Fm.prototype.dj),LineString:sl(Fm.prototype.hf),MultiLineString:sl(Fm.prototype.cj),LinearRing:sl(Fm.prototype.bj),Polygon:sl(Fm.prototype.jf),MultiPolygon:sl(Fm.prototype.ej),Box:sl(an.prototype.tp)}};
414
+k.jg=function(a,b){var c=b[b.length-1];b=c.multiSurface;var d=c.surface,c=c.multiCurve;Array.isArray(a)?a="Envelope":(a=a.U(),"MultiPolygon"===a&&!0===b?a="MultiSurface":"Polygon"===a&&!0===d?a="Surface":"MultiLineString"===a&&!0===c&&(a="MultiCurve"));return jl("http://www.opengis.net/gml",a)};k.ai=function(a,b,c){var d=c[c.length-1],e=tb({},d);e.node=a;var f;Array.isArray(b)?d.dataProjection?f=hc(b,d.featureProjection,d.dataProjection):f=b:f=Hl(b,!0,d);Bl(e,bn,this.jg,[f],c,void 0,this)};
415
+k.Pe=function(a,b,c){var d=c[c.length-1].srsName;"LineStringSegment"!==a.nodeName&&d&&a.setAttribute("srsName",d);"LineString"===a.nodeName||"LineStringSegment"===a.nodeName?(d=cn(a.namespaceURI),a.appendChild(d),dn(d,b,c)):"Curve"===a.nodeName&&(d=jl(a.namespaceURI,"segments"),a.appendChild(d),a=jl(d.namespaceURI,"LineStringSegment"),d.appendChild(a),this.Pe(a,b,c))};function cn(a){a=jl(a,"coordinates");a.setAttribute("decimal",".");a.setAttribute("cs",",");a.setAttribute("ts"," ");return a}
416
+function dn(a,b,c){var d=c[c.length-1];c=d.hasZ;d=d.srsName;b=b.X();for(var e=b.length,f=Array(e),g,h=0;h<e;++h)g=b[h],f[h]=en(g,d,c);Pm(a,f.join(" "))}
417
+k.Qe=function(a,b,c){var d=c[c.length-1],e=d.hasZ,d=d.srsName;"PolygonPatch"!==a.nodeName&&d&&a.setAttribute("srsName",d);"Polygon"===a.nodeName||"PolygonPatch"===a.nodeName?(b=b.Sd(),Bl({node:a,hasZ:e,srsName:d},fn,this.dn,b,c,void 0,this)):"Surface"===a.nodeName&&(e=jl(a.namespaceURI,"patches"),a.appendChild(e),a=jl(e.namespaceURI,"PolygonPatch"),e.appendChild(a),this.Qe(a,b,c))};
418
+k.dn=function(a,b){a=b[b.length-1];b=a.node;var c=a.exteriorWritten;void 0===c&&(a.exteriorWritten=!0);return jl(b.namespaceURI,void 0!==c?"innerBoundaryIs":"outerBoundaryIs")};k.gi=function(a,b,c){var d=jl(a.namespaceURI,"LinearRing");a.appendChild(d);this.ci(d,b,c)};function en(a,b,c){var d="enu";b&&(d=Tb(b).b);b="en"===d.substr(0,2)?a[0]+","+a[1]:a[1]+","+a[0];c&&(b+=","+(a[2]||0));return b}
419
+k.di=function(a,b,c){var d=c[c.length-1],e=d.hasZ,f=d.srsName,d=d.curve;f&&a.setAttribute("srsName",f);b=b.gd();Bl({node:a,hasZ:e,srsName:f,curve:d},gn,this.a,b,c,void 0,this)};k.fi=function(a,b,c){var d=c[c.length-1];c=d.hasZ;var e=d.srsName;e&&a.setAttribute("srsName",e);d=cn(a.namespaceURI);a.appendChild(d);a=b.X();a=en(a,e,c);Pm(d,a)};
420
+k.fn=function(a,b,c){var d=c[c.length-1],e=d.hasZ;(d=d.srsName)&&a.setAttribute("srsName",d);b=b.Zd();Bl({node:a,hasZ:e,srsName:d},hn,wl("pointMember"),b,c,void 0,this)};k.gn=function(a,b,c){var d=jl(a.namespaceURI,"Point");a.appendChild(d);this.fi(d,b,c)};k.bi=function(a,b,c){var d=this.jg(b,c);d&&(a.appendChild(d),this.Pe(d,b,c))};k.ci=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);d=cn(a.namespaceURI);a.appendChild(d);dn(d,b,c)};
421
+k.ei=function(a,b,c){var d=c[c.length-1],e=d.hasZ,f=d.srsName,d=d.surface;f&&a.setAttribute("srsName",f);b=b.Td();Bl({node:a,hasZ:e,srsName:f,surface:d},jn,this.a,b,c,void 0,this)};k.hi=function(a,b,c){var d=this.jg(b,c);d&&(a.appendChild(d),this.Qe(d,b,c))};k.en=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);Bl({node:a},kn,yl,[b[0]+" "+b[1],b[2]+" "+b[3]],c,["lowerCorner","upperCorner"],this)};
422
+var bn={"http://www.opengis.net/gml":{Curve:J(an.prototype.Pe),MultiCurve:J(an.prototype.di),Point:J(an.prototype.fi),MultiPoint:J(an.prototype.fn),LineString:J(an.prototype.Pe),MultiLineString:J(an.prototype.di),LinearRing:J(an.prototype.ci),Polygon:J(an.prototype.Qe),MultiPolygon:J(an.prototype.ei),Surface:J(an.prototype.Qe),MultiSurface:J(an.prototype.ei),Envelope:J(an.prototype.en)}},fn={"http://www.opengis.net/gml":{outerBoundaryIs:J(an.prototype.gi),innerBoundaryIs:J(an.prototype.gi)}},hn={"http://www.opengis.net/gml":{pointMember:J(an.prototype.gn)}},
423
+gn={"http://www.opengis.net/gml":{lineStringMember:J(an.prototype.bi),curveMember:J(an.prototype.bi)}};an.prototype.a=function(a,b){return jl("http://www.opengis.net/gml",ln[b[b.length-1].node.nodeName])};var ln={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},jn={"http://www.opengis.net/gml":{surfaceMember:J(an.prototype.hi),polygonMember:J(an.prototype.hi)}},kn={"http://www.opengis.net/gml":{lowerCorner:J(Pm),upperCorner:J(Pm)}};function mn(a){a=a?a:{};Cm.call(this);this.defaultDataProjection=Tb("EPSG:4326");this.b=a.readExtensions}v(mn,Cm);var nn=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"];function on(a,b,c,d){a.push(parseFloat(c.getAttribute("lon")),parseFloat(c.getAttribute("lat")));"ele"in d?(a.push(d.ele),delete d.ele,b.hasZ=!0):a.push(0);"time"in d?(a.push(d.time),delete d.time,b.hasM=!0):a.push(0);return a}
424
+function pn(a,b,c){var d="XY",e=2;a.hasZ&&a.hasM?(d="XYZM",e=4):a.hasZ?(d="XYZ",e=3):a.hasM&&(d="XYM",e=3);if(4!==e){var f;var g=0;for(f=b.length/4;g<f;g++)b[g*e]=b[4*g],b[g*e+1]=b[4*g+1],a.hasZ&&(b[g*e+2]=b[4*g+2]),a.hasM&&(b[g*e+2]=b[4*g+3]);b.length=b.length/4*e;if(c)for(g=0,f=c.length;g<f;g++)c[g]=c[g]/4*e}return d}function qn(a,b){var c=b[b.length-1],d=a.getAttribute("href");null!==d&&(c.link=d);Al(rn,a,b)}function sn(a,b){b[b.length-1].extensionsNode_=a}
425
+function tn(a,b){var c=b[0];if(a=N({flatCoordinates:[],layoutOptions:{}},un,a,b)){b=a.flatCoordinates;delete a.flatCoordinates;var d=a.layoutOptions;delete a.layoutOptions;var d=pn(d,b),e=new O(null);e.ba(d,b);Hl(e,!1,c);c=new H(e);c.H(a);return c}}
426
+function vn(a,b){var c=b[0];if(a=N({flatCoordinates:[],ends:[],layoutOptions:{}},wn,a,b)){b=a.flatCoordinates;delete a.flatCoordinates;var d=a.ends;delete a.ends;var e=a.layoutOptions;delete a.layoutOptions;var e=pn(e,b,d),f=new P(null);f.ba(e,b,d);Hl(f,!1,c);c=new H(f);c.H(a);return c}}function xn(a,b){var c=b[0];if(b=N({},yn,a,b)){var d={};a=on([],d,a,b);d=pn(d,a);a=new C(a,d);Hl(a,!1,c);c=new H(a);c.H(b);return c}}
427
+var zn={rte:tn,trk:vn,wpt:xn},An=K(nn,{rte:rl(tn),trk:rl(vn),wpt:rl(xn)}),rn=K(nn,{text:I(S,"linkText"),type:I(S,"linkType")}),un=K(nn,{name:I(S),cmt:I(S),desc:I(S),src:I(S),link:qn,number:I(Mm),extensions:sn,type:I(S),rtept:function(a,b){var c=N({},Bn,a,b);c&&(b=b[b.length-1],on(b.flatCoordinates,b.layoutOptions,a,c))}}),Bn=K(nn,{ele:I(Km),time:I(Jm)}),wn=K(nn,{name:I(S),cmt:I(S),desc:I(S),src:I(S),link:qn,number:I(Mm),type:I(S),extensions:sn,trkseg:function(a,b){var c=b[b.length-1];Al(Cn,a,b);c.ends.push(c.flatCoordinates.length)}}),
428
+Cn=K(nn,{trkpt:function(a,b){var c=N({},Dn,a,b);c&&(b=b[b.length-1],on(b.flatCoordinates,b.layoutOptions,a,c))}}),Dn=K(nn,{ele:I(Km),time:I(Jm)}),yn=K(nn,{ele:I(Km),time:I(Jm),magvar:I(Km),geoidheight:I(Km),name:I(S),cmt:I(S),desc:I(S),src:I(S),link:qn,sym:I(S),type:I(S),fix:I(S),sat:I(Mm),hdop:I(Km),vdop:I(Km),pdop:I(Km),ageofdgpsdata:I(Km),dgpsid:I(Mm),extensions:sn});
429
+function En(a,b){b||(b=[]);for(var c=0,d=b.length;c<d;++c){var e=b[c];if(a.b){var f=e.get("extensionsNode_")||null;a.b(e,f)}e.set("extensionsNode_",void 0)}}mn.prototype.xg=function(a,b){if(!ja(nn,a.namespaceURI))return null;var c=zn[a.localName];if(!c)return null;a=c(a,[Fl(this,a,b)]);if(!a)return null;En(this,[a]);return a};mn.prototype.zc=function(a,b){return ja(nn,a.namespaceURI)?"gpx"==a.localName&&(a=N([],An,a,[Fl(this,a,b)]))?(En(this,a),a):[]:[]};
430
+function Fn(a,b,c){a.setAttribute("href",b);b=c[c.length-1].properties;Bl({node:a},Gn,yl,[b.linkText,b.linkType],c,Hn)}function In(a,b,c){var d=c[c.length-1],e=d.node.namespaceURI,f=d.properties;a.setAttributeNS(null,"lat",b[1]);a.setAttributeNS(null,"lon",b[0]);switch(d.geometryLayout){case "XYZM":b[3]&&(f.time=b[3]);case "XYZ":b[2]&&(f.ele=b[2]);break;case "XYM":b[2]&&(f.time=b[2])}b="rtept"==a.nodeName?Jn[e]:Kn[e];d=zl(f,b);Bl({node:a,properties:f},Ln,yl,d,c,b)}
431
+var Hn=["text","type"],Gn=K(nn,{text:J(Pm),type:J(Pm)}),Mn=K(nn,"name cmt desc src link number type rtept".split(" ")),Nn=K(nn,{name:J(Pm),cmt:J(Pm),desc:J(Pm),src:J(Pm),link:J(Fn),number:J(Rm),type:J(Pm),rtept:vl(J(In))}),Jn=K(nn,["ele","time"]),On=K(nn,"name cmt desc src link number type trkseg".split(" ")),Rn=K(nn,{name:J(Pm),cmt:J(Pm),desc:J(Pm),src:J(Pm),link:J(Fn),number:J(Rm),type:J(Pm),trkseg:vl(J(function(a,b,c){Bl({node:a,geometryLayout:b.ja,properties:{}},Pn,Qn,b.X(),c)}))}),Qn=wl("trkpt"),
432
+Pn=K(nn,{trkpt:J(In)}),Kn=K(nn,"ele time magvar geoidheight name cmt desc src link sym type fix sat hdop vdop pdop ageofdgpsdata dgpsid".split(" ")),Ln=K(nn,{ele:J(Qm),time:J(function(a,b){b=new Date(1E3*b);a.appendChild(il.createTextNode(b.getUTCFullYear()+"-"+Xe(b.getUTCMonth()+1)+"-"+Xe(b.getUTCDate())+"T"+Xe(b.getUTCHours())+":"+Xe(b.getUTCMinutes())+":"+Xe(b.getUTCSeconds())+"Z"))}),magvar:J(Qm),geoidheight:J(Qm),name:J(Pm),cmt:J(Pm),desc:J(Pm),src:J(Pm),link:J(Fn),sym:J(Pm),type:J(Pm),fix:J(Pm),
433
+sat:J(Rm),hdop:J(Qm),vdop:J(Qm),pdop:J(Qm),ageofdgpsdata:J(Qm),dgpsid:J(Rm)}),Sn={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function Tn(a,b){if(a=a.V())if(a=Sn[a.U()])return jl(b[b.length-1].node.namespaceURI,a)}
434
+var Un=K(nn,{rte:J(function(a,b,c){var d=c[0],e=b.N();a={node:a,properties:e};if(b=b.V())b=Hl(b,!0,d),a.geometryLayout=b.ja,e.rtept=b.X();d=Mn[c[c.length-1].node.namespaceURI];e=zl(e,d);Bl(a,Nn,yl,e,c,d)}),trk:J(function(a,b,c){var d=c[0],e=b.N();a={node:a,properties:e};if(b=b.V())b=Hl(b,!0,d),e.trkseg=b.gd();d=On[c[c.length-1].node.namespaceURI];e=zl(e,d);Bl(a,Rn,yl,e,c,d)}),wpt:J(function(a,b,c){var d=c[0],e=c[c.length-1];e.properties=b.N();if(b=b.V())b=Hl(b,!0,d),e.geometryLayout=b.ja,In(a,b.X(),
435
+c)})});mn.prototype.Xb=function(a,b){b=Gl(this,b);var c=jl("http://www.topografix.com/GPX/1/1","gpx");c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance");c.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation","http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd");c.setAttribute("version","1.1");c.setAttribute("creator","OpenLayers");Bl({node:c},Un,Tn,a,[b]);return c};function Vn(){El.call(this)}v(Vn,El);function Wn(a){return"string"===typeof a?a:""}k=Vn.prototype;k.U=function(){return"text"};k.Tb=function(a,b){return this.ae(Wn(a),Gl(this,b))};k.Oa=function(a,b){return this.zg(Wn(a),Gl(this,b))};k.Sc=function(a,b){return this.wd(Wn(a),Gl(this,b))};k.kb=function(){return this.defaultDataProjection};k.Bd=function(a,b){return this.ge(a,Gl(this,b))};k.Wb=function(a,b){return this.Wg(a,Gl(this,b))};k.$c=function(a,b){return this.Cd(a,Gl(this,b))};function Xn(a){a=a?a:{};El.call(this);this.defaultDataProjection=Tb("EPSG:4326");this.b=a.altitudeMode?a.altitudeMode:"none"}v(Xn,Vn);var Yn=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,Zn=/^H.([A-Z]{3}).*?:(.*)/,$n=/^HFDTE(\d{2})(\d{2})(\d{2})/,ao=/\r\n|\r|\n/;k=Xn.prototype;
436
+k.ae=function(a,b){var c=this.b,d=a.split(ao);a={};var e=[],f=2E3,g=0,h=1,l=-1,m;var n=0;for(m=d.length;n<m;++n){var p=d[n],q;if("B"==p.charAt(0)){if(q=Yn.exec(p)){var p=parseInt(q[1],10),r=parseInt(q[2],10),u=parseInt(q[3],10),x=parseInt(q[4],10)+parseInt(q[5],10)/6E4;"S"==q[6]&&(x=-x);var B=parseInt(q[7],10)+parseInt(q[8],10)/6E4;"W"==q[9]&&(B=-B);e.push(B,x);"none"!=c&&e.push("gps"==c?parseInt(q[11],10):"barometric"==c?parseInt(q[12],10):0);q=Date.UTC(f,g,h,p,r,u);q<l&&(q=Date.UTC(f,g,h+1,p,r,
437
+u));e.push(q/1E3);l=q}}else"H"==p.charAt(0)&&((q=$n.exec(p))?(h=parseInt(q[1],10),g=parseInt(q[2],10)-1,f=2E3+parseInt(q[3],10)):(q=Zn.exec(p))&&(a[q[1]]=q[2].trim()))}if(!e.length)return null;d=new O(null);d.ba("none"==c?"XYM":"XYZM",e);b=new H(Hl(d,!1,b));b.H(a);return b};k.zg=function(a,b){return(a=this.ae(a,b))?[a]:[]};k.ge=function(){};k.Wg=function(){};k.Cd=function(){};k.wd=function(){};function bo(a,b,c,d,e,f){Qc.call(this);this.j=null;this.M=a?a:new Image;null!==d&&(this.M.crossOrigin=d);this.c=f?document.createElement("CANVAS"):null;this.g=f;this.f=null;this.i=e;this.a=c;this.o=b;this.l=!1;2==this.i&&co(this)}v(bo,Qc);function co(a){var b=jd(1,1);try{b.drawImage(a.M,0,0),b.getImageData(0,0,1,1)}catch(c){a.l=!0}}bo.prototype.v=function(){this.i=3;this.f.forEach(Ec);this.f=null;this.b("change")};
438
+bo.prototype.u=function(){this.i=2;this.a&&(this.M.width=this.a[0],this.M.height=this.a[1]);this.a=[this.M.width,this.M.height];this.f.forEach(Ec);this.f=null;co(this);if(!this.l&&null!==this.g){this.c.width=this.M.width;this.c.height=this.M.height;var a=this.c.getContext("2d");a.drawImage(this.M,0,0);for(var b=a.getImageData(0,0,this.M.width,this.M.height),c=b.data,d=this.g[0]/255,e=this.g[1]/255,f=this.g[2]/255,g=0,h=c.length;g<h;g+=4)c[g]*=d,c[g+1]*=e,c[g+2]*=f;a.putImageData(b,0,0)}this.b("change")};
439
+bo.prototype.Y=function(){return this.c?this.c:this.M};bo.prototype.load=function(){if(0==this.i){this.i=1;this.f=[Jc(this.M,"error",this.v,this),Jc(this.M,"load",this.u,this)];try{this.M.src=this.o}catch(a){this.v()}}};function eo(a){a=a||{};this.o=void 0!==a.anchor?a.anchor:[.5,.5];this.u=null;this.i=void 0!==a.anchorOrigin?a.anchorOrigin:"top-left";this.C=void 0!==a.anchorXUnits?a.anchorXUnits:"fraction";this.B=void 0!==a.anchorYUnits?a.anchorYUnits:"fraction";this.ra=void 0!==a.crossOrigin?a.crossOrigin:null;var b=void 0!==a.img?a.img:null,c=void 0!==a.imgSize?a.imgSize:null,d=a.src;xa(!(void 0!==d&&b),4);xa(!b||b&&c,5);void 0!==d&&d.length||!b||(d=b.src||w(b).toString());xa(void 0!==d&&0<d.length,6);var e=void 0!==
440
+a.src?0:2;this.j=void 0!==a.color?ed(a.color):null;var f=this.ra,g=this.j,h=zh.get(d,f,g);h||(h=new bo(b,d,c,f,e,g),zh.set(d,f,g,h));this.b=h;this.oa=void 0!==a.offset?a.offset:[0,0];this.c=void 0!==a.offsetOrigin?a.offsetOrigin:"top-left";this.S=null;this.D=void 0!==a.size?a.size:null;Xk.call(this,{opacity:void 0!==a.opacity?a.opacity:1,rotation:void 0!==a.rotation?a.rotation:0,scale:void 0!==a.scale?a.scale:1,snapToPixel:void 0!==a.snapToPixel?a.snapToPixel:!0,rotateWithView:void 0!==a.rotateWithView?
441
+a.rotateWithView:!1})}v(eo,Xk);k=eo.prototype;
442
+k.clone=function(){var a=this.Y(1);if(2===this.b.i)if("IMG"===a.tagName.toUpperCase())var b=a.cloneNode(!0);else{b=document.createElement("canvas");var c=b.getContext("2d");b.width=a.width;b.height=a.height;c.drawImage(a,0,0)}return new eo({anchor:this.o.slice(),anchorOrigin:this.i,anchorXUnits:this.C,anchorYUnits:this.B,crossOrigin:this.ra,color:this.j&&this.j.slice?this.j.slice():this.j||void 0,img:b?b:void 0,imgSize:b?this.b.a.slice():void 0,src:b?void 0:this.b.o,offset:this.oa.slice(),offsetOrigin:this.c,
443
+size:null!==this.D?this.D.slice():void 0,opacity:this.f,scale:this.a,snapToPixel:this.v,rotation:this.g,rotateWithView:this.l})};
444
+k.Hc=function(){if(this.u)return this.u;var a=this.o,b=this.ic();if("fraction"==this.C||"fraction"==this.B){if(!b)return null;a=this.o.slice();"fraction"==this.C&&(a[0]*=b[0]);"fraction"==this.B&&(a[1]*=b[1])}if("top-left"!=this.i){if(!b)return null;a===this.o&&(a=this.o.slice());if("top-right"==this.i||"bottom-right"==this.i)a[0]=-a[0]+b[0];if("bottom-left"==this.i||"bottom-right"==this.i)a[1]=-a[1]+b[1]}return this.u=a};k.Lo=function(){return this.j};k.Y=function(a){return this.b.Y(a)};k.ye=function(){return this.b.a};
445
+k.Ye=function(){return this.b.i};k.qg=function(){var a=this.b;if(!a.j)if(a.l){var b=a.a[0],c=a.a[1],d=jd(b,c);d.fillRect(0,0,b,c);a.j=d.canvas}else a.j=a.M;return a.j};k.Oc=function(){if(this.S)return this.S;var a=this.oa;if("top-left"!=this.c){var b=this.ic(),c=this.b.a;if(!b||!c)return null;a=a.slice();if("top-right"==this.c||"bottom-right"==this.c)a[0]=c[0]-b[0]-a[0];if("bottom-left"==this.c||"bottom-right"==this.c)a[1]=c[1]-b[1]-a[1]}return this.S=a};k.Mo=function(){return this.b.o};
446
+k.ic=function(){return this.D?this.D:this.b.a};k.Nh=function(a,b){return y(this.b,"change",a,b)};k.load=function(){this.b.load()};k.Bj=function(a,b){Kc(this.b,"change",a,b)};function fo(a){a=a||{};this.a=a.font;this.f=a.rotation;this.o=a.rotateWithView;this.b=a.scale;this.Ia=a.text;this.g=a.textAlign;this.j=a.textBaseline;this.Va=void 0!==a.fill?a.fill:new al({color:"#333"});this.Ya=void 0!==a.stroke?a.stroke:null;this.i=void 0!==a.offsetX?a.offsetX:0;this.c=void 0!==a.offsetY?a.offsetY:0}k=fo.prototype;
447
+k.clone=function(){return new fo({font:this.a,rotation:this.f,rotateWithView:this.o,scale:this.b,text:this.Na(),textAlign:this.g,textBaseline:this.j,fill:this.Fa()?this.Fa().clone():void 0,stroke:this.Ga()?this.Ga().clone():void 0,offsetX:this.i,offsetY:this.c})};k.Nk=function(){return this.a};k.cl=function(){return this.i};k.dl=function(){return this.c};k.Fa=function(){return this.Va};k.Ro=function(){return this.o};k.So=function(){return this.f};k.To=function(){return this.b};k.Ga=function(){return this.Ya};
448
+k.Na=function(){return this.Ia};k.nl=function(){return this.g};k.ol=function(){return this.j};k.nj=function(a){this.a=a};k.sj=function(a){this.i=a};k.tj=function(a){this.c=a};k.pf=function(a){this.Va=a};k.Uo=function(a){this.f=a};k.Si=function(a){this.b=a};k.qf=function(a){this.Ya=a};k.xd=function(a){this.Ia=a};k.vj=function(a){this.g=a};k.hq=function(a){this.j=a};function go(a){a=a?a:{};Cm.call(this);ho||(io=[255,255,255,1],jo=new al({color:io}),ko=[20,2],lo=mo="pixels",no=[64,64],oo="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",po=.5,qo=new eo({anchor:ko,anchorOrigin:"bottom-left",anchorXUnits:mo,anchorYUnits:lo,crossOrigin:"anonymous",rotation:0,scale:po,size:no,src:oo}),ro="NO_IMAGE",so=new wj({color:io,width:1}),to=new wj({color:[51,51,51,1],width:2}),uo=new fo({font:"bold 16px Helvetica",fill:jo,stroke:to,scale:.8}),vo=new bl({fill:jo,
449
+image:qo,text:uo,stroke:so,zIndex:0}),ho=[vo]);this.defaultDataProjection=Tb("EPSG:4326");this.a=a.defaultStyle?a.defaultStyle:ho;this.c=void 0!==a.extractStyles?a.extractStyles:!0;this.j=void 0!==a.writeStyles?a.writeStyles:!0;this.b={};this.g=void 0!==a.showPointNames?a.showPointNames:!0}var ho,io,jo,ko,mo,lo,no,oo,po,qo,ro,so,to,uo,vo;v(go,Cm);
450
+var wo=["http://www.google.com/kml/ext/2.2"],xo=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],yo={fraction:"fraction",pixels:"pixels",insetPixels:"pixels"};
451
+function zo(a,b){var c=[0,0],d="start";if(a.Y()){var e=a.Y().ye();null===e&&(e=no);2==e.length&&(d=a.Y().a,c[0]=d*e[0]/2,c[1]=-d*e[1]/2,d="left")}null!==a.Na()?(e=a.Na(),a=e.clone(),a.nj(e.a||uo.a),a.Si(e.b||uo.b),a.pf(e.Fa()||uo.Fa()),a.qf(e.Ga()||to)):a=uo.clone();a.xd(b);a.sj(c[0]);a.tj(c[1]);a.vj(d);return new bl({text:a})}
452
+function Ao(a,b,c,d,e){return function(){var f=e,g="";f&&this.V()&&(f="Point"===this.V().U());f&&(g=this.get("name"),f=f&&g);if(a)return f?(f=zo(a[0],g),a.concat(f)):a;if(b){var h=Bo(b,c,d);return f?(f=zo(h[0],g),h.concat(f)):h}return f?(f=zo(c[0],g),c.concat(f)):c}}function Bo(a,b,c){return Array.isArray(a)?a:"string"===typeof a?(!(a in c)&&"#"+a in c&&(a="#"+a),Bo(c[a],b,c)):b}
453
+function Co(a){a=kl(a,!1);if(a=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(a))return a=a[1],[parseInt(a.substr(6,2),16),parseInt(a.substr(4,2),16),parseInt(a.substr(2,2),16),parseInt(a.substr(0,2),16)/255]}function Do(a){a=kl(a,!1);for(var b=[],c=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?))?\s*/i,d;d=c.exec(a);)b.push(parseFloat(d[1]),parseFloat(d[2]),d[3]?parseFloat(d[3]):0),a=a.substr(d[0].length);if(""===a)return b}
454
+function Eo(a){var b=kl(a,!1).trim();return a.baseURI&&"about:blank"!==a.baseURI?(new URL(b,a.baseURI)).href:b}function Fo(a){return Km(a)}function Go(a,b){return N(null,Ho,a,b)}function Io(a,b){if(b=N({A:[],Ej:[]},Jo,a,b)){a=b.A;b=b.Ej;var c;var d=0;for(c=Math.min(a.length,b.length);d<c;++d)a[4*d+3]=b[d];b=new O(null);b.ba("XYZM",a);return b}}function Ko(a,b){var c=N({},Lo,a,b);if(a=N(null,Mo,a,b))return b=new O(null),b.ba("XYZ",a),b.H(c),b}
455
+function No(a,b){var c=N({},Lo,a,b);if(a=N(null,Mo,a,b))return b=new D(null),b.ba("XYZ",a,[a.length]),b.H(c),b}
456
+function Oo(a,b){a=N([],Po,a,b);if(!a)return null;if(!a.length)return new tm(a);var c=!0,d=a[0].U(),e;var f=1;for(e=a.length;f<e;++f)if(b=a[f],b.U()!=d){c=!1;break}if(c)if("Point"==d){var g=a[0];c=g.ja;d=g.ga();f=1;for(e=a.length;f<e;++f)b=a[f],la(d,b.ga());g=new Q(null);g.ba(c,d);Qo(g,a)}else"LineString"==d?(g=new P(null),Nl(g,a),Qo(g,a)):"Polygon"==d?(g=new R(null),Pl(g,a),Qo(g,a)):"GeometryCollection"==d?g=new tm(a):xa(!1,37);else g=new tm(a);return g}
457
+function Ro(a,b){var c=N({},Lo,a,b);if(a=N(null,Mo,a,b))return b=new C(null),b.ba("XYZ",a),b.H(c),b}function So(a,b){var c=N({},Lo,a,b);if((a=N([null],To,a,b))&&a[0]){b=new D(null);var d=a[0],e=[d.length],f;var g=1;for(f=a.length;g<f;++g)la(d,a[g]),e.push(d.length);b.ba("XYZ",d,e);b.H(c);return b}}
458
+function Uo(a,b){b=N({},Vo,a,b);if(!b)return null;a="fillStyle"in b?b.fillStyle:jo;var c=b.fill;void 0===c||c||(a=null);c="imageStyle"in b?b.imageStyle:qo;c==ro&&(c=void 0);var d="textStyle"in b?b.textStyle:uo,e="strokeStyle"in b?b.strokeStyle:so;b=b.outline;void 0===b||b||(e=null);return[new bl({fill:a,image:c,stroke:e,text:d,zIndex:void 0})]}
459
+function Qo(a,b){var c=b.length,d=Array(b.length),e=Array(b.length),f,g;var h=g=!1;for(f=0;f<c;++f){var l=b[f];d[f]=l.get("extrude");e[f]=l.get("altitudeMode");h=h||void 0!==d[f];g=g||e[f]}h&&a.set("extrude",d);g&&a.set("altitudeMode",e)}function Wo(a,b){Al(Xo,a,b)}function Yo(a,b){Al(Zo,a,b)}
460
+var $o=K(xo,{displayName:I(S),value:I(S)}),Xo=K(xo,{Data:function(a,b){var c=a.getAttribute("name");Al($o,a,b);a=b[b.length-1];null!==c?a[c]=a.value:null!==a.displayName&&(a[a.displayName]=a.value)},SchemaData:function(a,b){Al(ap,a,b)}}),Zo=K(xo,{LatLonAltBox:function(a,b){if(a=N({},bp,a,b))b=b[b.length-1],b.extent=[parseFloat(a.west),parseFloat(a.south),parseFloat(a.east),parseFloat(a.north)],b.altitudeMode=a.altitudeMode,b.minAltitude=parseFloat(a.minAltitude),b.maxAltitude=parseFloat(a.maxAltitude)},
461
+Lod:function(a,b){if(a=N({},cp,a,b))b=b[b.length-1],b.minLodPixels=parseFloat(a.minLodPixels),b.maxLodPixels=parseFloat(a.maxLodPixels),b.minFadeExtent=parseFloat(a.minFadeExtent),b.maxFadeExtent=parseFloat(a.maxFadeExtent)}}),bp=K(xo,{altitudeMode:I(S),minAltitude:I(Km),maxAltitude:I(Km),north:I(Km),south:I(Km),east:I(Km),west:I(Km)}),cp=K(xo,{minLodPixels:I(Km),maxLodPixels:I(Km),minFadeExtent:I(Km),maxFadeExtent:I(Km)}),Lo=K(xo,{extrude:I(Hm),altitudeMode:I(S)}),Ho=K(xo,{coordinates:sl(Do)}),To=
462
+K(xo,{innerBoundaryIs:function(a,b){(a=N(void 0,dp,a,b))&&b[b.length-1].push(a)},outerBoundaryIs:function(a,b){(a=N(void 0,ep,a,b))&&(b[b.length-1][0]=a)}}),Jo=K(xo,{when:function(a,b){b=b[b.length-1].Ej;a=kl(a,!1);a=Date.parse(a);b.push(isNaN(a)?0:a)}},K(wo,{coord:function(a,b){b=b[b.length-1].A;a=kl(a,!1);(a=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(a))?b.push(parseFloat(a[1]),parseFloat(a[2]),parseFloat(a[3]),
463
+0):b.push(0,0,0,0)}})),Mo=K(xo,{coordinates:sl(Do)}),fp=K(xo,{href:I(Eo)},K(wo,{x:I(Km),y:I(Km),w:I(Km),h:I(Km)})),gp=K(xo,{Icon:I(function(a,b){return(a=N({},fp,a,b))?a:null}),heading:I(Km),hotSpot:I(function(a){var b=a.getAttribute("xunits"),c=a.getAttribute("yunits");var d="insetPixels"!==b?"insetPixels"!==c?"bottom-left":"top-left":"insetPixels"!==c?"bottom-right":"top-right";return{x:parseFloat(a.getAttribute("x")),Xg:yo[b],y:parseFloat(a.getAttribute("y")),Yg:yo[c],origin:d}}),scale:I(Fo)}),
464
+dp=K(xo,{LinearRing:sl(Go)}),hp=K(xo,{color:I(Co),scale:I(Fo)}),ip=K(xo,{color:I(Co),width:I(Km)}),Po=K(xo,{LineString:rl(Ko),LinearRing:rl(No),MultiGeometry:rl(Oo),Point:rl(Ro),Polygon:rl(So)}),jp=K(wo,{Track:rl(Io)}),lp=K(xo,{ExtendedData:Wo,Region:Yo,Link:function(a,b){Al(kp,a,b)},address:I(S),description:I(S),name:I(S),open:I(Hm),phoneNumber:I(S),visibility:I(Hm)}),kp=K(xo,{href:I(Eo)}),ep=K(xo,{LinearRing:sl(Go)}),mp=K(xo,{Style:I(Uo),key:I(S),styleUrl:I(Eo)}),op=K(xo,{ExtendedData:Wo,Region:Yo,
465
+MultiGeometry:I(Oo,"geometry"),LineString:I(Ko,"geometry"),LinearRing:I(No,"geometry"),Point:I(Ro,"geometry"),Polygon:I(So,"geometry"),Style:I(Uo),StyleMap:function(a,b){if(a=N(void 0,np,a,b))b=b[b.length-1],Array.isArray(a)?b.Style=a:"string"===typeof a?b.styleUrl=a:xa(!1,38)},address:I(S),description:I(S),name:I(S),open:I(Hm),phoneNumber:I(S),styleUrl:I(Eo),visibility:I(Hm)},K(wo,{MultiTrack:I(function(a,b){if(a=N([],jp,a,b))return b=new P(null),Nl(b,a),b},"geometry"),Track:I(Io,"geometry")})),
466
+pp=K(xo,{color:I(Co),fill:I(Hm),outline:I(Hm)}),ap=K(xo,{SimpleData:function(a,b){var c=a.getAttribute("name");null!==c&&(a=S(a),b[b.length-1][c]=a)}}),Vo=K(xo,{IconStyle:function(a,b){if(a=N({},gp,a,b)){b=b[b.length-1];var c="Icon"in a?a.Icon:{},d=!("Icon"in a)||0<Object.keys(c).length,e,f=c.href;f?e=f:d&&(e=oo);var f="bottom-left",g=a.hotSpot;if(g){var h=[g.x,g.y];var l=g.Xg;var m=g.Yg;f=g.origin}else e===oo?(h=ko,l=mo,m=lo):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(e)&&(h=[.5,0],m=l="fraction");
467
+var n,g=c.x,p=c.y;void 0!==g&&void 0!==p&&(n=[g,p]);var q,g=c.w,c=c.h;void 0!==g&&void 0!==c&&(q=[g,c]);var r,c=a.heading;void 0!==c&&(r=Ha(c));a=a.scale;d?(e==oo&&(q=no,void 0===a&&(a=po)),e=new eo({anchor:h,anchorOrigin:f,anchorXUnits:l,anchorYUnits:m,crossOrigin:"anonymous",offset:n,offsetOrigin:"bottom-left",rotation:r,scale:a,size:q,src:e}),b.imageStyle=e):b.imageStyle=ro}},LabelStyle:function(a,b){(a=N({},hp,a,b))&&(b[b.length-1].textStyle=new fo({fill:new al({color:"color"in a?a.color:io}),
468
+scale:a.scale}))},LineStyle:function(a,b){(a=N({},ip,a,b))&&(b[b.length-1].strokeStyle=new wj({color:"color"in a?a.color:io,width:"width"in a?a.width:1}))},PolyStyle:function(a,b){if(a=N({},pp,a,b)){b=b[b.length-1];b.fillStyle=new al({color:"color"in a?a.color:io});var c=a.fill;void 0!==c&&(b.fill=c);a=a.outline;void 0!==a&&(b.outline=a)}}}),np=K(xo,{Pair:function(a,b){if(a=N({},mp,a,b)){var c=a.key;c&&"normal"==c&&((c=a.styleUrl)&&(b[b.length-1]=c),(a=a.Style)&&(b[b.length-1]=a))}}});k=go.prototype;
469
+k.vg=function(a,b){var c=K(xo,{Document:ql(this.vg,this),Folder:ql(this.vg,this),Placemark:rl(this.Dg,this),Style:this.Jp.bind(this),StyleMap:this.Ip.bind(this)});if(a=N([],c,a,b,this))return a};k.Dg=function(a,b){var c=N({geometry:null},op,a,b);if(c){var d=new H;a=a.getAttribute("id");null!==a&&d.jc(a);b=b[0];(a=c.geometry)&&Hl(a,!1,b);d.Ra(a);delete c.geometry;this.c&&d.hg(Ao(c.Style,c.styleUrl,this.a,this.b,this.g));delete c.Style;d.H(c);return d}};
470
+k.Jp=function(a,b){var c=a.getAttribute("id");null!==c&&(b=Uo(a,b))&&(a=a.baseURI&&"about:blank"!==a.baseURI?(new URL("#"+c,a.baseURI)).href:"#"+c,this.b[a]=b)};k.Ip=function(a,b){var c=a.getAttribute("id");null!==c&&(b=N(void 0,np,a,b))&&(a=a.baseURI&&"about:blank"!==a.baseURI?(new URL("#"+c,a.baseURI)).href:"#"+c,this.b[a]=b)};k.xg=function(a,b){return ja(xo,a.namespaceURI)?(a=this.Dg(a,[Fl(this,a,b)]))?a:null:null};
471
+k.zc=function(a,b){if(!ja(xo,a.namespaceURI))return[];var c=a.localName;if("Document"==c||"Folder"==c)return(c=this.vg(a,[Fl(this,a,b)]))?c:[];if("Placemark"==c)return(b=this.Dg(a,[Fl(this,a,b)]))?[b]:[];if("kml"==c){c=[];for(a=a.firstElementChild;a;a=a.nextElementSibling){var d=this.zc(a,b);d&&la(c,d)}return c}return[]};k.Cp=function(a){if(ml(a))return qp(this,a);if(nl(a))return rp(this,a);if("string"===typeof a)return a=pl(a),qp(this,a)};
472
+function qp(a,b){for(b=b.firstChild;b;b=b.nextSibling)if(b.nodeType==Node.ELEMENT_NODE){var c=rp(a,b);if(c)return c}}function rp(a,b){var c;for(c=b.firstElementChild;c;c=c.nextElementSibling)if(ja(xo,c.namespaceURI)&&"name"==c.localName)return S(c);for(c=b.firstElementChild;c;c=c.nextElementSibling)if(b=c.localName,ja(xo,c.namespaceURI)&&("Document"==b||"Folder"==b||"Placemark"==b||"kml"==b)&&(b=rp(a,c)))return b}
473
+k.Dp=function(a){var b=[];ml(a)?la(b,sp(this,a)):nl(a)?la(b,tp(this,a)):"string"===typeof a&&(a=pl(a),la(b,sp(this,a)));return b};function sp(a,b){var c=[];for(b=b.firstChild;b;b=b.nextSibling)b.nodeType==Node.ELEMENT_NODE&&la(c,tp(a,b));return c}
474
+function tp(a,b){var c,d=[];for(c=b.firstElementChild;c;c=c.nextElementSibling)if(ja(xo,c.namespaceURI)&&"NetworkLink"==c.localName){var e=N({},lp,c,[]);d.push(e)}for(c=b.firstElementChild;c;c=c.nextElementSibling)b=c.localName,!ja(xo,c.namespaceURI)||"Document"!=b&&"Folder"!=b&&"kml"!=b||la(d,tp(a,c));return d}k.Gp=function(a){var b=[];ml(a)?la(b,up(this,a)):nl(a)?la(b,this.lf(a)):"string"===typeof a&&(a=pl(a),la(b,up(this,a)));return b};
475
+function up(a,b){var c=[];for(b=b.firstChild;b;b=b.nextSibling)b.nodeType==Node.ELEMENT_NODE&&la(c,a.lf(b));return c}k.lf=function(a){var b,c=[];for(b=a.firstElementChild;b;b=b.nextElementSibling)if(ja(xo,b.namespaceURI)&&"Region"==b.localName){var d=N({},Zo,b,[]);c.push(d)}for(b=a.firstElementChild;b;b=b.nextElementSibling)a=b.localName,!ja(xo,b.namespaceURI)||"Document"!=a&&"Folder"!=a&&"kml"!=a||la(c,this.lf(b));return c};
476
+function vp(a,b){b=ed(b);b=[255*(4==b.length?b[3]:1),b[2],b[1],b[0]];var c;for(c=0;4>c;++c){var d=parseInt(b[c],10).toString(16);b[c]=1==d.length?"0"+d:d}Pm(a,b.join(""))}function wp(a,b,c){a={node:a};var d=b.U();if("GeometryCollection"==d){var e=b.Vf();var f=xp}else"MultiPoint"==d?(e=b.Zd(),f=yp):"MultiLineString"==d?(e=b.gd(),f=zp):"MultiPolygon"==d?(e=b.Td(),f=Ap):xa(!1,39);Bl(a,Bp,f,e,c)}function Cp(a,b,c){Bl({node:a},Dp,Ep,[b],c)}
477
+function Fp(a,b,c){var d={node:a};b.a&&a.setAttribute("id",b.a);a=b.N();var e={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};e[b.c]=1;var f=Object.keys(a||{}).sort().filter(function(a){return!e[a]});if(0<f.length){var g=zl(a,f);Bl(d,Gp,Hp,[{names:f,values:g}],c)}if(f=b.Lc())if(f=f.call(b,0))f=Array.isArray(f)?f[0]:f,this.j&&(a.Style=f),(f=f.Na())&&(a.name=f.Na());f=Ip[c[c.length-1].node.namespaceURI];a=zl(a,f);Bl(d,Gp,yl,a,c,f);a=c[0];(b=b.V())&&(b=Hl(b,!0,a));Bl(d,
478
+Gp,xp,[b],c)}function Jp(a,b,c){var d=b.ga();a={node:a};a.layout=b.ja;a.stride=b.qa();Bl(a,Kp,Lp,[d],c)}function Mp(a,b,c){b=b.Sd();var d=b.shift();a={node:a};Bl(a,Np,Op,b,c);Bl(a,Np,Pp,[d],c)}function Qp(a,b){Qm(a,Math.round(1E6*b)/1E6)}
479
+var Rp=K(xo,["Document","Placemark"]),Up=K(xo,{Document:J(function(a,b,c){Bl({node:a},Sp,Tp,b,c,void 0,this)}),Placemark:J(Fp)}),Sp=K(xo,{Placemark:J(Fp)}),Vp=K(xo,{Data:J(function(a,b,c){a.setAttribute("name",b.name);a={node:a};b=b.value;"object"==typeof b?(null!==b&&b.displayName&&Bl(a,Vp,yl,[b.displayName],c,["displayName"]),null!==b&&b.value&&Bl(a,Vp,yl,[b.value],c,["value"])):Bl(a,Vp,yl,[b],c,["value"])}),value:J(function(a,b){Pm(a,b)}),displayName:J(function(a,b){a.appendChild(il.createCDATASection(b))})}),
480
+Wp={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},Xp=K(xo,["href"],K(wo,["x","y","w","h"])),Yp=K(xo,{href:J(Pm)},K(wo,{x:J(Qm),y:J(Qm),w:J(Qm),h:J(Qm)})),Zp=K(xo,["scale","heading","Icon","hotSpot"]),aq=K(xo,{Icon:J(function(a,b,c){a={node:a};var d=Xp[c[c.length-1].node.namespaceURI],e=zl(b,d);Bl(a,Yp,yl,e,c,d);d=Xp[wo[0]];e=zl(b,d);Bl(a,Yp,
481
+$p,e,c,d)}),heading:J(Qm),hotSpot:J(function(a,b){a.setAttribute("x",b.x);a.setAttribute("y",b.y);a.setAttribute("xunits",b.Xg);a.setAttribute("yunits",b.Yg)}),scale:J(Qp)}),bq=K(xo,["color","scale"]),cq=K(xo,{color:J(vp),scale:J(Qp)}),dq=K(xo,["color","width"]),eq=K(xo,{color:J(vp),width:J(Qm)}),Dp=K(xo,{LinearRing:J(Jp)}),Bp=K(xo,{LineString:J(Jp),Point:J(Jp),Polygon:J(Mp),GeometryCollection:J(wp)}),Ip=K(xo,"name open visibility address phoneNumber description styleUrl Style".split(" ")),Gp=K(xo,
482
+{ExtendedData:J(function(a,b,c){a={node:a};var d=b.names;b=b.values;for(var e=d.length,f=0;f<e;f++)Bl(a,Vp,fq,[{name:d[f],value:b[f]}],c)}),MultiGeometry:J(wp),LineString:J(Jp),LinearRing:J(Jp),Point:J(Jp),Polygon:J(Mp),Style:J(function(a,b,c){a={node:a};var d={},e=b.Fa(),f=b.Ga(),g=b.Y();b=b.Na();g instanceof eo&&(d.IconStyle=g);b&&(d.LabelStyle=b);f&&(d.LineStyle=f);e&&(d.PolyStyle=e);b=gq[c[c.length-1].node.namespaceURI];d=zl(d,b);Bl(a,hq,yl,d,c,b)}),address:J(Pm),description:J(Pm),name:J(Pm),
483
+open:J(Om),phoneNumber:J(Pm),styleUrl:J(Pm),visibility:J(Om)}),Kp=K(xo,{coordinates:J(function(a,b,c){c=c[c.length-1];var d=c.layout;c=c.stride;var e;"XY"==d||"XYM"==d?e=2:"XYZ"==d||"XYZM"==d?e=3:xa(!1,34);var f,g=b.length,h="";if(0<g){h+=b[0];for(d=1;d<e;++d)h+=","+b[d];for(f=c;f<g;f+=c)for(h+=" "+b[f],d=1;d<e;++d)h+=","+b[f+d]}Pm(a,h)})}),Np=K(xo,{outerBoundaryIs:J(Cp),innerBoundaryIs:J(Cp)}),iq=K(xo,{color:J(vp)}),gq=K(xo,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),hq=K(xo,{IconStyle:J(function(a,
484
+b,c){a={node:a};var d={},e=b.ic(),f=b.ye(),g={href:b.b.o};if(e){g.w=e[0];g.h=e[1];var h=b.Hc(),l=b.Oc();l&&f&&l[0]&&l[1]!==e[1]&&(g.x=l[0],g.y=f[1]-(l[1]+e[1]));h&&h[0]&&h[1]!==e[1]&&(d.hotSpot={x:h[0],Xg:"pixels",y:e[1]-h[1],Yg:"pixels"})}d.Icon=g;e=b.a;1!==e&&(d.scale=e);(b=b.g)&&(d.heading=b);b=Zp[c[c.length-1].node.namespaceURI];d=zl(d,b);Bl(a,aq,yl,d,c,b)}),LabelStyle:J(function(a,b,c){a={node:a};var d={},e=b.Fa();e&&(d.color=e.b);(b=b.b)&&1!==b&&(d.scale=b);b=bq[c[c.length-1].node.namespaceURI];
485
+d=zl(d,b);Bl(a,cq,yl,d,c,b)}),LineStyle:J(function(a,b,c){a={node:a};var d=dq[c[c.length-1].node.namespaceURI];b=zl({color:b.a,width:b.c},d);Bl(a,eq,yl,b,c,d)}),PolyStyle:J(function(a,b,c){Bl({node:a},iq,jq,[b.b],c)})});function $p(a,b,c){return jl(wo[0],"gx:"+c)}function Tp(a,b){return jl(b[b.length-1].node.namespaceURI,"Placemark")}function xp(a,b){if(a)return jl(b[b.length-1].node.namespaceURI,Wp[a.U()])}
486
+var jq=wl("color"),Lp=wl("coordinates"),fq=wl("Data"),Hp=wl("ExtendedData"),Op=wl("innerBoundaryIs"),yp=wl("Point"),zp=wl("LineString"),Ep=wl("LinearRing"),Ap=wl("Polygon"),Pp=wl("outerBoundaryIs");
487
+go.prototype.Xb=function(a,b){b=Gl(this,b);var c=jl(xo[4],"kml");c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:gx",wo[0]);c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance");c.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var d={node:c},e={};1<a.length?e.Document=a:1==a.length&&(e.Placemark=a[0]);a=Rp[c.namespaceURI];
488
+e=zl(e,a);Bl(d,Up,yl,e,[b],a,this);return c};Fj.Dd=function(){};
489
+(function(a){function b(a){this.lc=ArrayBuffer.isView&&ArrayBuffer.isView(a)?a:new Uint8Array(a||0);this.type=this.ea=0;this.length=this.lc.length}function c(a,b,c){var e=c.lc;var f=e[c.ea++];var g=(f&112)>>4;if(128>f)return d(a,g,b);f=e[c.ea++];g|=(f&127)<<3;if(128>f)return d(a,g,b);f=e[c.ea++];g|=(f&127)<<10;if(128>f)return d(a,g,b);f=e[c.ea++];g|=(f&127)<<17;if(128>f)return d(a,g,b);f=e[c.ea++];g|=(f&127)<<24;if(128>f)return d(a,g,b);f=e[c.ea++];if(128>f)return d(a,g|(f&1)<<31,b);throw Error("Expected varint not more than 10 bytes");
490
+}function d(a,b,c){return c?4294967296*b+(a>>>0):4294967296*(b>>>0)+(a>>>0)}var e={read:function(a,b,c,d,e){var f=8*e-d-1;var g=(1<<f)-1,h=g>>1,l=-7;e=c?e-1:0;var m=c?-1:1,x=a[b+e];e+=m;c=x&(1<<-l)-1;x>>=-l;for(l+=f;0<l;c=256*c+a[b+e],e+=m,l-=8);f=c&(1<<-l)-1;c>>=-l;for(l+=d;0<l;f=256*f+a[b+e],e+=m,l-=8);if(0===c)c=1-h;else{if(c===g)return f?NaN:Infinity*(x?-1:1);f+=Math.pow(2,d);c-=h}return(x?-1:1)*f*Math.pow(2,c-d)},write:function(a,b,c,d,e,n){var f,g=8*n-e-1,h=(1<<g)-1,l=h>>1,m=23===e?Math.pow(2,
491
+-24)-Math.pow(2,-77):0;n=d?0:n-1;var B=d?1:-1,E=0>b||0===b&&0>1/b?1:0;b=Math.abs(b);isNaN(b)||Infinity===b?(b=isNaN(b)?1:0,d=h):(d=Math.floor(Math.log(b)/Math.LN2),1>b*(f=Math.pow(2,-d))&&(d--,f*=2),b=1<=d+l?b+m/f:b+m*Math.pow(2,1-l),2<=b*f&&(d++,f/=2),d+l>=h?(b=0,d=h):1<=d+l?(b=(b*f-1)*Math.pow(2,e),d+=l):(b=b*Math.pow(2,l-1)*Math.pow(2,e),d=0));for(;8<=e;a[c+n]=b&255,n+=B,b/=256,e-=8);d=d<<e|b;for(g+=e;0<g;a[c+n]=d&255,n+=B,d/=256,g-=8);a[c+n-B]|=128*E}};b.c=0;b.i=1;b.b=2;b.a=5;b.prototype={Ag:function(a,
492
+b,c){for(c=c||this.length;this.ea<c;){var d=this.Ka(),e=d>>3,f=this.ea;this.type=d&7;a(e,b,this);this.ea===f&&this.mq(d)}return b},yp:function(){var a=e.read(this.lc,this.ea,!0,23,4);this.ea+=4;return a},up:function(){var a=e.read(this.lc,this.ea,!0,52,8);this.ea+=8;return a},Ka:function(a){var b=this.lc;var d=b[this.ea++];var e=d&127;if(128>d)return e;d=b[this.ea++];e|=(d&127)<<7;if(128>d)return e;d=b[this.ea++];e|=(d&127)<<14;if(128>d)return e;d=b[this.ea++];e|=(d&127)<<21;if(128>d)return e;d=b[this.ea];
493
+return c(e|(d&15)<<28,a,this)},Kp:function(){return this.Ka(!0)},ce:function(){var a=this.Ka();return 1===a%2?(a+1)/-2:a/2},sp:function(){return!!this.Ka()},Gg:function(){for(var a=this.Ka()+this.ea,b=this.lc,c="",d=this.ea;d<a;){var e=b[d],n=null,p=239<e?4:223<e?3:191<e?2:1;if(d+p>a)break;if(1===p)128>e&&(n=e);else if(2===p){var q=b[d+1];128===(q&192)&&(n=(e&31)<<6|q&63,127>=n&&(n=null))}else if(3===p){q=b[d+1];var r=b[d+2];128===(q&192)&&128===(r&192)&&(n=(e&15)<<12|(q&63)<<6|r&63,2047>=n||55296<=
494
+n&&57343>=n)&&(n=null)}else if(4===p){q=b[d+1];r=b[d+2];var u=b[d+3];128===(q&192)&&128===(r&192)&&128===(u&192)&&(n=(e&15)<<18|(q&63)<<12|(r&63)<<6|u&63,65535>=n||1114112<=n)&&(n=null)}null===n?(n=65533,p=1):65535<n&&(n-=65536,c+=String.fromCharCode(n>>>10&1023|55296),n=56320|n&1023);c+=String.fromCharCode(n);d+=p}this.ea=a;return c},mq:function(a){a&=7;if(a===b.c)for(;127<this.lc[this.ea++];);else if(a===b.b)this.ea=this.Ka()+this.ea;else if(a===b.a)this.ea+=4;else if(a===b.i)this.ea+=8;else throw Error("Unimplemented type: "+
495
+a);}};a["default"]=b})(Fj.Dd=Fj.Dd||{});Fj.Dd=Fj.Dd.default;Fj.xf={};Fj.xf.Bf=function(){};
496
+(function(a){function b(a,b){this.layers=a.Ag(l,{},b)}function c(a,b){this.x=a;this.y=b}function d(a,b,c,d,f){this.properties={};this.extent=c;this.type=0;this.Cc=a;this.Ef=-1;this.ne=d;this.pe=f;a.Ag(e,this,b)}function e(a,b,c){if(1==a)b.id=c.Ka();else if(2==a)for(a=c.Ka()+c.ea;c.ea<a;){var d=b.ne[c.Ka()],e=b.pe[c.Ka()];b.properties[d]=e}else 3==a?b.type=c.Ka():4==a&&(b.Ef=c.ea)}function f(a,b){this.version=1;this.name=null;this.extent=4096;this.length=0;this.Cc=a;this.ne=[];this.pe=[];this.me=[];
497
+a.Ag(g,this,b);this.length=this.me.length}function g(a,b,c){15===a?b.version=c.Ka():1===a?b.name=c.Gg():5===a?b.extent=c.Ka():2===a?b.me.push(c.ea):3===a?b.ne.push(c.Gg()):4===a&&b.pe.push(h(c))}function h(a){for(var b=null,c=a.Ka()+a.ea;a.ea<c;)b=a.Ka()>>3,b=1===b?a.Gg():2===b?a.yp():3===b?a.up():4===b?a.Kp():5===b?a.Ka():6===b?a.ce():7===b?a.sp():null;return b}function l(a,b,c){3===a&&(a=new m(c,c.Ka()+c.ea),a.length&&(b[a.name]=a))}c.prototype={clone:function(){return new c(this.x,this.y)},add:function(a){return this.clone().Yj(a)},
498
+rotate:function(a){return this.clone().hk(a)},round:function(){return this.clone().ik()},angle:function(){return Math.atan2(this.y,this.x)},Yj:function(a){this.x+=a.x;this.y+=a.y;return this},hk:function(a){var b=Math.cos(a);a=Math.sin(a);var c=a*this.x+b*this.y;this.x=b*this.x-a*this.y;this.y=c;return this},ik:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this}};c.Kq=function(a){return a instanceof c?a:Array.isArray(a)?new c(a[0],a[1]):a};d.b=["Unknown","Point","LineString",
499
+"Polygon"];d.prototype.Oh=function(){var a=this.Cc;a.ea=this.Ef;for(var b=a.Ka()+a.ea,d=1,e=0,f=0,g=0,h=[],l;a.ea<b;)if(e||(e=a.Ka(),d=e&7,e>>=3),e--,1===d||2===d)f+=a.ce(),g+=a.ce(),1===d&&(l&&h.push(l),l=[]),l.push(new c(f,g));else if(7===d)l&&l.push(l[0].clone());else throw Error("unknown command "+d);l&&h.push(l);return h};d.prototype.bbox=function(){var a=this.Cc;a.ea=this.Ef;for(var b=a.Ka()+a.ea,c=1,d=0,e=0,f=0,g=Infinity,h=-Infinity,l=Infinity,m=-Infinity;a.ea<b;)if(d||(d=a.Ka(),c=d&7,d>>=
500
+3),d--,1===c||2===c)e+=a.ce(),f+=a.ce(),e<g&&(g=e),e>h&&(h=e),f<l&&(l=f),f>m&&(m=f);else if(7!==c)throw Error("unknown command "+c);return[g,l,h,m]};var m=f;f.prototype.feature=function(a){if(0>a||a>=this.me.length)throw Error("feature index out of bounds");this.Cc.ea=this.me[a];a=this.Cc.Ka()+this.Cc.ea;return new d(this.Cc,a,this.extent,this.ne,this.pe)};var n=m;a["default"]={Bf:b,Wj:d,Xj:n};a.Bf=b;a.Wj=d;a.Xj=n})(Fj.xf=Fj.xf||{});function kq(a,b,c,d,e){this.g=e;this.i=a;this.b=b;this.f=c;this.c=d}k=kq.prototype;k.get=function(a){return this.c[a]};k.Bb=function(){return this.f};k.G=function(){this.a||(this.a="Point"===this.i?Za(this.b):$a(this.b,0,this.b.length,2));return this.a};k.Wn=function(){return this.g};k.ec=function(){return this.b};k.ga=kq.prototype.ec;k.V=function(){return this};k.Xn=function(){return this.c};k.Vd=kq.prototype.V;k.qa=function(){return 2};k.Lc=ua;k.U=function(){return this.i};function lq(a){El.call(this);a=a?a:{};this.defaultDataProjection=new Bb({code:"",units:"tile-pixels"});this.b=a.featureClass?a.featureClass:kq;this.a=a.geometryName;this.i=a.layerName?a.layerName:"layer";this.c=a.layers?a.layers:null}v(lq,El);k=lq.prototype;k.U=function(){return"arraybuffer"};
501
+k.Oa=function(a,b){var c=this.c;a=new Fj.Dd(a);a=new Fj.xf.Bf(a);var d=[],e=this.b,f;for(f in a.layers)if(!c||-1!=c.indexOf(f)){var g=a.layers[f];for(var h=0,l=g.length;h<l;++h){if(e===kq){var m=void 0;var n=g.feature(h),p=f,q=n.Oh(),r=[],u=[];mq(q,u,r);var x=n.type;1===x?m=1===q.length?"Point":"MultiPoint":2===x?m=1===q.length?"LineString":"MultiLineString":3===x&&(m="Polygon");q=n.properties;q[this.i]=p;m=new this.b(m,u,r,q,n.id)}else{x=g.feature(h);u=f;r=b;m=new this.b;n=x.id;p=x.properties;p[this.i]=
502
+u;this.a&&m.Tc(this.a);u=void 0;q=x.type;if(0===q)u=null;else{var x=x.Oh(),B=[],E=[];mq(x,E,B);1===q?u=1===x.length?new C(null):new Q(null):2===q?1===x.length?u=new O(null):u=new P(null):3===q&&(u=new D(null));u.ba("XY",E,B)}r=Hl(u,!1,Gl(this,r));m.Ra(r);m.jc(n);m.H(p)}d.push(m)}}return d};k.kb=function(){return this.defaultDataProjection};k.mn=function(a){this.c=a};
503
+function mq(a,b,c){for(var d=0,e=0,f=a.length;e<f;++e){var g=a[e],h;var l=0;for(h=g.length;l<h;++l){var m=g[l];b.push(m.x,m.y)}d+=2*l;c.push(d)}}k.Tb=function(){};k.Sc=function(){};k.Bd=function(){};k.$c=function(){};k.Wb=function(){};function nq(){Cm.call(this);this.defaultDataProjection=Tb("EPSG:4326")}v(nq,Cm);function oq(a,b){b[b.length-1].fe[a.getAttribute("k")]=a.getAttribute("v")}
504
+var pq=[null],qq=K(pq,{nd:function(a,b){b[b.length-1].md.push(a.getAttribute("ref"))},tag:oq}),sq=K(pq,{node:function(a,b){var c=b[0],d=b[b.length-1],e=a.getAttribute("id"),f=[parseFloat(a.getAttribute("lon")),parseFloat(a.getAttribute("lat"))];d.Sh[e]=f;a=N({fe:{}},rq,a,b);wb(a.fe)||(f=new C(f),Hl(f,!1,c),c=new H(f),c.jc(e),c.H(a.fe),d.features.push(c))},way:function(a,b){var c=b[0],d=a.getAttribute("id");a=N({md:[],fe:{}},qq,a,b);b=b[b.length-1];for(var e=[],f=0,g=a.md.length;f<g;f++)la(e,b.Sh[a.md[f]]);
505
+a.md[0]==a.md[a.md.length-1]?(f=new D(null),f.ba("XY",e,[e.length])):(f=new O(null),f.ba("XY",e));Hl(f,!1,c);c=new H(f);c.jc(d);c.H(a.fe);b.features.push(c)}}),rq=K(pq,{tag:oq});nq.prototype.zc=function(a,b){b=Fl(this,a,b);return"osm"==a.localName&&(a=N({Sh:{},features:[]},sq,a,[b]),a.features)?a.features:[]};nq.prototype.Vg=function(){};nq.prototype.Xb=function(){};nq.prototype.ie=function(){};function tq(a){return a.getAttributeNS("http://www.w3.org/1999/xlink","href")};function uq(){}uq.prototype.read=function(a){return ml(a)?this.a(a):nl(a)?this.b(a):"string"===typeof a?(a=pl(a),this.a(a)):null};function vq(){}v(vq,uq);vq.prototype.a=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return this.b(a);return null};vq.prototype.b=function(a){return(a=N({},wq,a,[]))?a:null};
506
+var xq=[null,"http://www.opengis.net/ows/1.1"],wq=K(xq,{ServiceIdentification:I(function(a,b){return N({},yq,a,b)}),ServiceProvider:I(function(a,b){return N({},zq,a,b)}),OperationsMetadata:I(function(a,b){return N({},Aq,a,b)})}),Cq=K(xq,{DeliveryPoint:I(S),City:I(S),AdministrativeArea:I(S),PostalCode:I(S),Country:I(S),ElectronicMailAddress:I(S)}),Dq=K(xq,{Value:tl(function(a){return S(a)})}),Eq=K(xq,{AllowedValues:I(function(a,b){return N({},Dq,a,b)})}),Gq=K(xq,{Phone:I(function(a,b){return N({},
507
+Fq,a,b)}),Address:I(function(a,b){return N({},Cq,a,b)})}),Iq=K(xq,{HTTP:I(function(a,b){return N({},Hq,a,b)})}),Hq=K(xq,{Get:tl(function(a,b){var c=tq(a);if(c)return N({href:c},Jq,a,b)}),Post:void 0}),Kq=K(xq,{DCP:I(function(a,b){return N({},Iq,a,b)})}),Aq=K(xq,{Operation:function(a,b){var c=a.getAttribute("name");(a=N({},Kq,a,b))&&(b[b.length-1][c]=a)}}),Fq=K(xq,{Voice:I(S),Facsimile:I(S)}),Jq=K(xq,{Constraint:tl(function(a,b){var c=a.getAttribute("name");if(c)return N({name:c},Eq,a,b)})}),Lq=K(xq,
508
+{IndividualName:I(S),PositionName:I(S),ContactInfo:I(function(a,b){return N({},Gq,a,b)})}),yq=K(xq,{Title:I(S),ServiceTypeVersion:I(S),ServiceType:I(S)}),zq=K(xq,{ProviderName:I(S),ProviderSite:I(tq),ServiceContact:I(function(a,b){return N({},Lq,a,b)})});function Mq(a,b,c,d){var e;void 0!==d?e=d:e=[];for(var f=d=0;f<b;){var g=a[f++];e[d++]=a[f++];e[d++]=g;for(g=2;g<c;++g)e[d++]=a[f++]}e.length=d};function Nq(a){a=a?a:{};El.call(this);this.defaultDataProjection=Tb("EPSG:4326");this.b=a.factor?a.factor:1E5;this.a=a.geometryLayout?a.geometryLayout:"XY"}v(Nq,Vn);function Oq(a,b,c){var d,e=Array(b);for(d=0;d<b;++d)e[d]=0;var f;var g=0;for(f=a.length;g<f;)for(d=0;d<b;++d,++g){var h=a[g],l=h-e[d];e[d]=h;a[g]=l}return Pq(a,c?c:1E5)}function Qq(a,b,c){var d,e=Array(b);for(d=0;d<b;++d)e[d]=0;a=Rq(a,c?c:1E5);var f;c=0;for(f=a.length;c<f;)for(d=0;d<b;++d,++c)e[d]+=a[c],a[c]=e[d];return a}
509
+function Pq(a,b){b=b?b:1E5;var c;var d=0;for(c=a.length;d<c;++d)a[d]=Math.round(a[d]*b);b=0;for(d=a.length;b<d;++b)c=a[b],a[b]=0>c?~(c<<1):c<<1;b="";d=0;for(c=a.length;d<c;++d){for(var e,f=a[d],g="";32<=f;)e=(32|f&31)+63,g+=String.fromCharCode(e),f>>=5;g+=String.fromCharCode(f+63);b+=g}return b}
510
+function Rq(a,b){b=b?b:1E5;var c=[],d=0,e=0,f;var g=0;for(f=a.length;g<f;++g){var h=a.charCodeAt(g)-63,d=d|(h&31)<<e;32>h?(c.push(d),e=d=0):e+=5}a=0;for(d=c.length;a<d;++a)e=c[a],c[a]=e&1?~(e>>1):e>>1;a=0;for(d=c.length;a<d;++a)c[a]/=b;return c}k=Nq.prototype;k.ae=function(a,b){a=this.wd(a,b);return new H(a)};k.zg=function(a,b){return[this.ae(a,b)]};k.wd=function(a,b){var c=sf(this.a);a=Qq(a,c,this.b);Mq(a,a.length,c,a);c=Ff(a,0,a.length,c);return Hl(new O(c,this.a),!1,Gl(this,b))};
511
+k.ge=function(a,b){if(a=a.V())return this.Cd(a,b);xa(!1,40);return""};k.Wg=function(a,b){return this.ge(a[0],b)};k.Cd=function(a,b){a=Hl(a,!0,Gl(this,b));b=a.ga();a=a.qa();Mq(b,b.length,a,b);return Oq(b,a,this.b)};function Sq(a){a=a?a:{};El.call(this);this.a=a.layerName;this.b=a.layers?a.layers:null;this.defaultDataProjection=Tb(a.defaultDataProjection?a.defaultDataProjection:"EPSG:4326")}v(Sq,Il);function Tq(a,b){var c=[],d,e;var f=0;for(e=a.length;f<e;++f){var g=a[f];0<f&&c.pop();0<=g?d=b[g]:d=b[~g].slice().reverse();c.push.apply(c,d)}a=0;for(b=c.length;a<b;++a)c[a]=c[a].slice();return c}
512
+function Uq(a,b,c,d,e,f,g){a=a.geometries;var h=[],l;var m=0;for(l=a.length;m<l;++m)h[m]=Vq(a[m],b,c,d,e,f,g);return h}function Vq(a,b,c,d,e,f,g){var h=a.type,l=Wq[h];c="Point"===h||"MultiPoint"===h?l(a,c,d):l(a,b);b=new H;b.Ra(Hl(c,!1,g));void 0!==a.id&&b.jc(a.id);a=a.properties;e&&(a||(a={}),a[e]=f);a&&b.H(a);return b}
513
+Sq.prototype.yg=function(a,b){if("Topology"==a.type){var c=null,d=null;if(a.transform){var e=a.transform;c=e.scale;d=e.translate}var f=a.arcs;if(e){e=c;var g=d,h;var l=0;for(h=f.length;l<h;++l){var m,n=f[l],p=e,q=g,r=0,u=0;var x=0;for(m=n.length;x<m;++x){var B=n[x];r+=B[0];u+=B[1];B[0]=r;B[1]=u;Xq(B,p,q)}}}e=[];a=a.objects;var g=this.a,E;for(E in a)this.b&&-1==this.b.indexOf(E)||("GeometryCollection"===a[E].type?(l=a[E],e.push.apply(e,Uq(l,f,c,d,g,E,b))):(l=a[E],e.push(Vq(l,f,c,d,g,E,b))));return e}return[]};
514
+function Xq(a,b,c){a[0]=a[0]*b[0]+c[0];a[1]=a[1]*b[1]+c[1]}Sq.prototype.Fg=function(){return this.defaultDataProjection};
515
+var Wq={Point:function(a,b,c){a=a.coordinates;b&&c&&Xq(a,b,c);return new C(a)},LineString:function(a,b){a=Tq(a.arcs,b);return new O(a)},Polygon:function(a,b){var c=[],d;var e=0;for(d=a.arcs.length;e<d;++e)c[e]=Tq(a.arcs[e],b);return new D(c)},MultiPoint:function(a,b,c){a=a.coordinates;var d;if(b&&c){var e=0;for(d=a.length;e<d;++e)Xq(a[e],b,c)}return new Q(a)},MultiLineString:function(a,b){var c=[],d;var e=0;for(d=a.arcs.length;e<d;++e)c[e]=Tq(a.arcs[e],b);return new P(c)},MultiPolygon:function(a,
516
+b){var c=[],d,e;var f=0;for(e=a.arcs.length;f<e;++f){var g=a.arcs[f];var h=[];var l=0;for(d=g.length;l<d;++l)h[l]=Tq(g[l],b);c[f]=h}return new R(c)}};k=Sq.prototype;k.Zc=function(){};k.he=function(){};k.je=function(){};k.Cg=function(){};k.Rc=function(){};function Yq(a){a=a?a:{};this.c=a.featureType;this.a=a.featureNS;this.b=a.gmlFormat?a.gmlFormat:new Sm;this.o=a.schemaLocation?a.schemaLocation:Zq["1.1.0"];Cm.call(this)}v(Yq,Cm);var Zq={"1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"};
517
+Yq.prototype.zc=function(a,b){var c={featureType:this.c,featureNS:this.a};tb(c,Fl(this,a,b?b:{}));b=[c];this.b.b["http://www.opengis.net/gml"].featureMember=rl(Fm.prototype.be);(a=N([],this.b.b,a,b,this.b))||(a=[]);return a};Yq.prototype.j=function(a){if(ml(a))return $q(a);if(nl(a))return N({},ar,a,[]);if("string"===typeof a)return a=pl(a),$q(a)};Yq.prototype.g=function(a){if(ml(a))return br(this,a);if(nl(a))return cr(this,a);if("string"===typeof a)return a=pl(a),br(this,a)};
518
+function br(a,b){for(b=b.firstChild;b;b=b.nextSibling)if(b.nodeType==Node.ELEMENT_NODE)return cr(a,b)}var dr={"http://www.opengis.net/gml":{boundedBy:I(Fm.prototype.gf,"bounds")}};function cr(a,b){var c={},d=Nm(b.getAttribute("numberOfFeatures"));c.numberOfFeatures=d;return N(c,dr,b,[],a.b)}
519
+var er={"http://www.opengis.net/wfs":{totalInserted:I(Mm),totalUpdated:I(Mm),totalDeleted:I(Mm)}},fr={"http://www.opengis.net/ogc":{FeatureId:rl(function(a){return a.getAttribute("fid")})}},gr={"http://www.opengis.net/wfs":{Feature:function(a,b){Al(fr,a,b)}}},ar={"http://www.opengis.net/wfs":{TransactionSummary:I(function(a,b){return N({},er,a,b)},"transactionSummary"),InsertResults:I(function(a,b){return N([],gr,a,b)},"insertIds")}};
520
+function $q(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return N({},ar,a,[])}var hr={"http://www.opengis.net/wfs":{PropertyName:J(Pm)}};function ir(a,b){var c=jl("http://www.opengis.net/ogc","Filter"),d=jl("http://www.opengis.net/ogc","FeatureId");c.appendChild(d);d.setAttribute("fid",b);a.appendChild(c)}function jr(a,b){a=(a?a:"feature")+":";return b.indexOf(a)?a+b:b}
521
+var kr={"http://www.opengis.net/wfs":{Insert:J(function(a,b,c){var d=c[c.length-1],e=d.gmlVersion,d=jl(d.featureNS,d.featureType);a.appendChild(d);if(2===e){a=an.prototype;(e=b.a)&&d.setAttribute("fid",e);var e=c[c.length-1],f=e.featureNS,g=b.c;e.lb||(e.lb={},e.lb[f]={});var h=b.N();b=[];var l=[];for(n in h){var m=h[n];null!==m&&(b.push(n),l.push(m),n==g||m instanceof of?n in e.lb[f]||(e.lb[f][n]=J(a.ai,a)):n in e.lb[f]||(e.lb[f][n]=J(Pm)))}var n=tb({},e);n.node=d;Bl(n,e.lb,wl(void 0,f),l,c,b)}else Sm.prototype.ii(d,
522
+b,c)}),Update:J(function(a,b,c){var d=c[c.length-1];xa(void 0!==b.a,27);var e=d.featurePrefix,f=d.featureNS;a.setAttribute("typeName",jr(e,d.featureType));a.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+e,f);e=b.a;if(void 0!==e){for(var f=b.O(),g=[],h=0,l=f.length;h<l;h++){var m=b.get(f[h]);void 0!==m&&g.push({name:f[h],value:m})}Bl({gmlVersion:d.gmlVersion,node:a,hasZ:d.hasZ,srsName:d.srsName},kr,wl("Property"),g,c);ir(a,e)}}),Delete:J(function(a,b,c){c=c[c.length-1];xa(void 0!==b.a,26);
523
+var d=c.featurePrefix,e=c.featureNS;a.setAttribute("typeName",jr(d,c.featureType));a.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+d,e);b=b.a;void 0!==b&&ir(a,b)}),Property:J(function(a,b,c){var d=jl("http://www.opengis.net/wfs","Name"),e=c[c.length-1].gmlVersion;a.appendChild(d);Pm(d,b.name);void 0!==b.value&&null!==b.value&&(d=jl("http://www.opengis.net/wfs","Value"),a.appendChild(d),b.value instanceof of?2===e?an.prototype.ai(d,b.value,c):Sm.prototype.od(d,b.value,c):Pm(d,b.value))}),
524
+Native:J(function(a,b){b.vq&&a.setAttribute("vendorId",b.vq);void 0!==b.Vp&&a.setAttribute("safeToIgnore",b.Vp);void 0!==b.value&&Pm(a,b.value)})}};function lr(a,b,c){var d={node:a};b.b.forEach(function(a){Bl(d,mr,wl(a.kc),[a],c)})}function nr(a,b){void 0!==b.a&&a.setAttribute("matchCase",b.a.toString());or(a,b.b);pr(a,""+b.i)}function qr(a,b,c){a=jl("http://www.opengis.net/ogc",a);Pm(a,c);b.appendChild(a)}function or(a,b){qr("PropertyName",a,b)}function pr(a,b){qr("Literal",a,b)}
525
+function rr(a,b){var c=jl("http://www.opengis.net/gml","TimeInstant");a.appendChild(c);a=jl("http://www.opengis.net/gml","timePosition");c.appendChild(a);Pm(a,b)}
526
+var mr={"http://www.opengis.net/wfs":{Query:J(function(a,b,c){var d=c[c.length-1],e=d.featurePrefix,f=d.featureNS,g=d.propertyNames,h=d.srsName;a.setAttribute("typeName",e?jr(e,b):b);h&&a.setAttribute("srsName",h);f&&a.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+e,f);b=tb({},d);b.node=a;Bl(b,hr,wl("PropertyName"),g,c);if(d=d.filter)g=jl("http://www.opengis.net/ogc","Filter"),a.appendChild(g),Bl({node:g},mr,wl(d.kc),[d],c)})},"http://www.opengis.net/ogc":{During:J(function(a,b){var c=jl("http://www.opengis.net/fes",
527
+"ValueReference");Pm(c,b.b);a.appendChild(c);c=jl("http://www.opengis.net/gml","TimePeriod");a.appendChild(c);a=jl("http://www.opengis.net/gml","begin");c.appendChild(a);rr(a,b.a);a=jl("http://www.opengis.net/gml","end");c.appendChild(a);rr(a,b.i)}),And:J(lr),Or:J(lr),Not:J(function(a,b,c){b=b.condition;Bl({node:a},mr,wl(b.kc),[b],c)}),BBOX:J(function(a,b,c){c[c.length-1].srsName=b.srsName;or(a,b.geometryName);Sm.prototype.od(a,b.extent,c)}),Intersects:J(function(a,b,c){c[c.length-1].srsName=b.srsName;
528
+or(a,b.geometryName);Sm.prototype.od(a,b.geometry,c)}),Within:J(function(a,b,c){c[c.length-1].srsName=b.srsName;or(a,b.geometryName);Sm.prototype.od(a,b.geometry,c)}),PropertyIsEqualTo:J(nr),PropertyIsNotEqualTo:J(nr),PropertyIsLessThan:J(nr),PropertyIsLessThanOrEqualTo:J(nr),PropertyIsGreaterThan:J(nr),PropertyIsGreaterThanOrEqualTo:J(nr),PropertyIsNull:J(function(a,b){or(a,b.b)}),PropertyIsBetween:J(function(a,b){or(a,b.b);var c=jl("http://www.opengis.net/ogc","LowerBoundary");a.appendChild(c);
529
+pr(c,""+b.a);c=jl("http://www.opengis.net/ogc","UpperBoundary");a.appendChild(c);pr(c,""+b.i)}),PropertyIsLike:J(function(a,b){a.setAttribute("wildCard",b.g);a.setAttribute("singleChar",b.f);a.setAttribute("escapeChar",b.i);void 0!==b.a&&a.setAttribute("matchCase",b.a.toString());or(a,b.b);pr(a,""+b.c)})}};
530
+Yq.prototype.l=function(a){var b=jl("http://www.opengis.net/wfs","GetFeature");b.setAttribute("service","WFS");b.setAttribute("version","1.1.0");if(a){a.handle&&b.setAttribute("handle",a.handle);a.outputFormat&&b.setAttribute("outputFormat",a.outputFormat);void 0!==a.maxFeatures&&b.setAttribute("maxFeatures",a.maxFeatures);a.resultType&&b.setAttribute("resultType",a.resultType);void 0!==a.startIndex&&b.setAttribute("startIndex",a.startIndex);void 0!==a.count&&b.setAttribute("count",a.count);var c=
531
+a.filter;if(a.bbox){xa(a.geometryName,12);var d=sm(a.geometryName,a.bbox,a.srsName);c?c=rm(c,d):c=d}}b.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",this.o);c={node:b,srsName:a.srsName,featureNS:a.featureNS?a.featureNS:this.a,featurePrefix:a.featurePrefix,geometryName:a.geometryName,filter:c,propertyNames:a.propertyNames?a.propertyNames:[]};xa(Array.isArray(a.featureTypes),11);a=a.featureTypes;c=[c];d=tb({},c[c.length-1]);d.node=b;Bl(d,mr,wl("Query"),a,c);return b};
532
+Yq.prototype.v=function(a,b,c,d){var e=[],f=jl("http://www.opengis.net/wfs","Transaction"),g=d.version?d.version:"1.1.0",h="1.0.0"===g?2:3;f.setAttribute("service","WFS");f.setAttribute("version",g);if(d){var l=d.gmlOptions?d.gmlOptions:{};d.handle&&f.setAttribute("handle",d.handle)}f.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",Zq[g]);a&&(g={node:f,featureNS:d.featureNS,featureType:d.featureType,featurePrefix:d.featurePrefix,gmlVersion:h,hasZ:d.hasZ,srsName:d.srsName},
533
+tb(g,l),Bl(g,kr,wl("Insert"),a,e));b&&(g={node:f,featureNS:d.featureNS,featureType:d.featureType,featurePrefix:d.featurePrefix,gmlVersion:h,hasZ:d.hasZ,srsName:d.srsName},tb(g,l),Bl(g,kr,wl("Update"),b,e));c&&Bl({node:f,featureNS:d.featureNS,featureType:d.featureType,featurePrefix:d.featurePrefix,gmlVersion:h,srsName:d.srsName},kr,wl("Delete"),c,e);d.nativeElements&&Bl({node:f,featureNS:d.featureNS,featureType:d.featureType,featurePrefix:d.featurePrefix,gmlVersion:h,srsName:d.srsName},kr,wl("Native"),
534
+d.nativeElements,e);return f};Yq.prototype.Eg=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return this.kf(a);return null};Yq.prototype.kf=function(a){if(a.firstElementChild&&a.firstElementChild.firstElementChild)for(a=a.firstElementChild.firstElementChild,a=a.firstElementChild;a;a=a.nextElementSibling)if(0!==a.childNodes.length&&(1!==a.childNodes.length||3!==a.firstChild.nodeType)){var b=[{}];this.b.gf(a,b);return Tb(b.pop().srsName)}return null};function sr(a){a=a?a:{};El.call(this);this.b=void 0!==a.splitCollection?a.splitCollection:!1}v(sr,Vn);function tr(a){a=a.X();return a.length?a.join(" "):""}function ur(a){a=a.X();for(var b=[],c=0,d=a.length;c<d;++c)b.push(a[c].join(" "));return b.join(",")}function vr(a){var b=[];a=a.Sd();for(var c=0,d=a.length;c<d;++c)b.push("("+ur(a[c])+")");return b.join(",")}
535
+function wr(a){var b=a.U(),c=(0,xr[b])(a),b=b.toUpperCase();if(a instanceof rf){a=a.ja;var d="";if("XYZ"===a||"XYZM"===a)d+="Z";if("XYM"===a||"XYZM"===a)d+="M";a=d;0<a.length&&(b+=" "+a)}return c.length?b+"("+c+")":b+" EMPTY"}
536
+var xr={Point:tr,LineString:ur,Polygon:vr,MultiPoint:function(a){var b=[];a=a.Zd();for(var c=0,d=a.length;c<d;++c)b.push("("+tr(a[c])+")");return b.join(",")},MultiLineString:function(a){var b=[];a=a.gd();for(var c=0,d=a.length;c<d;++c)b.push("("+ur(a[c])+")");return b.join(",")},MultiPolygon:function(a){var b=[];a=a.Td();for(var c=0,d=a.length;c<d;++c)b.push("("+vr(a[c])+")");return b.join(",")},GeometryCollection:function(a){var b=[];a=a.Vf();for(var c=0,d=a.length;c<d;++c)b.push(wr(a[c]));return b.join(",")}};
537
+k=sr.prototype;k.ae=function(a,b){return(a=this.wd(a,b))?(b=new H,b.Ra(a),b):null};k.zg=function(a,b){var c=[];a=this.wd(a,b);this.b&&"GeometryCollection"==a.U()?c=a.a:c=[a];b=[];for(var d=0,e=c.length;d<e;++d)a=new H,a.Ra(c[d]),b.push(a);return b};k.wd=function(a,b){a=new yr(new zr(a));Ar(a);return(a=Br(a))?Hl(a,!1,b):null};k.ge=function(a,b){return(a=a.V())?this.Cd(a,b):""};
538
+k.Wg=function(a,b){if(1==a.length)return this.ge(a[0],b);for(var c=[],d=0,e=a.length;d<e;++d)c.push(a[d].V());a=new tm(c);return this.Cd(a,b)};k.Cd=function(a,b){return wr(Hl(a,!0,b))};function zr(a){this.a=a;this.b=-1}
539
+function Cr(a){var b=a.a.charAt(++a.b),c={position:a.b,value:b};if("("==b)c.type=2;else if(","==b)c.type=5;else if(")"==b)c.type=3;else if("0"<=b&&"9">=b||"."==b||"-"==b){c.type=4;var b=a.b,d=!1,e=!1;do{if("."==f)d=!0;else if("e"==f||"E"==f)e=!0;var f=a.a.charAt(++a.b)}while("0"<=f&&"9">=f||"."==f&&(void 0===d||!d)||!e&&("e"==f||"E"==f)||e&&("-"==f||"+"==f));a=parseFloat(a.a.substring(b,a.b--));c.value=a}else if("a"<=b&&"z">=b||"A"<=b&&"Z">=b){c.type=1;b=a.b;do f=a.a.charAt(++a.b);while("a"<=f&&"z">=
540
+f||"A"<=f&&"Z">=f);a=a.a.substring(b,a.b--).toUpperCase();c.value=a}else{if(" "==b||"\t"==b||"\r"==b||"\n"==b)return Cr(a);if(""===b)c.type=6;else throw Error("Unexpected character: "+b);}return c}function yr(a){this.i=a;this.a="XY"}function Ar(a){a.b=Cr(a.i)}function Dr(a,b){(b=a.b.type==b)&&Ar(a);return b}
541
+function Br(a){var b=a.b;if(Dr(a,1)){var b=b.value,c="XY",d=a.b;1==a.b.type&&(d=d.value,"Z"===d?c="XYZ":"M"===d?c="XYM":"ZM"===d&&(c="XYZM"),"XY"!==c&&Ar(a));a.a=c;if("GEOMETRYCOLLECTION"==b){a:{if(Dr(a,2)){b=[];do b.push(Br(a));while(Dr(a,5));if(Dr(a,3)){a=b;break a}}else if(Er(a)){a=[];break a}throw Error(Fr(a));}return new tm(a)}d=Gr[b];c=Hr[b];if(!d||!c)throw Error("Invalid geometry type: "+b);b=d.call(a);return new c(b,a.a)}throw Error(Fr(a));}k=yr.prototype;
542
+k.tg=function(){if(Dr(this,2)){var a=Ir(this);if(Dr(this,3))return a}else if(Er(this))return null;throw Error(Fr(this));};k.sg=function(){if(Dr(this,2)){var a=Jr(this);if(Dr(this,3))return a}else if(Er(this))return[];throw Error(Fr(this));};k.ug=function(){if(Dr(this,2)){var a=Kr(this);if(Dr(this,3))return a}else if(Er(this))return[];throw Error(Fr(this));};
543
+k.fp=function(){if(Dr(this,2)){var a;if(2==this.b.type)for(a=[this.tg()];Dr(this,5);)a.push(this.tg());else a=Jr(this);if(Dr(this,3))return a}else if(Er(this))return[];throw Error(Fr(this));};k.ep=function(){if(Dr(this,2)){var a=Kr(this);if(Dr(this,3))return a}else if(Er(this))return[];throw Error(Fr(this));};k.gp=function(){if(Dr(this,2)){for(var a=[this.ug()];Dr(this,5);)a.push(this.ug());if(Dr(this,3))return a}else if(Er(this))return[];throw Error(Fr(this));};
544
+function Ir(a){for(var b=[],c=a.a.length,d=0;d<c;++d){var e=a.b;if(Dr(a,4))b.push(e.value);else break}if(b.length==c)return b;throw Error(Fr(a));}function Jr(a){for(var b=[Ir(a)];Dr(a,5);)b.push(Ir(a));return b}function Kr(a){for(var b=[a.sg()];Dr(a,5);)b.push(a.sg());return b}function Er(a){var b=1==a.b.type&&"EMPTY"==a.b.value;b&&Ar(a);return b}function Fr(a){return"Unexpected `"+a.b.value+"` at position "+a.b.position+" in `"+a.i.a+"`"}
545
+var Hr={POINT:C,LINESTRING:O,POLYGON:D,MULTIPOINT:Q,MULTILINESTRING:P,MULTIPOLYGON:R},Gr={POINT:yr.prototype.tg,LINESTRING:yr.prototype.sg,POLYGON:yr.prototype.ug,MULTIPOINT:yr.prototype.fp,MULTILINESTRING:yr.prototype.ep,MULTIPOLYGON:yr.prototype.gp};function Lr(){this.version=void 0}v(Lr,uq);Lr.prototype.a=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return this.b(a);return null};Lr.prototype.b=function(a){this.version=a.getAttribute("version").trim();return(a=N({version:this.version},Mr,a,[]))?a:null};function Nr(a,b){return N({},Or,a,b)}function Pr(a,b){return N({},Qr,a,b)}function Rr(a,b){if(b=Nr(a,b))return a=[Nm(a.getAttribute("width")),Nm(a.getAttribute("height"))],b.size=a,b}
546
+function Sr(a,b){return N([],Tr,a,b)}
547
+var Ur=[null,"http://www.opengis.net/wms"],Mr=K(Ur,{Service:I(function(a,b){return N({},Vr,a,b)}),Capability:I(function(a,b){return N({},Wr,a,b)})}),Wr=K(Ur,{Request:I(function(a,b){return N({},Xr,a,b)}),Exception:I(function(a,b){return N([],Yr,a,b)}),Layer:I(function(a,b){return N({},Zr,a,b)})}),Vr=K(Ur,{Name:I(S),Title:I(S),Abstract:I(S),KeywordList:I(Sr),OnlineResource:I(tq),ContactInformation:I(function(a,b){return N({},$r,a,b)}),Fees:I(S),AccessConstraints:I(S),LayerLimit:I(Mm),MaxWidth:I(Mm),
548
+MaxHeight:I(Mm)}),$r=K(Ur,{ContactPersonPrimary:I(function(a,b){return N({},as,a,b)}),ContactPosition:I(S),ContactAddress:I(function(a,b){return N({},bs,a,b)}),ContactVoiceTelephone:I(S),ContactFacsimileTelephone:I(S),ContactElectronicMailAddress:I(S)}),as=K(Ur,{ContactPerson:I(S),ContactOrganization:I(S)}),bs=K(Ur,{AddressType:I(S),Address:I(S),City:I(S),StateOrProvince:I(S),PostCode:I(S),Country:I(S)}),Yr=K(Ur,{Format:rl(S)}),Zr=K(Ur,{Name:I(S),Title:I(S),Abstract:I(S),KeywordList:I(Sr),CRS:tl(S),
549
+EX_GeographicBoundingBox:I(function(a,b){var c=N({},cs,a,b);if(c){a=c.westBoundLongitude;b=c.southBoundLatitude;var d=c.eastBoundLongitude,c=c.northBoundLatitude;if(void 0!==a&&void 0!==b&&void 0!==d&&void 0!==c)return[a,b,d,c]}}),BoundingBox:tl(function(a){var b=[Lm(a.getAttribute("minx")),Lm(a.getAttribute("miny")),Lm(a.getAttribute("maxx")),Lm(a.getAttribute("maxy"))],c=[Lm(a.getAttribute("resx")),Lm(a.getAttribute("resy"))];return{crs:a.getAttribute("CRS"),extent:b,res:c}}),Dimension:tl(function(a){return{name:a.getAttribute("name"),
550
+units:a.getAttribute("units"),unitSymbol:a.getAttribute("unitSymbol"),"default":a.getAttribute("default"),multipleValues:Im(a.getAttribute("multipleValues")),nearestValue:Im(a.getAttribute("nearestValue")),current:Im(a.getAttribute("current")),values:S(a)}}),Attribution:I(function(a,b){return N({},ds,a,b)}),AuthorityURL:tl(function(a,b){if(b=Nr(a,b))return b.name=a.getAttribute("name"),b}),Identifier:tl(S),MetadataURL:tl(function(a,b){if(b=Nr(a,b))return b.type=a.getAttribute("type"),b}),DataURL:tl(Nr),
551
+FeatureListURL:tl(Nr),Style:tl(function(a,b){return N({},es,a,b)}),MinScaleDenominator:I(Km),MaxScaleDenominator:I(Km),Layer:tl(function(a,b){var c=b[b.length-1],d=N({},Zr,a,b);if(d)return b=Im(a.getAttribute("queryable")),void 0===b&&(b=c.queryable),d.queryable=void 0!==b?b:!1,b=Nm(a.getAttribute("cascaded")),void 0===b&&(b=c.cascaded),d.cascaded=b,b=Im(a.getAttribute("opaque")),void 0===b&&(b=c.opaque),d.opaque=void 0!==b?b:!1,b=Im(a.getAttribute("noSubsets")),void 0===b&&(b=c.noSubsets),d.noSubsets=
552
+void 0!==b?b:!1,(b=Lm(a.getAttribute("fixedWidth")))||(b=c.fixedWidth),d.fixedWidth=b,(a=Lm(a.getAttribute("fixedHeight")))||(a=c.fixedHeight),d.fixedHeight=a,["Style","CRS","AuthorityURL"].forEach(function(a){a in c&&(d[a]=(d[a]||[]).concat(c[a]))}),"EX_GeographicBoundingBox BoundingBox Dimension Attribution MinScaleDenominator MaxScaleDenominator".split(" ").forEach(function(a){a in d||(d[a]=c[a])}),d})}),ds=K(Ur,{Title:I(S),OnlineResource:I(tq),LogoURL:I(Rr)}),cs=K(Ur,{westBoundLongitude:I(Km),
553
+eastBoundLongitude:I(Km),southBoundLatitude:I(Km),northBoundLatitude:I(Km)}),Xr=K(Ur,{GetCapabilities:I(Pr),GetMap:I(Pr),GetFeatureInfo:I(Pr)}),Qr=K(Ur,{Format:tl(S),DCPType:tl(function(a,b){return N({},fs,a,b)})}),fs=K(Ur,{HTTP:I(function(a,b){return N({},gs,a,b)})}),gs=K(Ur,{Get:I(Nr),Post:I(Nr)}),es=K(Ur,{Name:I(S),Title:I(S),Abstract:I(S),LegendURL:tl(Rr),StyleSheetURL:I(Nr),StyleURL:I(Nr)}),Or=K(Ur,{Format:I(S),OnlineResource:I(tq)}),Tr=K(Ur,{Keyword:rl(S)});function hs(a){a=a?a:{};this.a="http://mapserver.gis.umn.edu/mapserver";this.b=new an;this.c=a.layers?a.layers:null;Cm.call(this)}v(hs,Cm);
554
+hs.prototype.zc=function(a,b){var c={};b&&tb(c,Fl(this,a,b));c=[c];a.setAttribute("namespaceURI",this.a);var d=a.localName;b=[];if(a.childNodes.length){if("msGMLOutput"==d)for(var e=0,f=a.childNodes.length;e<f;e++){var g=a.childNodes[e];if(g.nodeType===Node.ELEMENT_NODE){var h=c[0],l=g.localName.replace("_layer","");if(!this.c||ja(this.c,l)){l+="_feature";h.featureType=l;h.featureNS=this.a;var m={};m[l]=rl(this.b.wg,this.b);h=K([h.featureNS,null],m);g.setAttribute("namespaceURI",this.a);(g=N([],h,
555
+g,c,this.b))&&la(b,g)}}}"FeatureCollection"==d&&(a=N([],this.b.b,a,[{}],this.b))&&(b=a)}return b};hs.prototype.Vg=function(){};hs.prototype.Xb=function(){};hs.prototype.ie=function(){};function is(){this.i=new vq}v(is,uq);is.prototype.a=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return this.b(a);return null};is.prototype.b=function(a){var b=a.getAttribute("version").trim(),c=this.i.b(a);if(!c)return null;c.version=b;return(c=N(c,js,a,[]))?c:null};function ks(a){var b=S(a).split(" ");if(b&&2==b.length&&(a=+b[0],b=+b[1],!isNaN(a)&&!isNaN(b)))return[a,b]}
556
+var ls=[null,"http://www.opengis.net/wmts/1.0"],ms=[null,"http://www.opengis.net/ows/1.1"],js=K(ls,{Contents:I(function(a,b){return N({},ns,a,b)})}),ns=K(ls,{Layer:tl(function(a,b){return N({},os,a,b)}),TileMatrixSet:tl(function(a,b){return N({},ps,a,b)})}),os=K(ls,{Style:tl(function(a,b){if(b=N({},qs,a,b))return a="true"===a.getAttribute("isDefault"),b.isDefault=a,b}),Format:tl(S),TileMatrixSetLink:tl(function(a,b){return N({},rs,a,b)}),Dimension:tl(function(a,b){return N({},ss,a,b)}),ResourceURL:tl(function(a){var b=
557
+a.getAttribute("format"),c=a.getAttribute("template");a=a.getAttribute("resourceType");var d={};b&&(d.format=b);c&&(d.template=c);a&&(d.resourceType=a);return d})},K(ms,{Title:I(S),Abstract:I(S),WGS84BoundingBox:I(function(a,b){a=N([],ts,a,b);if(2==a.length)return Na(a)}),Identifier:I(S)})),qs=K(ls,{LegendURL:tl(function(a){var b={};b.format=a.getAttribute("format");b.href=tq(a);return b})},K(ms,{Title:I(S),Identifier:I(S)})),rs=K(ls,{TileMatrixSet:I(S),TileMatrixSetLimits:I(function(a,b){return N([],
558
+us,a,b)})}),us=K(ls,{TileMatrixLimits:rl(function(a,b){return N({},vs,a,b)})}),vs=K(ls,{TileMatrix:I(S),MinTileRow:I(Mm),MaxTileRow:I(Mm),MinTileCol:I(Mm),MaxTileCol:I(Mm)}),ss=K(ls,{Default:I(S),Value:tl(S)},K(ms,{Identifier:I(S)})),ts=K(ms,{LowerCorner:rl(ks),UpperCorner:rl(ks)}),ps=K(ls,{WellKnownScaleSet:I(S),TileMatrix:tl(function(a,b){return N({},ws,a,b)})},K(ms,{SupportedCRS:I(S),Identifier:I(S)})),ws=K(ls,{TopLeftCorner:I(ks),ScaleDenominator:I(Km),TileWidth:I(Mm),TileHeight:I(Mm),MatrixWidth:I(Mm),
559
+MatrixHeight:I(Mm)},K(ms,{Identifier:I(S)}));function xs(a){Tc.call(this);a=a||{};this.a=null;this.f=fc;this.c=void 0;y(this,Vc("projection"),this.Am,this);y(this,Vc("tracking"),this.Bm,this);void 0!==a.projection&&this.Wh(a.projection);void 0!==a.trackingOptions&&this.wj(a.trackingOptions);this.Ke(void 0!==a.tracking?a.tracking:!1)}v(xs,Tc);k=xs.prototype;k.ka=function(){this.Ke(!1);Tc.prototype.ka.call(this)};k.Am=function(){var a=this.Uh();a&&(this.f=Vb(Tb("EPSG:4326"),a),this.a&&this.set("position",this.f(this.a)))};
560
+k.Bm=function(){if(Wd){var a=this.Vh();a&&void 0===this.c?this.c=navigator.geolocation.watchPosition(this.np.bind(this),this.op.bind(this),this.Gh()):a||void 0===this.c||(navigator.geolocation.clearWatch(this.c),this.c=void 0)}};
561
+k.np=function(a){a=a.coords;this.set("accuracy",a.accuracy);this.set("altitude",null===a.altitude?void 0:a.altitude);this.set("altitudeAccuracy",null===a.altitudeAccuracy?void 0:a.altitudeAccuracy);this.set("heading",null===a.heading?void 0:Ha(a.heading));this.a?(this.a[0]=a.longitude,this.a[1]=a.latitude):this.a=[a.longitude,a.latitude];var b=this.f(this.a);this.set("position",b);this.set("speed",null===a.speed?void 0:a.speed);a=Xf(Jb,this.a,a.accuracy);a.Dc(this.f);this.set("accuracyGeometry",a);
562
+this.s()};k.op=function(a){a.type="error";this.Ke(!1);this.b(a)};k.Dk=function(){return this.get("accuracy")};k.Ek=function(){return this.get("accuracyGeometry")||null};k.Gk=function(){return this.get("altitude")};k.Hk=function(){return this.get("altitudeAccuracy")};k.ym=function(){return this.get("heading")};k.zm=function(){return this.get("position")};k.Uh=function(){return this.get("projection")};k.ll=function(){return this.get("speed")};k.Vh=function(){return this.get("tracking")};k.Gh=function(){return this.get("trackingOptions")};
563
+k.Wh=function(a){this.set("projection",Tb(a))};k.Ke=function(a){this.set("tracking",a)};k.wj=function(a){this.set("trackingOptions",a)};function ys(a,b,c){rf.call(this);this.Ng(a,b?b:0,c)}v(ys,rf);k=ys.prototype;k.clone=function(){var a=new ys(null);tf(a,this.ja,this.A.slice());a.s();return a};k.Kb=function(a,b,c,d){var e=this.A;a-=e[0];var f=b-e[1];b=a*a+f*f;if(b<d){if(b)for(d=this.pd()/Math.sqrt(b),c[0]=e[0]+d*a,c[1]=e[1]+d*f,d=2;d<this.a;++d)c[d]=e[d];else for(d=0;d<this.a;++d)c[d]=e[d];c.length=this.a;return b}return d};k.Mc=function(a,b){var c=this.A;a-=c[0];b-=c[1];return a*a+b*b<=zs(this)};
564
+k.wa=function(){return this.A.slice(0,this.a)};k.se=function(a){var b=this.A,c=b[this.a]-b[0];return Xa(b[0]-c,b[1]-c,b[0]+c,b[1]+c,a)};k.pd=function(){return Math.sqrt(zs(this))};function zs(a){var b=a.A[a.a]-a.A[0];a=a.A[a.a+1]-a.A[1];return b*b+a*a}k.U=function(){return"Circle"};k.Xa=function(a){var b=this.G();return qb(a,b)?(b=this.wa(),a[0]<=b[0]&&a[2]>=b[0]||a[1]<=b[1]&&a[3]>=b[1]?!0:db(a,this.sb,this)):!1};
565
+k.ob=function(a){var b=this.a,c=a.slice();c[b]=c[0]+(this.A[b]-this.A[0]);var d;for(d=1;d<b;++d)c[b+d]=a[d];tf(this,this.ja,c);this.s()};k.Ng=function(a,b,c){if(a){uf(this,c,a,0);this.A||(this.A=[]);c=this.A;a=Cf(c,a);c[a++]=c[0]+b;var d;b=1;for(d=this.a;b<d;++b)c[a++]=c[b];c.length=a}else tf(this,"XY",null);this.s()};k.X=function(){};k.ma=function(){};k.Uc=function(a){this.A[this.a]=this.A[0]+a;this.s()};function As(a,b,c){for(var d=[],e=a(0),f=a(1),g=b(e),h=b(f),l=[f,e],m=[h,g],n=[1,0],p={},q=1E5,r,u,x,B,E;0<--q&&0<n.length;)x=n.pop(),e=l.pop(),g=m.pop(),f=x.toString(),f in p||(d.push(g[0],g[1]),p[f]=!0),B=n.pop(),f=l.pop(),h=m.pop(),E=(x+B)/2,r=a(E),u=b(r),Fa(u[0],u[1],g[0],g[1],h[0],h[1])<c?(d.push(h[0],h[1]),f=B.toString(),p[f]=!0):(n.push(B,E,E,x),m.push(h,u,u,g),l.push(f,r,r,e));return d}function Bs(a,b,c,d,e){var f=Tb("EPSG:4326");return As(function(d){return[a,b+(c-b)*d]},ec(f,d),e)}
566
+function Cs(a,b,c,d,e){var f=Tb("EPSG:4326");return As(function(d){return[b+(c-b)*d,a]},ec(f,d),e)};function Ds(a){a=a||{};this.j=this.v=null;this.f=this.o=Infinity;this.g=this.l=-Infinity;this.ra=this.oa=Infinity;this.R=this.I=-Infinity;this.Jb=void 0!==a.targetSize?a.targetSize:100;this.fb=void 0!==a.maxLines?a.maxLines:100;this.i=[];this.c=[];this.pa=void 0!==a.strokeStyle?a.strokeStyle:Es;this.D=this.u=void 0;this.a=this.b=this.S=null;1==a.showLabels&&(this.na=a.lonLabelFormatter?a.lonLabelFormatter:bf.bind(this,"EW"),this.Ua=a.latLabelFormatter?a.latLabelFormatter:bf.bind(this,"NS"),this.fa=
567
+void 0==a.lonLabelPosition?0:a.lonLabelPosition,this.T=void 0==a.latLabelPosition?1:a.latLabelPosition,this.B=void 0!==a.lonLabelStyle?a.lonLabelStyle:new fo({font:"12px Calibri,sans-serif",textBaseline:"bottom",fill:new al({color:"rgba(0,0,0,1)"}),stroke:new wj({color:"rgba(255,255,255,1)",width:3})}),this.C=void 0!==a.latLabelStyle?a.latLabelStyle:new fo({font:"12px Calibri,sans-serif",textAlign:"end",fill:new al({color:"rgba(0,0,0,1)"}),stroke:new wj({color:"rgba(255,255,255,1)",width:3})}),this.b=
568
+[],this.a=[]);this.setMap(void 0!==a.map?a.map:null)}var Es=new wj({color:"rgba(0,0,0,0.2)"}),Fs=[90,45,30,20,10,5,2,1,.5,.2,.1,.05,.01,.005,.002,.001];function Gs(a,b,c,d,e,f,g){var h=g;c=Bs(b,c,d,a.j,e);h=void 0!==a.i[h]?a.i[h]:new O(null);h.ba("XY",c);qb(h.G(),f)&&(a.b&&(c=g,d=h.ga(),f=[d[0],Ca(f[1]+Math.abs(f[1]-f[3])*a.fa,Math.max(f[1],d[1]),Math.min(f[3],d[d.length-1]))],c=a.b[c]?a.b[c].Qd:new C(null),c.ma(f),a.b[g]={Qd:c,text:a.na(b)}),a.i[g++]=h);return g}
569
+function Hs(a,b,c,d,e){var f=e;c=Cs(b,a.g,a.f,a.j,c);f=void 0!==a.c[f]?a.c[f]:new O(null);f.ba("XY",c);if(qb(f.G(),d)){if(a.a){c=e;var g=f.ga();d=[Ca(d[0]+Math.abs(d[0]-d[2])*a.T,Math.max(d[0],g[0]),Math.min(d[2],g[g.length-2])),g[1]];c=a.a[c]?a.a[c].Qd:new C(null);c.ma(d);a.a[e]={Qd:c,text:a.Ua(b)}}a.c[e++]=f}return e}k=Ds.prototype;k.Cm=function(){return this.v};k.al=function(){return this.i};k.hl=function(){return this.c};
570
+k.Kh=function(a){var b=a.vectorContext,c=a.frameState,d=c.extent;a=c.viewState;var e=a.center,f=a.projection,g=a.resolution;a=c.pixelRatio;a=g*g/(4*a*a);if(!this.j||!dc(this.j,f)){var h=Tb("EPSG:4326"),l=f.G(),m=f.g,n=hc(m,h,f),p=m[2],q=m[1],r=m[0],u=n[3],x=n[2],B=n[1],n=n[0];this.o=m[3];this.f=p;this.l=q;this.g=r;this.oa=u;this.ra=x;this.I=B;this.R=n;this.u=ec(h,f);this.D=ec(f,h);this.S=this.D(nb(l));this.j=f}f.i&&(f=f.G(),h=lb(f),c=c.focus[0],c<f[0]||c>f[2])&&(c=h*Math.ceil((f[0]-c)/h),d=[d[0]+
571
+c,d[1],d[2]+c,d[3]]);c=this.S[0];f=this.S[1];h=-1;m=Math.pow(this.Jb*g,2);p=[];q=[];g=0;for(l=Fs.length;g<l;++g){r=Fs[g]/2;p[0]=c-r;p[1]=f-r;q[0]=c+r;q[1]=f+r;this.u(p,p);this.u(q,q);r=Math.pow(q[0]-p[0],2)+Math.pow(q[1]-p[1],2);if(r<=m)break;h=Fs[g]}g=h;if(-1==g)this.i.length=this.c.length=0,this.b&&(this.b.length=0),this.a&&(this.a.length=0);else{c=this.D(e);e=c[0];c=c[1];f=this.fb;h=[Math.max(d[0],this.R),Math.max(d[1],this.I),Math.min(d[2],this.ra),Math.min(d[3],this.oa)];h=hc(h,this.j,"EPSG:4326");
572
+m=h[3];q=h[1];e=Math.floor(e/g)*g;p=Ca(e,this.g,this.f);l=Gs(this,p,q,m,a,d,0);for(h=0;p!=this.g&&h++<f;)p=Math.max(p-g,this.g),l=Gs(this,p,q,m,a,d,l);p=Ca(e,this.g,this.f);for(h=0;p!=this.f&&h++<f;)p=Math.min(p+g,this.f),l=Gs(this,p,q,m,a,d,l);this.i.length=l;this.b&&(this.b.length=l);c=Math.floor(c/g)*g;e=Ca(c,this.l,this.o);l=Hs(this,e,a,d,0);for(h=0;e!=this.l&&h++<f;)e=Math.max(e-g,this.l),l=Hs(this,e,a,d,l);e=Ca(c,this.l,this.o);for(h=0;e!=this.o&&h++<f;)e=Math.min(e+g,this.o),l=Hs(this,e,a,
573
+d,l);this.c.length=l;this.a&&(this.a.length=l)}b.Ma(null,this.pa);a=0;for(e=this.i.length;a<e;++a)g=this.i[a],b.zb(g);a=0;for(e=this.c.length;a<e;++a)g=this.c[a],b.zb(g);if(this.b)for(a=0,e=this.b.length;a<e;++a)g=this.b[a],this.B.xd(g.text),b.Cb(this.B),b.zb(g.Qd);if(this.a)for(a=0,e=this.a.length;a<e;++a)g=this.a[a],this.C.xd(g.text),b.Cb(this.C),b.zb(g.Qd)};
574
+k.setMap=function(a){this.v&&(this.v.K("postcompose",this.Kh,this),this.v.render());a&&(a.J("postcompose",this.Kh,this),a.render());this.v=a};function Is(a,b,c,d,e){Qc.call(this);this.f=e;this.extent=a;this.a=c;this.resolution=b;this.state=d}v(Is,Qc);Is.prototype.s=function(){this.b("change")};Is.prototype.G=function(){return this.extent};Is.prototype.getState=function(){return this.state};function Js(a,b,c,d,e,f,g){Is.call(this,a,b,c,0,d);this.j=e;this.M=new Image;null!==f&&(this.M.crossOrigin=f);this.c={};this.i=null;this.state=0;this.g=g}v(Js,Is);k=Js.prototype;k.Y=function(a){if(void 0!==a){var b;a=w(a);if(a in this.c)return this.c[a];wb(this.c)?b=this.M:b=this.M.cloneNode(!1);return this.c[a]=b}return this.M};k.Fm=function(){this.state=3;this.i.forEach(Ec);this.i=null;this.s()};
575
+k.Gm=function(){void 0===this.resolution&&(this.resolution=mb(this.extent)/this.M.height);this.state=2;this.i.forEach(Ec);this.i=null;this.s()};k.load=function(){if(0==this.state||3==this.state)this.state=1,this.s(),this.i=[Jc(this.M,"error",this.Fm,this),Jc(this.M,"load",this.Gm,this)],this.g(this,this.j)};k.Og=function(a){this.M=a};function Ks(a,b,c,d,e,f){this.c=f?f:null;Is.call(this,a,b,c,f?0:2,d);this.i=e}v(Ks,Is);Ks.prototype.g=function(a){this.state=a?3:2;this.s()};Ks.prototype.load=function(){0==this.state&&(this.state=1,this.s(),this.c(this.g.bind(this)))};Ks.prototype.Y=function(){return this.i};function Ls(a,b){Qc.call(this);this.ta=a;this.state=b;this.i=null;this.key=""}v(Ls,Qc);Ls.prototype.s=function(){this.b("change")};Ls.prototype.bb=function(){return this.key+"/"+this.ta};function Ms(a){if(!a.i)return a;var b=a.i;do{if(2==b.getState())return b;b=b.i}while(b);return a}Ls.prototype.f=function(){return this.ta};Ls.prototype.getState=function(){return this.state};function Ns(a,b){a.state=b;a.s()};function Os(a,b,c,d,e){Ls.call(this,a,b);this.g=c;this.M=new Image;null!==d&&(this.M.crossOrigin=d);this.c=null;this.j=e}v(Os,Ls);k=Os.prototype;k.ka=function(){1==this.state&&Ps(this);this.i&&Nc(this.i);this.state=5;this.s();Ls.prototype.ka.call(this)};k.Y=function(){return this.M};k.bb=function(){return this.g};k.Dm=function(){this.state=3;this.M=Qs;Ps(this);this.s()};k.Em=function(){this.state=this.M.naturalWidth&&this.M.naturalHeight?2:4;Ps(this);this.s()};
576
+k.load=function(){if(0==this.state||3==this.state)this.state=1,this.s(),this.c=[Jc(this.M,"error",this.Dm,this),Jc(this.M,"load",this.Em,this)],this.j(this,this.g)};function Ps(a){a.c.forEach(Ec);a.c=null}var Qs=new Image;Qs.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function Rs(a){a=a?a:{};ng.call(this,{handleEvent:mf});this.g=a.formatConstructors?a.formatConstructors:[];this.o=a.projection?Tb(a.projection):null;this.a=null;this.target=a.target?a.target:null}v(Rs,ng);function Ss(a){a=a.dataTransfer.files;var b;var c=0;for(b=a.length;c<b;++c){var d=a.item(c);var e=new FileReader;e.addEventListener("load",this.j.bind(this,d));e.readAsText(d)}}function Ts(a){a.stopPropagation();a.preventDefault();a.dataTransfer.dropEffect="copy"}
577
+Rs.prototype.j=function(a,b){b=b.target.result;var c=this.v,d=this.o;d||(d=c.Z().v);var c=this.g,e=[],f;var g=0;for(f=c.length;g<f;++g){var h=new c[g];var l={featureProjection:d};try{e=h.Oa(b,l)}catch(m){e=null}if(e&&0<e.length)break}this.b(new Us(Vs,a,e,d))};function Ws(a){var b=a.v;b&&(b=a.target?a.target:b.a,a.a=[y(b,"drop",Ss,a),y(b,"dragenter",Ts,a),y(b,"dragover",Ts,a),y(b,"drop",Ts,a)])}Rs.prototype.Ha=function(a){ng.prototype.Ha.call(this,a);a?Ws(this):Xs(this)};
578
+Rs.prototype.setMap=function(a){Xs(this);ng.prototype.setMap.call(this,a);this.c()&&Ws(this)};function Xs(a){a.a&&(a.a.forEach(Ec),a.a=null)}var Vs="addfeatures";function Us(a,b,c,d){Oc.call(this,a);this.features=c;this.file=b;this.projection=d}v(Us,Oc);function Ys(a){a=a?a:{};Dg.call(this,{handleDownEvent:Zs,handleDragEvent:$s,handleUpEvent:at});this.l=a.condition?a.condition:yg;this.a=this.g=void 0;this.j=0;this.u=void 0!==a.duration?a.duration:400}v(Ys,Dg);
579
+function $s(a){if(Bg(a)){var b=a.map,c=b.Ob(),d=a.pixel;a=d[0]-c[0]/2;d=c[1]/2-d[1];c=Math.atan2(d,a);a=Math.sqrt(a*a+d*d);b=b.Z();b.g.rotation!==Te&&void 0!==this.g&&(d=c-this.g,og(b,b.Qa()-d));this.g=c;void 0!==this.a&&(c=this.a*(b.Pa()/a),qg(b,c));void 0!==this.a&&(this.j=this.a/a);this.a=a}}
580
+function at(a){if(!Bg(a))return!0;a=a.map.Z();cg(a,1,-1);var b=this.j-1,c=a.Qa(),c=a.constrainRotation(c,0);og(a,c,void 0,void 0);var c=a.Pa(),d=this.u,c=a.constrainResolution(c,0,b);qg(a,c,void 0,d);this.j=0;return!1}function Zs(a){return Bg(a)&&this.l(a)?(cg(a.map.Z(),1,1),this.a=this.g=void 0,!0):!1};function bt(a,b,c,d){this.fb=a;this.Ua=b;this.overlaps=d;this.c=0;this.resolution=c;this.ra=this.oa=null;this.a=[];this.coordinates=[];this.T=Bh();this.b=[];this.B=null;this.fa=Bh();this.na=Bh()}v(bt,Wh);
581
+function ct(a,b,c,d,e,f,g){var h=a.coordinates.length,l=a.Sf();g&&(c+=e);g=[b[c],b[c+1]];var m=[NaN,NaN],n=!0,p;for(p=c+e;p<d;p+=e){m[0]=b[p];m[1]=b[p+1];var q=Wa(l,m);q!==r?(n&&(a.coordinates[h++]=g[0],a.coordinates[h++]=g[1]),a.coordinates[h++]=m[0],a.coordinates[h++]=m[1],n=!1):1===q?(a.coordinates[h++]=m[0],a.coordinates[h++]=m[1],n=!1):n=!0;g[0]=m[0];g[1]=m[1];var r=q}if(f&&n||p===c+e)a.coordinates[h++]=g[0],a.coordinates[h++]=g[1];return h}
582
+function dt(a,b){a.oa=[0,b,0];a.a.push(a.oa);a.ra=[0,b,0];a.b.push(a.ra)}bt.prototype.Va=function(a,b){if(this.R){var c=Gh(this.T,this.R.slice());a.translate(c[0],c[1]);a.rotate(b)}a.fill();this.R&&a.setTransform.apply(a,this.na)};
583
+function et(a,b,c,d,e,f,g,h,l){if(a.B&&pa(d,a.T))var m=a.B;else a.B||(a.B=[]),m=pf(a.coordinates,0,a.coordinates.length,2,d,a.B),Fh(a.T,d);d=!wb(f);for(var n=0,p=g.length,q=0,r,u=a.fa,x=a.na,B,E,A,L,oa=0,ha=0,ga=a.a!=g||a.overlaps?0:200;n<p;){var z=g[n];switch(z[0]){case 0:q=z[1];d&&f[w(q).toString()]||!q.V()?n=z[2]:void 0===l||qb(l,q.V().G())?++n:n=z[2]+1;break;case 1:oa>ga&&(a.Va(b,e),oa=0);ha>ga&&(b.stroke(),ha=0);oa||ha||(b.beginPath(),B=E=NaN);++n;break;case 2:q=z[1];r=m[q];z=m[q+1];A=m[q+2]-
584
+r;q=m[q+3]-z;q=Math.sqrt(A*A+q*q);b.moveTo(r+q,z);b.arc(r,z,q,0,2*Math.PI,!0);++n;break;case 3:b.closePath();++n;break;case 4:q=z[1];r=z[2];var M=z[3];var ba=z[4]*c;var da=z[5]*c;var fb=z[6],ca=z[7],Ub=z[8],uc=z[9];var bc=z[10];A=z[11];L=z[12];var Je=z[13],zg=z[14];for(bc&&(A+=e);q<r;q+=2){z=m[q]-ba;bc=m[q+1]-da;Je&&(z=Math.round(z),bc=Math.round(bc));if(1!=L||A){var ff=z+ba,rh=bc+da;Kh(u,ff,rh,L,L,A,-ff,-rh);b.setTransform.apply(b,u)}ff=b.globalAlpha;1!=ca&&(b.globalAlpha=ff*ca);var rh=zg+Ub>M.width?
585
+M.width-Ub:zg,Bq=fb+uc>M.height?M.height-uc:fb;b.drawImage(M,Ub,uc,rh,Bq,z,bc,rh*c,Bq*c);1!=ca&&(b.globalAlpha=ff);(1!=L||A)&&b.setTransform.apply(b,x)}++n;break;case 5:q=z[1];r=z[2];da=z[3];fb=z[4]*c;ca=z[5]*c;A=z[6];L=z[7]*c;M=z[8];ba=z[9];for((bc=z[10])&&(A+=e);q<r;q+=2){z=m[q]+fb;bc=m[q+1]+ca;if(1!=L||A)Kh(u,z,bc,L,L,A,-z,-bc),b.setTransform.apply(b,u);Ub=da.split("\n");uc=Ub.length;1<uc?(Je=Math.round(1.5*b.measureText("M").width),bc-=(uc-1)/2*Je):Je=0;for(zg=0;zg<uc;zg++)ff=Ub[zg],ba&&b.strokeText(ff,
586
+z,bc),M&&b.fillText(ff,z,bc),bc+=Je;(1!=L||A)&&b.setTransform.apply(b,x)}++n;break;case 6:if(h&&(q=z[1],q=h(q)))return q;++n;break;case 7:ga?oa++:a.Va(b,e);++n;break;case 8:q=z[1];r=z[2];z=m[q];bc=m[q+1];A=z+.5|0;L=bc+.5|0;if(A!==B||L!==E)b.moveTo(z,bc),B=A,E=L;for(q+=2;q<r;q+=2)if(z=m[q],bc=m[q+1],A=z+.5|0,L=bc+.5|0,q==r-2||A!==B||L!==E)b.lineTo(z,bc),B=A,E=L;++n;break;case 9:a.R=z[2];oa&&(a.Va(b,e),oa=0,ha&&(b.stroke(),ha=0));b.fillStyle=z[1];++n;break;case 10:var q=void 0!==z[8]?z[8]:!0,ul=z[9];
587
+r=z[2];ha&&(b.stroke(),ha=0);b.strokeStyle=z[1];b.lineWidth=q?r*c:r;b.lineCap=z[3];b.lineJoin=z[4];b.miterLimit=z[5];Td&&(r=z[6],A=z[7],q&&c!==ul&&(r=r.map(function(a){return a*c/ul}),A*=c/ul,z[6]=r,z[7]=A,z[9]=c),b.lineDashOffset=A,b.setLineDash(r));++n;break;case 11:b.font=z[1];b.textAlign=z[2];b.textBaseline=z[3];++n;break;case 12:ga?ha++:b.stroke();++n;break;default:++n}}oa&&a.Va(b,e);ha&&b.stroke()}bt.prototype.La=function(a,b,c,d,e){et(this,a,b,c,d,e,this.a,void 0,void 0)};
588
+function ft(a){var b=a.b;b.reverse();var c,d=b.length,e=-1;for(c=0;c<d;++c){var f=b[c];var g=f[0];if(6==g)e=c;else if(0==g){f[2]=c;f=a.b;for(g=c;e<g;){var h=f[e];f[e]=f[g];f[g]=h;++e;--g}e=-1}}}function gt(a,b){a.oa[2]=a.a.length;a.oa=null;a.ra[2]=a.b.length;a.ra=null;b=[6,b];a.a.push(b);a.b.push(b)}bt.prototype.Te=ua;bt.prototype.Sf=function(){return this.Ua};function ht(a,b,c,d){bt.call(this,a,b,c,d);this.M=this.I=null;this.C=this.D=this.S=this.u=this.v=this.l=this.o=this.j=this.g=this.f=this.i=void 0}v(ht,bt);
589
+ht.prototype.qc=function(a,b){if(this.M){dt(this,b);var c=a.ga(),d=this.coordinates.length;a=ct(this,c,0,c.length,a.qa(),!1,!1);this.a.push([4,d,a,this.M,this.i,this.f,this.g,this.j,this.o,this.l,this.v,this.u,this.S,this.D,this.C]);this.b.push([4,d,a,this.I,this.i,this.f,this.g,this.j,this.o,this.l,this.v,this.u,this.S,this.D,this.C]);gt(this,b)}};
590
+ht.prototype.oc=function(a,b){if(this.M){dt(this,b);var c=a.ga(),d=this.coordinates.length;a=ct(this,c,0,c.length,a.qa(),!1,!1);this.a.push([4,d,a,this.M,this.i,this.f,this.g,this.j,this.o,this.l,this.v,this.u,this.S,this.D,this.C]);this.b.push([4,d,a,this.I,this.i,this.f,this.g,this.j,this.o,this.l,this.v,this.u,this.S,this.D,this.C]);gt(this,b)}};ht.prototype.Te=function(){ft(this);this.f=this.i=void 0;this.M=this.I=null;this.C=this.D=this.u=this.v=this.l=this.o=this.j=this.S=this.g=void 0};
591
+ht.prototype.Ub=function(a){var b=a.Hc(),c=a.ic(),d=a.qg(1),e=a.Y(1),f=a.Oc();this.i=b[0];this.f=b[1];this.I=d;this.M=e;this.g=c[1];this.j=a.f;this.o=f[0];this.l=f[1];this.v=a.l;this.u=a.g;this.S=a.a;this.D=a.v;this.C=c[0]};function it(a,b,c,d){bt.call(this,a,b,c,d);this.f=null;this.i={Md:void 0,Gd:void 0,Hd:null,Id:void 0,Jd:void 0,Kd:void 0,Ld:void 0,eg:0,strokeStyle:void 0,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0}}v(it,bt);function jt(a,b,c,d,e){var f=a.coordinates.length;b=ct(a,b,c,d,e,!1,!1);f=[8,f,b];a.a.push(f);a.b.push(f);return d}k=it.prototype;k.Sf=function(){this.f||(this.f=Ra(this.Ua),0<this.c&&Qa(this.f,this.resolution*(this.c+1)/2,this.f));return this.f};
592
+function kt(a){var b=a.i,c=b.strokeStyle,d=b.lineCap,e=b.lineDash,f=b.lineDashOffset,g=b.lineJoin,h=b.lineWidth,l=b.miterLimit;b.Md==c&&b.Gd==d&&pa(b.Hd,e)&&b.Id==f&&b.Jd==g&&b.Kd==h&&b.Ld==l||(b.eg!=a.coordinates.length&&(a.a.push([12]),b.eg=a.coordinates.length),a.a.push([10,c,h,d,g,l,e,f,!0,1],[1]),b.Md=c,b.Gd=d,b.Hd=e,b.Id=f,b.Jd=g,b.Kd=h,b.Ld=l)}
593
+k.mc=function(a,b){var c=this.i,d=c.lineWidth;void 0!==c.strokeStyle&&void 0!==d&&(kt(this),dt(this,b),this.b.push([10,c.strokeStyle,c.lineWidth,c.lineCap,c.lineJoin,c.miterLimit,c.lineDash,c.lineDashOffset,!0,1],[1]),c=a.ga(),jt(this,c,0,c.length,a.qa()),this.b.push([12]),gt(this,b))};
594
+k.nc=function(a,b){var c=this.i,d=c.lineWidth;if(void 0!==c.strokeStyle&&void 0!==d){kt(this);dt(this,b);this.b.push([10,c.strokeStyle,c.lineWidth,c.lineCap,c.lineJoin,c.miterLimit,c.lineDash,c.lineDashOffset,!0,1],[1]);c=a.Bb();d=a.ga();a=a.qa();var e=0,f;var g=0;for(f=c.length;g<f;++g)e=jt(this,d,e,c[g],a);this.b.push([12]);gt(this,b)}};k.Te=function(){this.i.eg!=this.coordinates.length&&this.a.push([12]);ft(this);this.i=null};
595
+k.Ma=function(a,b){a=b.a;this.i.strokeStyle=id(a?a:Uh);a=b.f;this.i.lineCap=void 0!==a?a:"round";a=b.i;this.i.lineDash=a?a:Th;a=b.g;this.i.lineDashOffset=a?a:0;a=b.j;this.i.lineJoin=void 0!==a?a:"round";a=b.c;this.i.lineWidth=void 0!==a?a:1;b=b.o;this.i.miterLimit=void 0!==b?b:10;this.i.lineWidth>this.c&&(this.c=this.i.lineWidth,this.f=null)};function lt(a,b,c,d){bt.call(this,a,b,c,d);this.f=null;this.i={oh:void 0,Md:void 0,Gd:void 0,Hd:null,Id:void 0,Jd:void 0,Kd:void 0,Ld:void 0,fillStyle:void 0,strokeStyle:void 0,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0}}v(lt,bt);
596
+function mt(a,b,c,d,e){var f=a.i,g=void 0!==f.fillStyle,f=void 0!=f.strokeStyle,h=d.length,l=[1];a.a.push(l);a.b.push(l);for(l=0;l<h;++l){var m=d[l],n=a.coordinates.length;c=ct(a,b,c,m,e,!0,!f);c=[8,n,c];a.a.push(c);a.b.push(c);f&&(c=[3],a.a.push(c),a.b.push(c));c=m}b=[7];a.b.push(b);g&&a.a.push(b);f&&(g=[12],a.a.push(g),a.b.push(g));return c}k=lt.prototype;
597
+k.Zb=function(a,b){var c=this.i,d=c.strokeStyle;if(void 0!==c.fillStyle||void 0!==d){nt(this,a);dt(this,b);this.b.push([9,gd(Sh)]);void 0!==c.strokeStyle&&this.b.push([10,c.strokeStyle,c.lineWidth,c.lineCap,c.lineJoin,c.miterLimit,c.lineDash,c.lineDashOffset,!0,1]);var e=a.ga(),d=this.coordinates.length;ct(this,e,0,e.length,a.qa(),!1,!1);a=[1];d=[2,d];this.a.push(a,d);this.b.push(a,d);a=[7];this.b.push(a);void 0!==c.fillStyle&&this.a.push(a);void 0!==c.strokeStyle&&(c=[12],this.a.push(c),this.b.push(c));
598
+gt(this,b)}};k.rc=function(a,b){var c=this.i;nt(this,a);dt(this,b);this.b.push([9,gd(Sh)]);void 0!==c.strokeStyle&&this.b.push([10,c.strokeStyle,c.lineWidth,c.lineCap,c.lineJoin,c.miterLimit,c.lineDash,c.lineDashOffset,!0,1]);var c=a.Bb(),d=a.ec();mt(this,d,0,c,a.qa());gt(this,b)};
599
+k.pc=function(a,b){var c=this.i,d=c.strokeStyle;if(void 0!==c.fillStyle||void 0!==d){nt(this,a);dt(this,b);this.b.push([9,gd(Sh)]);void 0!==c.strokeStyle&&this.b.push([10,c.strokeStyle,c.lineWidth,c.lineCap,c.lineJoin,c.miterLimit,c.lineDash,c.lineDashOffset,!0,1]);c=a.c;d=fi(a);a=a.qa();var e=0,f;var g=0;for(f=c.length;g<f;++g)e=mt(this,d,e,c[g],a);gt(this,b)}};
600
+k.Te=function(){ft(this);this.i=null;var a=this.fb;if(a){var b=this.coordinates,c;var d=0;for(c=b.length;d<c;++d)b[d]=a*Math.round(b[d]/a)}};k.Sf=function(){this.f||(this.f=Ra(this.Ua),0<this.c&&Qa(this.f,this.resolution*(this.c+1)/2,this.f));return this.f};
601
+k.Ma=function(a,b){var c=this.i;a?(a=a.b,c.fillStyle=id(a?a:Sh)):c.fillStyle=void 0;b?(a=b.a,c.strokeStyle=id(a?a:Uh),a=b.f,c.lineCap=void 0!==a?a:"round",a=b.i,c.lineDash=a?a.slice():Th,a=b.g,c.lineDashOffset=a?a:0,a=b.j,c.lineJoin=void 0!==a?a:"round",a=b.c,c.lineWidth=void 0!==a?a:1,b=b.o,c.miterLimit=void 0!==b?b:10,c.lineWidth>this.c&&(this.c=c.lineWidth,this.f=null)):(c.strokeStyle=void 0,c.lineCap=void 0,c.lineDash=null,c.lineDashOffset=void 0,c.lineJoin=void 0,c.lineWidth=void 0,c.miterLimit=
602
+void 0)};function nt(a,b){var c=a.i,d=c.fillStyle,e=c.strokeStyle,f=c.lineCap,g=c.lineDash,h=c.lineDashOffset,l=c.lineJoin,m=c.lineWidth,n=c.miterLimit;if(void 0!==d&&("string"!==typeof d||c.oh!=d)){var p=[9,d];"string"!==typeof d&&(b=b.G(),p.push([b[0],b[3]]));a.a.push(p);c.oh=c.fillStyle}void 0===e||c.Md==e&&c.Gd==f&&pa(c.Hd,g)&&c.Id==h&&c.Jd==l&&c.Kd==m&&c.Ld==n||(a.a.push([10,e,m,f,l,n,g,h,!0,1]),c.Md=e,c.Gd=f,c.Hd=g,c.Id=h,c.Jd=l,c.Kd=m,c.Ld=n)};function ot(a,b,c,d){bt.call(this,a,b,c,d);this.C=this.D=this.S=null;this.Ia="";this.o=this.j=0;this.l=void 0;this.u=this.v=0;this.g=this.f=this.i=null}v(ot,bt);
603
+ot.prototype.yc=function(a,b,c,d,e,f){if(""!==this.Ia&&this.g&&(this.i||this.f)){if(this.i){e=this.i;var g=this.S;if(!g||g.fillStyle!=e.fillStyle){var h=[9,e.fillStyle];this.a.push(h);this.b.push(h);g?g.fillStyle=e.fillStyle:this.S={fillStyle:e.fillStyle}}}this.f&&(e=this.f,g=this.D,g&&g.lineCap==e.lineCap&&g.lineDash==e.lineDash&&g.lineDashOffset==e.lineDashOffset&&g.lineJoin==e.lineJoin&&g.lineWidth==e.lineWidth&&g.miterLimit==e.miterLimit&&g.strokeStyle==e.strokeStyle||(h=[10,e.strokeStyle,e.lineWidth,
604
+e.lineCap,e.lineJoin,e.miterLimit,e.lineDash,e.lineDashOffset,!1,1],this.a.push(h),this.b.push(h),g?(g.lineCap=e.lineCap,g.lineDash=e.lineDash,g.lineDashOffset=e.lineDashOffset,g.lineJoin=e.lineJoin,g.lineWidth=e.lineWidth,g.miterLimit=e.miterLimit,g.strokeStyle=e.strokeStyle):this.D={lineCap:e.lineCap,lineDash:e.lineDash,lineDashOffset:e.lineDashOffset,lineJoin:e.lineJoin,lineWidth:e.lineWidth,miterLimit:e.miterLimit,strokeStyle:e.strokeStyle}));e=this.g;g=this.C;g&&g.font==e.font&&g.textAlign==
605
+e.textAlign&&g.textBaseline==e.textBaseline||(h=[11,e.font,e.textAlign,e.textBaseline],this.a.push(h),this.b.push(h),g?(g.font=e.font,g.textAlign=e.textAlign,g.textBaseline=e.textBaseline):this.C={font:e.font,textAlign:e.textAlign,textBaseline:e.textBaseline});dt(this,f);e=this.coordinates.length;a=ct(this,a,b,c,d,!1,!1);a=[5,e,a,this.Ia,this.j,this.o,this.v,this.u,!!this.i,!!this.f,this.l];this.a.push(a);this.b.push(a);gt(this,f)}};
606
+ot.prototype.Cb=function(a){if(a){var b=a.Fa();b?(b=b.b,b=id(b?b:Sh),this.i?this.i.fillStyle=b:this.i={fillStyle:b}):this.i=null;var c=a.Ga();if(c){var b=c.a,d=c.f,e=c.i,f=c.g,g=c.j,h=c.c,c=c.o,d=void 0!==d?d:"round",e=e?e.slice():Th,f=void 0!==f?f:0,g=void 0!==g?g:"round",h=void 0!==h?h:1,c=void 0!==c?c:10,b=id(b?b:Uh);if(this.f){var l=this.f;l.lineCap=d;l.lineDash=e;l.lineDashOffset=f;l.lineJoin=g;l.lineWidth=h;l.miterLimit=c;l.strokeStyle=b}else this.f={lineCap:d,lineDash:e,lineDashOffset:f,lineJoin:g,
607
+lineWidth:h,miterLimit:c,strokeStyle:b}}else this.f=null;var m=a.a,b=a.i,d=a.c,e=a.o,h=a.f,c=a.b,f=a.Na(),g=a.g,l=a.j;a=void 0!==m?m:"10px sans-serif";g=void 0!==g?g:"center";l=void 0!==l?l:"middle";this.g?(m=this.g,m.font=a,m.textAlign=g,m.textBaseline=l):this.g={font:a,textAlign:g,textBaseline:l};this.Ia=void 0!==f?f:"";this.j=void 0!==b?b:0;this.o=void 0!==d?d:0;this.l=void 0!==e?e:!1;this.v=void 0!==h?h:0;this.u=void 0!==c?c:1}else this.Ia=""};function pt(a,b,c,d,e){this.v=a;this.c=b;this.o=d;this.l=c;this.f=e;this.a={};this.g=jd(1,1);this.j=Bh()}v(pt,ki);var qt={0:[[!0]]};function rt(a,b,c){var d,e=Math.floor(a.length/2);if(b>=e)for(d=e;d<b;d++)a[d][c]=!0;else if(b<e)for(d=b+1;d<e;d++)a[d][c]=!0}
608
+function st(a){if(void 0!==qt[a])return qt[a];for(var b=2*a+1,c=Array(b),d=0;d<b;d++)c[d]=Array(b);for(var b=a,e=d=0;b>=d;)rt(c,a+b,a+d),rt(c,a+d,a+b),rt(c,a-d,a+b),rt(c,a-b,a+d),rt(c,a-b,a-d),rt(c,a-d,a-b),rt(c,a+d,a-b),rt(c,a+b,a-d),d++,e+=1+2*d,0<2*(e-b)+1&&(--b,e+=1-2*b);return qt[a]=c}function tt(a){for(var b in a.a){var c=a.a[b],d;for(d in c)c[d].Te()}}
609
+pt.prototype.Ea=function(a,b,c,d,e,f){d=Math.round(d);var g=2*d+1,h=Kh(this.j,d+.5,d+.5,1/b,-1/b,-c,-a[0],-a[1]),l=this.g;l.canvas.width!==g||l.canvas.height!==g?(l.canvas.width=g,l.canvas.height=g):l.clearRect(0,0,g,g);if(void 0!==this.f){var m=Oa();Pa(m,a);Qa(m,b*(this.f+d),m)}var n=st(d);return ut(this,l,h,c,e,function(a){for(var b=l.getImageData(0,0,g,g).data,c=0;c<g;c++)for(var d=0;d<g;d++)if(n[c][d]&&0<b[4*(d*g+c)+3]){if(a=f(a))return a;l.clearRect(0,0,g,g);return}},m)};
610
+function vt(a,b){var c=a.c;a=c[0];var d=c[1],e=c[2],c=c[3];a=[a,d,a,c,e,c,e,d];pf(a,0,8,2,b,a);return a}pt.prototype.b=function(a,b){var c=void 0!==a?a.toString():"0";a=this.a[c];void 0===a&&(a={},this.a[c]=a);c=a[b];void 0===c&&(c=new wt[b](this.v,this.c,this.l,this.o),a[b]=c);return c};pt.prototype.i=function(){return wb(this.a)};
611
+pt.prototype.La=function(a,b,c,d,e,f){var g=Object.keys(this.a).map(Number);g.sort(ia);var h=vt(this,c);a.save();a.beginPath();a.moveTo(h[0],h[1]);a.lineTo(h[2],h[3]);a.lineTo(h[4],h[5]);a.lineTo(h[6],h[7]);a.clip();f=f?f:ji;var l,m,h=0;for(l=g.length;h<l;++h){var n=this.a[g[h].toString()];var p=0;for(m=f.length;p<m;++p){var q=n[f[p]];void 0!==q&&q.La(a,b,c,d,e)}}a.restore()};
612
+function ut(a,b,c,d,e,f,g){var h=Object.keys(a.a).map(Number);h.sort(function(a,b){return b-a});var l,m;var n=0;for(l=h.length;n<l;++n){var p=a.a[h[n].toString()];for(m=ji.length-1;0<=m;--m){var q=p[ji[m]];if(void 0!==q&&(q=et(q,b,1,c,d,e,q.b,f,g)))return q}}}var wt={Circle:lt,Image:ht,LineString:it,Polygon:lt,Text:ot};function xt(a){Sc.call(this);this.a=a}v(xt,Sc);xt.prototype.Ea=ua;xt.prototype.Ue=nf;xt.prototype.Nf=function(a,b,c){return function(d,e){return yt(a,b,d,e,function(a){c[d]||(c[d]={});c[d][a.ta.toString()]=a})}};xt.prototype.na=function(a){2===a.target.getState()&&zt(this)};function At(a,b){var c=b.getState();2!=c&&3!=c&&y(b,"change",a.na,a);0==c&&(b.load(),c=b.getState());return 2==c}function zt(a){var b=a.a;b.Mb()&&"ready"==b.$f()&&a.s()}
613
+function Bt(a,b){b.Ki()&&a.postRenderFunctions.push(function(a,b,e){b=w(a).toString();a.fd(e.viewState.projection,e.usedTiles[b])}.bind(null,b))}function Ct(a,b){if(b){var c;var d=0;for(c=b.length;d<c;++d){var e=b[d];a[w(e).toString()]=e}}}function Dt(a,b){b=b.D;void 0!==b&&("string"===typeof b?a.logos[b]="":b&&(xa("string"==typeof b.href,44),xa("string"==typeof b.src,45),a.logos[b.src]=b.href))}
614
+function Et(a,b,c,d){b=w(b).toString();c=c.toString();b in a?c in a[b]?(a=a[b][c],d.ca<a.ca&&(a.ca=d.ca),d.$>a.$&&(a.$=d.$),d.da<a.da&&(a.da=d.da),d.ia>a.ia&&(a.ia=d.ia)):a[b][c]=d:(a[b]={},a[b][c]=d)}
615
+function Ft(a,b,c,d,e,f,g,h,l,m){var n=w(b).toString();n in a.wantedTiles||(a.wantedTiles[n]={});var p=a.wantedTiles[n];a=a.tileQueue;var q=c.minZoom,r,u,x;for(x=g;x>=q;--x){var B=oc(c,f,x,B);var E=c.Da(x);for(r=B.ca;r<=B.$;++r)for(u=B.da;u<=B.ia;++u)if(g-x<=h){var A=b.Nc(x,r,u,d,e);0==A.getState()&&(p[A.bb()]=!0,A.bb()in a.a||a.f([A,n,tc(c,A.ta),E]));l&&l.call(m,A)}else b.Ug(x,r,u,e)}};function Gt(a){xt.call(this,a);this.fa=Bh()}v(Gt,xt);function Ht(a,b,c){var d=b.pixelRatio,e=b.size[0]*d,f=b.size[1]*d,g=b.viewState.rotation,h=ib(c),l=hb(c),m=gb(c);c=eb(c);Gh(b.coordinateToPixelTransform,h);Gh(b.coordinateToPixelTransform,l);Gh(b.coordinateToPixelTransform,m);Gh(b.coordinateToPixelTransform,c);a.save();Vh(a,-g,e/2,f/2);a.beginPath();a.moveTo(h[0]*d,h[1]*d);a.lineTo(l[0]*d,l[1]*d);a.lineTo(m[0]*d,m[1]*d);a.lineTo(c[0]*d,c[1]*d);a.clip();Vh(a,g,e/2,f/2)}
616
+function It(a,b,c,d,e){var f=a.a;if(Rc(f,b)){var g=d.size[0]*d.pixelRatio,h=d.size[1]*d.pixelRatio,l=d.viewState.rotation;Vh(c,-l,g/2,h/2);a=e?e:Jt(a,d,0);f.b(new Rh(b,new Xh(c,d.pixelRatio,d.extent,a,d.viewState.rotation),d,c,null));Vh(c,l,g/2,h/2)}}Gt.prototype.u=function(a,b,c,d){if(this.Ea(a,b,0,mf,this))return c.call(d,this.a,null)};Gt.prototype.ef=function(a,b,c,d){It(this,"postcompose",a,b,d)};
617
+function Jt(a,b,c){var d=b.viewState,e=b.pixelRatio,f=e/d.resolution;return Kh(a.fa,e*b.size[0]/2,e*b.size[1]/2,f,-f,-d.rotation,-d.center[0]+c,-d.center[1])};function Kt(a,b){return w(a)-w(b)}function Lt(a,b){a=.5*a/b;return a*a}function Mt(a,b,c,d,e,f){var g=!1,h;if(h=c.Y()){var l=h.Ye();2==l||3==l?h.Bj(e,f):(0==l&&h.load(),h.Nh(e,f),g=!0)}if(e=(0,c.Za)(b))d=e.Vd(d),(0,Nt[d.U()])(a,d,c,b);return g}
618
+var Nt={Point:function(a,b,c,d){var e=c.Y();if(e){if(2!=e.Ye())return;var f=a.b(c.Ba(),"Image");f.Ub(e);f.qc(b,d)}if(e=c.Na())a=a.b(c.Ba(),"Text"),a.Cb(e),a.yc(b.ga(),0,2,2,b,d)},LineString:function(a,b,c,d){var e=c.Ga();if(e){var f=a.b(c.Ba(),"LineString");f.Ma(null,e);f.mc(b,d)}if(e=c.Na())a=a.b(c.Ba(),"Text"),a.Cb(e),a.yc(di(b),0,2,2,b,d)},Polygon:function(a,b,c,d){var e=c.Fa(),f=c.Ga();if(e||f){var g=a.b(c.Ba(),"Polygon");g.Ma(e,f);g.rc(b,d)}if(e=c.Na())a=a.b(c.Ba(),"Text"),a.Cb(e),a.yc(Wf(b),
619
+0,2,2,b,d)},MultiPoint:function(a,b,c,d){var e=c.Y();if(e){if(2!=e.Ye())return;var f=a.b(c.Ba(),"Image");f.Ub(e);f.oc(b,d)}if(e=c.Na())a=a.b(c.Ba(),"Text"),a.Cb(e),c=b.ga(),a.yc(c,0,c.length,b.qa(),b,d)},MultiLineString:function(a,b,c,d){var e=c.Ga();if(e){var f=a.b(c.Ba(),"LineString");f.Ma(null,e);f.nc(b,d)}if(e=c.Na())a=a.b(c.Ba(),"Text"),a.Cb(e),c=ei(b),a.yc(c,0,c.length,2,b,d)},MultiPolygon:function(a,b,c,d){var e=c.Fa(),f=c.Ga();if(f||e){var g=a.b(c.Ba(),"Polygon");g.Ma(e,f);g.pc(b,d)}if(e=
620
+c.Na())a=a.b(c.Ba(),"Text"),a.Cb(e),c=gi(b),a.yc(c,0,c.length,2,b,d)},GeometryCollection:function(a,b,c,d){b=b.a;var e;var f=0;for(e=b.length;f<e;++f)(0,Nt[b[f].U()])(a,b[f],c,d)},Circle:function(a,b,c,d){var e=c.Fa(),f=c.Ga();if(e||f){var g=a.b(c.Ba(),"Circle");g.Ma(e,f);g.Zb(b,d)}if(e=c.Na())a=a.b(c.Ba(),"Text"),a.Cb(e),a.yc(b.wa(),0,2,2,b,d)}};function Ot(a){Gt.call(this,a);this.c=!1;this.v=-1;this.l=NaN;this.j=Oa();this.f=this.o=null;this.g=jd()}v(Ot,Gt);
621
+Ot.prototype.S=function(a,b,c){var d=a.extent,e=a.pixelRatio,f=b.Je?a.skippedFeatureUids:{},g=a.viewState,h=g.projection,g=g.rotation,l=h.G(),m=this.a.ha(),n=Jt(this,a,0);It(this,"precompose",c,a,n);var p=b.extent,q=void 0!==p;q&&Ht(c,a,p);if((p=this.f)&&!p.i()){var r=0,u=0;if(Rc(this.a,"render")){var x=c.canvas.width;var B=c.canvas.height;if(g){var E=Math.round(Math.sqrt(x*x+B*B)),r=(E-x)/2,u=(E-B)/2;x=B=E}this.g.canvas.width=x;this.g.canvas.height=B;x=this.g}else x=c;B=x.globalAlpha;x.globalAlpha=
622
+b.opacity;x!=c&&x.translate(r,u);var E=a.size[0]*e,A=a.size[1]*e;Vh(x,-g,E/2,A/2);p.La(x,e,n,g,f);if(m.u&&h.i&&!Va(l,d)){for(var h=d[0],m=lb(l),L=0;h<l[0];)--L,n=m*L,n=Jt(this,a,n),p.La(x,e,n,g,f),h+=m;L=0;for(h=d[2];h>l[2];)++L,n=m*L,n=Jt(this,a,n),p.La(x,e,n,g,f),h-=m;n=Jt(this,a,0)}Vh(x,g,E/2,A/2);x!=c&&(It(this,"render",x,a,n),c.drawImage(x.canvas,-r,-u),x.translate(-r,-u));x.globalAlpha=B}q&&c.restore();this.ef(c,a,b,n)};
623
+Ot.prototype.Ea=function(a,b,c,d,e){if(this.f){var f=this.a,g={};return this.f.Ea(a,b.viewState.resolution,b.viewState.rotation,c,{},function(a){var b=w(a).toString();if(!(b in g))return g[b]=!0,d.call(e,a,f)})}};Ot.prototype.D=function(){zt(this)};
624
+Ot.prototype.sd=function(a){function b(a){var b=a.Lc();if(b)var d=b.call(a,m);else(b=c.f)&&(d=b(a,m));if(d){if(d){b=!1;if(Array.isArray(d))for(var e=0,f=d.length;e<f;++e)b=Mt(q,a,d[e],Lt(m,n),this.D,this)||b;else b=Mt(q,a,d,Lt(m,n),this.D,this)||b;a=b}else a=!1;this.c=this.c||a}}var c=this.a,d=c.ha();Ct(a.attributions,d.j);Dt(a,d);var e=a.viewHints[0],f=a.viewHints[1],g=c.T,h=c.na;if(!this.c&&!g&&e||!h&&f)return!0;var l=a.extent,h=a.viewState,e=h.projection,m=h.resolution,n=a.pixelRatio,f=c.i,p=c.c,
625
+g=c.get(Pt);void 0===g&&(g=Kt);l=Qa(l,p*m);p=h.projection.G();d.u&&h.projection.i&&!Va(p,a.extent)&&(a=Math.max(lb(l)/2,lb(p)),l[0]=p[0]-a,l[2]=p[2]+a);if(!this.c&&this.l==m&&this.v==f&&this.o==g&&Va(this.j,l))return!0;this.f=null;this.c=!1;var q=new pt(.5*m/n,l,m,d.T,c.c);d.Yd(l,m,e);if(g){var r=[];d.$b(l,function(a){r.push(a)},this);r.sort(g);r.forEach(b,this)}else d.$b(l,b,this);tt(q);this.l=m;this.v=f;this.o=g;this.j=l;this.f=q;return!0};function Qt(){this.b="precision mediump float;varying vec2 a;uniform float f;uniform sampler2D g;void main(void){vec4 texColor=texture2D(g,a);gl_FragColor.rgb=texColor.rgb;gl_FragColor.a=texColor.a*f;}"}v(Qt,mi);var Rt=new Qt;function St(){this.b="varying vec2 a;attribute vec2 b;attribute vec2 c;uniform mat4 d;uniform mat4 e;void main(void){gl_Position=e*vec4(b,0.,1.);a=(d*vec4(c,0.,1.)).st;}"}v(St,ni);var Tt=new St;
626
+function Ut(a,b){this.i=a.getUniformLocation(b,"f");this.c=a.getUniformLocation(b,"e");this.g=a.getUniformLocation(b,"d");this.f=a.getUniformLocation(b,"g");this.b=a.getAttribLocation(b,"b");this.a=a.getAttribLocation(b,"c")};function Vt(a,b){xt.call(this,b);this.c=a;this.T=new Di([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]);this.g=this.Ib=null;this.j=void 0;this.v=Bh();this.S=Bh();this.C=ti();this.u=null}v(Vt,xt);
627
+function Wt(a,b,c){var d=a.c.i;if(void 0===a.j||a.j!=c){b.postRenderFunctions.push(function(a,b,c){a.isContextLost()||(a.deleteFramebuffer(b),a.deleteTexture(c))}.bind(null,d,a.g,a.Ib));b=Qi(d,c,c);var e=d.createFramebuffer();d.bindFramebuffer(36160,e);d.framebufferTexture2D(36160,36064,3553,b,0);a.Ib=b;a.g=e;a.j=c}else d.bindFramebuffer(36160,a.g)}
628
+Vt.prototype.Gi=function(a,b,c){Xt(this,"precompose",c,a);wi(c,34962,this.T);var d=c.b,e=Hi(c,Rt,Tt);if(this.u)var f=this.u;else this.u=f=new Ut(d,e);c.Qc(e)&&(d.enableVertexAttribArray(f.b),d.vertexAttribPointer(f.b,2,5126,!1,16,0),d.enableVertexAttribArray(f.a),d.vertexAttribPointer(f.a,2,5126,!1,16,8),d.uniform1i(f.f,0));d.uniformMatrix4fv(f.g,!1,ui(this.C,this.v));d.uniformMatrix4fv(f.c,!1,ui(this.C,this.S));d.uniform1f(f.i,b.opacity);d.bindTexture(3553,this.Ib);d.drawArrays(5,0,4);Xt(this,"postcompose",
629
+c,a)};function Xt(a,b,c,d){a=a.a;if(Rc(a,b)){var e=d.viewState;a.b(new Rh(b,new kk(c,e.center,e.resolution,e.rotation,d.size,d.extent,d.pixelRatio),d,null,c))}}Vt.prototype.mg=function(){this.g=this.Ib=null;this.j=void 0};function Yt(a,b){Vt.call(this,a,b);this.l=!1;this.R=-1;this.I=NaN;this.D=Oa();this.o=this.f=this.B=null}v(Yt,Vt);k=Yt.prototype;k.Gi=function(a,b,c){this.o=b;var d=a.viewState,e=this.f,f=a.size,g=a.pixelRatio,h=this.c.i;e&&!e.i()&&(h.enable(h.SCISSOR_TEST),h.scissor(0,0,f[0]*g,f[1]*g),e.La(c,d.center,d.resolution,d.rotation,f,g,b.opacity,b.Je?a.skippedFeatureUids:{}),h.disable(h.SCISSOR_TEST))};k.ka=function(){var a=this.f;a&&(ek(a,this.c.f)(),this.f=null);Vt.prototype.ka.call(this)};
630
+k.Ea=function(a,b,c,d,e){if(this.f&&this.o){c=b.viewState;var f=this.a,g={};return this.f.Ea(a,this.c.f,c.center,c.resolution,c.rotation,b.size,b.pixelRatio,this.o.opacity,{},function(a){var b=w(a).toString();if(!(b in g))return g[b]=!0,d.call(e,a,f)})}};k.Ue=function(a,b){if(this.f&&this.o){var c=b.viewState;return jk(this.f,a,this.c.f,c.resolution,c.rotation,b.pixelRatio,this.o.opacity,b.skippedFeatureUids)}return!1};
631
+k.lg=function(a,b,c,d){a=Gh(b.pixelToCoordinateTransform,a.slice());if(this.Ue(a,b))return c.call(d,this.a,null)};k.Hi=function(){zt(this)};
632
+k.ng=function(a,b,c){function d(a){var b=a.Lc();if(b)var c=b.call(a,m);else(b=e.f)&&(c=b(a,m));if(c){if(c){b=!1;if(Array.isArray(c))for(var d=c.length-1;0<=d;--d)b=Mt(q,a,c[d],Lt(m,n),this.Hi,this)||b;else b=Mt(q,a,c,Lt(m,n),this.Hi,this)||b;a=b}else a=!1;this.l=this.l||a}}var e=this.a;b=e.ha();Ct(a.attributions,b.j);Dt(a,b);var f=a.viewHints[0],g=a.viewHints[1],h=e.T,l=e.na;if(!this.l&&!h&&f||!l&&g)return!0;var g=a.extent,h=a.viewState,f=h.projection,m=h.resolution,n=a.pixelRatio,h=e.i,p=e.c,l=e.get(Pt);
633
+void 0===l&&(l=Kt);g=Qa(g,p*m);if(!this.l&&this.I==m&&this.R==h&&this.B==l&&Va(this.D,g))return!0;this.f&&a.postRenderFunctions.push(ek(this.f,c));this.l=!1;var q=new dk(.5*m/n,g,e.c);b.Yd(g,m,f);if(l){var r=[];b.$b(g,function(a){r.push(a)},this);r.sort(l);r.forEach(d,this)}else b.$b(g,d,this);fk(q,c);this.I=m;this.R=h;this.B=l;this.D=g;this.f=q;return!0};function T(a){a=a?a:{};var b=tb({},a);delete b.style;delete b.renderBuffer;delete b.updateWhileAnimating;delete b.updateWhileInteracting;wh.call(this,b);this.c=void 0!==a.renderBuffer?a.renderBuffer:100;this.u=null;this.f=void 0;this.g(a.style);this.T=void 0!==a.updateWhileAnimating?a.updateWhileAnimating:!1;this.na=void 0!==a.updateWhileInteracting?a.updateWhileInteracting:!1}v(T,wh);T.prototype.Fd=function(a){var b=null,c=a.U();"canvas"===c?b=new Ot(this):"webgl"===c&&(b=new Yt(a,this));return b};
634
+T.prototype.D=function(){return this.u};T.prototype.C=function(){return this.f};T.prototype.g=function(a){this.u=void 0!==a?a:fl;this.f=null===a?void 0:dl(this.u);this.s()};var Pt="renderOrder";function Zt(){return[[-Infinity,-Infinity,Infinity,Infinity]]};function $t(a){Tc.call(this);this.c=Tb(a.projection);this.j=au(a.attributions);this.D=a.logo;this.na=void 0!==a.state?a.state:"ready";this.u=void 0!==a.wrapX?a.wrapX:!1}v($t,Tc);function au(a){if("string"===typeof a)return[new Ac({html:a})];if(a instanceof Ac)return[a];if(Array.isArray(a)){for(var b=a.length,c=Array(b),d=0;d<b;d++){var e=a[d];c[d]="string"===typeof e?new Ac({html:e}):e}return c}return null}k=$t.prototype;k.Ea=ua;k.ya=function(){return this.j};k.xa=function(){return this.D};k.za=function(){return this.c};
635
+k.getState=function(){return this.na};k.sa=function(){this.s()};k.ua=function(a){this.j=au(a);this.s()};function bu(a,b){a.na=b;a.s()};function U(a){a=a||{};$t.call(this,{attributions:a.attributions,logo:a.logo,projection:void 0,state:"ready",wrapX:void 0!==a.wrapX?a.wrapX:!0});this.B=ua;this.C=a.format;this.T=void 0==a.overlaps?!0:a.overlaps;this.I=a.url;a.loader?this.B=a.loader:void 0!==this.I&&(xa(this.C,7),this.B=Dl(this.I,this.C));this.fa=a.strategy?a.strategy:Zt;var b=void 0!==a.useSpatialIndex?a.useSpatialIndex:!0;this.a=b?new Gj:null;this.R=new Gj;this.g={};this.o={};this.l={};this.v={};this.f=null;if(a.features instanceof
636
+Yc){var c=a.features;var d=c.a}else Array.isArray(a.features)&&(d=a.features);b||c||(c=new Yc(d));d&&cu(this,d);c&&du(this,c)}v(U,$t);k=U.prototype;k.yb=function(a){var b=w(a).toString();if(eu(this,b,a)){fu(this,b,a);var c=a.V();c?(b=c.G(),this.a&&this.a.Ca(b,a)):this.g[b]=a;this.b(new gu("addfeature",a))}this.s()};function fu(a,b,c){a.v[b]=[y(c,"change",a.Oi,a),y(c,"propertychange",a.Oi,a)]}
637
+function eu(a,b,c){var d=!0,e=c.a;void 0!==e?e.toString()in a.o?d=!1:a.o[e.toString()]=c:(xa(!(b in a.l),30),a.l[b]=c);return d}k.cd=function(a){cu(this,a);this.s()};function cu(a,b){var c,d=[],e=[],f=[];var g=0;for(c=b.length;g<c;g++){var h=b[g];var l=w(h).toString();eu(a,l,h)&&e.push(h)}g=0;for(c=e.length;g<c;g++)h=e[g],l=w(h).toString(),fu(a,l,h),(b=h.V())?(l=b.G(),d.push(l),f.push(h)):a.g[l]=h;a.a&&a.a.load(d,f);g=0;for(c=e.length;g<c;g++)a.b(new gu("addfeature",e[g]))}
638
+function du(a,b){var c=!1;y(a,"addfeature",function(a){c||(c=!0,b.push(a.feature),c=!1)});y(a,"removefeature",function(a){c||(c=!0,b.remove(a.feature),c=!1)});y(b,"add",function(a){c||(c=!0,this.yb(a.element),c=!1)},a);y(b,"remove",function(a){c||(c=!0,this.Gb(a.element),c=!1)},a);a.f=b}
639
+k.clear=function(a){if(a){for(var b in this.v)this.v[b].forEach(Ec);this.f||(this.v={},this.o={},this.l={})}else if(this.a){this.a.forEach(this.Ig,this);for(var c in this.g)this.Ig(this.g[c])}this.f&&this.f.clear();this.a&&this.a.clear();this.R.clear();this.g={};this.b(new gu("clear"));this.s()};k.sh=function(a,b){if(this.a)return this.a.forEach(a,b);if(this.f)return this.f.forEach(a,b)};function hu(a,b,c){a.$b([b[0],b[1],b[0],b[1]],function(a){if(a.V().sb(b))return c.call(void 0,a)})}
640
+k.$b=function(a,b,c){if(this.a)return Lj(this.a,a,b,c);if(this.f)return this.f.forEach(b,c)};k.th=function(a,b,c){return this.$b(a,function(d){if(d.V().Xa(a)&&(d=b.call(c,d)))return d})};k.Ah=function(){return this.f};k.Xe=function(){if(this.f)var a=this.f.a;else this.a&&(a=Ij(this.a),wb(this.g)||la(a,vb(this.g)));return a};k.zh=function(a){var b=[];hu(this,a,function(a){b.push(a)});return b};k.Uf=function(a){return Jj(this.a,a)};
641
+k.vh=function(a,b){var c=a[0],d=a[1],e=null,f=[NaN,NaN],g=Infinity,h=[-Infinity,-Infinity,Infinity,Infinity],l=b?b:mf;Lj(this.a,h,function(a){if(l(a)){var b=a.V(),m=g;g=b.Kb(c,d,f,g);g<m&&(e=a,a=Math.sqrt(g),h[0]=c-a,h[1]=d-a,h[2]=c+a,h[3]=d+a)}});return e};k.G=function(a){return this.a.G(a)};k.yh=function(a){a=this.o[a.toString()];return void 0!==a?a:null};k.Mi=function(){return this.C};k.Ni=function(){return this.I};
642
+k.Oi=function(a){a=a.target;var b=w(a).toString(),c=a.V();c?(c=c.G(),b in this.g?(delete this.g[b],this.a&&this.a.Ca(c,a)):this.a&&Hj(this.a,c,a)):b in this.g||(this.a&&this.a.remove(a),this.g[b]=a);c=a.a;void 0!==c?(c=c.toString(),b in this.l?(delete this.l[b],this.o[c]=a):this.o[c]!==a&&(iu(this,a),this.o[c]=a)):b in this.l||(iu(this,a),this.l[b]=a);this.s();this.b(new gu("changefeature",a))};
643
+k.Yd=function(a,b,c){var d=this.R;a=this.fa(a,b);var e;var f=0;for(e=a.length;f<e;++f){var g=a[f];Lj(d,g,function(a){return Va(a.extent,g)})||(this.B.call(this,g,b,c),d.Ca(g,{extent:g.slice()}))}};k.Gb=function(a){var b=w(a).toString();b in this.g?delete this.g[b]:this.a&&this.a.remove(a);this.Ig(a);this.s()};k.Ig=function(a){var b=w(a).toString();this.v[b].forEach(Ec);delete this.v[b];var c=a.a;void 0!==c?delete this.o[c.toString()]:delete this.l[b];this.b(new gu("removefeature",a))};
644
+function iu(a,b){for(var c in a.o)if(a.o[c]===b){delete a.o[c];break}}function gu(a,b){Oc.call(this,a);this.feature=b}v(gu,Oc);function ju(a){Dg.call(this,{handleDownEvent:ku,handleEvent:lu,handleUpEvent:mu});this.T=!1;this.fa=null;this.u=!1;this.Yb=a.source?a.source:null;this.$a=a.features?a.features:null;this.wk=a.snapTolerance?a.snapTolerance:12;this.R=a.type;this.g=nu(this.R);this.Sa=a.minPoints?a.minPoints:this.g===ou?3:2;this.va=a.maxPoints?a.maxPoints:Infinity;this.Cf=a.finishCondition?a.finishCondition:mf;var b=a.geometryFunction;if(!b)if("Circle"===this.R)b=function(a,b){b=b?b:new ys([NaN,NaN]);b.Ng(a[0],Math.sqrt(hf(a[0],
645
+a[1])));return b};else{var c,d=this.g;d===pu?c=C:d===qu?c=O:d===ou&&(c=D);b=function(a,b){b?d===ou?b.ma([a[0].concat([a[0][0]])]):b.ma(a):b=new c(a);return b}}this.Za=b;this.I=this.C=this.a=this.B=this.j=this.l=null;this.ad=a.clickTolerance?a.clickTolerance*a.clickTolerance:36;this.pa=new T({source:new U({useSpatialIndex:!1,wrapX:a.wrapX?a.wrapX:!1}),style:a.style?a.style:ru()});this.xb=a.geometryName;this.vk=a.condition?a.condition:xg;this.Df=a.freehand?mf:a.freehandCondition?a.freehandCondition:
646
+yg;y(this,Vc("active"),this.ri,this)}v(ju,Dg);function ru(){var a=gl();return function(b){return a[b.V().U()]}}k=ju.prototype;k.setMap=function(a){Dg.prototype.setMap.call(this,a);this.ri()};function lu(a){this.u=this.g!==pu&&this.Df(a);var b=!this.u;this.u&&"pointerdrag"===a.type&&null!==this.j?(su(this,a),b=!1):"pointermove"===a.type?b=tu(this,a):"dblclick"===a.type&&(b=!1);return Eg.call(this,a)&&b}
647
+function ku(a){this.T=!this.u;return this.u?(this.fa=a.pixel,this.l||uu(this,a),!0):this.vk(a)?(this.fa=a.pixel,!0):!1}function mu(a){var b=!0;tu(this,a);var c=this.g===vu;this.T?(this.l?this.u||c?this.Pd():wu(this,a)?this.Cf(a)&&this.Pd():su(this,a):(uu(this,a),this.g===pu&&this.Pd()),b=!1):this.u&&(this.l=null,xu(this));return b}
648
+function tu(a,b){if(a.fa&&(!a.u&&a.T||a.u&&!a.T)){var c=a.fa,d=b.pixel,e=c[0]-d[0],c=c[1]-d[1],e=e*e+c*c;a.T=a.u?e>a.ad:e<=a.ad}a.l?(e=b.coordinate,c=a.j.V(),a.g===pu?d=a.a:a.g===ou?(d=a.a[0],d=d[d.length-1],wu(a,b)&&(e=a.l.slice())):(d=a.a,d=d[d.length-1]),d[0]=e[0],d[1]=e[1],a.Za(a.a,c),a.B&&a.B.V().ma(e),c instanceof D&&a.g!==ou?(a.C||(a.C=new H(new O(null))),e=c.Ch(0),b=a.C.V(),b.ba(e.ja,e.ga())):a.I&&(b=a.C.V(),b.ma(a.I)),yu(a)):(b=b.coordinate.slice(),a.B?a.B.V().ma(b):(a.B=new H(new C(b)),
649
+yu(a)));return!0}function wu(a,b){var c=!1;if(a.j){var d=!1,e=[a.l];a.g===qu?d=a.a.length>a.Sa:a.g===ou&&(d=a.a[0].length>a.Sa,e=[a.a[0][0],a.a[0][a.a[0].length-2]]);if(d)for(var d=b.map,f=0,g=e.length;f<g;f++){var h=e[f],l=d.Ja(h),m=b.pixel,c=m[0]-l[0],l=m[1]-l[1];if(c=Math.sqrt(c*c+l*l)<=(a.u?1:a.wk)){a.l=h;break}}}return c}
650
+function uu(a,b){b=b.coordinate;a.l=b;a.g===pu?a.a=b.slice():a.g===ou?(a.a=[[b.slice(),b.slice()]],a.I=a.a[0]):(a.a=[b.slice(),b.slice()],a.g===vu&&(a.I=a.a));a.I&&(a.C=new H(new O(a.I)));b=a.Za(a.a);a.j=new H;a.xb&&a.j.Tc(a.xb);a.j.Ra(b);yu(a);a.b(new zu("drawstart",a.j))}
651
+function su(a,b){b=b.coordinate;var c=a.j.V(),d;if(a.g===qu){a.l=b.slice();var e=a.a;e.length>=a.va&&(a.u?e.pop():d=!0);e.push(b.slice());a.Za(e,c)}else a.g===ou&&(e=a.a[0],e.length>=a.va&&(a.u?e.pop():d=!0),e.push(b.slice()),d&&(a.l=e[0]),a.Za(a.a,c));yu(a);d&&a.Pd()}
652
+k.Op=function(){if(this.j){var a=this.j.V();if(this.g===qu){var b=this.a;b.splice(-2,1);this.Za(b,a);2<=b.length&&(this.l=b[b.length-2].slice())}else if(this.g===ou){b=this.a[0];b.splice(-2,1);var c=this.C.V();c.ma(b);this.Za(this.a,a)}0===b.length&&(this.l=null);yu(this)}};
653
+k.Pd=function(){var a=xu(this),b=this.a,c=a.V();this.g===qu?(b.pop(),this.Za(b,c)):this.g===ou&&(b[0].pop(),this.Za(b,c),b=c.X());"MultiPoint"===this.R?a.Ra(new Q([b])):"MultiLineString"===this.R?a.Ra(new P([b])):"MultiPolygon"===this.R&&a.Ra(new R([b]));this.b(new zu("drawend",a));this.$a&&this.$a.push(a);this.Yb&&this.Yb.yb(a)};function xu(a){a.l=null;var b=a.j;b&&(a.j=null,a.B=null,a.C=null,a.pa.ha().clear(!0));return b}
654
+k.vn=function(a){var b=a.V();this.j=a;this.a=b.X();a=this.a[this.a.length-1];this.l=a.slice();this.a.push(a.slice());yu(this);this.b(new zu("drawstart",this.j))};k.Xc=nf;function yu(a){var b=[];a.j&&b.push(a.j);a.C&&b.push(a.C);a.B&&b.push(a.B);a=a.pa.ha();a.clear(!0);a.cd(b)}k.ri=function(){var a=this.v,b=this.c();a&&b||xu(this);this.pa.setMap(b?a:null)};
655
+function nu(a){var b;"Point"===a||"MultiPoint"===a?b=pu:"LineString"===a||"MultiLineString"===a?b=qu:"Polygon"===a||"MultiPolygon"===a?b=ou:"Circle"===a&&(b=vu);return b}var pu="Point",qu="LineString",ou="Polygon",vu="Circle";function zu(a,b){Oc.call(this,a);this.feature=b}v(zu,Oc);function Au(a){this.a=this.j=null;this.C=!1;this.B=this.l=null;a||(a={});a.extent&&this.g(a.extent);Dg.call(this,{handleDownEvent:Bu,handleDragEvent:Cu,handleEvent:Du,handleUpEvent:Eu});this.u=new T({source:new U({useSpatialIndex:!1,wrapX:!!a.wrapX}),style:a.boxStyle?a.boxStyle:Fu(),updateWhileAnimating:!0,updateWhileInteracting:!0});this.I=new T({source:new U({useSpatialIndex:!1,wrapX:!!a.wrapX}),style:a.pointerStyle?a.pointerStyle:Gu(),updateWhileAnimating:!0,updateWhileInteracting:!0})}v(Au,Dg);
656
+function Du(a){if(!(a instanceof ee))return!0;if("pointermove"==a.type&&!this.D){var b=a.pixel,c=a.map,d=Hu(this,b,c);d||(d=c.Wa(b));Iu(this,d)}Eg.call(this,a);return!1}
657
+function Bu(a){function b(a){var b=null,c=null;a[0]==e[0]?b=e[2]:a[0]==e[2]&&(b=e[0]);a[1]==e[1]?c=e[3]:a[1]==e[3]&&(c=e[1]);return null!==b&&null!==c?[b,c]:null}var c=a.pixel,d=a.map,e=this.G();(a=Hu(this,c,d))&&e?(c=a[0]==e[0]||a[0]==e[2]?a[0]:null,d=a[1]==e[1]||a[1]==e[3]?a[1]:null,null!==c&&null!==d?this.a=Ju(b(a)):null!==c?this.a=Ku(b([c,e[1]]),b([c,e[3]])):null!==d&&(this.a=Ku(b([e[0],d]),b([e[2],d])))):(a=d.Wa(c),this.g([a[0],a[1],a[0],a[1]]),this.a=Ju(a));return!0}
658
+function Cu(a){this.a&&(a=a.coordinate,this.g(this.a(a)),Iu(this,a));return!0}function Eu(){this.a=null;var a=this.G();a&&jb(a)||this.g(null);return!1}function Fu(){var a=gl();return function(){return a.Polygon}}function Gu(){var a=gl();return function(){return a.Point}}function Ju(a){return function(b){return Na([a,b])}}function Ku(a,b){return a[0]==b[0]?function(c){return Na([a,[c[0],b[1]]])}:a[1]==b[1]?function(c){return Na([a,[b[0],c[1]]])}:null}
659
+function Hu(a,b,c){function d(a,b){return kf(e,a)-kf(e,b)}var e=c.Wa(b),f=a.G();if(f){f=[[[f[0],f[1]],[f[0],f[3]]],[[f[0],f[3]],[f[2],f[3]]],[[f[2],f[3]],[f[2],f[1]]],[[f[2],f[1]],[f[0],f[1]]]];f.sort(d);var f=f[0],g=af(e,f),h=c.Ja(g);if(10>=jf(b,h))return b=c.Ja(f[0]),c=c.Ja(f[1]),b=hf(h,b),c=hf(h,c),a.C=10>=Math.sqrt(Math.min(b,c)),a.C&&(g=b>c?f[1]:f[0]),g}return null}function Iu(a,b){var c=a.B;c?c.V().ma(b):(c=new H(new C(b)),a.B=c,a.I.ha().yb(c))}
660
+Au.prototype.setMap=function(a){this.u.setMap(a);this.I.setMap(a);Dg.prototype.setMap.call(this,a)};Au.prototype.G=function(){return this.j};Au.prototype.g=function(a){this.j=a?a:null;var b=this.l;b?a?b.Ra(Yf(a)):b.Ra(void 0):(this.l=b=a?new H(Yf(a)):new H({}),this.u.ha().yb(b));this.b(new Lu(this.j))};function Lu(a){Oc.call(this,Mu);this.b=a}v(Lu,Oc);var Mu="extentchanged";function Nu(a){Dg.call(this,{handleDownEvent:Ou,handleDragEvent:Pu,handleEvent:Qu,handleUpEvent:Ru});this.ad=a.condition?a.condition:Cg;this.$a=function(a){return xg(a)&&wg(a)};this.xb=a.deleteCondition?a.deleteCondition:this.$a;this.Yb=a.insertVertexCondition?a.insertVertexCondition:mf;this.Sa=this.g=null;this.va=[0,0];this.C=this.I=!1;this.a=new Gj;this.fa=void 0!==a.pixelTolerance?a.pixelTolerance:10;this.l=this.pa=!1;this.j=[];this.B=new T({source:new U({useSpatialIndex:!1,wrapX:!!a.wrapX}),style:a.style?
661
+a.style:Su(),updateWhileAnimating:!0,updateWhileInteracting:!0});this.T={Point:this.Dn,LineString:this.ti,LinearRing:this.ti,Polygon:this.En,MultiPoint:this.Bn,MultiLineString:this.An,MultiPolygon:this.Cn,Circle:this.yn,GeometryCollection:this.zn};this.u=a.features;this.u.forEach(this.kg,this);y(this.u,"add",this.wn,this);y(this.u,"remove",this.xn,this);this.R=null}v(Nu,Dg);k=Nu.prototype;
662
+k.kg=function(a){var b=a.V();b&&b.U()in this.T&&this.T[b.U()].call(this,a,b);(b=this.v)&&b.c&&this.c()&&Tu(this,this.va,b);y(a,"change",this.si,this)};function Uu(a,b){a.C||(a.C=!0,a.b(new Vu("modifystart",a.u,b)))}function Wu(a,b){Xu(a,b);a.g&&!a.u.dc()&&(a.B.ha().Gb(a.g),a.g=null);Kc(b,"change",a.si,a)}function Xu(a,b){a=a.a;var c=[];a.forEach(function(a){b===a.feature&&c.push(a)});for(var d=c.length-1;0<=d;--d)a.remove(c[d])}
663
+k.Ha=function(a){this.g&&!a&&(this.B.ha().Gb(this.g),this.g=null);Dg.prototype.Ha.call(this,a)};k.setMap=function(a){this.B.setMap(a);Dg.prototype.setMap.call(this,a)};k.wn=function(a){this.kg(a.element)};k.si=function(a){this.l||(a=a.target,Wu(this,a),this.kg(a))};k.xn=function(a){Wu(this,a.element)};k.Dn=function(a,b){var c=b.X();a={feature:a,geometry:b,la:[c,c]};this.a.Ca(b.G(),a)};
664
+k.Bn=function(a,b){var c=b.X(),d;var e=0;for(d=c.length;e<d;++e){var f=c[e];f={feature:a,geometry:b,depth:[e],index:e,la:[f,f]};this.a.Ca(b.G(),f)}};k.ti=function(a,b){var c=b.X(),d;var e=0;for(d=c.length-1;e<d;++e){var f=c.slice(e,e+2);var g={feature:a,geometry:b,index:e,la:f};this.a.Ca(Na(f),g)}};
665
+k.An=function(a,b){var c=b.X(),d,e;var f=0;for(e=c.length;f<e;++f){var g=c[f];var h=0;for(d=g.length-1;h<d;++h){var l=g.slice(h,h+2);var m={feature:a,geometry:b,depth:[f],index:h,la:l};this.a.Ca(Na(l),m)}}};k.En=function(a,b){var c=b.X(),d,e;var f=0;for(e=c.length;f<e;++f){var g=c[f];var h=0;for(d=g.length-1;h<d;++h){var l=g.slice(h,h+2);var m={feature:a,geometry:b,depth:[f],index:h,la:l};this.a.Ca(Na(l),m)}}};
666
+k.Cn=function(a,b){var c=b.X(),d,e,f;var g=0;for(f=c.length;g<f;++g){var h=c[g];var l=0;for(e=h.length;l<e;++l){var m=h[l];var n=0;for(d=m.length-1;n<d;++n){var p=m.slice(n,n+2);var q={feature:a,geometry:b,depth:[l,g],index:n,la:p};this.a.Ca(Na(p),q)}}}};k.yn=function(a,b){var c=b.wa(),d={feature:a,geometry:b,index:0,la:[c,c]};a={feature:a,geometry:b,index:1,la:[c,c]};d.Pf=a.Pf=[d,a];this.a.Ca(Za(c),d);this.a.Ca(b.G(),a)};
667
+k.zn=function(a,b){var c=b.a;for(b=0;b<c.length;++b)this.T[c[b].U()].call(this,a,c[b])};function Yu(a,b){var c=a.g;c?c.V().ma(b):(c=new H(new C(b)),a.g=c,a.B.ha().yb(c))}function Zu(a,b){return a.index-b.index}
668
+function Ou(a){if(!this.ad(a))return!1;Tu(this,a.pixel,a.map);var b=a.map.Wa(a.pixel);this.j.length=0;this.C=!1;var c=this.g;if(c){var d=[],c=c.V().X(),e=Na([c]),e=Jj(this.a,e),f={};e.sort(Zu);for(var g=0,h=e.length;g<h;++g){var l=e[g],m=l.la,n=w(l.feature),p=l.depth;p&&(n+="-"+p.join("-"));f[n]||(f[n]=Array(2));if("Circle"===l.geometry.U()&&1===l.index)m=$u(b,l),df(m,c)&&!f[n][0]&&(this.j.push([l,0]),f[n][0]=l);else if(df(m[0],c)&&!f[n][0])this.j.push([l,0]),f[n][0]=l;else if(df(m[1],c)&&!f[n][1]){if("LineString"!==
669
+l.geometry.U()&&"MultiLineString"!==l.geometry.U()||!f[n][0]||0!==f[n][0].index)this.j.push([l,1]),f[n][1]=l}else this.Yb(a)&&w(m)in this.Sa&&!f[n][0]&&!f[n][1]&&d.push([l,c])}d.length&&Uu(this,a);for(a=d.length-1;0<=a;--a)this.bm.apply(this,d[a])}return!!this.g}
670
+function Pu(a){this.I=!1;Uu(this,a);a=a.coordinate;for(var b=0,c=this.j.length;b<c;++b){for(var d=this.j[b],e=d[0],f=e.depth,g=e.geometry,h,l=e.la,d=d[1];a.length<g.qa();)a.push(l[d][a.length]);switch(g.U()){case "Point":h=a;l[0]=l[1]=a;break;case "MultiPoint":h=g.X();h[e.index]=a;l[0]=l[1]=a;break;case "LineString":h=g.X();h[e.index+d]=a;l[d]=a;break;case "MultiLineString":h=g.X();h[f[0]][e.index+d]=a;l[d]=a;break;case "Polygon":h=g.X();h[f[0]][e.index+d]=a;l[d]=a;break;case "MultiPolygon":h=g.X();
671
+h[f[1]][f[0]][e.index+d]=a;l[d]=a;break;case "Circle":l[0]=l[1]=a,0===e.index?(this.l=!0,g.ob(a)):(this.l=!0,g.Uc(jf(g.wa(),a))),this.l=!1}h&&(e=g,f=h,this.l=!0,e.ma(f),this.l=!1)}Yu(this,a)}function Ru(a){for(var b,c,d=this.j.length-1;0<=d;--d)if(b=this.j[d][0],c=b.geometry,"Circle"===c.U()){var e=c.wa(),f=b.Pf[0];b=b.Pf[1];f.la[0]=f.la[1]=e;b.la[0]=b.la[1]=e;Hj(this.a,Za(e),f);Hj(this.a,c.G(),b)}else Hj(this.a,Na(b.la),b);this.C&&(this.b(new Vu("modifyend",this.u,a)),this.C=!1);return!1}
672
+function Qu(a){if(!(a instanceof ee))return!0;this.R=a;var b;dg(a.map.Z())[1]||"pointermove"!=a.type||this.D||(this.va=a.pixel,Tu(this,a.pixel,a.map));this.g&&this.xb(a)&&(b="singleclick"==a.type&&this.I?!0:this.hj());"singleclick"==a.type&&(this.I=!1);return Eg.call(this,a)&&!b}
673
+function Tu(a,b,c){function d(a,b){return av(e,a)-av(e,b)}var e=c.Wa(b),f=Qa(Za(e),c.Z().Pa()*a.fa),f=Jj(a.a,f);if(0<f.length){f.sort(d);var g=f[0],h=g.la,l=$u(e,g),m=c.Ja(l),n=jf(b,m);if(n<=a.fa){b={};if("Circle"===g.geometry.U()&&1===g.index)a.pa=!0,Yu(a,l);else for(n=c.Ja(h[0]),g=c.Ja(h[1]),c=hf(m,n),m=hf(m,g),n=Math.sqrt(Math.min(c,m)),a.pa=n<=a.fa,a.pa&&(l=c>m?h[1]:h[0]),Yu(a,l),m=1,c=f.length;m<c;++m)if(l=f[m].la,df(h[0],l[0])&&df(h[1],l[1])||df(h[0],l[1])&&df(h[1],l[0]))b[w(l)]=!0;else break;
674
+b[w(h)]=!0;a.Sa=b;return}}a.g&&(a.B.ha().Gb(a.g),a.g=null)}function av(a,b){var c=b.geometry;return"Circle"===c.U()&&1===b.index?(a=hf(c.wa(),a),c=Math.sqrt(a)-c.pd(),c*c):kf(a,b.la)}function $u(a,b){var c=b.geometry;return"Circle"===c.U()&&1===b.index?c.Ab(a):af(a,b.la)}
675
+k.bm=function(a,b){for(var c=a.la,d=a.feature,e=a.geometry,f=a.depth,g=a.index,h;b.length<e.qa();)b.push(0);switch(e.U()){case "MultiLineString":h=e.X();h[f[0]].splice(g+1,0,b);break;case "Polygon":h=e.X();h[f[0]].splice(g+1,0,b);break;case "MultiPolygon":h=e.X();h[f[1]][f[0]].splice(g+1,0,b);break;case "LineString":h=e.X();h.splice(g+1,0,b);break;default:return}this.l=!0;e.ma(h);this.l=!1;h=this.a;h.remove(a);bv(this,e,g,f,1);a={la:[c[0],b],feature:d,geometry:e,depth:f,index:g};h.Ca(Na(a.la),a);
676
+this.j.push([a,1]);b={la:[b,c[1]],feature:d,geometry:e,depth:f,index:g+1};h.Ca(Na(b.la),b);this.j.push([b,0]);this.I=!0};
677
+k.hj=function(){if(this.R&&"pointerdrag"!=this.R.type){var a=this.R;Uu(this,a);var b=this.j,c={},d,e;for(e=b.length-1;0<=e;--e){var f=b[e];var g=f[0];var h=w(g.feature);g.depth&&(h+="-"+g.depth.join("-"));h in c||(c[h]={});0===f[1]?(c[h].right=g,c[h].index=g.index):1==f[1]&&(c[h].left=g,c[h].index=g.index+1)}for(h in c){var l=c[h].right;var m=c[h].left;e=c[h].index;var n=e-1;g=void 0!==m?m:l;0>n&&(n=0);f=g.geometry;var p=d=f.X();var q=!1;switch(f.U()){case "MultiLineString":2<d[g.depth[0]].length&&
678
+(d[g.depth[0]].splice(e,1),q=!0);break;case "LineString":2<d.length&&(d.splice(e,1),q=!0);break;case "MultiPolygon":p=p[g.depth[1]];case "Polygon":p=p[g.depth[0]],4<p.length&&(e==p.length-1&&(e=0),p.splice(e,1),q=!0,0===e&&(p.pop(),p.push(p[0]),n=p.length-1))}q&&(q=f,this.l=!0,q.ma(d),this.l=!1,d=[],void 0!==m&&(this.a.remove(m),d.push(m.la[0])),void 0!==l&&(this.a.remove(l),d.push(l.la[1])),void 0!==m&&void 0!==l&&(m={depth:g.depth,feature:g.feature,geometry:g.geometry,index:n,la:d},this.a.Ca(Na(m.la),
679
+m)),bv(this,f,e,g.depth,-1),this.g&&(this.B.ha().Gb(this.g),this.g=null),b.length=0)}this.b(new Vu("modifyend",this.u,a));this.C=!1;return!0}return!1};function bv(a,b,c,d,e){Lj(a.a,b.G(),function(a){a.geometry===b&&(void 0===d||void 0===a.depth||pa(a.depth,d))&&a.index>c&&(a.index+=e)})}function Su(){var a=gl();return function(){return a.Point}}function Vu(a,b,c){Oc.call(this,a);this.features=b;this.mapBrowserEvent=c}v(Vu,Oc);function cv(a){ng.call(this,{handleEvent:dv});a=a?a:{};this.C=a.condition?a.condition:wg;this.D=a.addCondition?a.addCondition:nf;this.B=a.removeCondition?a.removeCondition:nf;this.I=a.toggleCondition?a.toggleCondition:yg;this.l=a.multi?a.multi:!1;this.o=a.filter?a.filter:mf;this.j=a.hitTolerance?a.hitTolerance:0;this.g=new T({source:new U({useSpatialIndex:!1,features:a.features,wrapX:a.wrapX}),style:a.style?a.style:ev(),updateWhileAnimating:!0,updateWhileInteracting:!0});if(a.layers)if("function"===
680
+typeof a.layers)a=a.layers;else{var b=a.layers;a=function(a){return ja(b,a)}}else a=mf;this.u=a;this.a={};a=this.g.ha().f;y(a,"add",this.Fn,this);y(a,"remove",this.Jn,this)}v(cv,ng);k=cv.prototype;k.Gn=function(){return this.g.ha().f};k.Hn=function(){return this.j};k.In=function(a){a=w(a);return this.a[a]};
681
+function dv(a){if(!this.C(a))return!0;var b=this.D(a),c=this.B(a),d=this.I(a),e=!b&&!c&&!d,f=a.map,g=this.g.ha().f,h=[],l=[];if(e){ub(this.a);f.we(a.pixel,function(a,b){if(this.o(a,b))return l.push(a),a=w(a),this.a[a]=b,!this.l}.bind(this),{layerFilter:this.u,hitTolerance:this.j});for(e=g.dc()-1;0<=e;--e){var f=g.item(e),m=l.indexOf(f);-1<m?l.splice(m,1):(g.remove(f),h.push(f))}l.length&&g.fg(l)}else{f.we(a.pixel,function(a,e){if(this.o(a,e))return!b&&!d||ja(g.a,a)?(c||d)&&ja(g.a,a)&&(h.push(a),e=
682
+w(a),delete this.a[e]):(l.push(a),a=w(a),this.a[a]=e),!this.l}.bind(this),{layerFilter:this.u,hitTolerance:this.j});for(e=h.length-1;0<=e;--e)g.remove(h[e]);g.fg(l)}(0<l.length||0<h.length)&&this.b(new fv(gv,l,h,a));return vg(a)}k.Kn=function(a){this.j=a};k.setMap=function(a){var b=this.v,c=this.g.ha().f;b&&c.forEach(b.Cj,b);ng.prototype.setMap.call(this,a);this.g.setMap(a);a&&c.forEach(a.xj,a)};
683
+function ev(){var a=gl();la(a.Polygon,a.LineString);la(a.GeometryCollection,a.LineString);return function(b){return b.V()?a[b.V().U()]:null}}k.Fn=function(a){var b=this.v;b&&b.xj(a.element)};k.Jn=function(a){var b=this.v;b&&b.Cj(a.element)};function fv(a,b,c,d){Oc.call(this,a);this.selected=b;this.deselected=c;this.mapBrowserEvent=d}v(fv,Oc);var gv="select";function hv(a){Dg.call(this,{handleEvent:iv,handleDownEvent:mf,handleUpEvent:jv});a=a?a:{};this.l=a.source?a.source:null;this.R=void 0!==a.vertex?a.vertex:!0;this.C=void 0!==a.edge?a.edge:!0;this.j=a.features?a.features:null;this.pa=[];this.B={};this.T={};this.u={};this.I=null;this.g=void 0!==a.pixelTolerance?a.pixelTolerance:10;this.va=kv.bind(this);this.a=new Gj;this.fa={Point:this.Rn,LineString:this.wi,LinearRing:this.wi,Polygon:this.Sn,MultiPoint:this.Pn,MultiLineString:this.On,MultiPolygon:this.Qn,
684
+GeometryCollection:this.Nn,Circle:this.Mn}}v(hv,Dg);k=hv.prototype;k.yb=function(a,b){b=void 0!==b?b:!0;var c=w(a),d=a.V();if(d){var e=this.fa[d.U()];e&&(this.T[c]=d.G(Oa()),e.call(this,a,d))}b&&(this.B[c]=y(a,"change",this.Ln,this))};k.Ak=function(a){this.yb(a)};k.Bk=function(a){this.Gb(a)};k.ui=function(a){if(a instanceof gu)var b=a.feature;else a instanceof bd&&(b=a.element);this.yb(b)};k.vi=function(a){if(a instanceof gu)var b=a.feature;else a instanceof bd&&(b=a.element);this.Gb(b)};
685
+k.Ln=function(a){a=a.target;if(this.D){var b=w(a);b in this.u||(this.u[b]=a)}else this.Dj(a)};k.Gb=function(a,b){b=void 0!==b?b:!0;var c=w(a),d=this.T[c];if(d){var e=this.a,f=[];Lj(e,d,function(b){a===b.feature&&f.push(b)});for(d=f.length-1;0<=d;--d)e.remove(f[d])}b&&(Ec(this.B[c]),delete this.B[c])};
686
+k.setMap=function(a){var b=this.v,c=this.pa,d;this.j?d=this.j:this.l&&(d=this.l.Xe());b&&(c.forEach(Ec),c.length=0,d.forEach(this.Bk,this));Dg.prototype.setMap.call(this,a);a&&(this.j?c.push(y(this.j,"add",this.ui,this),y(this.j,"remove",this.vi,this)):this.l&&c.push(y(this.l,"addfeature",this.ui,this),y(this.l,"removefeature",this.vi,this)),d.forEach(this.Ak,this))};k.Xc=nf;
687
+function lv(a,b,c,d){var e=d.Wa([b[0]-a.g,b[1]+a.g]),f=d.Wa([b[0]+a.g,b[1]-a.g]),e=Na([e,f]),g=Jj(a.a,e);a.R&&!a.C&&(g=g.filter(function(a){return"Circle"!==a.feature.V().U()}));var h=!1,e=!1,l=f=null;if(0<g.length){a.I=c;g.sort(a.va);var m=g[0].la,h="Circle"===g[0].feature.V().U();if(a.R&&!a.C){if(c=d.Ja(m[0]),h=d.Ja(m[1]),c=hf(b,c),b=hf(b,h),h=Math.sqrt(Math.min(c,b)),h=h<=a.g)e=!0,f=c>b?m[1]:m[0],l=d.Ja(f)}else a.C&&(f=h?$e(c,g[0].feature.V()):af(c,m),l=d.Ja(f),jf(b,l)<=a.g&&(e=!0,a.R&&!h&&(c=
688
+d.Ja(m[0]),h=d.Ja(m[1]),c=hf(l,c),b=hf(l,h),h=Math.sqrt(Math.min(c,b)),h=h<=a.g)))&&(f=c>b?m[1]:m[0],l=d.Ja(f));e&&(l=[Math.round(l[0]),Math.round(l[1])])}return{nq:e,vertex:f,wq:l}}k.Dj=function(a){this.Gb(a,!1);this.yb(a,!1)};k.Mn=function(a,b){b=Zf(b).X()[0];var c;var d=0;for(c=b.length-1;d<c;++d){var e=b.slice(d,d+2);var f={feature:a,la:e};this.a.Ca(Na(e),f)}};k.Nn=function(a,b){var c=b.a;for(b=0;b<c.length;++b){var d=this.fa[c[b].U()];d&&d.call(this,a,c[b])}};
689
+k.wi=function(a,b){b=b.X();var c;var d=0;for(c=b.length-1;d<c;++d){var e=b.slice(d,d+2);var f={feature:a,la:e};this.a.Ca(Na(e),f)}};k.On=function(a,b){b=b.X();var c,d;var e=0;for(d=b.length;e<d;++e){var f=b[e];var g=0;for(c=f.length-1;g<c;++g){var h=f.slice(g,g+2);var l={feature:a,la:h};this.a.Ca(Na(h),l)}}};k.Pn=function(a,b){var c=b.X(),d;var e=0;for(d=c.length;e<d;++e){var f=c[e];f={feature:a,la:[f,f]};this.a.Ca(b.G(),f)}};
690
+k.Qn=function(a,b){b=b.X();var c,d,e;var f=0;for(e=b.length;f<e;++f){var g=b[f];var h=0;for(d=g.length;h<d;++h){var l=g[h];var m=0;for(c=l.length-1;m<c;++m){var n=l.slice(m,m+2);var p={feature:a,la:n};this.a.Ca(Na(n),p)}}}};k.Rn=function(a,b){var c=b.X();a={feature:a,la:[c,c]};this.a.Ca(b.G(),a)};k.Sn=function(a,b){b=b.X();var c,d;var e=0;for(d=b.length;e<d;++e){var f=b[e];var g=0;for(c=f.length-1;g<c;++g){var h=f.slice(g,g+2);var l={feature:a,la:h};this.a.Ca(Na(h),l)}}};
691
+function iv(a){var b=lv(this,a.pixel,a.coordinate,a.map);b.nq&&(a.coordinate=b.vertex.slice(0,2),a.pixel=b.wq);return Eg.call(this,a)}function jv(){var a=vb(this.u);a.length&&(a.forEach(this.Dj,this),this.u={});return!1}function kv(a,b){return kf(this.I,a.la)-kf(this.I,b.la)};function mv(a){Dg.call(this,{handleDownEvent:nv,handleDragEvent:ov,handleMoveEvent:pv,handleUpEvent:qv});a=a?a:{};this.a=null;this.j=void 0!==a.features?a.features:null;if(a.layers)if("function"===typeof a.layers)var b=a.layers;else{var c=a.layers;b=function(a){return ja(c,a)}}else b=mf;this.C=b;this.l=a.hitTolerance?a.hitTolerance:0;this.g=null;y(this,Vc("active"),this.u,this)}v(mv,Dg);
692
+function nv(a){this.g=rv(this,a.pixel,a.map);if(!this.a&&this.g){this.a=a.coordinate;pv.call(this,a);var b=this.j||new Yc([this.g]);this.b(new sv("translatestart",b,a.coordinate));return!0}return!1}function qv(a){if(this.a){this.a=null;pv.call(this,a);var b=this.j||new Yc([this.g]);this.b(new sv("translateend",b,a.coordinate));return!0}return!1}
693
+function ov(a){if(this.a){a=a.coordinate;var b=a[0]-this.a[0],c=a[1]-this.a[1],d=this.j||new Yc([this.g]);d.forEach(function(a){var d=a.V();d.translate(b,c);a.Ra(d)});this.a=a;this.b(new sv("translating",d,a))}}function pv(a){var b=a.map.a;rv(this,a.pixel,a.map)?(b.classList.remove(this.a?"ol-grab":"ol-grabbing"),b.classList.add(this.a?"ol-grabbing":"ol-grab")):b.classList.remove("ol-grab","ol-grabbing")}
694
+function rv(a,b,c){return c.we(b,function(a){if(!this.j||ja(this.j.a,a))return a}.bind(a),{layerFilter:a.C,hitTolerance:a.l})}mv.prototype.B=function(){return this.l};mv.prototype.I=function(a){this.l=a};mv.prototype.setMap=function(a){var b=this.v;Dg.prototype.setMap.call(this,a);tv(this,b)};mv.prototype.u=function(){tv(this,null)};function tv(a,b){var c=a.v;a=a.c();c&&a||(c||(c=b),c.a.classList.remove("ol-grab","ol-grabbing"))}
695
+function sv(a,b,c){Oc.call(this,a);this.features=b;this.coordinate=c}v(sv,Oc);function V(a){a=a?a:{};var b=tb({},a);delete b.gradient;delete b.radius;delete b.blur;delete b.shadow;delete b.weight;T.call(this,b);this.j=null;this.R=void 0!==a.shadow?a.shadow:250;this.I=void 0;this.B=null;y(this,Vc(uv),this.Bl,this);this.pj(a.gradient?a.gradient:vv);this.jj(void 0!==a.blur?a.blur:15);this.Uc(void 0!==a.radius?a.radius:8);y(this,Vc(wv),this.cg,this);y(this,Vc(xv),this.cg,this);this.cg();var c=a.weight?a.weight:"weight",d;"string"===typeof c?d=function(a){return a.get(c)}:d=c;this.g(function(a){a=
696
+d(a);a=void 0!==a?Ca(a,0,1):1;var b=255*a|0,c=this.B[b];c||(c=[new bl({image:new eo({opacity:a,src:this.I})})],this.B[b]=c);return c}.bind(this));this.set(Pt,null);y(this,"render",this.Sl,this)}v(V,T);var vv=["#00f","#0ff","#0f0","#ff0","#f00"];k=V.prototype;k.uh=function(){return this.get(wv)};k.Bh=function(){return this.get(uv)};k.yi=function(){return this.get(xv)};
697
+k.Bl=function(){for(var a=this.Bh(),b=jd(1,256),c=b.createLinearGradient(0,0,1,256),d=1/(a.length-1),e=0,f=a.length;e<f;++e)c.addColorStop(e*d,a[e]);b.fillStyle=c;b.fillRect(0,0,1,256);this.j=b.getImageData(0,0,1,256).data};k.cg=function(){var a=this.yi(),b=this.uh(),c=a+b+1,d=2*c,d=jd(d,d);d.shadowOffsetX=d.shadowOffsetY=this.R;d.shadowBlur=b;d.shadowColor="#000";d.beginPath();b=c-this.R;d.arc(b,b,a,0,2*Math.PI,!0);d.fill();this.I=d.canvas.toDataURL();this.B=Array(256);this.s()};
698
+k.Sl=function(a){a=a.context;var b=a.canvas,b=a.getImageData(0,0,b.width,b.height),c=b.data,d,e;var f=0;for(d=c.length;f<d;f+=4)if(e=4*c[f+3])c[f]=this.j[e],c[f+1]=this.j[e+1],c[f+2]=this.j[e+2];a.putImageData(b,0,0)};k.jj=function(a){this.set(wv,a)};k.pj=function(a){this.set(uv,a)};k.Uc=function(a){this.set(xv,a)};var wv="blur",uv="gradient",xv="radius";function yv(a){Gt.call(this,a);this.v=Bh();this.j=null}v(yv,Gt);yv.prototype.S=function(a,b,c){It(this,"precompose",c,a,void 0);var d=this.Y();if(d){var e=b.extent,f=void 0!==e&&!Va(e,a.extent)&&qb(e,a.extent);f&&Ht(c,a,e);var e=this.C(),g=c.globalAlpha;c.globalAlpha=b.opacity;c.drawImage(d,0,0,+d.width,+d.height,Math.round(e[4]),Math.round(e[5]),Math.round(d.width*e[0]),Math.round(d.height*e[3]));c.globalAlpha=g;f&&c.restore()}this.ef(c,a,b)};
699
+yv.prototype.Ea=function(a,b,c,d,e){var f=this.a;return f.ha().Ea(a,b.viewState.resolution,b.viewState.rotation,c,b.skippedFeatureUids,function(a){return d.call(e,a,f)})};
700
+yv.prototype.u=function(a,b,c,d){if(this.Y()){if(this.a.ha().Ea!==ua)return Gt.prototype.u.apply(this,arguments);var e=Gh(this.v,a.slice());gf(e,b.viewState.resolution/this.f);this.j||(this.j=jd(1,1));this.j.clearRect(0,0,1,1);this.j.drawImage(this.Y(),e[0],e[1],1,1,0,0,1,1);e=this.j.getImageData(0,0,1,1).data;if(0<e[3])return c.call(d,this.a,e)}};function zv(a){yv.call(this,a);this.M=null;this.c=Bh()}v(zv,yv);zv.prototype.Y=function(){return this.M?this.M.Y():null};zv.prototype.C=function(){return this.c};
701
+zv.prototype.sd=function(a,b){var c=a.pixelRatio,d=a.size,e=a.viewState,f=e.center,g=e.resolution,h=this.a.ha(),l=a.viewHints,m=a.extent;void 0!==b.extent&&(m=pb(m,b.extent));l[0]||l[1]||kb(m)||(b=h.Y(m,g,c,e.projection))&&At(this,b)&&(this.M=b);if(this.M){b=this.M;var l=b.G(),m=b.resolution,e=b.a,n=c*m/(g*e),l=Kh(this.c,c*d[0]/2,c*d[1]/2,n,n,0,e*(l[0]-f[0])/m,e*(f[1]-l[3])/m);Kh(this.v,c*d[0]/2-l[4],c*d[1]/2-l[5],c/g,-c/g,0,-f[0],-f[1]);Ct(a.attributions,b.f);Dt(a,h);this.f=g*c/e}return!!this.M};function Av(a,b,c,d){var e=gc(c,b,a);c=Sb(b,d,c);b=b.sc();void 0!==b&&(c*=b);b=a.sc();void 0!==b&&(c/=b);a=Sb(a,c,e)/c;isFinite(a)&&0<a&&(c/=a);return c}function Bv(a,b,c,d){a=c-a;b=d-b;var e=Math.sqrt(a*a+b*b);return[Math.round(c+a/e),Math.round(d+b/e)]}
702
+function Cv(a,b,c,d,e,f,g,h,l,m,n){var p=jd(Math.round(c*a),Math.round(c*b));if(!l.length)return p.canvas;p.scale(c,c);var q=Oa();l.forEach(function(a){cb(q,a.extent)});var r=jd(Math.round(c*lb(q)/d),Math.round(c*mb(q)/d)),u=c/d;l.forEach(function(a){r.drawImage(a.image,m,m,a.image.width-2*m,a.image.height-2*m,(a.extent[0]-q[0])*u,-(a.extent[3]-q[3])*u,lb(a.extent)*u,mb(a.extent)*u)});var x=ib(g);h.c.forEach(function(a){var b=a.source,e=a.target,g=b[1][0],h=b[1][1],l=b[2][0],m=b[2][1];a=(e[0][0]-
703
+x[0])/f;var n=-(e[0][1]-x[1])/f,u=(e[1][0]-x[0])/f,B=-(e[1][1]-x[1])/f,da=(e[2][0]-x[0])/f,fb=-(e[2][1]-x[1])/f,e=b[0][0],b=b[0][1],g=g-e,h=h-b,l=l-e,m=m-b;a:{g=[[g,h,0,0,u-a],[l,m,0,0,da-a],[0,0,g,h,B-n],[0,0,l,m,fb-n]];h=g.length;for(l=0;l<h;l++){for(var m=l,ca=Math.abs(g[l][l]),Ub=l+1;Ub<h;Ub++){var uc=Math.abs(g[Ub][l]);uc>ca&&(ca=uc,m=Ub)}if(!ca){g=null;break a}ca=g[m];g[m]=g[l];g[l]=ca;for(m=l+1;m<h;m++)for(ca=-g[m][l]/g[l][l],Ub=l;Ub<h+1;Ub++)g[m][Ub]=l==Ub?0:g[m][Ub]+ca*g[l][Ub]}l=Array(h);
704
+for(m=h-1;0<=m;m--)for(l[m]=g[m][h]/g[m][m],ca=m-1;0<=ca;ca--)g[ca][h]-=g[ca][m]*l[m];g=l}g&&(p.save(),p.beginPath(),l=(a+u+da)/3,m=(n+B+fb)/3,h=Bv(l,m,a,n),u=Bv(l,m,u,B),da=Bv(l,m,da,fb),p.moveTo(u[0],u[1]),p.lineTo(h[0],h[1]),p.lineTo(da[0],da[1]),p.clip(),p.transform(g[0],g[2],g[1],g[3],a,n),p.translate(q[0]-e,q[3]-b),p.scale(d/c,-d/c),p.drawImage(r.canvas,0,0),p.restore())});n&&(p.save(),p.strokeStyle="black",p.lineWidth=1,h.c.forEach(function(a){var b=a.target;a=(b[0][0]-x[0])/f;var c=-(b[0][1]-
705
+x[1])/f,d=(b[1][0]-x[0])/f,e=-(b[1][1]-x[1])/f,g=(b[2][0]-x[0])/f,b=-(b[2][1]-x[1])/f;p.beginPath();p.moveTo(d,e);p.lineTo(a,c);p.lineTo(g,b);p.closePath();p.stroke()}),p.restore());return p.canvas};function Dv(a,b,c,d,e){this.i=a;this.f=b;var f={},g=ec(this.f,this.i);this.a=function(a){var b=a[0]+"/"+a[1];f[b]||(f[b]=g(a));return f[b]};this.g=d;this.v=e*e;this.c=[];this.o=!1;this.l=this.i.i&&!!d&&!!this.i.G()&&lb(d)==lb(this.i.G());this.b=this.i.G()?lb(this.i.G()):null;this.j=this.f.G()?lb(this.f.G()):null;a=ib(c);b=hb(c);d=gb(c);c=eb(c);e=this.a(a);var h=this.a(b),l=this.a(d),m=this.a(c);Ev(this,a,b,d,c,e,h,l,m,10);if(this.o){var n=Infinity;this.c.forEach(function(a){n=Math.min(n,a.source[0][0],
706
+a.source[1][0],a.source[2][0])});this.c.forEach(function(a){if(Math.max(a.source[0][0],a.source[1][0],a.source[2][0])-n>this.b/2){var b=[[a.source[0][0],a.source[0][1]],[a.source[1][0],a.source[1][1]],[a.source[2][0],a.source[2][1]]];b[0][0]-n>this.b/2&&(b[0][0]-=this.b);b[1][0]-n>this.b/2&&(b[1][0]-=this.b);b[2][0]-n>this.b/2&&(b[2][0]-=this.b);Math.max(b[0][0],b[1][0],b[2][0])-Math.min(b[0][0],b[1][0],b[2][0])<this.b/2&&(a.source=b)}},this)}f={}}
707
+function Ev(a,b,c,d,e,f,g,h,l,m){var n=Na([f,g,h,l]),p=a.b?lb(n)/a.b:null,q=a.b,r=a.i.i&&.5<p&&1>p,u=!1;if(0<m){if(a.f.c&&a.j)var x=Na([b,c,d,e]),u=u|.25<lb(x)/a.j;!r&&a.i.c&&p&&(u|=.25<p)}if(u||!a.g||qb(n,a.g)){if(!(u||isFinite(f[0])&&isFinite(f[1])&&isFinite(g[0])&&isFinite(g[1])&&isFinite(h[0])&&isFinite(h[1])&&isFinite(l[0])&&isFinite(l[1])))if(0<m)u=!0;else return;if(0<m&&(u||(n=a.a([(b[0]+d[0])/2,(b[1]+d[1])/2]),q=r?(Ia(f[0],q)+Ia(h[0],q))/2-Ia(n[0],q):(f[0]+h[0])/2-n[0],n=(f[1]+h[1])/2-n[1],
708
+u=q*q+n*n>a.v),u)){Math.abs(b[0]-d[0])<=Math.abs(b[1]-d[1])?(r=[(c[0]+d[0])/2,(c[1]+d[1])/2],q=a.a(r),n=[(e[0]+b[0])/2,(e[1]+b[1])/2],p=a.a(n),Ev(a,b,c,r,n,f,g,q,p,m-1),Ev(a,n,r,d,e,p,q,h,l,m-1)):(r=[(b[0]+c[0])/2,(b[1]+c[1])/2],q=a.a(r),n=[(d[0]+e[0])/2,(d[1]+e[1])/2],p=a.a(n),Ev(a,b,r,n,e,f,q,p,l,m-1),Ev(a,r,c,d,n,q,g,h,p,m-1));return}if(r){if(!a.l)return;a.o=!0}a.c.push({source:[f,h,l],target:[b,d,e]});a.c.push({source:[f,g,h],target:[b,c,d]})}}
709
+function Fv(a){var b=Oa();a.c.forEach(function(a){a=a.source;Pa(b,a[0]);Pa(b,a[1]);Pa(b,a[2])});return b};function Gv(a,b,c,d,e,f){this.v=b;this.l=a.G();var g=b.G(),h=g?pb(c,g):c,g=Av(a,b,nb(h),d);this.j=new Dv(a,b,h,this.l,.5*g);this.c=d;this.i=c;a=Fv(this.j);this.o=(this.Hb=f(a,g,e))?this.Hb.a:1;this.ee=this.g=null;e=2;f=[];this.Hb&&(e=0,f=this.Hb.f);Is.call(this,c,d,this.o,e,f)}v(Gv,Is);Gv.prototype.ka=function(){1==this.state&&(Ec(this.ee),this.ee=null);Is.prototype.ka.call(this)};Gv.prototype.Y=function(){return this.g};
710
+Gv.prototype.de=function(){var a=this.Hb.getState();2==a&&(this.g=Cv(lb(this.i)/this.c,mb(this.i)/this.c,this.o,this.Hb.resolution,0,this.c,this.i,this.j,[{extent:this.Hb.G(),image:this.Hb.Y()}],0));this.state=a;this.s()};Gv.prototype.load=function(){if(0==this.state){this.state=1;this.s();var a=this.Hb.getState();2==a||3==a?this.de():(this.ee=y(this.Hb,"change",function(){var a=this.Hb.getState();if(2==a||3==a)Ec(this.ee),this.ee=null,this.de()},this),this.Hb.load())}};function Hv(a){$t.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,state:a.state});this.C=void 0!==a.resolutions?a.resolutions:null;this.a=null;this.fa=0}v(Hv,$t);function Iv(a,b){a.C&&(b=a.C[ka(a.C,b,0)]);return b}
711
+Hv.prototype.Y=function(a,b,c,d){var e=this.c;if(e&&d&&!dc(e,d)){if(this.a){if(this.fa==this.i&&dc(this.a.v,d)&&this.a.resolution==b&&this.a.a==c&&bb(this.a.G(),a))return this.a;Nc(this.a);this.a=null}this.a=new Gv(e,d,a,b,c,function(a,b,c){return this.Jc(a,b,c,e)}.bind(this));this.fa=this.i;return this.a}e&&(d=e);return this.Jc(a,b,c,d)};Hv.prototype.o=function(a){a=a.target;switch(a.getState()){case 1:this.b(new Jv(Kv,a));break;case 2:this.b(new Jv(Lv,a));break;case 3:this.b(new Jv(Mv,a))}};
712
+function Nv(a,b){a.Y().src=b}function Jv(a,b){Oc.call(this,a);this.image=b}v(Jv,Oc);var Kv="imageloadstart",Lv="imageloadend",Mv="imageloaderror";function Ov(a){Hv.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions,state:a.state});this.pa=a.canvasFunction;this.R=null;this.T=0;this.va=void 0!==a.ratio?a.ratio:1.5}v(Ov,Hv);Ov.prototype.Jc=function(a,b,c,d){b=Iv(this,b);var e=this.R;if(e&&this.T==this.i&&e.resolution==b&&e.a==c&&Va(e.G(),a))return e;a=a.slice();rb(a,this.va);(d=this.pa(a,b,c,[lb(a)/b*c,mb(a)/b*c],d))&&(e=new Ks(a,b,c,this.j,d));this.R=e;this.T=this.i;return e};function Pv(a){this.f=a.source;this.$a=Bh();this.g=jd();this.l=[0,0];this.Sa=void 0==a.renderBuffer?100:a.renderBuffer;this.B=null;Ov.call(this,{attributions:a.attributions,canvasFunction:this.tk.bind(this),logo:a.logo,projection:a.projection,ratio:a.ratio,resolutions:a.resolutions,state:this.f.getState()});this.I=null;this.v=void 0;this.Ii(a.style);y(this.f,"change",this.ro,this)}v(Pv,Ov);k=Pv.prototype;
713
+k.tk=function(a,b,c,d,e){var f=new pt(.5*b/c,a,b,this.f.T,this.Sa);this.f.Yd(a,b,e);var g=!1;this.f.$b(a,function(a){var d;if(!(d=g)){var e;(d=a.Lc())?e=d.call(a,b):this.v&&(e=this.v(a,b));if(e){var h,p=!1;Array.isArray(e)||(e=[e]);d=0;for(h=e.length;d<h;++d)p=Mt(f,a,e[d],Lt(b,c),this.qo,this)||p;d=p}else d=!1}g=d},this);tt(f);if(g)return null;this.l[0]!=d[0]||this.l[1]!=d[1]?(this.g.canvas.width=d[0],this.g.canvas.height=d[1],this.l[0]=d[0],this.l[1]=d[1]):this.g.clearRect(0,0,d[0],d[1]);a=Qv(this,
714
+nb(a),b,c,d);f.La(this.g,c,a,0,{});this.B=f;return this.g.canvas};k.Ea=function(a,b,c,d,e,f){if(this.B){var g={};return this.B.Ea(a,b,0,d,e,function(a){var b=w(a).toString();if(!(b in g))return g[b]=!0,f(a)})}};k.no=function(){return this.f};k.oo=function(){return this.I};k.po=function(){return this.v};function Qv(a,b,c,d,e){c=d/c;return Kh(a.$a,e[0]/2,e[1]/2,c,-c,0,-b[0],-b[1])}k.qo=function(){this.s()};k.ro=function(){bu(this,this.f.getState())};
715
+k.Ii=function(a){this.I=void 0!==a?a:fl;this.v=a?dl(this.I):void 0;this.s()};function Rv(a,b){Vt.call(this,a,b);this.o=this.f=this.M=null}v(Rv,Vt);function Sv(a,b){b=b.Y();return Ti(a.c.i,b)}Rv.prototype.Ea=function(a,b,c,d,e){var f=this.a;return f.ha().Ea(a,b.viewState.resolution,b.viewState.rotation,c,b.skippedFeatureUids,function(a){return d.call(e,a,f)})};
716
+Rv.prototype.ng=function(a,b){var c=this.c.i,d=a.pixelRatio,e=a.viewState,f=e.center,g=e.resolution,h=e.rotation,l=this.M,m=this.Ib,n=this.a.ha(),p=a.viewHints,q=a.extent;void 0!==b.extent&&(q=pb(q,b.extent));p[0]||p[1]||kb(q)||(b=n.Y(q,g,d,e.projection))&&At(this,b)&&(l=b,m=Sv(this,b),this.Ib&&a.postRenderFunctions.push(function(a,b){a.isContextLost()||a.deleteTexture(b)}.bind(null,c,this.Ib)));l&&(c=this.c.f.j,Tv(this,c.width,c.height,d,f,g,h,l.G()),this.o=null,d=this.v,Ch(d),Ih(d,1,-1),Jh(d,0,
717
+-1),this.M=l,this.Ib=m,Ct(a.attributions,l.f),Dt(a,n));return!!l};function Tv(a,b,c,d,e,f,g,h){b*=f;c*=f;a=a.S;Ch(a);Ih(a,2*d/b,2*d/c);Hh(a,-g);Jh(a,h[0]-e[0],h[1]-e[1]);Ih(a,(h[2]-h[0])/2,(h[3]-h[1])/2);Jh(a,1,1)}Rv.prototype.Ue=function(a,b){return void 0!==this.Ea(a,b,0,mf,this)};
718
+Rv.prototype.lg=function(a,b,c,d){if(this.M&&this.M.Y())if(this.a.ha()instanceof Pv){var e=Gh(b.pixelToCoordinateTransform,a.slice());if(this.Ea(e,b,0,mf,this))return c.call(d,this.a,null)}else{e=[this.M.Y().width,this.M.Y().height];if(!this.o){var f=b.size;b=Bh();Jh(b,-1,-1);Ih(b,2/f[0],2/f[1]);Jh(b,0,f[1]);Ih(b,1,-1);var f=Lh(this.S.slice()),g=Bh();Jh(g,0,e[1]);Ih(g,1,-1);Ih(g,e[0]/2,e[1]/2);Jh(g,1,1);Eh(g,f);Eh(g,b);this.o=g}a=Gh(this.o,a.slice());if(!(0>a[0]||a[0]>e[0]||0>a[1]||a[1]>e[1])&&(this.f||
719
+(this.f=jd(1,1)),this.f.clearRect(0,0,1,1),this.f.drawImage(this.M.Y(),a[0],a[1],1,1,0,0,1,1),e=this.f.getImageData(0,0,1,1).data,0<e[3]))return c.call(d,this.a,e)}};function Uv(a){wh.call(this,a?a:{})}v(Uv,wh);Uv.prototype.Fd=function(a){var b=null,c=a.U();"canvas"===c?b=new zv(this):"webgl"===c&&(b=new Rv(a,this));return b};function Vv(a){yv.call(this,a);this.c=null===this.c?null:jd();this.o=null;this.g=[];this.l=Oa();this.va=new ya(0,0,0,0);this.B=Bh();this.T=0}v(Vv,yv);function Wv(a,b){b=b.getState();a=a.a.kd();return 2==b||4==b||3==b&&!a}
720
+Vv.prototype.sd=function(a,b){var c=a.pixelRatio,d=a.size,e=a.viewState,f=e.projection,g=e.resolution,e=e.center,h=this.a,l=h.ha(),m=l.i,n=l.Ta(f),p=n.tc(g,this.T),q=n.Da(p),r=Math.round(g/q)||1,u=a.extent;void 0!==b.extent&&(u=pb(u,b.extent));if(kb(u))return!1;var x=rc(n,u,q);var B=n.Pc(p);var E=n.Da(p),A=Ma(n.gb(p),n.j);B=Xa(B[0]+x.ca*A[0]*E,B[1]+x.da*A[1]*E,B[0]+(x.$+1)*A[0]*E,B[1]+(x.ia+1)*A[1]*E,void 0);E=l.nb(c);A={};A[p]={};var L=this.Nf(l,f,A),oa=this.l,ha=this.va,ga=!1,z,M;for(z=x.ca;z<=
721
+x.$;++z)for(M=x.da;M<=x.ia;++M){var ba=l.Nc(p,z,M,c,f);3!=ba.getState()||this.a.kd()||Ns(ba,2);Wv(this,ba)||(ba=Ms(ba));Wv(this,ba)?2==ba.getState()&&(A[p][ba.ta.toString()]=ba,ga||-1!=this.g.indexOf(ba)||(ga=!0)):pc(n,ba.ta,L,ha,oa)||(ba=qc(n,ba.ta,ha,oa))&&L(p+1,ba)}z=a.viewHints;z=z[0]||z[1];if(!(this.f&&16<Date.now()-a.time&&z||!ga&&this.o&&Va(this.o,u)&&this.mf==m&&r==this.R&&(z||q*c/E*r==this.f))){if(z=this.c)M=l.Xd(p,c,f),ba=Math.round((x.$-x.ca+1)*M[0]/r),M=Math.round((x.ia-x.da+1)*M[1]/r),
722
+ga=z.canvas,ga.width!=ba||ga.height!=M?(this.R=r,ga.width=ba,ga.height=M):(z.clearRect(0,0,ba,M),r=this.R);this.g.length=0;ga=Object.keys(A).map(Number);ga.sort(ia);var da,ha=0;for(da=ga.length;ha<da;++ha){z=ga[ha];L=l.Xd(z,c,f);ba=n.Da(z);var fb=ba/q;var ca=E*l.Wf(f);var Ub=A[z];for(var uc in Ub){ba=Ub[uc];M=n.Aa(ba.ta,oa);z=(M[0]-B[0])/q*E/r;M=(B[3]-M[3])/q*E/r;var bc=L[0]*fb/r;var Je=L[1]*fb/r;this.Of(ba,a,b,z,M,bc,Je,ca);this.g.push(ba)}}this.mf=m;this.f=q*c/E*r;this.o=B}b=this.f/g;b=Kh(this.B,
723
+c*d[0]/2,c*d[1]/2,b,b,0,(this.o[0]-e[0])/this.f*c,(e[1]-this.o[3])/this.f*c);Kh(this.v,c*d[0]/2-b[4],c*d[1]/2-b[5],c/g,-c/g,0,-e[0],-e[1]);Et(a.usedTiles,l,p,x);Ft(a,l,n,c,f,u,p,h.Ud());Bt(a,l);Dt(a,l);return 0<this.g.length};Vv.prototype.Of=function(a,b,c,d,e,f,g,h){this.a.ha().Zf(b.viewState.projection)||this.c.clearRect(d,e,f,g);(a=a.Y())&&this.c.drawImage(a,h,h,a.width-2*h,a.height-2*h,d,e,f,g)};Vv.prototype.Y=function(){var a=this.c;return a?a.canvas:null};Vv.prototype.C=function(){return this.B};function Xv(){this.b="precision mediump float;varying vec2 a;uniform sampler2D e;void main(void){gl_FragColor=texture2D(e,a);}"}v(Xv,mi);var Yv=new Xv;function Zv(){this.b="varying vec2 a;attribute vec2 b;attribute vec2 c;uniform vec4 d;void main(void){gl_Position=vec4(b*d.xy+d.zw,0.,1.);a=c;}"}v(Zv,ni);var $v=new Zv;function aw(a,b){this.i=a.getUniformLocation(b,"e");this.c=a.getUniformLocation(b,"d");this.b=a.getAttribLocation(b,"b");this.a=a.getAttribLocation(b,"c")};function bw(a,b){Vt.call(this,a,b);this.I=Yv;this.fa=$v;this.f=null;this.B=new Di([0,0,0,1,1,0,1,1,0,1,0,0,1,1,1,0]);this.D=this.o=null;this.l=-1;this.R=[0,0]}v(bw,Vt);k=bw.prototype;k.ka=function(){Gi(this.c.f,this.B);Vt.prototype.ka.call(this)};k.Nf=function(a,b,c){var d=this.c;return function(e,f){return yt(a,b,e,f,function(a){var b=d.a.b.hasOwnProperty(a.bb());b&&(c[e]||(c[e]={}),c[e][a.ta.toString()]=a);return b})}};k.mg=function(){Vt.prototype.mg.call(this);this.f=null};
724
+k.ng=function(a,b,c){var d=this.c,e=c.b,f=a.viewState,g=f.projection,h=this.a,l=h.ha(),m=l.Ta(g),n=m.tc(f.resolution),p=m.Da(n),q=l.Xd(n,a.pixelRatio,g),r=q[0]/Ma(m.gb(n),this.R)[0],u=p/r,x=l.nb(r)*l.Wf(g),B=f.center,E=a.extent,A=rc(m,E,p);if(this.o&&Aa(this.o,A)&&this.l==l.i)u=this.D;else{var L=[A.$-A.ca+1,A.ia-A.da+1],oa=Ea(Math.max(L[0]*q[0],L[1]*q[1])),L=u*oa,ha=m.Pc(n),ga=ha[0]+A.ca*q[0]*u,u=ha[1]+A.da*q[1]*u,u=[ga,u,ga+L,u+L];Wt(this,a,oa);e.viewport(0,0,oa,oa);e.clearColor(0,0,0,0);e.clear(16384);
725
+e.disable(3042);oa=Hi(c,this.I,this.fa);c.Qc(oa);this.f||(this.f=new aw(e,oa));wi(c,34962,this.B);e.enableVertexAttribArray(this.f.b);e.vertexAttribPointer(this.f.b,2,5126,!1,16,0);e.enableVertexAttribArray(this.f.a);e.vertexAttribPointer(this.f.a,2,5126,!1,16,8);e.uniform1i(this.f.i,0);c={};c[n]={};var z=this.Nf(l,g,c),M=h.kd(),oa=!0,ga=Oa(),ba=new ya(0,0,0,0),da,fb;for(da=A.ca;da<=A.$;++da)for(fb=A.da;fb<=A.ia;++fb){ha=l.Nc(n,da,fb,r,g);if(void 0!==b.extent){var ca=m.Aa(ha.ta,ga);if(!qb(ca,b.extent))continue}ca=
726
+ha.getState();(ca=2==ca||4==ca||3==ca&&!M)||(ha=Ms(ha));ca=ha.getState();if(2==ca){if(d.a.b.hasOwnProperty(ha.bb())){c[n][ha.ta.toString()]=ha;continue}}else if(4==ca||3==ca&&!M)continue;oa=!1;ca=pc(m,ha.ta,z,ba,ga);ca||(ha=qc(m,ha.ta,ba,ga))&&z(n+1,ha)}b=Object.keys(c).map(Number);b.sort(ia);for(var z=new Float32Array(4),Ub,M=0,ba=b.length;M<ba;++M)for(Ub in da=c[b[M]],da)ha=da[Ub],ca=m.Aa(ha.ta,ga),z[0]=2*(ca[2]-ca[0])/L,z[1]=2*(ca[3]-ca[1])/L,z[2]=2*(ca[0]-u[0])/L-1,z[3]=2*(ca[1]-u[1])/L-1,e.uniform4fv(this.f.c,
727
+z),nk(d,ha,q,x*r),e.drawArrays(5,0,4);oa?(this.o=A,this.D=u,this.l=l.i):(this.D=this.o=null,this.l=-1,a.animate=!0)}Et(a.usedTiles,l,n,A);var uc=d.j;Ft(a,l,m,r,g,E,n,h.Ud(),function(a){2!=a.getState()||d.a.b.hasOwnProperty(a.bb())||a.bb()in uc.a||uc.f([a,tc(m,a.ta),m.Da(a.ta[0]),q,x*r])},this);Bt(a,l);Dt(a,l);e=this.v;Ch(e);Jh(e,(Math.round(B[0]/p)*p-u[0])/(u[2]-u[0]),(Math.round(B[1]/p)*p-u[1])/(u[3]-u[1]));f.rotation&&Hh(e,f.rotation);Ih(e,a.size[0]*f.resolution/(u[2]-u[0]),a.size[1]*f.resolution/
728
+(u[3]-u[1]));Jh(e,-.5,-.5);return!0};k.lg=function(a,b,c,d){if(this.g){a=Gh(this.v,[a[0]/b.size[0],(b.size[1]-a[1])/b.size[1]].slice());a=[a[0]*this.j,a[1]*this.j];b=this.c.f.b;b.bindFramebuffer(b.FRAMEBUFFER,this.g);var e=new Uint8Array(4);b.readPixels(a[0],a[1],1,1,b.RGBA,b.UNSIGNED_BYTE,e);if(0<e[3])return c.call(d,this.a,e)}};function cw(a){a=a?a:{};var b=tb({},a);delete b.preload;delete b.useInterimTilesOnError;wh.call(this,b);this.zi(void 0!==a.preload?a.preload:0);this.Ai(void 0!==a.useInterimTilesOnError?a.useInterimTilesOnError:!0)}v(cw,wh);k=cw.prototype;k.Fd=function(a){var b=null,c=a.U();"canvas"===c?b=new Vv(this):"webgl"===c&&(b=new bw(a,this));return b};k.Ud=function(){return this.get("preload")};k.zi=function(a){this.set("preload",a)};k.kd=function(){return this.get("useInterimTilesOnError")};
729
+k.Ai=function(a){this.set("useInterimTilesOnError",a)};function dw(a){this.c=null;Vv.call(this,a);this.I=!1;this.D=Bh();this.T="vector"==a.j?1:0}v(dw,Vv);var ew={image:ji,hybrid:["Polygon","LineString"]},fw={hybrid:["Image","Text"],vector:ji};k=dw.prototype;k.sd=function(a,b){var c=this.a,d=c.i;this.pa!=d&&(this.g.length=0,c=c.j,this.c||"vector"==c||(this.c=jd()),this.c&&"vector"==c&&(this.c=null));this.pa=d;return Vv.prototype.sd.apply(this,arguments)};
730
+k.Of=function(a,b,c,d,e,f,g,h){var l=a,m=this.a,n=b.pixelRatio,p=b.viewState.projection,q=m.i,r=m.get(Pt)||null,u=l.o;if(u.Nd||u.mf!=q||u.Kg!=r){for(var x=0,B=l.a.length;x<B;++x){var E=l.c[l.a[x]];E.S=null;u.Nd=!1;var A=m.ha(),L=A.tileGrid,oa=E.ta,ha=E.a,ga=A.Ta(p),z=ga.Da(l.ta[0]),M=L.Da(E.ta[0]),ga=ga.Aa(l.v),oa=L.Aa(oa),ga=pb(ga,oa);if("tile-pixels"==ha.a)var ba=L=A.nb(),M=Kh(this.D,0,0,1/M*ba,-1/M*ba,0,-oa[0],-oa[3]),M=Gh(M,[ga[0],ga[3]]).concat(Gh(M,[ga[2],ga[1]]));else if(L=z,M=ga,!dc(p,ha)){var da=
731
+!0;E.ig(p)}u.Nd=!1;A=new pt(0,M,L,A.l,m.c);M=Lt(L,n);L=E.g;r&&r!==u.Kg&&L.sort(r);oa=0;for(ga=L.length;oa<ga;++oa){ba=L[oa];da&&ba.V().tb(ha,p);var fb=void 0,ca=ba.Lc();ca?fb=ca.call(ba,z):(ca=m.f)&&(fb=ca(ba,z));if(fb){Array.isArray(fb)||(fb=[fb]);var ca=M,Ub=A;if(fb){var uc=!1;if(Array.isArray(fb))for(var bc=0,Je=fb.length;bc<Je;++bc)uc=Mt(Ub,ba,fb[bc],ca,this.Fi,this)||uc;else uc=Mt(Ub,ba,fb,ca,this.Fi,this)||uc;ba=uc}else ba=!1;this.I=this.I||ba;u.Nd=u.Nd||ba}}tt(A);E.c[l.ta.toString()]=A}u.mf=
732
+q;u.Kg=r}if(this.c){x=b;p=this.a;n=l.o;q=p.i;if((m=ew[p.j])&&n.Lg!==q)for(n.Lg=q,B=l.v,E=B[0],n=x.pixelRatio,z=p.ha(),p=z.tileGrid,ha=z.Ta(x.viewState.projection),q=ha.Da(E),r=z.nb(),l.j||(l.j=jd()),u=l.j,x=z.Xd(E,n,x.viewState.projection),u.canvas.width=x[0],u.canvas.height=x[1],x=ha.Aa(B),B=0,E=l.a.length;B<E;++B)ha=l.c[l.a[B]],A=ha.ta,da=n/q,z=Ch(this.D),"tile-pixels"==ha.a.a?(da=p.Aa(A,this.l),A=p.Da(A[0]),M=n/r*A/q,Ih(z,M,M),Jh(z,Math.round((da[0]-x[0])/A*r),Math.round((x[3]-da[3])/A*r))):(Ih(z,
733
+da,-da),Jh(z,-x[0],-x[3])),ha.c[l.ta.toString()].La(u,n,z,0,{},m);Vv.prototype.Of.apply(this,arguments)}};
734
+k.Ea=function(a,b,c,d,e){var f=b.viewState.resolution,g=b.viewState.rotation;c=void 0==c?0:c;var h=this.a,l={},m=this.g,n=h.ha();b=n.Ta(b.viewState.projection);var p=n.tileGrid,q;var r=0;for(q=m.length;r<q;++r){var u=m[r];var x=u.ta;x=b.Aa(x,this.l);var B=Qa(x,c*f,B);if(Ta(B,a)){x=0;for(var E=u.a.length;x<E;++x){var A=u.c[u.a[x]];if("tile-pixels"===A.a.a){var L=A.ta;f=p.Aa(L,this.l);var oa=ib(f);f=n.nb();L=p.Da(L[0])/f;oa=[(a[0]-oa[0])/L,(oa[1]-a[1])/L]}else oa=a;A=A.c[u.ta];var ha=ha||A.Ea(oa,f,
735
+g,c,{},function(a){var b=w(a).toString();if(!(b in l))return l[b]=!0,d.call(e,a,h)})}}}return ha};k.Fi=function(){zt(this)};
736
+k.ef=function(a,b,c){var d=this.a,e=d.ha(),f=fw[d.j];if(f)for(var g=b.pixelRatio,h=b.viewState.rotation,l=b.size,m=Math.round(g*l[0]/2),l=Math.round(g*l[1]/2),n=this.g,d=d.ha().nb(),p=e.tileGrid,e=e.Ta(b.viewState.projection),q=[],r=[],u=n.length-1;0<=u;--u){var x=n[u];if(5!=x.getState())for(var B=x.ta,E=e.Aa(B)[0]-e.Aa(x.v)[0],A=0,L=x.a.length;A<L;++A){var oa=x.c[x.a[A]],ha=oa.ta[0],ga=p.Da(ha);var z=oa;var M=b;if("tile-pixels"==z.a.a){var ba=this.a.ha(),da=ba.tileGrid,fb=z.ta,ba=da.Da(fb[0])/ba.nb(),
737
+z=M.viewState,ca=M.pixelRatio,Ub=z.resolution/ca,fb=da.Aa(fb,this.l),da=z.center,fb=ib(fb);M=M.size;M=Kh(this.D,Math.round(ca*M[0]/2),Math.round(ca*M[1]/2),ba/Ub,ba/Ub,z.rotation,(fb[0]-da[0])/ba,(da[1]-fb[1])/ba)}else M=Jt(this,M,0);Jh(M,E*d/ga,0);oa=oa.c[B.toString()];ga=vt(oa,M);a.save();a.globalAlpha=c.opacity;Vh(a,-h,m,l);ba=0;for(z=q.length;ba<z;++ba)ca=q[ba],ha<r[ba]&&(a.beginPath(),a.moveTo(ga[0],ga[1]),a.lineTo(ga[2],ga[3]),a.lineTo(ga[4],ga[5]),a.lineTo(ga[6],ga[7]),a.moveTo(ca[6],ca[7]),
738
+a.lineTo(ca[4],ca[5]),a.lineTo(ca[2],ca[3]),a.lineTo(ca[0],ca[1]),a.clip());oa.La(a,g,M,h,{},f);a.restore();q.push(ga);r.push(ha)}}Vv.prototype.ef.apply(this,arguments)};function W(a){a=a?a:{};var b=tb({},a);delete b.preload;delete b.useInterimTilesOnError;T.call(this,b);this.Bi(a.preload?a.preload:0);this.Ci(a.useInterimTilesOnError?a.useInterimTilesOnError:!0);xa(void 0==a.renderMode||"image"==a.renderMode||"hybrid"==a.renderMode||"vector"==a.renderMode,28);this.j=a.renderMode||"hybrid"}v(W,T);k=W.prototype;k.Fd=function(a){var b=null;"canvas"===a.U()&&(b=new dw(this));return b};k.Ud=function(){return this.get("preload")};k.kd=function(){return this.get("useInterimTilesOnError")};
739
+k.Bi=function(a){this.set("preload",a)};k.Ci=function(a){this.set("useInterimTilesOnError",a)};function gw(a,b,c,d){function e(){delete window[g];f.parentNode.removeChild(f)}var f=document.createElement("script"),g="olc_"+w(b);f.async=!0;f.src=a+(-1==a.indexOf("?")?"?":"&")+(d||"callback")+"="+g;var h=setTimeout(function(){e();c&&c()},1E4);window[g]=function(a){clearTimeout(h);e();b(a)};document.getElementsByTagName("head")[0].appendChild(f)};function hw(a,b,c,d,e,f,g,h,l,m,n){Ls.call(this,e,0);this.D=void 0!==n?n:!1;this.S=g;this.u=h;this.v=null;this.c=b;this.j=d;this.o=f?f:e;this.a=[];this.yd=null;this.g=0;f=d.Aa(this.o);h=this.j.G();e=this.c.G();f=h?pb(f,h):f;if(jb(f))if((h=a.G())&&(e?e=pb(e,h):e=h),d=Av(a,c,nb(f),d.Da(this.o[0])),!isFinite(d)||0>=d)this.state=4;else if(this.l=new Dv(a,c,f,e,d*(void 0!==m?m:.5)),this.l.c.length)if(this.g=b.tc(d),c=Fv(this.l),e&&(a.i?(c[1]=Ca(c[1],e[1],e[3]),c[3]=Ca(c[3],e[1],e[3])):c=pb(c,e)),jb(c)){a=
740
+oc(b,c,this.g);for(b=a.ca;b<=a.$;b++)for(c=a.da;c<=a.ia;c++)(m=l(this.g,b,c,g))&&this.a.push(m);this.a.length||(this.state=4)}else this.state=4;else this.state=4;else this.state=4}v(hw,Ls);hw.prototype.ka=function(){1==this.state&&(this.yd.forEach(Ec),this.yd=null);Ls.prototype.ka.call(this)};hw.prototype.Y=function(){return this.v};
741
+hw.prototype.de=function(){var a=[];this.a.forEach(function(b){b&&2==b.getState()&&a.push({extent:this.c.Aa(b.ta),image:b.Y()})},this);this.a.length=0;if(a.length){var b=this.o[0],c=this.j.gb(b),d="number"===typeof c?c:c[0],c="number"===typeof c?c:c[1],b=this.j.Da(b),e=this.c.Da(this.g),f=this.j.Aa(this.o);this.v=Cv(d,c,this.S,e,this.c.G(),b,f,this.l,a,this.u,this.D);this.state=2}else this.state=3;this.s()};
742
+hw.prototype.load=function(){if(0==this.state){this.state=1;this.s();var a=0;this.yd=[];this.a.forEach(function(b){var c=b.getState();if(0==c||1==c){a++;var d=y(b,"change",function(){var c=b.getState();if(2==c||3==c||4==c)Ec(d),a--,a||(this.yd.forEach(Ec),this.yd=null,this.de())},this);this.yd.push(d)}},this);this.a.forEach(function(a){0==a.getState()&&a.load()});a||setTimeout(this.de.bind(this),0)}};function iw(a,b){var c=/\{z\}/g,d=/\{x\}/g,e=/\{y\}/g,f=/\{-y\}/g;return function(g){if(g)return a.replace(c,g[0].toString()).replace(d,g[1].toString()).replace(e,function(){return(-g[2]-1).toString()}).replace(f,function(){var a=b.a?b.a[g[0]]:null;xa(a,55);return(a.ia-a.da+1+g[2]).toString()})}}function jw(a,b){for(var c=a.length,d=Array(c),e=0;e<c;++e)d[e]=iw(a[e],b);return kw(d)}function kw(a){return 1===a.length?a[0]:function(b,c,d){if(b)return a[Ia((b[1]<<b[0])+b[2],a.length)](b,c,d)}}
743
+function lw(){}function mw(a){var b=[],c=/\{([a-z])-([a-z])\}/.exec(a);if(c){var d=c[2].charCodeAt(0),e;for(e=c[1].charCodeAt(0);e<=d;++e)b.push(a.replace(c[0],String.fromCharCode(e)));return b}if(c=c=/\{(\d+)-(\d+)\}/.exec(a)){d=parseInt(c[2],10);for(e=parseInt(c[1],10);e<=d;e++)b.push(a.replace(c[0],e.toString()));return b}b.push(a);return b};function nw(a){lk.call(this);this.highWaterMark=void 0!==a?a:2048}v(nw,lk);function ow(a){return a.c>a.highWaterMark}nw.prototype.fd=function(a){for(var b,c;ow(this);){b=this.a.Yc;c=b.ta[0].toString();var d;if(d=c in a)b=b.ta,d=za(a[c],b[1],b[2]);if(d)break;else Nc(this.pop())}};function pw(a){$t.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,state:a.state,wrapX:a.wrapX});this.va=void 0!==a.opaque?a.opaque:!1;this.$a=void 0!==a.tilePixelRatio?a.tilePixelRatio:1;this.tileGrid=void 0!==a.tileGrid?a.tileGrid:null;this.a=new nw(a.cacheSize);this.o=[0,0];this.uc=""}v(pw,$t);k=pw.prototype;k.Ki=function(){return ow(this.a)};k.fd=function(a,b){(a=this.Wd(a))&&a.fd(b)};
744
+function yt(a,b,c,d,e){b=a.Wd(b);if(!b)return!1;for(var f=!0,g,h,l=d.ca;l<=d.$;++l)for(var m=d.da;m<=d.ia;++m)g=a.Sb(c,l,m),h=!1,b.b.hasOwnProperty(g)&&(g=b.get(g),(h=2===g.getState())&&(h=!1!==e(g))),h||(f=!1);return f}k.Wf=function(){return 0};function qw(a,b){a.uc!==b&&(a.uc=b,a.s())}k.Sb=function(a,b,c){return a+"/"+b+"/"+c};k.Zf=function(){return this.va};k.ab=function(){return this.tileGrid};k.Ta=function(a){return this.tileGrid?this.tileGrid:vc(a)};
745
+k.Wd=function(a){var b=this.c;return b&&!dc(b,a)?null:this.a};k.nb=function(){return this.$a};k.Xd=function(a,b,c){c=this.Ta(c);b=this.nb(b);a=Ma(c.gb(a),this.o);return 1==b?a:La(a,b,this.o)};function rw(a,b,c){var d=void 0!==c?c:a.c;c=a.Ta(d);if(a.u&&d.c){var e=b;b=e[0];a=tc(c,e);d=zc(d);Ta(d,a)?b=e:(e=lb(d),a[0]+=e*Math.ceil((d[0]-a[0])/e),b=c.bg(a,b))}e=b[0];d=b[1];a=b[2];if(c.minZoom>e||e>c.maxZoom)c=!1;else{var f=c.G();c=(c=f?oc(c,f,e):c.a?c.a[e]:null)?za(c,d,a):!0}return c?b:null}
746
+k.sa=function(){this.a.clear();this.s()};k.Ug=ua;function sw(a,b){Oc.call(this,a);this.tile=b}v(sw,Oc);function tw(a){pw.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,extent:a.extent,logo:a.logo,opaque:a.opaque,projection:a.projection,state:a.state,tileGrid:a.tileGrid,tilePixelRatio:a.tilePixelRatio,wrapX:a.wrapX});this.tileLoadFunction=a.tileLoadFunction;this.tileUrlFunction=this.Fc?this.Fc.bind(this):lw;this.urls=null;a.urls?this.eb(a.urls):a.url&&this.jb(a.url);a.tileUrlFunction&&this.cb(a.tileUrlFunction)}v(tw,pw);k=tw.prototype;k.pb=function(){return this.tileLoadFunction};
747
+k.qb=function(){return this.tileUrlFunction};k.rb=function(){return this.urls};k.Li=function(a){a=a.target;switch(a.getState()){case 1:this.b(new sw("tileloadstart",a));break;case 2:this.b(new sw("tileloadend",a));break;case 3:this.b(new sw("tileloaderror",a))}};k.vb=function(a){this.a.clear();this.tileLoadFunction=a;this.s()};k.cb=function(a,b){this.tileUrlFunction=a;"undefined"!==typeof b?qw(this,b):this.s()};
748
+k.jb=function(a){var b=this.urls=mw(a);this.cb(this.Fc?this.Fc.bind(this):jw(b,this.tileGrid),a)};k.eb=function(a){this.urls=a;var b=a.join("\n");this.cb(this.Fc?this.Fc.bind(this):jw(a,this.tileGrid),b)};k.Ug=function(a,b,c){a=this.Sb(a,b,c);this.a.b.hasOwnProperty(a)&&this.a.get(a)};function X(a){tw.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,extent:a.extent,logo:a.logo,opaque:a.opaque,projection:a.projection,state:a.state,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction?a.tileLoadFunction:uw,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:a.tileUrlFunction,url:a.url,urls:a.urls,wrapX:a.wrapX});this.crossOrigin=void 0!==a.crossOrigin?a.crossOrigin:null;this.tileClass=a.tileClass?a.tileClass:Os;this.g={};this.v={};this.Sa=a.reprojectionErrorThreshold;this.I=
749
+!1}v(X,tw);k=X.prototype;k.Ki=function(){if(ow(this.a))return!0;for(var a in this.g)if(ow(this.g[a]))return!0;return!1};k.fd=function(a,b){a=this.Wd(a);this.a.fd(this.a==a?b:{});for(var c in this.g){var d=this.g[c];d.fd(d==a?b:{})}};k.Wf=function(a){return this.c&&a&&!dc(this.c,a)?0:this.Xf()};k.Xf=function(){return 0};k.Zf=function(a){return this.c&&a&&!dc(this.c,a)?!1:tw.prototype.Zf.call(this,a)};
750
+k.Ta=function(a){var b=this.c;return!this.tileGrid||b&&!dc(b,a)?(b=w(a).toString(),b in this.v||(this.v[b]=vc(a)),this.v[b]):this.tileGrid};k.Wd=function(a){var b=this.c;if(!b||dc(b,a))return this.a;a=w(a).toString();a in this.g||(this.g[a]=new nw(this.a.highWaterMark));return this.g[a]};function vw(a,b,c,d,e,f,g){b=[b,c,d];e=(c=rw(a,b,f))?a.tileUrlFunction(c,e,f):void 0;e=new a.tileClass(b,void 0!==e?0:4,void 0!==e?e:"",a.crossOrigin,a.tileLoadFunction);e.key=g;y(e,"change",a.Li,a);return e}
751
+k.Nc=function(a,b,c,d,e){if(this.c&&e&&!dc(this.c,e)){var f=this.Wd(e);c=[a,b,c];var g;a=this.Sb.apply(this,c);f.b.hasOwnProperty(a)&&(g=f.get(a));b=this.uc;if(g&&g.key==b)return g;var h=this.c,l=this.Ta(h),m=this.Ta(e),n=rw(this,c,e);d=new hw(h,l,e,m,c,n,this.nb(d),this.Xf(),function(a,b,c,d){return ww(this,a,b,c,d,h)}.bind(this),this.Sa,this.I);d.key=b;g?(d.i=g,f.replace(a,d)):f.set(a,d);return d}return ww(this,a,b,c,d,e)};
752
+function ww(a,b,c,d,e,f){var g=a.Sb(b,c,d),h=a.uc;if(a.a.b.hasOwnProperty(g)){var l=a.a.get(g);if(l.key!=h){var m=l;l=vw(a,b,c,d,e,f,h);0==m.getState()?l.i=m.i:l.i=m;if(l.i){b=l.i;c=l;do{if(2==b.getState()){b.i=null;break}else 1==b.getState()?c=b:0==b.getState()?c.i=b.i:c=b;b=c.i}while(b)}a.a.replace(g,l)}}else l=vw(a,b,c,d,e,f,h),a.a.set(g,l);return l}k.Pb=function(a){if(this.I!=a){this.I=a;for(var b in this.g)this.g[b].clear();this.s()}};
753
+k.Qb=function(a,b){if(a=Tb(a))a=w(a).toString(),a in this.v||(this.v[a]=b)};function uw(a,b){a.Y().src=b};function xw(a){this.B=void 0!==a.hidpi?a.hidpi:!1;X.call(this,{cacheSize:a.cacheSize,crossOrigin:"anonymous",opaque:!0,projection:Tb("EPSG:3857"),reprojectionErrorThreshold:a.reprojectionErrorThreshold,state:"loading",tileLoadFunction:a.tileLoadFunction,tilePixelRatio:this.B?2:1,wrapX:void 0!==a.wrapX?a.wrapX:!0});this.R=void 0!==a.culture?a.culture:"en-us";this.C=void 0!==a.maxZoom?a.maxZoom:-1;this.f=a.key;this.l=a.imagerySet;gw("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+this.l+"?uriScheme=https&include=ImageryProviders&key="+
754
+this.f,this.pa.bind(this),void 0,"jsonp")}v(xw,X);var yw=new Ac({html:'<a class="ol-attribution-bing-tos" href="http://www.microsoft.com/maps/product/terms.html">Terms of Use</a>'});xw.prototype.T=function(){return this.f};xw.prototype.fa=function(){return this.l};
755
+xw.prototype.pa=function(a){if(200!=a.statusCode||"OK"!=a.statusDescription||"ValidCredentials"!=a.authenticationResultCode||1!=a.resourceSets.length||1!=a.resourceSets[0].resources.length)bu(this,"error");else{var b=a.brandLogoUri;-1==b.indexOf("https")&&(b=b.replace("http","https"));var c=a.resourceSets[0].resources[0],d=-1==this.C?c.zoomMax:this.C;a=zc(this.c);var e=xc({extent:a,minZoom:c.zoomMin,maxZoom:d,tileSize:(c.imageWidth==c.imageHeight?c.imageWidth:[c.imageWidth,c.imageHeight])/this.nb()});
756
+this.tileGrid=e;var f=this.R,g=this.B;this.tileUrlFunction=kw(c.imageUrlSubdomains.map(function(a){var b=[0,0,0],d=c.imageUrl.replace("{subdomain}",a).replace("{culture}",f);return function(a){if(a)return jc(a[0],a[1],-a[2]-1,b),a=d,g&&(a+="&dpi=d1&device=mobile"),a.replace("{quadkey}",kc(b))}}));if(c.imageryProviders){var h=Vb(Tb("EPSG:4326"),this.c);a=c.imageryProviders.map(function(a){var b=a.attribution,c={};a.coverageAreas.forEach(function(a){var b=a.zoomMin,f=Math.min(a.zoomMax,d);a=a.bbox;
757
+a=sb([a[1],a[0],a[3],a[2]],h);var g;for(g=b;g<=f;++g){var l=g.toString();b=oc(e,a,g);l in c?c[l].push(b):c[l]=[b]}});return new Ac({html:b,tileRanges:c})});a.push(yw);this.ua(a)}this.D=b;bu(this,"ready")}};function zw(a){a=a||{};var b=void 0!==a.projection?a.projection:"EPSG:3857",c=void 0!==a.tileGrid?a.tileGrid:xc({extent:zc(b),maxZoom:a.maxZoom,minZoom:a.minZoom,tileSize:a.tileSize});X.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,opaque:a.opaque,projection:b,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileGrid:c,tileLoadFunction:a.tileLoadFunction,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:a.tileUrlFunction,url:a.url,urls:a.urls,
758
+wrapX:void 0!==a.wrapX?a.wrapX:!0})}v(zw,X);function Aw(a){this.C=a.account;this.B=a.map||"";this.f=a.config||{};this.l={};zw.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,maxZoom:void 0!==a.maxZoom?a.maxZoom:18,minZoom:a.minZoom,projection:a.projection,state:"loading",wrapX:a.wrapX});Bw(this)}v(Aw,zw);k=Aw.prototype;k.Kk=function(){return this.f};k.tq=function(a){tb(this.f,a);Bw(this)};k.Xp=function(a){this.f=a||{};Bw(this)};
759
+function Bw(a){var b=JSON.stringify(a.f);if(a.l[b])Cw(a,a.l[b]);else{var c="https://"+a.C+".cartodb.com/api/v1/map";a.B&&(c+="/named/"+a.B);var d=new XMLHttpRequest;d.addEventListener("load",a.Dl.bind(a,b));d.addEventListener("error",a.Cl.bind(a));d.open("POST",c);d.setRequestHeader("Content-type","application/json");d.send(JSON.stringify(a.f))}}
760
+k.Dl=function(a,b){b=b.target;if(!b.status||200<=b.status&&300>b.status){try{var c=JSON.parse(b.responseText)}catch(d){bu(this,"error");return}Cw(this,c);this.l[a]=c;bu(this,"ready")}else bu(this,"error")};k.Cl=function(){bu(this,"error")};function Cw(a,b){a.jb("https://"+b.cdn_url.https+"/"+a.C+"/api/v1/map/"+b.layergroupid+"/{z}/{x}/{y}.png")};function Y(a){U.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,wrapX:a.wrapX});this.resolution=void 0;this.distance=void 0!==a.distance?a.distance:20;this.features=[];this.geometryFunction=a.geometryFunction||function(a){a=a.V();xa(a instanceof C,10);return a};this.source=a.source;this.source.J("change",Y.prototype.sa,this)}v(Y,U);k=Y.prototype;k.$n=function(){return this.distance};k.ao=function(){return this.source};
761
+k.Yd=function(a,b,c){this.source.Yd(a,b,c);b!==this.resolution&&(this.clear(),this.resolution=b,Dw(this),this.cd(this.features))};k.Yp=function(a){this.distance=a;this.sa()};k.sa=function(){this.clear();Dw(this);this.cd(this.features);U.prototype.sa.call(this)};
762
+function Dw(a){if(void 0!==a.resolution){a.features.length=0;for(var b=Oa(),c=a.distance*a.resolution,d=a.source.Xe(),e={},f=0,g=d.length;f<g;f++){var h=d[f];w(h).toString()in e||!(h=a.geometryFunction(h))||(h=h.X(),Za(h,b),Qa(b,c,b),h=a.source.Uf(b),h=h.filter(function(a){a=w(a).toString();return a in e?!1:e[a]=!0}),a.features.push(Ew(a,h)))}}}
763
+function Ew(a,b){for(var c=[0,0],d=b.length-1;0<=d;--d){var e=a.geometryFunction(b[d]);e?Ze(c,e.X()):b.splice(d,1)}gf(c,1/b.length);a=new H(new C(c));a.set("features",b);return a};function Fw(a,b){var c=[];Object.keys(b).forEach(function(a){null!==b[a]&&void 0!==b[a]&&c.push(a+"="+encodeURIComponent(b[a]))});var d=c.join("&");a=a.replace(/[?&]$/,"");a=-1===a.indexOf("?")?a+"?":a+"&";return a+d};function Gw(a){a=a||{};Hv.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions});this.R=void 0!==a.crossOrigin?a.crossOrigin:null;this.T=void 0!==a.hidpi?a.hidpi:!0;this.f=a.url;this.g=a.imageLoadFunction?a.imageLoadFunction:Nv;this.v=a.params||{};this.M=null;this.l=[0,0];this.I=0;this.B=void 0!==a.ratio?a.ratio:1.5}v(Gw,Hv);k=Gw.prototype;k.co=function(){return this.v};
764
+k.Jc=function(a,b,c,d){if(void 0===this.f)return null;b=Iv(this,b);c=this.T?c:1;var e=this.M;if(e&&this.I==this.i&&e.resolution==b&&e.a==c&&Va(e.G(),a))return e;e={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};tb(e,this.v);a=a.slice();var f=(a[0]+a[2])/2,g=(a[1]+a[3])/2;if(1!=this.B){var h=this.B*lb(a)/2,l=this.B*mb(a)/2;a[0]=f-h;a[1]=g-l;a[2]=f+h;a[3]=g+l}var h=b/c,l=Math.ceil(lb(a)/h),m=Math.ceil(mb(a)/h);a[0]=f-h*l/2;a[2]=f+h*l/2;a[1]=g-h*m/2;a[3]=g+h*m/2;this.l[0]=l;this.l[1]=m;f=a;g=this.l;h=c;d=
765
+d.mb.split(":").pop();e.SIZE=g[0]+","+g[1];e.BBOX=f.join(",");e.BBOXSR=d;e.IMAGESR=d;e.DPI=Math.round(90*h);d=this.f;f=d.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");f==d&&xa(!1,50);e=Fw(f,e);this.M=new Js(a,b,c,this.j,e,this.R,this.g);this.I=this.i;y(this.M,"change",this.o,this);return this.M};k.bo=function(){return this.g};k.eo=function(){return this.f};k.fo=function(a){this.M=null;this.g=a;this.s()};
766
+k.ho=function(a){a!=this.f&&(this.f=a,this.M=null,this.s())};k.io=function(a){tb(this.v,a);this.M=null;this.s()};function Hw(a){Hv.call(this,{projection:a.projection,resolutions:a.resolutions});this.R=void 0!==a.crossOrigin?a.crossOrigin:null;this.l=void 0!==a.displayDpi?a.displayDpi:96;this.g=a.params||{};this.I=a.url;this.f=a.imageLoadFunction?a.imageLoadFunction:Nv;this.T=void 0!==a.hidpi?a.hidpi:!0;this.pa=void 0!==a.metersPerUnit?a.metersPerUnit:1;this.v=void 0!==a.ratio?a.ratio:1;this.va=void 0!==a.useOverlay?a.useOverlay:!1;this.M=null;this.B=0}v(Hw,Hv);k=Hw.prototype;k.ko=function(){return this.g};
767
+k.Jc=function(a,b,c){b=Iv(this,b);c=this.T?c:1;var d=this.M;if(d&&this.B==this.i&&d.resolution==b&&d.a==c&&Va(d.G(),a))return d;1!=this.v&&(a=a.slice(),rb(a,this.v));var e=[lb(a)/b*c,mb(a)/b*c];if(void 0!==this.I){var d=this.I,f=nb(a),g=this.pa,h=lb(a),l=mb(a),m=e[0],n=e[1],p=.0254/this.l,e={OPERATION:this.va?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol.source.ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.l,SETDISPLAYWIDTH:Math.round(e[0]),SETDISPLAYHEIGHT:Math.round(e[1]),
768
+SETVIEWSCALE:n*h>m*l?h*g/(m*p):l*g/(n*p),SETVIEWCENTERX:f[0],SETVIEWCENTERY:f[1]};tb(e,this.g);d=Fw(d,e);d=new Js(a,b,c,this.j,d,this.R,this.f);y(d,"change",this.o,this)}else d=null;this.M=d;this.B=this.i;return d};k.jo=function(){return this.f};k.mo=function(a){tb(this.g,a);this.s()};k.lo=function(a){this.M=null;this.f=a;this.s()};function Iw(a){var b=a.imageExtent,c=void 0!==a.crossOrigin?a.crossOrigin:null,d=a.imageLoadFunction?a.imageLoadFunction:Nv;Hv.call(this,{attributions:a.attributions,logo:a.logo,projection:Tb(a.projection)});this.M=new Js(b,void 0,1,this.j,a.url,c,d);this.f=a.imageSize?a.imageSize:null;y(this.M,"change",this.o,this)}v(Iw,Hv);Iw.prototype.Jc=function(a){return qb(a,this.M.G())?this.M:null};
769
+Iw.prototype.o=function(a){if(2==this.M.getState()){var b=this.M.G(),c=this.M.Y();if(this.f){var d=this.f[0];var e=this.f[1]}else d=c.width,e=c.height;b=Math.ceil(lb(b)/(mb(b)/e));if(b!=d){var b=jd(b,e),f=b.canvas;b.drawImage(c,0,0,d,e,0,0,f.width,f.height);this.M.Og(f)}}Hv.prototype.o.call(this,a)};function Jw(a){a=a||{};Hv.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions});this.pa=void 0!==a.crossOrigin?a.crossOrigin:null;this.g=a.url;this.v=a.imageLoadFunction?a.imageLoadFunction:Nv;this.f=a.params||{};this.l=!0;Kw(this);this.T=a.serverType;this.va=void 0!==a.hidpi?a.hidpi:!0;this.M=null;this.B=[0,0];this.R=0;this.I=void 0!==a.ratio?a.ratio:1.5}v(Jw,Hv);var Lw=[101,101];k=Jw.prototype;
770
+k.so=function(a,b,c,d){if(void 0!==this.g){var e=ob(a,b,0,Lw),f={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.f.LAYERS};tb(f,this.f,d);d=Math.floor((e[3]-a[1])/b);f[this.l?"I":"X"]=Math.floor((a[0]-e[0])/b);f[this.l?"J":"Y"]=d;return Mw(this,e,Lw,1,Tb(c),f)}};k.uo=function(){return this.f};
771
+k.Jc=function(a,b,c,d){if(void 0===this.g)return null;b=Iv(this,b);1==c||this.va&&void 0!==this.T||(c=1);var e=b/c,f=nb(a),g=ob(f,e,0,[Math.ceil(lb(a)/e),Math.ceil(mb(a)/e)]);a=ob(f,e,0,[Math.ceil(this.I*lb(a)/e),Math.ceil(this.I*mb(a)/e)]);if((f=this.M)&&this.R==this.i&&f.resolution==b&&f.a==c&&Va(f.G(),g))return f;g={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};tb(g,this.f);this.B[0]=Math.round(lb(a)/e);this.B[1]=Math.round(mb(a)/e);d=Mw(this,a,this.B,c,d,g);
772
+this.M=new Js(a,b,c,this.j,d,this.pa,this.v);this.R=this.i;y(this.M,"change",this.o,this);return this.M};k.to=function(){return this.v};
773
+function Mw(a,b,c,d,e,f){xa(void 0!==a.g,9);f[a.l?"CRS":"SRS"]=e.mb;"STYLES"in a.f||(f.STYLES="");if(1!=d)switch(a.T){case "geoserver":d=90*d+.5|0;f.FORMAT_OPTIONS="FORMAT_OPTIONS"in f?f.FORMAT_OPTIONS+(";dpi:"+d):"dpi:"+d;break;case "mapserver":f.MAP_RESOLUTION=90*d;break;case "carmentaserver":case "qgis":f.DPI=90*d;break;default:xa(!1,8)}f.WIDTH=c[0];f.HEIGHT=c[1];c=e.b;var g;a.l&&"ne"==c.substr(0,2)?g=[b[1],b[0],b[3],b[2]]:g=b;f.BBOX=g.join(",");return Fw(a.g,f)}k.vo=function(){return this.g};
774
+k.wo=function(a){this.M=null;this.v=a;this.s()};k.xo=function(a){a!=this.g&&(this.g=a,this.M=null,this.s())};k.yo=function(a){tb(this.f,a);Kw(this);this.M=null;this.s()};function Kw(a){a.l=0<=Ye(a.f.VERSION||"1.3.0")};function Nw(a){a=a||{};var b;void 0!==a.attributions?b=a.attributions:b=[Ow];zw.call(this,{attributions:b,cacheSize:a.cacheSize,crossOrigin:void 0!==a.crossOrigin?a.crossOrigin:"anonymous",opaque:void 0!==a.opaque?a.opaque:!0,maxZoom:void 0!==a.maxZoom?a.maxZoom:19,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileLoadFunction:a.tileLoadFunction,url:void 0!==a.url?a.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",wrapX:a.wrapX})}v(Nw,zw);var Ow=new Ac({html:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.'});Fj.df={};Fj.df.Af=function(){};
775
+(function(a){function b(a,b,c){if(g)return new ImageData(a,b,c);b=h.createImageData(b,c);b.data.set(a);return b}function c(a){var b=!0;try{new ImageData(10,10)}catch(n){b=!1}return function(c){var d=c.buffers,e=c.meta,f=c.width,g=c.height,h=d.length,l=d[0].byteLength;if(c.imageOps){l=Array(h);for(c=0;c<h;++c){var m=c;var n=new Uint8ClampedArray(d[c]);var L=f,oa=g;n=b?new ImageData(n,L,oa):{data:n,width:L,height:oa};l[m]=n}f=a(l,e).data}else{f=new Uint8ClampedArray(l);g=Array(h);m=Array(h);for(c=0;c<
776
+h;++c)g[c]=new Uint8ClampedArray(d[c]),m[c]=[0,0,0,0];for(d=0;d<l;d+=4){for(c=0;c<h;++c)n=g[c],m[c][0]=n[d],m[c][1]=n[d+1],m[c][2]=n[d+2],m[c][3]=n[d+3];c=a(m,e);f[d]=c[0];f[d+1]=c[1];f[d+2]=c[2];f[d+3]=c[3]}}return f.buffer}}function d(a,b){var d=Object.keys(a.lib||{}).map(function(b){return"var "+b+" = "+a.lib[b].toString()+";"}).concat(["var __minion__ = ("+c.toString()+")(",a.operation.toString(),");",'self.addEventListener("message", function(event) {'," var buffer = __minion__(event.data);",
777
+" self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),d=URL.createObjectURL(new Blob(d,{type:"text/javascript"})),d=new Worker(d);d.addEventListener("message",b);return d}function e(a,b){var d=c(a.operation);return{postMessage:function(a){setTimeout(function(){b({data:{buffer:d(a),meta:a.meta}})},0)}}}function f(a){this.Ff=!!a.$l;var b;0===a.threads?b=0:this.Ff?b=1:b=a.threads||1;var c=[];if(b)for(var f=0;f<b;++f)c[f]=d(a,this.gh.bind(this,f));else c[0]=e(a,this.gh.bind(this,
778
+0));this.qe=c;this.Ed=[];this.fk=a.rp||Infinity;this.oe=0;this.bd={};this.Gf=null}var g=!0;try{new ImageData(10,10)}catch(l){g=!1}var h=document.createElement("canvas").getContext("2d");f.prototype.pp=function(a,b,c){this.dk({inputs:a,Qh:b,callback:c});this.dh()};f.prototype.dk=function(a){for(this.Ed.push(a);this.Ed.length>this.fk;)this.Ed.shift().callback(null,null)};f.prototype.dh=function(){if(0===this.oe&&0<this.Ed.length){var a=this.Gf=this.Ed.shift(),b=a.inputs[0].width,c=a.inputs[0].height,
779
+d=a.inputs.map(function(a){return a.data.buffer}),e=this.qe.length;this.oe=e;if(1===e)this.qe[0].postMessage({buffers:d,meta:a.Qh,imageOps:this.Ff,width:b,height:c},d);else for(var f=4*Math.ceil(a.inputs[0].data.length/4/e),g=0;g<e;++g){for(var h=g*f,B=[],E=0,A=d.length;E<A;++E)B.push(d[g].slice(h,h+f));this.qe[g].postMessage({buffers:B,meta:a.Qh,imageOps:this.Ff,width:b,height:c},B)}}};f.prototype.gh=function(a,b){this.Jq||(this.bd[a]=b.data,--this.oe,0===this.oe&&this.gk())};f.prototype.gk=function(){var a=
780
+this.Gf,c=this.qe.length;if(1===c){var d=new Uint8ClampedArray(this.bd[0].buffer);var e=this.bd[0].meta}else{var f=a.inputs[0].data.length;d=new Uint8ClampedArray(f);e=Array(f);for(var f=4*Math.ceil(f/4/c),g=0;g<c;++g){var h=g*f;d.set(new Uint8ClampedArray(this.bd[g].buffer),h);e[g]=this.bd[g].meta}}this.Gf=null;this.bd={};a.callback(null,b(d,a.inputs[0].width,a.inputs[0].height),e);this.dh()};a["default"]={Af:f};a.Af=f})(Fj.df=Fj.df||{});function Pw(a){this.B=null;this.va=void 0!==a.operationType?a.operationType:"pixel";this.Sa=void 0!==a.threads?a.threads:1;this.g=Qw(a.sources);for(var b=0,c=this.g.length;b<c;++b)y(this.g[b],"change",this.s,this);this.T=new Pe(function(){return 1},this.s.bind(this));for(var b=Rw(this.g),c={},d=0,e=b.length;d<e;++d)c[w(b[d].layer)]=b[d];this.f=null;this.I={animate:!1,attributions:{},coordinateToPixelTransform:Bh(),extent:null,focus:null,index:0,layerStates:c,layerStatesArray:b,logos:{},pixelRatio:1,
781
+pixelToCoordinateTransform:Bh(),postRenderFunctions:[],size:[0,0],skippedFeatureUids:{},tileQueue:this.T,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{}};Hv.call(this,{});a.operation&&this.v(a.operation,a.lib)}v(Pw,Hv);Pw.prototype.v=function(a,b){this.B=new Fj.df.Af({operation:a,$l:"image"===this.va,rp:1,lib:b,threads:this.Sa});this.s()};
782
+Pw.prototype.Y=function(a,b,c,d){c=!0;for(var e,f=0,g=this.g.length;f<g;++f)if(e=this.g[f].a.ha(),"ready"!==e.getState()){c=!1;break}if(!c)return null;c=tb({},this.I);c.viewState=tb({},c.viewState);e=nb(a);c.extent=a.slice();c.focus=e;c.size[0]=Math.round(lb(a)/b);c.size[1]=Math.round(mb(a)/b);f=c.viewState;f.center=e;f.projection=d;f.resolution=b;this.l=c;Qe(c.tileQueue,16,16);this.f&&(d=this.f.resolution,c=this.f.G(),b===d&&bb(a,c)||(this.f=null));if(!this.f||this.i!==this.R)a:{a=this.l;d=this.g.length;
783
+b=Array(d);for(c=0;c<d;++c){e=this.g[c];f=a;g=a.layerStatesArray[c];if(e.sd(f,g)){var h=f.size[0],l=f.size[1];if(Sw){var m=Sw.canvas;m.width!==h||m.height!==l?Sw=jd(h,l):Sw.clearRect(0,0,h,l)}else Sw=jd(h,l);e.S(f,g,Sw);e=Sw.getImageData(0,0,h,l)}else e=null;if(e)b[c]=e;else break a}d={};this.b(new Tw(Uw,a,d));this.B.pp(b,d,this.pa.bind(this,a))}return this.f};
784
+Pw.prototype.pa=function(a,b,c,d){if(!b&&c){b=a.extent;var e=a.viewState.resolution;if(e===this.l.viewState.resolution&&bb(b,this.l.extent)){if(this.f)var f=this.f.Y().getContext("2d");else f=jd(Math.round(lb(b)/e),Math.round(mb(b)/e)),this.f=new Ks(b,e,1,this.j,f.canvas);f.putImageData(c,0,0);this.s();this.R=this.i;this.b(new Tw(Vw,a,d))}}};var Sw=null;function Rw(a){return a.map(function(a){return th(a.a)})}
785
+function Qw(a){for(var b=a.length,c=Array(b),d=0;d<b;++d){var e=d,f=a[d],g=null;f instanceof pw?(f=new cw({source:f}),g=new Vv(f)):f instanceof Hv&&(f=new Uv({source:f}),g=new zv(f));c[e]=g}return c}function Tw(a,b,c){Oc.call(this,a);this.extent=b.extent;this.resolution=b.viewState.resolution/b.pixelRatio;this.data=c}v(Tw,Oc);Pw.prototype.Jc=function(){return null};var Uw="beforeoperations",Vw="afteroperations";function Ww(a){var b=a.layer.indexOf("-"),b=Xw[-1==b?a.layer:a.layer.slice(0,b)],c=Yw[a.layer];zw.call(this,{attributions:Zw,cacheSize:a.cacheSize,crossOrigin:"anonymous",maxZoom:void 0!=a.maxZoom?a.maxZoom:b.maxZoom,minZoom:void 0!=a.minZoom?a.minZoom:b.minZoom,opaque:c.opaque,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileLoadFunction:a.tileLoadFunction,url:void 0!==a.url?a.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+a.layer+"/{z}/{x}/{y}."+c.Lb,wrapX:a.wrapX})}v(Ww,zw);
786
+var Zw=[new Ac({html:'Map tiles by <a href="http://stamen.com/">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.'}),Ow],Yw={terrain:{Lb:"jpg",opaque:!0},"terrain-background":{Lb:"jpg",opaque:!0},"terrain-labels":{Lb:"png",opaque:!1},"terrain-lines":{Lb:"png",opaque:!1},"toner-background":{Lb:"png",opaque:!0},toner:{Lb:"png",opaque:!0},"toner-hybrid":{Lb:"png",opaque:!1},"toner-labels":{Lb:"png",opaque:!1},"toner-lines":{Lb:"png",opaque:!1},"toner-lite":{Lb:"png",
787
+opaque:!0},watercolor:{Lb:"jpg",opaque:!0}},Xw={terrain:{minZoom:4,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:1,maxZoom:16}};function $w(a){a=a||{};X.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,projection:a.projection,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction,url:a.url,urls:a.urls,wrapX:void 0!==a.wrapX?a.wrapX:!0});this.f=a.params||{};this.l=Oa();qw(this,ax(this))}v($w,X);function ax(a){var b=0,c=[],d;for(d in a.f)c[b++]=d+"-"+a.f[d];return c.join("/")}$w.prototype.C=function(){return this.f};
788
+$w.prototype.nb=function(a){return a};
789
+$w.prototype.Fc=function(a,b,c){var d=this.tileGrid;d||(d=this.Ta(c));if(!(d.b.length<=a[0])){var e=d.Aa(a,this.l),f=Ma(d.gb(a[0]),this.o);1!=b&&(f=La(f,b,this.o));d={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};tb(d,this.f);var g=this.urls;g?(c=c.mb.split(":").pop(),d.SIZE=f[0]+","+f[1],d.BBOX=e.join(","),d.BBOXSR=c,d.IMAGESR=c,d.DPI=Math.round(d.DPI?d.DPI*b:90*b),a=(1==g.length?g[0]:g[Ia((a[1]<<a[0])+a[2],g.length)]).replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),
790
+a=Fw(a,d)):a=void 0;return a}};$w.prototype.B=function(a){tb(this.f,a);qw(this,ax(this))};function bx(a){pw.call(this,{opaque:!1,projection:a.projection,tileGrid:a.tileGrid,wrapX:void 0!==a.wrapX?a.wrapX:!0})}v(bx,pw);bx.prototype.Nc=function(a,b,c){var d=this.Sb(a,b,c);if(this.a.b.hasOwnProperty(d))return this.a.get(d);var e=Ma(this.tileGrid.gb(a));a=[a,b,c];b=(b=rw(this,a))?rw(this,b).toString():"";e=new cx(a,e,b);this.a.set(d,e);return e};function cx(a,b,c){Ls.call(this,a,2);this.c=b;this.Ia=c;this.a=null}v(cx,Ls);
791
+cx.prototype.Y=function(){if(this.a)return this.a;var a=this.c,b=jd(a[0],a[1]);b.strokeStyle="black";b.strokeRect(.5,.5,a[0]+.5,a[1]+.5);b.fillStyle="black";b.textAlign="center";b.textBaseline="middle";b.font="24px sans-serif";b.fillText(this.Ia,a[0]/2,a[1]/2);return this.a=b.canvas};cx.prototype.load=function(){};function dx(a){this.f=null;X.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,projection:Tb("EPSG:3857"),reprojectionErrorThreshold:a.reprojectionErrorThreshold,state:"loading",tileLoadFunction:a.tileLoadFunction,wrapX:void 0!==a.wrapX?a.wrapX:!0});if(a.url)if(a.jsonp)gw(a.url,this.og.bind(this),this.Ve.bind(this));else{var b=new XMLHttpRequest;b.addEventListener("load",this.Ao.bind(this));b.addEventListener("error",this.zo.bind(this));b.open("GET",a.url);b.send()}else a.tileJSON?
792
+this.og(a.tileJSON):xa(!1,51)}v(dx,X);k=dx.prototype;k.Ao=function(a){a=a.target;if(!a.status||200<=a.status&&300>a.status){try{var b=JSON.parse(a.responseText)}catch(c){this.Ve();return}this.og(b)}else this.Ve()};k.zo=function(){this.Ve()};k.pl=function(){return this.f};
793
+k.og=function(a){var b=Tb("EPSG:4326"),c=this.c;if(a.bounds){var d=Vb(b,c);var e=sb(a.bounds,d)}var f=a.minzoom||0,d=a.maxzoom||22;this.tileGrid=c=xc({extent:zc(c),maxZoom:d,minZoom:f});this.tileUrlFunction=jw(a.tiles,c);if(void 0!==a.attribution&&!this.j){b=void 0!==e?e:b.G();e={};for(var g;f<=d;++f)g=f.toString(),e[g]=[oc(c,b,f)];this.ua([new Ac({html:a.attribution,tileRanges:e})])}this.f=a;bu(this,"ready")};k.Ve=function(){bu(this,"error")};function ex(a){pw.call(this,{projection:Tb("EPSG:3857"),state:"loading"});this.v=void 0!==a.preemptive?a.preemptive:!0;this.l=lw;this.g=void 0;this.f=a.jsonp||!1;if(a.url)if(this.f)gw(a.url,this.pg.bind(this),this.We.bind(this));else{var b=new XMLHttpRequest;b.addEventListener("load",this.Eo.bind(this));b.addEventListener("error",this.Do.bind(this));b.open("GET",a.url);b.send()}else a.tileJSON?this.pg(a.tileJSON):xa(!1,51)}v(ex,pw);k=ex.prototype;
794
+k.Eo=function(a){a=a.target;if(!a.status||200<=a.status&&300>a.status){try{var b=JSON.parse(a.responseText)}catch(c){this.We();return}this.pg(b)}else this.We()};k.Do=function(){this.We()};k.ml=function(){return this.g};k.zk=function(a,b,c,d,e){this.tileGrid?(b=this.tileGrid.Be(a,b),fx(this.Nc(b[0],b[1],b[2],1,this.c),a,c,d,e)):!0===e?setTimeout(function(){c.call(d,null)},0):c.call(d,null)};k.We=function(){bu(this,"error")};
795
+k.pg=function(a){var b=Tb("EPSG:4326"),c=this.c;if(a.bounds){var d=Vb(b,c);var e=sb(a.bounds,d)}var f=a.minzoom||0,d=a.maxzoom||22;this.tileGrid=c=xc({extent:zc(c),maxZoom:d,minZoom:f});this.g=a.template;var g=a.grids;if(g){this.l=jw(g,c);if(void 0!==a.attribution){b=void 0!==e?e:b.G();for(e={};f<=d;++f)g=f.toString(),e[g]=[oc(c,b,f)];this.ua([new Ac({html:a.attribution,tileRanges:e})])}bu(this,"ready")}else bu(this,"error")};
796
+k.Nc=function(a,b,c,d,e){var f=this.Sb(a,b,c);if(this.a.b.hasOwnProperty(f))return this.a.get(f);a=[a,b,c];b=rw(this,a,e);d=this.l(b,d,e);d=new gx(a,void 0!==d?0:4,void 0!==d?d:"",this.tileGrid.Aa(a),this.v,this.f);this.a.set(f,d);return d};k.Ug=function(a,b,c){a=this.Sb(a,b,c);this.a.b.hasOwnProperty(a)&&this.a.get(a)};function gx(a,b,c,d,e,f){Ls.call(this,a,b);this.o=c;this.a=d;this.v=e;this.c=this.j=this.g=null;this.l=f}v(gx,Ls);k=gx.prototype;k.Y=function(){return null};
797
+k.getData=function(a){if(!this.g||!this.j)return null;var b=this.g[Math.floor((1-(a[1]-this.a[1])/(this.a[3]-this.a[1]))*this.g.length)];if("string"!==typeof b)return null;b=b.charCodeAt(Math.floor((a[0]-this.a[0])/(this.a[2]-this.a[0])*b.length));93<=b&&b--;35<=b&&b--;b-=32;a=null;b in this.j&&(b=this.j[b],this.c&&b in this.c?a=this.c[b]:a=b);return a};
798
+function fx(a,b,c,d,e){0==a.state&&!0===e?(Jc(a,"change",function(){c.call(d,this.getData(b))},a),hx(a)):!0===e?setTimeout(function(){c.call(d,this.getData(b))}.bind(a),0):c.call(d,a.getData(b))}k.bb=function(){return this.o};k.De=function(){this.state=3;this.s()};k.Ji=function(a){this.g=a.grid;this.j=a.keys;this.c=a.data;this.state=4;this.s()};
799
+function hx(a){if(0==a.state)if(a.state=1,a.l)gw(a.o,a.Ji.bind(a),a.De.bind(a));else{var b=new XMLHttpRequest;b.addEventListener("load",a.Co.bind(a));b.addEventListener("error",a.Bo.bind(a));b.open("GET",a.o);b.send()}}k.Co=function(a){a=a.target;if(!a.status||200<=a.status&&300>a.status){try{var b=JSON.parse(a.responseText)}catch(c){this.De();return}this.Ji(b)}else this.De()};k.Bo=function(){this.De()};k.load=function(){this.v&&hx(this)};function ix(a){a=a||{};var b=a.params||{};X.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,opaque:!("TRANSPARENT"in b?b.TRANSPARENT:1),projection:a.projection,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction,url:a.url,urls:a.urls,wrapX:void 0!==a.wrapX?a.wrapX:!0});this.C=void 0!==a.gutter?a.gutter:0;this.f=b;this.l=!0;this.B=a.serverType;this.T=void 0!==a.hidpi?a.hidpi:!0;this.R="";
800
+jx(this);this.fa=Oa();kx(this);qw(this,lx(this))}v(ix,X);k=ix.prototype;
801
+k.Fo=function(a,b,c,d){c=Tb(c);var e=this.tileGrid;e||(e=this.Ta(c));b=e.Be(a,b);if(!(e.b.length<=b[0])){var f=e.Da(b[0]),g=e.Aa(b,this.fa),e=Ma(e.gb(b[0]),this.o),h=this.C;h&&(e=Ka(e,h,this.o),g=Qa(g,f*h,g));h={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.f.LAYERS};tb(h,this.f,d);d=Math.floor((g[3]-a[1])/f);h[this.l?"I":"X"]=Math.floor((a[0]-g[0])/f);h[this.l?"J":"Y"]=d;return mx(this,b,e,g,1,c,h)}};k.Xf=function(){return this.C};
802
+k.Sb=function(a,b,c){return this.R+X.prototype.Sb.call(this,a,b,c)};k.Go=function(){return this.f};
803
+function mx(a,b,c,d,e,f,g){var h=a.urls;if(h){g.WIDTH=c[0];g.HEIGHT=c[1];g[a.l?"CRS":"SRS"]=f.mb;"STYLES"in a.f||(g.STYLES="");if(1!=e)switch(a.B){case "geoserver":c=90*e+.5|0;g.FORMAT_OPTIONS="FORMAT_OPTIONS"in g?g.FORMAT_OPTIONS+(";dpi:"+c):"dpi:"+c;break;case "mapserver":g.MAP_RESOLUTION=90*e;break;case "carmentaserver":case "qgis":g.DPI=90*e;break;default:xa(!1,52)}f=f.b;a.l&&"ne"==f.substr(0,2)&&(a=d[0],d[0]=d[1],d[1]=a,a=d[2],d[2]=d[3],d[3]=a);g.BBOX=d.join(",");return Fw(1==h.length?h[0]:h[Ia((b[1]<<
804
+b[0])+b[2],h.length)],g)}}k.nb=function(a){return this.T&&void 0!==this.B?a:1};function jx(a){var b=0,c=[];if(a.urls){var d;var e=0;for(d=a.urls.length;e<d;++e)c[b++]=a.urls[e]}a.R=c.join("#")}function lx(a){var b=0,c=[],d;for(d in a.f)c[b++]=d+"-"+a.f[d];return c.join("/")}
805
+k.Fc=function(a,b,c){var d=this.tileGrid;d||(d=this.Ta(c));if(!(d.b.length<=a[0])){1==b||this.T&&void 0!==this.B||(b=1);var e=d.Da(a[0]),f=d.Aa(a,this.fa),d=Ma(d.gb(a[0]),this.o),g=this.C;g&&(d=Ka(d,g,this.o),f=Qa(f,e*g,f));1!=b&&(d=La(d,b,this.o));e={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};tb(e,this.f);return mx(this,a,d,f,b,c,e)}};k.eb=function(a){X.prototype.eb.call(this,a);jx(this)};k.Ho=function(a){tb(this.f,a);jx(this);kx(this);qw(this,lx(this))};
806
+function kx(a){a.l=0<=Ye(a.f.VERSION||"1.3.0")};function nx(a,b,c,d,e,f,g,h,l,m,n,p,q,r){Ls.call(this,a,b);this.j=null;this.o={Nd:!1,Kg:null,mf:-1,Lg:-1};this.c=m;this.a=[];this.u=c;this.v=f;this.g=[];this.l=[];if(f){var u=l.Aa(f),x=l.Da(a[0]);h.Rf(u,h.tc(x),function(a){var b=pb(u,h.Aa(a));if(.5<=lb(b)/x&&.5<=mb(b)/x){var b=a.toString(),c=m[b];c||(c=g(a,n,p),c=m[b]=new q(a,void 0==c?4:0,void 0==c?"":c,d,e),this.l.push(y(c,"change",r)));c.j++;this.a.push(b)}}.bind(this))}}v(nx,Ls);
807
+nx.prototype.ka=function(){for(var a=0,b=this.a.length;a<b;++a){var c=this.a[a],d=this.c[c];d.j--;d.j||(delete this.c[c],Nc(d))}this.a.length=0;this.c=null;1==this.state&&(this.g.forEach(Ec),this.g.length=0);this.i&&Nc(this.i);this.state=5;this.s();this.l.forEach(Ec);this.l.length=0;Ls.prototype.ka.call(this)};nx.prototype.Y=function(){return-1==this.o.Lg?null:this.j.canvas};nx.prototype.bb=function(){return this.a.join("/")+"/"+this.u};
808
+nx.prototype.load=function(){var a=0,b=!1;0==this.state&&Ns(this,1);1==this.state&&this.a.forEach(function(c){var d=this.c[c];0==d.state?(d.Pg(this.S),d.load()):3==d.state?b=!0:4==d.state&&ma(this.a,c);if(1==d.state){var e=y(d,"change",function(){var f=d.getState();if(2==f||3==f)--a,Ec(e),ma(this.g,e),3==f&&(ma(this.a,c),b=!0),a||Ns(this,0<this.a.length?2:3)}.bind(this));this.g.push(e);++a}}.bind(this));a||setTimeout(function(){Ns(this,0<this.a.length?2:b?3:4)}.bind(this),0)};
809
+function ox(a,b){a.Pg(Cl(b,a.o,a.$o.bind(a),a.Zo.bind(a)))};function px(a,b,c,d,e){Ls.call(this,a,b);this.j=0;this.o=d;this.g=null;this.c={};this.u=e;this.l=c}v(px,Ls);k=px.prototype;k.ka=function(){this.g=null;this.c={};this.state=5;this.s();Ls.prototype.ka.call(this)};k.Lm=function(){return this.o};k.Km=function(){return this.g};k.bb=function(){return this.l};k.Mm=function(){return this.a};k.load=function(){0==this.state&&(Ns(this,1),this.u(this,this.l),this.v(null,NaN,null))};k.$o=function(a,b){this.ig(b);this.mj(a)};k.Zo=function(){Ns(this,3)};
810
+k.mj=function(a){this.g=a;Ns(this,2)};k.ig=function(a){this.a=a};k.Pg=function(a){this.v=a};function qx(a){tw.call(this,{attributions:a.attributions,cacheSize:void 0!==a.cacheSize?a.cacheSize:128,extent:a.extent,logo:a.logo,opaque:!1,projection:a.projection,state:a.state,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction?a.tileLoadFunction:ox,tileUrlFunction:a.tileUrlFunction,tilePixelRatio:a.tilePixelRatio,url:a.url,urls:a.urls,wrapX:void 0===a.wrapX?!0:a.wrapX});this.g=a.format?a.format:null;this.v={};this.l=void 0==a.overlaps?!0:a.overlaps;this.tileClass=a.tileClass?a.tileClass:
811
+px;this.f={};this.tileGrid||(this.tileGrid=this.Ta(Tb(a.projection||"EPSG:3857")))}v(qx,tw);qx.prototype.Nc=function(a,b,c,d,e){var f=this.Sb(a,b,c);if(this.a.b.hasOwnProperty(f))return this.a.get(f);a=[a,b,c];c=(b=rw(this,a,e))?this.tileUrlFunction(b,d,e):void 0;d=new nx(a,void 0!==c?0:4,void 0!==c?c:"",this.g,this.tileLoadFunction,b,this.tileUrlFunction,this.tileGrid,this.Ta(e),this.v,d,e,this.tileClass,this.Li.bind(this));this.a.set(f,d);return d};
812
+qx.prototype.Ta=function(a){var b=a.mb,c=this.f[b];c||(c=this.tileGrid,c=this.f[b]=wc(a,void 0,c?c.gb(c.minZoom):void 0));return c};qx.prototype.nb=function(a){return void 0==a?tw.prototype.nb.call(this,a):a};qx.prototype.Xd=function(a,b,c){a=Ma(this.Ta(c).gb(a));return[Math.round(a[0]*b),Math.round(a[1]*b)]};function rx(a){this.o=a.matrixIds;lc.call(this,{extent:a.extent,origin:a.origin,origins:a.origins,resolutions:a.resolutions,tileSize:a.tileSize,tileSizes:a.tileSizes,sizes:a.sizes})}v(rx,lc);rx.prototype.l=function(){return this.o};
813
+function sx(a,b,c){var d=[],e=[],f=[],g=[],h=[],l=void 0!==c?c:[];c=Tb(a.SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"));var m=c.sc(),n="ne"==c.b.substr(0,2);a.TileMatrix.sort(function(a,b){return b.ScaleDenominator-a.ScaleDenominator});a.TileMatrix.forEach(function(a){var b;0<l.length?b=na(l,function(b){return a.Identifier==b.TileMatrix}):b=!0;if(b){e.push(a.Identifier);b=2.8E-4*a.ScaleDenominator/m;var c=a.TileWidth,p=a.TileHeight;n?f.push([a.TopLeftCorner[1],a.TopLeftCorner[0]]):
814
+f.push(a.TopLeftCorner);d.push(b);g.push(c==p?c:[c,p]);h.push([a.MatrixWidth,-a.MatrixHeight])}});return new rx({extent:b,origins:f,resolutions:d,matrixIds:e,tileSizes:g,sizes:h})};function Z(a){function b(a){a="KVP"==d?Fw(a,f):a.replace(/\{(\w+?)\}/g,function(a,b){return b.toLowerCase()in f?f[b.toLowerCase()]:a});return function(b){if(b){var c={TileMatrix:e.o[b[0]],TileCol:b[1],TileRow:-b[2]-1};tb(c,g);b=a;return b="KVP"==d?Fw(b,c):b.replace(/\{(\w+?)\}/g,function(a,b){return c[b]})}}}this.fa=void 0!==a.version?a.version:"1.0.0";this.C=void 0!==a.format?a.format:"image/jpeg";this.f=a.dimensions?a.dimensions:{};this.B=a.layer;this.l=a.matrixSet;this.R=a.style;var c=a.urls;void 0===
815
+c&&void 0!==a.url&&(c=mw(a.url));var d=this.T=void 0!==a.requestEncoding?a.requestEncoding:"KVP",e=a.tileGrid,f={layer:this.B,style:this.R,tilematrixset:this.l};"KVP"==d&&tb(f,{Service:"WMTS",Request:"GetTile",Version:this.fa,Format:this.C});var g=this.f,h=c&&0<c.length?kw(c.map(b)):lw;X.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,projection:a.projection,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileClass:a.tileClass,tileGrid:e,
816
+tileLoadFunction:a.tileLoadFunction,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:h,urls:c,wrapX:void 0!==a.wrapX?a.wrapX:!1});qw(this,tx(this))}v(Z,X);k=Z.prototype;k.Mk=function(){return this.f};k.Io=function(){return this.C};k.Jo=function(){return this.B};k.$k=function(){return this.l};k.kl=function(){return this.T};k.Ko=function(){return this.R};k.rl=function(){return this.fa};function tx(a){var b=0,c=[],d;for(d in a.f)c[b++]=d+"-"+a.f[d];return c.join("/")}
817
+k.uq=function(a){tb(this.f,a);qw(this,tx(this))};function ux(a){a=a||{};var b=a.size,c=b[0],d=b[1],e=[],f=256;switch(void 0!==a.tierSizeCalculation?a.tierSizeCalculation:vx){case vx:for(;c>f||d>f;)e.push([Math.ceil(c/f),Math.ceil(d/f)]),f+=f;break;case wx:for(;c>f||d>f;)e.push([Math.ceil(c/f),Math.ceil(d/f)]),c>>=1,d>>=1;break;default:xa(!1,53)}e.push([1,1]);e.reverse();for(var f=[1],g=[0],d=1,c=e.length;d<c;d++)f.push(1<<d),g.push(e[d-1][0]*e[d-1][1]+g[d-1]);f.reverse();b=[0,-b[1],b[0],0];b=new lc({extent:b,origin:ib(b),resolutions:f});(f=a.url)&&
818
+-1==f.indexOf("{TileGroup}")&&(f+="{TileGroup}/{z}-{x}-{y}.jpg");f=mw(f);f=kw(f.map(function(a){return function(b){if(b){var c=b[0],d=b[1];b=-b[2]-1;var f={z:c,x:d,y:b,TileGroup:"TileGroup"+((d+b*e[c][0]+g[c])/256|0)};return a.replace(/\{(\w+?)\}/g,function(a,b){return f[b]})}}}));X.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,projection:a.projection,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileClass:xx,tileGrid:b,tileUrlFunction:f})}
819
+v(ux,X);function xx(a,b,c,d,e){Os.call(this,a,b,c,d,e);this.a=null}v(xx,Os);xx.prototype.Y=function(){if(this.a)return this.a;var a=Os.prototype.Y.call(this);if(2==this.state){if(256==a.width&&256==a.height)return this.a=a;var b=jd(256,256);b.drawImage(a,0,0);return this.a=b.canvas}return a};var vx="default",wx="truncated";function yx(a,b){this.b=b;this.a=[{x:0,y:0,width:a,height:a}];this.c={};this.i=jd(a,a);this.f=this.i.canvas}yx.prototype.get=function(a){return this.c[a]||null};
820
+yx.prototype.add=function(a,b,c,d,e){var f;var g=0;for(f=this.a.length;g<f;++g){var h=this.a[g];if(h.width>=b+this.b&&h.height>=c+this.b)return f={offsetX:h.x+this.b,offsetY:h.y+this.b,image:this.f},this.c[a]=f,d.call(e,this.i,h.x+this.b,h.y+this.b),a=g,b+=this.b,d=c+this.b,h.width-b>h.height-d?(c={x:h.x+b,y:h.y,width:h.width-b,height:h.height},b={x:h.x,y:h.y+d,width:b,height:h.height-d},zx(this,a,c,b)):(c={x:h.x+b,y:h.y,width:h.width-b,height:d},b={x:h.x,y:h.y+d,width:h.width,height:h.height-d},
821
+zx(this,a,c,b)),f}return null};function zx(a,b,c,d){b=[b,1];0<c.width&&0<c.height&&b.push(c);0<d.width&&0<d.height&&b.push(d);a.a.splice.apply(a.a,b)};function Ax(a){a=a||{};this.a=void 0!==a.initialSize?a.initialSize:256;this.i=void 0!==a.maxSize?a.maxSize:void 0!==ea?ea:2048;this.b=void 0!==a.space?a.space:1;this.f=[new yx(this.a,this.b)];this.c=this.a;this.g=[new yx(this.c,this.b)]}Ax.prototype.add=function(a,b,c,d,e,f){if(b+this.b>this.i||c+this.b>this.i)return null;d=Bx(this,!1,a,b,c,d,f);if(!d)return null;a=Bx(this,!0,a,b,c,e?e:ua,f);return{offsetX:d.offsetX,offsetY:d.offsetY,image:d.image,Zl:a.image}};
822
+function Bx(a,b,c,d,e,f,g){var h=b?a.g:a.f,l;var m=0;for(l=h.length;m<l;++m){var n=h[m];if(n=n.add(c,d,e,f,g))return n;n||m!==l-1||(b?(n=Math.min(2*a.c,a.i),a.c=n):(n=Math.min(2*a.a,a.i),a.a=n),n=new yx(n,a.b),h.push(n),++l)}return null};wa.prototype.code=wa.prototype.code;t("ol.Attribution",Ac);Ac.prototype.getHTML=Ac.prototype.i;t("ol.Collection",Yc);Yc.prototype.clear=Yc.prototype.clear;Yc.prototype.extend=Yc.prototype.fg;Yc.prototype.forEach=Yc.prototype.forEach;Yc.prototype.getArray=Yc.prototype.tm;Yc.prototype.item=Yc.prototype.item;Yc.prototype.getLength=Yc.prototype.dc;Yc.prototype.insertAt=Yc.prototype.He;Yc.prototype.pop=Yc.prototype.pop;Yc.prototype.push=Yc.prototype.push;Yc.prototype.remove=Yc.prototype.remove;
823
+Yc.prototype.removeAt=Yc.prototype.Hg;Yc.prototype.setAt=Yc.prototype.Wp;bd.prototype.element=bd.prototype.element;t("ol.color.asArray",ed);t("ol.color.asString",gd);t("ol.colorlike.asColorLike",id);t("ol.control.defaults",xd);t("ol.coordinate.add",Ze);t("ol.coordinate.createStringXY",function(a){return function(b){return lf(b,a)}});t("ol.coordinate.format",cf);t("ol.coordinate.rotate",ef);t("ol.coordinate.toStringHDMS",function(a,b){return a?bf("NS",a[1],b)+" "+bf("EW",a[0],b):""});
824
+t("ol.coordinate.toStringXY",lf);t("ol.DeviceOrientation",Rk);Rk.prototype.getAlpha=Rk.prototype.Fk;Rk.prototype.getBeta=Rk.prototype.Ik;Rk.prototype.getGamma=Rk.prototype.Ok;Rk.prototype.getHeading=Rk.prototype.um;Rk.prototype.getTracking=Rk.prototype.Th;Rk.prototype.setTracking=Rk.prototype.gg;t("ol.easing.easeIn",qd);t("ol.easing.easeOut",rd);t("ol.easing.inAndOut",sd);t("ol.easing.linear",td);t("ol.easing.upAndDown",function(a){return.5>a?sd(2*a):1-sd(2*(a-.5))});
825
+t("ol.extent.boundingExtent",Na);t("ol.extent.buffer",Qa);t("ol.extent.containsCoordinate",Ta);t("ol.extent.containsExtent",Va);t("ol.extent.containsXY",Ua);t("ol.extent.createEmpty",Oa);t("ol.extent.equals",bb);t("ol.extent.extend",cb);t("ol.extent.getArea",jb);t("ol.extent.getBottomLeft",eb);t("ol.extent.getBottomRight",gb);t("ol.extent.getCenter",nb);t("ol.extent.getHeight",mb);t("ol.extent.getIntersection",pb);t("ol.extent.getSize",function(a){return[a[2]-a[0],a[3]-a[1]]});
826
+t("ol.extent.getTopLeft",ib);t("ol.extent.getTopRight",hb);t("ol.extent.getWidth",lb);t("ol.extent.intersects",qb);t("ol.extent.isEmpty",kb);t("ol.extent.applyTransform",sb);t("ol.Feature",H);H.prototype.clone=H.prototype.clone;H.prototype.getGeometry=H.prototype.V;H.prototype.getId=H.prototype.wm;H.prototype.getGeometryName=H.prototype.Qk;H.prototype.getStyle=H.prototype.xm;H.prototype.getStyleFunction=H.prototype.Lc;H.prototype.setGeometry=H.prototype.Ra;H.prototype.setStyle=H.prototype.hg;
827
+H.prototype.setId=H.prototype.jc;H.prototype.setGeometryName=H.prototype.Tc;t("ol.featureloader.xhr",Dl);t("ol.Geolocation",xs);xs.prototype.getAccuracy=xs.prototype.Dk;xs.prototype.getAccuracyGeometry=xs.prototype.Ek;xs.prototype.getAltitude=xs.prototype.Gk;xs.prototype.getAltitudeAccuracy=xs.prototype.Hk;xs.prototype.getHeading=xs.prototype.ym;xs.prototype.getPosition=xs.prototype.zm;xs.prototype.getProjection=xs.prototype.Uh;xs.prototype.getSpeed=xs.prototype.ll;xs.prototype.getTracking=xs.prototype.Vh;
828
+xs.prototype.getTrackingOptions=xs.prototype.Gh;xs.prototype.setProjection=xs.prototype.Wh;xs.prototype.setTracking=xs.prototype.Ke;xs.prototype.setTrackingOptions=xs.prototype.wj;t("ol.Graticule",Ds);Ds.prototype.getMap=Ds.prototype.Cm;Ds.prototype.getMeridians=Ds.prototype.al;Ds.prototype.getParallels=Ds.prototype.hl;Ds.prototype.setMap=Ds.prototype.setMap;t("ol.has.DEVICE_PIXEL_RATIO",Sd);t("ol.has.CANVAS",Ud);t("ol.has.DEVICE_ORIENTATION",Vd);t("ol.has.GEOLOCATION",Wd);t("ol.has.TOUCH",Xd);
829
+t("ol.has.WEBGL",Md);Js.prototype.getImage=Js.prototype.Y;Js.prototype.load=Js.prototype.load;Os.prototype.getImage=Os.prototype.Y;t("ol.inherits",v);t("ol.interaction.defaults",qh);t("ol.Kinetic",kg);t("ol.loadingstrategy.all",Zt);t("ol.loadingstrategy.bbox",function(a){return[a]});t("ol.loadingstrategy.tile",function(a){return function(b,c){c=a.tc(c);b=oc(a,b,c);var d=[];c=[c,0,0];for(c[1]=b.ca;c[1]<=b.$;++c[1])for(c[2]=b.da;c[2]<=b.ia;++c[2])d.push(a.Aa(c));return d}});t("ol.Map",G);
830
+G.prototype.addControl=G.prototype.kk;G.prototype.addInteraction=G.prototype.lk;G.prototype.addLayer=G.prototype.ih;G.prototype.addOverlay=G.prototype.jh;G.prototype.forEachFeatureAtPixel=G.prototype.we;G.prototype.forEachLayerAtPixel=G.prototype.Im;G.prototype.hasFeatureAtPixel=G.prototype.Yl;G.prototype.getEventCoordinate=G.prototype.Tf;G.prototype.getEventPixel=G.prototype.xe;G.prototype.getTarget=G.prototype.ag;G.prototype.getTargetElement=G.prototype.jd;G.prototype.getCoordinateFromPixel=G.prototype.Wa;
831
+G.prototype.getControls=G.prototype.Lk;G.prototype.getOverlays=G.prototype.fl;G.prototype.getOverlayById=G.prototype.el;G.prototype.getInteractions=G.prototype.Sk;G.prototype.getLayerGroup=G.prototype.Kc;G.prototype.getLayers=G.prototype.Xh;G.prototype.getPixelFromCoordinate=G.prototype.Ja;G.prototype.getSize=G.prototype.Ob;G.prototype.getView=G.prototype.Z;G.prototype.getViewport=G.prototype.sl;G.prototype.renderSync=G.prototype.Tp;G.prototype.render=G.prototype.render;
832
+G.prototype.removeControl=G.prototype.Mp;G.prototype.removeInteraction=G.prototype.Np;G.prototype.removeLayer=G.prototype.Pp;G.prototype.removeOverlay=G.prototype.Qp;G.prototype.setLayerGroup=G.prototype.qj;G.prototype.setSize=G.prototype.Qg;G.prototype.setTarget=G.prototype.Le;G.prototype.setView=G.prototype.iq;G.prototype.updateSize=G.prototype.Ad;Jd.prototype.originalEvent=Jd.prototype.originalEvent;Jd.prototype.pixel=Jd.prototype.pixel;Jd.prototype.coordinate=Jd.prototype.coordinate;
833
+Jd.prototype.dragging=Jd.prototype.dragging;Id.prototype.map=Id.prototype.map;Id.prototype.frameState=Id.prototype.frameState;t("ol.Object",Tc);Tc.prototype.get=Tc.prototype.get;Tc.prototype.getKeys=Tc.prototype.O;Tc.prototype.getProperties=Tc.prototype.N;Tc.prototype.set=Tc.prototype.set;Tc.prototype.setProperties=Tc.prototype.H;Tc.prototype.unset=Tc.prototype.P;Xc.prototype.key=Xc.prototype.key;Xc.prototype.oldValue=Xc.prototype.oldValue;t("ol.Observable",Sc);
834
+t("ol.Observable.unByKey",function(a){if(Array.isArray(a))for(var b=0,c=a.length;b<c;++b)Ec(a[b]);else Ec(a)});Sc.prototype.changed=Sc.prototype.s;Sc.prototype.dispatchEvent=Sc.prototype.b;Sc.prototype.getRevision=Sc.prototype.L;Sc.prototype.on=Sc.prototype.J;Sc.prototype.once=Sc.prototype.once;Sc.prototype.un=Sc.prototype.K;t("ol.Overlay",sk);sk.prototype.getElement=sk.prototype.Rd;sk.prototype.getId=sk.prototype.Jm;sk.prototype.getMap=sk.prototype.Me;sk.prototype.getOffset=sk.prototype.Dh;
835
+sk.prototype.getPosition=sk.prototype.Yh;sk.prototype.getPositioning=sk.prototype.Eh;sk.prototype.setElement=sk.prototype.lj;sk.prototype.setMap=sk.prototype.setMap;sk.prototype.setOffset=sk.prototype.rj;sk.prototype.setPosition=sk.prototype.Ne;sk.prototype.setPositioning=sk.prototype.uj;t("ol.proj.METERS_PER_UNIT",zb);t("ol.proj.setProj4",function(a){Ab=a});t("ol.proj.getPointResolution",Sb);t("ol.proj.addEquivalentProjections",Wb);t("ol.proj.addProjection",Xb);
836
+t("ol.proj.addCoordinateTransforms",ac);t("ol.proj.fromLonLat",function(a,b){return gc(a,"EPSG:4326",void 0!==b?b:"EPSG:3857")});t("ol.proj.toLonLat",function(a,b){return gc(a,void 0!==b?b:"EPSG:3857","EPSG:4326")});t("ol.proj.get",Tb);t("ol.proj.equivalent",dc);t("ol.proj.getTransform",ec);t("ol.proj.transform",gc);t("ol.proj.transformExtent",hc);
837
+t("ol.render.toContext",function(a,b){var c=a.canvas,d=b?b:{};b=d.pixelRatio||Sd;if(d=d.size)c.width=d[0]*b,c.height=d[1]*b,c.style.width=d[0]+"px",c.style.height=d[1]+"px";c=[0,0,c.width,c.height];d=Ih(Bh(),b,b);return new Xh(a,b,c,d,0)});t("ol.size.toSize",Ma);t("ol.Sphere",xb);xb.prototype.geodesicArea=xb.prototype.a;xb.prototype.haversineDistance=xb.prototype.b;Ls.prototype.getTileCoord=Ls.prototype.f;Ls.prototype.load=Ls.prototype.load;t("ol.tilegrid.createXYZ",xc);px.prototype.getFormat=px.prototype.Lm;
838
+px.prototype.getFeatures=px.prototype.Km;px.prototype.getProjection=px.prototype.Mm;px.prototype.setFeatures=px.prototype.mj;px.prototype.setProjection=px.prototype.ig;px.prototype.setLoader=px.prototype.Pg;t("ol.View",F);F.prototype.animate=F.prototype.animate;F.prototype.getAnimating=F.prototype.Ic;F.prototype.getInteracting=F.prototype.Rk;F.prototype.cancelAnimations=F.prototype.ed;F.prototype.constrainCenter=F.prototype.Ec;F.prototype.constrainResolution=F.prototype.constrainResolution;
839
+F.prototype.constrainRotation=F.prototype.constrainRotation;F.prototype.getCenter=F.prototype.wa;F.prototype.calculateExtent=F.prototype.dd;F.prototype.getMaxResolution=F.prototype.Nm;F.prototype.getMinResolution=F.prototype.Pm;F.prototype.getMaxZoom=F.prototype.Om;F.prototype.setMaxZoom=F.prototype.eq;F.prototype.getMinZoom=F.prototype.Qm;F.prototype.setMinZoom=F.prototype.fq;F.prototype.getProjection=F.prototype.Rm;F.prototype.getResolution=F.prototype.Pa;F.prototype.getResolutions=F.prototype.Sm;
840
+F.prototype.getResolutionForExtent=F.prototype.ze;F.prototype.getRotation=F.prototype.Qa;F.prototype.getZoom=F.prototype.Hh;F.prototype.getZoomForResolution=F.prototype.Ce;F.prototype.fit=F.prototype.Qf;F.prototype.centerOn=F.prototype.uk;F.prototype.rotate=F.prototype.rotate;F.prototype.setCenter=F.prototype.ob;F.prototype.setResolution=F.prototype.Vc;F.prototype.setRotation=F.prototype.Oe;F.prototype.setZoom=F.prototype.lq;t("ol.xml.getAllTextContent",kl);t("ol.xml.parse",pl);
841
+Oi.prototype.getGL=Oi.prototype.Wo;Oi.prototype.useProgram=Oi.prototype.Qc;t("ol.tilegrid.TileGrid",lc);lc.prototype.forEachTileCoord=lc.prototype.Rf;lc.prototype.getMaxZoom=lc.prototype.Ti;lc.prototype.getMinZoom=lc.prototype.Ui;lc.prototype.getOrigin=lc.prototype.Pc;lc.prototype.getResolution=lc.prototype.Da;lc.prototype.getResolutions=lc.prototype.Vi;lc.prototype.getTileCoordExtent=lc.prototype.Aa;lc.prototype.getTileCoordForCoordAndResolution=lc.prototype.Be;
842
+lc.prototype.getTileCoordForCoordAndZ=lc.prototype.bg;lc.prototype.getTileSize=lc.prototype.gb;lc.prototype.getZForResolution=lc.prototype.tc;t("ol.tilegrid.WMTS",rx);rx.prototype.getMatrixIds=rx.prototype.l;t("ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet",sx);t("ol.style.AtlasManager",Ax);t("ol.style.Circle",$k);$k.prototype.setRadius=$k.prototype.Uc;t("ol.style.Fill",al);al.prototype.clone=al.prototype.clone;al.prototype.getColor=al.prototype.i;al.prototype.setColor=al.prototype.c;
843
+t("ol.style.Icon",eo);eo.prototype.clone=eo.prototype.clone;eo.prototype.getAnchor=eo.prototype.Hc;eo.prototype.getColor=eo.prototype.Lo;eo.prototype.getImage=eo.prototype.Y;eo.prototype.getOrigin=eo.prototype.Oc;eo.prototype.getSrc=eo.prototype.Mo;eo.prototype.getSize=eo.prototype.ic;eo.prototype.load=eo.prototype.load;t("ol.style.Image",Xk);Xk.prototype.getOpacity=Xk.prototype.Ze;Xk.prototype.getRotateWithView=Xk.prototype.$e;Xk.prototype.getRotation=Xk.prototype.af;Xk.prototype.getScale=Xk.prototype.bf;
844
+Xk.prototype.getSnapToPixel=Xk.prototype.Ae;Xk.prototype.setOpacity=Xk.prototype.td;Xk.prototype.setRotation=Xk.prototype.cf;Xk.prototype.setScale=Xk.prototype.ud;t("ol.style.RegularShape",Yk);Yk.prototype.clone=Yk.prototype.clone;Yk.prototype.getAnchor=Yk.prototype.Hc;Yk.prototype.getAngle=Yk.prototype.Pi;Yk.prototype.getFill=Yk.prototype.Fa;Yk.prototype.getImage=Yk.prototype.Y;Yk.prototype.getOrigin=Yk.prototype.Oc;Yk.prototype.getPoints=Yk.prototype.Qi;Yk.prototype.getRadius=Yk.prototype.Ri;
845
+Yk.prototype.getRadius2=Yk.prototype.Fh;Yk.prototype.getSize=Yk.prototype.ic;Yk.prototype.getStroke=Yk.prototype.Ga;t("ol.style.Stroke",wj);wj.prototype.clone=wj.prototype.clone;wj.prototype.getColor=wj.prototype.No;wj.prototype.getLineCap=wj.prototype.Vk;wj.prototype.getLineDash=wj.prototype.Oo;wj.prototype.getLineDashOffset=wj.prototype.Wk;wj.prototype.getLineJoin=wj.prototype.Xk;wj.prototype.getMiterLimit=wj.prototype.bl;wj.prototype.getWidth=wj.prototype.Po;wj.prototype.setColor=wj.prototype.Qo;
846
+wj.prototype.setLineCap=wj.prototype.aq;wj.prototype.setLineDash=wj.prototype.setLineDash;wj.prototype.setLineDashOffset=wj.prototype.bq;wj.prototype.setLineJoin=wj.prototype.cq;wj.prototype.setMiterLimit=wj.prototype.gq;wj.prototype.setWidth=wj.prototype.jq;t("ol.style.Style",bl);bl.prototype.clone=bl.prototype.clone;bl.prototype.getGeometry=bl.prototype.V;bl.prototype.getGeometryFunction=bl.prototype.Pk;bl.prototype.getFill=bl.prototype.Fa;bl.prototype.setFill=bl.prototype.pf;
847
+bl.prototype.getImage=bl.prototype.Y;bl.prototype.setImage=bl.prototype.Og;bl.prototype.getStroke=bl.prototype.Ga;bl.prototype.setStroke=bl.prototype.qf;bl.prototype.getText=bl.prototype.Na;bl.prototype.setText=bl.prototype.xd;bl.prototype.getZIndex=bl.prototype.Ba;bl.prototype.setGeometry=bl.prototype.Ra;bl.prototype.setZIndex=bl.prototype.Vb;t("ol.style.Text",fo);fo.prototype.clone=fo.prototype.clone;fo.prototype.getFont=fo.prototype.Nk;fo.prototype.getOffsetX=fo.prototype.cl;
848
+fo.prototype.getOffsetY=fo.prototype.dl;fo.prototype.getFill=fo.prototype.Fa;fo.prototype.getRotateWithView=fo.prototype.Ro;fo.prototype.getRotation=fo.prototype.So;fo.prototype.getScale=fo.prototype.To;fo.prototype.getStroke=fo.prototype.Ga;fo.prototype.getText=fo.prototype.Na;fo.prototype.getTextAlign=fo.prototype.nl;fo.prototype.getTextBaseline=fo.prototype.ol;fo.prototype.setFont=fo.prototype.nj;fo.prototype.setOffsetX=fo.prototype.sj;fo.prototype.setOffsetY=fo.prototype.tj;
849
+fo.prototype.setFill=fo.prototype.pf;fo.prototype.setRotation=fo.prototype.Uo;fo.prototype.setScale=fo.prototype.Si;fo.prototype.setStroke=fo.prototype.qf;fo.prototype.setText=fo.prototype.xd;fo.prototype.setTextAlign=fo.prototype.vj;fo.prototype.setTextBaseline=fo.prototype.hq;t("ol.source.BingMaps",xw);t("ol.source.BingMaps.TOS_ATTRIBUTION",yw);xw.prototype.getApiKey=xw.prototype.T;xw.prototype.getImagerySet=xw.prototype.fa;t("ol.source.CartoDB",Aw);Aw.prototype.getConfig=Aw.prototype.Kk;
850
+Aw.prototype.updateConfig=Aw.prototype.tq;Aw.prototype.setConfig=Aw.prototype.Xp;t("ol.source.Cluster",Y);Y.prototype.getDistance=Y.prototype.$n;Y.prototype.getSource=Y.prototype.ao;Y.prototype.setDistance=Y.prototype.Yp;t("ol.source.Image",Hv);Jv.prototype.image=Jv.prototype.image;t("ol.source.ImageArcGISRest",Gw);Gw.prototype.getParams=Gw.prototype.co;Gw.prototype.getImageLoadFunction=Gw.prototype.bo;Gw.prototype.getUrl=Gw.prototype.eo;Gw.prototype.setImageLoadFunction=Gw.prototype.fo;
851
+Gw.prototype.setUrl=Gw.prototype.ho;Gw.prototype.updateParams=Gw.prototype.io;t("ol.source.ImageCanvas",Ov);t("ol.source.ImageMapGuide",Hw);Hw.prototype.getParams=Hw.prototype.ko;Hw.prototype.getImageLoadFunction=Hw.prototype.jo;Hw.prototype.updateParams=Hw.prototype.mo;Hw.prototype.setImageLoadFunction=Hw.prototype.lo;t("ol.source.ImageStatic",Iw);t("ol.source.ImageVector",Pv);Pv.prototype.getSource=Pv.prototype.no;Pv.prototype.getStyle=Pv.prototype.oo;Pv.prototype.getStyleFunction=Pv.prototype.po;
852
+Pv.prototype.setStyle=Pv.prototype.Ii;t("ol.source.ImageWMS",Jw);Jw.prototype.getGetFeatureInfoUrl=Jw.prototype.so;Jw.prototype.getParams=Jw.prototype.uo;Jw.prototype.getImageLoadFunction=Jw.prototype.to;Jw.prototype.getUrl=Jw.prototype.vo;Jw.prototype.setImageLoadFunction=Jw.prototype.wo;Jw.prototype.setUrl=Jw.prototype.xo;Jw.prototype.updateParams=Jw.prototype.yo;t("ol.source.OSM",Nw);t("ol.source.OSM.ATTRIBUTION",Ow);t("ol.source.Raster",Pw);Pw.prototype.setOperation=Pw.prototype.v;
853
+Tw.prototype.extent=Tw.prototype.extent;Tw.prototype.resolution=Tw.prototype.resolution;Tw.prototype.data=Tw.prototype.data;t("ol.source.Source",$t);$t.prototype.getAttributions=$t.prototype.ya;$t.prototype.getLogo=$t.prototype.xa;$t.prototype.getProjection=$t.prototype.za;$t.prototype.getState=$t.prototype.getState;$t.prototype.refresh=$t.prototype.sa;$t.prototype.setAttributions=$t.prototype.ua;t("ol.source.Stamen",Ww);t("ol.source.Tile",pw);pw.prototype.getTileGrid=pw.prototype.ab;
854
+sw.prototype.tile=sw.prototype.tile;t("ol.source.TileArcGISRest",$w);$w.prototype.getParams=$w.prototype.C;$w.prototype.updateParams=$w.prototype.B;t("ol.source.TileDebug",bx);t("ol.source.TileImage",X);X.prototype.setRenderReprojectionEdges=X.prototype.Pb;X.prototype.setTileGridForProjection=X.prototype.Qb;t("ol.source.TileJSON",dx);dx.prototype.getTileJSON=dx.prototype.pl;t("ol.source.TileUTFGrid",ex);ex.prototype.getTemplate=ex.prototype.ml;ex.prototype.forDataAtCoordinateAndResolution=ex.prototype.zk;
855
+t("ol.source.TileWMS",ix);ix.prototype.getGetFeatureInfoUrl=ix.prototype.Fo;ix.prototype.getParams=ix.prototype.Go;ix.prototype.updateParams=ix.prototype.Ho;tw.prototype.getTileLoadFunction=tw.prototype.pb;tw.prototype.getTileUrlFunction=tw.prototype.qb;tw.prototype.getUrls=tw.prototype.rb;tw.prototype.setTileLoadFunction=tw.prototype.vb;tw.prototype.setTileUrlFunction=tw.prototype.cb;tw.prototype.setUrl=tw.prototype.jb;tw.prototype.setUrls=tw.prototype.eb;t("ol.source.Vector",U);
856
+U.prototype.addFeature=U.prototype.yb;U.prototype.addFeatures=U.prototype.cd;U.prototype.clear=U.prototype.clear;U.prototype.forEachFeature=U.prototype.sh;U.prototype.forEachFeatureInExtent=U.prototype.$b;U.prototype.forEachFeatureIntersectingExtent=U.prototype.th;U.prototype.getFeaturesCollection=U.prototype.Ah;U.prototype.getFeatures=U.prototype.Xe;U.prototype.getFeaturesAtCoordinate=U.prototype.zh;U.prototype.getFeaturesInExtent=U.prototype.Uf;U.prototype.getClosestFeatureToCoordinate=U.prototype.vh;
857
+U.prototype.getExtent=U.prototype.G;U.prototype.getFeatureById=U.prototype.yh;U.prototype.getFormat=U.prototype.Mi;U.prototype.getUrl=U.prototype.Ni;U.prototype.removeFeature=U.prototype.Gb;gu.prototype.feature=gu.prototype.feature;t("ol.source.VectorTile",qx);t("ol.source.WMTS",Z);Z.prototype.getDimensions=Z.prototype.Mk;Z.prototype.getFormat=Z.prototype.Io;Z.prototype.getLayer=Z.prototype.Jo;Z.prototype.getMatrixSet=Z.prototype.$k;Z.prototype.getRequestEncoding=Z.prototype.kl;
858
+Z.prototype.getStyle=Z.prototype.Ko;Z.prototype.getVersion=Z.prototype.rl;Z.prototype.updateDimensions=Z.prototype.uq;
859
+t("ol.source.WMTS.optionsFromCapabilities",function(a,b){var c=na(a.Contents.Layer,function(a){return a.Identifier==b.layer});if(null===c)return null;var d=a.Contents.TileMatrixSet;var e=1<c.TileMatrixSetLink.length?"projection"in b?sa(c.TileMatrixSetLink,function(a){var c=na(d,function(b){return b.Identifier==a.TileMatrixSet}).SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"),e=Tb(c),f=Tb(b.projection);return e&&f?dc(e,f):c==b.projection}):sa(c.TileMatrixSetLink,function(a){return a.TileMatrixSet==
860
+b.matrixSet}):0;0>e&&(e=0);var f=c.TileMatrixSetLink[e].TileMatrixSet;var g=c.TileMatrixSetLink[e].TileMatrixSetLimits;var h=c.Format[0];"format"in b&&(h=b.format);e=sa(c.Style,function(a){return"style"in b?a.Title==b.style:a.isDefault});0>e&&(e=0);e=c.Style[e].Identifier;var l={};"Dimension"in c&&c.Dimension.forEach(function(a){var b=a.Identifier,c=a.Default;void 0===c&&(c=a.Value[0]);l[b]=c});var m=na(a.Contents.TileMatrixSet,function(a){return a.Identifier==f});var n="projection"in b?Tb(b.projection):
861
+Tb(m.SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"));var p=c.WGS84BoundingBox;if(void 0!==p){var q=Tb("EPSG:4326").G();q=p[0]==q[0]&&p[2]==q[2];var r=hc(p,"EPSG:4326",n);(p=n.G())&&(Va(p,r)||(r=void 0))}g=sx(m,r,g);var u=[],m=b.requestEncoding,m=void 0!==m?m:"";if("OperationsMetadata"in a&&"GetTile"in a.OperationsMetadata)for(a=a.OperationsMetadata.GetTile.DCP.HTTP.Get,r=0,p=a.length;r<p;++r){var x=na(a[r].Constraint,function(a){return"GetEncoding"==a.name}).AllowedValues.Value;
862
+""===m&&(m=x[0]);if("KVP"===m)ja(x,"KVP")&&u.push(a[r].href);else break}u.length||(m="REST",c.ResourceURL.forEach(function(a){"tile"===a.resourceType&&(h=a.format,u.push(a.template))}));return{urls:u,layer:b.layer,matrixSet:f,format:h,projection:n,requestEncoding:m,tileGrid:g,style:e,dimensions:l,wrapX:q,crossOrigin:b.crossOrigin}});t("ol.source.XYZ",zw);t("ol.source.Zoomify",ux);Rh.prototype.vectorContext=Rh.prototype.vectorContext;Rh.prototype.frameState=Rh.prototype.frameState;
863
+Rh.prototype.context=Rh.prototype.context;Rh.prototype.glContext=Rh.prototype.glContext;kq.prototype.get=kq.prototype.get;kq.prototype.getExtent=kq.prototype.G;kq.prototype.getId=kq.prototype.Wn;kq.prototype.getGeometry=kq.prototype.V;kq.prototype.getProperties=kq.prototype.Xn;kq.prototype.getType=kq.prototype.U;t("ol.render.VectorContext",Wh);kk.prototype.setStyle=kk.prototype.rd;kk.prototype.drawGeometry=kk.prototype.zb;kk.prototype.drawFeature=kk.prototype.te;Xh.prototype.drawCircle=Xh.prototype.Zb;
864
+Xh.prototype.setStyle=Xh.prototype.rd;Xh.prototype.drawGeometry=Xh.prototype.zb;Xh.prototype.drawFeature=Xh.prototype.te;t("ol.proj.common.add",ic);t("ol.proj.Projection",Bb);Bb.prototype.getCode=Bb.prototype.Jk;Bb.prototype.getExtent=Bb.prototype.G;Bb.prototype.getUnits=Bb.prototype.Un;Bb.prototype.getMetersPerUnit=Bb.prototype.sc;Bb.prototype.getWorldExtent=Bb.prototype.tl;Bb.prototype.isGlobal=Bb.prototype.dm;Bb.prototype.setGlobal=Bb.prototype.$p;Bb.prototype.setExtent=Bb.prototype.Vn;
865
+Bb.prototype.setWorldExtent=Bb.prototype.kq;Bb.prototype.setGetPointResolution=Bb.prototype.Zp;t("ol.proj.Units.METERS_PER_UNIT",zb);t("ol.layer.Base",sh);sh.prototype.getExtent=sh.prototype.G;sh.prototype.getMaxResolution=sh.prototype.fc;sh.prototype.getMinResolution=sh.prototype.gc;sh.prototype.getOpacity=sh.prototype.hc;sh.prototype.getVisible=sh.prototype.Mb;sh.prototype.getZIndex=sh.prototype.Ba;sh.prototype.setExtent=sh.prototype.vc;sh.prototype.setMaxResolution=sh.prototype.Ac;
866
+sh.prototype.setMinResolution=sh.prototype.Bc;sh.prototype.setOpacity=sh.prototype.wc;sh.prototype.setVisible=sh.prototype.xc;sh.prototype.setZIndex=sh.prototype.Vb;t("ol.layer.Group",uh);uh.prototype.getLayers=uh.prototype.qd;uh.prototype.setLayers=uh.prototype.xi;t("ol.layer.Heatmap",V);V.prototype.getBlur=V.prototype.uh;V.prototype.getGradient=V.prototype.Bh;V.prototype.getRadius=V.prototype.yi;V.prototype.setBlur=V.prototype.jj;V.prototype.setGradient=V.prototype.pj;V.prototype.setRadius=V.prototype.Uc;
867
+t("ol.layer.Image",Uv);Uv.prototype.getSource=Uv.prototype.ha;t("ol.layer.Layer",wh);wh.prototype.getSource=wh.prototype.ha;wh.prototype.setMap=wh.prototype.setMap;wh.prototype.setSource=wh.prototype.Wc;t("ol.layer.Tile",cw);cw.prototype.getPreload=cw.prototype.Ud;cw.prototype.getSource=cw.prototype.ha;cw.prototype.setPreload=cw.prototype.zi;cw.prototype.getUseInterimTilesOnError=cw.prototype.kd;cw.prototype.setUseInterimTilesOnError=cw.prototype.Ai;t("ol.layer.Vector",T);T.prototype.getSource=T.prototype.ha;
868
+T.prototype.getStyle=T.prototype.D;T.prototype.getStyleFunction=T.prototype.C;T.prototype.setStyle=T.prototype.g;t("ol.layer.VectorTile",W);W.prototype.getPreload=W.prototype.Ud;W.prototype.getUseInterimTilesOnError=W.prototype.kd;W.prototype.setPreload=W.prototype.Bi;W.prototype.setUseInterimTilesOnError=W.prototype.Ci;t("ol.interaction.DoubleClickZoom",rg);t("ol.interaction.DoubleClickZoom.handleEvent",sg);t("ol.interaction.DragAndDrop",Rs);t("ol.interaction.DragAndDrop.handleEvent",mf);
869
+Us.prototype.features=Us.prototype.features;Us.prototype.file=Us.prototype.file;Us.prototype.projection=Us.prototype.projection;t("ol.interaction.DragBox",Rg);Rg.prototype.getGeometry=Rg.prototype.V;Wg.prototype.coordinate=Wg.prototype.coordinate;Wg.prototype.mapBrowserEvent=Wg.prototype.mapBrowserEvent;t("ol.interaction.DragPan",Gg);t("ol.interaction.DragRotate",Kg);t("ol.interaction.DragRotateAndZoom",Ys);t("ol.interaction.DragZoom",$g);t("ol.interaction.Draw",ju);
870
+t("ol.interaction.Draw.handleEvent",lu);ju.prototype.removeLastPoint=ju.prototype.Op;ju.prototype.finishDrawing=ju.prototype.Pd;ju.prototype.extend=ju.prototype.vn;t("ol.interaction.Draw.createRegularPolygon",function(a,b){return function(c,d){var e=c[0];c=c[1];var f=Math.sqrt(hf(e,c));d=d?d:Zf(new ys(e),a);$f(d,e,f,b?b:Math.atan((c[1]-e[1])/(c[0]-e[0])));return d}});
871
+t("ol.interaction.Draw.createBox",function(){return function(a,b){a=Na(a);b=b||new D(null);b.ma([[eb(a),gb(a),hb(a),ib(a),eb(a)]]);return b}});zu.prototype.feature=zu.prototype.feature;t("ol.interaction.Extent",Au);Au.prototype.getExtent=Au.prototype.G;Au.prototype.setExtent=Au.prototype.g;Lu.prototype.extent_=Lu.prototype.b;t("ol.interaction.Interaction",ng);ng.prototype.getActive=ng.prototype.c;ng.prototype.getMap=ng.prototype.f;ng.prototype.setActive=ng.prototype.Ha;
872
+t("ol.interaction.KeyboardPan",ah);t("ol.interaction.KeyboardPan.handleEvent",bh);t("ol.interaction.KeyboardZoom",ch);t("ol.interaction.KeyboardZoom.handleEvent",dh);t("ol.interaction.Modify",Nu);t("ol.interaction.Modify.handleEvent",Qu);Nu.prototype.removePoint=Nu.prototype.hj;Vu.prototype.features=Vu.prototype.features;Vu.prototype.mapBrowserEvent=Vu.prototype.mapBrowserEvent;t("ol.interaction.MouseWheelZoom",eh);t("ol.interaction.MouseWheelZoom.handleEvent",fh);eh.prototype.setMouseAnchor=eh.prototype.T;
873
+t("ol.interaction.PinchRotate",ih);t("ol.interaction.PinchZoom",mh);t("ol.interaction.Pointer",Dg);t("ol.interaction.Pointer.handleEvent",Eg);t("ol.interaction.Select",cv);cv.prototype.getFeatures=cv.prototype.Gn;cv.prototype.getHitTolerance=cv.prototype.Hn;cv.prototype.getLayer=cv.prototype.In;t("ol.interaction.Select.handleEvent",dv);cv.prototype.setHitTolerance=cv.prototype.Kn;cv.prototype.setMap=cv.prototype.setMap;fv.prototype.selected=fv.prototype.selected;fv.prototype.deselected=fv.prototype.deselected;
874
+fv.prototype.mapBrowserEvent=fv.prototype.mapBrowserEvent;t("ol.interaction.Snap",hv);hv.prototype.addFeature=hv.prototype.yb;hv.prototype.removeFeature=hv.prototype.Gb;t("ol.interaction.Translate",mv);mv.prototype.getHitTolerance=mv.prototype.B;mv.prototype.setHitTolerance=mv.prototype.I;sv.prototype.features=sv.prototype.features;sv.prototype.coordinate=sv.prototype.coordinate;t("ol.geom.Circle",ys);ys.prototype.clone=ys.prototype.clone;ys.prototype.getCenter=ys.prototype.wa;
875
+ys.prototype.getRadius=ys.prototype.pd;ys.prototype.getType=ys.prototype.U;ys.prototype.intersectsExtent=ys.prototype.Xa;ys.prototype.setCenter=ys.prototype.ob;ys.prototype.setCenterAndRadius=ys.prototype.Ng;ys.prototype.setRadius=ys.prototype.Uc;ys.prototype.transform=ys.prototype.tb;t("ol.geom.Geometry",of);of.prototype.getClosestPoint=of.prototype.Ab;of.prototype.intersectsCoordinate=of.prototype.sb;of.prototype.getExtent=of.prototype.G;of.prototype.rotate=of.prototype.rotate;
876
+of.prototype.scale=of.prototype.scale;of.prototype.simplify=of.prototype.Rb;of.prototype.transform=of.prototype.tb;t("ol.geom.GeometryCollection",tm);tm.prototype.clone=tm.prototype.clone;tm.prototype.getGeometries=tm.prototype.Vf;tm.prototype.getType=tm.prototype.U;tm.prototype.intersectsExtent=tm.prototype.Xa;tm.prototype.setGeometries=tm.prototype.oj;tm.prototype.applyTransform=tm.prototype.Dc;tm.prototype.translate=tm.prototype.translate;t("ol.geom.LinearRing",Jf);Jf.prototype.clone=Jf.prototype.clone;
877
+Jf.prototype.getArea=Jf.prototype.qn;Jf.prototype.getCoordinates=Jf.prototype.X;Jf.prototype.getType=Jf.prototype.U;Jf.prototype.setCoordinates=Jf.prototype.ma;t("ol.geom.LineString",O);O.prototype.appendCoordinate=O.prototype.mk;O.prototype.clone=O.prototype.clone;O.prototype.forEachSegment=O.prototype.Ck;O.prototype.getCoordinateAtM=O.prototype.nn;O.prototype.getCoordinates=O.prototype.X;O.prototype.getCoordinateAt=O.prototype.wh;O.prototype.getLength=O.prototype.pn;O.prototype.getType=O.prototype.U;
878
+O.prototype.intersectsExtent=O.prototype.Xa;O.prototype.setCoordinates=O.prototype.ma;t("ol.geom.MultiLineString",P);P.prototype.appendLineString=P.prototype.nk;P.prototype.clone=P.prototype.clone;P.prototype.getCoordinateAtM=P.prototype.rn;P.prototype.getCoordinates=P.prototype.X;P.prototype.getLineString=P.prototype.Yk;P.prototype.getLineStrings=P.prototype.gd;P.prototype.getType=P.prototype.U;P.prototype.intersectsExtent=P.prototype.Xa;P.prototype.setCoordinates=P.prototype.ma;
879
+t("ol.geom.MultiPoint",Q);Q.prototype.appendPoint=Q.prototype.qk;Q.prototype.clone=Q.prototype.clone;Q.prototype.getCoordinates=Q.prototype.X;Q.prototype.getPoint=Q.prototype.il;Q.prototype.getPoints=Q.prototype.Zd;Q.prototype.getType=Q.prototype.U;Q.prototype.intersectsExtent=Q.prototype.Xa;Q.prototype.setCoordinates=Q.prototype.ma;t("ol.geom.MultiPolygon",R);R.prototype.appendPolygon=R.prototype.rk;R.prototype.clone=R.prototype.clone;R.prototype.getArea=R.prototype.sn;
880
+R.prototype.getCoordinates=R.prototype.X;R.prototype.getInteriorPoints=R.prototype.Uk;R.prototype.getPolygon=R.prototype.jl;R.prototype.getPolygons=R.prototype.Td;R.prototype.getType=R.prototype.U;R.prototype.intersectsExtent=R.prototype.Xa;R.prototype.setCoordinates=R.prototype.ma;t("ol.geom.Point",C);C.prototype.clone=C.prototype.clone;C.prototype.getCoordinates=C.prototype.X;C.prototype.getType=C.prototype.U;C.prototype.intersectsExtent=C.prototype.Xa;C.prototype.setCoordinates=C.prototype.ma;
881
+t("ol.geom.Polygon",D);D.prototype.appendLinearRing=D.prototype.pk;D.prototype.clone=D.prototype.clone;D.prototype.getArea=D.prototype.tn;D.prototype.getCoordinates=D.prototype.X;D.prototype.getInteriorPoint=D.prototype.Tk;D.prototype.getLinearRingCount=D.prototype.Zk;D.prototype.getLinearRing=D.prototype.Ch;D.prototype.getLinearRings=D.prototype.Sd;D.prototype.getType=D.prototype.U;D.prototype.intersectsExtent=D.prototype.Xa;D.prototype.setCoordinates=D.prototype.ma;
882
+t("ol.geom.Polygon.circular",Xf);t("ol.geom.Polygon.fromExtent",Yf);t("ol.geom.Polygon.fromCircle",Zf);t("ol.geom.SimpleGeometry",rf);rf.prototype.getFirstCoordinate=rf.prototype.ac;rf.prototype.getLastCoordinate=rf.prototype.bc;rf.prototype.getLayout=rf.prototype.cc;rf.prototype.applyTransform=rf.prototype.Dc;rf.prototype.translate=rf.prototype.translate;t("ol.format.EsriJSON",Ql);Ql.prototype.readFeature=Ql.prototype.Tb;Ql.prototype.readFeatures=Ql.prototype.Oa;Ql.prototype.readGeometry=Ql.prototype.Sc;
883
+Ql.prototype.readProjection=Ql.prototype.kb;Ql.prototype.writeGeometry=Ql.prototype.$c;Ql.prototype.writeGeometryObject=Ql.prototype.je;Ql.prototype.writeFeature=Ql.prototype.Bd;Ql.prototype.writeFeatureObject=Ql.prototype.Zc;Ql.prototype.writeFeatures=Ql.prototype.Wb;Ql.prototype.writeFeaturesObject=Ql.prototype.he;t("ol.format.Feature",El);t("ol.format.filter.and",rm);
884
+t("ol.format.filter.or",function(a){var b=[null].concat(Array.prototype.slice.call(arguments));return new (Function.prototype.bind.apply(pm,b))});t("ol.format.filter.not",function(a){return new nm(a)});t("ol.format.filter.bbox",sm);t("ol.format.filter.intersects",function(a,b,c){return new hm(a,b,c)});t("ol.format.filter.within",function(a,b,c){return new qm(a,b,c)});t("ol.format.filter.equalTo",function(a,b,c){return new dm(a,b,c)});
885
+t("ol.format.filter.notEqualTo",function(a,b,c){return new om(a,b,c)});t("ol.format.filter.lessThan",function(a,b){return new lm(a,b)});t("ol.format.filter.lessThanOrEqualTo",function(a,b){return new mm(a,b)});t("ol.format.filter.greaterThan",function(a,b){return new em(a,b)});t("ol.format.filter.greaterThanOrEqualTo",function(a,b){return new fm(a,b)});t("ol.format.filter.isNull",function(a){return new km(a)});t("ol.format.filter.between",function(a,b,c){return new im(a,b,c)});
886
+t("ol.format.filter.like",function(a,b,c,d,e,f){return new jm(a,b,c,d,e,f)});t("ol.format.filter.during",function(a,b,c){return new bm(a,b,c)});t("ol.format.GeoJSON",xm);xm.prototype.readFeature=xm.prototype.Tb;xm.prototype.readFeatures=xm.prototype.Oa;xm.prototype.readGeometry=xm.prototype.Sc;xm.prototype.readProjection=xm.prototype.kb;xm.prototype.writeFeature=xm.prototype.Bd;xm.prototype.writeFeatureObject=xm.prototype.Zc;xm.prototype.writeFeatures=xm.prototype.Wb;
887
+xm.prototype.writeFeaturesObject=xm.prototype.he;xm.prototype.writeGeometry=xm.prototype.$c;xm.prototype.writeGeometryObject=xm.prototype.je;t("ol.format.GML",Sm);Sm.prototype.writeFeatures=Sm.prototype.Wb;Sm.prototype.writeFeaturesNode=Sm.prototype.Xb;t("ol.format.GML2",an);t("ol.format.GML3",Sm);Sm.prototype.writeGeometryNode=Sm.prototype.ie;Sm.prototype.writeFeatures=Sm.prototype.Wb;Sm.prototype.writeFeaturesNode=Sm.prototype.Xb;Fm.prototype.readFeatures=Fm.prototype.Oa;t("ol.format.GPX",mn);
888
+mn.prototype.readFeature=mn.prototype.Tb;mn.prototype.readFeatures=mn.prototype.Oa;mn.prototype.readProjection=mn.prototype.kb;mn.prototype.writeFeatures=mn.prototype.Wb;mn.prototype.writeFeaturesNode=mn.prototype.Xb;t("ol.format.IGC",Xn);Xn.prototype.readFeature=Xn.prototype.Tb;Xn.prototype.readFeatures=Xn.prototype.Oa;Xn.prototype.readProjection=Xn.prototype.kb;t("ol.format.KML",go);go.prototype.readFeature=go.prototype.Tb;go.prototype.readFeatures=go.prototype.Oa;go.prototype.readName=go.prototype.Cp;
889
+go.prototype.readNetworkLinks=go.prototype.Dp;go.prototype.readRegion=go.prototype.Gp;go.prototype.readRegionFromNode=go.prototype.lf;go.prototype.readProjection=go.prototype.kb;go.prototype.writeFeatures=go.prototype.Wb;go.prototype.writeFeaturesNode=go.prototype.Xb;t("ol.format.MVT",lq);lq.prototype.readFeatures=lq.prototype.Oa;lq.prototype.readProjection=lq.prototype.kb;lq.prototype.setLayers=lq.prototype.mn;t("ol.format.OSMXML",nq);nq.prototype.readFeatures=nq.prototype.Oa;
890
+nq.prototype.readProjection=nq.prototype.kb;t("ol.format.Polyline",Nq);t("ol.format.Polyline.encodeDeltas",Oq);t("ol.format.Polyline.decodeDeltas",Qq);t("ol.format.Polyline.encodeFloats",Pq);t("ol.format.Polyline.decodeFloats",Rq);Nq.prototype.readFeature=Nq.prototype.Tb;Nq.prototype.readFeatures=Nq.prototype.Oa;Nq.prototype.readGeometry=Nq.prototype.Sc;Nq.prototype.readProjection=Nq.prototype.kb;Nq.prototype.writeGeometry=Nq.prototype.$c;t("ol.format.TopoJSON",Sq);Sq.prototype.readFeatures=Sq.prototype.Oa;
891
+Sq.prototype.readProjection=Sq.prototype.kb;t("ol.format.WFS",Yq);Yq.prototype.readFeatures=Yq.prototype.Oa;Yq.prototype.readTransactionResponse=Yq.prototype.j;Yq.prototype.readFeatureCollectionMetadata=Yq.prototype.g;t("ol.format.WFS.writeFilter",function(a){var b=jl("http://www.opengis.net/ogc","Filter");Bl({node:b},mr,wl(a.kc),[a],[]);return b});Yq.prototype.writeGetFeature=Yq.prototype.l;Yq.prototype.writeTransaction=Yq.prototype.v;Yq.prototype.readProjection=Yq.prototype.kb;
892
+t("ol.format.WKT",sr);sr.prototype.readFeature=sr.prototype.Tb;sr.prototype.readFeatures=sr.prototype.Oa;sr.prototype.readGeometry=sr.prototype.Sc;sr.prototype.writeFeature=sr.prototype.Bd;sr.prototype.writeFeatures=sr.prototype.Wb;sr.prototype.writeGeometry=sr.prototype.$c;t("ol.format.WMSCapabilities",Lr);Lr.prototype.read=Lr.prototype.read;t("ol.format.WMSGetFeatureInfo",hs);hs.prototype.readFeatures=hs.prototype.Oa;t("ol.format.WMTSCapabilities",is);is.prototype.read=is.prototype.read;
893
+t("ol.format.filter.And",Zl);t("ol.format.filter.Bbox",$l);t("ol.format.filter.Comparison",am);t("ol.format.filter.ComparisonBinary",cm);t("ol.format.filter.During",bm);t("ol.format.filter.EqualTo",dm);t("ol.format.filter.Filter",Xl);t("ol.format.filter.GreaterThan",em);t("ol.format.filter.GreaterThanOrEqualTo",fm);t("ol.format.filter.Intersects",hm);t("ol.format.filter.IsBetween",im);t("ol.format.filter.IsLike",jm);t("ol.format.filter.IsNull",km);t("ol.format.filter.LessThan",lm);
894
+t("ol.format.filter.LessThanOrEqualTo",mm);t("ol.format.filter.Not",nm);t("ol.format.filter.NotEqualTo",om);t("ol.format.filter.Or",pm);t("ol.format.filter.Spatial",gm);t("ol.format.filter.Within",qm);t("ol.events.condition.altKeyOnly",function(a){a=a.originalEvent;return a.altKey&&!(a.metaKey||a.ctrlKey)&&!a.shiftKey});t("ol.events.condition.altShiftKeysOnly",tg);t("ol.events.condition.always",mf);t("ol.events.condition.click",function(a){return"click"==a.type});t("ol.events.condition.never",nf);
895
+t("ol.events.condition.pointerMove",vg);t("ol.events.condition.singleClick",wg);t("ol.events.condition.doubleClick",function(a){return"dblclick"==a.type});t("ol.events.condition.noModifierKeys",xg);t("ol.events.condition.platformModifierKeyOnly",function(a){a=a.originalEvent;return!a.altKey&&(Rd?a.metaKey:a.ctrlKey)&&!a.shiftKey});t("ol.events.condition.shiftKeyOnly",yg);t("ol.events.condition.targetNotEditable",Ag);t("ol.events.condition.mouseOnly",Bg);t("ol.events.condition.primaryAction",Cg);
896
+Oc.prototype.type=Oc.prototype.type;Oc.prototype.target=Oc.prototype.target;Oc.prototype.preventDefault=Oc.prototype.preventDefault;Oc.prototype.stopPropagation=Oc.prototype.stopPropagation;t("ol.control.Attribution",nd);t("ol.control.Attribution.render",od);nd.prototype.getCollapsible=nd.prototype.Um;nd.prototype.setCollapsible=nd.prototype.Xm;nd.prototype.setCollapsed=nd.prototype.Wm;nd.prototype.getCollapsed=nd.prototype.Tm;t("ol.control.Control",md);md.prototype.getMap=md.prototype.g;
897
+md.prototype.setMap=md.prototype.setMap;md.prototype.setTarget=md.prototype.f;t("ol.control.FullScreen",yd);t("ol.control.MousePosition",Dd);t("ol.control.MousePosition.render",Ed);Dd.prototype.getCoordinateFormat=Dd.prototype.xh;Dd.prototype.getProjection=Dd.prototype.Zh;Dd.prototype.setCoordinateFormat=Dd.prototype.kj;Dd.prototype.setProjection=Dd.prototype.$h;t("ol.control.OverviewMap",Bk);t("ol.control.OverviewMap.render",Ck);Bk.prototype.getCollapsible=Bk.prototype.$m;
898
+Bk.prototype.setCollapsible=Bk.prototype.cn;Bk.prototype.setCollapsed=Bk.prototype.bn;Bk.prototype.getCollapsed=Bk.prototype.Zm;Bk.prototype.getOverviewMap=Bk.prototype.gl;t("ol.control.Rotate",ud);t("ol.control.Rotate.render",vd);t("ol.control.ScaleLine",Gk);Gk.prototype.getUnits=Gk.prototype.C;t("ol.control.ScaleLine.render",Hk);Gk.prototype.setUnits=Gk.prototype.I;t("ol.control.Zoom",wd);t("ol.control.ZoomSlider",Lk);t("ol.control.ZoomSlider.render",Nk);t("ol.control.ZoomToExtent",Qk);
899
+Tc.prototype.changed=Tc.prototype.s;Tc.prototype.dispatchEvent=Tc.prototype.b;Tc.prototype.getRevision=Tc.prototype.L;Tc.prototype.on=Tc.prototype.J;Tc.prototype.once=Tc.prototype.once;Tc.prototype.un=Tc.prototype.K;Yc.prototype.get=Yc.prototype.get;Yc.prototype.getKeys=Yc.prototype.O;Yc.prototype.getProperties=Yc.prototype.N;Yc.prototype.set=Yc.prototype.set;Yc.prototype.setProperties=Yc.prototype.H;Yc.prototype.unset=Yc.prototype.P;Yc.prototype.changed=Yc.prototype.s;
900
+Yc.prototype.dispatchEvent=Yc.prototype.b;Yc.prototype.getRevision=Yc.prototype.L;Yc.prototype.on=Yc.prototype.J;Yc.prototype.once=Yc.prototype.once;Yc.prototype.un=Yc.prototype.K;bd.prototype.type=bd.prototype.type;bd.prototype.target=bd.prototype.target;bd.prototype.preventDefault=bd.prototype.preventDefault;bd.prototype.stopPropagation=bd.prototype.stopPropagation;Rk.prototype.get=Rk.prototype.get;Rk.prototype.getKeys=Rk.prototype.O;Rk.prototype.getProperties=Rk.prototype.N;Rk.prototype.set=Rk.prototype.set;
901
+Rk.prototype.setProperties=Rk.prototype.H;Rk.prototype.unset=Rk.prototype.P;Rk.prototype.changed=Rk.prototype.s;Rk.prototype.dispatchEvent=Rk.prototype.b;Rk.prototype.getRevision=Rk.prototype.L;Rk.prototype.on=Rk.prototype.J;Rk.prototype.once=Rk.prototype.once;Rk.prototype.un=Rk.prototype.K;H.prototype.get=H.prototype.get;H.prototype.getKeys=H.prototype.O;H.prototype.getProperties=H.prototype.N;H.prototype.set=H.prototype.set;H.prototype.setProperties=H.prototype.H;H.prototype.unset=H.prototype.P;
902
+H.prototype.changed=H.prototype.s;H.prototype.dispatchEvent=H.prototype.b;H.prototype.getRevision=H.prototype.L;H.prototype.on=H.prototype.J;H.prototype.once=H.prototype.once;H.prototype.un=H.prototype.K;xs.prototype.get=xs.prototype.get;xs.prototype.getKeys=xs.prototype.O;xs.prototype.getProperties=xs.prototype.N;xs.prototype.set=xs.prototype.set;xs.prototype.setProperties=xs.prototype.H;xs.prototype.unset=xs.prototype.P;xs.prototype.changed=xs.prototype.s;xs.prototype.dispatchEvent=xs.prototype.b;
903
+xs.prototype.getRevision=xs.prototype.L;xs.prototype.on=xs.prototype.J;xs.prototype.once=xs.prototype.once;xs.prototype.un=xs.prototype.K;Os.prototype.getTileCoord=Os.prototype.f;Os.prototype.load=Os.prototype.load;G.prototype.get=G.prototype.get;G.prototype.getKeys=G.prototype.O;G.prototype.getProperties=G.prototype.N;G.prototype.set=G.prototype.set;G.prototype.setProperties=G.prototype.H;G.prototype.unset=G.prototype.P;G.prototype.changed=G.prototype.s;G.prototype.dispatchEvent=G.prototype.b;
904
+G.prototype.getRevision=G.prototype.L;G.prototype.on=G.prototype.J;G.prototype.once=G.prototype.once;G.prototype.un=G.prototype.K;Id.prototype.type=Id.prototype.type;Id.prototype.target=Id.prototype.target;Id.prototype.preventDefault=Id.prototype.preventDefault;Id.prototype.stopPropagation=Id.prototype.stopPropagation;Jd.prototype.map=Jd.prototype.map;Jd.prototype.frameState=Jd.prototype.frameState;Jd.prototype.type=Jd.prototype.type;Jd.prototype.target=Jd.prototype.target;
905
+Jd.prototype.preventDefault=Jd.prototype.preventDefault;Jd.prototype.stopPropagation=Jd.prototype.stopPropagation;ee.prototype.originalEvent=ee.prototype.originalEvent;ee.prototype.pixel=ee.prototype.pixel;ee.prototype.coordinate=ee.prototype.coordinate;ee.prototype.dragging=ee.prototype.dragging;ee.prototype.preventDefault=ee.prototype.preventDefault;ee.prototype.stopPropagation=ee.prototype.stopPropagation;ee.prototype.map=ee.prototype.map;ee.prototype.frameState=ee.prototype.frameState;
906
+ee.prototype.type=ee.prototype.type;ee.prototype.target=ee.prototype.target;Xc.prototype.type=Xc.prototype.type;Xc.prototype.target=Xc.prototype.target;Xc.prototype.preventDefault=Xc.prototype.preventDefault;Xc.prototype.stopPropagation=Xc.prototype.stopPropagation;sk.prototype.get=sk.prototype.get;sk.prototype.getKeys=sk.prototype.O;sk.prototype.getProperties=sk.prototype.N;sk.prototype.set=sk.prototype.set;sk.prototype.setProperties=sk.prototype.H;sk.prototype.unset=sk.prototype.P;
907
+sk.prototype.changed=sk.prototype.s;sk.prototype.dispatchEvent=sk.prototype.b;sk.prototype.getRevision=sk.prototype.L;sk.prototype.on=sk.prototype.J;sk.prototype.once=sk.prototype.once;sk.prototype.un=sk.prototype.K;nx.prototype.getTileCoord=nx.prototype.f;nx.prototype.load=nx.prototype.load;px.prototype.getTileCoord=px.prototype.f;px.prototype.load=px.prototype.load;F.prototype.get=F.prototype.get;F.prototype.getKeys=F.prototype.O;F.prototype.getProperties=F.prototype.N;F.prototype.set=F.prototype.set;
908
+F.prototype.setProperties=F.prototype.H;F.prototype.unset=F.prototype.P;F.prototype.changed=F.prototype.s;F.prototype.dispatchEvent=F.prototype.b;F.prototype.getRevision=F.prototype.L;F.prototype.on=F.prototype.J;F.prototype.once=F.prototype.once;F.prototype.un=F.prototype.K;rx.prototype.forEachTileCoord=rx.prototype.Rf;rx.prototype.getMaxZoom=rx.prototype.Ti;rx.prototype.getMinZoom=rx.prototype.Ui;rx.prototype.getOrigin=rx.prototype.Pc;rx.prototype.getResolution=rx.prototype.Da;
909
+rx.prototype.getResolutions=rx.prototype.Vi;rx.prototype.getTileCoordExtent=rx.prototype.Aa;rx.prototype.getTileCoordForCoordAndResolution=rx.prototype.Be;rx.prototype.getTileCoordForCoordAndZ=rx.prototype.bg;rx.prototype.getTileSize=rx.prototype.gb;rx.prototype.getZForResolution=rx.prototype.tc;Yk.prototype.getOpacity=Yk.prototype.Ze;Yk.prototype.getRotateWithView=Yk.prototype.$e;Yk.prototype.getRotation=Yk.prototype.af;Yk.prototype.getScale=Yk.prototype.bf;Yk.prototype.getSnapToPixel=Yk.prototype.Ae;
910
+Yk.prototype.setOpacity=Yk.prototype.td;Yk.prototype.setRotation=Yk.prototype.cf;Yk.prototype.setScale=Yk.prototype.ud;$k.prototype.clone=$k.prototype.clone;$k.prototype.getAngle=$k.prototype.Pi;$k.prototype.getFill=$k.prototype.Fa;$k.prototype.getPoints=$k.prototype.Qi;$k.prototype.getRadius=$k.prototype.Ri;$k.prototype.getRadius2=$k.prototype.Fh;$k.prototype.getStroke=$k.prototype.Ga;$k.prototype.getOpacity=$k.prototype.Ze;$k.prototype.getRotateWithView=$k.prototype.$e;
911
+$k.prototype.getRotation=$k.prototype.af;$k.prototype.getScale=$k.prototype.bf;$k.prototype.getSnapToPixel=$k.prototype.Ae;$k.prototype.setOpacity=$k.prototype.td;$k.prototype.setRotation=$k.prototype.cf;$k.prototype.setScale=$k.prototype.ud;eo.prototype.getOpacity=eo.prototype.Ze;eo.prototype.getRotateWithView=eo.prototype.$e;eo.prototype.getRotation=eo.prototype.af;eo.prototype.getScale=eo.prototype.bf;eo.prototype.getSnapToPixel=eo.prototype.Ae;eo.prototype.setOpacity=eo.prototype.td;
912
+eo.prototype.setRotation=eo.prototype.cf;eo.prototype.setScale=eo.prototype.ud;$t.prototype.get=$t.prototype.get;$t.prototype.getKeys=$t.prototype.O;$t.prototype.getProperties=$t.prototype.N;$t.prototype.set=$t.prototype.set;$t.prototype.setProperties=$t.prototype.H;$t.prototype.unset=$t.prototype.P;$t.prototype.changed=$t.prototype.s;$t.prototype.dispatchEvent=$t.prototype.b;$t.prototype.getRevision=$t.prototype.L;$t.prototype.on=$t.prototype.J;$t.prototype.once=$t.prototype.once;
913
+$t.prototype.un=$t.prototype.K;pw.prototype.getAttributions=pw.prototype.ya;pw.prototype.getLogo=pw.prototype.xa;pw.prototype.getProjection=pw.prototype.za;pw.prototype.getState=pw.prototype.getState;pw.prototype.refresh=pw.prototype.sa;pw.prototype.setAttributions=pw.prototype.ua;pw.prototype.get=pw.prototype.get;pw.prototype.getKeys=pw.prototype.O;pw.prototype.getProperties=pw.prototype.N;pw.prototype.set=pw.prototype.set;pw.prototype.setProperties=pw.prototype.H;pw.prototype.unset=pw.prototype.P;
914
+pw.prototype.changed=pw.prototype.s;pw.prototype.dispatchEvent=pw.prototype.b;pw.prototype.getRevision=pw.prototype.L;pw.prototype.on=pw.prototype.J;pw.prototype.once=pw.prototype.once;pw.prototype.un=pw.prototype.K;tw.prototype.getTileGrid=tw.prototype.ab;tw.prototype.refresh=tw.prototype.sa;tw.prototype.getAttributions=tw.prototype.ya;tw.prototype.getLogo=tw.prototype.xa;tw.prototype.getProjection=tw.prototype.za;tw.prototype.getState=tw.prototype.getState;tw.prototype.setAttributions=tw.prototype.ua;
915
+tw.prototype.get=tw.prototype.get;tw.prototype.getKeys=tw.prototype.O;tw.prototype.getProperties=tw.prototype.N;tw.prototype.set=tw.prototype.set;tw.prototype.setProperties=tw.prototype.H;tw.prototype.unset=tw.prototype.P;tw.prototype.changed=tw.prototype.s;tw.prototype.dispatchEvent=tw.prototype.b;tw.prototype.getRevision=tw.prototype.L;tw.prototype.on=tw.prototype.J;tw.prototype.once=tw.prototype.once;tw.prototype.un=tw.prototype.K;X.prototype.getTileLoadFunction=X.prototype.pb;
916
+X.prototype.getTileUrlFunction=X.prototype.qb;X.prototype.getUrls=X.prototype.rb;X.prototype.setTileLoadFunction=X.prototype.vb;X.prototype.setTileUrlFunction=X.prototype.cb;X.prototype.setUrl=X.prototype.jb;X.prototype.setUrls=X.prototype.eb;X.prototype.getTileGrid=X.prototype.ab;X.prototype.refresh=X.prototype.sa;X.prototype.getAttributions=X.prototype.ya;X.prototype.getLogo=X.prototype.xa;X.prototype.getProjection=X.prototype.za;X.prototype.getState=X.prototype.getState;
917
+X.prototype.setAttributions=X.prototype.ua;X.prototype.get=X.prototype.get;X.prototype.getKeys=X.prototype.O;X.prototype.getProperties=X.prototype.N;X.prototype.set=X.prototype.set;X.prototype.setProperties=X.prototype.H;X.prototype.unset=X.prototype.P;X.prototype.changed=X.prototype.s;X.prototype.dispatchEvent=X.prototype.b;X.prototype.getRevision=X.prototype.L;X.prototype.on=X.prototype.J;X.prototype.once=X.prototype.once;X.prototype.un=X.prototype.K;xw.prototype.setRenderReprojectionEdges=xw.prototype.Pb;
918
+xw.prototype.setTileGridForProjection=xw.prototype.Qb;xw.prototype.getTileLoadFunction=xw.prototype.pb;xw.prototype.getTileUrlFunction=xw.prototype.qb;xw.prototype.getUrls=xw.prototype.rb;xw.prototype.setTileLoadFunction=xw.prototype.vb;xw.prototype.setTileUrlFunction=xw.prototype.cb;xw.prototype.setUrl=xw.prototype.jb;xw.prototype.setUrls=xw.prototype.eb;xw.prototype.getTileGrid=xw.prototype.ab;xw.prototype.refresh=xw.prototype.sa;xw.prototype.getAttributions=xw.prototype.ya;
919
+xw.prototype.getLogo=xw.prototype.xa;xw.prototype.getProjection=xw.prototype.za;xw.prototype.getState=xw.prototype.getState;xw.prototype.setAttributions=xw.prototype.ua;xw.prototype.get=xw.prototype.get;xw.prototype.getKeys=xw.prototype.O;xw.prototype.getProperties=xw.prototype.N;xw.prototype.set=xw.prototype.set;xw.prototype.setProperties=xw.prototype.H;xw.prototype.unset=xw.prototype.P;xw.prototype.changed=xw.prototype.s;xw.prototype.dispatchEvent=xw.prototype.b;xw.prototype.getRevision=xw.prototype.L;
920
+xw.prototype.on=xw.prototype.J;xw.prototype.once=xw.prototype.once;xw.prototype.un=xw.prototype.K;zw.prototype.setRenderReprojectionEdges=zw.prototype.Pb;zw.prototype.setTileGridForProjection=zw.prototype.Qb;zw.prototype.getTileLoadFunction=zw.prototype.pb;zw.prototype.getTileUrlFunction=zw.prototype.qb;zw.prototype.getUrls=zw.prototype.rb;zw.prototype.setTileLoadFunction=zw.prototype.vb;zw.prototype.setTileUrlFunction=zw.prototype.cb;zw.prototype.setUrl=zw.prototype.jb;zw.prototype.setUrls=zw.prototype.eb;
921
+zw.prototype.getTileGrid=zw.prototype.ab;zw.prototype.refresh=zw.prototype.sa;zw.prototype.getAttributions=zw.prototype.ya;zw.prototype.getLogo=zw.prototype.xa;zw.prototype.getProjection=zw.prototype.za;zw.prototype.getState=zw.prototype.getState;zw.prototype.setAttributions=zw.prototype.ua;zw.prototype.get=zw.prototype.get;zw.prototype.getKeys=zw.prototype.O;zw.prototype.getProperties=zw.prototype.N;zw.prototype.set=zw.prototype.set;zw.prototype.setProperties=zw.prototype.H;zw.prototype.unset=zw.prototype.P;
922
+zw.prototype.changed=zw.prototype.s;zw.prototype.dispatchEvent=zw.prototype.b;zw.prototype.getRevision=zw.prototype.L;zw.prototype.on=zw.prototype.J;zw.prototype.once=zw.prototype.once;zw.prototype.un=zw.prototype.K;Aw.prototype.setRenderReprojectionEdges=Aw.prototype.Pb;Aw.prototype.setTileGridForProjection=Aw.prototype.Qb;Aw.prototype.getTileLoadFunction=Aw.prototype.pb;Aw.prototype.getTileUrlFunction=Aw.prototype.qb;Aw.prototype.getUrls=Aw.prototype.rb;Aw.prototype.setTileLoadFunction=Aw.prototype.vb;
923
+Aw.prototype.setTileUrlFunction=Aw.prototype.cb;Aw.prototype.setUrl=Aw.prototype.jb;Aw.prototype.setUrls=Aw.prototype.eb;Aw.prototype.getTileGrid=Aw.prototype.ab;Aw.prototype.refresh=Aw.prototype.sa;Aw.prototype.getAttributions=Aw.prototype.ya;Aw.prototype.getLogo=Aw.prototype.xa;Aw.prototype.getProjection=Aw.prototype.za;Aw.prototype.getState=Aw.prototype.getState;Aw.prototype.setAttributions=Aw.prototype.ua;Aw.prototype.get=Aw.prototype.get;Aw.prototype.getKeys=Aw.prototype.O;
924
+Aw.prototype.getProperties=Aw.prototype.N;Aw.prototype.set=Aw.prototype.set;Aw.prototype.setProperties=Aw.prototype.H;Aw.prototype.unset=Aw.prototype.P;Aw.prototype.changed=Aw.prototype.s;Aw.prototype.dispatchEvent=Aw.prototype.b;Aw.prototype.getRevision=Aw.prototype.L;Aw.prototype.on=Aw.prototype.J;Aw.prototype.once=Aw.prototype.once;Aw.prototype.un=Aw.prototype.K;U.prototype.getAttributions=U.prototype.ya;U.prototype.getLogo=U.prototype.xa;U.prototype.getProjection=U.prototype.za;
925
+U.prototype.getState=U.prototype.getState;U.prototype.refresh=U.prototype.sa;U.prototype.setAttributions=U.prototype.ua;U.prototype.get=U.prototype.get;U.prototype.getKeys=U.prototype.O;U.prototype.getProperties=U.prototype.N;U.prototype.set=U.prototype.set;U.prototype.setProperties=U.prototype.H;U.prototype.unset=U.prototype.P;U.prototype.changed=U.prototype.s;U.prototype.dispatchEvent=U.prototype.b;U.prototype.getRevision=U.prototype.L;U.prototype.on=U.prototype.J;U.prototype.once=U.prototype.once;
926
+U.prototype.un=U.prototype.K;Y.prototype.addFeature=Y.prototype.yb;Y.prototype.addFeatures=Y.prototype.cd;Y.prototype.clear=Y.prototype.clear;Y.prototype.forEachFeature=Y.prototype.sh;Y.prototype.forEachFeatureInExtent=Y.prototype.$b;Y.prototype.forEachFeatureIntersectingExtent=Y.prototype.th;Y.prototype.getFeaturesCollection=Y.prototype.Ah;Y.prototype.getFeatures=Y.prototype.Xe;Y.prototype.getFeaturesAtCoordinate=Y.prototype.zh;Y.prototype.getFeaturesInExtent=Y.prototype.Uf;
927
+Y.prototype.getClosestFeatureToCoordinate=Y.prototype.vh;Y.prototype.getExtent=Y.prototype.G;Y.prototype.getFeatureById=Y.prototype.yh;Y.prototype.getFormat=Y.prototype.Mi;Y.prototype.getUrl=Y.prototype.Ni;Y.prototype.removeFeature=Y.prototype.Gb;Y.prototype.getAttributions=Y.prototype.ya;Y.prototype.getLogo=Y.prototype.xa;Y.prototype.getProjection=Y.prototype.za;Y.prototype.getState=Y.prototype.getState;Y.prototype.refresh=Y.prototype.sa;Y.prototype.setAttributions=Y.prototype.ua;
928
+Y.prototype.get=Y.prototype.get;Y.prototype.getKeys=Y.prototype.O;Y.prototype.getProperties=Y.prototype.N;Y.prototype.set=Y.prototype.set;Y.prototype.setProperties=Y.prototype.H;Y.prototype.unset=Y.prototype.P;Y.prototype.changed=Y.prototype.s;Y.prototype.dispatchEvent=Y.prototype.b;Y.prototype.getRevision=Y.prototype.L;Y.prototype.on=Y.prototype.J;Y.prototype.once=Y.prototype.once;Y.prototype.un=Y.prototype.K;Hv.prototype.getAttributions=Hv.prototype.ya;Hv.prototype.getLogo=Hv.prototype.xa;
929
+Hv.prototype.getProjection=Hv.prototype.za;Hv.prototype.getState=Hv.prototype.getState;Hv.prototype.refresh=Hv.prototype.sa;Hv.prototype.setAttributions=Hv.prototype.ua;Hv.prototype.get=Hv.prototype.get;Hv.prototype.getKeys=Hv.prototype.O;Hv.prototype.getProperties=Hv.prototype.N;Hv.prototype.set=Hv.prototype.set;Hv.prototype.setProperties=Hv.prototype.H;Hv.prototype.unset=Hv.prototype.P;Hv.prototype.changed=Hv.prototype.s;Hv.prototype.dispatchEvent=Hv.prototype.b;Hv.prototype.getRevision=Hv.prototype.L;
930
+Hv.prototype.on=Hv.prototype.J;Hv.prototype.once=Hv.prototype.once;Hv.prototype.un=Hv.prototype.K;Jv.prototype.type=Jv.prototype.type;Jv.prototype.target=Jv.prototype.target;Jv.prototype.preventDefault=Jv.prototype.preventDefault;Jv.prototype.stopPropagation=Jv.prototype.stopPropagation;Gw.prototype.getAttributions=Gw.prototype.ya;Gw.prototype.getLogo=Gw.prototype.xa;Gw.prototype.getProjection=Gw.prototype.za;Gw.prototype.getState=Gw.prototype.getState;Gw.prototype.refresh=Gw.prototype.sa;
931
+Gw.prototype.setAttributions=Gw.prototype.ua;Gw.prototype.get=Gw.prototype.get;Gw.prototype.getKeys=Gw.prototype.O;Gw.prototype.getProperties=Gw.prototype.N;Gw.prototype.set=Gw.prototype.set;Gw.prototype.setProperties=Gw.prototype.H;Gw.prototype.unset=Gw.prototype.P;Gw.prototype.changed=Gw.prototype.s;Gw.prototype.dispatchEvent=Gw.prototype.b;Gw.prototype.getRevision=Gw.prototype.L;Gw.prototype.on=Gw.prototype.J;Gw.prototype.once=Gw.prototype.once;Gw.prototype.un=Gw.prototype.K;
932
+Ov.prototype.getAttributions=Ov.prototype.ya;Ov.prototype.getLogo=Ov.prototype.xa;Ov.prototype.getProjection=Ov.prototype.za;Ov.prototype.getState=Ov.prototype.getState;Ov.prototype.refresh=Ov.prototype.sa;Ov.prototype.setAttributions=Ov.prototype.ua;Ov.prototype.get=Ov.prototype.get;Ov.prototype.getKeys=Ov.prototype.O;Ov.prototype.getProperties=Ov.prototype.N;Ov.prototype.set=Ov.prototype.set;Ov.prototype.setProperties=Ov.prototype.H;Ov.prototype.unset=Ov.prototype.P;Ov.prototype.changed=Ov.prototype.s;
933
+Ov.prototype.dispatchEvent=Ov.prototype.b;Ov.prototype.getRevision=Ov.prototype.L;Ov.prototype.on=Ov.prototype.J;Ov.prototype.once=Ov.prototype.once;Ov.prototype.un=Ov.prototype.K;Hw.prototype.getAttributions=Hw.prototype.ya;Hw.prototype.getLogo=Hw.prototype.xa;Hw.prototype.getProjection=Hw.prototype.za;Hw.prototype.getState=Hw.prototype.getState;Hw.prototype.refresh=Hw.prototype.sa;Hw.prototype.setAttributions=Hw.prototype.ua;Hw.prototype.get=Hw.prototype.get;Hw.prototype.getKeys=Hw.prototype.O;
934
+Hw.prototype.getProperties=Hw.prototype.N;Hw.prototype.set=Hw.prototype.set;Hw.prototype.setProperties=Hw.prototype.H;Hw.prototype.unset=Hw.prototype.P;Hw.prototype.changed=Hw.prototype.s;Hw.prototype.dispatchEvent=Hw.prototype.b;Hw.prototype.getRevision=Hw.prototype.L;Hw.prototype.on=Hw.prototype.J;Hw.prototype.once=Hw.prototype.once;Hw.prototype.un=Hw.prototype.K;Iw.prototype.getAttributions=Iw.prototype.ya;Iw.prototype.getLogo=Iw.prototype.xa;Iw.prototype.getProjection=Iw.prototype.za;
935
+Iw.prototype.getState=Iw.prototype.getState;Iw.prototype.refresh=Iw.prototype.sa;Iw.prototype.setAttributions=Iw.prototype.ua;Iw.prototype.get=Iw.prototype.get;Iw.prototype.getKeys=Iw.prototype.O;Iw.prototype.getProperties=Iw.prototype.N;Iw.prototype.set=Iw.prototype.set;Iw.prototype.setProperties=Iw.prototype.H;Iw.prototype.unset=Iw.prototype.P;Iw.prototype.changed=Iw.prototype.s;Iw.prototype.dispatchEvent=Iw.prototype.b;Iw.prototype.getRevision=Iw.prototype.L;Iw.prototype.on=Iw.prototype.J;
936
+Iw.prototype.once=Iw.prototype.once;Iw.prototype.un=Iw.prototype.K;Pv.prototype.getAttributions=Pv.prototype.ya;Pv.prototype.getLogo=Pv.prototype.xa;Pv.prototype.getProjection=Pv.prototype.za;Pv.prototype.getState=Pv.prototype.getState;Pv.prototype.refresh=Pv.prototype.sa;Pv.prototype.setAttributions=Pv.prototype.ua;Pv.prototype.get=Pv.prototype.get;Pv.prototype.getKeys=Pv.prototype.O;Pv.prototype.getProperties=Pv.prototype.N;Pv.prototype.set=Pv.prototype.set;Pv.prototype.setProperties=Pv.prototype.H;
937
+Pv.prototype.unset=Pv.prototype.P;Pv.prototype.changed=Pv.prototype.s;Pv.prototype.dispatchEvent=Pv.prototype.b;Pv.prototype.getRevision=Pv.prototype.L;Pv.prototype.on=Pv.prototype.J;Pv.prototype.once=Pv.prototype.once;Pv.prototype.un=Pv.prototype.K;Jw.prototype.getAttributions=Jw.prototype.ya;Jw.prototype.getLogo=Jw.prototype.xa;Jw.prototype.getProjection=Jw.prototype.za;Jw.prototype.getState=Jw.prototype.getState;Jw.prototype.refresh=Jw.prototype.sa;Jw.prototype.setAttributions=Jw.prototype.ua;
938
+Jw.prototype.get=Jw.prototype.get;Jw.prototype.getKeys=Jw.prototype.O;Jw.prototype.getProperties=Jw.prototype.N;Jw.prototype.set=Jw.prototype.set;Jw.prototype.setProperties=Jw.prototype.H;Jw.prototype.unset=Jw.prototype.P;Jw.prototype.changed=Jw.prototype.s;Jw.prototype.dispatchEvent=Jw.prototype.b;Jw.prototype.getRevision=Jw.prototype.L;Jw.prototype.on=Jw.prototype.J;Jw.prototype.once=Jw.prototype.once;Jw.prototype.un=Jw.prototype.K;Nw.prototype.setRenderReprojectionEdges=Nw.prototype.Pb;
939
+Nw.prototype.setTileGridForProjection=Nw.prototype.Qb;Nw.prototype.getTileLoadFunction=Nw.prototype.pb;Nw.prototype.getTileUrlFunction=Nw.prototype.qb;Nw.prototype.getUrls=Nw.prototype.rb;Nw.prototype.setTileLoadFunction=Nw.prototype.vb;Nw.prototype.setTileUrlFunction=Nw.prototype.cb;Nw.prototype.setUrl=Nw.prototype.jb;Nw.prototype.setUrls=Nw.prototype.eb;Nw.prototype.getTileGrid=Nw.prototype.ab;Nw.prototype.refresh=Nw.prototype.sa;Nw.prototype.getAttributions=Nw.prototype.ya;
940
+Nw.prototype.getLogo=Nw.prototype.xa;Nw.prototype.getProjection=Nw.prototype.za;Nw.prototype.getState=Nw.prototype.getState;Nw.prototype.setAttributions=Nw.prototype.ua;Nw.prototype.get=Nw.prototype.get;Nw.prototype.getKeys=Nw.prototype.O;Nw.prototype.getProperties=Nw.prototype.N;Nw.prototype.set=Nw.prototype.set;Nw.prototype.setProperties=Nw.prototype.H;Nw.prototype.unset=Nw.prototype.P;Nw.prototype.changed=Nw.prototype.s;Nw.prototype.dispatchEvent=Nw.prototype.b;Nw.prototype.getRevision=Nw.prototype.L;
941
+Nw.prototype.on=Nw.prototype.J;Nw.prototype.once=Nw.prototype.once;Nw.prototype.un=Nw.prototype.K;Pw.prototype.getAttributions=Pw.prototype.ya;Pw.prototype.getLogo=Pw.prototype.xa;Pw.prototype.getProjection=Pw.prototype.za;Pw.prototype.getState=Pw.prototype.getState;Pw.prototype.refresh=Pw.prototype.sa;Pw.prototype.setAttributions=Pw.prototype.ua;Pw.prototype.get=Pw.prototype.get;Pw.prototype.getKeys=Pw.prototype.O;Pw.prototype.getProperties=Pw.prototype.N;Pw.prototype.set=Pw.prototype.set;
942
+Pw.prototype.setProperties=Pw.prototype.H;Pw.prototype.unset=Pw.prototype.P;Pw.prototype.changed=Pw.prototype.s;Pw.prototype.dispatchEvent=Pw.prototype.b;Pw.prototype.getRevision=Pw.prototype.L;Pw.prototype.on=Pw.prototype.J;Pw.prototype.once=Pw.prototype.once;Pw.prototype.un=Pw.prototype.K;Tw.prototype.type=Tw.prototype.type;Tw.prototype.target=Tw.prototype.target;Tw.prototype.preventDefault=Tw.prototype.preventDefault;Tw.prototype.stopPropagation=Tw.prototype.stopPropagation;
943
+Ww.prototype.setRenderReprojectionEdges=Ww.prototype.Pb;Ww.prototype.setTileGridForProjection=Ww.prototype.Qb;Ww.prototype.getTileLoadFunction=Ww.prototype.pb;Ww.prototype.getTileUrlFunction=Ww.prototype.qb;Ww.prototype.getUrls=Ww.prototype.rb;Ww.prototype.setTileLoadFunction=Ww.prototype.vb;Ww.prototype.setTileUrlFunction=Ww.prototype.cb;Ww.prototype.setUrl=Ww.prototype.jb;Ww.prototype.setUrls=Ww.prototype.eb;Ww.prototype.getTileGrid=Ww.prototype.ab;Ww.prototype.refresh=Ww.prototype.sa;
944
+Ww.prototype.getAttributions=Ww.prototype.ya;Ww.prototype.getLogo=Ww.prototype.xa;Ww.prototype.getProjection=Ww.prototype.za;Ww.prototype.getState=Ww.prototype.getState;Ww.prototype.setAttributions=Ww.prototype.ua;Ww.prototype.get=Ww.prototype.get;Ww.prototype.getKeys=Ww.prototype.O;Ww.prototype.getProperties=Ww.prototype.N;Ww.prototype.set=Ww.prototype.set;Ww.prototype.setProperties=Ww.prototype.H;Ww.prototype.unset=Ww.prototype.P;Ww.prototype.changed=Ww.prototype.s;Ww.prototype.dispatchEvent=Ww.prototype.b;
945
+Ww.prototype.getRevision=Ww.prototype.L;Ww.prototype.on=Ww.prototype.J;Ww.prototype.once=Ww.prototype.once;Ww.prototype.un=Ww.prototype.K;sw.prototype.type=sw.prototype.type;sw.prototype.target=sw.prototype.target;sw.prototype.preventDefault=sw.prototype.preventDefault;sw.prototype.stopPropagation=sw.prototype.stopPropagation;$w.prototype.setRenderReprojectionEdges=$w.prototype.Pb;$w.prototype.setTileGridForProjection=$w.prototype.Qb;$w.prototype.getTileLoadFunction=$w.prototype.pb;
946
+$w.prototype.getTileUrlFunction=$w.prototype.qb;$w.prototype.getUrls=$w.prototype.rb;$w.prototype.setTileLoadFunction=$w.prototype.vb;$w.prototype.setTileUrlFunction=$w.prototype.cb;$w.prototype.setUrl=$w.prototype.jb;$w.prototype.setUrls=$w.prototype.eb;$w.prototype.getTileGrid=$w.prototype.ab;$w.prototype.refresh=$w.prototype.sa;$w.prototype.getAttributions=$w.prototype.ya;$w.prototype.getLogo=$w.prototype.xa;$w.prototype.getProjection=$w.prototype.za;$w.prototype.getState=$w.prototype.getState;
947
+$w.prototype.setAttributions=$w.prototype.ua;$w.prototype.get=$w.prototype.get;$w.prototype.getKeys=$w.prototype.O;$w.prototype.getProperties=$w.prototype.N;$w.prototype.set=$w.prototype.set;$w.prototype.setProperties=$w.prototype.H;$w.prototype.unset=$w.prototype.P;$w.prototype.changed=$w.prototype.s;$w.prototype.dispatchEvent=$w.prototype.b;$w.prototype.getRevision=$w.prototype.L;$w.prototype.on=$w.prototype.J;$w.prototype.once=$w.prototype.once;$w.prototype.un=$w.prototype.K;
948
+bx.prototype.getTileGrid=bx.prototype.ab;bx.prototype.refresh=bx.prototype.sa;bx.prototype.getAttributions=bx.prototype.ya;bx.prototype.getLogo=bx.prototype.xa;bx.prototype.getProjection=bx.prototype.za;bx.prototype.getState=bx.prototype.getState;bx.prototype.setAttributions=bx.prototype.ua;bx.prototype.get=bx.prototype.get;bx.prototype.getKeys=bx.prototype.O;bx.prototype.getProperties=bx.prototype.N;bx.prototype.set=bx.prototype.set;bx.prototype.setProperties=bx.prototype.H;bx.prototype.unset=bx.prototype.P;
949
+bx.prototype.changed=bx.prototype.s;bx.prototype.dispatchEvent=bx.prototype.b;bx.prototype.getRevision=bx.prototype.L;bx.prototype.on=bx.prototype.J;bx.prototype.once=bx.prototype.once;bx.prototype.un=bx.prototype.K;dx.prototype.setRenderReprojectionEdges=dx.prototype.Pb;dx.prototype.setTileGridForProjection=dx.prototype.Qb;dx.prototype.getTileLoadFunction=dx.prototype.pb;dx.prototype.getTileUrlFunction=dx.prototype.qb;dx.prototype.getUrls=dx.prototype.rb;dx.prototype.setTileLoadFunction=dx.prototype.vb;
950
+dx.prototype.setTileUrlFunction=dx.prototype.cb;dx.prototype.setUrl=dx.prototype.jb;dx.prototype.setUrls=dx.prototype.eb;dx.prototype.getTileGrid=dx.prototype.ab;dx.prototype.refresh=dx.prototype.sa;dx.prototype.getAttributions=dx.prototype.ya;dx.prototype.getLogo=dx.prototype.xa;dx.prototype.getProjection=dx.prototype.za;dx.prototype.getState=dx.prototype.getState;dx.prototype.setAttributions=dx.prototype.ua;dx.prototype.get=dx.prototype.get;dx.prototype.getKeys=dx.prototype.O;
951
+dx.prototype.getProperties=dx.prototype.N;dx.prototype.set=dx.prototype.set;dx.prototype.setProperties=dx.prototype.H;dx.prototype.unset=dx.prototype.P;dx.prototype.changed=dx.prototype.s;dx.prototype.dispatchEvent=dx.prototype.b;dx.prototype.getRevision=dx.prototype.L;dx.prototype.on=dx.prototype.J;dx.prototype.once=dx.prototype.once;dx.prototype.un=dx.prototype.K;ex.prototype.getTileGrid=ex.prototype.ab;ex.prototype.refresh=ex.prototype.sa;ex.prototype.getAttributions=ex.prototype.ya;
952
+ex.prototype.getLogo=ex.prototype.xa;ex.prototype.getProjection=ex.prototype.za;ex.prototype.getState=ex.prototype.getState;ex.prototype.setAttributions=ex.prototype.ua;ex.prototype.get=ex.prototype.get;ex.prototype.getKeys=ex.prototype.O;ex.prototype.getProperties=ex.prototype.N;ex.prototype.set=ex.prototype.set;ex.prototype.setProperties=ex.prototype.H;ex.prototype.unset=ex.prototype.P;ex.prototype.changed=ex.prototype.s;ex.prototype.dispatchEvent=ex.prototype.b;ex.prototype.getRevision=ex.prototype.L;
953
+ex.prototype.on=ex.prototype.J;ex.prototype.once=ex.prototype.once;ex.prototype.un=ex.prototype.K;ix.prototype.setRenderReprojectionEdges=ix.prototype.Pb;ix.prototype.setTileGridForProjection=ix.prototype.Qb;ix.prototype.getTileLoadFunction=ix.prototype.pb;ix.prototype.getTileUrlFunction=ix.prototype.qb;ix.prototype.getUrls=ix.prototype.rb;ix.prototype.setTileLoadFunction=ix.prototype.vb;ix.prototype.setTileUrlFunction=ix.prototype.cb;ix.prototype.setUrl=ix.prototype.jb;ix.prototype.setUrls=ix.prototype.eb;
954
+ix.prototype.getTileGrid=ix.prototype.ab;ix.prototype.refresh=ix.prototype.sa;ix.prototype.getAttributions=ix.prototype.ya;ix.prototype.getLogo=ix.prototype.xa;ix.prototype.getProjection=ix.prototype.za;ix.prototype.getState=ix.prototype.getState;ix.prototype.setAttributions=ix.prototype.ua;ix.prototype.get=ix.prototype.get;ix.prototype.getKeys=ix.prototype.O;ix.prototype.getProperties=ix.prototype.N;ix.prototype.set=ix.prototype.set;ix.prototype.setProperties=ix.prototype.H;ix.prototype.unset=ix.prototype.P;
955
+ix.prototype.changed=ix.prototype.s;ix.prototype.dispatchEvent=ix.prototype.b;ix.prototype.getRevision=ix.prototype.L;ix.prototype.on=ix.prototype.J;ix.prototype.once=ix.prototype.once;ix.prototype.un=ix.prototype.K;gu.prototype.type=gu.prototype.type;gu.prototype.target=gu.prototype.target;gu.prototype.preventDefault=gu.prototype.preventDefault;gu.prototype.stopPropagation=gu.prototype.stopPropagation;qx.prototype.getTileLoadFunction=qx.prototype.pb;qx.prototype.getTileUrlFunction=qx.prototype.qb;
956
+qx.prototype.getUrls=qx.prototype.rb;qx.prototype.setTileLoadFunction=qx.prototype.vb;qx.prototype.setTileUrlFunction=qx.prototype.cb;qx.prototype.setUrl=qx.prototype.jb;qx.prototype.setUrls=qx.prototype.eb;qx.prototype.getTileGrid=qx.prototype.ab;qx.prototype.refresh=qx.prototype.sa;qx.prototype.getAttributions=qx.prototype.ya;qx.prototype.getLogo=qx.prototype.xa;qx.prototype.getProjection=qx.prototype.za;qx.prototype.getState=qx.prototype.getState;qx.prototype.setAttributions=qx.prototype.ua;
957
+qx.prototype.get=qx.prototype.get;qx.prototype.getKeys=qx.prototype.O;qx.prototype.getProperties=qx.prototype.N;qx.prototype.set=qx.prototype.set;qx.prototype.setProperties=qx.prototype.H;qx.prototype.unset=qx.prototype.P;qx.prototype.changed=qx.prototype.s;qx.prototype.dispatchEvent=qx.prototype.b;qx.prototype.getRevision=qx.prototype.L;qx.prototype.on=qx.prototype.J;qx.prototype.once=qx.prototype.once;qx.prototype.un=qx.prototype.K;Z.prototype.setRenderReprojectionEdges=Z.prototype.Pb;
958
+Z.prototype.setTileGridForProjection=Z.prototype.Qb;Z.prototype.getTileLoadFunction=Z.prototype.pb;Z.prototype.getTileUrlFunction=Z.prototype.qb;Z.prototype.getUrls=Z.prototype.rb;Z.prototype.setTileLoadFunction=Z.prototype.vb;Z.prototype.setTileUrlFunction=Z.prototype.cb;Z.prototype.setUrl=Z.prototype.jb;Z.prototype.setUrls=Z.prototype.eb;Z.prototype.getTileGrid=Z.prototype.ab;Z.prototype.refresh=Z.prototype.sa;Z.prototype.getAttributions=Z.prototype.ya;Z.prototype.getLogo=Z.prototype.xa;
959
+Z.prototype.getProjection=Z.prototype.za;Z.prototype.getState=Z.prototype.getState;Z.prototype.setAttributions=Z.prototype.ua;Z.prototype.get=Z.prototype.get;Z.prototype.getKeys=Z.prototype.O;Z.prototype.getProperties=Z.prototype.N;Z.prototype.set=Z.prototype.set;Z.prototype.setProperties=Z.prototype.H;Z.prototype.unset=Z.prototype.P;Z.prototype.changed=Z.prototype.s;Z.prototype.dispatchEvent=Z.prototype.b;Z.prototype.getRevision=Z.prototype.L;Z.prototype.on=Z.prototype.J;Z.prototype.once=Z.prototype.once;
960
+Z.prototype.un=Z.prototype.K;ux.prototype.setRenderReprojectionEdges=ux.prototype.Pb;ux.prototype.setTileGridForProjection=ux.prototype.Qb;ux.prototype.getTileLoadFunction=ux.prototype.pb;ux.prototype.getTileUrlFunction=ux.prototype.qb;ux.prototype.getUrls=ux.prototype.rb;ux.prototype.setTileLoadFunction=ux.prototype.vb;ux.prototype.setTileUrlFunction=ux.prototype.cb;ux.prototype.setUrl=ux.prototype.jb;ux.prototype.setUrls=ux.prototype.eb;ux.prototype.getTileGrid=ux.prototype.ab;
961
+ux.prototype.refresh=ux.prototype.sa;ux.prototype.getAttributions=ux.prototype.ya;ux.prototype.getLogo=ux.prototype.xa;ux.prototype.getProjection=ux.prototype.za;ux.prototype.getState=ux.prototype.getState;ux.prototype.setAttributions=ux.prototype.ua;ux.prototype.get=ux.prototype.get;ux.prototype.getKeys=ux.prototype.O;ux.prototype.getProperties=ux.prototype.N;ux.prototype.set=ux.prototype.set;ux.prototype.setProperties=ux.prototype.H;ux.prototype.unset=ux.prototype.P;ux.prototype.changed=ux.prototype.s;
962
+ux.prototype.dispatchEvent=ux.prototype.b;ux.prototype.getRevision=ux.prototype.L;ux.prototype.on=ux.prototype.J;ux.prototype.once=ux.prototype.once;ux.prototype.un=ux.prototype.K;hw.prototype.getTileCoord=hw.prototype.f;hw.prototype.load=hw.prototype.load;xt.prototype.changed=xt.prototype.s;xt.prototype.dispatchEvent=xt.prototype.b;xt.prototype.getRevision=xt.prototype.L;xt.prototype.on=xt.prototype.J;xt.prototype.once=xt.prototype.once;xt.prototype.un=xt.prototype.K;Vt.prototype.changed=Vt.prototype.s;
963
+Vt.prototype.dispatchEvent=Vt.prototype.b;Vt.prototype.getRevision=Vt.prototype.L;Vt.prototype.on=Vt.prototype.J;Vt.prototype.once=Vt.prototype.once;Vt.prototype.un=Vt.prototype.K;Rv.prototype.changed=Rv.prototype.s;Rv.prototype.dispatchEvent=Rv.prototype.b;Rv.prototype.getRevision=Rv.prototype.L;Rv.prototype.on=Rv.prototype.J;Rv.prototype.once=Rv.prototype.once;Rv.prototype.un=Rv.prototype.K;bw.prototype.changed=bw.prototype.s;bw.prototype.dispatchEvent=bw.prototype.b;bw.prototype.getRevision=bw.prototype.L;
964
+bw.prototype.on=bw.prototype.J;bw.prototype.once=bw.prototype.once;bw.prototype.un=bw.prototype.K;Yt.prototype.changed=Yt.prototype.s;Yt.prototype.dispatchEvent=Yt.prototype.b;Yt.prototype.getRevision=Yt.prototype.L;Yt.prototype.on=Yt.prototype.J;Yt.prototype.once=Yt.prototype.once;Yt.prototype.un=Yt.prototype.K;Gt.prototype.changed=Gt.prototype.s;Gt.prototype.dispatchEvent=Gt.prototype.b;Gt.prototype.getRevision=Gt.prototype.L;Gt.prototype.on=Gt.prototype.J;Gt.prototype.once=Gt.prototype.once;
965
+Gt.prototype.un=Gt.prototype.K;yv.prototype.changed=yv.prototype.s;yv.prototype.dispatchEvent=yv.prototype.b;yv.prototype.getRevision=yv.prototype.L;yv.prototype.on=yv.prototype.J;yv.prototype.once=yv.prototype.once;yv.prototype.un=yv.prototype.K;zv.prototype.changed=zv.prototype.s;zv.prototype.dispatchEvent=zv.prototype.b;zv.prototype.getRevision=zv.prototype.L;zv.prototype.on=zv.prototype.J;zv.prototype.once=zv.prototype.once;zv.prototype.un=zv.prototype.K;Vv.prototype.changed=Vv.prototype.s;
966
+Vv.prototype.dispatchEvent=Vv.prototype.b;Vv.prototype.getRevision=Vv.prototype.L;Vv.prototype.on=Vv.prototype.J;Vv.prototype.once=Vv.prototype.once;Vv.prototype.un=Vv.prototype.K;Ot.prototype.changed=Ot.prototype.s;Ot.prototype.dispatchEvent=Ot.prototype.b;Ot.prototype.getRevision=Ot.prototype.L;Ot.prototype.on=Ot.prototype.J;Ot.prototype.once=Ot.prototype.once;Ot.prototype.un=Ot.prototype.K;dw.prototype.changed=dw.prototype.s;dw.prototype.dispatchEvent=dw.prototype.b;dw.prototype.getRevision=dw.prototype.L;
967
+dw.prototype.on=dw.prototype.J;dw.prototype.once=dw.prototype.once;dw.prototype.un=dw.prototype.K;Rh.prototype.type=Rh.prototype.type;Rh.prototype.target=Rh.prototype.target;Rh.prototype.preventDefault=Rh.prototype.preventDefault;Rh.prototype.stopPropagation=Rh.prototype.stopPropagation;pe.prototype.type=pe.prototype.type;pe.prototype.target=pe.prototype.target;pe.prototype.preventDefault=pe.prototype.preventDefault;pe.prototype.stopPropagation=pe.prototype.stopPropagation;sh.prototype.get=sh.prototype.get;
968
+sh.prototype.getKeys=sh.prototype.O;sh.prototype.getProperties=sh.prototype.N;sh.prototype.set=sh.prototype.set;sh.prototype.setProperties=sh.prototype.H;sh.prototype.unset=sh.prototype.P;sh.prototype.changed=sh.prototype.s;sh.prototype.dispatchEvent=sh.prototype.b;sh.prototype.getRevision=sh.prototype.L;sh.prototype.on=sh.prototype.J;sh.prototype.once=sh.prototype.once;sh.prototype.un=sh.prototype.K;uh.prototype.getExtent=uh.prototype.G;uh.prototype.getMaxResolution=uh.prototype.fc;
969
+uh.prototype.getMinResolution=uh.prototype.gc;uh.prototype.getOpacity=uh.prototype.hc;uh.prototype.getVisible=uh.prototype.Mb;uh.prototype.getZIndex=uh.prototype.Ba;uh.prototype.setExtent=uh.prototype.vc;uh.prototype.setMaxResolution=uh.prototype.Ac;uh.prototype.setMinResolution=uh.prototype.Bc;uh.prototype.setOpacity=uh.prototype.wc;uh.prototype.setVisible=uh.prototype.xc;uh.prototype.setZIndex=uh.prototype.Vb;uh.prototype.get=uh.prototype.get;uh.prototype.getKeys=uh.prototype.O;
970
+uh.prototype.getProperties=uh.prototype.N;uh.prototype.set=uh.prototype.set;uh.prototype.setProperties=uh.prototype.H;uh.prototype.unset=uh.prototype.P;uh.prototype.changed=uh.prototype.s;uh.prototype.dispatchEvent=uh.prototype.b;uh.prototype.getRevision=uh.prototype.L;uh.prototype.on=uh.prototype.J;uh.prototype.once=uh.prototype.once;uh.prototype.un=uh.prototype.K;wh.prototype.getExtent=wh.prototype.G;wh.prototype.getMaxResolution=wh.prototype.fc;wh.prototype.getMinResolution=wh.prototype.gc;
971
+wh.prototype.getOpacity=wh.prototype.hc;wh.prototype.getVisible=wh.prototype.Mb;wh.prototype.getZIndex=wh.prototype.Ba;wh.prototype.setExtent=wh.prototype.vc;wh.prototype.setMaxResolution=wh.prototype.Ac;wh.prototype.setMinResolution=wh.prototype.Bc;wh.prototype.setOpacity=wh.prototype.wc;wh.prototype.setVisible=wh.prototype.xc;wh.prototype.setZIndex=wh.prototype.Vb;wh.prototype.get=wh.prototype.get;wh.prototype.getKeys=wh.prototype.O;wh.prototype.getProperties=wh.prototype.N;wh.prototype.set=wh.prototype.set;
972
+wh.prototype.setProperties=wh.prototype.H;wh.prototype.unset=wh.prototype.P;wh.prototype.changed=wh.prototype.s;wh.prototype.dispatchEvent=wh.prototype.b;wh.prototype.getRevision=wh.prototype.L;wh.prototype.on=wh.prototype.J;wh.prototype.once=wh.prototype.once;wh.prototype.un=wh.prototype.K;T.prototype.setMap=T.prototype.setMap;T.prototype.setSource=T.prototype.Wc;T.prototype.getExtent=T.prototype.G;T.prototype.getMaxResolution=T.prototype.fc;T.prototype.getMinResolution=T.prototype.gc;
973
+T.prototype.getOpacity=T.prototype.hc;T.prototype.getVisible=T.prototype.Mb;T.prototype.getZIndex=T.prototype.Ba;T.prototype.setExtent=T.prototype.vc;T.prototype.setMaxResolution=T.prototype.Ac;T.prototype.setMinResolution=T.prototype.Bc;T.prototype.setOpacity=T.prototype.wc;T.prototype.setVisible=T.prototype.xc;T.prototype.setZIndex=T.prototype.Vb;T.prototype.get=T.prototype.get;T.prototype.getKeys=T.prototype.O;T.prototype.getProperties=T.prototype.N;T.prototype.set=T.prototype.set;
974
+T.prototype.setProperties=T.prototype.H;T.prototype.unset=T.prototype.P;T.prototype.changed=T.prototype.s;T.prototype.dispatchEvent=T.prototype.b;T.prototype.getRevision=T.prototype.L;T.prototype.on=T.prototype.J;T.prototype.once=T.prototype.once;T.prototype.un=T.prototype.K;V.prototype.getSource=V.prototype.ha;V.prototype.getStyle=V.prototype.D;V.prototype.getStyleFunction=V.prototype.C;V.prototype.setStyle=V.prototype.g;V.prototype.setMap=V.prototype.setMap;V.prototype.setSource=V.prototype.Wc;
975
+V.prototype.getExtent=V.prototype.G;V.prototype.getMaxResolution=V.prototype.fc;V.prototype.getMinResolution=V.prototype.gc;V.prototype.getOpacity=V.prototype.hc;V.prototype.getVisible=V.prototype.Mb;V.prototype.getZIndex=V.prototype.Ba;V.prototype.setExtent=V.prototype.vc;V.prototype.setMaxResolution=V.prototype.Ac;V.prototype.setMinResolution=V.prototype.Bc;V.prototype.setOpacity=V.prototype.wc;V.prototype.setVisible=V.prototype.xc;V.prototype.setZIndex=V.prototype.Vb;V.prototype.get=V.prototype.get;
976
+V.prototype.getKeys=V.prototype.O;V.prototype.getProperties=V.prototype.N;V.prototype.set=V.prototype.set;V.prototype.setProperties=V.prototype.H;V.prototype.unset=V.prototype.P;V.prototype.changed=V.prototype.s;V.prototype.dispatchEvent=V.prototype.b;V.prototype.getRevision=V.prototype.L;V.prototype.on=V.prototype.J;V.prototype.once=V.prototype.once;V.prototype.un=V.prototype.K;Uv.prototype.setMap=Uv.prototype.setMap;Uv.prototype.setSource=Uv.prototype.Wc;Uv.prototype.getExtent=Uv.prototype.G;
977
+Uv.prototype.getMaxResolution=Uv.prototype.fc;Uv.prototype.getMinResolution=Uv.prototype.gc;Uv.prototype.getOpacity=Uv.prototype.hc;Uv.prototype.getVisible=Uv.prototype.Mb;Uv.prototype.getZIndex=Uv.prototype.Ba;Uv.prototype.setExtent=Uv.prototype.vc;Uv.prototype.setMaxResolution=Uv.prototype.Ac;Uv.prototype.setMinResolution=Uv.prototype.Bc;Uv.prototype.setOpacity=Uv.prototype.wc;Uv.prototype.setVisible=Uv.prototype.xc;Uv.prototype.setZIndex=Uv.prototype.Vb;Uv.prototype.get=Uv.prototype.get;
978
+Uv.prototype.getKeys=Uv.prototype.O;Uv.prototype.getProperties=Uv.prototype.N;Uv.prototype.set=Uv.prototype.set;Uv.prototype.setProperties=Uv.prototype.H;Uv.prototype.unset=Uv.prototype.P;Uv.prototype.changed=Uv.prototype.s;Uv.prototype.dispatchEvent=Uv.prototype.b;Uv.prototype.getRevision=Uv.prototype.L;Uv.prototype.on=Uv.prototype.J;Uv.prototype.once=Uv.prototype.once;Uv.prototype.un=Uv.prototype.K;cw.prototype.setMap=cw.prototype.setMap;cw.prototype.setSource=cw.prototype.Wc;
979
+cw.prototype.getExtent=cw.prototype.G;cw.prototype.getMaxResolution=cw.prototype.fc;cw.prototype.getMinResolution=cw.prototype.gc;cw.prototype.getOpacity=cw.prototype.hc;cw.prototype.getVisible=cw.prototype.Mb;cw.prototype.getZIndex=cw.prototype.Ba;cw.prototype.setExtent=cw.prototype.vc;cw.prototype.setMaxResolution=cw.prototype.Ac;cw.prototype.setMinResolution=cw.prototype.Bc;cw.prototype.setOpacity=cw.prototype.wc;cw.prototype.setVisible=cw.prototype.xc;cw.prototype.setZIndex=cw.prototype.Vb;
980
+cw.prototype.get=cw.prototype.get;cw.prototype.getKeys=cw.prototype.O;cw.prototype.getProperties=cw.prototype.N;cw.prototype.set=cw.prototype.set;cw.prototype.setProperties=cw.prototype.H;cw.prototype.unset=cw.prototype.P;cw.prototype.changed=cw.prototype.s;cw.prototype.dispatchEvent=cw.prototype.b;cw.prototype.getRevision=cw.prototype.L;cw.prototype.on=cw.prototype.J;cw.prototype.once=cw.prototype.once;cw.prototype.un=cw.prototype.K;W.prototype.getSource=W.prototype.ha;W.prototype.getStyle=W.prototype.D;
981
+W.prototype.getStyleFunction=W.prototype.C;W.prototype.setStyle=W.prototype.g;W.prototype.setMap=W.prototype.setMap;W.prototype.setSource=W.prototype.Wc;W.prototype.getExtent=W.prototype.G;W.prototype.getMaxResolution=W.prototype.fc;W.prototype.getMinResolution=W.prototype.gc;W.prototype.getOpacity=W.prototype.hc;W.prototype.getVisible=W.prototype.Mb;W.prototype.getZIndex=W.prototype.Ba;W.prototype.setExtent=W.prototype.vc;W.prototype.setMaxResolution=W.prototype.Ac;W.prototype.setMinResolution=W.prototype.Bc;
982
+W.prototype.setOpacity=W.prototype.wc;W.prototype.setVisible=W.prototype.xc;W.prototype.setZIndex=W.prototype.Vb;W.prototype.get=W.prototype.get;W.prototype.getKeys=W.prototype.O;W.prototype.getProperties=W.prototype.N;W.prototype.set=W.prototype.set;W.prototype.setProperties=W.prototype.H;W.prototype.unset=W.prototype.P;W.prototype.changed=W.prototype.s;W.prototype.dispatchEvent=W.prototype.b;W.prototype.getRevision=W.prototype.L;W.prototype.on=W.prototype.J;W.prototype.once=W.prototype.once;
983
+W.prototype.un=W.prototype.K;ng.prototype.get=ng.prototype.get;ng.prototype.getKeys=ng.prototype.O;ng.prototype.getProperties=ng.prototype.N;ng.prototype.set=ng.prototype.set;ng.prototype.setProperties=ng.prototype.H;ng.prototype.unset=ng.prototype.P;ng.prototype.changed=ng.prototype.s;ng.prototype.dispatchEvent=ng.prototype.b;ng.prototype.getRevision=ng.prototype.L;ng.prototype.on=ng.prototype.J;ng.prototype.once=ng.prototype.once;ng.prototype.un=ng.prototype.K;rg.prototype.getActive=rg.prototype.c;
984
+rg.prototype.getMap=rg.prototype.f;rg.prototype.setActive=rg.prototype.Ha;rg.prototype.get=rg.prototype.get;rg.prototype.getKeys=rg.prototype.O;rg.prototype.getProperties=rg.prototype.N;rg.prototype.set=rg.prototype.set;rg.prototype.setProperties=rg.prototype.H;rg.prototype.unset=rg.prototype.P;rg.prototype.changed=rg.prototype.s;rg.prototype.dispatchEvent=rg.prototype.b;rg.prototype.getRevision=rg.prototype.L;rg.prototype.on=rg.prototype.J;rg.prototype.once=rg.prototype.once;rg.prototype.un=rg.prototype.K;
985
+Rs.prototype.getActive=Rs.prototype.c;Rs.prototype.getMap=Rs.prototype.f;Rs.prototype.setActive=Rs.prototype.Ha;Rs.prototype.get=Rs.prototype.get;Rs.prototype.getKeys=Rs.prototype.O;Rs.prototype.getProperties=Rs.prototype.N;Rs.prototype.set=Rs.prototype.set;Rs.prototype.setProperties=Rs.prototype.H;Rs.prototype.unset=Rs.prototype.P;Rs.prototype.changed=Rs.prototype.s;Rs.prototype.dispatchEvent=Rs.prototype.b;Rs.prototype.getRevision=Rs.prototype.L;Rs.prototype.on=Rs.prototype.J;
986
+Rs.prototype.once=Rs.prototype.once;Rs.prototype.un=Rs.prototype.K;Us.prototype.type=Us.prototype.type;Us.prototype.target=Us.prototype.target;Us.prototype.preventDefault=Us.prototype.preventDefault;Us.prototype.stopPropagation=Us.prototype.stopPropagation;Dg.prototype.getActive=Dg.prototype.c;Dg.prototype.getMap=Dg.prototype.f;Dg.prototype.setActive=Dg.prototype.Ha;Dg.prototype.get=Dg.prototype.get;Dg.prototype.getKeys=Dg.prototype.O;Dg.prototype.getProperties=Dg.prototype.N;Dg.prototype.set=Dg.prototype.set;
987
+Dg.prototype.setProperties=Dg.prototype.H;Dg.prototype.unset=Dg.prototype.P;Dg.prototype.changed=Dg.prototype.s;Dg.prototype.dispatchEvent=Dg.prototype.b;Dg.prototype.getRevision=Dg.prototype.L;Dg.prototype.on=Dg.prototype.J;Dg.prototype.once=Dg.prototype.once;Dg.prototype.un=Dg.prototype.K;Rg.prototype.getActive=Rg.prototype.c;Rg.prototype.getMap=Rg.prototype.f;Rg.prototype.setActive=Rg.prototype.Ha;Rg.prototype.get=Rg.prototype.get;Rg.prototype.getKeys=Rg.prototype.O;
988
+Rg.prototype.getProperties=Rg.prototype.N;Rg.prototype.set=Rg.prototype.set;Rg.prototype.setProperties=Rg.prototype.H;Rg.prototype.unset=Rg.prototype.P;Rg.prototype.changed=Rg.prototype.s;Rg.prototype.dispatchEvent=Rg.prototype.b;Rg.prototype.getRevision=Rg.prototype.L;Rg.prototype.on=Rg.prototype.J;Rg.prototype.once=Rg.prototype.once;Rg.prototype.un=Rg.prototype.K;Wg.prototype.type=Wg.prototype.type;Wg.prototype.target=Wg.prototype.target;Wg.prototype.preventDefault=Wg.prototype.preventDefault;
989
+Wg.prototype.stopPropagation=Wg.prototype.stopPropagation;Gg.prototype.getActive=Gg.prototype.c;Gg.prototype.getMap=Gg.prototype.f;Gg.prototype.setActive=Gg.prototype.Ha;Gg.prototype.get=Gg.prototype.get;Gg.prototype.getKeys=Gg.prototype.O;Gg.prototype.getProperties=Gg.prototype.N;Gg.prototype.set=Gg.prototype.set;Gg.prototype.setProperties=Gg.prototype.H;Gg.prototype.unset=Gg.prototype.P;Gg.prototype.changed=Gg.prototype.s;Gg.prototype.dispatchEvent=Gg.prototype.b;Gg.prototype.getRevision=Gg.prototype.L;
990
+Gg.prototype.on=Gg.prototype.J;Gg.prototype.once=Gg.prototype.once;Gg.prototype.un=Gg.prototype.K;Kg.prototype.getActive=Kg.prototype.c;Kg.prototype.getMap=Kg.prototype.f;Kg.prototype.setActive=Kg.prototype.Ha;Kg.prototype.get=Kg.prototype.get;Kg.prototype.getKeys=Kg.prototype.O;Kg.prototype.getProperties=Kg.prototype.N;Kg.prototype.set=Kg.prototype.set;Kg.prototype.setProperties=Kg.prototype.H;Kg.prototype.unset=Kg.prototype.P;Kg.prototype.changed=Kg.prototype.s;Kg.prototype.dispatchEvent=Kg.prototype.b;
991
+Kg.prototype.getRevision=Kg.prototype.L;Kg.prototype.on=Kg.prototype.J;Kg.prototype.once=Kg.prototype.once;Kg.prototype.un=Kg.prototype.K;Ys.prototype.getActive=Ys.prototype.c;Ys.prototype.getMap=Ys.prototype.f;Ys.prototype.setActive=Ys.prototype.Ha;Ys.prototype.get=Ys.prototype.get;Ys.prototype.getKeys=Ys.prototype.O;Ys.prototype.getProperties=Ys.prototype.N;Ys.prototype.set=Ys.prototype.set;Ys.prototype.setProperties=Ys.prototype.H;Ys.prototype.unset=Ys.prototype.P;Ys.prototype.changed=Ys.prototype.s;
992
+Ys.prototype.dispatchEvent=Ys.prototype.b;Ys.prototype.getRevision=Ys.prototype.L;Ys.prototype.on=Ys.prototype.J;Ys.prototype.once=Ys.prototype.once;Ys.prototype.un=Ys.prototype.K;$g.prototype.getGeometry=$g.prototype.V;$g.prototype.getActive=$g.prototype.c;$g.prototype.getMap=$g.prototype.f;$g.prototype.setActive=$g.prototype.Ha;$g.prototype.get=$g.prototype.get;$g.prototype.getKeys=$g.prototype.O;$g.prototype.getProperties=$g.prototype.N;$g.prototype.set=$g.prototype.set;
993
+$g.prototype.setProperties=$g.prototype.H;$g.prototype.unset=$g.prototype.P;$g.prototype.changed=$g.prototype.s;$g.prototype.dispatchEvent=$g.prototype.b;$g.prototype.getRevision=$g.prototype.L;$g.prototype.on=$g.prototype.J;$g.prototype.once=$g.prototype.once;$g.prototype.un=$g.prototype.K;ju.prototype.getActive=ju.prototype.c;ju.prototype.getMap=ju.prototype.f;ju.prototype.setActive=ju.prototype.Ha;ju.prototype.get=ju.prototype.get;ju.prototype.getKeys=ju.prototype.O;
994
+ju.prototype.getProperties=ju.prototype.N;ju.prototype.set=ju.prototype.set;ju.prototype.setProperties=ju.prototype.H;ju.prototype.unset=ju.prototype.P;ju.prototype.changed=ju.prototype.s;ju.prototype.dispatchEvent=ju.prototype.b;ju.prototype.getRevision=ju.prototype.L;ju.prototype.on=ju.prototype.J;ju.prototype.once=ju.prototype.once;ju.prototype.un=ju.prototype.K;zu.prototype.type=zu.prototype.type;zu.prototype.target=zu.prototype.target;zu.prototype.preventDefault=zu.prototype.preventDefault;
995
+zu.prototype.stopPropagation=zu.prototype.stopPropagation;Au.prototype.getActive=Au.prototype.c;Au.prototype.getMap=Au.prototype.f;Au.prototype.setActive=Au.prototype.Ha;Au.prototype.get=Au.prototype.get;Au.prototype.getKeys=Au.prototype.O;Au.prototype.getProperties=Au.prototype.N;Au.prototype.set=Au.prototype.set;Au.prototype.setProperties=Au.prototype.H;Au.prototype.unset=Au.prototype.P;Au.prototype.changed=Au.prototype.s;Au.prototype.dispatchEvent=Au.prototype.b;Au.prototype.getRevision=Au.prototype.L;
996
+Au.prototype.on=Au.prototype.J;Au.prototype.once=Au.prototype.once;Au.prototype.un=Au.prototype.K;Lu.prototype.type=Lu.prototype.type;Lu.prototype.target=Lu.prototype.target;Lu.prototype.preventDefault=Lu.prototype.preventDefault;Lu.prototype.stopPropagation=Lu.prototype.stopPropagation;ah.prototype.getActive=ah.prototype.c;ah.prototype.getMap=ah.prototype.f;ah.prototype.setActive=ah.prototype.Ha;ah.prototype.get=ah.prototype.get;ah.prototype.getKeys=ah.prototype.O;ah.prototype.getProperties=ah.prototype.N;
997
+ah.prototype.set=ah.prototype.set;ah.prototype.setProperties=ah.prototype.H;ah.prototype.unset=ah.prototype.P;ah.prototype.changed=ah.prototype.s;ah.prototype.dispatchEvent=ah.prototype.b;ah.prototype.getRevision=ah.prototype.L;ah.prototype.on=ah.prototype.J;ah.prototype.once=ah.prototype.once;ah.prototype.un=ah.prototype.K;ch.prototype.getActive=ch.prototype.c;ch.prototype.getMap=ch.prototype.f;ch.prototype.setActive=ch.prototype.Ha;ch.prototype.get=ch.prototype.get;ch.prototype.getKeys=ch.prototype.O;
998
+ch.prototype.getProperties=ch.prototype.N;ch.prototype.set=ch.prototype.set;ch.prototype.setProperties=ch.prototype.H;ch.prototype.unset=ch.prototype.P;ch.prototype.changed=ch.prototype.s;ch.prototype.dispatchEvent=ch.prototype.b;ch.prototype.getRevision=ch.prototype.L;ch.prototype.on=ch.prototype.J;ch.prototype.once=ch.prototype.once;ch.prototype.un=ch.prototype.K;Nu.prototype.getActive=Nu.prototype.c;Nu.prototype.getMap=Nu.prototype.f;Nu.prototype.setActive=Nu.prototype.Ha;Nu.prototype.get=Nu.prototype.get;
999
+Nu.prototype.getKeys=Nu.prototype.O;Nu.prototype.getProperties=Nu.prototype.N;Nu.prototype.set=Nu.prototype.set;Nu.prototype.setProperties=Nu.prototype.H;Nu.prototype.unset=Nu.prototype.P;Nu.prototype.changed=Nu.prototype.s;Nu.prototype.dispatchEvent=Nu.prototype.b;Nu.prototype.getRevision=Nu.prototype.L;Nu.prototype.on=Nu.prototype.J;Nu.prototype.once=Nu.prototype.once;Nu.prototype.un=Nu.prototype.K;Vu.prototype.type=Vu.prototype.type;Vu.prototype.target=Vu.prototype.target;
1000
+Vu.prototype.preventDefault=Vu.prototype.preventDefault;Vu.prototype.stopPropagation=Vu.prototype.stopPropagation;eh.prototype.getActive=eh.prototype.c;eh.prototype.getMap=eh.prototype.f;eh.prototype.setActive=eh.prototype.Ha;eh.prototype.get=eh.prototype.get;eh.prototype.getKeys=eh.prototype.O;eh.prototype.getProperties=eh.prototype.N;eh.prototype.set=eh.prototype.set;eh.prototype.setProperties=eh.prototype.H;eh.prototype.unset=eh.prototype.P;eh.prototype.changed=eh.prototype.s;
1001
+eh.prototype.dispatchEvent=eh.prototype.b;eh.prototype.getRevision=eh.prototype.L;eh.prototype.on=eh.prototype.J;eh.prototype.once=eh.prototype.once;eh.prototype.un=eh.prototype.K;ih.prototype.getActive=ih.prototype.c;ih.prototype.getMap=ih.prototype.f;ih.prototype.setActive=ih.prototype.Ha;ih.prototype.get=ih.prototype.get;ih.prototype.getKeys=ih.prototype.O;ih.prototype.getProperties=ih.prototype.N;ih.prototype.set=ih.prototype.set;ih.prototype.setProperties=ih.prototype.H;ih.prototype.unset=ih.prototype.P;
1002
+ih.prototype.changed=ih.prototype.s;ih.prototype.dispatchEvent=ih.prototype.b;ih.prototype.getRevision=ih.prototype.L;ih.prototype.on=ih.prototype.J;ih.prototype.once=ih.prototype.once;ih.prototype.un=ih.prototype.K;mh.prototype.getActive=mh.prototype.c;mh.prototype.getMap=mh.prototype.f;mh.prototype.setActive=mh.prototype.Ha;mh.prototype.get=mh.prototype.get;mh.prototype.getKeys=mh.prototype.O;mh.prototype.getProperties=mh.prototype.N;mh.prototype.set=mh.prototype.set;
1003
+mh.prototype.setProperties=mh.prototype.H;mh.prototype.unset=mh.prototype.P;mh.prototype.changed=mh.prototype.s;mh.prototype.dispatchEvent=mh.prototype.b;mh.prototype.getRevision=mh.prototype.L;mh.prototype.on=mh.prototype.J;mh.prototype.once=mh.prototype.once;mh.prototype.un=mh.prototype.K;cv.prototype.getActive=cv.prototype.c;cv.prototype.getMap=cv.prototype.f;cv.prototype.setActive=cv.prototype.Ha;cv.prototype.get=cv.prototype.get;cv.prototype.getKeys=cv.prototype.O;
1004
+cv.prototype.getProperties=cv.prototype.N;cv.prototype.set=cv.prototype.set;cv.prototype.setProperties=cv.prototype.H;cv.prototype.unset=cv.prototype.P;cv.prototype.changed=cv.prototype.s;cv.prototype.dispatchEvent=cv.prototype.b;cv.prototype.getRevision=cv.prototype.L;cv.prototype.on=cv.prototype.J;cv.prototype.once=cv.prototype.once;cv.prototype.un=cv.prototype.K;fv.prototype.type=fv.prototype.type;fv.prototype.target=fv.prototype.target;fv.prototype.preventDefault=fv.prototype.preventDefault;
1005
+fv.prototype.stopPropagation=fv.prototype.stopPropagation;hv.prototype.getActive=hv.prototype.c;hv.prototype.getMap=hv.prototype.f;hv.prototype.setActive=hv.prototype.Ha;hv.prototype.get=hv.prototype.get;hv.prototype.getKeys=hv.prototype.O;hv.prototype.getProperties=hv.prototype.N;hv.prototype.set=hv.prototype.set;hv.prototype.setProperties=hv.prototype.H;hv.prototype.unset=hv.prototype.P;hv.prototype.changed=hv.prototype.s;hv.prototype.dispatchEvent=hv.prototype.b;hv.prototype.getRevision=hv.prototype.L;
1006
+hv.prototype.on=hv.prototype.J;hv.prototype.once=hv.prototype.once;hv.prototype.un=hv.prototype.K;mv.prototype.getActive=mv.prototype.c;mv.prototype.getMap=mv.prototype.f;mv.prototype.setActive=mv.prototype.Ha;mv.prototype.get=mv.prototype.get;mv.prototype.getKeys=mv.prototype.O;mv.prototype.getProperties=mv.prototype.N;mv.prototype.set=mv.prototype.set;mv.prototype.setProperties=mv.prototype.H;mv.prototype.unset=mv.prototype.P;mv.prototype.changed=mv.prototype.s;mv.prototype.dispatchEvent=mv.prototype.b;
1007
+mv.prototype.getRevision=mv.prototype.L;mv.prototype.on=mv.prototype.J;mv.prototype.once=mv.prototype.once;mv.prototype.un=mv.prototype.K;sv.prototype.type=sv.prototype.type;sv.prototype.target=sv.prototype.target;sv.prototype.preventDefault=sv.prototype.preventDefault;sv.prototype.stopPropagation=sv.prototype.stopPropagation;of.prototype.get=of.prototype.get;of.prototype.getKeys=of.prototype.O;of.prototype.getProperties=of.prototype.N;of.prototype.set=of.prototype.set;
1008
+of.prototype.setProperties=of.prototype.H;of.prototype.unset=of.prototype.P;of.prototype.changed=of.prototype.s;of.prototype.dispatchEvent=of.prototype.b;of.prototype.getRevision=of.prototype.L;of.prototype.on=of.prototype.J;of.prototype.once=of.prototype.once;of.prototype.un=of.prototype.K;rf.prototype.getClosestPoint=rf.prototype.Ab;rf.prototype.intersectsCoordinate=rf.prototype.sb;rf.prototype.getExtent=rf.prototype.G;rf.prototype.rotate=rf.prototype.rotate;rf.prototype.scale=rf.prototype.scale;
1009
+rf.prototype.simplify=rf.prototype.Rb;rf.prototype.transform=rf.prototype.tb;rf.prototype.get=rf.prototype.get;rf.prototype.getKeys=rf.prototype.O;rf.prototype.getProperties=rf.prototype.N;rf.prototype.set=rf.prototype.set;rf.prototype.setProperties=rf.prototype.H;rf.prototype.unset=rf.prototype.P;rf.prototype.changed=rf.prototype.s;rf.prototype.dispatchEvent=rf.prototype.b;rf.prototype.getRevision=rf.prototype.L;rf.prototype.on=rf.prototype.J;rf.prototype.once=rf.prototype.once;rf.prototype.un=rf.prototype.K;
1010
+ys.prototype.getFirstCoordinate=ys.prototype.ac;ys.prototype.getLastCoordinate=ys.prototype.bc;ys.prototype.getLayout=ys.prototype.cc;ys.prototype.rotate=ys.prototype.rotate;ys.prototype.scale=ys.prototype.scale;ys.prototype.getClosestPoint=ys.prototype.Ab;ys.prototype.intersectsCoordinate=ys.prototype.sb;ys.prototype.getExtent=ys.prototype.G;ys.prototype.simplify=ys.prototype.Rb;ys.prototype.get=ys.prototype.get;ys.prototype.getKeys=ys.prototype.O;ys.prototype.getProperties=ys.prototype.N;
1011
+ys.prototype.set=ys.prototype.set;ys.prototype.setProperties=ys.prototype.H;ys.prototype.unset=ys.prototype.P;ys.prototype.changed=ys.prototype.s;ys.prototype.dispatchEvent=ys.prototype.b;ys.prototype.getRevision=ys.prototype.L;ys.prototype.on=ys.prototype.J;ys.prototype.once=ys.prototype.once;ys.prototype.un=ys.prototype.K;tm.prototype.getClosestPoint=tm.prototype.Ab;tm.prototype.intersectsCoordinate=tm.prototype.sb;tm.prototype.getExtent=tm.prototype.G;tm.prototype.rotate=tm.prototype.rotate;
1012
+tm.prototype.scale=tm.prototype.scale;tm.prototype.simplify=tm.prototype.Rb;tm.prototype.transform=tm.prototype.tb;tm.prototype.get=tm.prototype.get;tm.prototype.getKeys=tm.prototype.O;tm.prototype.getProperties=tm.prototype.N;tm.prototype.set=tm.prototype.set;tm.prototype.setProperties=tm.prototype.H;tm.prototype.unset=tm.prototype.P;tm.prototype.changed=tm.prototype.s;tm.prototype.dispatchEvent=tm.prototype.b;tm.prototype.getRevision=tm.prototype.L;tm.prototype.on=tm.prototype.J;
1013
+tm.prototype.once=tm.prototype.once;tm.prototype.un=tm.prototype.K;Jf.prototype.getFirstCoordinate=Jf.prototype.ac;Jf.prototype.getLastCoordinate=Jf.prototype.bc;Jf.prototype.getLayout=Jf.prototype.cc;Jf.prototype.rotate=Jf.prototype.rotate;Jf.prototype.scale=Jf.prototype.scale;Jf.prototype.getClosestPoint=Jf.prototype.Ab;Jf.prototype.intersectsCoordinate=Jf.prototype.sb;Jf.prototype.getExtent=Jf.prototype.G;Jf.prototype.simplify=Jf.prototype.Rb;Jf.prototype.transform=Jf.prototype.tb;
1014
+Jf.prototype.get=Jf.prototype.get;Jf.prototype.getKeys=Jf.prototype.O;Jf.prototype.getProperties=Jf.prototype.N;Jf.prototype.set=Jf.prototype.set;Jf.prototype.setProperties=Jf.prototype.H;Jf.prototype.unset=Jf.prototype.P;Jf.prototype.changed=Jf.prototype.s;Jf.prototype.dispatchEvent=Jf.prototype.b;Jf.prototype.getRevision=Jf.prototype.L;Jf.prototype.on=Jf.prototype.J;Jf.prototype.once=Jf.prototype.once;Jf.prototype.un=Jf.prototype.K;O.prototype.getFirstCoordinate=O.prototype.ac;
1015
+O.prototype.getLastCoordinate=O.prototype.bc;O.prototype.getLayout=O.prototype.cc;O.prototype.rotate=O.prototype.rotate;O.prototype.scale=O.prototype.scale;O.prototype.getClosestPoint=O.prototype.Ab;O.prototype.intersectsCoordinate=O.prototype.sb;O.prototype.getExtent=O.prototype.G;O.prototype.simplify=O.prototype.Rb;O.prototype.transform=O.prototype.tb;O.prototype.get=O.prototype.get;O.prototype.getKeys=O.prototype.O;O.prototype.getProperties=O.prototype.N;O.prototype.set=O.prototype.set;
1016
+O.prototype.setProperties=O.prototype.H;O.prototype.unset=O.prototype.P;O.prototype.changed=O.prototype.s;O.prototype.dispatchEvent=O.prototype.b;O.prototype.getRevision=O.prototype.L;O.prototype.on=O.prototype.J;O.prototype.once=O.prototype.once;O.prototype.un=O.prototype.K;P.prototype.getFirstCoordinate=P.prototype.ac;P.prototype.getLastCoordinate=P.prototype.bc;P.prototype.getLayout=P.prototype.cc;P.prototype.rotate=P.prototype.rotate;P.prototype.scale=P.prototype.scale;
1017
+P.prototype.getClosestPoint=P.prototype.Ab;P.prototype.intersectsCoordinate=P.prototype.sb;P.prototype.getExtent=P.prototype.G;P.prototype.simplify=P.prototype.Rb;P.prototype.transform=P.prototype.tb;P.prototype.get=P.prototype.get;P.prototype.getKeys=P.prototype.O;P.prototype.getProperties=P.prototype.N;P.prototype.set=P.prototype.set;P.prototype.setProperties=P.prototype.H;P.prototype.unset=P.prototype.P;P.prototype.changed=P.prototype.s;P.prototype.dispatchEvent=P.prototype.b;
1018
+P.prototype.getRevision=P.prototype.L;P.prototype.on=P.prototype.J;P.prototype.once=P.prototype.once;P.prototype.un=P.prototype.K;Q.prototype.getFirstCoordinate=Q.prototype.ac;Q.prototype.getLastCoordinate=Q.prototype.bc;Q.prototype.getLayout=Q.prototype.cc;Q.prototype.rotate=Q.prototype.rotate;Q.prototype.scale=Q.prototype.scale;Q.prototype.getClosestPoint=Q.prototype.Ab;Q.prototype.intersectsCoordinate=Q.prototype.sb;Q.prototype.getExtent=Q.prototype.G;Q.prototype.simplify=Q.prototype.Rb;
1019
+Q.prototype.transform=Q.prototype.tb;Q.prototype.get=Q.prototype.get;Q.prototype.getKeys=Q.prototype.O;Q.prototype.getProperties=Q.prototype.N;Q.prototype.set=Q.prototype.set;Q.prototype.setProperties=Q.prototype.H;Q.prototype.unset=Q.prototype.P;Q.prototype.changed=Q.prototype.s;Q.prototype.dispatchEvent=Q.prototype.b;Q.prototype.getRevision=Q.prototype.L;Q.prototype.on=Q.prototype.J;Q.prototype.once=Q.prototype.once;Q.prototype.un=Q.prototype.K;R.prototype.getFirstCoordinate=R.prototype.ac;
1020
+R.prototype.getLastCoordinate=R.prototype.bc;R.prototype.getLayout=R.prototype.cc;R.prototype.rotate=R.prototype.rotate;R.prototype.scale=R.prototype.scale;R.prototype.getClosestPoint=R.prototype.Ab;R.prototype.intersectsCoordinate=R.prototype.sb;R.prototype.getExtent=R.prototype.G;R.prototype.simplify=R.prototype.Rb;R.prototype.transform=R.prototype.tb;R.prototype.get=R.prototype.get;R.prototype.getKeys=R.prototype.O;R.prototype.getProperties=R.prototype.N;R.prototype.set=R.prototype.set;
1021
+R.prototype.setProperties=R.prototype.H;R.prototype.unset=R.prototype.P;R.prototype.changed=R.prototype.s;R.prototype.dispatchEvent=R.prototype.b;R.prototype.getRevision=R.prototype.L;R.prototype.on=R.prototype.J;R.prototype.once=R.prototype.once;R.prototype.un=R.prototype.K;C.prototype.getFirstCoordinate=C.prototype.ac;C.prototype.getLastCoordinate=C.prototype.bc;C.prototype.getLayout=C.prototype.cc;C.prototype.rotate=C.prototype.rotate;C.prototype.scale=C.prototype.scale;
1022
+C.prototype.getClosestPoint=C.prototype.Ab;C.prototype.intersectsCoordinate=C.prototype.sb;C.prototype.getExtent=C.prototype.G;C.prototype.simplify=C.prototype.Rb;C.prototype.transform=C.prototype.tb;C.prototype.get=C.prototype.get;C.prototype.getKeys=C.prototype.O;C.prototype.getProperties=C.prototype.N;C.prototype.set=C.prototype.set;C.prototype.setProperties=C.prototype.H;C.prototype.unset=C.prototype.P;C.prototype.changed=C.prototype.s;C.prototype.dispatchEvent=C.prototype.b;
1023
+C.prototype.getRevision=C.prototype.L;C.prototype.on=C.prototype.J;C.prototype.once=C.prototype.once;C.prototype.un=C.prototype.K;D.prototype.getFirstCoordinate=D.prototype.ac;D.prototype.getLastCoordinate=D.prototype.bc;D.prototype.getLayout=D.prototype.cc;D.prototype.rotate=D.prototype.rotate;D.prototype.scale=D.prototype.scale;D.prototype.getClosestPoint=D.prototype.Ab;D.prototype.intersectsCoordinate=D.prototype.sb;D.prototype.getExtent=D.prototype.G;D.prototype.simplify=D.prototype.Rb;
1024
+D.prototype.transform=D.prototype.tb;D.prototype.get=D.prototype.get;D.prototype.getKeys=D.prototype.O;D.prototype.getProperties=D.prototype.N;D.prototype.set=D.prototype.set;D.prototype.setProperties=D.prototype.H;D.prototype.unset=D.prototype.P;D.prototype.changed=D.prototype.s;D.prototype.dispatchEvent=D.prototype.b;D.prototype.getRevision=D.prototype.L;D.prototype.on=D.prototype.J;D.prototype.once=D.prototype.once;D.prototype.un=D.prototype.K;Sm.prototype.readFeatures=Sm.prototype.Oa;
1025
+an.prototype.readFeatures=an.prototype.Oa;Sm.prototype.readFeatures=Sm.prototype.Oa;md.prototype.get=md.prototype.get;md.prototype.getKeys=md.prototype.O;md.prototype.getProperties=md.prototype.N;md.prototype.set=md.prototype.set;md.prototype.setProperties=md.prototype.H;md.prototype.unset=md.prototype.P;md.prototype.changed=md.prototype.s;md.prototype.dispatchEvent=md.prototype.b;md.prototype.getRevision=md.prototype.L;md.prototype.on=md.prototype.J;md.prototype.once=md.prototype.once;
1026
+md.prototype.un=md.prototype.K;nd.prototype.getMap=nd.prototype.g;nd.prototype.setMap=nd.prototype.setMap;nd.prototype.setTarget=nd.prototype.f;nd.prototype.get=nd.prototype.get;nd.prototype.getKeys=nd.prototype.O;nd.prototype.getProperties=nd.prototype.N;nd.prototype.set=nd.prototype.set;nd.prototype.setProperties=nd.prototype.H;nd.prototype.unset=nd.prototype.P;nd.prototype.changed=nd.prototype.s;nd.prototype.dispatchEvent=nd.prototype.b;nd.prototype.getRevision=nd.prototype.L;nd.prototype.on=nd.prototype.J;
1027
+nd.prototype.once=nd.prototype.once;nd.prototype.un=nd.prototype.K;yd.prototype.getMap=yd.prototype.g;yd.prototype.setMap=yd.prototype.setMap;yd.prototype.setTarget=yd.prototype.f;yd.prototype.get=yd.prototype.get;yd.prototype.getKeys=yd.prototype.O;yd.prototype.getProperties=yd.prototype.N;yd.prototype.set=yd.prototype.set;yd.prototype.setProperties=yd.prototype.H;yd.prototype.unset=yd.prototype.P;yd.prototype.changed=yd.prototype.s;yd.prototype.dispatchEvent=yd.prototype.b;
1028
+yd.prototype.getRevision=yd.prototype.L;yd.prototype.on=yd.prototype.J;yd.prototype.once=yd.prototype.once;yd.prototype.un=yd.prototype.K;Dd.prototype.getMap=Dd.prototype.g;Dd.prototype.setMap=Dd.prototype.setMap;Dd.prototype.setTarget=Dd.prototype.f;Dd.prototype.get=Dd.prototype.get;Dd.prototype.getKeys=Dd.prototype.O;Dd.prototype.getProperties=Dd.prototype.N;Dd.prototype.set=Dd.prototype.set;Dd.prototype.setProperties=Dd.prototype.H;Dd.prototype.unset=Dd.prototype.P;Dd.prototype.changed=Dd.prototype.s;
1029
+Dd.prototype.dispatchEvent=Dd.prototype.b;Dd.prototype.getRevision=Dd.prototype.L;Dd.prototype.on=Dd.prototype.J;Dd.prototype.once=Dd.prototype.once;Dd.prototype.un=Dd.prototype.K;Bk.prototype.getMap=Bk.prototype.g;Bk.prototype.setMap=Bk.prototype.setMap;Bk.prototype.setTarget=Bk.prototype.f;Bk.prototype.get=Bk.prototype.get;Bk.prototype.getKeys=Bk.prototype.O;Bk.prototype.getProperties=Bk.prototype.N;Bk.prototype.set=Bk.prototype.set;Bk.prototype.setProperties=Bk.prototype.H;Bk.prototype.unset=Bk.prototype.P;
1030
+Bk.prototype.changed=Bk.prototype.s;Bk.prototype.dispatchEvent=Bk.prototype.b;Bk.prototype.getRevision=Bk.prototype.L;Bk.prototype.on=Bk.prototype.J;Bk.prototype.once=Bk.prototype.once;Bk.prototype.un=Bk.prototype.K;ud.prototype.getMap=ud.prototype.g;ud.prototype.setMap=ud.prototype.setMap;ud.prototype.setTarget=ud.prototype.f;ud.prototype.get=ud.prototype.get;ud.prototype.getKeys=ud.prototype.O;ud.prototype.getProperties=ud.prototype.N;ud.prototype.set=ud.prototype.set;
1031
+ud.prototype.setProperties=ud.prototype.H;ud.prototype.unset=ud.prototype.P;ud.prototype.changed=ud.prototype.s;ud.prototype.dispatchEvent=ud.prototype.b;ud.prototype.getRevision=ud.prototype.L;ud.prototype.on=ud.prototype.J;ud.prototype.once=ud.prototype.once;ud.prototype.un=ud.prototype.K;Gk.prototype.getMap=Gk.prototype.g;Gk.prototype.setMap=Gk.prototype.setMap;Gk.prototype.setTarget=Gk.prototype.f;Gk.prototype.get=Gk.prototype.get;Gk.prototype.getKeys=Gk.prototype.O;
1032
+Gk.prototype.getProperties=Gk.prototype.N;Gk.prototype.set=Gk.prototype.set;Gk.prototype.setProperties=Gk.prototype.H;Gk.prototype.unset=Gk.prototype.P;Gk.prototype.changed=Gk.prototype.s;Gk.prototype.dispatchEvent=Gk.prototype.b;Gk.prototype.getRevision=Gk.prototype.L;Gk.prototype.on=Gk.prototype.J;Gk.prototype.once=Gk.prototype.once;Gk.prototype.un=Gk.prototype.K;wd.prototype.getMap=wd.prototype.g;wd.prototype.setMap=wd.prototype.setMap;wd.prototype.setTarget=wd.prototype.f;wd.prototype.get=wd.prototype.get;
1033
+wd.prototype.getKeys=wd.prototype.O;wd.prototype.getProperties=wd.prototype.N;wd.prototype.set=wd.prototype.set;wd.prototype.setProperties=wd.prototype.H;wd.prototype.unset=wd.prototype.P;wd.prototype.changed=wd.prototype.s;wd.prototype.dispatchEvent=wd.prototype.b;wd.prototype.getRevision=wd.prototype.L;wd.prototype.on=wd.prototype.J;wd.prototype.once=wd.prototype.once;wd.prototype.un=wd.prototype.K;Lk.prototype.getMap=Lk.prototype.g;Lk.prototype.setMap=Lk.prototype.setMap;
1034
+Lk.prototype.setTarget=Lk.prototype.f;Lk.prototype.get=Lk.prototype.get;Lk.prototype.getKeys=Lk.prototype.O;Lk.prototype.getProperties=Lk.prototype.N;Lk.prototype.set=Lk.prototype.set;Lk.prototype.setProperties=Lk.prototype.H;Lk.prototype.unset=Lk.prototype.P;Lk.prototype.changed=Lk.prototype.s;Lk.prototype.dispatchEvent=Lk.prototype.b;Lk.prototype.getRevision=Lk.prototype.L;Lk.prototype.on=Lk.prototype.J;Lk.prototype.once=Lk.prototype.once;Lk.prototype.un=Lk.prototype.K;Qk.prototype.getMap=Qk.prototype.g;
1035
+Qk.prototype.setMap=Qk.prototype.setMap;Qk.prototype.setTarget=Qk.prototype.f;Qk.prototype.get=Qk.prototype.get;Qk.prototype.getKeys=Qk.prototype.O;Qk.prototype.getProperties=Qk.prototype.N;Qk.prototype.set=Qk.prototype.set;Qk.prototype.setProperties=Qk.prototype.H;Qk.prototype.unset=Qk.prototype.P;Qk.prototype.changed=Qk.prototype.s;Qk.prototype.dispatchEvent=Qk.prototype.b;Qk.prototype.getRevision=Qk.prototype.L;Qk.prototype.on=Qk.prototype.J;Qk.prototype.once=Qk.prototype.once;
1036
+Qk.prototype.un=Qk.prototype.K;
1037
+ return OPENLAYERS.ol;
1038
+}));
1039
+
translate/translate.js
-2
@@ -96,10 +96,8 @@ var minifyMeshCentralSourceFiles = [
96
"../public/scripts/amt-terminal-0.0.2.js",
97
"../public/scripts/amt-wsman-0.2.0.js",
98
"../public/scripts/amt-wsman-ws-0.2.0.js",
99
- "../public/scripts/charts.js",
99
"../public/scripts/common-0.0.1.js",
100
"../public/scripts/meshcentral.js",
102
- "../public/scripts/ol.js",
101
"../public/scripts/ol3-contextmenu.js",
102
"../public/scripts/u2f-api.js",
103
"../public/scripts/xterm-addon-fit.js",