{"version":3,"file":"CesiumNavigation.umd.js","sources":["../src/cesium/Cesium.js","../node_modules/_core-js@2.6.11@core-js/modules/_fails.js","../node_modules/_core-js@2.6.11@core-js/modules/_descriptors.js","../node_modules/_core-js@2.6.11@core-js/modules/_is-object.js","../node_modules/_core-js@2.6.11@core-js/modules/_an-object.js","../node_modules/_core-js@2.6.11@core-js/modules/_global.js","../node_modules/_core-js@2.6.11@core-js/modules/_dom-create.js","../node_modules/_core-js@2.6.11@core-js/modules/_ie8-dom-define.js","../node_modules/_core-js@2.6.11@core-js/modules/_to-primitive.js","../node_modules/_core-js@2.6.11@core-js/modules/_object-dp.js","../node_modules/_core-js@2.6.11@core-js/modules/_flags.js","../node_modules/_core-js@2.6.11@core-js/modules/es6.regexp.flags.js","../node_modules/_core-js@2.6.11@core-js/modules/_property-desc.js","../node_modules/_core-js@2.6.11@core-js/modules/_hide.js","../node_modules/_core-js@2.6.11@core-js/modules/_has.js","../node_modules/_core-js@2.6.11@core-js/modules/_uid.js","../node_modules/_core-js@2.6.11@core-js/modules/_core.js","../node_modules/_core-js@2.6.11@core-js/modules/_library.js","../node_modules/_core-js@2.6.11@core-js/modules/_shared.js","../node_modules/_core-js@2.6.11@core-js/modules/_function-to-string.js","../node_modules/_core-js@2.6.11@core-js/modules/_redefine.js","../node_modules/_core-js@2.6.11@core-js/modules/es6.regexp.to-string.js","../node_modules/_core-js@2.6.11@core-js/modules/es6.date.to-string.js","../node_modules/_core-js@2.6.11@core-js/modules/_cof.js","../node_modules/_core-js@2.6.11@core-js/modules/_wks.js","../node_modules/_core-js@2.6.11@core-js/modules/_classof.js","../node_modules/_core-js@2.6.11@core-js/modules/es6.object.to-string.js","../src/core/createFragmentFromTemplate.js","../src/core/loadView.js","../src/viewModels/DistanceLegendViewModel.js","../node_modules/_core-js@2.6.11@core-js/modules/_a-function.js","../node_modules/_core-js@2.6.11@core-js/modules/_ctx.js","../node_modules/_core-js@2.6.11@core-js/modules/_export.js","../node_modules/_core-js@2.6.11@core-js/modules/_iobject.js","../node_modules/_core-js@2.6.11@core-js/modules/_defined.js","../node_modules/_core-js@2.6.11@core-js/modules/_to-iobject.js","../node_modules/_core-js@2.6.11@core-js/modules/_to-integer.js","../node_modules/_core-js@2.6.11@core-js/modules/_to-length.js","../node_modules/_core-js@2.6.11@core-js/modules/_to-absolute-index.js","../node_modules/_core-js@2.6.11@core-js/modules/_array-includes.js","../node_modules/_core-js@2.6.11@core-js/modules/_shared-key.js","../node_modules/_core-js@2.6.11@core-js/modules/_object-keys-internal.js","../node_modules/_core-js@2.6.11@core-js/modules/_enum-bug-keys.js","../node_modules/_core-js@2.6.11@core-js/modules/_object-keys.js","../node_modules/_core-js@2.6.11@core-js/modules/_object-dps.js","../node_modules/_core-js@2.6.11@core-js/modules/_html.js","../node_modules/_core-js@2.6.11@core-js/modules/_object-create.js","../node_modules/_core-js@2.6.11@core-js/modules/es6.object.create.js","../node_modules/_core-js@2.6.11@core-js/modules/es6.function.name.js","../src/svgPaths/svgReset.js","../src/viewModels/UserInterfaceControl.js","../src/viewModels/NavigationControl.js","../src/viewModels/ResetViewNavigationControl.js","../src/core/Utils.js","../src/viewModels/ZoomNavigationControl.js","../src/svgPaths/svgCompassOuterRing.js","../src/svgPaths/svgCompassGyro.js","../src/svgPaths/svgCompassRotationMarker.js","../src/viewModels/NavigationViewModel.js","../src/CesiumNavigation.js"],"sourcesContent":["export default window.Cesium","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","'use strict';\n// 21.2.5.3 get RegExp.prototype.flags\nvar anObject = require('./_an-object');\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n","// 21.2.5.3 get RegExp.prototype.flags()\nif (require('./_descriptors') && /./g.flags != 'g') require('./_object-dp').f(RegExp.prototype, 'flags', {\n configurable: true,\n get: require('./_flags')\n});\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var core = module.exports = { version: '2.6.11' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","module.exports = false;\n","var core = require('./_core');\nvar global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: require('./_library') ? 'pure' : 'global',\n copyright: '© 2019 Denis Pushkarev (zloirock.ru)'\n});\n","module.exports = require('./_shared')('native-function-to-string', Function.toString);\n","var global = require('./_global');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar SRC = require('./_uid')('src');\nvar $toString = require('./_function-to-string');\nvar TO_STRING = 'toString';\nvar TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n","'use strict';\nrequire('./es6.regexp.flags');\nvar anObject = require('./_an-object');\nvar $flags = require('./_flags');\nvar DESCRIPTORS = require('./_descriptors');\nvar TO_STRING = 'toString';\nvar $toString = /./[TO_STRING];\n\nvar define = function (fn) {\n require('./_redefine')(RegExp.prototype, TO_STRING, fn, true);\n};\n\n// 21.2.5.14 RegExp.prototype.toString()\nif (require('./_fails')(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {\n define(function toString() {\n var R = anObject(this);\n return '/'.concat(R.source, '/',\n 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);\n });\n// FF44- RegExp#toString has a wrong name\n} else if ($toString.name != TO_STRING) {\n define(function toString() {\n return $toString.call(this);\n });\n}\n","var DateProto = Date.prototype;\nvar INVALID_DATE = 'Invalid Date';\nvar TO_STRING = 'toString';\nvar $toString = DateProto[TO_STRING];\nvar getTime = DateProto.getTime;\nif (new Date(NaN) + '' != INVALID_DATE) {\n require('./_redefine')(DateProto, TO_STRING, function toString() {\n var value = getTime.call(this);\n // eslint-disable-next-line no-self-compare\n return value === value ? $toString.call(this) : INVALID_DATE;\n });\n}\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof');\nvar TAG = require('./_wks')('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n","'use strict';\n// 19.1.3.6 Object.prototype.toString()\nvar classof = require('./_classof');\nvar test = {};\ntest[require('./_wks')('toStringTag')] = 'z';\nif (test + '' != '[object z]') {\n require('./_redefine')(Object.prototype, 'toString', function toString() {\n return '[object ' + classof(this) + ']';\n }, true);\n}\n","\nconst createFragmentFromTemplate = function (htmlString) {\n var holder = document.createElement('div')\n holder.innerHTML = htmlString\n var fragment = document.createDocumentFragment()\n while (holder.firstChild) {\n fragment.appendChild(holder.firstChild)\n }\n\n return fragment\n}\n\nexport default createFragmentFromTemplate\n","/* eslint-disable no-unused-vars */\nimport Cesium from '../cesium/Cesium'\nimport createFragmentFromTemplate from './createFragmentFromTemplate'\nvar getElement = Cesium.getElement\nvar Knockout = Cesium.knockout\n\nvar loadView = function (htmlString, container, viewModel) {\n container = getElement(container)\n\n var fragment = createFragmentFromTemplate(htmlString)\n\n // Sadly, fragment.childNodes doesn't have a slice function.\n // This code could be replaced with Array.prototype.slice.call(fragment.childNodes)\n // but that seems slightly error prone.\n var nodes = []\n\n var i\n for (i = 0; i < fragment.childNodes.length; ++i) {\n nodes.push(fragment.childNodes[i])\n }\n\n container.appendChild(fragment)\n\n for (i = 0; i < nodes.length; ++i) {\n var node = nodes[i]\n if (node.nodeType === 1 || node.nodeType === 8) {\n Knockout.applyBindings(viewModel, node)\n }\n }\n\n return nodes\n}\n\nexport default loadView\n","/* eslint-disable no-unused-vars */\nimport Cesium from '../cesium/Cesium'\nimport loadView from '../core/loadView'\nvar defined = Cesium.defined\nvar DeveloperError = Cesium.DeveloperError\nvar EllipsoidGeodesic = Cesium.EllipsoidGeodesic\nvar Cartesian2 = Cesium.Cartesian2\nvar getTimestamp = Cesium.getTimestamp\nvar EventHelper = Cesium.EventHelper\nvar Knockout = Cesium.knockout\n\nvar DistanceLegendViewModel = function (options) {\n if (!defined(options) || !defined(options.terria)) {\n throw new DeveloperError('options.terria is required.')\n }\n\n this.terria = options.terria\n this._removeSubscription = undefined\n this._lastLegendUpdate = undefined\n this.eventHelper = new EventHelper()\n\n this.distanceLabel = undefined\n this.barWidth = undefined\n\n this.enableDistanceLegend = (defined(options.enableDistanceLegend)) ? options.enableDistanceLegend : true\n\n Knockout.track(this, ['distanceLabel', 'barWidth'])\n\n this.eventHelper.add(this.terria.afterWidgetChanged, function () {\n if (defined(this._removeSubscription)) {\n this._removeSubscription()\n this._removeSubscription = undefined\n }\n }, this)\n // this.terria.beforeWidgetChanged.addEventListener(function () {\n // if (defined(this._removeSubscription)) {\n // this._removeSubscription();\n // this._removeSubscription = undefined;\n // }\n // }, this);\n\n var that = this\n\n function addUpdateSubscription () {\n if (defined(that.terria)) {\n var scene = that.terria.scene\n that._removeSubscription = scene.postRender.addEventListener(function () {\n updateDistanceLegendCesium(this, scene)\n }, that)\n }\n }\n\n addUpdateSubscription()\n this.eventHelper.add(this.terria.afterWidgetChanged, function () {\n addUpdateSubscription()\n }, this)\n // this.terria.afterWidgetChanged.addEventListener(function() {\n // addUpdateSubscription();\n // }, this);\n}\n\nDistanceLegendViewModel.prototype.destroy = function () {\n this.eventHelper.removeAll()\n}\n\nDistanceLegendViewModel.prototype.show = function (container) {\n var testing\n if (this.enableDistanceLegend) {\n testing = '